Tool=script.Parent Handle=Tool:WaitForChild("\072\097\110\100\108\101")Players=game:GetService("\080\108\097\121\101\114\115")EquipAnim=Tool:WaitForChild("\069\113\117\105\112")IdleAnim=Tool:WaitForChild("\073\100\108\101")SlashAnim=Tool:WaitForChild("\083\108\097\115\104")function Equipped()Character=Tool.Parent Player=Players:GetPlayerFromCharacter(Character)Humanoid=Character:FindFirstChild("\072\117\109\097\110\111\105\100")if not Player or not Humanoid or Humanoid.Health==0 then return end EquipTrack=Humanoid:LoadAnimation(EquipAnim)if EquipTrack then EquipTrack:Play()end IdleTrack=Humanoid:LoadAnimation(IdleAnim)if IdleTrack then IdleTrack:Play()end SlashTrack=Humanoid:LoadAnimation(SlashAnim)end function Changed(o)if o=="\069\110\097\098\108\101\100"and not Tool.Enabled then if SlashTrack then SlashTrack:Play()end end end function Unequipped()if EquipTrack then EquipTrack:Stop()end if IdleTrack then IdleTrack:Stop()end if SlashTrack then SlashTrack:Stop()end end Tool.Changed:connect(Changed)Tool.Equipped:connect(Equipped)Tool.Unequipped:connect(Unequipped)
--Made by Luckymaxer

Tool = script.Parent
Handle = Tool:WaitForChild("Handle")

Players = game:GetService("Players")

EquipAnim = Tool:WaitForChild("Equip")
IdleAnim = Tool:WaitForChild("Idle")
SlashAnim = Tool:WaitForChild("Slash")

function Equipped()
	Character = Tool.Parent
	Player = Players:GetPlayerFromCharacter(Character)
	Humanoid = Character:FindFirstChild("Humanoid")
	if not Player or not Humanoid or Humanoid.Health == 0 then
		return
	end
	EquipTrack = Humanoid:LoadAnimation(EquipAnim)
	if EquipTrack then
		EquipTrack:Play()
	end
	IdleTrack = Humanoid:LoadAnimation(IdleAnim)
	if IdleTrack then
		IdleTrack:Play()
	end
	SlashTrack = Humanoid:LoadAnimation(SlashAnim)
end

function Changed(Property)
	if Property == "Enabled" and not Tool.Enabled then
		if SlashTrack then
			SlashTrack:Play()
		end
	end
end

function Unequipped()
	if EquipTrack then
		EquipTrack:Stop()
	end
	if IdleTrack then
		IdleTrack:Stop()
	end
	if SlashTrack then
		SlashTrack:Stop()
	end
end

Tool.Changed:connect(Changed)
Tool.Equipped:connect(Equipped)
Tool.Unequipped:connect(Unequipped)
