Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pos = { x = 0, y = 0 }
- function checkFuel()
- if(turtle.getFuelLevel() < 2) then
- if(not(turtle.refuel(1))) then
- print("Out of fuel!")
- end
- end
- end
- function forward()
- checkFuel()
- if(turtle.forward()) then
- pos.x = pos.x + 1
- end
- end
- function back()
- checkFuel()
- if(turtle.back()) then
- pos.x = pos.x - 1
- end
- end
- while true do
- print("eat dick")
- forward()
- os.sleep( 1 )
- back()
- os.sleep( 1 )
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement