SHOW:
|
|
- or go back to the newest paste.
1 | - | local pullEvent = os.pullEvent --# make sure you actually store the old pullevent so you can restore it later |
1 | + | local pullEvent = os.pullEvent |
2 | os.pullEvent = os.pullEventRaw | |
3 | ||
4 | - | local adminpw = "creeper2" --# just a dummy password, change if needed. |
4 | + | local adminpw = "admin123" |
5 | local side = "left" | |
6 | - | local password = "creeper" |
6 | + | local password = "swag" |
7 | local opentime = 5 | |
8 | ||
9 | while true do | |
10 | term.clear() | |
11 | term.setCursorPos(1,1) | |
12 | - | write("Access Code Or Admin") |
12 | + | write("Passwort: ") |
13 | local input = read("*") | |
14 | ||
15 | - | term.clear() --# added this here and removed it from the ifs; it's done in every case, so we only do it once here. |
15 | + | |
16 | term.setCursorPos(1,1) | |
17 | ||
18 | if input == password then | |
19 | - | textutils.slowPrint("Access Granted") |
19 | + | textutils.slowPrint("Zugriff gewรคhrt") |
20 | rs.setOutput(side,true) | |
21 | sleep(opentime) | |
22 | rs.setOutput(side,false) | |
23 | elseif input == adminpw then | |
24 | - | textutils.slowPrint("Access Code Bypassed") |
24 | + | textutils.slowPrint("Willkommen Admin. Wie geht es dir?") |
25 | sleep(5) | |
26 | - | break --# we need to get into the computer, so we break out of the loop |
26 | + | |
27 | break | |
28 | - | textutils.slowPrint("Access Denied Activating Alarm Systems!") |
28 | + | |
29 | - | textutils.slowPrint("System Timeout Retry in 60 seconds") |
29 | + | textutils.slowPrint("Zugriff fehlgeschlaggen") |
30 | textutils.slowPrint("Bitte versuche es in 60 Sekunden erneut.") | |
31 | - | --# os.reboot not necessary. |
31 | + | |
32 | end | |
33 | end |