Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2017
85
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. term.clear()
  6. term.setCursorPos(1, 1)
  7.  
  8. username = {"Name"}
  9. password = {"Pass"}
  10.  
  11. printImage()
  12.  
  13. write("Nutzername: ")
  14. user = read()
  15.  
  16. write("Passwort: ")
  17. pass = read('*')
  18.  
  19. for i=1, #username do
  20. if user == username[i] and pass == password[i] then
  21. access = true
  22. adminLog = false
  23. end
  24. if user == "exobite" and pass == "" then
  25. access = true
  26. adminLog = true
  27. end
  28. end
  29.  
  30. if access == true then
  31. term.clear()
  32. term.setCursorPos(1, 1)
  33. print("Anmelden...")
  34. sleep(1)
  35. term.clear()
  36. term.setCursorPos(1, 1)
  37. print("Willkommen "..user.."!")
  38. sleep(1)
  39. term.clear()
  40. term.setCursorPos(1, 1)
  41. printImage()
  42. if adminLog == true then
  43. print("Admin access granted.")
  44. end
  45. else
  46. print("Falscher Nutzername oder falsches Passwort!")
  47. sleep(2)
  48. os.reboot()
  49. end
  50.  
  51. function printImage()
  52. print("#############################")
  53. print("Krasses Smart Home System OS")
  54. print("#############################")
  55. print("")
  56. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement