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 side2 = "right" |
| 4 | local password = "swagmaster" | |
| 5 | local opentime = 3 | |
| 6 | - | term.clear() |
| 6 | + | |
| 7 | - | term.setCursorPos(1,1) |
| 7 | + | term.clear() |
| 8 | - | write("Enter Password: ")
|
| 8 | + | term.setCursorPos(1,1) |
| 9 | - | local input = read("*")
|
| 9 | + | write("Enter Password: ")
|
| 10 | - | if input == password then |
| 10 | + | local input = read("*")
|
| 11 | - | term.clear() |
| 11 | + | if input == password then |
| 12 | - | term.setCursorPos(1,1) |
| 12 | + | term.clear() |
| 13 | - | print("Access Granted")
|
| 13 | + | term.setCursorPos(1,1) |
| 14 | - | rs.setOutput(side,true) |
| 14 | + | print("Access Granted")
|
| 15 | - | sleep(opentime) |
| 15 | + | rs.setOutput(side,true) |
| 16 | - | rs.setOutput(side,false) |
| 16 | + | if(side2~="") then rs.setOutput(side2,true) end |
| 17 | - | else |
| 17 | + | sleep(opentime) |
| 18 | - | print("Access Denied")
|
| 18 | + | rs.setOutput(side,false) |
| 19 | - | sleep(2) |
| 19 | + | if(side2~="") then rs.setOutput(side2,false) end |
| 20 | - | end |
| 20 | + | else |
| 21 | print("Access Denied")
| |
| 22 | sleep(2) | |
| 23 | end | |
| 24 | end |