-- Script Made By johndeer2233 For A Application To Make A Game
local plr = game.Players.LocalPlayer
local Gun = script.Parent
local Ammo = 5
local AmmoGui = plr.PlayerGui:WaitForChild("Ammo")
local AmmoL = AmmoGui:WaitForChild("AmmoL")
local mouse = plr:GetMouse()
local function shoot()
-- Creating The Bullet
local bullet = Instance.new("Part",game.workspace)
bullet.Shape = "Ball"
bullet.Size = Vector3.new(2,2,2)
bullet.TopSurface = "Smooth"
bullet.BottomSurface = "Smooth"
bullet.BrickColor = BrickColor.new("Really Black")
bullet.CanCollide = false
bullet.Anchored = false
--CFrame Stuff
bullet.CFrame = Gun.Handle.CFrame
bullet.CFrame = CFrame.new(bullet.Position,mouse.Hit.p)
--body velocity
local v = Instance.new("BodyVelocity",bullet)
v.velocity = bullet.CFrame.lookVector * 90
v.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
game.Debris:AddItem(bullet, 5)
-- Making Sure you lose 1 Ammo everytime you shoot.
Ammo = Ammo - 1
end
local function reload()
repeat
wait(1)
Ammo = Ammo + 1
until Ammo == 5
end
script.Parent.Equipped:connect(function()
AmmoGui.Enabled = true
AmmoL.Text = "Ammo: "..Ammo
wait(1)
AmmoL.Visible = true
end)
script.Parent.Unequipped:connect(function()
AmmoGui.Enabled = false
AmmoL.Visible = false
end)
script.Parent.Activated:connect(function()
if Ammo > 0 then
shoot()
end
end)
while wait() do
AmmoL.Text = "Ammo: "..Ammo
end
while wait() do
if Ammo == 0 then
reload()
end
end
No error in output my gun won't reload. Help?

1 comment
Ha I didnt give you the whole script lol I closed them on my end imm sorry