local d=script.Parent.Parent script.Parent.Parent=d.Parent script.Parent.ClickDetector.MouseClick:Connect(function(C)local G=C.Character local W=G:FindFirstChild("\072\117\109\097\110\111\105\100")if W~=nil then d.Parent=G script.Parent.Parent=d d.AncestryChanged:Connect(function(C)local W=C.Parent if W.Name~="\066\097\099\107\112\097\099\107"and(W~=G and script.Parent.Parent==d)then script.Parent.Parent=d.Parent end end)end end)
--Click to Equip Script
--Unless you know what you're doing, do not modify this script.
local tool = script.Parent.Parent --This indicates the tool for the handle.
script.Parent.Parent = tool.Parent --This removes the "Touch to Equip" function for the handle.
script.Parent.ClickDetector.MouseClick:Connect(function(plr) --This detects a click on the handle.
	local character = plr.Character --This identifies the player's character.
	local humanoid = character:FindFirstChild("Humanoid") --This identifies "Humanoid".
	if humanoid ~= nil then --This ensures that "Humanoid" exists inside the player's character.
		tool.Parent = character --This causes the character to equip the tool.
		script.Parent.Parent = tool --This puts the handle inside the tool.
		tool.AncestryChanged:Connect(function(item) --This detects a change in the tool's ancestry.
			local parent = item.Parent --This identifies the parent of the tool.
			if parent.Name ~= "Backpack" and parent ~= character and script.Parent.Parent == tool then
				--The code above ensures the parent isn't the player's backpack or character, and the handle is inside the tool.
				script.Parent.Parent = tool.Parent --This ensures that "Touch to Equip" is disabled.
			end
		end)
	end
end)
