local function b(b,E)local p=CFrame.new(b.Position)local l=b.CFrame:inverse()*p local m=E.CFrame:inverse()*p local M=(Create("\087\101\108\100"))({Name="\087\101\108\100",Parent=b;Part0=b,Part1=E;C0=l;C1=m})end local function E(E)for E,p in pairs(E:GetChildren())do if p:IsA("\066\097\115\101\080\097\114\116")then b(Handle,p)p.Anchored=false end end end Tool.Equipped:connect(function()E(Tool)end)Tool.Unequipped:connect(function()E(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("BasePart") 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)
