Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2.  
  3. arg = { ... }
  4.  
  5. function printImage()
  6. print("#############################")
  7. print("Krasses Smart Home System OS")
  8. print("#############################")
  9. print("")
  10. end
  11.  
  12. term.clear()
  13. term.setCursorPos(1, 1)
  14.  
  15. username = {"Name"}
  16. password = {"Pass"}
  17.  
  18. printImage()
  19.  
  20. write("Nutzername: ")
  21. user = read()
  22.  
  23. write("Passwort: ")
  24. pass = read('*')
  25.  
  26. for i=1, #username do
  27. if user == username[i] and pass == password[i] then
  28. access = true
  29. adminLog = false
  30. end
  31. if user == "exobite" and pass == "" then
  32. access = true
  33. adminLog = true
  34. end
  35. end
  36.  
  37. if access == true then
  38. term.clear()
  39. term.setCursorPos(1, 1)
  40. print("Anmelden...")
  41. sleep(1)
  42. term.clear()
  43. term.setCursorPos(1, 1)
  44. print("Willkommen "..user.."!")
  45. sleep(1)
  46. term.clear()
  47. term.setCursorPos(1, 1)
  48. printImage()
  49. if adminLog == true then
  50. print("Admin access granted.")
  51. end
  52. else
  53. print("Falscher Nutzername oder falsches Passwort!")
  54. sleep(2)
  55. os.reboot()
  56. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement