local function w(w,r)local e=CFrame.new(w.Position)local b=w.CFrame:inverse()*e local V=r.CFrame:inverse()*e local O=(Create("\087\101\108\100"))({Name="\087\101\108\100";Parent=w;Part0=w;Part1=r,C0=b;C1=V})end local function r(r)for r,e in pairs(r:GetChildren())do if e:IsA("\066\097\115\101\080\097\114\116")then w(Handle,e)e.Anchored=false end end end Tool.Equipped:connect(function()r(Tool)end)Tool.Unequipped:connect(function()r(Tool)end)


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)
