Tool=script.Parent Handle=Tool:WaitForChild("\072\097\110\100\108\101")Players=game:GetService("\080\108\097\121\101\114\115")ServerControl=Tool:WaitForChild("\083\101\114\118\101\114\067\111\110\116\114\111\108")ClientControl=Tool:WaitForChild("\067\108\105\101\110\116\067\111\110\116\114\111\108")ClientControl.OnClientInvoke=function(Z,Q)if Z=="\080\108\097\121\083\111\117\110\100"and Q then Q:Play()end end function InvokeServer(Z,Q,A)pcall(function()ServerControl:InvokeServer(Z,Q,A)end)end function Equipped(Z)Character=Tool.Parent Player=Players:GetPlayerFromCharacter(Character)Humanoid=Character:FindFirstChild("\072\117\109\097\110\111\105\100")if not Player or not Humanoid or Humanoid.Health==0 then return end Z.Button1Down:connect(function()InvokeServer("\067\108\105\099\107",true,Z.Hit.p)end)end local function Z() end;(script.Parent:GetPropertyChangedSignal("\080\097\114\101\110\116")):Connect(function()if script.Parent.Parent==game.Players.LocalPlayer.Character then Equipped(game.Players.LocalPlayer:GetMouse())else Z()end end)
--Rescripted by Luckymaxer

Tool = script.Parent
Handle = Tool:WaitForChild("Handle")

Players = game:GetService("Players")

ServerControl = Tool:WaitForChild("ServerControl")
ClientControl = Tool:WaitForChild("ClientControl")

ClientControl.OnClientInvoke = function(Mode, Value)
	if Mode == "PlaySound" and Value then
		Value:Play()
	end
end

function InvokeServer(Mode, Value, arg)
	pcall(function()
		ServerControl:InvokeServer(Mode, Value, arg)
	end)
end

function Equipped(Mouse)
	Character = Tool.Parent
	Player = Players:GetPlayerFromCharacter(Character)
	Humanoid = Character:FindFirstChild("Humanoid")
	if not Player or not Humanoid or Humanoid.Health == 0 then
		return
	end
	Mouse.Button1Down:connect(function()
		InvokeServer("Click", true, Mouse.Hit.p)
	end)
end

local function Unequipped() end
script.Parent:GetPropertyChangedSignal("Parent"):Connect(function()
	if script.Parent.Parent == game.Players.LocalPlayer.Character then
		Equipped(game.Players.LocalPlayer:GetMouse())
	else
		Unequipped()
	end
end)
