Advertisement
Guest User

trololmoeenenenene

a guest
Aug 22nd, 2014
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. screen = peripheral.wrap("top")
  2. -- ########################## -- Funktionen -- ############################ --
  3. local function s(...) return sleep(...) end
  4. local function w(...) return write(...) end
  5. local function p(...) return print(...) end
  6. local function tw(...) return term.write(...) end
  7. local function scp(...) return term.setCursorPos(...) end
  8. local function sbc(...) return term.setBackgroundColor(...) end
  9. local function stc(...) return term.setTextColor(...) end
  10. local function tc(...) return term.clear(...) end
  11. local function tcl(...) return term.clearLine() end
  12. local function scb(...) return term.setCursorBlink(...) end
  13. local function ts(...) return term.scroll(...) end
  14. local function r(...) return shell.run(...) end
  15. local function para(...) return parallel.waitForAny(...) end
  16. local function sw(...) return textutils.slowWrite(...) end
  17. local function sp(...) return textutils.slowPrint(...) end
  18. -- ########################## -- Einstellungen -- ############################ --
  19. os.pullEvent = os.pullEventRaw
  20. OfficialVersion = "3.0"
  21. loopbreak2 = 0
  22. sbc(32768)
  23. stc(1)
  24. if not fs.exists("LabyOS/Programme") then
  25. fs.delete("LabyOS")
  26. end
  27. -- ########################## -- Terminate Screen -- ############################ --
  28. function terminate()   
  29.  while true do
  30.   local events = os.pullEventRaw()
  31.    if events == "terminate" then
  32. os.reboot()
  33.   end
  34.  end
  35. end
  36. -- ########################## -- Change startup (BACKUP) -- ############################ --
  37. function runDesktop1()
  38.  if fs.exists("startup") then
  39.    fs.makeDir("LabyOS/Backup")
  40.   if fs.exists("LabyOS/Backup/startup") then
  41.    fs.delete("LabyOS/Backup/startup")
  42.   end
  43.    fs.copy("startup", "LabyOS/Backup/startup")
  44.   if fs.exists("LabyOS/Programme/Setup") then
  45.    fs.delete("startup")
  46.    fs.copy("LabyOS/Programme/Setup", "startup")
  47.    os.reboot()
  48.   end
  49.  else
  50.  r("clear")
  51.  error("startup is not exists")
  52.  end
  53. end
  54. -- ########################## -- Run Login Screen -- ############################ --
  55. function LabyOSUpdateLogin1()
  56. function loadscreen1()
  57. image = paintutils.loadImage("LabyOS/Texture/Login")
  58. paintutils.drawImage(image, 1, 1)
  59. -- ## Test Update ## --
  60. sbc(32768)
  61. scp(30,1)
  62. stc(1)
  63. sbc(2048)
  64. stc(16)
  65. w([[:]])
  66. scp(30,2)
  67. p([[:]])
  68. scp(31,1)
  69. r("LabyOS/Config/LabyOSUpdate")
  70. -- ################# --
  71. -- ############ create Accounts ############
  72.         fs.makeDir("LabyOS/Profile")
  73. if not fs.exists("LabyOS/Profile/User1") then
  74.         createAcc1 = fs.open("LabyOS/Profile/User1", "w")
  75.         createAcc1.write("Guest\n")
  76.         createAcc1.write("no password")
  77.         createAcc1.close()
  78. end
  79. if not fs.exists("LabyOS/Profile/User2") then
  80.         createAcc2 = fs.open("LabyOS/Profile/User2", "w")
  81.         createAcc2.write("Free slot\n")
  82.         createAcc2.write("no password")
  83.         createAcc2.close()
  84. end
  85. if not fs.exists("LabyOS/Profile/User3") then
  86.         createAcc3 = fs.open("LabyOS/Profile/User3", "w")
  87.         createAcc3.write("Free slot\n")
  88.         createAcc3.write("no password")
  89.         createAcc3.close()
  90. end
  91. -- ## Run Interface ## --
  92. sbc(2048)
  93. stc(1)
  94. scp(1,1)
  95. w([[LabyOS]])
  96. scp(1,2)
  97. w([[Windows XP Version]])
  98. scp(3,9)
  99. sbc(8)
  100. w([[Welcome]])
  101. scp(15,3)
  102. w([[:]])
  103. scp(15,4)
  104. w([[:]])
  105. scp(15,5)
  106. w([[:]])
  107. scp(15,6)
  108. w([[:]])
  109. scp(15,7)
  110. w([[:]])
  111. scp(15,8)
  112. w([[:]])
  113. scp(15,9)
  114. w([[:]])
  115. scp(15,10)
  116. w([[:]])
  117. scp(15,11)
  118. w([[:]])
  119. scp(15,12)
  120. w([[:]])
  121. scp(15,13)
  122. w([[:]])
  123. scp(15,14)
  124. w([[:]])
  125. scp(15,15)
  126. w([[:]])
  127. scp(15,16)
  128. w([[:]])
  129. sbc(2048)
  130. scp(4,18)
  131. w([[Turn off computer]])
  132. sbc(2)
  133. scp(2,18)
  134. w([[Q]])
  135. sbc(256)
  136. -- ## Profil Box ## --
  137. ------------### 1 ####
  138. scp(17,5)
  139. w([[1   ]])
  140. scp(17,6)
  141. w([[    ]])
  142. ------------### 2 ####
  143. scp(17,9)
  144. w([[2   ]])
  145. scp(17,10)
  146. w([[    ]])
  147. ------------### 3 ####
  148. scp(17,13)
  149. w([[3   ]])
  150. scp(17,14)
  151. w([[    ]])
  152. -- ################ --
  153. -- ## Profil Names ## --
  154. ------------### 1 ####
  155. sbc(8)
  156. scp(22,5)
  157. w([[1]])
  158. stc(16384)
  159. scp(22,6)
  160. w([[-#-]])
  161. ------------### 2 ####
  162. stc(1)
  163. sbc(8)
  164. scp(22,9)
  165. w([[2]])
  166. stc(16384)
  167. scp(22,10)
  168. w([[-#-]])
  169. ------------### 3 ####
  170. stc(1)
  171. sbc(8)
  172. scp(22,13)
  173. w([[3]])
  174. stc(16384)
  175. scp(22,14)
  176. w([[-#-]])
  177. -- ################ Print name data ################
  178. logincheck = fs.open("LabyOS/Profile/User1", "r")
  179.          if logincheck then
  180.           username1 = logincheck.readLine()
  181.           userpass1 = logincheck.readLine()
  182.          end
  183.           logincheck.close()
  184.            scp(22,5)
  185.            stc(1)
  186.            w(username1)
  187.            stc(32)
  188.            if userpass1 == "no password" then
  189.            scp(22,6)
  190.            w([[No password]])
  191.            else
  192.            scp(22,6)
  193.            stc(16384)
  194.            w([[Password     ]])
  195.            end
  196.            if username1 == "Free slot" then
  197.             stc(16)
  198.             scp(22,6)
  199.             w([[Unavailable!        ]])
  200.            end
  201. logincheck = fs.open("LabyOS/Profile/User2", "r")
  202.          if logincheck then
  203.           username2 = logincheck.readLine()
  204.           userpass2 = logincheck.readLine()
  205.          end
  206.           logincheck.close()
  207.            scp(22,9)
  208.            stc(1)
  209.            w(username2)
  210.            stc(32)
  211.            if userpass2 == "no password" then
  212.            scp(22,10)
  213.            w([[No password]])
  214.            else
  215.            scp(22,10)
  216.            stc(16384)
  217.            w([[Password     ]])
  218.            end
  219.            if username2 == "Free slot" then
  220.             stc(16)
  221.             scp(22,10)
  222.             w([[Unavailable!        ]])
  223.            end
  224. logincheck = fs.open("LabyOS/Profile/User3", "r")
  225.          if logincheck then
  226.           username3 = logincheck.readLine()
  227.           userpass3 = logincheck.readLine()
  228.          end
  229.           logincheck.close()
  230.            scp(22,13)
  231.            stc(1)
  232.            w(username3)
  233.            stc(32)
  234.            if userpass3 == "no password" then
  235.            scp(22,14)
  236.            w([[No password]])
  237.            else
  238.            stc(16384)
  239.            scp(22,14)
  240.            w([[Password     ]])
  241.            end
  242.            if username3 == "Free slot" then
  243.             stc(16)
  244.             scp(22,14)
  245.             w([[Unavailable!        ]])
  246.            end
  247. -- #################################################
  248. end
  249. loadscreen1()
  250. -- ################### --
  251. -- ##### Mouse click / shutdown / window ##### --
  252. function drag()
  253. breakloop1a = 0
  254. -- ########### Window design off ##############
  255.       X = 25
  256.       Y = 6
  257.       sbc(8)
  258.       scp(X-8,Y)
  259.       sbc(2048)
  260.       stc(1)
  261.       w([[Info            ]])
  262.       sbc(16384)
  263.       w([[X]])
  264.       sbc(256)
  265.       stc(32768)
  266.       scp(X-8,Y+1)
  267.       p([[    Shutdown?    ]])
  268.       scp(X-8,Y+2)
  269.       p([[                 ]])
  270.       scp(X-8,Y+3)
  271.       p([[   [Y]    [N]    ]])
  272.       scp(X-8,Y+4)
  273.       stc(16384)
  274.       p([[                %]])
  275. -- ########################################
  276.  while true do
  277.    function breakloop1()
  278.    breakloop1a = 1
  279.    end
  280.      event, button, X, Y = os.pullEvent("mouse_drag")
  281.      XY = X..","..Y
  282.    if button == 1 and breakloop1a == 0 then
  283. -- ########### Window design on ##############
  284.       loadscreen1()
  285.       scp(X-8,Y)
  286.       sbc(2048)
  287.       stc(1)
  288.       w([[Info            ]])
  289.       sbc(16384)
  290.       w([[X]])
  291.       sbc(256)
  292.       stc(32768)
  293.       scp(X-8,Y+1)
  294.       p([[    Shutdown?    ]])
  295.       scp(X-8,Y+2)
  296.       p([[                 ]])
  297.       scp(X-8,Y+3)
  298.       p([[   [Y]    [N]    ]])
  299.       scp(X-8,Y+4)
  300.       stc(16384)
  301.       p([[                %]])
  302. -- ########################################
  303.    end
  304.    
  305.    if breakloop1a == 1 then
  306.    break
  307.    end
  308.   end
  309.  end
  310. -- ########### Window: Close ##############
  311. function click()
  312. for clicks=0,2 do
  313.    event, button, X2, Y2 = os.pullEvent("mouse_click")
  314.    XY2 = X2..","..Y2
  315. -- ######## Window: No moved function #########
  316.    if XY2 == "33,6" then
  317.      breakloop1()
  318.      para(terminate, LabyOSUpdateLogin1)
  319.     end
  320.    ----------------------
  321.    if XY2 == "28,9" then
  322.      breakloop1()
  323.      para(terminate, LabyOSUpdateLogin1)
  324.    end
  325.    ----------------------
  326.    if XY2 == "21,9" then
  327.      breakloop1()
  328.      loadscreen1()
  329.      s(1)
  330.      sbc(2048)
  331.      scp(1,1)
  332.      w([[                                                   ]])
  333.      scp(1,2)
  334.      s(0,1)
  335.      w([[                                                   ]])
  336.      scp(2,18)
  337.      s(0,1)
  338.      w([[                                                   ]])
  339.      sbc(8)
  340.      s(1)
  341.      r("clear")
  342.      stc(1)
  343.      for shutdown1=0,1 do
  344.         scp(20,9)
  345.         w([[: Shutdown]])
  346.         s(0.1)
  347.         scp(20,9)
  348.         w([[/ Shutdown]])
  349.         s(0.1)
  350.         scp(20,9)
  351.         w([[- Shutdown]])
  352.         s(0.1)
  353.         scp(20,9)
  354.         w([[\ Shutdown]])
  355.         s(0.1)
  356.      end
  357.      os.shutdown()
  358. end
  359. end
  360. -- #####################################
  361.   while true do
  362.      event, button, X, Y = os.pullEvent("mouse_drag")
  363.      XY = X..","..Y
  364.      event, button, X2, Y2 = os.pullEvent("mouse_click")
  365.      XY2 = X2..","..Y2
  366. -- ######## Window: moved function #########
  367.          if XY2 == (X + 8) .. "," .. Y then
  368.           breakloop1()
  369.           para(terminate, LabyOSUpdateLogin1)
  370.           break
  371.          end
  372.          if XY2 == (X + 3) .. "," .. (Y + 3) then
  373.           breakloop1()
  374.           para(terminate, LabyOSUpdateLogin1)
  375.           break
  376.          end
  377.         if XY2 == (X - 4) .. "," .. (Y + 3) then
  378.             breakloop1()
  379.             loadscreen1()
  380.             s(1)
  381.             sbc(2048)
  382.             scp(1,1)
  383.             w([[                                                   ]])
  384.             scp(1,2)
  385.             s(0,1)
  386.             w([[                                                   ]])
  387.             scp(2,18)
  388.             s(0,1)
  389.             w([[                                                   ]])
  390.             sbc(8)
  391.             s(1)
  392.             r("clear")
  393.             stc(1)
  394.                 for shutdown1=0,2 do
  395.                 scp(20,9)
  396.                 w([[: Shutdown]])
  397.                 s(0.1)
  398.                 scp(20,9)
  399.                 w([[/ Shutdown]])
  400.                 s(0.1)
  401.                 scp(20,9)
  402.                 w([[- Shutdown]])
  403.                 s(0.1)
  404.                 scp(20,9)
  405.                 w([[\ Shutdown]])
  406.                 s(0.1)
  407.             end
  408.             os.shutdown()
  409.         end
  410. -- #################################
  411.   end
  412. end
  413. -- ################################
  414. -- ###############################################################
  415. while true do
  416.       function loopbreak2a()
  417.        loopbreak2 = 1
  418.       end
  419.      event, button, X, Y = os.pullEvent("mouse_click")
  420.      XY = X..","..Y
  421. -- ######## Open window point #########
  422.       if XY == "2,18" and button == 1 then
  423.        scp(4,18)
  424.        sbc(2048)
  425.        stc(1)
  426.        write("You can move the window!")
  427.        para(click, drag)
  428.       end
  429. -- ############### select account #################
  430. -- ################# GUEST ###############
  431.       if X >= 17 and X <= 40 and Y == 5 or X >= 17 and X <= 40 and Y == 6 then
  432.        stc(16)
  433.          scp(40,6)
  434.          w([[ <         ]])
  435.          login2 = fs.open("LabyOS/Profile/User1", "r")
  436.          if login2 then
  437.           username1 = login2.readLine()
  438.           userpass1 = login2.readLine()
  439.          end
  440.           login2.close()
  441.            if username1 == "Free slot" then
  442.               para(terminate, LabyOSUpdateLogin1)
  443.            end
  444.            if userpass1 == "no password" then
  445.             loopbreak2a()
  446.             if not fs.exists("LabyOS/Online") then
  447.              fs.makeDir("LabyOS/Online")
  448.             end
  449.               setOnline = fs.open("LabyOS/Online/data", "w")
  450.               setOnline.write(username1)
  451.               setOnline.close()
  452.             runDesktop1()
  453.             else
  454.             sbc(1)
  455.             stc(32768)
  456.             scp(22,6)
  457.             sw([[                  ]])
  458.             scp(22,6)
  459.             passwordcheck1 = read("*")
  460.              if passwordcheck1 == userpass1 then
  461.               loopbreak2a()
  462.             if not fs.exists("LabyOS/Online") then
  463.              fs.makeDir("LabyOS/Online")
  464.             end
  465.               setOnline = fs.open("LabyOS/Online/data", "w")
  466.               setOnline.write(username1)
  467.               setOnline.close()
  468.               runDesktop1()
  469.              else
  470.               stc(16384)
  471.               sbc(8)
  472.               scp(22,6)
  473.               sw([[Wrong password!                ]])
  474.               s(1)
  475.               scp(22,6)
  476.               w([[Passwort            ]])
  477.              end
  478.            end
  479.       end
  480. -- ################# User 2 ###############
  481. if X >= 17 and X <= 40 and Y == 9 or X >= 17 and X <= 40 and Y == 10 then
  482.        stc(16)
  483.          scp(40,10)
  484.          w([[ <         ]])
  485.          login3 = fs.open("LabyOS/Profile/User2", "r")
  486.          if login3 then
  487.           username2 = login3.readLine()
  488.           userpass2 = login3.readLine()
  489.          end
  490.           login3.close()
  491.            if username2 == "Free slot" then
  492.               para(terminate, LabyOSUpdateLogin1)
  493.            end
  494.            if userpass2 == "no password" then
  495.             loopbreak2a()
  496.             if not fs.exists("LabyOS/Online") then
  497.              fs.makeDir("LabyOS/Online")
  498.             end
  499.               setOnline = fs.open("LabyOS/Online/data", "w")
  500.               setOnline.write(username2)
  501.               setOnline.close()
  502.             runDesktop1()
  503.             else
  504.             sbc(1)
  505.             stc(32768)
  506.             scp(22,10)
  507.             sw([[                  ]])
  508.             scp(22,10)
  509.             passwordcheck1 = read("*")
  510.              if passwordcheck1 == userpass2 then
  511.               loopbreak2a()
  512.             if not fs.exists("LabyOS/Online") then
  513.              fs.makeDir("LabyOS/Online")
  514.             end
  515.               setOnline = fs.open("LabyOS/Online/data", "w")
  516.               setOnline.write(username2)
  517.               setOnline.close()
  518.               runDesktop1()
  519.              else
  520.               stc(16384)
  521.               sbc(8)
  522.               scp(22,10)
  523.               sw([[Wrong password!                ]])
  524.               s(1)
  525.               scp(22,10)
  526.               w([[Password            ]])
  527.              end
  528.            end
  529.       end
  530. -- ################# User 3 ###############
  531. if X >= 17 and X <= 40 and Y == 13 or X >= 17 and X <= 40 and Y == 14 then
  532.        stc(16)
  533.          scp(40,14)
  534.          w([[ <         ]])
  535.          login4 = fs.open("LabyOS/Profile/User3", "r")
  536.          if login4 then
  537.           username3 = login4.readLine()
  538.           userpass3 = login4.readLine()
  539.          end
  540.           login4.close()
  541.            if username3 == "Free slot" then
  542.               para(terminate, LabyOSUpdateLogin1)
  543.            end
  544.            if userpass3 == "no password" then
  545.             loopbreak2a()
  546.             if not fs.exists("LabyOS/Online") then
  547.              fs.makeDir("LabyOS/Online")
  548.             end
  549.               setOnline = fs.open("LabyOS/Online/data", "w")
  550.               setOnline.write(username3)
  551.               setOnline.close()
  552.             runDesktop1()
  553.              else
  554.             sbc(1)
  555.             stc(32768)
  556.             scp(22,14)
  557.             sw([[                  ]])
  558.             scp(22,14)
  559.             passwordcheck1 = read("*")
  560.              if passwordcheck1 == userpass3 then
  561.               loopbreak2a()
  562.             if not fs.exists("LabyOS/Online") then
  563.              fs.makeDir("LabyOS/Online")
  564.             end
  565.               setOnline = fs.open("LabyOS/Online/data", "w")
  566.               setOnline.write(username3)
  567.               setOnline.close()
  568.               runDesktop1()
  569.              else
  570.               stc(16384)
  571.               sbc(8)
  572.               scp(22,14)
  573.               sw([[Wrong password!                ]])
  574.               s(1)
  575.               scp(22,14)
  576.               w([[Password            ]])
  577.              end
  578.            end
  579.       end
  580. -- ###############################################
  581.    if loopbreak2 == 1 then
  582.    break
  583.    end
  584. end
  585. end
  586. -- ######################################################### --
  587. if fs.exists("LabyOS/Config/SaveStart") then
  588. saveS = fs.open("LabyOS/Config/SaveStart", "r")
  589. SaveStart = saveS.readLine()
  590. saveS.close()
  591. else
  592. fs.makeDir("LabyOS/Config/")
  593. saveS = fs.open("LabyOS/Config/SaveStart", "w")
  594. saveS.write("false")
  595. saveS.close()
  596. end
  597.  
  598.  
  599. if SaveStart == "true" then
  600. saveS = fs.open("LabyOS/Config/SaveStart", "w")
  601. saveS.write("false")
  602. saveS.close()
  603. para(terminate, LabyOSUpdateLogin1) -- DEVELOPER                                                                   ######## FAST START #########
  604. elseif SaveStart == "trueKeep" then
  605. para(terminate, LabyOSUpdateLogin1)
  606. end
  607. -- ########################## -- Start Information -- ############################ --
  608. -- ## Color Test ## --
  609. r("clear")
  610. stc(1)
  611. p([[CraftOS 1.5]])
  612. if term.isColor() then
  613. elseif not term.isColor() then
  614. scp(13,1)
  615. stc(1)
  616. w([[    :INFO: LabyOS can't start.      ]])
  617. scp(13,2)
  618. p([[    :      You need an Advanced PC! ]])
  619. scp(13,3)
  620. p([[    +----------------------------------]])
  621. scp(1,2)
  622. w([[> ]])
  623. while true do
  624. inputerror1 = read()
  625. r(inputerror1)
  626. w([[> ]])
  627. end
  628. end
  629. -- ################# --
  630. -- ## HTTP Test ## --
  631. r("clear")
  632. stc(1)
  633. print(os.version())
  634. if http then
  635. elseif not http then
  636. scp(13,1)
  637. stc(1)
  638. w([[    :INFO: LabyOS can't start.      ]])
  639. scp(13,2)
  640. p([[    :      HTTP is not enabled!     ]])
  641. scp(13,3)
  642. p([[    +----------------------------------]])
  643. scp(1,2)
  644. w([[> ]])
  645. while true do
  646. inputerror1 = read()
  647. r(inputerror1)
  648. w([[> ]])
  649. end
  650. end
  651. -- ############### --
  652. -- ## Start Animation ## ---------------------------------------> START <--------------------------
  653. if fs.exists("LabyOS/Config/LabyOSUpdate") then
  654. fs.delete("LabyOS/Config/LabyOSUpdate")
  655. end
  656. s(1)
  657. -- ###################### --
  658. -- ## TabJump 1 ## --
  659. function tabjump2()
  660.         local sEvent, param = os.pullEvent("key")
  661.         if sEvent == "key" then
  662.             r("clear")
  663.             scp(1,19)
  664.             w([[Skip..]])
  665.             s(0.3)
  666.         end
  667.     end
  668. -- ############### --
  669. -- ## TabJump 2 ## --
  670. function tabjump1()
  671. tc()
  672. stc(16)
  673. scp(1,2)
  674. p([[Installed programs:]])
  675. scp(1,3)
  676. stc(8)
  677. s(0.1)
  678. r("programs")
  679. stc(16)
  680. s(0.5)
  681. p([[Memory:]])
  682. s(0.1)
  683. r("list")
  684. stc(16384)
  685. scp(16,19)
  686. p([[Press enter to skip]])
  687. -- ########################## -- Ladebalken 1 -- ############################ --
  688. stc(2)
  689. for loadup1=1,5 do
  690. loadup1=loadup1*20
  691. scp(24,16)
  692. w(loadup1)
  693. w([[%]])
  694. scp(27,16)
  695. w([[ ]])
  696. s(0.1)
  697. scp(20,17)
  698. w([[... ooo ...]])
  699. s(0.1)
  700. scp(20,17)
  701. w([[ .. Ooo .. ]])
  702. s(0.1)
  703. scp(20,17)
  704. w([[  . oOo .  ]])
  705. s(0.1)
  706. scp(20,17)
  707. w([[    ooO    ]])
  708. s(0.1)
  709. scp(22,17)
  710. w([[. ooo .]])
  711. s(0.1)
  712. scp(21,17)
  713. w([[.. ooo ..]])
  714. s(0.1)
  715. scp(20,17)
  716. w([[... ooo ...]])
  717. s(0.1)
  718. end
  719. r("clear")
  720. -- ############################################################################# --
  721. end
  722. function tabjumpshell()
  723. parallel.waitForAny(tabjump1, tabjump2)
  724. end
  725. tabjumpshell()
  726. -- ############### --
  727. function UpdaterL()
  728.  
  729.  
  730. fs.makeDir("LabyOS/Texture")
  731.     r("pastebin get QgZeJxkS LabyOS/Texture/Documents")
  732.     r("pastebin get U9TijTVq LabyOS/Texture/Login")
  733. fs.makeDir("LabyOS/Texture/Desktop")
  734.     r("pastebin get 9EvMFZbV LabyOS/Texture/Desktop/1")
  735.     r("pastebin get 007MQDJ6 LabyOS/Texture/Desktop/2")
  736.  
  737. -- ######################### -- Download Programme -- ############################ ---------------------------------#ADD Programme#--------------
  738. if not fs.exists("LabyOS/Config/TimeAPI") then
  739. TimeAPI = fs.open("LabyOS/Config/TimeAPI", "w")
  740. TimeAPI.write("MC")
  741. TimeAPI.close()
  742. end
  743.  
  744. fs.makeDir("LabyOS/Programme/")
  745. fs.makeDir("LabyOS/Texture/bin")
  746. fs.makeDir("LabyOS/Documents/admin/labystudio/apps")
  747.  
  748. r("delete startup")
  749. r("delete LabyOS/Programme/Shutdown")
  750. r("delete LabyOS/Programme/Setup")
  751. r("delete LabyOS/Programme/Run")
  752. r("delete LabyOS/Programme/Relog")
  753. r("delete LabyOS/Programme/Reboot")
  754. r("delete LabyOS/Programme/Desktop")
  755. r("delete LabyOS/Programme/Terminal")
  756. r("delete LabyOS/Programme/Manager")
  757. r("delete LabyOS/Programme/Documents")
  758. r("delete LabyOS/Programme/Browser")
  759. r("delete LabyOS/Programme/System")
  760. r("delete LabyOS/Programme/Shutdown")
  761. r("delete LabyOS/Programme/Settings")
  762. r("delete LabyOS/Programme/Paint")
  763. r("delete LabyOS/Programme/Editor")
  764. r("delete LabyOS/Texture/bin/Folder")
  765. r("delete LabyOS/Documents/admin/labystudio/apps/Skype")
  766.  
  767. r("pastebin get eVph1zkH startup")
  768. r("pastebin get AyKYQzA8 LabyOS/Programme/Shutdown")
  769. r("pastebin get qPumvzFP LabyOS/Programme/Setup")
  770. r("pastebin get NYJ8Ccvi LabyOS/Programme/Run")
  771. r("pastebin get kr0MY3t7 LabyOS/Programme/Relog")
  772. r("pastebin get pGwVjzQC LabyOS/Programme/Reboot")
  773. r("pastebin get gpwSk1e2 LabyOS/Programme/Desktop")
  774. r("pastebin get Vi6Z9X5k LabyOS/Programme/Terminal")
  775. r("pastebin get GPEMdx1q LabyOS/Programme/Manager")
  776. r("pastebin get SJBQ2vhW LabyOS/Programme/Documents")
  777. r("pastebin get Y9kdU79Y LabyOS/Programme/Browser")
  778. r("pastebin get VRUmKTTY LabyOS/Programme/System")
  779. r("pastebin get CcdCv5wa LabyOS/Programme/Settings")
  780. r("pastebin get aL3UtyWV LabyOS/Programme/Paint")
  781. r("pastebin get myAdtvXj LabyOS/Programme/Editor")
  782. r("pastebin get JE3Ve34F LabyOS/Texture/bin/Task")
  783. r("pastebin get Znakc8nq LabyOS/Texture/bin/File")
  784. r("pastebin get Ped1KULT LabyOS/Texture/bin/Folder")
  785. -- apps
  786. r("pastebin get D9DefNaP LabyOS/Documents/admin/labystudio/apps/Skype")
  787.  
  788. os.reboot()
  789. end
  790. -- ########################## -- Get FULL -- ############################ --
  791. function fullV2()
  792. scp(-90,10)
  793. stc(1)
  794. if http then
  795. if fs.exists("LabyOS/Config/LabyOSUpdate") then
  796. fs.delete("LabyOS/Config/LabyOSUpdate")
  797. end
  798. end
  799. -- ########################## -- Download Design -- ############################ --
  800. fs.makeDir("LabyOS/Config")
  801.     r("pastebin get gffqXK2c LabyOS/Config/LabyOSUpdate")
  802.    
  803.    
  804. if not fs.exists("LabyOS/Config/OSversion") then
  805. version = fs.open("LabyOS/Config/OSversion", "w")
  806. version.write(OfficialVersion)
  807. version.close()
  808. end
  809. if not fs.exists("LabyOS/Programme") then
  810. UpdaterL()
  811. end
  812. -- ######################### -- Load select -- ############################
  813. r("clear")
  814. para(terminate, LabyOSUpdateLogin1)
  815. end
  816. function fullV1()
  817. for loadup2=1,2 do
  818. loadup2=loadup2*45
  819. scp(24,16)
  820. w(loadup2)
  821. w([[%]])
  822. scp(27,16)
  823. w([[ ]])
  824. s(0.1)
  825. scp(20,17)
  826. w([[... ooo ...]])
  827. s(0.1)
  828. scp(20,17)
  829. w([[ .. Ooo .. ]])
  830. s(0.1)
  831. scp(20,17)
  832. w([[  . oOo .  ]])
  833. s(0.1)
  834. scp(20,17)
  835. w([[    ooO    ]])
  836. s(0.1)
  837. scp(22,17)
  838. w([[. ooo .]])
  839. s(0.1)
  840. scp(21,17)
  841. w([[.. ooo ..]])
  842. s(0.1)
  843. scp(20,17)
  844. w([[... ooo ...]])
  845. s(0.1)
  846. end
  847. end
  848. function fullV()
  849. parallel.waitForAny(fullV1(), fullV2())
  850. end
  851. -- ######################################################################### --
  852. -- ########################## -- Start auswahl -- ############################ --
  853. function Systemstart1()
  854. systemadd2 = {}
  855. systemadd1 = 1
  856. -- ## Optionen ## --
  857. systemadd2[1] = "Run LabyOS      "
  858. systemadd2[2] = "Run Updater     "
  859. systemadd2[3] = "Run CraftOS     "
  860. systemadd2[4] = "Uninstall LabyOS"
  861. -- ############## --
  862. function run1(numer)
  863.  if numer == 1 then
  864. -- ## Option 1 ## --
  865. fullV()
  866. -- ################ --  
  867. end
  868.  if numer == 2 then
  869. -- ## Option 2 ## --
  870. UpdaterL()
  871. -- ################ --  
  872.  end
  873.   if numer == 3 then
  874. -- ## Option 3 ## --
  875. r("clear")
  876. print(os.version())
  877. -- ################ --  
  878.  end
  879.   if numer == 4 then
  880. -- ## Option 4 ## --
  881. p([[Uninstall LabyOS..]])
  882. s(0.1)
  883. p([[**RUN Uninstaller**]])
  884. s(0.1)
  885. r("delete LabyOS")
  886. r("delete OSVersion")
  887. r("delete startup")
  888. p([[**LabyOS removed**]])
  889. sleep(0.1)
  890. os.reboot()
  891. -- ################ --  
  892.  end
  893. end
  894. function Taste()
  895.  sleep(0)
  896.  event, argument = os.pullEvent()
  897.  if event == "key" then
  898.   if argument == 28 then
  899.    return run1(systemadd1)
  900.   elseif argument == 200 then
  901.    if systemadd1 == 1 then
  902.    else
  903.     systemadd1 = systemadd1 - 1
  904.    end
  905.   elseif argument == 208 then
  906.    if systemadd1 == table.getn(systemadd2) then
  907.    else
  908.     systemadd1 = systemadd1 + 1
  909.    end
  910.   else
  911.    return Taste()
  912.   end
  913.  else
  914.   return Taste()
  915.  end
  916.  return menu()
  917. end
  918. function menu()
  919. -- ## Option-Design ## --
  920. r("clear")
  921. stc(16)
  922. p([[LabyOS - Windows XP:]])
  923. stc(1)
  924. p([[---------------------------------------------------]])
  925. -- ################ --  
  926.  for i=1, table.getn(systemadd2) do
  927.   if systemadd1 == i then
  928. -- ## Option-Pfeil ## --
  929.    print("> "..systemadd2[i].."")
  930.   else
  931.    print("  "..systemadd2[i].."")
  932. -- ################ --  
  933.   end
  934.  end
  935.  return Taste()
  936. end
  937. shell.run("clear")
  938. return menu()
  939. end
  940. -- ## RUN ## --
  941. Systemstart1()
  942. -- ######### --
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement