Kengu

Untitled

Dec 8th, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. run = true
  2. x = 0
  3. y = 0
  4.  
  5. while true do
  6. if turtle.detectDown() and y == 0 then
  7. turtle.up()
  8. turtle.select(2)
  9. y = y + 1
  10. elseif x < 4 then
  11. turtle.placeDown()
  12. turtle.forward()
  13. x = x + 1
  14. elseif x == 4 and y == 1 then
  15. turtle.turnRight()
  16. turtle.forward()
  17. y = y + 1
  18. elseif x >= 4 and x < 8 then
  19. turtle.placeDown()
  20. turtle.forward()
  21. x = x + 1
  22. elseif x == 8 and y == 2 then
  23. turtle.turnRight()
  24. turtle.forward()
  25. y = y + 1
  26. elseif x >= 8 and x < 12 then
  27. turtle.placeDown()
  28. turtle.forward()
  29. x = x + 1
  30. elseif x == 12 and y == 3 then
  31. turtle.turnRight()
  32. turtle.forward()
  33. y = y + 1
  34. elseif x >= 12 and x < 16 then
  35. turtle.placedown()
  36. turtle.forward()
  37. x = x + 1
  38. elseif x == 15 then
  39. print("Build should be finished")
  40. run = false
  41. else
  42. print("ERROR")
  43. run = false
  44. end
  45.  
  46. end
Advertisement
Add Comment
Please, Sign In to add comment