Advertisement
Guest User

Untitled

a guest
May 31st, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. --[[ Login screen ]]--
  2.  
  3. username = "Diysuperguy33"
  4. Access = "Login"
  5. password = "warefare"
  6. currentVersion = "1"
  7. os.pullEvent = os.pullEventRaw
  8. --[[ functions ]]--
  9.  
  10. function startscreen(print)
  11. term.clear()
  12. term.setCursorPos(1,1)
  13. print("+========+")
  14. print("|The Rusty Cutlass OS|")
  15. print("+========+")
  16. print("")
  17. print("+=======================+")
  18. print("|Username: |")
  19. print("+=======================+")
  20. print("")
  21. print("+=======================+")
  22. print("|Password: |")
  23. print("+=======================+")
  24. print("")
  25. print("Access: "..Access.."")
  26.  
  27. end
  28.  
  29. function login()
  30. term.setCursorPos(12,6)
  31. unbox = read()
  32. if unbox == "update" then
  33. autoupdate()
  34. elseif unbox ~= username then
  35. term.setCursorPos(9,13)
  36. print("Incorrect username!")
  37. sleep(2)
  38. shell.run("startup")
  39. else
  40. term.setCursorPos(1,13)
  41. term.setCursorPos(1,13)
  42. term.setCursorPos(12,10)
  43. pwbox = read("*")
  44. if pwbox == password then
  45. term.setCursorPos(1,13)
  46. print("")
  47. term.setCursorPos(1,13)
  48. Access = "Granted!"
  49. print("Access: "..Access.."")
  50. sleep(3)
  51. term.clear()
  52. term.setCursorPos(1,1)
  53. else
  54. os.reboot()
  55. end
  56. end
  57. end
  58.  
  59. updateCheck()
  60. startscreen(print)
  61. login()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement