local U=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local c=false local I=script.Parent.Blocking local G=script.Parent.BlockingStop local j=false local Q=false tool.Equipped:Connect(function()c=true U.InputBegan:Connect(function(U,N)if N==false and(U.KeyCode==Enum.KeyCode.E and(c==true and(j==false and Q==false)))then blockstarttrack:Play()hum.WalkSpeed=6 Q=true blockholdtrack:Play()I:FireServer(hum)j=true wait(4)G:FireServer(hum)blockholdtrack:Stop()hum.WalkSpeed=16 wait(1)Q=false j=false end if N==false and(U.UserInputType==Enum.UserInputType.MouseButton1 and c==true)then G:FireServer(hum)blockholdtrack:Stop()hum.WalkSpeed=16 Q=false j=false end end)end)tool.Unequipped:Connect(function()c=false if j==true then hum.WalkSpeed=16 G:FireServer(hum)blockholdtrack:Stop()j=false Q=false end end)

local UserInputService = game:GetService("UserInputService")
local Equipped = false
local event = script.Parent.Blocking
local event2 = script.Parent.BlockingStop
local blocking = false
local debounce = false

tool.Equipped:Connect(function()
	Equipped = true
	UserInputService.InputBegan:Connect(function(Input,Typing)
		if Typing == false and Input.KeyCode == Enum.KeyCode.E and Equipped == true and blocking == false and debounce == false then
			blockstarttrack:Play()
			hum.WalkSpeed = 6
			debounce = true
			blockholdtrack:Play()
			event:FireServer(hum)
			blocking = true
			wait(4)
			event2:FireServer(hum)
			blockholdtrack:Stop()
			hum.WalkSpeed = 16
			wait(1)
			debounce = false
			blocking = false
		end
		if Typing == false and Input.UserInputType == Enum.UserInputType.MouseButton1 and Equipped == true then
			event2:FireServer(hum)
			blockholdtrack:Stop()
			hum.WalkSpeed = 16
			debounce = false
			blocking = false
		end
	end)
end)

tool.Unequipped:Connect(function()
	Equipped = false
	if blocking == true then
		hum.WalkSpeed = 16
		event2:FireServer(hum)
		blockholdtrack:Stop()
		blocking = false
		debounce = false
	end
end)
