Advertisement
Volaik

123213213

Sep 27th, 2023 (edited)
1,052
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.06 KB | Source Code | 0 0
  1. clients = {}
  2.  
  3. local modem = peripheral.find("modem")
  4. rednet.open("right")
  5.  
  6. HUBID = os.getComputerID()
  7. print("HUB Computer ID: "..HUBID)
  8.  
  9. local command = nil
  10.  
  11. function remoteControl()
  12.     while true do
  13.         local event, key, isHeld = os.pullEvent("key")
  14.         if key == w then
  15.             print("W")
  16.     end
  17. end
  18.  
  19. function list()
  20.     for i,v in ipairs(clients) do
  21.         print("ID "..v)
  22.     end
  23. end
  24.  
  25. function newConnection()
  26.     event, sender, message, protocol = os.pullEvent("rednet_message")
  27.     if message == "connectMsg" then
  28.     table.insert(clients, sender)
  29.     print(sender.." has connected.")
  30.     rednet.send(sender, "connectSuccess",  connect)
  31.     end
  32. end
  33.  
  34. function userInput()
  35.     command = io.read()
  36. end
  37.  
  38. while true do
  39.     parallel.waitForAny(newConnection,userInput)
  40.  
  41.     if command == "list" then
  42.         if #clients == 0 then
  43.             print("No connections found")
  44.         else
  45.             list()
  46.             command = nil
  47.         end
  48.     end
  49.  
  50.     if command == "RC" then
  51.         remoteControl()
  52.     end
  53. end
Advertisement
Comments
  • # text 0.44 KB | 0 0
    1. please help us Elon musk and his Tesla associates are hurting folks in matrix systems, he has a quantum computer and is abusing people that don't do what he wants and is censoring the video captures of the torture of these people, we do not know what to do about it. He is caching me into bad moods and screen capping and leaking content that is out of context and doing some very bad shit to people, he is affiliated with the Newark valley Crime team.
Add Comment
Please, Sign In to add comment
Advertisement