Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local partfolder = Instance.new("Folder")
- partfolder.Parent = script
- function makebase(max)
- local size = 500
- local errors = 0
- for x = 1,max do
- for z = 1,max do
- local base = Instance.new("Part")
- base.Name = 'Base'
- base.Anchored = true
- base.Locked = true
- base.Material = Enum.Material.Grass
- base.Size = Vector3.new(size,1.2,size)
- base.CFrame = CFrame.new(-(size*max)/2+(size*x),-0.6,-(size*max)/2+(size*z))
- base.BrickColor = BrickColor.new("Bright green")
- base.Parent = partfolder
- if not base then errors = errors + 1 end
- end
- end
- warn("Base has been created.")
- if errors > 1 then warn("Could not create " .. errors .. " parts.") end
- end
- pcall(function()
- for i,v in pairs(workspace:GetChildren()) do
- if v.Name == 'Base' or v.Name == 'Baseplate' then
- v:Destroy()
- end
- end
- end)
- makebase(20)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement