originalceebs

[FUNCTION] Movements

Jan 8th, 2021
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.82 KB | None | 0 0
  1. --[[
  2.  
  3. Script Created by CEEBS
  4. YouTube: https://www.youtube.com/channel/UCQvB8QBknoS1jYgwpYGQrQg
  5. Twitter: https://twitter.com/OnlyCeebs
  6.  
  7. Really appreciate all the support you have given me, so thank you!
  8.  
  9. ]]--
  10.  
  11. -- Forward
  12. function moveForward(times)
  13.     if times then
  14.         for i = 1, times do
  15.             while not turtle.forward() do
  16.                 turtle.dig()
  17.             end
  18.         end
  19.     else
  20.         turtle.forward()
  21.     end
  22. end
  23.  
  24. -- Turn Left
  25. function turnLeft(times)
  26.     if times then
  27.         for i = 1, times do
  28.             turtle.turnLeft()
  29.         end
  30.     else
  31.         turtle.turnLeft()
  32.     end
  33. end
  34.  
  35. -- Turn Right
  36. function turnRight(times)
  37.     if times then
  38.         for i = 1, times do
  39.             turtle.turnRight()
  40.         end
  41.     else
  42.         turtle.turnRight()
  43.     end
  44. end
Advertisement
Add Comment
Please, Sign In to add comment