QuickMuffin8782-Alt

Untitled

Sep 13th, 2020
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function drawWindow(x, xx, y, yy, color1, color2, textColor, title)
  2. paintutils.drawFilledBox(x, y, xx, yy, color1)
  3. paintutils.drawLine(x, y, xx, y, color2)
  4. term.setCursorPos(x,y)
  5. term.setTextColor(textColor)
  6. print(" "..title)
  7. paintutils.drawPixel(xx, y, 16384)
  8. paintutils.drawPixel(xx-1, y, 32)
  9. paintutils.drawPixel(xx-2, y, 16)
  10. end
  11.  
  12. x, y = term.getSize()
  13. function cprint(text, yp)
  14. cx = math.ceil((x/2)-(string.len(text)/2))
  15. term.setCursorPos(cx, yp)
  16. print(text)
  17. end
  18. function cwrite( text, yp)
  19. cx = math.ceil((x/2)-(string.len(text)/2))
  20. term.setCursorPos(cx, yp)
  21. write(text)
  22. end
  23.  
  24. function installWindow()
  25. term.setBackgroundColor(colors.blue)
  26. term.clear()
  27. drawWindow(13, 38, 4, 11, 1, 512, 128, "Install")
  28. term.setCursorPos(16, 6)
  29. term.setBackgroundColor(colors.white)
  30. cprint("Oblox OS", 6)
  31. cprint("Installing...", 7)
  32. term.setCursorPos(16, 8)
  33. end
  34.  
  35. function Doinstall()
  36. installWindow()
  37. sleep(0.02)
  38. shell.run("mkdir .DS_Data")
  39. installWindow()
  40. shell.run("cd .DS_Data")
  41. installWindow()
  42. shell.run("mkdir APIS")
  43. installWindow()
  44. shell.run("mkdir Config")
  45. installWindow()
  46. shell.run("cd /")
  47. installWindow()
  48. shell.run("mkdir programs")
  49. installWindow()
  50. shell.run("mkdir ui")
  51. installWindow()
  52. shell.run("pastebin get RKPgMEqx startup")
  53. installWindow()
  54.  
  55. shell.run("pastebin get 6wVekjuE ui/main")
  56. installWindow()
  57. shell.run("pastebin get KCGk2vJW ui/login")
  58. installWindow()
  59.  
  60. shell.run("pastebin get UkxJcZTL .DS_Data/APIS/windowAPI")
  61. installWindow()
  62. shell.run("pastebin get JEBcUAyn .DS_Data/APIS/configAPI")
  63. installWindow()
  64. shell.run("pastebin get ykFTVsi7 .DS_Data/APIS/vectors")
  65. installWindow()
  66. shell.run("pastebin get XU60BDH9 .DS_Data/APIS/SHA256")
  67. installWindow()
  68.  
  69. shell.run("pastebin get v4bVmdqT .DS_Data/Config/settings")
  70. installWindow()
  71.  
  72. shell.run("pastebin get dUX9UwKh programs/example1")
  73. installWindow()
  74. shell.run("pastebin get dUX9UwKh programs/example2")
  75. installWindow()
  76. shell.run("pastebin get dUX9UwKh programs/example3")
  77. installWindow()
  78. shell.run("pastebin get dUX9UwKh programs/example4")
  79. installWindow()
  80. shell.run("pastebin get dUX9UwKh programs/example5")
  81. installWindow()
  82. shell.run("pastebin get dUX9UwKh programs/example6")
  83. installWindow()
  84.  
  85. shell.run("mkdir icons")
  86. installWindow()
  87. shell.run("pastebin get k8en531w icons/programs")
  88. installWindow()
  89. shell.run("pastebin get yqAPaeyQ icons/settings")
  90. installWindow()
  91. term.setBackgroundColor(colors.blue)
  92. term.clear()
  93. drawWindow(13, 38, 4, 11, 1, 512, 128, "Install")
  94. term.setCursorPos(1, 1)
  95. term.setBackgroundColor(colors.white)
  96. term.setCursorPos(16, 8)
  97. os.reboot()
  98. end
  99.  
  100.  
  101. term.setBackgroundColor(colors.blue)
  102. term.clear()
  103. drawWindow(13, 38, 4, 11, 1, 512, 128, "Install")
  104. term.setCursorPos(14, 6)
  105. term.setBackgroundColor(colors.white)
  106. cprint("Oblox OS", 6)
  107.  
  108. term.setBackgroundColor(256)
  109. paintutils.drawFilledBox(16, 8, 35, 10, 256)
  110. term.setCursorPos(14,6)
  111. cprint("Install now", 9)
  112. local install = "f"
  113. while install == "f" do
  114. event,button,x,y = os.pullEvent("mouse_click")
  115. if event == "mouse_click" and x >= 16 and x <= 35 and y >= 8 and y <= 10 and button == 1 then
  116. install = "t"
  117. Doinstall()
  118. end
  119. end
Add Comment
Please, Sign In to add comment