Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- arg = { ... }
- term.clear()
- term.setCursorPos(1, 1)
- username = {"Name"}
- password = {"Pass"}
- printImage()
- write("Nutzername: ")
- user = read()
- write("Passwort: ")
- pass = read('*')
- for i=1, #username do
- if user == username[i] and pass == password[i] then
- access = true
- adminLog = false
- end
- if user == "exobite" and pass == "" then
- access = true
- adminLog = true
- end
- end
- if access == true then
- term.clear()
- term.setCursorPos(1, 1)
- print("Anmelden...")
- sleep(1)
- term.clear()
- term.setCursorPos(1, 1)
- print("Willkommen "..user.."!")
- sleep(1)
- term.clear()
- term.setCursorPos(1, 1)
- printImage()
- if adminLog == true then
- print("Admin access granted.")
- end
- else
- print("Falscher Nutzername oder falsches Passwort!")
- sleep(2)
- os.reboot()
- end
- function printImage()
- print("#############################")
- print("Krasses Smart Home System OS")
- print("#############################")
- print("")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement