Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function download(pastebinID, destination)
- local httpHandle = http.get(string.format("http://pastebin.com/raw.php?i=%s", textutils.urlEncode(pastebinID)))
- local fileHandle = fs.open(destination, "w")
- fileHandle.write(httpHandle.readAll())
- fileHandle.close()
- httpHandle.close()
- end
- local files = {
- ["startup"] = "Z5jC3sV3",
- ["!MissionControl"] = "sVY4Px6t",
- ["!refuel"] = "dqDwAsN4",
- ["!tunnel"] = "iZVtZTg7",
- ["!message"] = "SFvmNy2c",
- ["!chat"] = "eN3UcXK0",
- ["turtlestartup"] = "GeBw9Ycg"
- }
- local path = "/" -- customize this
- for key, value in pairs(files) do
- download(value, fs.combine(path, key))
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement