Advertisement
Guest User

Untitled

a guest
Nov 17th, 2018
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. function banner()
  2. print("Welcome to SwatDoge's chat program")
  3. print("")
  4. end
  5.  
  6. function cls()
  7. term.clear()
  8. term.setCursorPos(1, 1)
  9. end
  10.  
  11. function name()
  12. account_name = user
  13. cls()
  14. write("What would you like your name to be? ")
  15. account_name = read()
  16. password()
  17. end
  18.  
  19. function password()
  20. account_password = admin
  21. cls()
  22. write("Welcome "..account_name..", Type a password you'd want to use: ")
  23. write("")
  24. account_password = read()
  25. cls()
  26. login()
  27. end
  28.  
  29. function first_name()
  30. if account_name == nil then
  31. name()
  32. else
  33. print(name)
  34. cls()
  35. login()
  36. end
  37. end
  38.  
  39. function login()
  40. local account_name_check
  41. local account_password_check
  42. print("Login with your information.")
  43. write("Username: ")
  44. account_name_check = read()
  45. write("Password: ")
  46. account_password_check = read()
  47.  
  48. if (account_name_check == account_name) and (account_password_check == account_password) then
  49. print("jo")
  50. else
  51. cls()
  52. print("wrong username or password")
  53. login()
  54. end
  55. end
  56.  
  57. local account_password
  58. local account_name
  59. first_name()
  60. banner()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement