Advertisement
jkCBWPnet

getObsidian

May 15th, 2022 (edited)
867
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local function getObsidian()
  2.     local d = 0
  3.     for i=1,10 do
  4.         turtle.dig()
  5.         turtle.forward()
  6.         turtle.digUp()
  7.         turtle.digDown()
  8.         d = d + 1
  9.     end
  10.     return d
  11. end
  12.  
  13. local distance = getObsidian()
  14. turtle.turnRight()
  15. turtle.forward()
  16. turtle.turnRight()
  17. for m = 1,distance do
  18.     turtle.dig()
  19.     turtle.forward()
  20.     turtle.digUp()
  21.     turtle.digDown()
  22. end
  23.  
  24. print(distance.." meters.")
Advertisement
RAW Paste Data Copied
Advertisement