Advertisement
Guest User

startup.lua

a guest
Mar 30th, 2023
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.48 KB | None | 0 0
  1. turtle.dig()
  2.  
  3. while true do
  4.   local rawCmd = read()
  5.   for _, cmd in ipairs(rawCmd) do
  6.   if (cmd == "w") then
  7.     turtle.dig()
  8.     turtle.forward()
  9.   elseif (cmd == "d") then
  10.     turtle.turnRight()
  11.     turtle.dig()
  12.   elseif (cmd == "s") then
  13.     turtle.back()
  14.   elseif (cmd == "a") then
  15.     turtle.turnLeft()
  16.     turtle.dig()
  17.   elseif (cmd == "e") then
  18.     turtle.digUp()
  19.     turtle.up()
  20.   elseif (cmd == "q") then
  21.     turtle.digDown()
  22.     turtle.down()
  23.   end
  24.   end
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement