local OWNER = "scriptarchives" local REPONAME = "FE-Emotes" local FILENAME = "FE-Emotes" local EXTENSION = "luau" local MAX_RETRIES = 3 local RETRY_BACKOFF = 1.5 local function BUILD_URLS() local HOST = ("%s.github.io"):format(OWNER) local URLS = {} table.insert(URLS, ("https://%s/%s.%s"):format(HOST, FILENAME, EXTENSION)) if REPONAME and REPONAME ~= "" then table.insert(URLS, ("https://%s/%s/%s.%s"):format(HOST, REPONAME, FILENAME, EXTENSION)) end return URLS end local function SAFE_HTTP_GET(URL) local ATTEMPT = 1 local WAIT_TIME = 1 while ATTEMPT <= MAX_RETRIES do local OK, RESULT = pcall(function() if type(game.HttpGetAsync) == "function" then return game:HttpGetAsync(URL) elseif type(game.HttpGet) == "function" then return game:HttpGet(URL) else error("No HttpGet function available") end end) if OK and type(RESULT) == "string" and #RESULT > 0 then return true, RESULT end task.wait(WAIT_TIME) WAIT_TIME = WAIT_TIME * RETRY_BACKOFF ATTEMPT = ATTEMPT + 1 end return false, ("Failed to fetch %s after %d attempts"):format(URL, MAX_RETRIES) end local function EXECUTE_DIRECT(CODE) return loadstring(CODE)() end local function EXECUTE_COMPILED(CODE) local FN = loadstring(CODE) return FN() end local STRATEGIES = { EXECUTE_DIRECT, EXECUTE_COMPILED } local function CHOOSE_STRATEGY() math.randomseed(tick() + os.clock() * 1000) return STRATEGIES[math.random(1, #STRATEGIES)] end local function INITIALISE() local URLS = BUILD_URLS() for _, URL in ipairs(URLS) do local OK, RESPONSE = SAFE_HTTP_GET(URL) if OK and type(RESPONSE) == "string" then local EXECUTOR = CHOOSE_STRATEGY() local SUCCESS, ERR = pcall(EXECUTOR, RESPONSE) if SUCCESS then print("[LOADER] SUCCESS:", URL) return true else warn("[LOADER] EXECUTION ERROR:", ERR) end end end warn("[LOADER] ALL URLS FAILED") return false end INITIALISE()