a_alien

Untitled

May 5th, 2021 (edited)
357
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.35 KB | None | 0 0
  1. rednet.open("top")
  2. file = io.open("data", "r")
  3. local perls = file:read()
  4. file:close()
  5. while true do
  6.     id, mes = rednet.receive("Efarm", 1)
  7.     if mes then
  8.         perls = mes;
  9.         file = io.open("data", "w")
  10.         file:write(mes)
  11.         file:flush()
  12.         file:close()
  13.     end
  14.     rednet.broadcast("perl", perls)
  15.     os.sleep()
  16. end
Add Comment
Please, Sign In to add comment