parts_table=script.Parent:GetChildren()round=function(o)local w,A=math.modf(o)if o%1~=0 then return math.floor(o)+math.floor(A*10)/10 else return math.floor(o)end end function convertSizeToScale(o)for o,w in pairs(o)do if w:IsA("\066\097\115\101\080\097\114\116")then if w:findFirstChild("\077\101\115\104")then if not w.Size==Vector3.new(.2,.2,.2)then local o=w.Mesh local A=w.Size local e=o.Scale local Q=A.X/e.X local l=A.Y/e.Y local W=A.Z/e.Z local b=Vector3.new(0,0,0)if round(w.Size.X*10)/10~=.2 then print(w.Name,w.Size.X)b=b+Vector3.new(Q*5,0,0)else b=b+Vector3.new(o.Scale.X,0,0)end if round(w.Size.Y*10)/10~=.2 then b=b+Vector3.new(0,l*5,0)else b=b+Vector3.new(0,o.Scale.Y,0)end if round(w.Size.Z*10)/10~=.2 then b=b+Vector3.new(0,0,W*5)else b=b+Vector3.new(0,0,o.Scale.Z)end local P=w.CFrame w.Size=Vector3.new(.2,.2,.2)w.CFrame=P o.Scale=b end end end end end function weld(o,w,A)local e,Q={}local function l(o)for o,w in pairs(o:GetChildren())do if w:IsA("\066\097\115\101\080\097\114\116")then if Q then local o=Instance.new("\087\101\108\100")o.Name="\087\101\108\100"o.Part0,o.Part1=Q,w o.C0=Q.CFrame:inverse()o.C1=w.CFrame:inverse()o.Parent=Q end Q=w table.insert(e,w)end l(w)end end l(o)for o,e in pairs(e)do e.Anchored=w e.CanCollide=A end end wait(1)for o,w in pairs(script.Parent:GetChildren())do if w:FindFirstChild("\087\101\108\100")then w.Weld:Destroy()end end convertSizeToScale(parts_table)weld(script.Parent,true,false)


parts_table=script.Parent:GetChildren()

round=function(num)
local a,b=math.modf(num)
if num%1~=0 then 
	return math.floor(num)+math.floor(b*10)/10
else
	return math.floor(num)
end end

function convertSizeToScale(t)
	for i,v in pairs(t) do
		if v:IsA"BasePart" then
			if v:findFirstChild"Mesh" then
				
				if not v.Size == Vector3.new(0.2, 0.2, 0.2) then
					local vm=v.Mesh
					local vsize=v.Size
					local vscale=vm.Scale
					
					local percx=vsize.X/vscale.X
					local percy=vsize.Y/vscale.Y
					local percz=vsize.Z/vscale.Z		
					
					local vtotalsize=Vector3.new(0,0,0)
	
					if round(v.Size.X*10)/10 ~= 0.2 then
						print(v.Name, v.Size.X)
						vtotalsize = vtotalsize + Vector3.new(percx * 5, 0, 0)
					else
						vtotalsize = vtotalsize + Vector3.new(vm.Scale.X, 0, 0)
					end		
					if round(v.Size.Y*10)/10 ~= 0.2 then
						vtotalsize = vtotalsize + Vector3.new(0, percy * 5, 0)
					else
						vtotalsize = vtotalsize + Vector3.new(0, vm.Scale.Y, 0)
					end	
					if round(v.Size.Z*10)/10 ~= 0.2 then
						vtotalsize = vtotalsize + Vector3.new(0, 0, percz * 5)
					else
						vtotalsize = vtotalsize + Vector3.new(0, 0, vm.Scale.Z)
					end	
						
					local prevc=v.CFrame	
		
					v.Size=Vector3.new(0.2,0.2,0.2)
					v.CFrame=prevc
					vm.Scale=vtotalsize
				end
				
			end
		end		
	end
end

function weld(modelgroup,anchored,cancollide)
	local parts,last = {}
	local function scan(parent)
		for _,v in pairs(parent:GetChildren()) do
			if (v:IsA("BasePart")) then
				if (last) then
					local w = Instance.new("Weld")
					w.Name = ("Weld")
					w.Part0,w.Part1 = last,v
					w.C0 = last.CFrame:inverse()
					w.C1 = v.CFrame:inverse()
					w.Parent = last
				end
				last = v
				table.insert(parts,v)
			end
			scan(v)
		end
	end
	scan(modelgroup)
	for _,v in pairs(parts) do
		v.Anchored=anchored
		v.CanCollide=cancollide
	end
end

wait(1)
for i, v in pairs (script.Parent:GetChildren()) do
	if v:FindFirstChild("Weld") then
		v.Weld:Destroy()
	end
end
convertSizeToScale(parts_table)
weld(script.Parent,true,false)


