Advertisement
TinaTheDerpy

strip

Sep 10th, 2023 (edited)
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.42 KB | None | 0 0
  1. local x = 1
  2.  
  3. function df()     -- Dig forward on block
  4.    turtle.dig()
  5.    turtle.forward()
  6.    turtle.digUp()
  7.    turtle.digDown()
  8. end
  9.  
  10. function reverse()        --does a full 180 in the same block
  11.    turtle.turnLeft()
  12.    turtle.turnLeft()
  13. end
  14.  
  15. -- Main loop --
  16.  
  17. term.write("Depth = ")  --gets x from the user
  18. x = tonumber(read())
  19.  
  20. for i = 1,x do
  21.    df()
  22. end
  23. reverse()
  24. for i = 1,x do
  25.     turtle.forward()
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement