local function M(M,O)local y=CFrame.new(M.Position)local K=M.CFrame:inverse()*y local e=O.CFrame:inverse()*y local d=(Create("\087\101\108\100"))({Name="\087\101\108\100";Parent=M;Part0=M;Part1=O;C0=K;C1=e})end local function O(O)for O,y in pairs(O:GetChildren())do if y:IsA("\080\097\114\116")or y:IsA("\085\110\105\111\110\079\112\101\114\097\116\105\111\110")then M(Handle,y)y.Anchored=false end end end Tool.Equipped:connect(function()O(Tool)end)Tool.Unequipped:connect(function()O(Tool)end)
---------------------------------------------------------------------------------------------------------------------------
-- Functions
---------------------------------------------------------------------------------------------------------------------------

local function Weld(X, Y)
	local CJ = CFrame.new(X.Position)
	local C0 = X.CFrame:inverse() * CJ
	local C1 = Y.CFrame:inverse() * CJ

	local W = Create("Weld")({
		Name = "Weld",
		Parent = X,
		Part0 = X,
		Part1 = Y,
		C0 = C0,
		C1 = C1,
	})
end

local function WeldObjects(parent)
	for i, obj in pairs(parent:GetChildren()) do
		if obj:IsA("Part") or obj:IsA("UnionOperation") then
			Weld(Handle, obj)
			obj.Anchored = false
			-- print("[Weld] Objects have been welded!")
		end
	end
end

Tool.Equipped:connect(function()
	WeldObjects(Tool)
end)

Tool.Unequipped:connect(function()
	WeldObjects(Tool)
end)
