View difference between Paste ID: gF0gWx7i and vpd1c8JY
SHOW: | | - or go back to the newest paste.
1
--setup file
2
--this file downloads all required assets, then reboots the computer
3
--this program is for Minecraft 1.16.5, CC Tweaked
4-
local SetFile = fs.open("Setup_Config","r")
4+
local Version = nil
5-
local Version = SetFile.readLine(1)
5+
local Package = nil
6-
local Package = SetFile.readLine(2)
6+
if fs.exists("Setup_Config") == false or fs.exists("Setup_Config") == nil then
7-
local Update_2 = false
7+
  local Config = fs.open("Setup_Config","w")
8-
SetFile.close()
8+
  Config.writeLine("1.0")
9-
shell.run("pastebin","get","DgmEm05E","Temp_LatestVersion")
9+
  Config.writeLine("Civilian")
10-
local VERSION = fs.open("Temp_LatestVersion","r")
10+
  Config.close()
11-
if VERSION.readLine(1) == "2.0" then
11+
12-
  Update_2 = true
12+
  local SetFile = fs.open("Setup_Config","r")
13
  Version = SetFile.readLine(1)
14-
VERSION.close()
14+
  Package = SetFile.readLine(2)
15-
fs.delete("Temp_LatestVersion")
15+
  SetFile.close()
16
end
17-
function ContinueSetup()
17+
18
shell.run("pastebin","get","aqSRKnMF","ApertureOS_Downloader")
19
shell.run("pastebin","run","29pEstTF") --creates folders for system
20
sleep(3)
21-
shell.run("pastebin","get","PnjkfYyW","ApertureOS_Boot")
21+
shell.run("ApertureOS_Downloader","ApertureOS_Boot","SystemBoot","PnjkfYyW","OS",true)
22-
shell.run("pastebin","get","Fujaq0uU","ApertureOS_SecurityCheck")
22+
sleep(2)
23-
shell.run("pastebin","get","pJANakKB","AppPrompt_AppNotFound")
23+
shell.run("ApertureOS_Downloader","ApertureOS_SecurityCheck","SystemBoot","Fujaq0uU","OS",true)
24-
shell.run("pastebin","get","XumN3cdF","SystemSettings")
24+
sleep(2)
25-
shell.run("pastebin","get","PnjkfYyW","ApertureOS_Boot")
25+
shell.run("ApertureOS_Downloader","AppPrompt_AppNotFound","Programs","pJANakKB","OS",true)
26
sleep(2)
27-
  shell.run("pastebin","startup","xByKNAZS","OS")
27+
shell.run("ApertureOS_Downloader","SystemSettings","Files","XumN3cdF","File",true)
28
sleep(2)
29
30
if fs.exists("startup") == false then
31
  shell.run("ApertureOS_Downloader","startup","SystemBoot","xByKNAZS","OS",true)
32
end
33
if fs.exists("OSSettings") == false then
34
  local OSSet = fs.open("OSSettings","w")
35
  OSSet.writeLine("OS Version")
36-
  shell.run("pastebin","get","XumN3cdF",".settings")
36+
37
  OSSet.writeLine("Package")
38
  OSSet.writeLine(Package)
39
  OSSet.close()
40
  shell.run("ApertureOS_Downloader","OSSettings","Files","n","Files",true)
41
  shell.run("ApertureOS_Downloader",".settings","Files","XumN3cdF","Files",true)
42
end
43
local file = fs.open("OS_Certificate","w")
44
file.writeLine("APERTURE OS DOWNLOAD CERTIFICATE")
45
file.writeLine("VERSION DOWNLOADED")
46
file.writeLine(Version)
47-
shell.run("pastebin","get","kvzCYtv5","AppList")
47+
48
file.writeLine(os.date())
49-
os.reboot()
49+
50
file.writeLine(Package)
51
file.close()
52-
if Update_2 == true then
52+
shell.run("ApertureOS_Downloader","OS_Certificate","Files","n","Files",true)
53-
  shell.run("pastebin","run","H4QAKJGf") --runs dedicated online updater for the 2.0 update
53+
shell.run("ApertureOS_Downloader","AppList","Files","kvzCYtv5","Files",true)
54
sleep(3)
55-
  ContinueSetup()
55+
os.reboot()