PolskiWisnia

Project Hydra

Feb 22nd, 2020 (edited)
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 10.68 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. w,h = term.getSize()
  21.  
  22.  
  23. function obraz()
  24. tc()
  25. sbc(colors.black)
  26. tc()
  27. sbc(colors.black)
  28. pfb(1,1,w,1,colors.blue)
  29. scp(1,1)
  30. stc(colors.white)
  31. p("Microcraft HydraUI 1.0")
  32. scp(1,2)
  33. sbc(colors.black)
  34. p("Aplikacje      ")
  35. p("Gry            ")
  36. p("Ustawienia     ")
  37. p("Appki nextStore")
  38. p("nextStore      ")
  39. pfb(16,2,16,h,colors.blue)
  40. pdp(w-1,h,colors.orange)
  41. pdp(w,h,colors.red)
  42. end
  43.  
  44.  
  45. function mysz()
  46. local event, click, x, y = os.pullEvent("mouse_click")
  47. stc(colors.white)
  48. if x>0 and x<15 and y == 2 then apps() end
  49. if x>0 and x<15 and y == 3 then apps1() end
  50. if x>0 and x<15 and y == 4 then nust() end
  51. if x>0 and x<15 and y == 5 then app() end
  52. if x>0 and x<15 and y == 6 then nextstore() end
  53. if x == w and y == h then su() end
  54. if x == w-1 and y == h then re() end
  55. end
  56.  
  57. function bsodf()
  58. tc()
  59. sbc(colors.blue)
  60. tc()
  61. sbc(colors.blue)
  62. stc(colors.white)
  63. ac = w/2
  64. scp(ac,5)
  65. sbc(colors.white)
  66. stc(colors.blue)
  67. p("NextUI")
  68. sbc(colors.blue)
  69. stc(colors.white)
  70. scp(1,6)
  71. p("Microcraft MineCore napotkal blad i musial zostac zatrzymany. Jesli widzisz ten ekran po raz pierwszy, uruchom ponownie komputer, jednak jesli bedzie sie powtarzal mozliwe, ze konieczna bedzie naprawa systemu NextUI. Skontaktuj sie w tym celu z przedstawicielem Microcraft po wiecej informacji.")
  72. p("Kod bledu: 0x302525503149")
  73. p("Nazwa bledu: APP_MSNG")
  74. kod = "0x302525503149"
  75. nazwa = "APP_MSNG"
  76. p("Zapisywanie kodu, i nazwy bledu w pliku /os/bsod/.bsod")
  77. local a = fs.open("/os/bsod/.bsod", "w")
  78. a.writeLine(kod)
  79. a.writeLine(nazwa)
  80. a.close()
  81. p("Twoj komputer uruchomi sie ponownie za 10 sekund")
  82. s(10)
  83. re()
  84. end
  85.  
  86. function apps()
  87. pfb(18,3,20,5,colors.orange)
  88. scp(18,6)
  89. sbc(colors.black)
  90. stc(colors.white)
  91. p("LuaIDE")
  92. pfb(25,3,27,5,colors.green)
  93. scp(25,6)
  94. sbc(colors.black)
  95. stc(colors.white)
  96. p("Paint")
  97. local event, click, x, y = os.pullEvent("mouse_click")
  98. if x == w and y == 1 then system() end
  99. if x>17 and x<24 and y>2 and y<7 then r("/os/.luaide") obraz() end
  100. if x>24 and x<30 and y>2 and y<7 then r("/os/.paint") obraz() end
  101. end
  102.  
  103. function apps1()
  104. pfb(18,3,20,5,colors.cyan)
  105. scp(18,6)
  106. sbc(colors.black)
  107. stc(colors.white)
  108. p("2048")
  109. pfb(25,3,27,5,colors.blue)
  110. scp(25,6)
  111. sbc(colors.black)
  112. stc(colors.white)
  113. p("Snake")
  114. local event, click, x, y = os.pullEvent("mouse_click")
  115. if x == w and y == 1 then system() end
  116. if x>17 and x<24 and y>2 and y<7 then r("/os/.2048") obraz() end
  117. if x>24 and x<30 and y>2 and y<7 then r("worm") obraz() end
  118. end
  119.  
  120. function nextstore()
  121. while true do
  122. sbc(colors.black)
  123. tc()
  124. sbc(colors.black)
  125. pdp(w,h,colors.red)
  126. pdp(w-1,h,colors.orange)
  127. pfb(1,1,w,1,colors.blue)
  128. scp(1,1)
  129. stc(colors.white)
  130. p("nextStore 2.0")
  131. stc(colors.white)
  132. pdp(w,1, colors.red)
  133. stc(colors.white)
  134. sbc(colors.black)
  135. stc(colors.white)
  136. scp(1,2)
  137. p("Eksplorator")
  138. p("DGStatistics")
  139. p("ReactorControl")
  140. p("Message")
  141. scp(1,h-1)
  142. local event, click, x, y = os.pullEvent("mouse_click")
  143. if x>0 and x<16 and y == 2 then ep() end
  144. if x>0 and x<16 and y == 3 then dg() end
  145. if x>0 and x<16 and y == 4 then rc() end
  146. if x>0 and x<16 and y == 5 then co() end
  147. if x == w and y == 1 then system() end
  148. pdp(w,1, colors.red)
  149. end
  150. end
  151.  
  152. function ep()
  153. scp(16,2)
  154. sbc(colors.black)
  155. stc(colors.white)
  156. p("Eksplorator dla NextUI to potezne")
  157. scp(16,3)
  158. p("a zarazem proste narzedzie do")
  159. scp(16,4)
  160. p("przegladania zawartosci dysku")
  161. scp(16,5)
  162. p("twardego. Pobierz za darmo dzisiaj!")
  163. scp(16,10)
  164. p("Wydawca: Microcraft")
  165. pfb(16, h, w, h, colors.blue)
  166. scp(16,h)
  167. write("Aplikacja nie jest jeszcze dostepna")
  168. local event, click, x, y = os.pullEvent("mouse_click")
  169. end
  170.  
  171.  
  172. function rc()
  173. scp(16,2)
  174. sbc(colors.black)
  175. stc(colors.white)
  176. p("ReactorControl to aplikacja,")
  177. scp(16,3)
  178. p("stworzona dla latwiejszej")
  179. scp(16,4)
  180. p("kontroli reaktorow z modyfikacji")
  181. scp(16,5)
  182. p("do Minecraft nazwanej BigReactors.")
  183. scp(16,10)
  184. p("Wydawca: Microcraft")
  185. pfb(16, h, w, h, colors.blue)
  186. scp(16,h)
  187. write("Aplikacja nie jest jeszcze dostepna")
  188. local event, click, x, y = os.pullEvent("mouse_click")
  189. end
  190.  
  191. function dg()
  192. scp(16,2)
  193. sbc(colors.black)
  194. stc(colors.white)
  195. p("DGStatistics to aplikacja,")
  196. scp(16,3)
  197. p("stworzona we wspolpracy z ")
  198. scp(16,4)
  199. p("serwerem Darkness Grounds ")
  200. scp(16,5)
  201. p("pokazujaca statystyki broni")
  202. scp(16,6)
  203. p("Z ich autorskiej modyfikacji!")
  204. scp(16,7)
  205. p("Pobierz juz dzis!")
  206. scp(16,10)
  207. p("Wydawca: Microcraft;DG")
  208. pfb(16, h, w, h, colors.blue)
  209. scp(16,h)
  210. if fs.exists("/nshop/.dg") then
  211.  scp(16,h)
  212.  sbc(colors.blue)
  213.  stc(colors.white)
  214.  write("Usun      Uruchom")
  215.  local event, click, x, y = os.pullEvent("mouse_click")
  216.  if x>15 and x<21 and y == h then fs.delete("/nshop/.dg") end
  217.  if x>25 and x<34 and y == h then r("/nshop/.dg") end
  218. else
  219.  scp(30,h)
  220.  write("Pobierz")
  221.  local event, click, x, y = os.pullEvent("mouse_click")
  222.  if x>29 and x<40 and y == h then
  223.   r("pastebin get qRNinxW4 /nshop/.dg")
  224.  end
  225. end
  226. end
  227.  
  228. function co()
  229. scp(16,2)
  230. sbc(colors.black)
  231. stc(colors.white)
  232. p("Microcraft Message to")
  233. scp(16,3)
  234. p("aplikacja pozwalajaca na")
  235. scp(16,4)
  236. p("bezprzewodowa komunikacje")
  237. scp(16,5)
  238. p("graczy uzywajacych systemow")
  239. scp(16,6)
  240. p("Microcraft!")
  241. scp(16,7)
  242. p("Pobierz juz dzis!")
  243. scp(16,10)
  244. p("Wydawca: Microcraft")
  245. pfb(16, h, w, h, colors.blue)
  246. scp(16,h)
  247. if fs.exists("/nshop/.co") then
  248.  scp(16,h)
  249.  sbc(colors.blue)
  250.  stc(colors.white)
  251.  write("Usun      Uruchom")
  252.  local event, click, x, y = os.pullEvent("mouse_click")
  253.  if x>15 and x<21 and y == h then fs.delete("/nshop/.co") end
  254.  if x>25 and x<34 and y == h then r("/nshop/.co") end
  255. else
  256.  scp(30,h)
  257.  write("Pobierz")
  258.  local event, click, x, y = os.pullEvent("mouse_click")
  259.  if x>29 and x<40 and y == h then
  260.   r("pastebin get uzZarCdG /nshop/.co")
  261.  end
  262. end
  263. end
  264.  
  265. function app()
  266. while true do
  267. sbc(colors.black)
  268. tc()
  269. sbc(colors.black)
  270. pfb(1, 1, w, 1, colors.blue)
  271. pdp(w,h,colors.red)
  272. pdp(w-1,h,colors.orange)
  273. sbc(colors.blue)
  274. scp(1,1)
  275. stc(colors.white)
  276. p("Aplikacje nextStore")
  277. pdp(w,1,colors.red)
  278.  
  279. if fs.exists("/nshop/.exp") then
  280. pfb(2, 4, 2, 6, colors.orange)
  281. pfb(3, 4, 3, 6, colors.yellow)
  282. pfb(4, 4, 4, 6, colors.red)
  283. scp(2,7)
  284. stc(colors.white)
  285.  sbc(colors.black)
  286. p("Eksplorator")
  287. end
  288.  
  289. if fs.exists("/nshop/.dg") then
  290.  pfb(15, 4, 15, 6, colors.gray)
  291.  pfb(16, 4, 16, 6, colors.gray)
  292.  pfb(17, 4, 17, 6, colors.lightGray)
  293.  pdp(16, 5, colors.lightGray)
  294.  pdp(17, 5, colors.gray)
  295.  stc(colors.white)
  296.  sbc(colors.black)
  297.  scp(15,7)
  298.  p("DGStatistics")
  299. end
  300.  
  301.  
  302. if fs.exists("/nshop/.co") then
  303.  pfb(2, 8, 4, 8, colors.blue)
  304.  pfb(2, 9, 4, 10, colors.cyan)
  305.  stc(colors.white)
  306.  sbc(colors.black)
  307.  scp(2,11)
  308.  p("Message")
  309. end
  310.  
  311. local event, button, x, y = os.pullEvent("mouse_click")
  312. if x>14 and x<18 and y>3 and y<7 and fs.exists("/nshop/.dg") and button == 1 then r("/nshop/.dg") end
  313. if x>1 and x<5 and y>7 and y<11 and fs.exists("/nshop/.calc") and button == 1 then r("/nshop/.co") end
  314. if x>14 and x<18 and y>3 and y<7 and fs.exists("/nshop/.dg") and button == 2 then fs.delete("/nshop/.dg") end
  315. if x>1 and x<5 and y>7 and y<11 and fs.exists("/nshop/.calc") and button == 2 then fs.delete("/nshop/.co") end
  316. if x == w and y == 1 then system() end
  317. if x == w and y == h then su() end
  318. if x == w-1 and y == h then re() end
  319.  
  320. end
  321. end
  322.  
  323. function nust()
  324. while true do
  325. sbc(colors.black)
  326. tc()
  327. sbc(colors.black)
  328. pdp(w-1,h, colors.red)
  329. pdp(w,h, colors.orange)
  330. pfb(1, 1, w, 1, colors.blue)
  331. scp(1,1)
  332. p("Ustawienia HydraUI")
  333. pdp(w,1, colors.red)
  334. pfb(3, 4, 13, 6, colors.orange)
  335. scp(3,5)
  336. stc(colors.white)
  337. p("Informacje")
  338. pfb(15, 4, 25, 6, colors.green)
  339. scp(15,5)
  340. stc(colors.white)
  341. p("Ustawienia")
  342. local event, click, x, y = os.pullEvent("mouse_click")
  343. if x == w and y == 1 then system() end
  344. if x>0 and x<6 and y == h then start() end
  345. if x>2 and x<14 and y>3 and y<7 then infust() end
  346. if x>14 and x<26 and y>3 and y<7 then setust() end
  347. end
  348. end
  349.  
  350. function setust()
  351. while true do
  352. sbc(colors.black)
  353. tc()
  354. sbc(colors.black)
  355. pfb(1, 1, w, 1, colors.blue)
  356. scp(1,1)
  357. stc(colors.white)
  358. p("Ustawienia HydraUI")
  359. pdp(w,1, colors.red)
  360. sbc(colors.black)
  361. p("Zmien nazwe komputera")
  362. p("Aktualizuj system")
  363. local event, click, x, y = os.pullEvent("mouse_click")
  364. if x>0 and x<20 and y == 2 then
  365.  scp(1,2)
  366.   write("Wpisz nowa nazwe: ")
  367.   nazwa = read()
  368.   os.setComputerLabel(nazwa)
  369.   setust()
  370. end
  371. if x>0 and x<20 and y == 3 then r("pastebin run Jau0aFS0") end
  372. if x == w and y == 1 then nust() end
  373. end
  374. end
  375.  
  376. function infust()
  377. while true do
  378. sbc(colors.black)
  379. tc()
  380. sbc(colors.black)
  381. pfb(1, 1, w, 1, colors.blue)
  382. scp(1,1)
  383. stc(colors.white)
  384. p("Ustawienia NextUI")
  385. pdp(w,1, colors.red)
  386. sbc(colors.black)
  387. scp(1,2)
  388. p("Microcraft HydraUI")
  389. p("Wersja systemu: 1.0")
  390. p("Obecna nazwa komputera: ", os.getComputerLabel())
  391. p("Rozdzielczosc ekranu: ", w, h)
  392. p("Wersja CraftOS: ", os.version())
  393. if fse("/nextpc/.nextpc") then
  394.  local num = fs.open("/nextpc/.nextpc", "r")
  395.  numerseryjny = num.readLine()
  396.  num.close()
  397.  p("Microcraft NextPC Basic")
  398.  p("Ten system zostal aktywowany przez: Microcraft.")
  399.  p("Numer seryjny urzadzenia:")
  400.  p(numerseryjny)
  401. elseif fse("/hydrapc/.info") then
  402.  local num = fs.open("/hydrapc/.info", "r")
  403.  numerseryjny = num.readLine()
  404.  num.close()
  405.  local pro = fs.open("/hydrapc/.manufact", "r")
  406.  producent = pro.readLine()
  407.  pro.close()
  408.  p("NextPC compatible computer")
  409.  if fse("/hydrapc/.wer") then p("Ten system zostal aktywowany przez: Microcraft Software.") else p("Ten system nie zostal jeszcze zweryfikowany. Skontaktuj sie z Microcraft, aby dokonac weryfikacji.") end
  410.  p("Numer seryjny urzadzenia:")
  411.  p(numerseryjny)
  412.  p("Producent komputera:")
  413.  p(producent)
  414. end
  415. local event, click, x, y = os.pullEvent("mouse_click")
  416. if x == w and y == 1 then nust() end
  417. end
  418. end
  419.  
  420.  
  421.  
  422.  
  423.  
  424. function system()
  425. while true do
  426. tc()
  427. obraz()
  428. mysz()
  429. end
  430. end
  431.  
  432.  
  433. system()
Add Comment
Please, Sign In to add comment