Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- password = "Kraftwerk"
- side = "left"
- while true do
- function password1()
- shell.run("clear")
- sleep(0.03)
- print("Bitte Password eingeben: ")
- term.setCursorPos(25, 1)
- pw = read("*")
- if pw == password then
- rs.setOutput(side, true)
- sleep(5)
- rs.setOutput(side, false)
- else
- print("Falsche Eingabe")
- sleep(0.1)
- startup()
- end
- end
- function startup()
- term.setTextColor(colors.red)
- shell.run("clear")
- sleep(0.01)
- print("W-Taste zum fortfahren.")
- local evt, key = os.pullEvent("char")
- key = string.lower(key)
- if key == "w" then
- password1()
- else
- startup()
- end
- end
- startup()
- sleep(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement