Advertisement
Guest User

startup

a guest
Jun 27th, 2016
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.35 KB | None | 0 0
  1. while true do
  2. redstone.setOutput("back",false)
  3. term.clear()
  4. term.setCursorPos(1,1)
  5. term.setTextColor(colors.orange)
  6. print(" Login:")
  7. print("")
  8. term.setTextColor(colors.lightBlue)
  9. write("Username: ")
  10. term.setTextColor(colors.white)
  11. input1 = read()
  12. term.setTextColor(colors.lightBlue)
  13. write("Password: ")
  14. term.setTextColor(colors.white)
  15. input2 = read("*")
  16. if input1 == "username" and input2 == "password" then
  17. redstone.setOutput("back",true)
  18. term.setTextColor(colors.lime)
  19. print("")
  20. write("Login succesful! Opening doors")
  21. sleep(1)
  22. write(".")
  23. sleep(1)
  24. write(".")
  25. sleep(1)
  26. write(".  ")
  27. sleep(1)
  28. term.setTextColor(colors.red)
  29. print("")
  30. print("Closing doors in:")
  31. term.setTextColor(colors.yellow)
  32. print("3")
  33. sleep(1)
  34. term.setTextColor(colors.orange)
  35. print("2")
  36. sleep(1)
  37. term.setTextColor(colors.red)
  38. print("1")
  39. sleep(1)
  40. print("")
  41. print("Doors closed")
  42. redstone.setOutput("back",false)
  43. sleep(1)
  44. term.setTextColor(colors.yellow)
  45. print("")
  46. write("Rebooting")
  47. sleep(1)
  48. write(".")
  49. sleep(1)
  50. write(".")
  51. sleep(1)
  52. write(".")
  53. sleep(1)
  54. os.reboot()
  55. else
  56. term.setTextColor(colors.red)
  57. print("")
  58. print("Incorrect username or password please try again later!")
  59. sleep(2)
  60. term.setTextColor(colors.yellow)
  61. print("")
  62. write("Rebooting")
  63. sleep(1)
  64. write(".")
  65. sleep(1)
  66. write(".")
  67. sleep(1)
  68. write(".")
  69. sleep(1)
  70. write(".")
  71. os.reboot()
  72. end
  73. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement