Pistol Script: Ammo = 15
damage = 300
enabled = true
Player = game.Players.LocalPlayer
mouse = Player:GetMouse()
script.Parent.Activated:connect(function()
if Ammo > 0 then
Bullet = Instance.new("Part", workspace)
game.Debris:AddItem(Bullet, 2)
Bullet.CFrame = script.Parent.Handle.CFrame
Bullet.CFrame = CFrame.new(Bullet.Position, mouse.Hit.p)
Bullet.Size = Vector3.new(0.2, 0.2, 0.2)
Bullet.Shape = "Ball"
Bullet.BrickColor = BrickColor.new("Really black")
Bullet.CanCollide = true
local Vel = Instance.new("BodyVelocity", Bullet)
Vel.Velocity = Bullet.CFrame.lookVector *80
Vel.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
script.Parent.GripPos = Vector3.new(0, -0.5, -0.4)
wait(0)
script.Parent.GripPos = Vector3.new(0, -0.5, -0.45)
script.Parent.FireSound:Play()
Ammo = Ammo - 1
end
wait(0)
Bullet.Touched:connect(function(hit)
local h = hit.Parent:FindFirstChild("Humanoid")
if h ~= nil then
hit.Parent.Humanoid:TakeDamage(damage)
wait(1)
Bullet:Destroy()
if enabled == true then
enabled = false
enabled = true
wait(5)
enabled = false
wait(0)
end
end
end)
end)
mouse.KeyDown:connect(function(Key)
if Key == "r" then
if Ammo == 0 then
wait(1)
script.Parent.ReloadSound:Play()
Ammo = 15
end
end
end)
Anyways, instead of just not knowing how much ammo you have left. I would like to make a GUI, with numbervalues. Now, I can do that. But, when I shoot, the textlabel text stays at the original text (15)
Someone please help.

2 comments
put it into a code block
I forgot to add the code blocks sorry.