local b=game:GetService("\074\111\105\110\116\115\083\101\114\118\105\099\101")local H=workspace:PGSIsEnabled()if not H then error("\065-\067\104\097\115\115\105\115 \110\111 \108\111\110\103\101\114 \115\117\112\112\111\114\116\115 \076\101\103\097\099\121 \112\104\121\115\105\099\115 \115\111\108\118\105\110\103\044 \115\111\114\114\121\033")end function MakeWeld(H,J,Y,w)if Y==nil then Y="\087\101\108\100"end local O=Instance.new(Y,b)O.Part0=H O.Part1=J O.C0=H.CFrame:inverse()*H.CFrame O.C1=J.CFrame:inverse()*H.CFrame if Y=="\077\111\116\111\114"and w~=nil then O.MaxVelocity=w end return O end function ModelWeld(b,H)if b:IsA("\066\097\115\101\080\097\114\116")then MakeWeld(H,b,"\087\101\108\100")elseif b:IsA("\077\111\100\101\108")or b:IsA("\070\111\108\100\101\114")then for b,J in pairs(b:GetChildren())do ModelWeld(J,H)end end end function UnAnchor(b)if b:IsA("\066\097\115\101\080\097\114\116")then b.Anchored=false end for b,H in pairs(b:GetChildren())do UnAnchor(H)end end
--[[Weld functions]]

local JS = game:GetService("JointsService")
local PGS_ON = workspace:PGSIsEnabled()
if not PGS_ON then
	error("A-Chassis no longer supports Legacy physics solving, sorry!")
end

function MakeWeld(x, y, type, s)
	if type == nil then
		type = "Weld"
	end
	local W = Instance.new(type, JS)
	W.Part0 = x
	W.Part1 = y
	W.C0 = x.CFrame:inverse() * x.CFrame
	W.C1 = y.CFrame:inverse() * x.CFrame
	if type == "Motor" and s ~= nil then
		W.MaxVelocity = s
	end
	return W
end

function ModelWeld(a, b)
	if a:IsA("BasePart") then
		MakeWeld(b, a, "Weld")
	elseif a:IsA("Model") or a:IsA("Folder") then
		for i, v in pairs(a:GetChildren()) do
			ModelWeld(v, b)
		end
	end
end

function UnAnchor(a)
	if a:IsA("BasePart") then
		a.Anchored = false
	end
	for i, v in pairs(a:GetChildren()) do
		UnAnchor(v)
	end
end
