Advertisement
HenloMyDude

terrain

Sep 14th, 2019
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. script.Parent = workspace
  2. ------------------------------------------------------------------------------------
  3. max_x = 800
  4. min_x = 50
  5. max_y = 50
  6. min_y = -1
  7. max_z = 800
  8. min_z = 50
  9. posmax = 200
  10. sposmax = 500
  11. posmin = -200
  12. sposmin = -500
  13. maxgrass = 5000
  14. maxsand = 5000
  15. maxsx = 1000
  16. minsx = -1000
  17. maxsy = -0
  18. minsy = -0.5
  19. maxsz = 400
  20. minsz = -400
  21. ------------------------------------------------------------------------------------
  22.  
  23. coroutine.resume(coroutine.create(function()
  24. --Grass
  25. for i = 1,maxgrass do
  26. local x = math.random(min_x, max_x)
  27. local y = math.random(min_y, max_y)
  28. local z = math.random(min_z,max_z)
  29. local x2 = math.random(posmin, posmax)
  30. game.Workspace.Terrain:FillBlock(CFrame.new(x2, y, x2), Vector3.new(x, y, z), Enum.Material.Grass)
  31. end
  32. wait()
  33. for i = 1,maxgrass do
  34. local x = math.random(min_x, max_x)
  35. local y = math.random(min_y, max_y)
  36. local z = math.random(min_z,max_z)
  37. local x2 = math.random(posmin, posmax)
  38. game.Workspace.Terrain:FillBlock(CFrame.new(x2, y, x2), Vector3.new(x, y, z), Enum.Material.Grass)
  39. end
  40. wait()
  41. for i = 1,maxgrass do
  42. local x = math.random(min_x, max_x)
  43. local y = math.random(min_y, max_y)
  44. local z = math.random(min_z,max_z)
  45. local x2 = math.random(posmin, posmax)
  46. game.Workspace.Terrain:FillBlock(CFrame.new(x2, y, x2), Vector3.new(x, y, z), Enum.Material.Grass)
  47. end
  48. end))
  49. wait(1)
  50. posmax = 200
  51. sposmax = 500
  52. posmin = -200
  53. sposmin = -500
  54. maxgrass = 5000
  55. maxsand = 5000
  56. maxsx = 1000
  57. minsx = -1000
  58. maxsy = -0
  59. minsy = -0.5
  60. maxsz = 400
  61. minsz = -400
  62. coroutine.resume(coroutine.create(function()
  63. --Sand
  64. for i = 1,maxsand do
  65. local x = math.random(minsx, maxsx)
  66. local y = math.random(minsy, maxsy)
  67. local z = math.random(minsz,maxsz)
  68. local x2 = math.random(sposmin, sposmax)
  69. game.Workspace.Terrain:FillBlock(CFrame.new(0, y, 0), Vector3.new(1200, y, 1200), Enum.Material.Sand)
  70. end
  71. end))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement