Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local seite = "left"
- local passwort = "enterme"
- local richtigzeit = 3
- local falschzeit = 10
- local richtigfarbe = colors.lime
- local falschfarbe = colors.red
- local standartfarbe = colors.black
- monitor = peripheral.wrap("top")
- monitor.clear()
- monitor.setCursorPos(1,1)
- monitor.setTextScale(3)
- while true do
- term.clear()
- term.setCursorPos(1,1)
- term.setBackgroundColor(standartfarbe)
- term.setCursorPos(99,99)
- write("by: @TurboTheSergal")
- term.setCursorPos(1,1)
- write("Zum öffnen der Tür passwort eingeben!")
- term.setCursorPos(1,2)
- write("Passwort:")
- monitor.clear()
- monitor.setCursorPos(1,1)
- monitor.setTextScale(0.5)
- monitor.write("Hallo,")
- monitor.setCursorPos(1,2)
- monitor.setTextScale(0.5)
- monitor.write("Um den Raum zu betreten")
- monitor.setCursorPos(1,3)
- monitor.setTextScale(0.5)
- monitor.write("Passwort im Computer eingeben!")
- local input = read("*")
- if input == passwort then
- term.clear()
- term.setCursorPos(1,1)
- term.setBackgroundColor(richtigfarbe)
- print("Passwort richtig!")
- rs.setOutput(seite,true)
- sleep(richtigzeit)
- rs.setOutput(seite,false)
- os.shutdown()
- else
- term.clear()
- term.setCursorPos(1,1)
- term.setBackgroundColor(falschfarbe)
- print("Passwort falsch!")
- sleep(falschzeit)
- os.shutdown()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement