if getgenv().EvadeCode then game:GetService("Players").LocalPlayer.PlayerGui.Global.Messages.Use:Fire("You already used this", "Error") return end getgenv().EvadeCode = true local ReplicatedStorage = game:GetService("ReplicatedStorage") local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local RemoteEvent = ReplicatedStorage.Events.Data.UseCode local MessageEvent = LocalPlayer.PlayerGui.Global.Messages.Use local URL = "https://evade-nextbot.fandom.com/wiki/Codes" local function getContent(url) local success, content = pcall(function() return game:HttpGet(url, true) end) if success then return content else return nil end end local function extractTRData(htmlContent) if not htmlContent then return {} end local tableRows = {} local trPattern = "(.-)" for trContent in htmlContent:gmatch(trPattern) do local rowData = {} local codePattern = "]*>%s*]*>(.-)" local code = trContent:match(codePattern) if code then code = code:gsub("<", "<") code = code:gsub(">", ">") code = code:gsub("&", "&") code = code:gsub(""", '"') code = code:match("^%s*(.-)%s*$") or code rowData.code = code end local tdPattern = "]*>(.-)" local tdCount = 0 local tds = {} for tdContent in trContent:gmatch(tdPattern) do tdCount = tdCount + 1 local cleanContent = tdContent :gsub("<[^>]+>", "") :gsub("<", "<") :gsub(">", ">") :gsub("&", "&") :gsub(""", '"') :gsub("%s+", " ") :match("^%s*(.-)%s*$") or tdContent table.insert(tds, cleanContent) end if tdCount >= 2 and not rowData.code then rowData.code = tds[1] rowData.description = tdCount >= 2 and tds[2] or "" rowData.status = tdCount >= 3 and tds[3] or "" rowData.date = tdCount >= 4 and tds[4] or "" elseif rowData.code then rowData.description = tdCount >= 2 and tds[1] or "" rowData.status = tdCount >= 3 and tds[2] or "" rowData.date = tdCount >= 4 and tds[3] or "" end local statusPattern = "]*>%s*]*>([^<]+)%s*" local statusValue = trContent:match(statusPattern) if statusValue then statusValue = statusValue:lower():gsub("%s+", "") if statusValue == "true" or statusValue == "false" then rowData.spanStatus = statusValue end end if not rowData.spanStatus then local truePos = trContent:lower():find("true") local falsePos = trContent:lower():find("false") if truePos then rowData.spanStatus = "true" elseif falsePos then rowData.spanStatus = "false" end end if rowData.code and #rowData.code > 0 then table.insert(tableRows, rowData) end end return tableRows end local function useCodeWithFeedback(code) local success, response = pcall(function() return RemoteEvent:InvokeServer(code) end) if not success then MessageEvent:Fire("Failed to fetch our Wikipedia content, please try again later", "Error") return end if response == nil then MessageEvent:Fire("Redeemed!", "Success") elseif type(response) == "boolean" then if response then MessageEvent:Fire("Accepted!", "Success") else MessageEvent:Fire("Invalid", "Error") end elseif type(response) == "string" then local lower = response:lower() if lower:find("success") or lower:find("accepted") or lower:find("redeemed") or lower:find("reward") then MessageEvent:Fire(response, "Success") elseif lower:find("invalid") or lower:find("error") or lower:find("failed") or lower:find("already") then MessageEvent:Fire(response, "Error") else MessageEvent:Fire(response, "Info") end elseif type(response) == "table" then if response.success == true then MessageEvent:Fire(response.message or "Success", "Success") elseif response.success == false then MessageEvent:Fire(response.message or "Failed", "Error") elseif response.error then MessageEvent:Fire(response.error, "Error") elseif response.message then MessageEvent:Fire(response.message, "Info") else MessageEvent:Fire("Processed", "Info") end else MessageEvent:Fire("Response: " .. tostring(response), "Info") end end local function main() MessageEvent:Fire("Starting code extraction...", "Info") local htmlContent = getContent(URL) if not htmlContent then MessageEvent:Fire("Failed to fetch our Wikipedia content", "Error") return end local tableRows = extractTRData(htmlContent) if #tableRows == 0 then MessageEvent:Fire("No table rows found", "Error") return end MessageEvent:Fire("Found " .. #tableRows .. " table rows", "Info") local trueCodes = {} local falseCodes = {} local unknownCodes = {} for i, row in ipairs(tableRows) do local status = row.spanStatus or "unknown" if status == "true" then table.insert(trueCodes, row.code) elseif status == "false" then table.insert(falseCodes, row.code) else table.insert(unknownCodes, row.code) end end MessageEvent:Fire("True codes: " .. #trueCodes, "Success") MessageEvent:Fire("False codes: " .. #falseCodes, "Error") MessageEvent:Fire("Unknown codes: " .. #unknownCodes, "Warning") MessageEvent:Fire("Code Will be redeem in 5 Second", "Message") wait(5) local validCodes = {} for _, code in ipairs(trueCodes) do table.insert(validCodes, code) end for _, code in ipairs(unknownCodes) do table.insert(validCodes, code) end if #validCodes == 0 then MessageEvent:Fire("No valid codes to try", "Error") return end for i, code in ipairs(validCodes) do MessageEvent:Fire("Processing [" .. i .. "/" .. #validCodes .. "]: " .. code, "Info") useCodeWithFeedback(code) end end main()