Advertisement
Marlingaming

Aperture Science OS System - Boot 01

Sep 15th, 2021 (edited)
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.25 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2. --Aperture OS Startup
  3. --this program handles the starting of the Base Aperture OS
  4. --this program is for Minecraft 1.16.5, CC Tweaked
  5. settings.load("SystemSettings")
  6. local Version = nil
  7. local w, h = term.getSize()
  8. local V = fs.open("OSSettings","r")
  9. local Update_2 = false
  10. Version = V.readLine(2)
  11. V.close()
  12. local Graphics = 0
  13.  
  14. shell.run("C_Pastebin","get","DgmEm05E","Temp_LatestVersion")
  15. local LV = fs.open("Temp_LatestVersion","r")
  16. if LV.readLine(1) == "2.0" then
  17. Update_2 = true
  18. end
  19.  
  20. LV.close()
  21. fs.delete("Temp_LatestVersion")
  22.  
  23. function CenterText(y,text)
  24. local x = math.floor((w - string.len(text)) /2)
  25. term.setCursorPos(x,y)
  26. term.clearLine()
  27. term.write(text)
  28. end
  29.  
  30. function SlowCenterText(y,text)
  31. local x = math.floor((w - string.len(text)) /2)
  32. term.setCursorPos(x,y)
  33. term.clearLine()
  34. textutils.slowWrite(text)
  35. end
  36.  
  37. function ApertureLogo_1()
  38. term.clear()
  39. CenterText(1,"`.--:::::--.`")
  40. CenterText(2,".::.-+ssssssssssoo+ ``")
  41. CenterText(3,"-/oosso+-.:+ssssssssss.-o/-")
  42. CenterText(4,"`:oosssssssso/-.:osssssss: osoo:`")
  43. CenterText(5,"-osssssssssssssoo:../osssso /sssso-")
  44. CenterText(6,"/ossssoo++//:--.``` `-/oss.-ssssso/`")
  45. CenterText(7,"://:------. `-+: ossssss+`")
  46. CenterText(8,"-//++ooooo: ` /sssssso.")
  47. CenterText(9,"-sssssssso- -sssss+.:-")
  48. CenterText(10,"+sssssss/` osso:.+s+")
  49. CenterText(11,"sssssso: /so--osss`")
  50. CenterText(12,"`sssss+.-. -/.:ossss.")
  51. CenterText(13,"`ssso/./o/ .+ssssss`")
  52. CenterText(14,"+so-.+sso` -ossssss+")
  53. CenterText(15,"-+.-ossss- `/osssssss-")
  54. CenterText(16,"`/osssss+ .+ssooooo+/")
  55. CenterText(17,"+sssssss`.:. .//::---::-")
  56. CenterText(18,"`/osssss:`os+:` ```.-::/++oosso/`")
  57. CenterText(19,"-osssso /ssss+:``-/+oossssssssssso-")
  58. CenterText(20,"`:osss.-sssssso+-.:+ossssssssso:`")
  59. CenterText(21,"-+o/ osssssssso+-.:oossso+-`")
  60. CenterText(22,"`- /oossssssssso/-.:/-`")
  61. CenterText(23,"`.-::///::-.`")
  62. SlowCenterText(24,"APERTURE OS SYSTEM")
  63. end
  64.  
  65. function ApertureLogo_2()
  66. term.clear()
  67. paintutils.drawFilledBox(3,10,w-3,3+(w-3),colors.gray)
  68. paintutils.drawFilledBox(8,15,w-8,h-11,colors.black)
  69. end
  70.  
  71. function OSUPDATE()
  72. print("OS UPDATE 2.0 IS NOW AVAILABLE!!!")
  73. print("PRESS R TO DOWNLOAD, OR C TO SKIP")
  74. while true do
  75. local event, key = os.pullEvent("key")
  76. if key == keys.r then
  77. term.clear()
  78. term.setCursorPos(1,1)
  79. SlowCenterText(1,"Starting Update.........")
  80. sleep(5)
  81. StartUpdate()
  82. break
  83. elseif key == keys.c then
  84. term.clear()
  85. term.setCursorPos(1,1)
  86. SlowCenterText(1,"Skipping Update...")
  87. sleep(5)
  88. if settings.get("OS_LoginAfterBoot") == true then
  89. shell.run("ApertureOS_LoginManager")
  90. else
  91. shell.run("ApertureOS_Base")
  92. end
  93. break
  94. end
  95. end
  96. end
  97.  
  98. function StartUpdate()
  99. SlowCenterText(2,"Deleting SecurityCheck.....")
  100. fs.delete("ApertureOS_SecurityCheck")
  101. SlowCenterText(3,"Deleting Setup.....")
  102. fs.delete("setup")
  103. SlowCenterText(4,"Deleting Base.....")
  104. fs.delete("ApertureOS_Base")
  105. SlowCenterText(5,"Deleting ClientConsole.....")
  106. fs.delete("ApertureOS_ClientConsole")
  107. SlowCenterText(6,"Checking for AppStore Installation.....")
  108. if fs.exists("ApertureDL_AppStore") == true then
  109. SlowCenterText(7,"Deleting App Store.....")
  110. fs.delete("ApertureDL_AppStore")
  111. fs.delete("ApertureDL_AppStore_Browser")
  112. fs.delete("ApertureDL_AppStore_StoreProfile")
  113. fs.delete("ApertureDL_AppStore_AppPage")
  114. else
  115. SlowCenterText(7,"AppStore not found.....")
  116. end
  117. CenterText(8,"All Base Files Deleted")
  118. sleep(1)
  119. CenterText(9,"Downloading new Setup File")
  120. shell.run("C_Pastebin","get","vpd1c8JY","setup")
  121. sleep(3)
  122. CenterText(10,"Done!")
  123. sleep(2)
  124. CenterText("Rebooting for update in 3 seconds...")
  125. sleep(5)
  126. os.reboot()
  127. end
  128.  
  129. term.clear()
  130. term.setCursorPos(1,1)
  131. print("APERTURE OS BOOT SYSTEM")
  132. print("VERSION_"..Version)
  133. sleep(1)
  134. CenterText(3,"Running Security Check")
  135. SlowCenterText(4,"=========================")
  136. term.setCursorPos(1,5)
  137. shell.run("ApertureOS_SecurityCheck")
  138. sleep(1)
  139. term.setCursorPos(1,5)
  140. print("Security Check Done!")
  141. sleep(1)
  142. print("Completing Boot")
  143. SlowCenterText(8,"=========================")
  144. sleep(1)
  145. if Graphics == 0 then
  146. ApertureLogo_1()
  147. elseif Graphics == 1 then
  148. ApertureLogo_2()
  149. elseif Graphic == 2 then
  150. end
  151. sleep(10)
  152. term.clear()
  153. term.setCursorPos(1,1)
  154. print("Starting Main Program")
  155. CenterText(2,"///////////WARNING/////////////")
  156. term.setCursorPos(1,3)
  157. print("NEW BOOT SCRIPT UNDER DEVELOPMENT TO ALLOW MORE COMPLEX STARTS")
  158. print("RELEASE DATE IS ESTIMATED TO BE: October 3rd")
  159. print("the update should also come with a Update Handler, New Menu,")
  160. print("and Much Much More. once it is release, to download")
  161. print("Delete your setup file, and it should update your")
  162. print("Security check program, which will begin the update")
  163. sleep(9)
  164. if Update_2 == true then
  165. term.clear()
  166. term.setCursorPos(1,1)
  167. OSUPDATE()
  168. elseif settings.get("OS_LoginAfterBoot") == true then
  169. shell.run("ApertureOS_LoginManager")
  170. else
  171. shell.run("ApertureOS_Base")
  172. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement