View difference between Paste ID: cxBmJGJq and wVQBkvgu
SHOW: | | - or go back to the newest paste.
1
local passwort = "123"
2
local side = "right"
3
local time = 5
4
5
function clear()
6
  term.clear()
7
  term.setCursorPos(1,1)
8
end
9
10
while(true) do
11
  clear()
12
  write("Passwort: ")
13
  local input = read("*")
14
  
15
  if input == passwort then
16
    clear()
17
    print("Passwort richtig!")
18
    rs.setOutput(side, true)
19
    sleep(time)
20
    rs.setOutput(side, false)
21
    os.shutdown()
22
  else
23
    clear()
24
    print("Passwort falsch!")
25
    rs.setOutput("bottom", true)
26
    sleep(time)
27
    rs.setOutput("bottom", false)
28
    os.shutdown()
29
  end
30
end