Advertisement
Marlingaming

System Display Installer

Mar 29th, 2022 (edited)
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.92 KB | None | 0 0
  1. local tArg = {...}
  2.  
  3.  
  4. local Keys = {}
  5. local UserKeys = {}
  6. local KeyId = 1000
  7.  
  8. local ReqFolders = {"os","os/UI","os/UI/Icons","os/UI/DesktopIcons","os/Desktop_Shortcuts","os/Handlers","os/System","os/System/Tools","os/System/Programs","os/System/Users","os/System/Users/Guest","os/Files","os/Files/Banking","os/Files/Logs","startup","boot","boot/files"}
  9. local ReqFiles = {{"Dj6AY1JW","startup/bootA.lua",false},{"AYCR8qRN","startup/AliasManager.lua",false},{"KFcXABJa","os/System/Tools/App.lua",false},{"C3Un6Mmn","os/System/Tools/Sec.lua",falsw},{"QMcGUYAC","os/Handlers/GraphicsHandler.lua",false},{"pvXZ6DW8","os/Handlers/PocketDesktop.lua",false},{"kK7z4g08","os/Handlers/NetworkReceiver.lua",false},{"Ep9RSq9f","os/System/Programs/DirectTransmitter.lua",false},{"8kDwdcJU","os/System/Programs/SettingsApp.lua",false},{"Z6P5R0Gs","os/System/Tools/fsAdv.lua",false},{"WVxS8wgb","boot/APIloader.lua",false},{"H5XDHTgv","os/System/Programs/VideoPlayer.lua",false},{"MGLhj3mf","os/Handlers/ProcessManager.lua",false},{"WR2j5itY","os/System/Programs/PocketMaps.lua",false},{"ajSm80J7","os/System/Programs/BankingApp.lua",false},{"fW1YyvYj","os/System/Programs/Help.lua",false}}
  10. local ReqDeskShortcuts = {{"Settings.lnk","os/System/Programs/SettingsApp.lua","Settings","os/UI/DesktopIcons/SettingsIcon.nfp"},{"Help.lnk","os/System/Programs/Help.lua","Help","os/UI/DesktopIcons/Default5x4Icon.nfp"},{"PMaps.lnk","os/System/Programs/PocketMaps.lua","PMaps","os/UI/DesktopIcons/Default5x4Icon.nfp"},{"Banking.lnk","os/System/Programs/BankingApp.lua","Banking","os/UI/DesktopIcons/Default5x4Icon.nfp"}}
  11.  
  12. local ImageDownloadCode = ""
  13.  
  14. function SetupFolders()
  15. for i = 1, #ReqFolders do
  16.     fs.makeDir(ReqFolders[i])
  17. end
  18. end
  19.  
  20. function DownloadFiles()
  21. for i = 1, #ReqFiles do
  22.     shell.run("pastebin","get",ReqFiles[i][1],ReqFiles[i][2])
  23.     CreateKey(ReqFiles[i][2],ReqFiles[i][3])
  24. end
  25. end
  26.  
  27. function SetupDeskShortcuts()
  28. for i = 1, #ReqDeskShortcuts do
  29.     local file = fs.open(fs.combine("os/Desktop_Shortcuts",ReqDeskShortcuts[i][1]),"w")
  30.     file.writeLine(ReqDeskShortcuts[i][2])
  31.     file.writeLine(ReqDeskShortcuts[i][3])
  32.     file.writeLine(ReqDeskShortcuts[i][4])
  33.     file.close()
  34.     CreateKey(fs.combine("os/Desktop_Shortcuts",ReqDeskShortcuts[i][1]),true)
  35. end
  36. end
  37.  
  38. function CreateKey(file,Access)
  39. Keys[#Keys + 1] = {file,KeyId}
  40. if Access == true then UserKeys[#UserKeys + 1] = KeyId end
  41. KeyId = KeyId + 1
  42.  
  43. end
  44.  
  45. local w, h = term.getSize()
  46. SetupFolders()
  47. DownloadFiles()
  48. SetupDeskShortcuts()
  49. local Line = "9b"
  50.  
  51. for I = 1, w/2 do
  52.     Line = Line.."9b"
  53. end
  54.  
  55. local D1 = fs.open("os/UI/Dropdown_Back1.nfp","w")
  56. for i = 1, h do
  57.     D1.writeLine(Line)
  58. end
  59. D1.close()
  60. CreateKey("os/UI/Dropdown_Back1.nfp",false)
  61. local Guest = fs.open("os/System/Users/Guest/UserAccount.txt","w")
  62. Guest.writeLine("os/UI/Icons/UserDefaultPortrait.nfp")
  63. Guest.writeLine("n")
  64. Guest.writeLine(3)
  65. Guest.close()
  66.  
  67. CreateKey("os/System/Users/Guest/UserAccount.txt",false)
  68.  
  69.  
  70. local Im = fs.open("os/UI/DesktopIcons/Default5x4Icon.nfp","w")
  71. Im.writeLine("44f44")
  72. Im.writeLine("47774")
  73. Im.writeLine("47774")
  74. Im.writeLine("44e44")
  75. Im.close()
  76. CreateKey("os/UI/DesktopIcons/Default5x4Icon.nfp",false)
  77.  
  78. local SettIm = fs.open("os/UI/DesktopIcons/SettingsIcon.nfp","w")
  79. SettIm.writeLine(" 888 ")
  80. SettIm.writeLine("80778")
  81. SettIm.writeLine("87788")
  82. SettIm.writeLine(" 888 ")
  83. SettIm.close()
  84. CreateKey("os/UI/DesktopIcons/SettingsIcon.nfp",false)
  85.  
  86. local Prof = fs.open("os/UI/Icons/UserDefaultPortrait.nfp","w")
  87. Prof.writeLine("  444  ")
  88. Prof.writeLine("  747  ")
  89. Prof.writeLine("  111  ")
  90. Prof.writeLine("bbbbbbb")
  91. Prof.writeLine("bbbbbbb")
  92. Prof.close()
  93.  
  94. CreateKey("os/UI/Icons/UserDefaultPortrait.nfp",false)
  95.  
  96.  
  97. shell.run("pastebin","get","GSu8X8k0","os/UI/Desk_Back1.nfp")
  98.  
  99. CreateKey("os/UI/Desk_Back1.nfp",false)
  100.  
  101. shell.run("pastebin","get","KEAf1kWP","os/UI/Dropdown_Back2.nfp")
  102.  
  103. CreateKey("os/UI/Dropdown_Back2.nfp",false)
  104.  
  105. shell.run("pastebin","get","aKwyx4NP","os/UI/Desk_Back2.nfp")
  106.  
  107. CreateKey("os/UI/Desk_Back2.nfp",false)
  108.  
  109.  
  110.  
  111. shell.run("pastebin","get","MGaLDnkP","os/BootCompletion.vid")
  112.  
  113. CreateKey("os/BootCompletion.vid",true)
  114.  
  115.  
  116.  
  117. local Proto = fs.open("os/Files/ProgramNetworkProtocols.txt","w")
  118. Proto.writeLine("os/System/Alerts.lua = 5656")
  119. Proto.close()
  120.  
  121. CreateKey("os/Files/ProgramNetworkProtocols.txt",false)
  122.  
  123. local Dir = fs.open("os/Directorys.txt","w")
  124. Dir.writeLine("rom/boot")
  125. Dir.writeLine("os/settings.txt")
  126. Dir.writeLine("boot/files/apis.txt")
  127. Dir.writeLine("os/System/Tools")
  128. Dir.writeLine("os/Desktop_Shortcuts")
  129. Dir.close()
  130.  
  131. CreateKey("os/Directorys.txt",false)
  132.  
  133. local Info = fs.open("os/systemCertificate.txt","w")
  134. Info.writeLine("1.0.0")
  135. Info.writeLine(os.getComputerID())
  136. Info.writeLine(os.date("1"))
  137. Info.writeLine("Base")
  138.  
  139. Info.close()
  140.  
  141. CreateKey("os/SystemCertificate.txt",false)
  142.  
  143. settings.load("os/settings.txt")
  144. settings.clear()
  145. settings.set("screen_maxHeight",26)
  146. settings.set("screen_desktop_background","os/UI/Desk_Back2.nfp")
  147. settings.set("screen_dropdown_background","os/UI/Dropdown_Back2.nfp")
  148. settings.set("os_activated",false)
  149. settings.set("active_user","Guest")
  150.  
  151. CreateKey("os/settings.txt",false)
  152. if tArg[1] ~= nil then
  153.     local User = fs.open(fs.combine("os/System/Users",tArg[1],"UserAccount.txt"),"w")
  154.     User.writeLine("os/UI/Icons/UserDefaultPortrait.nfp")
  155.     User.writeLine("n")
  156.     User.writeLine(2)
  157.     User.close()
  158. end
  159. settings.save("os/settings.txt")
  160.  
  161. shell.run("startup/AliasManager.lua","setup")
  162. shell.run("startup/AliasManager.lua","add","os/System/Programs/VideoPlayer.lua","Player")
  163.  
  164. shell.run("startup/AliasManager.lua","add","os/Handlers/ProcessManager.lua","System")
  165. shell.run("boot/APIloader.lua","setup")
  166.  
  167. local KeyFile = fs.open("os/Files/ProgramKeys.txt","w")
  168. KeyFile.write(textutils.serialize(Keys))
  169. KeyFile.close()
  170.  
  171. local UserKeyFile = fs.open("os/System/Users/Guest/UserKeys.txt","w")
  172. UserKeyFile.write(textutils.serialize(UserKeys))
  173. UserKeyFile.close()
  174.  
  175. os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement