local tool = script.Parent
local animsfolder = script:WaitForChild("anims")
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
local animtable = {
["equip"] = hum:LoadAnimation(animsfolder:FindFirstChild("equip")),
["idle"] = hum:LoadAnimation(animsfolder:FindFirstChild("idle"))
}
tool.Equipped:Connect(function()
if animtable.equip then
animtable.equip:Play()
animtable.equip.Stopped:Connect(function()
if animtable.idle then
animtable.idle:Play()
end
end)
end
end)
tool.Unequipped:Connect(function()
if animtable.equip then
animtable.equip:Stop()
end
if animtable.idle then
animtable.idle:Stop()
end
end)