View difference between Paste ID: Te0KQHav and nzqYmCZC
SHOW: | | - or go back to the newest paste.
1
local password = "timhat3nippel"
2
local masterpw = "ichbinderüberboss"
3
local side = "right"
4
local opentime = 5
5
local run = 1
6
7
os.pullEvent = os.pullEventRaw
8
9
while run == 1 do
10
    
11
    term.clear()
12
    term.setCursorPos(1,1)
13
    
14
    write("Password: ")
15
    
16
    local input = read("*")
17
    
18
    if input == password then
19
        
20
        term.clear()
21
        term.setCursorPos(1,1)
22
        
23
        print("Passwort richtig!")
24
        
25
        rs.setOutput(side,true)
26
        sleep(opentime)
27
        rs.setOutput(side,false)
28
        
29
    elseif input == masterpw then
30
        
31
        run = 0
32
        
33
    else
34
        
35
        print("Passwort falsch!")
36
        sleep(2)
37
        
38
    end 
39
    
40
end