CelticCoder

cube.lua

Jan 17th, 2024 (edited)
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. os.loadAPI("buildSupport.lua")
  2. os.loadAPI("userInput.lua")
  3.  
  4. length = tonumber(userInput.getUserInput("Length: "))
  5. width = tonumber(userInput.getUserInput("Width: "))
  6. height = tonumber(userInput.getUserInput("Height: "))
  7. orientation = width % 2
  8.  
  9. turtle.up()
  10. turtle.forward()
  11.  
  12. for i = 1, height do
  13.     buildSupport.buildFloor(width, length)
  14.     if orientation == 1 then
  15.         turtle.turnLeft()
  16.         turtle.turnLeft()
  17.         turtle.up()
  18.     else
  19.         turtle.turnRight()
  20.         turtle.up()
  21.     end
  22. end
  23.  
Add Comment
Please, Sign In to add comment