Advertisement
Mackan90096

MackOS [1.2] Release Edition installer

Apr 23rd, 2013
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.81 KB | None | 0 0
  1. function install()
  2. file1 = http.get("http://mackan90096.dustinschreiber.com/MackOS/files/1.2/startup") --This line downloads the file
  3. file1txt = file1.readAll() --Reads the contents
  4. file1opn = fs.open("startup","w") --Opens file
  5. file1opn.write(file1txt) --writing the file
  6. file1opn.close()
  7.  
  8. file2 = http.get("http://mackan90096.dustinschreiber.com/MackOS/files/1.2/file") --This line downloads the file
  9. file2txt = file2.readAll() --Reads the contents
  10. file2opn = fs.open("file","w") --Opens file
  11. file2opn.write(file2txt) --writing the file
  12. file2opn.close()
  13.  
  14. file3 = http.get("http://mackan90096.dustinschreiber.com/MackOS/files/1.2/mouse.cfg") --This line downloads the file
  15. file3txt = file3.readAll() --Reads the contents
  16. file3opn = fs.open("mouse.cfg","w") --Opens file
  17. file3opn.write(file3txt) --writing the file
  18. file3opn.close()
  19.  
  20. file4 = http.get("http://mackan90096.dustinschreiber.com/MackOS/files/1.2/.bar1") --This line downloads the file
  21. file4txt = file4.readAll() --Reads the contents
  22. file4opn = fs.open(".bar1","w") --Opens file
  23. file4opn.write(file4txt) --writing the file
  24. file4opn.close()
  25.  
  26. file5 = http.get("http://mackan90096.dustinschreiber.com/MackOS/files/1.2/.logo") --This line downloads the file
  27. file5txt = file5.readAll() --Reads the contents
  28. file5opn = fs.open(".logo","w") --Opens file
  29. file5opn.write(file5txt) --writing the file
  30. file5opn.close()
  31.  
  32. file6 = http.get("http://mackan90096.dustinschreiber.com/MackOS/files/1.2/.icon") --This line downloads the file
  33. file6txt = file6.readAll() --Reads the contents
  34. file6opn = fs.open(".icon","w") --Opens file
  35. file6opn.write(file6txt) --writing the file
  36. file6opn.close()
  37.  
  38. file7 = http.get("http://mackan90096.dustinschreiber.com/MackOS/files/1.2/.trivia") --This line downloads the file
  39. file7txt = file7.readAll() --Reads the contents
  40. file7opn = fs.open(".trivia","w") --Opens file
  41. file7opn.write(file7txt) --writing the file
  42. file7opn.close()
  43.  
  44. fs.makeDir("/programs")
  45.  
  46. file8 = http.get("http://mackan90096.dustinschreiber.com/MackOS/files/1.2/programs/ccTube") --This line downloads the file
  47. file8txt = file8.readAll() --Reads the contents
  48. file8opn = fs.open("/programs/ccTube","w") --Opens file
  49. file8opn.write(file8txt) --writing the file
  50. file8opn.close()
  51.  
  52. file9 = http.get("http://mackan90096.dustinschreiber.com/MackOS/files/1.2/programs/lightshot") --This line downloads the file
  53. file9txt = file9.readAll() --Reads the contents
  54. file9opn = fs.open("/programs/lightshot","w") --Opens file
  55. file9opn.write(file9txt) --writing the file
  56. file9opn.close()
  57.  
  58. fs.makeDir("/games")
  59.  
  60. file10 = http.get("http://mackan90096.dustinschreiber.com/MackOS/files/1.2/games/craftogram") --This line downloads the file
  61. file10txt = file10.readAll() --Reads the contents
  62. file10opn = fs.open("/games/craftogram","w") --Opens file
  63. file10opn.write(file10txt) --writing the file
  64. file10opn.close()
  65. end
  66.  
  67.  
  68. function main()
  69. if not term.isColor() then
  70. term.clear()
  71. term.setCursorPos(1,1)
  72. print("This requires a advanced computer to work!")
  73. sleep(2)
  74. else      
  75.  
  76. w, h = term.getSize()
  77.         term.clear()
  78.         term.setBackgroundColor(2048)
  79.         term.setTextColor(1)
  80.         term.clear()
  81.         term.setCursorPos(math.floor(w-string.len(" __  ___           __   ____  _____"))/2, 2)
  82.         print(" __  ___           __   ____  _____")
  83. term.setCursorPos(math.floor(w-string.len("   /  |/  /___ ______/ /__/ __ \/ ___/"))/2, 3)
  84. print("   /  |/  /___ ______/ /__/ __ \/ ___/")
  85. term.setCursorPos(math.floor(w-string.len("  / /|_/ / __ `/ ___/ //_/ / / /\__ \ "))/2, 4)
  86. print("  / /|_/ / __ `/ ___/ //_/ / / /\__ \ ")
  87. term.setCursorPos(math.floor(w-string.len(" / /  / / /_/ / /__/ ,< / /_/ /___/ / "))/2,5)
  88. print(" / /  / / /_/ / /__/ ,< / /_/ /___/ / ")
  89. term.setCursorPos(math.floor(w-string.len("/_/  /_/\__,_/\___/_/|_|\____//____/ "))/2,6)
  90. print("/_/  /_/\__,_/\___/_/|_|\____//____/ ")
  91.         paintutils.drawLine(3,10,17,10, 256)
  92.         install()
  93.         sleep(1)
  94.         paintutils.drawPixel(3,10, 8)
  95.         paintutils.drawPixel(4,10, 8)
  96.         paintutils.drawPixel(5,10, 8)
  97.         paintutils.drawPixel(6,10, 8)
  98.         paintutils.drawPixel(7,10, 8)
  99.         sleep(1)
  100.         paintutils.drawPixel(8,10, 8)
  101.         paintutils.drawPixel(9,10, 8)
  102.         paintutils.drawPixel(10,10, 8)
  103.         paintutils.drawPixel(11,10, 8)
  104.         paintutils.drawPixel(12,10, 8)
  105.         sleep(1)
  106.         term.clear()
  107.         paintutils.drawPixel(13,10, 8)
  108.         paintutils.drawPixel(14,10, 8)
  109.         paintutils.drawPixel(15,10, 8)
  110.         paintutils.drawPixel(16,10, 8)
  111.         paintutils.drawPixel(17,10, 8)
  112.         term.setBackgroundColor(2048)
  113.         term.setTextColor(1)
  114.         term.setCursorPos(1,1)
  115.         print("Installed!")
  116.         term.setCursorPos(1,2)
  117.         print("Your computer will now reboot!")
  118.         sleep(5)
  119.         os.reboot()
  120. end
  121. end
  122.  
  123. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement