
KeylessUniversal

local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local Tool = Instance.new("Tool")
Tool.Name = "Delta_MiniGun"
Tool.RequiresHandle = true
Tool.Parent = Player.Backpack
-- สร้างด้ามจับปืน
local Handle = Instance.new("Part")
Handle.Name = "Handle"
Handle.Size = Vector3.new(1, 1, 4)
Handle.BrickColor = BrickColor.new("Really Black")
Handle.Parent = Tool
local Shooting = false
local FireRate = 0.05 -- ความเร็วในการรัว (ยิ่งน้อยยิ่งรัว)
local BulletDamage = 10
-- ฟังก์ชันสร้างกระสุน (Visual Only - หากต้องการดาเมจจริงต้องใช้ RemoteEvent)
local function Fire()
local Bullet = Instance.new("Part")
Bullet.Size = Vector3.new(0.2, 0.2, 2)
Bullet.BrickColor = BrickColor.new("New Yeller")
Bullet.Material = Enum.Material.Neon
Bullet.CanCollide = false
Bullet.CFrame = CFrame.new(Handle.Position, Mouse.Hit.p)
Bullet.Parent = game.Workspace
local Velocity = Instance.new("BodyVelocity")
Velocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
Velocity.Velocity = (Mouse.Hit.p - Handle.Position).unit * 300
Velocity.Parent = Bullet
game:GetService("Debris"):AddItem(Bullet, 2) -- ลบกระสุนทิ้งใน 2 วินาที
end
Tool.Activated:Connect(function()
Shooting = true
while Shooting do
Fire()
task.wait(FireRate)
end
end)
Tool.Deactivated:Connect(function()
Shooting = false
end)No comments yet for this script.



