function MapManager.SaveMap(y)for y,k in ipairs(game.Workspace:GetChildren())do if not k:IsA("\067\097\109\101\114\097")and(not k:IsA("\084\101\114\114\097\105\110")and not k:IsA("\070\111\108\100\101\114"))then local y=k:Clone()if y then y.Parent=MapSave end end end end function MapManager.ClearMap(y)for y,k in ipairs(game.Workspace:GetChildren())do if not k:IsA("\067\097\109\101\114\097")and(not k:IsA("\084\101\114\114\097\105\110")and not k:IsA("\070\111\108\100\101\114"))then k:Destroy()end end end function MapManager.LoadMap(y)spawn(function()for y,k in ipairs(MapSave:GetChildren())do local S=k:Clone()S.Parent=game.Workspace end end)end return MapManager
-- Functions

function MapManager:SaveMap()
	for _, child in ipairs(game.Workspace:GetChildren()) do
		if not child:IsA("Camera") and not child:IsA("Terrain") and not child:IsA("Folder") then
			local copy = child:Clone()
			if copy then
				copy.Parent = MapSave
			end
		end
	end
end

function MapManager:ClearMap()
	for _, child in ipairs(game.Workspace:GetChildren()) do
		if not child:IsA("Camera") and not child:IsA("Terrain") and not child:IsA("Folder") then
			child:Destroy()
		end
	end
end

function MapManager:LoadMap()
	spawn(function()
		for _, child in ipairs(MapSave:GetChildren()) do
			local copy = child:Clone()
			copy.Parent = game.Workspace
		end
	end)
end

return MapManager
