-- Local variables

local tool = script.Parent
local muzzle = tool.Muzzle
local currentAmmo	-- current ammo amount in clip
local ammoLeft		-- how much ammo you have left besides what's in your current clip
local remainingAmmo	-- used during reloading to keep track of ammo in old clip
local canFire = true
local reloading = false
local fireSound = muzzle.FireSound

local player = players:GetPlayerFromCharacter(tool.Parent)
while not player do
	tool.AncestryChanged:wait()
	player = players:GetPlayerFromCharacter(tool.Parent)
end

local equipped = false

repeat wait() until player.Character
