Here is all my thingies in order;
gui.Text = "["..ammo.."]"
end
local function keyPressed(mouse,key)
if not reloading and key=='r' and ammo~=clipSize then
handle.Reload:Play()
mouse.Icon = cursorReload
gui.Text = "[REL]"
reloading = true
wait(reloadTime)
ammo = clipSize
mouse.Icon = cursorNormal
gui.Text = "["..ammo.."]"
reloading = false
end
end
mouse.Button1Down:connect(function() mouseClicked(mouse) end)
mouse.Button1Up:connect(function() mouseDown = false end)
mouse.KeyDown:connect(function(key) keyPressed(mouse, key) end)
gui.Text = reloading and "[REL]" or "["..ammo.."]"
mouse.Icon = cursorNormal
hitSound.Parent = player.PlayerGui
equipped=true
end)
tool.Unequipped:connect(function()
mouseDown = false
deathCon:disconnect()
hitSound.Parent = nil
equipped = false
end)
|