Advertisement
Alakazard12

Boot Loader Installer

Mar 15th, 2013
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.65 KB | None | 0 0
  1. local Loader = "https://raw.github.com/alakazard12/BootLoader/master/startup"
  2. HttpEnabled = false
  3. if http then
  4.   HttpEnabled = true
  5. end
  6.  
  7. local function Download(Link)
  8.   if HttpEnabled == false then
  9.         return
  10.     end
  11.     local File = http.get(Link)
  12.     if not File then
  13.         return
  14.     else
  15.         local ToR = File.readAll()
  16.         File.close()
  17.         return ToR
  18.     end
  19. end
  20.  
  21. if fs.exists("/startup") then
  22.   fs.delete("/startup")
  23. end
  24.  
  25. print("Downloading")
  26. local Get = Download(Loader)
  27. if Get == false then
  28.   print("Unable to download")
  29.   Fl.close()
  30.   return
  31. end
  32. print("Installing")
  33. local Fl = fs.open("/startup", "w")
  34. Fl.write(Get)
  35. Fl.close()
  36. shell.run("startup")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement