Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.cyan)
- print("Geben sie 1 fuer Login ein oder 2 fuer Registration.")
- sel = read()
- if sel ~= "1" and sel ~= "2" then
- term.setTextColor(colors.red)
- print("Ihre Auswahl ist ungueltig.")
- sleep(1)
- os.reboot()
- end
- if sel == "1" then
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.green)
- print("Bitte geben sie ihren Benutzernamen ein...")
- user = read()
- if fs.exists(user) then
- term.setTextColor(colors.blue)
- print("Bitte geben sie ihr Passwort ein...")
- pass = read("*")
- f = fs.open(user, "r")
- fc = f.readLine()
- if pass == fc then
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.yellow)
- print("CraftOS 1.7")
- term.setCursorPos(1,2)
- else
- term.setTextColor(colors.red)
- textutils.slowPrint("Passwort ist Inkorrekt!")
- sleep(2)
- os.reboot()
- end
- else
- term.setTextColor(colors.red)
- print("Benutzer "..user.." existiert nicht!")
- sleep(2)
- os.reboot()
- end
- end
- if sel == "2" then
- term.clear()
- term.setCursoePos(1,1)
- term.setTextColor(colors.pink)
- print("Geben sie ihren gewuenschten Benutzernamen ein...")
- reguse = read()
- if not fs.exists(reguse) then
- F = fs.open("/"..reguse, "w")
- term.setTextColor(colors.lightBlue)
- print("Geben sie ihr gewuenschtes Passwort ein...")
- regpas = read("*")
- F.write(regpas)
- term.setTextColor(colors.lime)
- print("Registration erfolgreich!")
- sleep(2)
- os.reboot()
- else
- term.setTextColor(colors.red)
- print("Der Benutzername "..reguse.." existiert bereits.")
- sleep(2)
- os.reboot()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement