SHOW:
|
|
- or go back to the newest paste.
| 1 | local pullEvent = os.pullEvent | |
| 2 | os.pullEvent = os.pullEventRaw | |
| 3 | ||
| 4 | - | pass = "ineptmad" |
| 4 | + | local pass, admin, root = "ineptmad", "madinept", "rootim" |
| 5 | - | admin = "madinept" |
| 5 | + | |
| 6 | - | root = "rootim" |
| 6 | + | textutils.slowPrint ("Loading...")
|
| 7 | textutils.slowPrint ("Done Loading!")
| |
| 8 | - | textutils.slowPrint ("Loading...")
|
| 8 | + | sleep(1) |
| 9 | - | textutils.slowPrint ("Done Loading!")
|
| 9 | + | term.clear() |
| 10 | - | sleep(1) |
| 10 | + | term.setCursorPos(1,1) |
| 11 | ||
| 12 | - | term.setCursorPos(1,1) |
| 12 | + | textutils.slowPrint ("Welcome to SecurityDoorWatch")
|
| 13 | - | |
| 13 | + | textutils.slowPrint ("v0.5")
|
| 14 | - | textutils.slowPrint ("Welcome to SecurityDoorWatch")
|
| 14 | + | sleep(0.5) |
| 15 | - | textutils.slowPrint ("v0.4")
|
| 15 | + | term.clear() |
| 16 | - | sleep(0.5) |
| 16 | + | |
| 17 | print ("Door Lock v0.5")
| |
| 18 | - | |
| 18 | + | print ("Coded by Madster")
|
| 19 | - | print ("Door Lock v0.4")
|
| 19 | + | write "Passcode: " |
| 20 | - | print ("Coded by Madster")
|
| 20 | + | input = read("*")
|
| 21 | if input == pass then | |
| 22 | - | input = read("*")
|
| 22 | + | |
| 23 | - | if input == pass then |
| 23 | + | |
| 24 | sleep(5) | |
| 25 | os.shutdown() | |
| 26 | elseif input == admin then | |
| 27 | print ("Door will remain open, remember to close!")
| |
| 28 | redstone.setOutput ("left", true )
| |
| 29 | - | if input == admin then |
| 29 | + | |
| 30 | input2 = read("*")
| |
| 31 | if input2 == admin then | |
| 32 | redstone.setOutput ("left", false )
| |
| 33 | os.shutdown() | |
| 34 | else | |
| 35 | - | redstone.setOutput ("left", false )
|
| 35 | + | textutils.slowPrint ("Incorrect Admin passcode, force-closing door!")
|
| 36 | sleep( 3 ) | |
| 37 | os.shutdown() | |
| 38 | - | textutils.slowPrint ("Incorrect Admin passcode, force-closing door!")
|
| 38 | + | |
| 39 | - | sleep( 3 ) |
| 39 | + | elseif input == root then |
| 40 | textutils.slowPrint ("Welcome, you may now edit the programs/files on this computer!")
| |
| 41 | term.clear() | |
| 42 | - | if input == root then |
| 42 | + | os.pullEvent = pullEvent |
| 43 | - | --textutils.slowPrint ("Welcome, you may now edit the programs/files on this computer!")
|
| 43 | + | print ("Root permissions enabled")
|
| 44 | - | --term.clear() |
| 44 | + | return |
| 45 | - | -- os.pullEvent = pullEvent |
| 45 | + | else |
| 46 | - | -- print ("Root permissions enabled")
|
| 46 | + | |
| 47 | - | return |
| 47 | + | |
| 48 | os.shutdown() | |
| 49 | end |