Hasli4

RBLX. GenerateLabirint

May 12th, 2025
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.56 KB | None | 0 0
  1. local detal = nil
  2. block_size = 20
  3. for x = -200, 200, block_size do
  4.     for y = -200, 200, block_size do
  5.         local chance = math.random(100)
  6.         if chance > 75 then
  7.             detal = game.ServerStorage.Block:Clone()
  8.             detal.Size = Vector3.new(block_size, 20, block_size)
  9.             detal.Parent = game.Workspace.Map
  10.             detal.Position = Vector3.new(x, 9, y)
  11.         elseif chance > 25 then
  12.             detal = game.ServerStorage.Block:Clone()
  13.             detal.Size = Vector3.new(block_size, 1, block_size)
  14.             detal.Parent = game.Workspace.Map
  15.             detal.Position = Vector3.new(x, 19, y)
  16.         end
  17.     end
  18. end
  19.  
Add Comment
Please, Sign In to add comment