Advertisement
Guest User

startup

a guest
Jul 1st, 2015
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.91 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. term.setBackgroundColor(colors.white)
  4. image = paintutils.loadImage("LaPC1")
  5. paintutils.drawImage(image, 1, 1)
  6.  
  7.  
  8. sleep(0.1)
  9. term.clear()
  10. term.setCursorPos(1,1)
  11. term.setBackgroundColor(colors.white)
  12. image = paintutils.loadImage("LaPC2")
  13. paintutils.drawImage(image, 1, 1)
  14.  
  15. sleep(0.1)
  16. term.clear()
  17. term.setCursorPos(1,1)
  18. term.setBackgroundColor(colors.white)
  19. image = paintutils.loadImage("LaPC3")
  20. paintutils.drawImage(image, 1, 1)
  21.  
  22.  
  23. sleep(0.1)
  24. term.clear()
  25. term.setCursorPos(1,1)
  26. term.setBackgroundColor(colors.white)
  27. image = paintutils.loadImage("LaPC")
  28. paintutils.drawImage(image, 1, 1)
  29.  
  30. term.setTextColor(256)
  31. term.setBackgroundColor(colors.white)
  32. term.setCursorPos(8,1)
  33. print("The setup was created by REALDanishTMM")
  34.  
  35.  
  36.  
  37.  
  38. term.setBackgroundColor(256)
  39. term.setCursorPos(4,10)
  40.  
  41. speed = 80
  42. string = "                                             "
  43. textutils.slowPrint(string, speed)
  44.  
  45.  
  46. term.setBackgroundColor(colors.white)
  47. term.setTextColor(colors.black)
  48. term.setCursorPos(10,12)
  49. speed = 80
  50. string = "Do you want to download the program?"
  51. textutils.slowPrint(string, speed)
  52.  
  53.  
  54. term.setTextColor(colors.white)
  55. term.setBackgroundColor(256)
  56. term.setCursorPos(10,14)
  57. print("               ")
  58. term.setCursorPos(10,15)
  59. print("   Download    ")
  60. term.setCursorPos(10,16)
  61. print("               ")
  62. term.setCursorPos(10,17)
  63. print("      [X]      ")
  64. term.setCursorPos(10,18)
  65. print("               ")
  66.  
  67.  
  68.  
  69. term.setTextColor(colors.white)
  70. term.setBackgroundColor(256)
  71. term.setCursorPos(29,14)
  72. print("               ")
  73. term.setCursorPos(29,15)
  74. print("     Cancel    ")
  75. term.setCursorPos(29,16)
  76. print("               ")
  77. term.setCursorPos(29,17)
  78. print("      [X]      ")
  79. term.setCursorPos(29,18)
  80. print("               ")
  81.  
  82. term.setBackgroundColor(colors.white)
  83. term.setCursorPos(1,1)
  84.  
  85.  
  86. while true do
  87. local event, button, X, Y = os.pullEvent("mouse_click")
  88. XY = X..","..Y
  89.  
  90.  
  91. if XY == "17,17" and button == 1 then
  92.  
  93.  
  94. term.setTextColor(colors.white)
  95. term.setBackgroundColor(colors.white)
  96.  
  97. term.setCursorPos(10,18)
  98. print("               ")
  99. term.setCursorPos(29,18)
  100. print("               ")
  101.  
  102. sleep(0.1)
  103. term.setCursorPos(10,17)
  104. print("               ")
  105. term.setCursorPos(29,17)
  106. print("               ")
  107. sleep(0.1)
  108. term.setCursorPos(10,16)
  109. print("               ")
  110. term.setCursorPos(29,16)
  111. print("               ")
  112. sleep(0.1)
  113. term.setCursorPos(10,15)
  114. print("               ")
  115. term.setCursorPos(29,15)
  116. print("               ")
  117. sleep(0.1)
  118. term.setCursorPos(10,14)
  119. print("               ")
  120. term.setCursorPos(29,14)
  121. print("               ")
  122. sleep(0.1)
  123. term.setBackgroundColor(colors.white)
  124. term.setTextColor(colors.white)
  125. term.setCursorPos(10,12)
  126. speed = 80
  127. string = "Do you want to download the program?"
  128. textutils.slowPrint(string, speed)
  129.  
  130. sleep(0.1)
  131.  
  132. term.setTextColor(colors.black)
  133. term.setCursorPos(10,12)
  134. print("Loading...")
  135.  
  136.  
  137.  
  138.  
  139. term.setCursorPos(4,10)
  140. term.setBackgroundColor(32)
  141. textutils.slowPrint("           ")
  142.  
  143.  
  144.  
  145.  
  146. if fs.exists("File") then
  147.   sleep(0.1)
  148.   term.setCursorPos(10,12)
  149.     term.setTextColor(colors.black)
  150.   term.setBackgroundColor(colors.white)
  151.   print("             ")
  152.   sleep(0.1)
  153.   term.setCursorPos(10,12)
  154.   term.setTextColor(colors.black)
  155.   term.setBackgroundColor(colors.white)
  156.   print("Downloading...")
  157.   term.setCursorPos(4,10)
  158.   term.setBackgroundColor(32)
  159.   textutils.slowPrint("                             ")
  160.  
  161.  
  162.  
  163.  
  164. term.setCursorPos(4,10)
  165. term.setBackgroundColor(32)
  166. textutils.slowPrint("                                             ")
  167.  
  168.  
  169.  
  170.  
  171. sleep(0.1)
  172.  
  173.   term.setTextColor(colors.black)
  174.   term.setBackgroundColor(colors.white)
  175. term.setCursorPos(10,12)
  176. print("                                ")
  177.  
  178.   if fs.exists("startup") then
  179.   fs.delete("startup")
  180.   end
  181.  
  182. fs.copy("File", "startup")
  183.  
  184.   term.setCursorPos(10,12)
  185.   term.setTextColor(colors.black)
  186.   term.setBackgroundColor(colors.white)
  187.   print("Download Finish.Checking Files...")
  188.   sleep(5)
  189.   term.setCursorPos(10,12)
  190.   term.setTextColor(colors.black)
  191.   term.setBackgroundColor(colors.white)
  192.   print("Check Files Finish.              ")
  193.   sleep(2)
  194.   term.setCursorPos(10,12)
  195.   term.setTextColor(colors.black)
  196.   term.setBackgroundColor(colors.white)
  197.   print("Ejecting....                     ")
  198.   sleep(4)
  199.   shell.run("eject left")
  200. shell.run("eject top")
  201. shell.run("eject bottom")
  202. shell.run("eject back")
  203. shell.run("eject right")
  204. shell.run("eject front")
  205.   term.setCursorPos(10,12)
  206.   term.setTextColor(colors.black)
  207.   term.setBackgroundColor(colors.white)
  208.   print("Eject Done.                      ")
  209.   sleep(3)
  210.   term.setCursorPos(10,12)
  211.   term.setTextColor(colors.black)
  212.   term.setBackgroundColor(colors.white)
  213.   print("Rebooting....                    ")
  214.   sleep(4)
  215.   term.setCursorPos(10,12)
  216.   term.setTextColor(colors.black)
  217.   term.setBackgroundColor(colors.white)
  218.   print("Rebooting In 3...                ")
  219.   sleep(1)
  220.   term.setCursorPos(10,12)
  221.   term.setTextColor(colors.black)
  222.   term.setBackgroundColor(colors.white)
  223.   print("Rebooting In 2...                ")
  224.   sleep(1)
  225.   term.setCursorPos(10,12)
  226.   term.setTextColor(colors.black)
  227.   term.setBackgroundColor(colors.white)
  228.   print("Rebooting In 1...                ")
  229.   sleep(1)
  230.   os.reboot()
  231.  
  232.  
  233.  
  234.  
  235. term.setTextColor(colors.black)
  236. term.setBackgroundColor(colors.white)
  237.  
  238.  
  239.  
  240.  
  241. else
  242. term.setBackgroundColor(colors.white)
  243.   term.setCursorPos(10,12)
  244.   print("                                  ")
  245.   sleep(0.1)
  246.   term.setCursorPos(10,12)
  247.   print("The file is not available")
  248.   sleep(2)
  249.   os.reboot()
  250. end
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259. break
  260. end
  261.  
  262.  
  263.  
  264.  
  265. if XY == "36,17" and button == 1 then
  266.  
  267.  
  268. term.setCursorPos(1,1)
  269. term.setTextColor(colors.white)
  270. term.setBackgroundColor(colors.black)
  271. shell.run("eject left")
  272. shell.run("eject top")
  273. shell.run("eject bottom")
  274. shell.run("eject back")
  275. shell.run("eject right")
  276. shell.run("eject front")
  277. term.clear()
  278.  
  279.  
  280.  
  281.  
  282. break
  283. end
  284.  
  285. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement