Advertisement
PolskiWisnia

NextUI 2.0 Repair

Mar 30th, 2023 (edited)
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.46 KB | None | 0 0
  1. local function aw(...) return write(...) end
  2. local function p(...) return print(...) end
  3. local function s(...) return sleep(...) end
  4. local function tw(...) return term.write(...) end
  5. local function scp(...) return term.setCursorPos(...) end
  6. local function sbc(...) return term.setBackgroundColor(...) end
  7. local function stc(...) return term.setTextColor(...) end
  8. local function tc(...) return term.clear(...) end
  9. local function tcl(...) return term.clearLine(...) end
  10. local function r(...) return shell.run(...) end
  11. local function sp(...) return textutils.slowPrint(...) end
  12. local function sw(...) return textutils.slowWrite(...) end
  13. local function fse(...) return fs.exists(...) end
  14. local function pul(...) return paintutils.loadImage(...) end
  15. local function pud(...) return paintutils.drawImage(...) end
  16. local function pfb(...) return paintutils.drawFilledBox(...) end
  17. local function su(...) return os.shutdown(...) end
  18. local function re(...) return os.reboot(...) end
  19. local function pdp(...) return paintutils.drawPixel(...) end
  20.  
  21. local w, h = term.getSize()
  22.  
  23. function download(plik)
  24.     if plik == "/os/main/explorer" then
  25.          r("pastebin get za0ck7T5 /os/main/explorer")
  26.     end
  27.     if plik == "/os/main/menu" then
  28.         r("pastebin get R0RDz6eh /os/main/menu")
  29.     end
  30.     if plik == "/startup" then
  31.         r("pastebin get MwpLq4JP /startup")
  32.     end
  33.     if plik == "/User" then
  34.         fs.makeDir("/User")
  35.     end
  36.     if plik == "/os/2048" then
  37.          r("pastebin get u0urwgNc /os/2048")
  38.     end
  39.     if plik == "/os/icon" then
  40.          r("pastebin get NVzDaz4M /os/icon")  
  41.     end
  42.     if plik == "/os/luaide" then
  43.          r("pastebin get vyAZc6tJ /os/luaide")
  44.     end
  45. end      
  46.  
  47. function repair()
  48. local files = {"/os/2048", "/os/icon", "/os/main/explorer", "/os/main/menu", "/os/luaide", "/User", "/startup"}
  49.     for i,file in ipairs(files) do
  50.         if not fse(file) then
  51.          download(file)
  52.         end
  53.     end
  54.                        
  55. end
  56.    
  57. function boot()
  58.     scp(1,1)
  59.     sbc(colors.cyan)
  60.     tc()
  61.     sbc(colors.cyan)
  62.     stc(colors.white)
  63.     p[[NextUI 2.0 Repair Program
  64. System NextUI wykryl brak kluczowych plikow systemowych. Podjeta zostanie proba naprawy systemu. Nie wylaczaj komputera do zakonczenia procesu.]]
  65.     s(1)
  66.     sbc(colors.gray)
  67.     textutils.slowPrint("Trwa weryfikowanie spojnosci NextUI....")
  68.     sbc(colors.cyan)
  69.     repair()
  70.     s(2)
  71.     p("Ukonczono naprawe NextUI! Ponowne uruchamianie....")
  72.     s(1)
  73.     re()
  74. end
  75. boot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement