Advertisement
Guest User

test.lua

a guest
Sep 16th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.37 KB | None | 0 0
  1.  
  2. function mining()
  3.      turtle.dig()
  4.      turtle.digUp()
  5.      turtle.digDown()
  6. end
  7.  
  8.  
  9. rednet.open("left")
  10. local jalan = true
  11. while true do
  12.     if jalan then
  13.         mining()
  14.     end
  15.     senderID, message, protocol = rednet.receive(0.5)
  16.     print(message)
  17.     if message ~= nil then
  18.         if message == "stop" then
  19.             jalan = false
  20.         elseif message == "start" then
  21.             jalan = true
  22.         end
  23.     end
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement