Advertisement
Guest User

startup

a guest
Apr 20th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.11 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2. username = "walterwhite"
  3. password = "lovesmeth"
  4. secretuser = "love"
  5. attempt = 0
  6.  
  7. function attemptCheck()
  8. if attempt > 1 then
  9. term.clear()
  10. term.setCursorPos(1,1)
  11. textutils.slowPrint ("Attempt Limit Reached")
  12. sleep(60)
  13. textutils.slowPrint ("Shutting down..")
  14. sleep(1)
  15. os.reboot()
  16. end
  17. end
  18.  
  19. function login()
  20. attemptCheck()
  21. term.clear()
  22. print("Attempt: ", attempt)
  23. write("Username: ")
  24. input = read()
  25. if input == secretuser then
  26. print("wtf u transgender hacker")
  27. else
  28. if input == username then
  29. write("Password: ")
  30. input = read("*")
  31. if input == password then
  32. textutils.slowPrint ("Welcome my nigga")
  33. rs.setOutput("bottom", true)
  34. sleep(2)
  35. rs.setOutput("bottom", false)
  36. term.setCursorPos(1,1)
  37. login()
  38. else
  39. textutils.slowPrint ("Incorrect Password")
  40. sleep(1)
  41. textutils.slowPrint ("Try again")
  42. attempt = attempt + 1
  43. sleep(1)
  44. term.clear()
  45. term.setCursorPos(1,1)
  46. login()
  47. end
  48. else
  49. textutils.slowPrint ("Invalid Username")
  50. sleep(1)
  51. textutils.slowPrint ("Try again")
  52. attempt = attempt + 1
  53. sleep(1)
  54. term.clear()
  55. term.setCursorPos(1,1)
  56. login()
  57. end
  58. end
  59. end
  60.  
  61. login()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement