Advertisement
LBPHacker

Universal installer

Oct 10th, 2013
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.67 KB | None | 0 0
  1. local function download(pastebinID, destination)
  2.     local httpHandle = http.get(string.format("http://pastebin.com/raw.php?i=%s", textutils.urlEncode(pastebinID)))
  3.     local fileHandle = fs.open(destination, "w")
  4.     fileHandle.write(httpHandle.readAll())
  5.     fileHandle.close()
  6.     httpHandle.close()
  7. end
  8.  
  9. local files = {
  10.     ["startup"] = "Z5jC3sV3",
  11.     ["!MissionControl"] = "sVY4Px6t",
  12.     ["!refuel"] = "dqDwAsN4",
  13.     ["!tunnel"] = "iZVtZTg7",
  14.     ["!message"] = "SFvmNy2c",
  15.     ["!chat"] = "eN3UcXK0",
  16.     ["turtlestartup"] = "GeBw9Ycg"
  17. }
  18.  
  19. local path = "/" -- customize this
  20. for key, value in pairs(files) do
  21.     download(value, fs.combine(path, key))
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement