local T=script.Parent local E local i=nil script.Parent.Equipped:Connect(function(C)local W=T.Parent local r=(game:GetService("\080\108\097\121\101\114\115")):GetPlayerFromCharacter(W)local w=W:FindFirstChild("\072\117\109\097\110\111\105\100")E=T:WaitForChild("\073\100\108\101")if E then i=w:LoadAnimation(E)end if i then i:Play()end end)script.Parent.Unequipped:Connect(function(T)if i then i:Stop()end end)


local Tool = script.Parent
local IdleAnimation
local IdleTrack = nil
script.Parent.Equipped:Connect(function(mouse)
	local MyCharacter = Tool.Parent
	local MyPlayer = game:GetService('Players'):GetPlayerFromCharacter(MyCharacter)
	local MyHumanoid = MyCharacter:FindFirstChild('Humanoid')
	IdleAnimation = Tool:WaitForChild("Idle")
	if IdleAnimation then
		IdleTrack = MyHumanoid:LoadAnimation(IdleAnimation)
	end
	if IdleTrack then
		IdleTrack:Play()
	end
end)

script.Parent.Unequipped:Connect(function(mouse)
	if IdleTrack then
		IdleTrack:Stop()
	end
end)
