Advertisement
DOGGYWOOF

Remote "Server"

Feb 29th, 2024 (edited)
10
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. -- server program
  2. while true do
  3. local _, command = os.pullEvent("rednet_message")
  4.  
  5. -- Execute the received command
  6. local result = shell.run(command)
  7.  
  8. -- Send the result back to the client
  9. rednet.send(tonumber(id), result)
  10. end
  11.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement