Advertisement
Guest User

ColtOS

a guest
Jan 16th, 2017
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. -- ColtOS
  2. os.pullEvent = os.pullEventRaw
  3. term.clear()
  4. term.setCursorPos(1,1)
  5. print("ColtOS 0.1")
  6. print("1 - Create Account")
  7. print("2 - Login")
  8. print("Any other key to exit to lua prompt")
  9. input = read()
  10. if input == "1" then {
  11. term.clear()
  12. term.setCursorPos(1,1)
  13. -- Username Creation
  14. write("Please Enter A Username:")
  15. local username = ( read() )
  16. term.clear()
  17. term.setCursorPos(1,1)
  18. -- Pass Creation
  19. write("Thank you! Now, a Password:")
  20. local password = ( read() )
  21. term.clear()
  22. term.setCursorPos(1,1)
  23. }
  24. -- Login
  25. if input == "2"
  26. write("Login")
  27. write("Username:")
  28. if input = local username then {
  29. write("Password:")
  30. else
  31. -- Incorrect User
  32. write("User not found.")
  33. if input = local password then {
  34. term.clear()
  35. term.setCursorPos(1,1)
  36. print("ColtOS")
  37. -- Incorrect Pass
  38. else
  39. term.clear()
  40. term.setCursorPos(1,1)
  41. print("Incorrect!")
  42. os.reboot()
  43. }
  44. }
  45. else
  46. term.clear()
  47. term.setCursorPos(1,1)
  48. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement