Advertisement
Blackhome

Downloader

Jan 6th, 2025 (edited)
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.23 KB | None | 0 0
  1. pastebinCode, programName = ...
  2.  
  3. local pastebinPrograms = {{pastebinCode, programName}}
  4. if not pastebinCode then
  5.     -- array of all programms: { {pastebinCode, name}, ... }
  6.     pastebinPrograms = {
  7.         {"gXNbkqEq", "move1"},
  8.         {"SBFhJsWE", "inspect1"},
  9.         {"6BHSbwQQ", "dropAll1"},
  10.         --{"hVkMNCvw", "collectLava1"},
  11.         --{"DPmmbNjZ", "Miner"},
  12.         --{"DNEwQzVY", "3x3_Tunnler"},
  13.         --{"gZnCZ1kD", "LavaLoader"},
  14.         --{"05RYAd3T", "Lumberjack"},
  15.         --{"St5ykWrZ", "FluidProofer"},
  16.         --{"tCqp2NLe", "LavaPlacer"},
  17.         --{"FSCkCHyq", "BucketLavaCollector"},
  18.         {"ZYU4qakm", "GravelQuarry"},
  19.         {"uHjgNtkQ", "AreaBuilder"},
  20.         {"m5uwNahc", "CactusFarm"}
  21.     }
  22. end
  23.  
  24. -- function to download the program
  25. local function downloadProgram(pastebinCode, fileName)
  26.     local  command = "delete " .. fileName
  27.     local success, message = shell.run(command)
  28.    
  29.     command = "pastebin get " .. pastebinCode .. " " .. fileName
  30.     success, message = shell.run(command)
  31. end
  32.  
  33. -- download all programs from list
  34. for _, program in ipairs(pastebinPrograms) do
  35.     local code, name = unpack(program)
  36.     downloadProgram(code, name)
  37. end
  38.  
  39. print("All downloads comleted!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement