Advertisement
gravitowl

factoryListener

Dec 4th, 2021 (edited)
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. local running = true
  2. local modem = peripheral.wrap("front")
  3.  
  4. modem.open(420)
  5.  
  6.  
  7. function Main()
  8. while running do
  9. local event, side, channel, replyChannel, message, distance = os.pullEvent("modem_message")
  10. message = textutils.unserialize(message)
  11.  
  12. if(message.type == "run") then
  13. if(message.command == "updateCode") then
  14. print("hi")
  15. shell.run("updateCode", "2zDEADBQ",shell.getRunningProgram())
  16. end
  17. end
  18. end
  19. end
  20.  
  21. Main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement