Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- --Aperture OS Startup
- --this program handles the starting of the Base Aperture OS
- --this program is for Minecraft 1.16.5, CC Tweaked
- settings.load("SystemSettings")
- local Version = nil
- local w, h = term.getSize()
- local V = fs.open("OSSettings","r")
- local Update_2 = false
- Version = V.readLine(2)
- V.close()
- local Graphics = 0
- shell.run("C_Pastebin","get","DgmEm05E","Temp_LatestVersion")
- local LV = fs.open("Temp_LatestVersion","r")
- if LV.readLine(1) == "2.0" then
- Update_2 = true
- end
- LV.close()
- fs.delete("Temp_LatestVersion")
- function CenterText(y,text)
- local x = math.floor((w - string.len(text)) /2)
- term.setCursorPos(x,y)
- term.clearLine()
- term.write(text)
- end
- function SlowCenterText(y,text)
- local x = math.floor((w - string.len(text)) /2)
- term.setCursorPos(x,y)
- term.clearLine()
- textutils.slowWrite(text)
- end
- function ApertureLogo_1()
- term.clear()
- CenterText(1,"`.--:::::--.`")
- CenterText(2,".::.-+ssssssssssoo+ ``")
- CenterText(3,"-/oosso+-.:+ssssssssss.-o/-")
- CenterText(4,"`:oosssssssso/-.:osssssss: osoo:`")
- CenterText(5,"-osssssssssssssoo:../osssso /sssso-")
- CenterText(6,"/ossssoo++//:--.``` `-/oss.-ssssso/`")
- CenterText(7,"://:------. `-+: ossssss+`")
- CenterText(8,"-//++ooooo: ` /sssssso.")
- CenterText(9,"-sssssssso- -sssss+.:-")
- CenterText(10,"+sssssss/` osso:.+s+")
- CenterText(11,"sssssso: /so--osss`")
- CenterText(12,"`sssss+.-. -/.:ossss.")
- CenterText(13,"`ssso/./o/ .+ssssss`")
- CenterText(14,"+so-.+sso` -ossssss+")
- CenterText(15,"-+.-ossss- `/osssssss-")
- CenterText(16,"`/osssss+ .+ssooooo+/")
- CenterText(17,"+sssssss`.:. .//::---::-")
- CenterText(18,"`/osssss:`os+:` ```.-::/++oosso/`")
- CenterText(19,"-osssso /ssss+:``-/+oossssssssssso-")
- CenterText(20,"`:osss.-sssssso+-.:+ossssssssso:`")
- CenterText(21,"-+o/ osssssssso+-.:oossso+-`")
- CenterText(22,"`- /oossssssssso/-.:/-`")
- CenterText(23,"`.-::///::-.`")
- SlowCenterText(24,"APERTURE OS SYSTEM")
- end
- function ApertureLogo_2()
- term.clear()
- paintutils.drawFilledBox(3,10,w-3,3+(w-3),colors.gray)
- paintutils.drawFilledBox(8,15,w-8,h-11,colors.black)
- end
- function OSUPDATE()
- print("OS UPDATE 2.0 IS NOW AVAILABLE!!!")
- print("PRESS R TO DOWNLOAD, OR C TO SKIP")
- while true do
- local event, key = os.pullEvent("key")
- if key == keys.r then
- term.clear()
- term.setCursorPos(1,1)
- SlowCenterText(1,"Starting Update.........")
- sleep(5)
- StartUpdate()
- break
- elseif key == keys.c then
- term.clear()
- term.setCursorPos(1,1)
- SlowCenterText(1,"Skipping Update...")
- sleep(5)
- if settings.get("OS_LoginAfterBoot") == true then
- shell.run("ApertureOS_LoginManager")
- else
- shell.run("ApertureOS_Base")
- end
- break
- end
- end
- end
- function StartUpdate()
- SlowCenterText(2,"Deleting SecurityCheck.....")
- fs.delete("ApertureOS_SecurityCheck")
- SlowCenterText(3,"Deleting Setup.....")
- fs.delete("setup")
- SlowCenterText(4,"Deleting Base.....")
- fs.delete("ApertureOS_Base")
- SlowCenterText(5,"Deleting ClientConsole.....")
- fs.delete("ApertureOS_ClientConsole")
- SlowCenterText(6,"Checking for AppStore Installation.....")
- if fs.exists("ApertureDL_AppStore") == true then
- SlowCenterText(7,"Deleting App Store.....")
- fs.delete("ApertureDL_AppStore")
- fs.delete("ApertureDL_AppStore_Browser")
- fs.delete("ApertureDL_AppStore_StoreProfile")
- fs.delete("ApertureDL_AppStore_AppPage")
- else
- SlowCenterText(7,"AppStore not found.....")
- end
- CenterText(8,"All Base Files Deleted")
- sleep(1)
- CenterText(9,"Downloading new Setup File")
- shell.run("C_Pastebin","get","vpd1c8JY","setup")
- sleep(3)
- CenterText(10,"Done!")
- sleep(2)
- CenterText("Rebooting for update in 3 seconds...")
- sleep(5)
- os.reboot()
- end
- term.clear()
- term.setCursorPos(1,1)
- print("APERTURE OS BOOT SYSTEM")
- print("VERSION_"..Version)
- sleep(1)
- CenterText(3,"Running Security Check")
- SlowCenterText(4,"=========================")
- term.setCursorPos(1,5)
- shell.run("ApertureOS_SecurityCheck")
- sleep(1)
- term.setCursorPos(1,5)
- print("Security Check Done!")
- sleep(1)
- print("Completing Boot")
- SlowCenterText(8,"=========================")
- sleep(1)
- if Graphics == 0 then
- ApertureLogo_1()
- elseif Graphics == 1 then
- ApertureLogo_2()
- elseif Graphic == 2 then
- end
- sleep(10)
- term.clear()
- term.setCursorPos(1,1)
- print("Starting Main Program")
- CenterText(2,"///////////WARNING/////////////")
- term.setCursorPos(1,3)
- print("NEW BOOT SCRIPT UNDER DEVELOPMENT TO ALLOW MORE COMPLEX STARTS")
- print("RELEASE DATE IS ESTIMATED TO BE: October 3rd")
- print("the update should also come with a Update Handler, New Menu,")
- print("and Much Much More. once it is release, to download")
- print("Delete your setup file, and it should update your")
- print("Security check program, which will begin the update")
- sleep(9)
- if Update_2 == true then
- term.clear()
- term.setCursorPos(1,1)
- OSUPDATE()
- elseif settings.get("OS_LoginAfterBoot") == true then
- shell.run("ApertureOS_LoginManager")
- else
- shell.run("ApertureOS_Base")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement