function MakeWeld(u,r,m,S)local H=Instance.new(m)H.Part0=u H.Part1=r H.C0=u.CFrame:inverse()*u.CFrame H.C1=r.CFrame:inverse()*u.CFrame H.Parent=u if m=="\077\111\116\111\114"and S~=nil then H.MaxVelocity=S end return H end function ModelWeld(u,r)if u:IsA("\066\097\115\101\080\097\114\116")then MakeWeld(r,u,"\087\101\108\100")elseif u:IsA("\077\111\100\101\108")then for u,m in pairs(u:GetChildren())do ModelWeld(m,r)end end end function UnAnchor(u)if u:IsA("\066\097\115\101\080\097\114\116")then u.Anchored=false elseif u:IsA("\077\111\100\101\108")then for u,r in pairs(u:GetChildren())do UnAnchor(r)end end end
--BasedWeld2.0
function MakeWeld(x, y, type, s)
	local W = Instance.new(type)
	W.Part0 = x
	W.Part1 = y
	W.C0 = x.CFrame:inverse() * x.CFrame
	W.C1 = y.CFrame:inverse() * x.CFrame
	W.Parent = x
	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") 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
	elseif a:IsA("Model") then
		for i, v in pairs(a:GetChildren()) do
			UnAnchor(v)
		end
	end
end
