Advertisement
DENYS_YouTube

CUBE

May 19th, 2024 (edited)
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- 0 - empty
  2. -- 1 - black
  3. -- 2 - red
  4.  
  5. art = {
  6.     {
  7.       {2, 1, 1, 2},
  8.       {1, 0, 0, 1},
  9.       {1, 0, 0, 1},
  10.       {2, 1, 1, 2},
  11.     },
  12.     {
  13.       {1, 0, 0, 1},
  14.       {0, 0, 0, 0},
  15.       {0, 0, 0, 0},
  16.       {1, 0, 0, 1},
  17.      },
  18.      {
  19.       {1, 0, 0, 1},
  20.       {0, 0, 0, 0},
  21.       {0, 0, 0, 0},
  22.       {1, 0, 0, 1},
  23.      },
  24.      {
  25.       {2, 1, 1, 2},
  26.       {1, 0, 0, 1},
  27.       {1, 0, 0, 1},
  28.       {2, 1, 1, 2},
  29.      
  30.     }    
  31. }
  32. for z = 1, #art do
  33.     for y = 1, #art[z] do
  34.         for x = 1, #art[z][y] do
  35.           slot = art[z][y][x]
  36.           if slot ~= 0 then
  37.                 turtle.select(slot)
  38.                 turtle.placeDown()
  39.           end
  40.           turtle.forward()
  41.         end
  42.  
  43.         for i = 1, #art[z][y] do
  44.           turtle.back()
  45.         end
  46.         turtle.turnRight()
  47.         turtle.forward()
  48.         turtle.turnLeft()
  49.     end  
  50.     turtle.turnLeft()
  51.     for n = 1, #art[z] do
  52.        turtle.forward()
  53.     end
  54.     turtle.turnRight()
  55.     turtle.up()
  56. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement