Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clients = {}
- local modem = peripheral.find("modem")
- rednet.open("right")
- HUBID = os.getComputerID()
- print("HUB Computer ID: "..HUBID)
- local command = nil
- function remoteControl()
- while true do
- local event, key, isHeld = os.pullEvent("key")
- if key == w then
- print("W")
- end
- end
- function list()
- for i,v in ipairs(clients) do
- print("ID "..v)
- end
- end
- function newConnection()
- event, sender, message, protocol = os.pullEvent("rednet_message")
- if message == "connectMsg" then
- table.insert(clients, sender)
- print(sender.." has connected.")
- rednet.send(sender, "connectSuccess", connect)
- end
- end
- function userInput()
- command = io.read()
- end
- while true do
- parallel.waitForAny(newConnection,userInput)
- if command == "list" then
- if #clients == 0 then
- print("No connections found")
- else
- list()
- command = nil
- end
- end
- if command == "RC" then
- remoteControl()
- end
- end
Advertisement
Comments
-
- 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