-- ========================================== -- CONFIGURATION -- ========================================== local PRIMARY_URL = "https://raw.github.com/tomatotxt/fe2/>/farm" local FALLBACK_URL = "https://pastebin.com/raw/LiiamA0r" -- ========================================== -- UNIVERSAL HTTP & LOADSTRING HELPER -- ========================================== local function safeExecuteFromUrl(url) if not url or url == "" then return false, "Invalid or empty URL provided." end -- 1. Universal HttpGet Fallback Handling local httpGet = game.HttpGet local fetchSuccess, rawScript = pcall(function() -- Attempt HttpGet with cache-bypassing where supported return httpGet(game, url, true) end) if not fetchSuccess or type(rawScript) ~= "string" or #rawScript == 0 then return false, "HTTP Fetch Failed (Network/404 Error)" end -- 2. Safe Compilation (Loadstring) local loadstringFunc = loadstring or getgenv().loadstring if not loadstringFunc then return false, "Executor does not support loadstring." end local compileSuccess, compiledFunc = pcall(function() return loadstringFunc(rawScript) end) if not compileSuccess or type(compiledFunc) ~= "function" then return false, "Compilation Failed (Syntax Error in remote script)" end -- 3. Safe Execution (pcall runtime) local runSuccess, runError = pcall(compiledFunc) if not runSuccess then return false, "Runtime Execution Error: " .. tostring(runError) end return true, "Success" end -- ========================================== -- MAIN LOADER LOGIC -- ========================================== local success, errMessage = safeExecuteFromUrl(PRIMARY_URL) if success then print("[Loader] Successfully loaded primary script.") else warn("[Loader] Primary script failed: " .. tostring(errMessage)) warn("[Loader] Attempting fallback script...") local fallbackSuccess, fallbackErr = safeExecuteFromUrl(FALLBACK_URL) if fallbackSuccess then print("[Loader] Successfully loaded fallback script.") else warn("[Loader] CRITICAL: Fallback script also failed: " .. tostring(fallbackErr)) end end