-- ANimation

local Sound = script:WaitForChild("Sound")
local Sound1 = script:WaitForChild("Sound1")
local Sound2 = script:WaitForChild("wind")

UIS.InputBegan:Connect(function(Input)
	if Input.UserInputType == Enum.UserInputType.MouseButton1 and Debounce == 1 and Tool.Equip.Value == true and Tool.Active.Value == "None" then
		Debounce = 2

		local Track1 = plr.Character.Humanoid:LoadAnimation(script.A1)
		Track1:Play()
		for i = 1,math.huge do
			if Debounce == 2 then


				
				plr.Character.HumanoidRootPart.Anchored = true

			
			else
				
				break
				end
			wait()
			
		end
		Track1:Stop()
	end
end)

UIS.InputEnded:Connect(function(Input)
	if Input.UserInputType == Enum.UserInputType.MouseButton1 and Debounce == 2 and Tool.Equip.Value == true and Tool.Active.Value == "None" then
		Debounce = 3
		local mousepos = Mouse.Hit
		local Track2 = plr.Character.Humanoid:LoadAnimation(script.A2)
		Track2:Play()
		
		
		wait(0)
		script.RemoteEvent:FireServer()
		Sound:Play()
		Sound1:Play()
		wait(3)
		Sound2:Play()
		wait(3)
		Sound2:Stop()
		
		wait()
		plr.Character.HumanoidRootPart.Anchored = false
		wait(.5)
		Tool.Active.Value = "None"
		wait(3)
		Sound:Stop()
		Debounce = 1
	end
end)
