do if type(getrlyunyz) ~= 'function' then gg.alert('请使用RLGG执行') os.exit() return end local info = { example_version = '1.0.3', name = '内置2.0', appid = '101760', appkey = '4yfYFeKA2265fy28', rc4key = 'zy1MXAVlLAM6mlCi', version = '2.0', mi_type = '3' } local rlyunyz = getrlyunyz(info) local ret = rlyunyz.start() if not ret or not isTable(ret) or ret.sign ~= '759dc7ad511d2957a0589f60926643d9' then os.exit() return end end function Main() SN = gg.choice({ "选择进程", "自改车牌", "自改金币", "自改车速", "自改配件", "自改视角", "退出脚本" }, 2018, "购买会员请联系作者") if SN == 1 then a() end if SN == 2 then b() end if SN == 3 then c() end if SN == 4 then d() end if SN == 5 then e() end if SN == 6 then f() end if SN == 7 then Exit() end XGCK = -1 end function a() gg.setProcessX() gg.toast("开启成功") end function b() function main() while true do local prompt = gg.prompt( {"请输入旧车牌:", "请输入新车牌:"}, {[1] = "", [2] = ""}, {[1] = "text", [2] = "text"} ) -- 如果用户点了弹窗外部或取消,gg.prompt 会返回 nil if prompt == nil then gg.toast("脚本已退出") return end local oldText = prompt[1] local newText = prompt[2] if oldText == "" or newText == "" then gg.toast("文本不能为空,请重新输入") else gg.setVisible(false) gg.setRanges( gg.REGION_JAVA_HEAP | gg.REGION_C_HEAP | gg.REGION_C_ALLOC | gg.REGION_C_DATA | gg.REGION_C_BSS | gg.REGION_PPSSPP | gg.REGION_ANONYMOUS ) gg.clearResults() gg.searchNumber(";" .. oldText, gg.TYPE_WORD) local count = gg.getResultsCount() if count == 0 then gg.toast("未找到: " .. oldText) else gg.getResults(count) gg.editAll(";" .. newText, gg.TYPE_WORD) gg.toast("成功替换 " .. count .. " 处") end gg.clearResults() gg.setVisible(true) end end end main() -- 👈 添加这一行来启动函数 gg.toast("开启成功") end function c() -- 返回值:true = 正常完成一次;false = 用户点了取消,应退出脚本 function changeCoin() local dataType = gg.TYPE_DWORD local searchVal, replaceVal local inputOk = false while not inputOk do local prompt = gg.prompt( {"原有的数量 (点取消退出):", "替换的数量:"}, {"", ""}, {"number", "number"} ) if not prompt then gg.toast("已取消,退出脚本") return false end local input1 = prompt[1] and tostring(prompt[1]):match("^%s*(.-)%s*$") or "" local input2 = prompt[2] and tostring(prompt[2]):match("^%s*(.-)%s*$") or "" if input1 == "" or input2 == "" then gg.alert("❌ 提示:不能为空!\n请重新输入。") else searchVal = tonumber(input1) replaceVal = tonumber(input2) if not searchVal or not replaceVal then gg.alert("❌ 提示:请输入有效的数字!") else inputOk = true end end end gg.setVisible(false) gg.clearResults() local searchSuccess = pcall(function() gg.searchNumber(tostring(searchVal), dataType) end) if not searchSuccess then gg.alert("搜索失败,请检查游戏是否运行或数值是否正确。") else local count = gg.getResultsCount() if count > 0 then local results = gg.getResults(count) for _, v in ipairs(results) do v.value = replaceVal v.freeze = true v.freezeType = gg.FREEZE_NORMAL end local writeSuccess = pcall(function() gg.setValues(results) gg.addListItems(results) end) if writeSuccess then gg.toast("✅ 成功替换并冻结 " .. count .. " 个地址") else gg.toast("⚠️ 写入内存失败,可能地址已失效") end else gg.toast("❌ 未找到数值:" .. searchVal) end end return true end -- ===== 主循环:改完直接回到输入框,不再询问 ===== while true do if not changeCoin() then break -- 输入框点取消 → 退出脚本 end gg.sleep(800) -- 稍等一下,让上一条 toast 显示完再弹下一次输入框 end gg.toast("不是会员") end function d() gg.toast("不是会员") end function e() gg.toast("不是会员") end function f() gg.toast("不是会员") end function Exit() print("感谢使用") os.exit() end cs = "作者QQ;2518579189" while true do if gg.isVisible(true) then XGCK = 1 gg.setVisible(false) end gg.clearResults() if XGCK == 1 then Main() end end