PolskiWisnia

NextUI 1.8 ENG

Feb 26th, 2020
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 45.93 KB | None | 0 0
  1. local function s(...) return sleep(...) end
  2. local function aw(...) 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 w, h = term.getSize()
  21.  
  22. function bsodf()
  23. tc()
  24. sbc(colors.blue)
  25. tc()
  26. sbc(colors.blue)
  27. stc(colors.white)
  28. ac = w/2
  29. scp(ac-2,3)
  30. sbc(colors.white)
  31. stc(colors.blue)
  32. p("NextUI")
  33. sbc(colors.blue)
  34. stc(colors.white)
  35. scp(1,6)
  36. p("Microcraft MineCore encountered a fatal error and had to shutdown. If you see this screen for the first time reboot your computer, but if problem persists report it to Microcraft.")
  37. p("STOP Code: 0x302525503149")
  38. p("Error name: APP_MSNG")
  39. system = "NextUI"
  40. kernel = "MineCore"
  41. kod = "0x302525503149"
  42. nazwa = "APP_MSNG"
  43. p("Saving error details in /os/bsod/.bsod")
  44. local a = fs.open("/os/bsod/.bsod", "w")
  45. a.writeLine(system)
  46. a.writeLine(kernel)
  47. a.writeLine(kod)
  48. a.writeLine(nazwa)
  49. a.close()
  50. p("Your PC will reboot in 10 seconds")
  51. s(10)
  52. re()
  53. end
  54.  
  55. function logobraz()
  56. pfb(1, 1, w, 5, colors.blue)
  57. pfb(1, 6, w, h-5, colors.lightBlue)
  58. pfb(1, h-6, w, h, colors.blue)
  59. pfb(15, 7, 17, 9, colors.gray)
  60. scp(1,1)
  61. p("NextUI")
  62. p("Enter your password")
  63. end
  64.  
  65. function log()
  66. if pass == "" then system() else
  67. sbc(colors.lightBlue)
  68. stc(colors.white)
  69. scp(18,7)
  70. p(user)
  71. scp(18,8)
  72. write("")
  73. haslo = read()
  74. if haslo == pass then ok = 1 else scp(18,9) stc(colors.red) p("Bledne haslo") s(2) re() end
  75. end
  76. end
  77.  
  78. function pliki()
  79.  local u = fs.open("/os/.log1", "r")
  80.  user = u.readLine(1)
  81.  u.close()
  82.  local h = fs.open("/os/.log2", "r")
  83.  pass = h.readLine(1)
  84.  h.close()
  85. end
  86.  
  87. function logo()
  88. logobraz()
  89. pliki()
  90. log()
  91. end
  92.  
  93. function app()
  94. while true do
  95. if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black)  end
  96. tc()
  97. if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black)  end
  98. pfb(1, 1, w, 1, colors.blue)
  99. scp(1,1)
  100. stc(colors.white)
  101. p("Apps")
  102. pdp(w,1,colors.red)
  103. if fs.exists("/nshop/.exp") then
  104. pfb(2, 4, 2, 6, colors.orange)
  105. pfb(3, 4, 3, 6, colors.yellow)
  106. pfb(4, 4, 4, 6, colors.red)
  107. scp(2,7)
  108. stc(colors.white)
  109. if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black)  end
  110. p("Explorer")
  111. end
  112.  
  113. if fs.exists("/nshop/.dg") then
  114.  pfb(15, 4, 15, 6, colors.gray)
  115.  pfb(16, 4, 16, 6, colors.gray)
  116.  pfb(17, 4, 17, 6, colors.lightGray)
  117.  pdp(16, 5, colors.lightGray)
  118.  pdp(17, 5, colors.gray)
  119.  stc(colors.white)
  120. if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black)  end
  121.  scp(15,7)
  122.  p("DGStatistics")
  123. end
  124.  
  125.  
  126. if fs.exists("/nshop/.tm") then
  127.  pfb(28, 4, 30, 6, colors.gray)
  128.  pfb(28, 4, 30, 4, colors.lightGray)
  129.  pdp(29,5, colors.lightGray)
  130.  pdp(29,6, colors.lightGray)
  131.   stc(colors.white)
  132. if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black)  end
  133.  scp(28,7)
  134.  p("TimeMachine")
  135. end
  136.  
  137. if fs.exists("/nshop/.calc") then
  138.  pfb(2, 8, 4, 8, colors.blue)
  139.  pfb(2, 9, 4, 10, colors.cyan)
  140.  stc(colors.white)
  141.  if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr ==
  142.  "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then
  143.  sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr ==
  144.  "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then
  145.  sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr
  146.  == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr ==
  147.  "colors.white" then sbc(colors.white) stc(colors.black)  end
  148.  scp(2,11)
  149.  p("Calculator")
  150. end
  151.  
  152. if fse("/os/iko/.ico1") and fse("/os/iko/.ico1n") then
  153. local iko1 = fs.open("/os/iko/.ico1", "r")
  154. iko1p = iko1.readLine()
  155. iko1.close()
  156. local iko1n = fs.open("/os/iko/.ico1n", "r")
  157. iko1pn = iko1n.readLine()
  158. iko1n.close()
  159. pfb(2, h-6, 4, h-4, colors.purple)
  160. scp(2,h-3)
  161.  if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr ==
  162.  "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then
  163.  sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr ==
  164.  "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then
  165.  sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr
  166.  == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr ==
  167.  "colors.white" then sbc(colors.white) stc(colors.black)  end
  168. p(iko1pn)
  169. end
  170.  
  171. if fse("/os/iko/.ico2") and fse("/os/iko/.ico2n") then
  172. local iko2 = fs.open("/os/iko/.ico2", "r")
  173. iko2p = iko2.readLine()
  174. iko2.close()
  175. local iko2n = fs.open("/os/iko/.ico2n", "r")
  176. iko2pn = iko2n.readLine()
  177. iko2n.close()
  178. pfb(15, h-6, 17, h-4, colors.green)
  179. scp(15,h-3)
  180.  if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr ==
  181.  "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then
  182.  sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr ==
  183.  "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then
  184.  sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr
  185.  == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr ==
  186.  "colors.white" then sbc(colors.white) stc(colors.black)  end
  187. p(iko2pn)
  188. end
  189.  
  190. if fse("/os/iko/.ico3") and fse("/os/iko/.ico3n") then
  191. local iko3 = fs.open("/os/iko/.ico3", "r")
  192. iko3p = iko3.readLine()
  193. iko3.close()
  194. local iko3n = fs.open("/os/iko/.ico3n", "r")
  195. iko3pn = iko3n.readLine()
  196. iko3n.close()
  197. pfb(28, h-6, 30, h-4, colors.orange)
  198. scp(28,h-3)
  199.  if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr ==
  200.  "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then
  201.  sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr ==
  202.  "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then
  203.  sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr
  204.  == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr ==
  205.  "colors.white" then sbc(colors.white) stc(colors.black)  end
  206. p(iko3pn)
  207. end
  208.  
  209. local event, click, x, y = os.pullEvent("mouse_click")
  210. if x>1 and x<5 and y>3 and y<7 and fs.exists("/nshop/.exp") then r("/nshop/.exp") end
  211. if x>14 and x<18 and y>3 and y<7 and fs.exists("/nshop/.dg") then r("/nshop/.dg") end
  212. if x>27 and x<31 and y>3 and y<7 and fs.exists("/nshop/.tm") then r("/nshop/.tm") end
  213. if x>1 and x<5 and y>7 and y<11 and fs.exists("/nshop/.calc") then r("/nshop/.calc") end
  214. if x>1 and x<5 and y>h-7 and y<h-3 and fse("/os/iko/.ico1") and fse("/os/iko/.ico1n") then r(iko1p) end
  215. if x>14 and x<18 and y>h-7 and y<h-3 and fse("/os/iko/.ico2") and fse("/os/iko/.ico2n") then r(iko2p) end
  216. if x>27 and x<31 and y>h-7 and y<h-3 and fse("/os/iko/.ico3") and fse("/os/iko/.ico3n") then r(iko3p) end
  217. if x == w and y == 1 then system() end
  218.  
  219. end
  220. end
  221.  
  222. function apps()
  223. while true do
  224. sbc(colors.black)
  225. tc()
  226. sbc(colors.black)
  227. pfb(6, h, w, h, colors.blue)
  228. sbc(colors.green)
  229. stc(colors.white)
  230. scp(1,h)
  231. if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black)  end
  232. aw("Start")
  233. pfb(1, 1, w, 1, colors.blue)
  234. pdp(w, 1, colors.red)
  235. pdp(w-1, h, colors.red)
  236. pdp(w-1, h, colors.orange)
  237. scp(1,1)
  238. sbc(colors.blue)
  239. stc(colors.white)
  240. p("Apps management")
  241. pfb(3, 3, 5, 3, colors.gray)
  242. pdp(3, 3, colors.lightGray)
  243. scp(6,3)
  244. stc(colors.white)
  245. sbc(colors.black)
  246. miejsce = math.ceil(fs.getFreeSpace("/")/1024)
  247. p("Hard drive   Free space: ", miejsce, "KB")
  248. scp(1,6)
  249. p("Apps:")
  250. scp(6,8)
  251. stc(colors.white)
  252. sbc(colors.black)
  253. if fs.exists("/nshop/") then rozmiar = math.ceil(getSize("/nshop/")/1024) else
  254. scp(1,7) sbc(colors.black) stc(colors.white) p("Brak zainstalowanych aplikacji") end
  255. scp(1,5)
  256. p("Apps sizes: ", rozmiar, "KB")
  257. if fs.exists("/nshop/.exp") then pfb(3, 8, 5, 8, colors.blue) scp(6,8) stc(colors.white) sbc(colors.black) p("Eksplorator") scp(1,8) stc(colors.white) sbc(colors.red) p("X") end
  258. if fs.exists("/nshop/.dg") then pfb(3, 10, 5, 10, colors.gray) scp(6,10) stc(colors.white) sbc(colors.black) p("DGStatistics") scp(1,10) stc(colors.white) sbc(colors.red) p("X") end
  259. if fs.exists("/nshop/.tm") then pfb(3, 12, 5, 12, colors.green) scp(6,12) stc(colors.white) sbc(colors.black) p("TimeMachine") scp(1,12) stc(colors.white) sbc(colors.red) p("X") end
  260. if fs.exists("/nshop/.calc") then pfb(3, 14, 5, 14, colors.cyan) scp(6,14) stc(colors.white) sbc(colors.black) p("Kalkulator") scp(1, 14) stc(colors.white) sbc(colors.red) p("X") end
  261. local event, click, x, y = os.pullEvent("mouse_click")
  262. if x>0 and x<6 and y == h then start() end
  263. if x == 1 and y == 8 then fs.delete("/nshop/.exp") s(1)  end
  264. if x == 1 and y == 10 then fs.delete("/nshop/.dg") s(1)  end
  265. if x == 1 and y == 12 then fs.delete("/nshop/.tm") s(1)  end
  266. if x == 1 and y == 14 then fs.delete("/nshop/.calc") s(1) end
  267. if x == w and y == 1 then nust() end
  268. end
  269. end
  270.  
  271. function calc()
  272. scp(16,2)
  273. sbc(colors.white)
  274. stc(colors.black)
  275. scp(16,10)
  276. p("Publisher: Microcraft")
  277. pfb(16, h, w, h, colors.blue)
  278. if fs.exists("/nshop/.calc") then
  279.  scp(16,h)
  280.  sbc(colors.blue)
  281.  stc(colors.white)
  282.  write("Remove    Run")
  283.  local event, click, x, y = os.pullEvent("mouse_click")
  284.  if x>15 and x<21 and y == h then fs.delete("/nshop/.calc") end
  285.  if x>25 and x<34 and y == h then r("/nshop/.calc") end
  286. else
  287.  scp(30,h)
  288.  write("Download")
  289.  local event, click, x, y = os.pullEvent("mouse_click")
  290.  if x>29 and x<40 and y == h then
  291.   if pass == "" then r("pastebin get dMjjSaKY /nshop/.calc")
  292.   else
  293.   pfb(10, 5, 30, 9, colors.blue)
  294.   scp(10,5) stc(colors.white)
  295.   p("Pasword required.")
  296.   scp(10,6)
  297.   p("Enter password:")
  298.   scp(10,7)
  299.   write("")
  300.   haslo = read()
  301.   if haslo == pass then r("pastebin get dMjjSaKY /nshop/.calc")
  302.   end  
  303.   end
  304.   end
  305. end
  306. end
  307.  
  308. function ep()
  309. sbc(colors.white)
  310. stc(colors.black)
  311. scp(16,2)
  312. p("App only supports")
  313. scp(16,3)
  314. p("51x19 resolution.")
  315. scp(16,10)
  316. p("Publisher: Microcraft")
  317. pfb(16, h, w, h, colors.blue)
  318. if fs.exists("/nshop/.exp") then
  319.  scp(16,h)
  320.  sbc(colors.blue)
  321.  stc(colors.white)
  322.  write("Remove    Run")
  323.  local event, click, x, y = os.pullEvent("mouse_click")
  324.  if x>15 and x<21 and y == h then fs.delete("/nshop/.exp") end
  325.  if x>25 and x<34 and y == h then r("/nshop/.exp") end
  326. else
  327.  scp(30,h)
  328.  write("Download")
  329.  local event, click, x, y = os.pullEvent("mouse_click")
  330.  if x>29 and x<40 then
  331.   if pass == "" then r("pastebin get zbzF7Zu4 /nshop/.exp")
  332.   else
  333.   pfb(10, 5, 30, 9, colors.blue)
  334.   scp(10,5) stc(colors.white)
  335.   p("Pasword required.")
  336.   scp(10,6)
  337.   p("Enter password:")
  338.   scp(10,7)
  339.   write("")
  340.   haslo = read()
  341.   if haslo == pass then r("pastebin get zbzF7Zu4 /nshop/.exp")
  342.   end  
  343.   end
  344.   end
  345. end
  346. end
  347.  
  348.  
  349. function rc()
  350. sbc(colors.white)
  351. stc(colors.black)
  352. scp(16,10)
  353. p("Wydawca: Publisher")
  354. pfb(16, h, w, h, colors.blue)
  355. scp(16,h)
  356. write("App is not yet available")
  357. local event, click, x, y = os.pullEvent("mouse_click")
  358. end
  359.  
  360.  
  361. function tm()
  362. scp(16,2)
  363. sbc(colors.white)
  364. stc(colors.black)
  365. p("App is available in Polish")
  366. scp(16,3)
  367. p("only")
  368. scp(16,12)
  369. p("Publisher: Microcraft")
  370. pfb(16, h, w, h, colors.blue)
  371. if fs.exists("/nshop/.tm") then
  372.  scp(16,h)
  373.  sbc(colors.blue)
  374.  stc(colors.white)
  375.  write("Remove    Run")
  376.  local event, click, x, y = os.pullEvent("mouse_click")
  377.  if x>15 and x<21 and y == h then fs.delete("/nshop/.tm") end
  378.  if x>25 and x<34 and y == h then r("/nshop/.tm") end
  379. else
  380.  scp(30,h)
  381.  write("Download")
  382.  local event, click, x, y = os.pullEvent("mouse_click")
  383.  if x>29 and x<40 and y == h then
  384.   if pass == "" then r("pastebin get kCQLpZQS /nshop/.tm")
  385.   else
  386.   pfb(10, 5, 30, 9, colors.blue)
  387.   scp(10,5) stc(colors.white)
  388.   p("Pasword required.")
  389.   scp(10,6)
  390.   p("Enter password:")
  391.   scp(10,7)
  392.   write("")
  393.   haslo = read()
  394.   if haslo == pass then r("pastebin get kCQLpZQS /nshop/.tm")
  395.   end  
  396.   end
  397.   end
  398. end
  399. end
  400.  
  401.  
  402. function dg()
  403. scp(16,2)
  404. sbc(colors.white)
  405. stc(colors.black)
  406. p("App is available in Polish")
  407. scp(16,3)
  408. p("only")
  409. scp(16,10)
  410. p("Publisher: Microcraft;DG")
  411. pfb(16, h, w, h, colors.blue)
  412. scp(16,h)
  413. if fs.exists("/nshop/.dg") then
  414.  scp(16,h)
  415.  sbc(colors.blue)
  416.  stc(colors.white)
  417.  write("Usun      Uruchom")
  418.  local event, click, x, y = os.pullEvent("mouse_click")
  419.  if x>15 and x<21 and y == h then fs.delete("/nshop/.dg") end
  420.  if x>25 and x<34 and y == h then r("/nshop/.dg") end
  421. else
  422.  scp(30,h)
  423.  write("Pobierz")
  424.  local event, click, x, y = os.pullEvent("mouse_click")
  425.  if x>29 and x<40 and y == h then
  426.   if pass == "" then r("pastebin get qRNinxW4 /nshop/.dg")
  427.   else
  428.   pfb(10, 5, 30, 9, colors.blue)
  429.   scp(10,5) stc(colors.white)
  430.   p("Pasword required.")
  431.   scp(10,6)
  432.   p("Enter password:")
  433.   scp(10,7)
  434.   write("")
  435.   haslo = read()
  436.   if haslo == pass then r("pastebin get qRNinxW4 /nshop/.dg")
  437.   end  
  438.   end
  439.   end
  440. end
  441. end
  442.  
  443. function kolorw()
  444. scp(1,5)
  445. if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
  446. p("Main OS color: ", colr)
  447. p("Choose new main OS color:")
  448. pdp(1, 7, colors.orange)
  449. pdp(2, 7, colors.lightBlue)
  450. pdp(3, 7, colors.yellow)
  451. pdp(4, 7, colors.lime)
  452. pdp(5, 7, colors.pink)
  453. pdp(6, 7, colors.gray)
  454. pdp(7, 7, colors.lightGray)
  455. pdp(8, 7, colors.purple)
  456. pdp(9, 7, colors.blue)
  457. pdp(10, 7, colors.brown)
  458. pdp(11, 7, colors.green)
  459. pdp(12, 7, colors.red)
  460. pdp(13, 7, colors.black)
  461. pdp(14, 7, colors.white)
  462. local event, click, x, y = os.pullEvent("mouse_click")
  463. if x == 1 and y == 7 then r("rm /os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.orange") colw.close() end
  464. if x == 2 and y == 7 then r("rm /os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.lightBlue") colw.close() end
  465. if x == 3 and y == 7 then r("rm /os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.yellow") colw.close() end
  466. if x == 4 and y == 7 then r("rm /os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.lime") colw.close() end
  467. if x == 5 and y == 7 then r("rm /os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.pink") colw.close() end
  468. if x == 6 and y == 7 then r("rm /os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.gray") colw.close() end
  469. if x == 7 and y == 7 then r("rm /os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.lightGray") colw.close() end
  470. if x == 8 and y == 7 then r("rm /os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.purple") colw.close() end
  471. if x == 9 and y == 7 then r("rm /os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.blue") colw.close() end
  472. if x == 10 and y == 7 then r("rm /os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.brown") colw.close() end
  473. if x == 11 and y == 7 then r("rm /os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.green") colw.close() end
  474. if x == 12 and y == 7 then r("rm /os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.red") colw.close() end
  475. if x == 13 and y == 7 then r("rm /os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.black") colw.close() end
  476. if x == 14 and y == 7 then r("rm /os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.white") colw.close() end
  477. end
  478.  
  479. function deskust()
  480. while true do
  481. kolor()
  482. if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
  483. tc()
  484. if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
  485. pfb(1, 1, w, 1, colors.blue)
  486. scp(1,1)
  487. stc(colors.white)
  488. p("NextUI Settings")
  489. pdp(w,1, colors.red)
  490. if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
  491.  scp(1,2)
  492.  p("UI Style: Domyslny NextUI")
  493.  p("No styles are available")
  494.  p("Choose main OS color")
  495.  local event, click, x, y = os.pullEvent("mouse_click")
  496.  if x>0 and x<25 and y == 4 then kolorw() end
  497.  if x == w and y == 1 then nust() end
  498. end
  499. end
  500.  
  501.  
  502. function infust()
  503. while true do
  504. kolor()
  505. if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
  506. tc()
  507. if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
  508. pfb(1, 1, w, 1, colors.blue)
  509. scp(1,1)
  510. stc(colors.white)
  511. p("NextUI Settings")
  512. pdp(w,1, colors.red)
  513. if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
  514. scp(1,2)
  515. p("Microcraft NextUI")
  516. p("OS version: 1.81 Developers Update")
  517. zajete = math.ceil(getSize("/")/1024)
  518. wolne = math.ceil(fs.getFreeSpace("/")/1024)
  519. p("Free space:", wolne, "KB")
  520. p("Computer label: ", os.getComputerLabel())
  521. if pass == "" then log = "off" else log = "on" end
  522. p("Login system: ", log)
  523. p("Screen resolution: ", w, h)
  524. p("CraftOS version: ", os.version())
  525. local event, click, x, y = os.pullEvent("mouse_click")
  526. if x == w and y == 1 then nust() end
  527. end
  528. end
  529.  
  530. function cmd()
  531. s(1)
  532. tc()
  533. sbc(colors.black)
  534. tc()
  535. sbc(colors.black)
  536. stc(colors.white)
  537. scp(1,1)
  538. p("MineCore Command Prompt")
  539. p("2018 Microcraft")
  540. p("Type 'help' to get help")
  541. while true do
  542. write("./minecore/>")
  543. comm = read()
  544. if comm == "help" then
  545.  p("'ver' - MineCore version")
  546.  p("'next' - NextUI Desktop")
  547.  p("'nextver' - NextUI version")
  548.  p("'run' - run file")
  549.  p("'log' - password change")
  550.  p("'reboot' - reboot PC")
  551.  p("'shutdown' - shutdown PC")
  552.  p("'store' - nextStore")
  553.  p("'craft' - CraftOS")
  554.  p("'update' - NextUI Update")
  555.  p("'dir' - list files in directory")
  556.  p("'res' - screen resolution")
  557.  p("'set' - NextUI Settings")
  558.  p("'app' - NextUI Apps")
  559. end
  560. if comm == "reboot" then re() end
  561. if comm == "shutdown" then su() end
  562. if comm == "res" then p(w, h) end
  563. if comm == "update" then r("/os/.update") end
  564. if comm == "set" then nust() end
  565. if comm == "app" then app() end
  566. if comm == "dir" then
  567.  write(".Podaj sciezke>")
  568.  dir1 = read()
  569.  r("dir", dir1)
  570. end
  571. if comm == "store" then sklep() end
  572. if comm == "ver" then
  573.  p("Microcraft MineCore 2.0 2020.")
  574.  p("Microcraft MineUI D 1.5 2018.")
  575. end
  576. if comm == "nextver" then
  577.  p("Microcraft NextUI 1.81 Developers Update 2020.")
  578. end
  579. if comm == "next" then system() end
  580. if comm == "run" then
  581.  write("Wpisz sciezke pliku: ")
  582.  plik = read()
  583.  if fs.exists(plik) then r(plik) end
  584. end
  585. if comm == "log" then
  586.  write("Wpisz nowe haslo: ")
  587.  passw = read()
  588.  r("rm /os/.log2")
  589.  local pas = fs.open("/os/.log2", "w")
  590.  pass = pas.writeLine(passw)
  591.  pas.close()
  592.  p("Rebooting...")
  593.  s(1)
  594.  re()
  595. end
  596. end
  597. end
  598.  
  599. function setust()
  600. while true do
  601. kolor()
  602. if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
  603. tc()
  604. if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
  605. pfb(1, 1, w, 1, colors.blue)
  606. scp(1,1)
  607. stc(colors.white)
  608. p("NextUI Settings")
  609. pdp(w,1, colors.red)
  610. if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
  611. p("Change computer label")
  612. p("OS update")
  613. p("Command prompt")
  614. local event, click, x, y = os.pullEvent("mouse_click")
  615. if x>0 and x<20 and y == 2 then
  616.  scp(1,2)
  617.   write("Wpisz nowa nazwe: ")
  618.   nazwa = read()
  619.   os.setComputerLabel(nazwa)
  620.   setust()
  621. end
  622. if x>0 and x<20 and y == 3 then r("/os/.update") end
  623. if x>0 and x<20 and y == 4 then cmd() end
  624. if x == w and y == 1 then nust() end
  625. end
  626. end
  627.  
  628.  
  629. function nust()
  630. while true do
  631. if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
  632. tc()
  633. if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
  634. pfb(1, h, w, h, colors.blue)
  635. scp(1,h)
  636. stc(colors.white)
  637. if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
  638. write("Start")
  639. pdp(w-1,h, colors.red)
  640. pdp(w,h, colors.orange)
  641. pfb(1, 1, w, 1, colors.blue)
  642. scp(1,1)
  643. p("NextUI Settings")
  644. pdp(w,1, colors.red)
  645. pfb(3, 4, 13, 6, colors.orange)
  646. scp(3,5)
  647. stc(colors.white)
  648. p("Information")
  649. pfb(27, 4, 37, 6, colors.cyan)
  650. scp(27,5)
  651. stc(colors.white)
  652. p("Desktop")
  653. pfb(15, 4, 25, 6, colors.green)
  654. scp(15,5)
  655. stc(colors.white)
  656. p("Settings")
  657. pfb(39, 4, 49, 6, colors.red)
  658. scp(39,5)
  659. stc(colors.white)
  660. p("Apps")
  661. local event, click, x, y = os.pullEvent("mouse_click")
  662. if x == w and y == 1 then system() end
  663. if x>0 and x<6 and y == h then start() end
  664. if x>2 and x<14 and y>3 and y<7 then infust() end
  665. if x>14 and x<26 and y>3 and y<7 then setust() end
  666. if x>26 and x<38 and y>3 and y<7 then deskust() end
  667. if x>38 and x<50 and y>3 and y<7 then apps() end
  668. end
  669. end
  670.  
  671. if fs.exists("/os/.ver") then
  672. local wer = fs.open("/os/.ver", "r")
  673. ver = wer.readLine()
  674. wer.close()
  675. end
  676.  
  677. function res()
  678. if w<51 and h<19 then tc() p("NextUI wymaga monitora o rozdzielczosci 51x19 lub wiekszej. System nie moze dzialac na Twoim urzadzeniu. Rozdzielczosc Twojego monitora to:", w, h) elseif w == 51 and h == 19 then tryb = 1 elseif w>65 and h>25 then tryb = 2 end
  679. end
  680.  
  681. function kolor()
  682. local col = fs.open("/os/.kol", "r")
  683. colr = col.readLine()
  684. col.close()
  685. end
  686.  
  687. function ikony()
  688. while true do
  689. tc()
  690. if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.green) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.white) elseif colr == "colors.black" then sbc(colors.black) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
  691. tc()
  692. if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.green) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.white) elseif colr == "colors.black" then sbc(colors.black) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
  693. stc(colors.white)
  694. pfb(1, 1, w, 1, colors.gray)
  695. pdp(w, 1, colors.red)
  696. sbc(colors.gray)
  697. scp(1,1)
  698. p("NextUI Icons 2.0 Beta")
  699. scp(1,2)
  700. stc(colors.white)
  701. if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
  702. p("Welcome to shortcut creator. Choose shortcut place:")
  703. if fs.exists("/os/iko/.ico1") then iko1 = "Zajete" else iko1 = "Wolne" end
  704. if fs.exists("/os/iko/.ico2") then iko2 = "Zajete" else iko2 = "Wolne" end
  705. if fs.exists("/os/iko/.ico3") then iko3 = "Zajete" else iko3 = "Wolne" end
  706. scp(1,6)
  707. p("Ikona 1: ", iko1)
  708. p("Ikona 2: ", iko2)
  709. p("Ikona 3: ", iko3)
  710. local event, click, x, y = os.pullEvent("mouse_click")
  711. if x == w and y == 1 then system() end
  712.  
  713. if x>0 and x<20 and y == 6 and iko1 == "Wolne" then
  714.  scp(1,10)
  715.  p("Choose path to file: ")
  716.  write(".>")
  717.  sciezka = read()
  718.  p("Type name of shortcut: ")
  719.  nazwa = read()
  720.  local iko1s = fs.open("/os/iko/.ico1", "w")
  721.  iko1s.writeLine(sciezka)
  722.  iko1s.close()
  723.  local iko1n = fs.open("/os/iko/.ico1n", "w")
  724.  iko1n.writeLine(nazwa)
  725.  iko1n.close()
  726. end
  727. if x>0 and x<20 and y == 8 and iko3 == "Wolne" then
  728.  scp(1,10)
  729.  p("Choose path to file: ")
  730.  write(".>")
  731.  sciezka = read()
  732.  p("Type name of shortcut: ")
  733.  nazwa = read()
  734.  local ikon3 = fs.open("/os/iko/.ico3", "w")
  735.  ikon3.writeLine(sciezka)
  736.  ikon3.close()
  737.  local ikon3n = fs.open("/os/iko/.ico3n", "w")
  738.  ikon3n.writeLine(nazwa)
  739.  ikon3n.close()
  740. end
  741. if x>0 and x<20 and y == 7 and iko2 == "Wolne" then
  742.  scp(1,10)
  743.  p("Choose path to file: ")
  744.  write(".>")
  745.  sciezka = read()
  746.  p("Type name of shortcut: ")
  747.  nazwa = read()
  748.  local ikon2 = fs.open("/os/iko/.ico2", "w")
  749.  ikon2.writeLine(sciezka)
  750.  ikon2.close()
  751.  local ikon2n = fs.open("/os/iko/.ico2n", "w")
  752.  ikon2n.writeLine(nazwa)
  753.  ikon2n.close()
  754. end
  755. if x>0 and x<20 and y == 6 and iko1 == "Zajete" then
  756.  fs.delete("/os/iko/.ico1")
  757.  fs.delete("/os/iko/.ico1n")
  758. end
  759. if x>0 and x<20 and y == 7 and iko2 == "Zajete" then
  760.  fs.delete("/os/iko/.ico2")
  761.  fs.delete("/os/iko/.ico2n")
  762. end
  763. if x>0 and x<20 and y == 8 and iko3 == "Zajete" then
  764.  fs.delete("/os/iko/.ico3")
  765.  fs.delete("/os/iko/.ico3n")
  766. end
  767. end
  768. end
  769.  
  770.  
  771. function start()
  772. pfb(1, h-9, 20, h-1, colors.black)
  773. scp(1, h-9)
  774. sbc(colors.white)
  775. stc(colors.black)
  776. p("NextUI 1.8 Start    ")
  777. sbc(colors.black)
  778. stc(colors.white)
  779. scp(1, h-8)
  780. p("nextStore 2.0       ")
  781. p("Paint               ")
  782. p("2048                ")
  783. p("Snake               ")
  784. p("Editor              ")
  785. p("CraftOS             ")
  786. p("Settings            ")
  787. p("Shortcuts           ")
  788. local event, click, x, y = os.pullEvent("mouse_click")
  789. if x>0 and x<21 and y == h-1 then ikony() end
  790. if x>0 and x<21 and y == h-2 then nust() end
  791. if x>0 and x<21 and y == h-3 then error("Opuszczono NextUI 1.8") end
  792. if x>0 and x<21 and y == h-4 then
  793.  if fse("/os/.luaide") then r("/os/.luaide") else bsodf()
  794.  end
  795. end
  796. if x>0 and x<21 and y == h-5 then r("worm") end
  797. if x>0 and x<21 and y == h-6 then r("/os/.2048") end
  798. if x>0 and x<21 and y == h-7 then r("/os/.paint") end
  799. if x>0 and x<21 and y == h-8 then nextstore() end
  800. end
  801. function pulpit()
  802. sbc(colors.cyan)
  803. tc()
  804. sbc(colors.cyan)
  805. local obraz = pul("/os/.pulpit")
  806. pud(obraz, 5, 3)
  807. pfb(1, 1, w, 1, colors.black)
  808. scp(1,1)
  809. stc(colors.white)
  810. if w>=65 then p("NextUI 1.81 Developers Update. 2020 Microcraft.") else p("NextUI 1.81 Developers Update. Microcraft.") end
  811. scp(1,h)
  812. if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
  813. write("Start")
  814. pfb(6, h, w, h, colors.blue)
  815. scp(w-12,h)
  816. if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
  817. write("Apps")
  818. pdp(w, h, colors.red)
  819. pdp(w-1, h, colors.orange)
  820. end
  821.  
  822. function getSize(path)
  823.   local size = 0
  824.   for _, file in ipairs(fs.list(path)) do
  825.     if fs.isDir(fs.combine(path, file)) then
  826.       size = size + getSize(fs.combine(path, file))
  827.     else
  828.       size = size + fs.getSize(fs.combine(path, file))
  829.     end
  830.   end
  831.   return size
  832. end
  833.  
  834. function nextstore()
  835. while true do
  836. res()
  837. sbc(colors.white)
  838. tc()
  839. sbc(colors.white)
  840.  
  841. sbc(colors.black)
  842. stc(colors.white)
  843. scp(1,1)
  844. p("Start")
  845. pdp(w,h,colors.red)
  846. pdp(w-1,h,colors.orange)
  847. pfb(1,1,w,1,colors.blue)
  848. scp(1,1)
  849. stc(colors.white)
  850. p("nextStore 2.0")
  851. pdp(w,1, colors.red)
  852. sbc(colors.white)
  853. stc(colors.black)
  854. scp(1,2)
  855. p("Explorer      ")
  856. p("DGStatistics")
  857. p("ReactorControl")
  858. p("TimeMashine")
  859. p("Calculator")
  860. scp(1,h-1)
  861. p("Free space:")
  862. miejsce = math.ceil(fs.getFreeSpace("/")/1024)
  863. write(fs.getFreeSpace("/")/1024, "KB")
  864. local event, click, x, y = os.pullEvent("mouse_click")
  865. if x>0 and x<16 and y == 2 then ep() end
  866. if x>0 and x<16 and y == 3 then dg() end
  867. if x>0 and x<16 and y == 4 then rc() end
  868. if x>0 and x<16 and y == 5 then tm() end
  869. if x>0 and x<16 and y == 6 then calc() end
  870. if x == w and y == 1 then system() end
  871. pdp(w,1, colors.red)
  872. end
  873. end
  874.  
  875. function mysz()
  876. local event, click, x, y = os.pullEvent("mouse_click")
  877. if x == w and y == h then su() end
  878. if x == w-1 and y == h then re() end
  879. if x>0 and x<6 and y == h then start() end
  880. if x<w-1 and x>w-13 and y == h then app() end
  881. end
  882.  
  883. function godz()
  884. while true do
  885. scp(w-6,1)
  886. sbc(colors.black)
  887. stc(colors.white)
  888. print( textutils.formatTime(os.time("local"), true ) )
  889. s(1)
  890. end
  891. end
  892.  
  893. function system()
  894. while true do
  895. kolor()
  896. pulpit()
  897. parallel.waitForAny(godz, mysz)
  898. end
  899. end
  900.  
  901. --function system()
  902. --while true do
  903. --kolor()
  904. --pulpit()
  905. --mysz()
  906. --end
  907. --end
  908.  
  909. res()
  910. logo()
  911. system()
Add Comment
Please, Sign In to add comment