Advertisement
Maffin1231

Untitled

Nov 2nd, 2023 (edited)
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | Gaming | 0 0
  1. rednet.open("top")
  2. while true do
  3. message=0
  4. os.queueEvent("randomEvent")
  5. os.pullEvent()
  6. print("do you want to resive or send message?")
  7. print("1 for send amd 2 for resive")
  8. a=read()
  9. a=tonumber(a)
  10. if a==1 then
  11. print("type in your message")
  12. msg=read()
  13. rednet.broadcast(msg)
  14. end
  15. if a==2 then
  16. print("waiting for the message")
  17. while message == 0 do
  18. id,message=rednet.receive()
  19. print("here is your message")
  20. print(message)
  21. end
  22. end
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement