Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local pullEvent = os.pullEvent
- --Change the 1 to the ID of the Check-PC
- local checker = 1
- os.pullEvent = os.pullEventRaw
- --Change "back" to the side of the wireless modem on your computer
- rednet.open("back")
- term.clear()
- term.setCursorPos(1,1)
- if term.isColor() then
- term.setTextColor(16384)
- end
- print("--------Login--------------------------------------\n")
- if term.isColor() then
- term.setTextColor(16)
- end
- write("Username: ")
- local user = read()
- write("Password: ")
- local pass = read("*")
- rednet.send(checker, user)
- sleep(.5)
- rednet.send(checker, pass)
- local id, message = rednet.receive()
- if message == "Termination" and id == checker then
- if term.isColor() then
- term.setTextColor(256)
- end
- term.clear()
- term.setCursorPos(1,9)
- os.pullEvent = pullEvent
- print("You have 30 seconds to terminate the Password-Computer.")
- sleep(30)
- os.reboot()
- end
- if message == "ok" and id == checker then
- if term.isColor() then
- term.setTextColor(32)
- end
- print("\nPassword accepted")
- sleep(2)
- term.clear()
- term.setCursorPos(1,1)
- else
- if term.isColor() then
- term.setTextColor(16384)
- end
- print("\nPassword denied")
- sleep(2)
- os.reboot()
- end
- term.setTextColor(colors.white)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement