Advertisement
Guest User

Startsoftware 1.0

a guest
Jan 30th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. print("Boot from local disk")
  2. sleep(0,5)
  3. print("35MB was founded")
  4. sleep(0,5)
  5. shell.run("clear")
  6.  
  7. repeat
  8. var = var+1
  9. until var == 8
  10. print("Installizing .")
  11. sleep(0,5)
  12. shell.run("clear")
  13. print("Installizing ..")
  14. sleep(0,5)
  15. shell.run("clear")
  16. print("Installizing ...")
  17. end
  18.  
  19. os.pullEvent = os.pullEventRaw
  20. local w, h = term.getSize()
  21. --Variables
  22. local user = "Human"
  23. local pass = "password"
  24. local uAllow = false
  25. local pAllow = false
  26. version = "1.0.0"
  27. --Functions
  28. function clear()
  29. term.clear()
  30. term.setCursorPos(1,1)
  31. end
  32. function printCentered(msg, h)
  33. term.setCursorPos(w/2 - #msg/2, h)
  34. write(msg)
  35. end
  36. local function printHeader()
  37. printCentered("Login System V"..version, 1)
  38. printCentered("Coded by: Human", 2)
  39. end
  40. local function uCheck()
  41. write("Username: ")
  42. uInput = read()
  43. if uInput == user then
  44. uAllow = true
  45. else print("Incorrect Username!")
  46. sleep(2)
  47. os.reboot()
  48. end
  49. end
  50. local function pCheck()
  51. write("Password: ")
  52. pInput = read("*")
  53. if pInput == pass then
  54. pAllow = true
  55. else
  56. print("Incorrect Password!")
  57. sleep(2)
  58. os.reboot()
  59. end
  60. end
  61. --Main Program
  62. clear()
  63. printHeader()
  64. term.setCursorPos(1,4)
  65. uCheck()
  66. if uAllow == true then
  67. term.setCursorPos(1,5)
  68. pCheck()
  69. end
  70. if uAllow == true and pAllow == true then
  71. textutils.slowPrint("Loging in...")
  72. sleep(2)
  73. clear()
  74. print("Logged in")
  75. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement