SHOW:
|
|
- or go back to the newest paste.
| 1 | - | os.pullEvent = os.pullEventRaw -- makes it so no one can terminate the program |
| 1 | + | os.pullEvent = os.pullEventRaw |
| 2 | - | pass = "norway240" -- replace "norway240" with your password |
| 2 | + | password = "password" |
| 3 | ||
| 4 | - | term.clear() |
| 4 | + | |
| 5 | - | term.setCursorPos(12,5) |
| 5 | + | term.clear() |
| 6 | - | print("Please Enter The Password")
|
| 6 | + | term.setCursorPos(12,5) |
| 7 | - | term.setCursorPos(12,6) |
| 7 | + | print("Enter password")
|
| 8 | - | input = read("*")
|
| 8 | + | term.setCursorPos(12,6) |
| 9 | - | if input == pass then |
| 9 | + | input = read("*")
|
| 10 | - | rs.setOutput("left",true) -- replace "left" with the side the door is connected to
|
| 10 | + | if input == password then |
| 11 | - | sleep(2) |
| 11 | + | rs.setOutput("left",true)
|
| 12 | - | rs.setOutput("left",false) -- once again replace "left with the side the door is connected to
|
| 12 | + | sleep(2) |
| 13 | - | else |
| 13 | + | rs.setOutput("left",false)
|
| 14 | - | term.setCursorPos(12,7) |
| 14 | + | else |
| 15 | - | print("WRONG PASSWORD")
|
| 15 | + | term.setCursorPos(12,7) |
| 16 | - | sleep(2) |
| 16 | + | print("WRONG PASSWORD")
|
| 17 | - | end |
| 17 | + | sleep(2) |
| 18 | end | |
| 19 | end |