-- When tool deselected

function onDeselected(mouse)
	myMouse = nil
end

rayPart					= Instance.new("Part")
rayPart.Name			= "MG Ray"
rayPart.Transparency	= .5
rayPart.Anchored		= true
rayPart.CanCollide		= false
rayPart.TopSurface		= Enum.SurfaceType.Smooth
rayPart.BottomSurface	= Enum.SurfaceType.Smooth
rayPart.formFactor		= Enum.FormFactor.Custom
rayPart.BrickColor		= BrickColor.new("Bright yellow")
rayPart.Reflectance		= 0
rayPart.Material = Enum.Material.SmoothPlastic

function fireCoax()
	local MGAmmo = tankStats.MGAmmo;
	if MGAmmo.Value <= 0 then
		return false;
	end;
	
	local machineGun = parts.Parent.Gun.Coax
	local PL				= Instance.new("PointLight")
	PL.Parent				= machineGun
	PL.Brightness			= 50
	PL.Color				= Color3.new(255, 255, 0)
	PL.Range				= 15
	PL.Shadows				= true
	
	
	MGAmmo.Value = MGAmmo.Value - 1;
	machineGun.Sound:Play();
	
	local offset = (parts.Parent.Gun.Muzzle.CFrame * CFrame.new(0,100,0).p
                    - parts.Parent.Gun.Muzzle.Position).unit * 999;
    local ray = Ray.new(machineGun.Position, offset);
	