local f=script.Parent local I local Y=false local Z=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local y=script:WaitForChild("\065\110\105\109\097\116\105\111\110")local V Z.InputBegan:Connect(function(f,Z)if f.KeyCode==Key and(I and V)then if not Z and not Y then Y=true V:Play()wait(AnimationLength)Y=false end end end)f.Equipped:Connect(function()I=f.Parent:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")V=I:LoadAnimation(y)end)


local Tool = script.Parent
local Humanoid
local Playing = false

local UIS = game:GetService("UserInputService")
local Animation = script:WaitForChild("Animation")
local AnimTrack


UIS.InputBegan:Connect(function(Input, GameProcessedEvent)
	if Input.KeyCode == Key and Humanoid and AnimTrack then
		if not GameProcessedEvent and not Playing then
			Playing = true
			AnimTrack:Play()
			wait(AnimationLength)
			Playing = false
		end
	end
end)

Tool.Equipped:Connect(function()
	Humanoid = Tool.Parent:FindFirstChildOfClass("Humanoid")
	AnimTrack = Humanoid:LoadAnimation(Animation)
end)
