Theshadow989

[xOS] Download

Jan 7th, 2016
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.10 KB | None | 0 0
  1. --[[
  2. Download File
  3. Written by TheShadow989
  4. ]]--
  5.  
  6. file = { "startup", "back", ".menu", "xos/.usertable", "xos/.browser", "xos/.command", "xos/.accounts", "xos/.addaccounts", "xos/.removeaccounts", "xos/.firsttime", "xos/.programs", "xos/.details", "xos/api/sha256" }
  7.  
  8. link = { "KzPTUk1P", "HbePS1MV", "gyMa4EKw", "1eUETTRe", "0jQGz4R3", "muafEtGW", "9gq5ehU9", "GUceYKJ8", "PXb14tuS", "y2XBCgyH", "UbFvt8ez", "vndFSzNA" , "cHmYHP6E"}
  9.  
  10. term.clear()
  11.  
  12. local function kPrint(string)
  13.     x, _ = term.getSize()
  14.     _, y = term.getCursorPos()
  15.     term.setCursorPos((x-#string)/2,y)
  16.     print(string)
  17. end
  18.  
  19. term.setCursorPos(1,2)
  20. kPrint("xOS Installer")
  21. sleep(1)
  22. term.setCursorPos(1,9)
  23. kPrint("Downloading...")
  24. term.setCursorPos(1,10)
  25. kPrint("[             ]")
  26.  
  27. for i=1, 13 do
  28.     term.setCursorPos(5,14)
  29.     shell.run("pastebin get "..link[i].." "..file[i].."")
  30.     term.setCursorPos(1,15)
  31.     term.clearLine()
  32.     term.setCursorPos(1,14)
  33.     term.clearLine()
  34.     kPrint(""..file[i].." Downloaded")
  35.     term.setCursorPos(18 + i,10)
  36.     write("#")
  37.     sleep(0.1)
  38. end
  39. sleep(2)
  40. os.reboot()
Add Comment
Please, Sign In to add comment