Advertisement
Oxolin

move

Apr 17th, 2024 (edited)
458
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.40 KB | None | 0 0
  1. local function move(dir)
  2.     if dir == "move" then
  3.         turtle.forward()
  4.     end
  5.     if dir == "right" then
  6.         turtle.turnRight()
  7.         turtle.forward()
  8.     end
  9.     if dir == "left" then
  10.         turtle.turnLeft()
  11.         turtle.forward()
  12.     end
  13.     if dir == "up" then
  14.         turtle.up()
  15.     end
  16.     if dir == "down" then
  17.         turtle.down()
  18.     end
  19. end
  20.  
  21. return { move = move }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement