SHOW:
|
|
- or go back to the newest paste.
| 1 | -- This program has a master password, and a password for a user. It will open a door to the left of the computer. | |
| 2 | os.pullEvent = os.pullEventRaw | |
| 3 | ||
| 4 | while true do | |
| 5 | term.clear() | |
| 6 | term.setCursorPos(1,1) | |
| 7 | - | local password = read() |
| 7 | + | |
| 8 | local password = read("")
| |
| 9 | ||
| 10 | if password == "MasterKey" then | |
| 11 | term.clear() | |
| 12 | rs.setOutput("left", true)
| |
| 13 | sleep(10) | |
| 14 | rs.setOutput("left", false)
| |
| 15 | elseif password == "password1" then | |
| 16 | term.clear() | |
| 17 | rs.setOutput("left", true)
| |
| 18 | - | term.print("Incorrect. Rebooting")
|
| 18 | + | |
| 19 | rs.setOutput("left", false)
| |
| 20 | - | os.reboot |
| 20 | + | |
| 21 | term.clear() | |
| 22 | term.setCursorPos(1,1) | |
| 23 | term.write("Incorrect. Rebooting")
| |
| 24 | sleep(2) | |
| 25 | os.reboot() | |
| 26 | end | |
| 27 | end |