JoeNoIce

startup 2.2

Jan 21st, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.09 KB | None | 0 0
  1. username = {"a","JoeNoIce", "-","joenoice"} --[[This is the usernames]]--
  2. password = {"a","fagbag", "-","fagbag"} --[[This is the passwords for the users]]--
  3. --term.setBackgroundColor(colors.white)
  4. os.pullEvent = os.pullEventRaw
  5. term.clear()
  6. term.isColor()
  7. term.setCursorPos(1,1)
  8. --bground = paintutils.loadImage("BG")
  9. --paintutils.drawImage(bground,1,1)
  10. term.setCursorPos(7,5)
  11. --term.setBackgroundColor(colors.white)
  12. term.setTextColor(colors.green)
  13. term.clear()
  14. write("Username:")
  15. user = read()
  16.  
  17. for i=1, #username do
  18. if user == username[i] then
  19. term.setCursorPos(8,6)
  20. print("User found")
  21. sleep(0.25)
  22. term.setCursorPos(7,7)
  23. write("Password:".."")
  24. pass = read("*")
  25. if pass == password[i] then
  26. access = true
  27. else print("Incorrect")
  28. sleep(1)
  29. os.reboot()
  30. end
  31. end
  32. end
  33.  
  34. if access == true then
  35. term.setCursorPos(7,8)
  36. print("Logging in...")
  37. sleep(0.25)
  38. term.clear()
  39. term.setCursorPos(8,8)
  40. print("Welcome User")
  41. term.setCursorPos(7,9)
  42. textutils.slowWrite("||||||||||||||")
  43. sleep(0.75)
  44. --shell.run("gui")
  45. else
  46. print("Incorrect username and/or password")
  47. sleep(0.5)
  48. os.reboot()
  49. end
Advertisement
Add Comment
Please, Sign In to add comment