PolskiWisnia

NextUI Setup

Feb 22nd, 2020 (edited)
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.46 KB | None | 0 0
  1. local function s(...) return sleep(...) end
  2. local function w(...) return write(...) end
  3. local function p(...) return print(...) 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. local a, b = term.getSize()
  21. function eng()
  22. tc()
  23. sbc(colors.blue)
  24. tc()
  25. sbc(colors.blue)
  26. stc(colors.white)
  27. scp(1,1)
  28. p("NextUI Setup")
  29. scp(1,2)
  30. p("Please choose install language.")
  31. scp(1,5)
  32. sbc(colors.white)
  33. stc(colors.black)
  34. p("X")
  35. sbc(colors.blue)
  36. stc(colors.white)
  37. scp(3,5)
  38. p("English")
  39. scp(1,7)
  40. sbc(colors.white)
  41. stc(colors.black)
  42. p(" ")
  43. sbc(colors.blue)
  44. stc(colors.white)
  45. scp(3,7)
  46. p("Polski")
  47. n = a-5
  48. scp(a-5,b)
  49. sbc(colors.white)
  50. stc(colors.black)
  51. w("Next")
  52. local event, click, x, y = os.pullEvent("mouse_click")
  53. if x>0 and x<10 and y == 7 then polski() end
  54. if x>n and x<a and y == b then installeng() end
  55. end
  56.  
  57. function polski()
  58. tc()
  59. sbc(colors.blue)
  60. tc()
  61. sbc(colors.blue)
  62. stc(colors.white)
  63. scp(1,1)
  64. p("NextUI Setup")
  65. scp(1,2)
  66. p("Wybierz jezyk instalacji.")
  67. scp(1,5)
  68. sbc(colors.white)
  69. stc(colors.black)
  70. p(" ")
  71. sbc(colors.blue)
  72. stc(colors.white)
  73. scp(3,5)
  74. p("English")
  75. scp(1,7)
  76. sbc(colors.white)
  77. stc(colors.black)
  78. p("X")
  79. sbc(colors.blue)
  80. stc(colors.white)
  81. scp(3,7)
  82. p("Polski")
  83. n = a-5
  84. scp(a-5,b)
  85. sbc(colors.white)
  86. stc(colors.black)
  87. w("Dalej")
  88.  
  89. local event, click, x, y = os.pullEvent("mouse_click")
  90. if x>0 and x<10 and y == 5 then eng() end
  91. if x>n and x<a and y == b then installpol() end
  92. end
  93.  
  94. function installeng()
  95. term.clear()
  96.    term.setCursorPos(1,1)
  97.    print("Installing. Please wait!")
  98.    shell.run("rm startup")
  99.    term.setCursorPos(1,17)
  100.    shell.run("pastebin get bCbsGEb4 startup")
  101.    shell.run("mkdir os")
  102.    term.setCursorPos(1,17)
  103.    shell.run("pastebin get ckkY48iL /os/.next")
  104.    term.setCursorPos(1,17)
  105.    shell.run("pastebin get u0urwgNc /os/.2048")
  106.    term.setCursorPos(1,17)
  107.    shell.run("pastebin get pzWSRqNF /os/.paint")
  108.    scp(1,17)
  109.    r("pastebin get FQtPJQMp /os/.pulpit")
  110.    term.setCursorPos(1,17)
  111.    r("pastebin get vyAZc6tJ /os/.luaide")
  112.    term.setCursorPos(1,17)
  113.    r("pastebin get 0uMxiriG /os/.kol")
  114.    term.setCursorPos(1,17)
  115.    r("pastebin get ZV1RFXwz /os/.ver")
  116.    term.setCursorPos(1,17)
  117.    r("pastebin get NVzDaz4M /os/icon")
  118.    scp(1,17)
  119.    r("pastebin get tiegKUtg /os/.update")
  120.    os.setComputerLabel("NextUI PC")
  121. tc()
  122. sbc(colors.blue)
  123. tc()
  124. sbc(colors.blue)
  125. scp(1,1)
  126. stc(colors.white)
  127. p("NextUI Setup")
  128. p("Setup finished installing NextUI on your computer. Rebooting in 5 seconds...")
  129. s(5)
  130. re()
  131. end
  132.  
  133. function installpol()
  134.    term.clear()
  135.    term.setCursorPos(1,1)
  136.    print("Instaluje....")
  137.    scp(1,3)
  138.    p("NextUI z SecuredBoot 1.0")
  139.    p("Najnowsza wersja NextUI zawiera w sobie technologie SecuredBoot, ktora uniemozliwia nadpisanie partycji UEFI poprzez spreparowana dyskietke.")
  140.    s(3)
  141.    term.setCursorPos(20,19)
  142.    write("/startup")
  143.    shell.run("rm startup")
  144.    term.setCursorPos(1,17)
  145.    shell.run("pastebin get bCbsGEb4 startup")
  146.    term.setCursorPos(20,19)
  147.    write("/os/")
  148.    shell.run("mkdir os")
  149.    term.setCursorPos(20,19)
  150.    write("/os/.menu")
  151.    term.setCursorPos(1,17)
  152.    shell.run("pastebin get xagX33Z7 /os/.next")
  153.    term.setCursorPos(20,19)
  154.    write("/os/.2048")
  155.    tc()
  156.    scp(1,3)
  157.    p("NextUI i DynRes")
  158.    p("NextUI wprowadza dynamiczna rozdzielczosc DynRes, czyli nie musisz sie juz martwic, czy Twoj monitor bedzie mial odpowiednie wymiary, aby byl w pelni wykorzystany przez NextUI.")
  159.    s(3)
  160.    term.setCursorPos(1,17)
  161.    shell.run("pastebin get u0urwgNc /os/.2048")
  162.    term.setCursorPos(20,19)
  163.    write("/os/.paint")
  164.    term.setCursorPos(1,17)
  165.    shell.run("pastebin get pzWSRqNF /os/.paint")
  166.    scp(1,17)
  167.    shell.run("pastebin get FQtPJQMp /os/.pulpit")
  168.    term.setCursorPos(20,19)
  169.    write("/os/.luaide")
  170.    term.setCursorPos(1,17)
  171.    shell.run("pastebin get vyAZc6tJ /os/.luaide")
  172.    tc()
  173.    scp(1,3)
  174.    p("NextUI i NextStore 2.0")
  175.    p("Brakuje Ci jakies aplikacji? Wejdz do NextStore 2.0 i znajdz to czego potrzebujesz!")
  176.    s(3)
  177.    r("pastebin get hckriUmW /os/.jez")
  178.    r("pastebin get 0uMxiriG /os/.kol")
  179.    term.setCursorPos(1,17)
  180.    shell.run("pastebin get ZV1RFXwz /os/.ver")
  181.    term.clear()
  182.    term.setCursorPos(20,19)
  183.    write("/os/icon")
  184.    term.setCursorPos(1,17)
  185.    r("pastebin get NVzDaz4M /os/icon")
  186.    r("set shell.allow_disk_startup false")
  187.    scp(1,17)
  188.    r("pastebin get FnE3MAD5 /os/.update")
  189. tc()
  190. sbc(colors.blue)
  191. tc()
  192. sbc(colors.blue)
  193. scp(1,1)
  194. stc(colors.white)
  195. tc()
  196. scp(1,1)
  197. p("NextUI Setup")
  198. p("Instalator NextUI zakonczyl instalacje glownych plikow systemowych. Komputer uruchomi sie ponownie za 5 sekund.")
  199. s(5)
  200. re()
  201. end
  202.  
  203. while true do
  204. eng()
  205. end
Add Comment
Please, Sign In to add comment