SHOW:
|
|
- or go back to the newest paste.
| 1 | os.pullEvent = os.pullEventRaw | |
| 2 | - | local side = "bottom" |
| 2 | + | local side = "left" |
| 3 | - | local password = "linux" |
| 3 | + | local password = "Ma6342!" |
| 4 | local opentime = 3 | |
| 5 | while true do | |
| 6 | term.clear() | |
| 7 | term.setCursorPos(1,1) | |
| 8 | write("Enter Password: ")
| |
| 9 | local input = read("*")
| |
| 10 | if input == password then | |
| 11 | term.clear() | |
| 12 | term.setCursorPos(1,1) | |
| 13 | print("Access Granted")
| |
| 14 | rs.setOutput(side,true) | |
| 15 | sleep(opentime) | |
| 16 | rs.setOutput(side,false) | |
| 17 | else | |
| 18 | print("Access Denied")
| |
| 19 | sleep(2) | |
| 20 | end | |
| 21 | end |