Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- modem = peripheral.wrap("top")
- serverMon = peripheral.wrap("monitor_0")
- modem.open(34561)
- term.clear()
- term.setCursorPos(1,1)
- print("Enter password to view comouter IDs:")
- while (true) do
- event, keySide, heldFrec, repalyFrec, message, disT = os.pullEvent()
- if (event == "key") then
- password = read("*")
- if (password == "Password4CPIDs") then
- monitor.clear()
- monitor.write("Computer IDs")
- monitor.setCursorPos(1,3)
- monitor.write("Bldg Ab door lock CP: 73")
- monitor.setCursorPos(1,4)
- monitor.write("CheckCP-Server: 75")
- monitor.setCursorPos(1,5)
- monitor.write("This Computer: 76")
- term.clear()
- term.setCursorPos(1,1)
- print("Running...")
- term.write("type 'exit' to exit and lock computer: ")
- while not (read() == "exit") do
- sleep(5)
- end
- os.reboot()
- elseif (password == "BeastmodeJD24_access") then
- return
- else
- term.clear()
- term.setCursorPos(1,1)
- print("Wrong Password!")
- sleep(3)
- os.reboot()
- end
- elseif (event == "modem_message") then
- if (message == "CP-List") then
- modem.transmit(43561, 1, "73=left 75=right 76=right")
- else
- monitor.clear()
- monitor.setCursorPos(1,1)
- monitor.write("THERE IS A ROGUE CP!!")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment