Advertisement
StrangeCodingHD

Xeon OS welcome

Mar 19th, 2016
3,900
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.14 KB | None | 0 0
  1. if not http then
  2. printError("Xeon OS needs the http API")
  3. return
  4. end
  5. term.setTextColor(colors.black)
  6. term.setBackgroundColor(colors.white)
  7. local isp = paintutils.loadImage("Xeon/System/installationbackground")
  8. paintutils.drawImage(isp,1,1)
  9.  
  10. local function pb(paste,file)
  11. local response = http.get("http://pastebin.com/raw/"..paste)
  12. local sResponse = response.readAll()
  13. response.close()
  14. local file = fs.open( file, "w" )
  15. file.write(sResponse)
  16. end
  17.  
  18. local function continuebutton()
  19. term.setTextColor(colors.black)
  20. term.setBackgroundColor(colors.white)
  21. term.setCursorPos(35,15)
  22. print("Continue")
  23.  local event, button, x, y = os.pullEvent("mouse_click")
  24. if y == 15 and x < 43 and x > 34 and button == 1 then
  25. continued = 1
  26. end
  27. end
  28.  
  29. term.setTextColor(colors.black)
  30. term.setBackgroundColor(colors.white)
  31. term.setCursorPos(13,8)
  32. print("Please wait while Xeon OS ")
  33. term.setCursorPos(11,9)
  34. print("downloads the neccisary Files...")
  35.  
  36. pb("PyYKSwFk","Xeon/System/login")
  37. pb("ChNyQYEm","Xeon/System/welcome")
  38. pb("Di9SWCeC","Xeon/System/bkgd")
  39. pb("gLLy8GSd","Xeon/System/black")
  40. pb("zm2rKe83","Xeon/System/defaultuser.paint")
  41. pb("kFysEaaF","Xeon/System/Exit.paint")
  42. pb("ZsGuGi0M","Xeon/System/lightB")
  43. pb("Kh1Y54F7","Xeon/System/logo")
  44. pb("772v6E6D","Xeon/System/menu10")
  45. pb("sqsS8S0S","Xeon/System/system")
  46. pb("PuBekjhj","Xeon/System/white")
  47. pb("zY24cE2L","Xeon/System/updater")
  48. pb("yf0hGAEi","Xeon/System/execute")
  49. pb("DL1fgXwe","Xeon/System/exitscreen")
  50. pb("umYiNCt5","Xeon/System/optionswindow")
  51. pb("6tztv9dq","Xeon/System/optionswindow2")
  52. pb("KAeHtrRE","Xeon/System/powermenu")
  53. pb("6te2Eqi3","Xeon/System/searchbar")
  54. pb("2wxQPtuv","Xeon/System/installationbackground")
  55.  
  56. paintutils.drawImage(isp,1,1)
  57. term.setCursorPos(13,8)
  58. term.setTextColor(colors.black)
  59. term.setBackgroundColor(colors.white)
  60. print("    Welcome to Xeon OS !")
  61. while true do
  62. continuebutton()
  63. if continued == 1 then
  64. continued = 0
  65. paintutils.drawImage(isp,1,1)
  66. term.setCursorPos(13,8)
  67. term.setTextColor(colors.black)
  68. term.setBackgroundColor(colors.white)
  69. print("Please choose a Username !")
  70. term.setCursorPos(13,11)
  71. local user = read()
  72. paintutils.drawImage(isp,1,1)
  73. term.setCursorPos(13,8)
  74. term.setTextColor(colors.black)
  75. term.setBackgroundColor(colors.white)
  76. print("Please choose a Password !")
  77. term.setCursorPos(13,11)
  78. local pass = read("*")
  79. paintutils.drawImage(isp,1,1)
  80. term.setCursorPos(13,8)
  81. term.setTextColor(colors.black)
  82. term.setBackgroundColor(colors.white)
  83. print("Please repeat the Password !")
  84. term.setCursorPos(13,11)
  85. local pass2 = read("*")
  86. if pass == pass2 then
  87. local convertlink = "http://md5hash.netne.net/md5.php?cn="
  88. local vpass = http.get(convertlink .. pass).readLine()
  89. local filez = fs.open("Xeon/Users/"..user,"a")
  90. filez.writeLine(vpass)
  91. while true do
  92. continuebutton()
  93. if continued == 1 then
  94. paintutils.drawImage(isp,1,1)
  95. term.setCursorPos(13,8)
  96. term.setTextColor(colors.black)
  97. term.setBackgroundColor(colors.white)
  98. print("Installation finished !")
  99. term.setCursorPos(13,9)
  100. term.setTextColor(colors.black)
  101. term.setBackgroundColor(colors.white)
  102. print("The OS will reboot now...")
  103. sleep(2)
  104. os.reboot()
  105. end
  106. end
  107. else
  108.  
  109. end
  110. end
  111. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement