-- ============================================== -- 碎念国体 - 比翼鸟UI风格版(最终稳定版) -- ============================================== -- 🔑 内置卡密(随便输什么都行) local VALID_KEYS = { ["1"] = true, ["2"] = true, ["3"] = true, ["SN2024-ABCD-EFGH"] = true, ["SN2024-IJKL-MNOP"] = true, ["SN2024-QRST-UVWX"] = true, ["SN2024-YZAB-CDEF"] = true, ["SN2024-GHIJ-KLMN"] = true, ["SN2024-OPQR-STUV"] = true, ["SN2024-WXYZ-1234"] = true, ["SN2024-5678-9ABC"] = true, ["SN2024-DEFG-HIJK"] = true, ["SN2024-LMNO-PQRS"] = true, } -- ====== 验证循环 ====== local verified = false while not verified do local input = gg.prompt({"🔑 请输入卡密(取消=退出)"}, {""}, {"text"}) if input == nil then local choice = gg.alert("确定要退出脚本吗?", "确定", "继续输入") if choice == 1 then return end else local key = input[1]:gsub("%s+", "") if VALID_KEYS[key] then gg.alert("✅ 验证成功!\n欢迎使用碎念国体") verified = true else gg.alert("❌ 卡密错误!\n请重新输入") end end end gg.toast("🎮 碎念国体 加载中...") -- ============================================== -- 比翼鸟UI风格函数 -- ============================================== local switchStates = {} function getVerticalBG(colors, cornerRadius, strokeWidth, strokeColor) if not strokeWidth then strokeWidth = 0 end if not strokeColor then strokeColor = 0xff000000 end local jianbians = luajava.new(GradientDrawable) jianbians:setCornerRadius(cornerRadius or 12) jianbians:setGradientType(GradientDrawable.LINEAR_GRADIENT) jianbians:setColors(colors) jianbians:setStroke(strokeWidth, strokeColor) return jianbians end function getCorner(colors, radius, strokeWidth, strokeColor, g1, g2, g3, g4) if not strokeWidth then strokeWidth = 0 end if not strokeColor then strokeColor = 0xff000000 end local jianbians = luajava.new(GradientDrawable) jianbians:setCornerRadius(radius or 12) jianbians:setGradientType(GradientDrawable.LINEAR_GRADIENT) jianbians:setColors(colors) jianbians:setStroke(strokeWidth, strokeColor) if g1 and g2 and g3 and g4 then jianbians:setCornerRadii({g1, g1, g2, g2, g3, g3, g4, g4}) end return jianbians end function getButtonBG() local selector = luajava.getStateListDrawable() selector:addState({android.R.attr.state_pressed}, getVerticalBG({0x880f87fa, 0x880f87fa}, 10)) selector:addState({-android.R.attr.state_pressed}, getVerticalBG({0xff0f87fa, 0xff0f87fa}, 10, 2, 0xff989898)) return selector end function getBlackBG() return getVerticalBG({0xff000000, 0xff000000}, 0) end function getDarkGrayBG() return getVerticalBG({0xff1a1a1a, 0xff1a1a1a}, 8) end -- ============================================== -- 滑动开关组件(使用LinearLayout + margin控制滑动) -- ============================================== function createSlideSwitch(switchId, onCallback, offCallback) switchStates[switchId] = false local switchLayout = { LinearLayout, layout_width = '48dp', layout_height = '26dp', layout_gravity = 'center_vertical', orientation = 'horizontal', gravity = 'left|center_vertical', background = getVerticalBG({0x88ffffff, 0x88ffffff}, 90), id = switchId, onClick = function(view) local isOn = switchStates[switchId] if isOn then -- 关闭 view:setBackground(getVerticalBG({0x88ffffff, 0x88ffffff}, 90)) view:setGravity(0x03) -- left|center_vertical switchStates[switchId] = false if offCallback then local ok, err = pcall(offCallback) if not ok then gg.toast("⚠️ " .. tostring(err)) end end else -- 开启 view:setBackground(getVerticalBG({0xff0f87fa, 0xff0f87fa}, 90)) view:setGravity(0x05) -- right|center_vertical switchStates[switchId] = true if onCallback then local ok, err = pcall(onCallback) if not ok then gg.toast("⚠️ " .. tostring(err)) end end end end, { LinearLayout, layout_width = '20dp', layout_height = '20dp', background = getVerticalBG({0xffffffff, 0xffffffff}, 90), id = switchId .. '_slider', } } return switchLayout end -- ============================================== -- 功能函数 -- ============================================== local function fangkaishang() gg.toast("⚡ 正在开启防卡伤...") if gg.getRangesList("libanogs.so")[1] then local t = {} t[1] = gg.getRangesList("libanogs.so")[1]["start"] + 0x1D8CE0 gg.addListItems({ [1] = { address = t[1], flags = 4, value = 335544326, freeze = true } }) gg.toast("✅ 防卡伤已开启") else gg.toast("⚠️ 未找到libanogs.so") end end local function ziyongfanwei() gg.toast("⚡ 正在开启自用范围...") if gg.getRangesList("libanogs.so")[1] then local t = {} t[1] = gg.getRangesList("libanogs.so")[1]["start"] + 0x4B3548 t[2] = gg.getRangesList("libanogs.so")[1]["start"] + 0x4B3834 gg.setValues({ [1] = { address = t[1], flags = 4, value = -698416192 }, [2] = { address = t[2], flags = 4, value = 335544360 }, }) end gg.clearResults() gg.setRanges(gg.REGION_ANONYMOUS) gg.searchNumber("15.75", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1) gg.refineNumber("15.75", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1) gg.getResults(50) gg.editAll("65", gg.TYPE_FLOAT) gg.clearResults() gg.setRanges(gg.REGION_ANONYMOUS) gg.searchNumber(";测试版本不代表最终品质", gg.TYPE_WORD, false, gg.SIGN_EQUAL, 0, -1) gg.getResults(520) gg.editAll("碎念范围SNNP6", gg.TYPE_WORD) gg.clearResults() gg.toast("✅ 自用范围已开启") end local function hookfanwei() gg.toast("✅ Hook范围已开启") end local function niubifanwei() gg.toast("⚡ 正在开启牛逼范围...") gg.searchNumber("15.75", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1, 0) gg.editAll("72.5", gg.TYPE_FLOAT) gg.processResume() gg.toast("✅ 牛逼范围已开启") end -- ============================================== -- 悬浮窗 -- ============================================== local floatingWindowManager = require('floatingWindowManager') floatingWindowManager:init() local darkBG = getDarkGrayBG() local blackBG = getBlackBG() -- ============================================== -- 主面板 -- ============================================== floatingWindowManager:newWindow('碎念国体', { onCreate = function(floatingWindow) floatingWindow:addlayout({ LinearLayout, orientation = 'vertical', layout_width = 'wrap_content', layout_height = 'wrap_content', background = blackBG, padding = '0dp', { LinearLayout, layout_width = '200dp', layout_height = '44dp', gravity = 'center_vertical', background = getVerticalBG({0xff2F3032, 0xff2F3032}, 12), padding = {'10dp','0dp','12dp','0dp'}, { ImageView, layout_width = '28dp', layout_height = '28dp', layout_marginLeft = '6dp', background = getVerticalBG({0xff0f87fa, 0xff0f87fa}, 14), }, { LinearLayout, orientation = 'vertical', layout_width = 'wrap_content', layout_marginLeft = '10dp', { TextView, text = '碎念国体', textColor = '#FFFFFF', textSize = '15sp', layout_width = 'wrap_content', }, { TextView, text = 'v3.3.0 | 公益版', textColor = '#989898', textSize = '10sp', layout_width = 'wrap_content', } }, { TextView, layout_width = 'match_parent', layout_weight = 1, } }, { LinearLayout, layout_height = '1dp', layout_width = '200dp', background = '#444444', }, { LinearLayout, layout_height = '28dp', layout_width = '200dp', gravity = 'center_vertical', padding = {'10dp','4dp','10dp','4dp'}, background = darkBG, { TextView, textSize = '10sp', text = '🎉 欢迎进入碎念国体', textColor = '#4ECDC4', layout_width = 'wrap_content', }, { TextView, layout_width = 'match_parent', layout_weight = 1, } }, { LinearLayout, orientation = 'vertical', layout_width = '200dp', padding = {'4dp','2dp','4dp','2dp'}, background = darkBG, { Button, background = getButtonBG(), layout_width = 'match_parent', layout_height = '34dp', layout_margin = '2dp', text = '🎯 选择游戏进程', textSize = '13sp', textColor = '#FFFFFF', onClick = function() gg.setProcessX() end }, { Button, background = getButtonBG(), layout_width = 'match_parent', layout_height = '34dp', layout_margin = '2dp', text = '🛡️ 防闪退', textSize = '13sp', textColor = '#FFFFFF', onClick = function() function S_Pointer(t_So, t_Offset, _bit) local function getRanges() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v.type:sub(2, 2) == 'w' then table.insert(ranges, v) end end return ranges end local function Get_Address(N_So, Offset, ti_bit) local ti = gg.getTargetInfo() local S_list = getRanges() local t = {} local _t local _S = nil if ti_bit then _t = 64 else _t = 4 end for i in pairs(S_list) do local _N = S_list[i].internalName:gsub('^.*/', '') if N_So[1] == _N and N_So[2] == S_list[i].state then _S = S_list[i] break end end if _S then t[#t + 1] = {} t[#t].address = _S.start + Offset[1] t[#t].flags = _t if #Offset ~= 1 then for i = 2, #Offset do local S = gg.getValues(t) t = {} for _ in pairs(S) do if not ti.x64 then S[_].value = S[_].value & 0xFFFFFFFF end t[#t + 1] = {} t[#t].address = S[_].value + Offset[i] t[#t].flags = _t end end end _S = t[#t].address end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A end local offsets = {{0x9E18}, {0x9E60}, {0x9ED0}, {0x9F80}, {0x9FB0}} for _, offset in ipairs(offsets) do local t = {"libanogs.so:bss", "Cb"} local ttt = S_Pointer(t, offset, true) gg.addListItems({{address = ttt, flags = 4, value = 4096, freeze = true}}) end gg.toast("✅ 防闪退已开启") end }, { Button, background = getButtonBG(), layout_width = 'match_parent', layout_height = '34dp', layout_margin = '2dp', text = '📐 范围区', textSize = '13sp', textColor = '#FFFFFF', onClick = function() floatingWindowManager:start('碎念[范围]') end }, { Button, background = getButtonBG(), layout_width = 'match_parent', layout_height = '34dp', layout_margin = '2dp', text = '🧰 工具箱', textSize = '13sp', textColor = '#FFFFFF', onClick = function() floatingWindowManager:start('游戏工具[工具箱]') end } }, { LinearLayout, layout_height = '1dp', layout_width = '200dp', background = '#444444', }, { LinearLayout, layout_height = '22dp', layout_width = '200dp', gravity = 'center', background = darkBG, padding = {'10dp','2dp','10dp','2dp'}, { TextView, text = '© 碎念国体 · 公益免费', textColor = '#666666', textSize = '8sp', } } }) end, onDestroy = function() end }) -- ============================================== -- 范围窗口 -- ============================================== floatingWindowManager:newWindow('碎念[范围]', { onCreate = function(floatingWindow) floatingWindow:addlayout({ ScrollView, layout_width = 'wrap_content', layout_height = 'wrap_content', { LinearLayout, orientation = 'vertical', layout_width = 'wrap_content', layout_height = 'wrap_content', background = blackBG, padding = '0dp', { LinearLayout, layout_width = '200dp', layout_height = '40dp', gravity = 'center_vertical', background = getVerticalBG({0xff2F3032, 0xff2F3032}, 12), padding = {'12dp','0dp','12dp','0dp'}, { TextView, text = '📐 范围设置', textColor = '#FFFFFF', textSize = '14sp', layout_width = 'wrap_content', }, { TextView, layout_width = 'match_parent', layout_weight = 1, }, { TextView, text = '✕', textColor = '#FFFFFF', textSize = '18sp', onClick = function() floatingWindow:setVisibility(View.GONE) end } }, { LinearLayout, layout_height = '1dp', layout_width = '200dp', background = '#444444', }, { LinearLayout, layout_width = '200dp', layout_height = 'wrap_content', orientation = 'vertical', background = darkBG, padding = '8dp', { TextView, text = '⚡ 防卡伤(每把一开)', textColor = '#FFFFFF', textSize = '11sp', layout_marginBottom = '4dp', layout_width = 'match_parent', }, { LinearLayout, layout_width = 'match_parent', layout_height = '36dp', gravity = 'center_vertical', background = getVerticalBG({0x33ffffff, 0x33ffffff}, 8), padding = {'6dp','0dp','6dp','0dp'}, { TextView, text = '防卡伤', textColor = '#FF6B6B', textSize = '11sp', layout_width = '56dp', }, { TextView, layout_width = 'match_parent', layout_weight = 1, }, createSlideSwitch('switch_fks', fangkaishang, nil) } }, { LinearLayout, layout_height = '3dp', layout_width = '200dp', }, { LinearLayout, layout_width = '200dp', layout_height = 'wrap_content', orientation = 'vertical', background = darkBG, padding = '8dp', { TextView, text = '📏 范围(每把一开)', textColor = '#FFFFFF', textSize = '11sp', layout_marginBottom = '4dp', layout_width = 'match_parent', }, { LinearLayout, layout_width = 'match_parent', layout_height = '36dp', gravity = 'center_vertical', background = getVerticalBG({0x33ffffff, 0x33ffffff}, 8), padding = {'6dp','0dp','6dp','0dp'}, { TextView, text = '自用范围', textColor = '#4ECDC4', textSize = '11sp', layout_width = '56dp', }, { TextView, layout_width = 'match_parent', layout_weight = 1, }, createSlideSwitch('switch_zyfw', ziyongfanwei, nil) }, { LinearLayout, layout_height = '3dp', layout_width = '200dp', }, { LinearLayout, layout_width = 'match_parent', layout_height = '36dp', gravity = 'center_vertical', background = getVerticalBG({0x33ffffff, 0x33ffffff}, 8), padding = {'6dp','0dp','6dp','0dp'}, { TextView, text = 'Hook范围', textColor = '#FFD93D', textSize = '11sp', layout_width = '56dp', }, { TextView, layout_width = 'match_parent', layout_weight = 1, }, createSlideSwitch('switch_hook', hookfanwei, nil) }, { LinearLayout, layout_height = '3dp', layout_width = '200dp', }, { LinearLayout, layout_width = 'match_parent', layout_height = '36dp', gravity = 'center_vertical', background = getVerticalBG({0x33ffffff, 0x33ffffff}, 8), padding = {'6dp','0dp','6dp','0dp'}, { TextView, text = '牛逼范围', textColor = '#FF6B6B', textSize = '11sp', layout_width = '56dp', }, { TextView, layout_width = 'match_parent', layout_weight = 1, }, createSlideSwitch('switch_nb', niubifanwei, nil) } }, { LinearLayout, layout_height = '1dp', layout_width = '200dp', background = '#444444', }, { LinearLayout, layout_height = '22dp', layout_width = '200dp', gravity = 'center', background = darkBG, padding = {'10dp','2dp','10dp','2dp'}, { TextView, text = '© 碎念国体 · 公益免费', textColor = '#666666', textSize = '8sp', } } } }) end, onDestroy = function() end }) -- ============================================== -- 工具箱窗口 -- ============================================== floatingWindowManager:newWindow('游戏工具[工具箱]', { onCreate = function(floatingWindow) floatingWindow:addlayout({ ScrollView, layout_width = 'wrap_content', layout_height = 'wrap_content', { LinearLayout, orientation = 'vertical', layout_width = 'wrap_content', layout_height = 'wrap_content', background = blackBG, padding = '0dp', { LinearLayout, layout_width = '200dp', layout_height = '40dp', gravity = 'center_vertical', background = getVerticalBG({0xff2F3032, 0xff2F3032}, 12), padding = {'12dp','0dp','12dp','0dp'}, { TextView, text = '🧰 工具箱', textColor = '#FFFFFF', textSize = '14sp', layout_width = 'wrap_content', }, { TextView, layout_width = 'match_parent', layout_weight = 1, }, { TextView, text = '✕', textColor = '#FFFFFF', textSize = '18sp', onClick = function() floatingWindow:setVisibility(View.GONE) end } }, { LinearLayout, layout_height = '1dp', layout_width = '200dp', background = '#444444', }, { LinearLayout, orientation = 'vertical', layout_width = '200dp', padding = {'6dp','4dp','6dp','4dp'}, background = darkBG, { Button, background = getButtonBG(), layout_width = 'match_parent', layout_height = '34dp', layout_margin = '2dp', text = '👁️ 隐藏电报', textSize = '13sp', textColor = '#FFFFFF', onClick = function() draw.text('', 200,155) draw.setColor('#00000000') gg.toast('隐藏电报成功') end }, { Button, background = getButtonBG(), layout_width = 'match_parent', layout_height = '34dp', layout_margin = '2dp', text = '🎨 显示电报', textSize = '13sp', textColor = '#FFFFFF', onClick = function() local rtextColor = string.format('#ff%x',math.random(0x000000,0xffffff)) draw.setSize(39) draw.setStyle('填充') draw.text("", 5,500) draw.setColor(rtextColor) gg.toast('随机颜色成功') end }, { Button, background = getButtonBG(), layout_width = 'match_parent', layout_height = '34dp', layout_margin = '2dp', text = '💉 注入追踪', textSize = '13sp', textColor = '#FFFFFF', onClick = function() local dir = "/storage/emulated/0/淡雾NB" os.execute("mkdir -p \""..dir.."\"") function httpDownload(url, path) gg.toast("开始下载...") local r = gg.makeRequest(url) if not r or r.code ~= 200 then gg.alert("下载失败\n状态码: "..tostring(r and r.code)) return false end local f = io.open(path, "wb") if not f then gg.alert("无法写入文件\n路径: "..path) return false end f:write(r.content) f:close() gg.toast("下载完成") return true end local inject = { name = "Inject 程序(先执行这个)", url = "https://www.mpimg.cn/down.php/be87bf42b50d3115e1807eda984add35.", path = "/storage/emulated/0/淡雾NB/64bit" } if httpDownload(inject.url, inject.path) then gg.alert("频道CKZPD") end TARGET_DIR = "/storage/emulated/0/淡雾NB/" TARGET_NAME = "lib淡水.so" local select = gg.prompt( {"请选择要注入的so"}, {"/sdcard/"}, {"file"} ) if select == nil then return end local src = select[1] local dst = TARGET_DIR .. TARGET_NAME os.execute("mkdir -p '" .. TARGET_DIR .. "'") os.execute("rm -rf '" .. dst .. "'") os.execute("cp -f '" .. src .. "' '" .. dst .. "'") gg.toast("选择完成 → " .. dst) loadYunLua('https://www.mpimg.cn/down.php/bb6218ec44e96f77fe0c5904f3d36196.lua') gg.alert("等待UI出现,等会可能加速掉后台重新打开即可") end } }, { LinearLayout, layout_height = '1dp', layout_width = '200dp', background = '#444444', }, { LinearLayout, layout_height = '22dp', layout_width = '200dp', gravity = 'center', background = darkBG, padding = {'10dp','2dp','10dp','2dp'}, { TextView, text = '© 碎念国体 · 公益免费', textColor = '#666666', textSize = '8sp', } } } }) end, onDestroy = function() end }) -- 启动悬浮窗 floatingWindowManager:run()