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