local g=script.Parent local p=g.Muzzle local J local I local w local k=true local R=false local K=p.FireSound local W=players:GetPlayerFromCharacter(g.Parent)while not W do g.AncestryChanged:wait()W=players:GetPlayerFromCharacter(g.Parent)end local G=false repeat wait()until W.Character
-- 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
