
Key Required

local Players = game:GetService("Players")
local player = Players.LocalPlayer
local tool = game:GetObjects("rbxassetid://74933357788345")[1]
tool.Parent = player:WaitForChild("Backpack")
local animationId = "rbxassetid://6516424098"
local animTrack
tool.Equipped:Connect(function()
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local animator = humanoid:FindFirstChildOfClass("Animator") or Instance.new("Animator", humanoid)
if animTrack then
animTrack:Stop(0)
animTrack:Destroy()
animTrack = nil
end
local animation = Instance.new("Animation")
animation.AnimationId = animationId
animTrack = animator:LoadAnimation(animation)
animTrack.Priority = Enum.AnimationPriority.Action4
animTrack.Looped = true
animTrack:Play(0, 1, 1)
animTrack:AdjustWeight(1)
end)
tool.Unequipped:Connect(function()
if animTrack then
animTrack:Stop(0)
animTrack:Destroy()
animTrack = nil
end
end)No comments yet for this script.



