SHOW:
|
|
- or go back to the newest paste.
1 | function clearMonitor() | |
2 | term.clear() | |
3 | term.setCursorPos(1, 1) | |
4 | end | |
5 | ||
6 | ||
7 | function enterPassword() | |
8 | clearMonitor() | |
9 | print("Enter Password:") | |
10 | local password = read("*") | |
11 | ||
12 | if password == "mog" then | |
13 | clearMonitor() | |
14 | print("Welcome Home ETvd") | |
15 | redstone.setOutput("back", true) | |
16 | print("Type 'off' to deactivate redstone signal.") | |
17 | ||
18 | while true do | |
19 | local input = read() | |
20 | if input == "off" then | |
21 | redstone.setOutput("back", false) | |
22 | clearMonitor() | |
23 | print("Lights Off, Cya") | |
24 | break | |
25 | else | |
26 | print("Invalid comman. Type 'off' to turn off lights") | |
27 | end | |
28 | end | |
29 | else | |
30 | clearMonitor() | |
31 | print("Employees Only") | |
32 | end | |
33 | end | |
34 | ||
35 | clearMonitor() | |
36 | enterPassword() |