Advertisement
TinaTheDerpy

Bridge

Dec 21st, 2024
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.40 KB | None | 0 0
  1. local x = 1
  2.  
  3. function line()   -- place a line x blocks long
  4.     for i = 1,x do
  5.        turtle.forward()
  6.        turtle.placeDown()
  7.     end
  8.  end
  9.  
  10. function reverse()        --does a full 180 in the same block
  11.     turtle.turnLeft()
  12.     turtle.turnLeft()
  13.  end
  14.  
  15. term.write("length = ")  --gets x from the user
  16. x = tonumber(read())
  17.  
  18. line()
  19. reverse()
  20.  
  21. for i = 0, (x-2) do
  22.     turtle.forward()
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement