local D=remodel.readPlaceFile("\046\047\114\097\119-\097\115\115\101\116\115\047\103\097\109\101-\109\111\100\101\108\115\046\114\098\120\108\120")local B=remodel.readPlaceFile("\046\047\114\097\119-\097\115\115\101\116\115\047\103\097\109\101-\112\108\097\099\101\046\114\098\120\108\120")local Q="\046\047\109\111\100\101\108\115"remodel.createDirAll(Q)local Y={"\077\111\110\101\121";"\080\101\116\115";"\080\114\101\102\097\098\115";"\087\097\108\108\115";"\067\111\108\108\101\099\116\097\098\108\101\115";"\077\105\115\099","\084\114\097\105\108\115";"\070\097\108\108\073\116\101\109\115"}for B,Y in ipairs(Y)do for D,B in ipairs(D.Workspace[Y]:GetChildren())do remodel.createDirAll(Q..("\047"..Y))remodel.writeModelFile(B,Q..("\047"..(Y..("\047"..(B.Name.."\046\114\098\120\109\120")))))end end remodel.writeModelFile(B.Workspace.Terrain,"\046\047\080\108\097\099\101\084\101\114\114\097\105\110\046\114\098\120\109\120")remodel.writeModelFile(B.Workspace.Place,"\046\047\080\108\097\099\101\046\114\098\120\109\120")
local gameModels = remodel.readPlaceFile('./raw-assets/game-models.rbxlx')
local gamePlace = remodel.readPlaceFile('./raw-assets/game-place.rbxlx')

-- If the directory does not exist yet, we'll create it.
local modelDir = './models'
remodel.createDirAll(modelDir)

local folders =
	{ 'Money', 'Pets', 'Prefabs', 'Walls', 'Collectables', 'Misc', 'Trails', 'FallItems' }

for _, folder in ipairs(folders) do
	for _, model in ipairs(gameModels.Workspace[folder]:GetChildren()) do
		remodel.createDirAll(modelDir .. '/' .. folder)
		-- Save out each child as an rbxmx model
		remodel.writeModelFile(model, modelDir .. '/' .. folder .. '/' .. model.Name .. '.rbxmx')
	end
end

remodel.writeModelFile(gamePlace.Workspace.Terrain, './PlaceTerrain.rbxmx')
remodel.writeModelFile(gamePlace.Workspace.Place, './Place.rbxmx')