Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- local side = "left"
- local password1 = "on"
- local password2 = "rorre"
- local password3 = "error"
- local passwordadmin = "nimda"
- term.clear()
- sleep(1)
- print("Loading...")
- sleep(2)
- print("To turn on lights please type 'on'")
- write("Password: ")
- local input = read()
- if input == password1 then
- term.clear()
- term.setCursorPos(1,1)
- print("Password correct! Turning Lights On!")
- term.setCursorPos(1,2)
- print("Press Any Key To Turn Off!")
- rs.setOutput(side,true)
- os.pullEvent("key")
- os.reboot()
- end
- if input == password2 then
- term.clear()
- term.setCursorPos(1,1)
- print("Password correct! Error!!!")
- rs.setOutput(side,true)
- os.pullEvent("key")
- os.reboot()
- end
- if input == password3 then
- term.clear()
- term.setCursorPos(1,1)
- print("Password correct! Error!!!")
- rs.setOutput(side,true)
- os.pullEvent("key")
- rs.setOutput(side,false)
- os.reboot()
- end
- if input == passwordadmin then
- term.clear()
- term.setCursorPos(1,1)
- print("Password correct!")
- print("Computer unlocking...")
- print("Please type 'reboot' or 'shutdown' before leaving")
- os.pullEvent(terminate)
- else
- term.clear()
- term.setCursorPos(1,1)
- print("Password incorrect!")
- sleep(2)
- os.reboot()
- end
Add Comment
Please, Sign In to add comment