Advertisement
Tomyf4

TurtleManualControl

Jan 29th, 2020
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. print("Please remember to insert fuel")
  2. print("Awaiting input..")
  3.  
  4. while true do
  5. local input, character = os.pullEvent("char")
  6. if character == "w" then
  7. turtle.forward()
  8. print("Moving forward")
  9. elseif character == "s" then
  10. turtle.back()
  11. print("Moving back")
  12. elseif character == "a" then
  13. turtle.turnLeft()
  14. print("Turning Left")
  15. elseif character == "d" then
  16. turtle.turnRight()
  17. print("Turning Right")
  18. elseif character == "q" then
  19. turtle.up()
  20. print("Moving up")
  21. elseif character == "e" then
  22. turtle.down()
  23. print("Moving down")
  24. end
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement