local l=game:GetService("\074\111\105\110\116\115\083\101\114\118\105\099\101")local b=workspace:PGSIsEnabled()function MakeWeld(b,A,L,K)if L==nil then L="\087\101\108\100"end local a=Instance.new(L,l)a.Part0=b a.Part1=A a.C0=b.CFrame:inverse()*b.CFrame a.C1=A.CFrame:inverse()*b.CFrame if L=="\077\111\116\111\114"and K~=nil then a.MaxVelocity=K end return a end function ModelWeld(l,b)if l:IsA("\066\097\115\101\080\097\114\116")and(l.Parent.Name~="\076\105\103\104\116\115"and(l.Parent.Name~="\067\104\097\115\105\115"and(l.Parent.Name~="\082\111\116\076\105\103\104\116"and l.Parent.Name~="\068\111\111\114")))then MakeWeld(b,l,"\087\101\108\100")for l,A in pairs(l:GetChildren())do if A~=nil and A:IsA("\066\097\115\101\080\097\114\116")then ModelWeld(A,b)end end elseif l:IsA("\077\111\100\101\108")then for l,A in pairs(l:GetChildren())do ModelWeld(A,b)end end end function UnAnchor(l)if l:IsA("\066\097\115\101\080\097\114\116")then l.Anchored=false end for l,b in pairs(l:GetChildren())do UnAnchor(b)end end


	local JS = game:GetService("JointsService")
	local PGS_ON = workspace:PGSIsEnabled()
	
	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") and 
			a.Parent.Name ~= ("Lights") and
			a.Parent.Name ~= ("Chasis") and
			a.Parent.Name ~= ("RotLight") and
			a.Parent.Name ~= ("Door") then 
			MakeWeld(b,a,"Weld")
			for i,v in pairs(a:GetChildren()) do 
				if v ~= nil and v:IsA("BasePart") then
					ModelWeld(v,b) 
				end
			end
		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  end for i,v in pairs(a:GetChildren()) do UnAnchor(v) end 
	end


	