local p=script.Parent local W local S=nil W=p:WaitForChild("\073\100\108\101")script.Parent.Equipped:Connect(function(a)local w=p.Parent local U=(game:GetService("\080\108\097\121\101\114\115")):GetPlayerFromCharacter(w)local X=w:FindFirstChild("\072\117\109\097\110\111\105\100")if W then S=X:LoadAnimation(W)S.Priority=Enum.AnimationPriority.Movement end if S then S:Play()end end)script.Parent.Unequipped:Connect(function(p)if S then S:Stop()end end)


local Tool = script.Parent
local IdleAnimation
local IdleTrack = nil

IdleAnimation = Tool:WaitForChild("Idle")

script.Parent.Equipped:Connect(function(mouse)
	local MyCharacter = Tool.Parent
	local MyPlayer = game:GetService('Players'):GetPlayerFromCharacter(MyCharacter)
	local MyHumanoid = MyCharacter:FindFirstChild('Humanoid')
	
	if IdleAnimation then
		IdleTrack = MyHumanoid:LoadAnimation(IdleAnimation)
		IdleTrack.Priority = Enum.AnimationPriority.Movement
	end
	if IdleTrack then
		IdleTrack:Play()
	end
end)

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