-- loadYunLua("1B681E512611381068107451254B37240225013A36323266181E481A6CC19E9254ECA02ACE69C8A8F05CCAB29920D07E49D79B2BD39EFA5DE0789CBB82DE") --https://pan.xynb666.xyz/f/pyZHA/普通GG ELGG极筒化.lua.lua -- do -- if type(getxyyyz) ~= 'function' then -- gg.alert('运行异常,请重试') -- os.exit() -- else -- function xyyyz() -- appid = "10279" -- appkey = "6zUmkMmuf6f466tZ" -- rc4_key = "S08FJwm89Zw10279" -- version = "1.0" -- url_kawang = "卡网" -- end -- local ret = getxyyyz() -- if ret then -- ret() -- end -- end -- end loadYunLua("1B681E51261138106110345B1275EA8CE583F02D2259403120550A7AE56AE771BF90DA8D8ED592D598FC1671AFF24C0E5F") do if -xlyz ~= 'xlyz' then gg.alert('运行异常,请重试') os.exit() return end local info = { ['appid'] = "11763", ['appkey'] = "UwB33KXtkK53tYYO", ['rc4_key'] = "IJBbdbDr6th11763", ['version'] = "1.0", ['url_kawang'] = "卡网", } local r = xlyz[info] local p = r.HsMAUAHPs5FsoAFyPUvvyPxoSByvyBUF if -r['登录状态'] ~= 'vxOoxHUyOoxOMvsoO5PFUOUuFFvssvBx' then gg.alert('签名异常') return end end gg.playVideo("https://360.avuoo.com/view.php/4b479fca5ae4c36f41d582f17d3dbccd.mp4") local material3 = elgg.import("material3") -- 导入 m3 库 context = material3:getContext() -- 获取 m3 库的 context (不要用 local,不然 loadlayout 加载不了) context.setTheme(0x7f090069) -- 设置 material3 亮色主题 import "android.os.*" import "android.view.*" import "android.widget.*" import "android.graphics.PixelFormat" import "android.graphics.Color" import "android.graphics.drawable.GradientDrawable" import "android.graphics.drawable.StateListDrawable" import "com.google.android.material.materialswitch.MaterialSwitch" import "android.graphics.Color" import "android.content.res.ColorStateList" import "android.animation.LayoutTransition" import 'com.google.android.material.slider.Slider' import "android.animation.ObjectAnimator" -- 属性动画我吃柠檬 import "android.animation.AnimatorSet" -- 组合动画我吃柠檬🍋 import "android.view.animation.DecelerateInterpolator" -- 减速效果我吃柠檬🍋 import "android.animation.LayoutTransition" import "android.animation.ValueAnimator" import "android.view.animation.LinearInterpolator" import "android.os.Handler" import "android.os.Looper" elgg.import("HiddenApiBypass") -- 导入 HiddenApiBypass 库 elgg.import("toast") -- toast 库 elgg.import("AlGui") -- AlGui 库 -- toast.white("白色") -- toast.black("黑色") -- toast.hint("提示") -- toast.success("成功") -- toast.warn("警告") -- toast.error("错误") --------------------------------------------------------------------------------------------------------------- -- 全局变量 isAutoClearing = false stopClearing = false local window = activity.getSystemService("window") local changan = {} gg.setVisible(false) local HotPoint = luajava.bindClass("android.ext.HotPoint") local HP = HotPoint.getMethod("d") HotPoint = HotPoint.instance HotPoint.f() -- function zoom_animation(view) -- view.setPivotX(0) -- view.setPivotY(0) -- local scaleXAnimator = ObjectAnimator.ofFloat(view, "scaleX", 0, 1) -- local scaleYAnimator = ObjectAnimator.ofFloat(view, "scaleY", 0, 1) -- local animatorSet = AnimatorSet() -- animatorSet.playTogether(scaleXAnimator, scaleYAnimator) -- animatorSet.setDuration(600) -- animatorSet.setInterpolator(DecelerateInterpolator()) -- animatorSet.start() -- end -- function zom_animation(view) -- view.setPivotX(1) -- view.setPivotY(1) -- local scaleXAnimator = ObjectAnimator.ofFloat(view, "scaleX", 1, 0) -- local scaleYAnimator = ObjectAnimator.ofFloat(view, "scaleY", 1, 0) -- local animatorSet = AnimatorSet() -- animatorSet.playTogether(scaleXAnimator, scaleYAnimator) -- animatorSet.setDuration(600) -- animatorSet.setInterpolator(DecelerateInterpolator()) -- animatorSet.start() -- end local function getVerticalBG(gtvb1, gtvb3, gtvb4, gtvb5) if not gtvb4 then gtvb4 = 0 gtvb5 = 0xff000000 end local colors = luajava.new(GradientDrawable) colors.setColor(gtvb1) colors.setCornerRadius(gtvb3) colors.setGradientType(GradientDrawable.LINEAR_GRADIENT) colors.setStroke(gtvb4, gtvb5) return colors end function miaobian(d, r, t, y) local drawable = GradientDrawable() drawable.setShape(GradientDrawable.RECTANGLE) drawable.setColor(t) -- 直接传入 0xAARRGGBB 格式的颜色值 drawable.setCornerRadii({r, r, r, r, r, r, r, r}) drawable.setStroke(d, y) -- 直接传入 0xAARRGGBB 格式的颜色值 return drawable end function getShepeBackground(color, radiu) local drawable = luajava.new(GradientDrawable) drawable.setShape(GradientDrawable.RECTANGLE) drawable.setColor(color) drawable.setCornerRadii({radiu, radiu, radiu, radiu, radiu, radiu, radiu, radiu}) return drawable end local function getButtonBgo() local selector = StateListDrawable() local state = android.R.attr.state_pressed selector.addState({state}, getVerticalBG("0xffffffff", 25)) selector.addState({-state}, getVerticalBG("0xffffffff", 25)) return selector end local function getLayoutParams() local LayoutParams = WindowManager.LayoutParams local layoutParams = luajava.new(LayoutParams) layoutParams.type = Build.VERSION.SDK_INT >= 26 and LayoutParams.TYPE_APPLICATION_OVERLAY or LayoutParams.TYPE_PHONE layoutParams.format = PixelFormat.RGBA_8888 layoutParams.flags = LayoutParams.FLAG_NOT_FOCUSABLE | LayoutParams.FLAG_ALT_FOCUSABLE_IM layoutParams.gravity=Gravity.TOP|Gravity.LEFT layoutParams.width = LayoutParams.WRAP_CONTENT layoutParams.height = LayoutParams.WRAP_CONTENT return layoutParams end -- 新开一个线程来执行功能 local function threadStart(runnable) local newRun = luajava.createProxy("java.lang.Runnable", runnable) local subThread = luajava.newInstance("java.lang.Thread", newRun) subThread:start() end local function log(text, color, size) -- 这是控制台输出的 local tmp = loadlayout { TextView, text = os.date("%m-%d %H:%M:%S ") .. text, textSize = size or '10sp', textColor = color, gravity = "left", layout_width = "wrap_content", } console_list.addView(tmp) console.fullScroll(View.FOCUS_DOWN) end -- 切换菜单 local change_menu -- 背景列表 只有单色 自行添加 十六进制颜色 local background_list = { getShepeBackground("0xff161616", 15), } -- 开关 changan.switch = function(name, func1, func2) local sw sw = loadlayout({ MaterialSwitch; text = " "..name; textColor = "0xffB5CFE4"; padding = "5dp"; layout_width = "match"; layout_height = "match"; trackTintList=(ColorStateList({{android.R.attr.state_checked},{}},{0xffB5CFE4,0x28FFFFFF})), thumbTintList=(ColorStateList({{android.R.attr.state_checked},{-android.R.attr.state_checked}},{0xFFFFFFFF,0xFF4B484F})), onClick = function() local func = sw.checked and func1 or func2 threadStart({ run = function() pcall(func) end }) end }) local tmp = loadlayout({ LinearLayout, background = getButtonBgo(), elevation="2dp", layout_width = 'fill_parent', layout_height = "40dp", layout_margin = "2dp", gravity = "center_vertical", padding = { "0dp", "0dp", "6dp", "0dp" }, }) local rest = loadlayout({ LinearLayout, layout_width = 'fill_parent', layout_height = "wrap_content", gravity = "center_vertical", }) tmp.addView(sw) rest.addView(tmp) return rest end changan.seek = function(name,bian,smin,smax,nows) local sw _ENV[bian] =nows smin=tonumber(smin) smax=tonumber(smax) if _ENV[bian] == nil then _ENV[bian] = 1.0 end if not name then name = "未设置" end sw = loadlayout({ Slider, thumbHeight='23dp', trackHeight='15dp', tickVisible=false, TrackActiveTintList=ColorStateList({{}},{"0xff".."000000"}), TrackInactiveTintList=ColorStateList({{}},{"0x55".."000000"}), ThumbTintList=ColorStateList({{}},{"0xff".."000000"}), layout_width = 'match_parent', id=luajava.newId(name.."seekbar"), valueFrom=smin, valueTo=smax, value=nows, stepSize=0.01, }) sw.addOnChangeListener({ onValueChange = function(slider, value, fromUser) _ENV[bian] = value end }) local tmp = loadlayout({ LinearLayout, background = getButtonBgo(), layout_width = 'fill_parent', layout_height = "40dp", layout_marginLeft = '2dp', layout_marginRight = '2dp', layout_marginTop = '2dp', layout_marginBottom = '2dp', gravity = "center_vertical", padding = { "0dp", "0dp", "6dp", "0dp" },{TextView, padding={"5dp","10dp","0dp","10dp",}, gravity = "top", textColor='0xffB5CFE4', textSize='13sp', text = name, id = luajava.newId(names), layout_width = 'wrap_content', layout_marginLeft = "5dp",} }) local rest = loadlayout({ LinearLayout, layout_width = 'fill_parent', layout_height = "wrap_content", gravity = "center_vertical", }) tmp.addView(sw) rest.addView(tmp) return rest end -- 文字 changan.text = function(txt, color, size) local tmp = { TextView, text = txt or "未设置文字", textSize = size or "18sp", textColor = color or "#545454", layout_width = "wrap_content", } return loadlayout(tmp) end layoutTransition=LayoutTransition() function visi (tid , ttid) local tview = luajava.getIdView (tid) local ttview = luajava.getIdView (ttid) if not tview then return 0 end if tonumber (tostring (tview : getVisibility ())) == 8.0 then tview.setVisibility (View.VISIBLE) else tview.setVisibility (View.GONE) end end -- 初始化 colorvs 变量 local colorvs = {} boxes={} function visi(tid, ttid) local tview = luajava.getIdView(tid) local arrowView = luajava.getIdView(tid.."_arrow") -- 获取箭头图标视图 if not tview then return 0 end if tonumber(tostring(tview:getVisibility())) == 8.0 then tview.setVisibility(View.VISIBLE) -- 展开时旋转箭头向下90度 local anim = ObjectAnimator.ofFloat(arrowView, "rotation", 0, 90) anim.setDuration(300) anim.start() else tview.setVisibility(View.GONE) -- 收缩时旋转箭头回到0度 local anim = ObjectAnimator.ofFloat(arrowView, "rotation", 90, 0) anim.setDuration(300) anim.start() end end changan.check = function(views) if #views == 0 then return end -- 创建主垂直布局 local mainLayout = loadlayout({ LinearLayout, layout_width = 'fill_parent', layout_height = 'wrap_content', orientation = 'vertical' }) -- 创建横向滑动布局 local scrollView = loadlayout({ HorizontalScrollView, layout_width = 'fill_parent', layout_height = 'wrap_content', { LinearLayout, layout_width = 'wrap_content', layout_height = 'wrap_content', orientation = 'vertical', id = 'rows_container' } }) mainLayout.addView(scrollView) -- 计算每行最多3个复选框 local buttonsPerRow = 3 local currentRow = nil local buttonsInCurrentRow = 0 for i, v in ipairs(views) do -- 每行开始时创建新的水平布局 if buttonsInCurrentRow % buttonsPerRow == 0 then currentRow = loadlayout({ LinearLayout, layout_width = 'wrap_content', layout_height = 'wrap_content', orientation = 'horizontal', id = 'row_'..math.ceil(i/buttonsPerRow) }) rows_container.addView(currentRow) end local func1, func2 = v[2], v[3] local sw = loadlayout({ CheckBox; layout_width = 'wrap_content', layout_height = '32dp', buttonTintList=ColorStateList({{android.R.attr.state_checked},{-android.R.attr.state_checked}},{0xffB5CFE4,0xffB5CFE4},{0xffB5CFE4,0xffB5CFE4}), text = v[1], textColor = "#B5CFE4"; onClick = function(view) local isChecked = view.isChecked() -- print("复选框"..i.."状态:", isChecked) threadStart({ run = function() if isChecked and v[2] then pcall(v[2]) -- 选中状态回调 elseif not isChecked and v[3] then pcall(v[3]) -- 取消选中状态回调 end end }) end }) local buju = loadlayout({ LinearLayout, layout_width = 'wrap_content', layout_height = "wrap_content", layout_margin = "3dp", layout_weight = "1", sw }) -- 添加到当前行 currentRow.addView(buju) buttonsInCurrentRow = buttonsInCurrentRow + 1 end return mainLayout end function changan.box(views) local tid = "box"..string.randomUUID(true) colorvs[#colorvs+1] = {"box",tid} local arrowIcon = { ImageView, id = luajava.newId(tid.."_arrow"), layout_width="wrap_content", layout_height="wrap_content", src = "/sdcard/早餐elgg/box", ColorFilter = "0xffB5CFE4" } local ttid = tid.."6" local firadio = { LinearLayout, layout_width='fill_parent', background = getShepeBackground(0xFFFFFFFF, 25), elevation="2dp", layout_height="wrap_content", layout_margin="4dp", orientation="vertical", LayoutTransition = LayoutTransition() } if type(views[1]) == "string" or type(views[1]) == "number" then firadio[#firadio + 1] = { LinearLayout, layout_width='fill_parent', layout_height="40dp", gravity="center_vertical", onClick = function() visi(tid,ttid) end, { LinearLayout, layout_width='fill_parent', layout_height="36dp", layout_marginRight="4dp", layout_marginLeft="4dp", gravity="center_vertical", background = getShepeBackground(0xFFFFFFFF, 15), { TextView, gravity="center_vertical", text=views[1], textColor="0xffB5CFE4", textSize="15sp", layout_weight=1, layout_marginLeft="15dp", layout_marginRight="20dp", layout_width='fill_parent', }, { LinearLayout, padding={"0dp","0dp","15dp","0dp"}, layout_width="30dp", layout_height="30dp", gravity="center", arrowIcon } } } else gg.alert("changan.box 的 table 内第一个元素必须是 string") os.exit() end local contentLayout = { LinearLayout, layout_marginLeft="10dp", layout_marginRight="10dp", layout_marginBottom="10dp", orientation="vertical", visibility="gone", id=luajava.newId(tid), layout_width='fill_parent', } for i=2,#views do table.insert(contentLayout, views[i]) end local finalLayout = loadlayout(firadio) local contentView = loadlayout(contentLayout) finalLayout.addView(contentView) boxes[tid] = contentView return finalLayout end function changan.image(text) local tmp = { LinearLayout, layout_height="wrap_content", layout_width="fill_parent", gravity="center", { CardView; layout_height="120dp"; radius="10dp"; backgroundColor="#DFDBE6EF"; layout_width="280dp"; { ImageView; src=text; layout_height="match_parent"; layout_width="match_parent"; }; }; } return loadlayout(tmp) end changan.button = function(name,func) local btn1 = { RelativeLayout, layout_width = "match", layout_height = "35dp", layout_margin = "2dp", layout_marginLeft = "3dp", -- 左侧外边距 5dp layout_marginRight = "3dp", -- 右侧外边距 5dp background = getButtonBgo(), -- TextView(靠左,距离 RelativeLayout 左侧 5dp) { TextView, text = name, textColor = "0xffB5CFE4", layout_margin = "5dp", layout_marginLeft = "14dp", layout_width = "wrap", layout_height = "match", gravity = "center", layout_alignParentLeft = true, -- 固定在左侧 }, { ImageView, layout_width = "20dp", layout_height = "20dp", layout_margin = "5dp", ColorFilter = "0xffB5CFE4", src = "/storage/emulated/0/明日香美化/box", layout_alignParentRight = true, -- 固定在右侧 layout_centerVertical = true, -- 垂直居中 }, -- ImageView(靠右,距离 RelativeLayout 右侧 5d } local btn1 = loadlayout(btn1) btn1.onClick = function() if eooeis == 1 then eooeis = 2 else threadStart({ run = function() pcall(func) end, }) end end return btn1 end changan.numberAdjust = function(imgPath, mainText, skinNames, weaponSuffix, varName, maxNum, initNum, numFuncMap) _ENV[varName] = initNum or 1 maxNum = maxNum or 5 weaponSuffix = weaponSuffix or "" skinNames = skinNames or {} local function getCurrentSkinName(num) return skinNames[num] or "默认皮肤" end local function getSubText(num) return getCurrentSkinName(num) .. weaponSuffix end local subText = getSubText(_ENV[varName]) numFuncMap = numFuncMap or {} local mainLayout = loadlayout({ LinearLayout, layout_width = "fill_parent", layout_height = "38dp", layout_margin = "1dp", background = getShepeBackground(0xFFFFFFFF, 12), gravity = "center_vertical", orientation = "horizontal", padding = "3dp", { ImageView, layout_width = "28dp", layout_height = "28dp", layout_marginLeft = "3dp", src = imgPath, scaleType = "fitCenter", adjustViewBounds = "true", }, { LinearLayout, layout_width = "0dp", layout_weight = 1, layout_height = "wrap_content", orientation = "vertical", layout_marginLeft = "6dp", layout_marginRight = "6dp", { TextView, text = mainText, textColor = "0xff010101", textSize = "10sp", layout_width = "wrap_content", layout_height = "wrap_content", }, { TextView, id = luajava.newId(varName .. "_subtext"), text = subText, textColor = "0xff515151", textSize = "7sp", layout_width = "wrap_content", layout_height = "wrap_content", }, }, { LinearLayout, layout_width = "wrap_content", layout_height = "wrap_content", orientation = "horizontal", gravity = "center", { Button, text = "-", textColor = "0xff000000", textSize = "16sp", layout_width = "22dp", layout_height = "22dp", gravity = "center", padding = "0dp", background = miaobian(1, 20, 0xffffffff, 0xffcccccc), onClick = function() if _ENV[varName] > 1 then _ENV[varName] = _ENV[varName] - 1 luajava.getIdView(varName .. "_num").setText(_ENV[varName] .. "/" .. maxNum) luajava.getIdView(varName .. "_subtext").setText(getSubText(_ENV[varName])) end end, }, { TextView, id = luajava.newId(varName .. "_num"), text = _ENV[varName] .. "/" .. maxNum, textColor = "0xff000000", textSize = "11sp", layout_width = "30dp", layout_height = "22dp", gravity = "center", layout_marginLeft = "3dp", layout_marginRight = "3dp", }, { Button, text = "+", textColor = "0xff000000", textSize = "16sp", layout_width = "22dp", layout_height = "22dp", gravity = "center", padding = "0dp", background = miaobian(1, 20, 0xffffffff, 0xffcccccc), onClick = function() if _ENV[varName] < maxNum then _ENV[varName] = _ENV[varName] + 1 luajava.getIdView(varName .. "_num").setText(_ENV[varName] .. "/" .. maxNum) luajava.getIdView(varName .. "_subtext").setText(getSubText(_ENV[varName])) end end, }, { Button, text = "应用", textColor = "0xffffffff", textSize = "10sp", layout_width = "40dp", layout_height = "22dp", gravity = "center", padding = "0dp", layout_marginLeft = "3dp", background = miaobian(1, 20, 0xff2196F3, 0xff1976D2), onClick = function() local currentNum = _ENV[varName] if numFuncMap[currentNum] then threadStart({ run = function() pcall(numFuncMap[currentNum], currentNum) end }) gg.toast(mainText .. "已应用" .. getCurrentSkinName(currentNum)) luajava.runOnUiThread(function() local Inform = AlGuiBubbleNotification.Inform(context) Inform.showSuccessNotification_Simplicity() end) else gg.toast("该等级暂无对应功能") end end, }, }, }) local numText = luajava.getIdView(varName .. "_num") local subTextView = luajava.getIdView(varName .. "_subtext") mainLayout.setSkinName = function(num, name) skinNames[num] = name subTextView.setText(getSubText(_ENV[varName])) end mainLayout.getNum = function() return _ENV[varName] end return mainLayout end changan.menu = function(icon, title, menu) local layout = { CardView; layout_height = "wrap_content"; layout_width = "wrap_content"; id = "windows"; elevation = "10dp"; {RelativeLayout, layout_height = UI高度; layout_width = UI宽度; background=getVerticalBG(0xDFF3F7FA,25,5,0xDFF3F7FA), id="ooo", { -- 功能部分 LinearLayout; layout_height = "match_parent"; layout_width = "100dp"; orientation = "vertical"; layout_margin = "5dp"; gravity = "center", background=getVerticalBG(0xffffffff,15,5,0xffffffff), { CircleImageView, layout_width = "40dp", src = "/storage/emulated/0/早餐elgg/xfq", layout_height = "40dp", clickable = true, focusable = true, id="yddd", }, { TextView, layout_width = "match", layout_height = "30dp", gravity = "center", text = "早餐elgg", textColor="0xffB5CFE4", }, { -- 侧边栏 菜单按钮 ScrollView; layout_height = "match_parent"; layout_width = "match_parent"; { LinearLayout; layout_height = "wrap"; gravity = "center"; layout_width = "match_parent"; orientation = "vertical"; id = "menu_list", }; }; }; -- 下面是按钮,用代码添加 { LinearLayout; layout_height = "match_parent"; background = getShepeBackground(0xDFF3F7FA, 0), layout_marginLeft = "110dp"; id = "main", layout_width = "match_parent"; orientation = "vertical"; { LinearLayout, layout_height = "30dp", layout_width = "match", {RelativeLayout, layout_width = "match", layout_height = "30dp", { TextView, id = "current_page_title", -- 添加ID layout_width = "80dp", layout_height = "30dp", layout_margin = "5dp", text = "", -- 默认文本 textColor = "#B5CFE4", textSize="18sp", layout_marginLeft = "20dp", }, { ImageView, layout_width = "30dp", layout_height = "30dp", layout_margin = "5dp", src = "/storage/emulated/0/早餐elgg/yj", ColorFilter = "0xFFB5CFE4", id = 'lessen', layout_alignParentRight="true", layout_marginRight = "40dp", }, { ImageView, layout_width = "30dp", layout_height = "30dp", layout_margin = "5dp", src = "/storage/emulated/0/早餐elgg/关闭", id = 'window_exit', ColorFilter = "0xFFB5CFE4", layout_alignParentRight="true", }, }, }, }; { ImageView, src = "/storage/emulated/0/早餐elgg/缩小悬浮窗", id = "ydd", layout_height="40dp"; layout_width = "40dp", layout_alignParentBottom="true", layout_alignParentRight="true", clickable = true, focusable = true, }, }, }; local ball = { LinearLayout; layout_height = "fill", layout_width = "fill", { LinearLayout; layout_width = "58dp"; { ImageView, layout_width = "46dp", id = "suspended_ball", --icon = icon, src = icon, --background = icon, layout_height = "46dp", } } } ball = loadlayout(ball) local window_layout = loadlayout(layout) local menu_layout = {} local icon_list = {} for i, v in ipairs(menu) do local item = loadlayout { LinearLayout, layout_width = "match_parent", layout_margin = "2dp", layout_height = "wrap", background = getVerticalBG(0xffffffff,15,5,0xffffffff), gravity = "center_vertical", -- 水平居中对齐 orientation = "horizontal", -- 改为横向布局(图片+文字) onClick = function() change_menu(i) end, -- 左侧图片控件 { ImageView, layout_width = "30dp", -- 图片宽度 layout_height = "30dp", -- 图片高度 layout_marginLeft = "8dp", -- 左边距 layout_marginRight = "8dp", -- 右边距(与文字间距) src = v.图片 or "/storage/emulated/0/早餐elgg/xfq", -- 绑定menu中的图片字段,默认兜底路径 scaleType = "fitCenter", -- 图片适配模式 background = getShepeBackground(0xf0f0f0, 5), -- 图片背景(防止透明) }, { LinearLayout, layout_width = "match_parent", layout_height = "wrap", layout_margin = "1dp", orientation = "vertical", { TextView, text = v.name, textColor = "0xff010101", textSize = "12sp", layout_width = "wrap", layout_height = "wrap", }, { TextView, text = v.desc or "OFk", -- 可选的描述文本 textColor = "0xff515151", textSize = "8sp", layout_width = "wrap", layout_height = "wrap", }, } } local func_layout = { -- 这个是每个菜单的布局 LinearLayout; layout_height = "match_parent"; layout_width = "match_parent"; orientation = "vertical"; { ScrollView; fillViewport = "true"; layout_width = "match_parent"; layout_height = "match_parent"; { LinearLayout; layout_width = "match_parent"; layout_marginLeft = "5dp"; id = "layout_func" .. i; layout_marginRight = "5dp"; gravity = "center_horizontal"; orientation = "vertical"; }; }; } table.insert(icon_list,item) menu_layout[i] = loadlayout(func_layout) menu_list.addView(item) -- 给右侧菜单加功能 for _, k in ipairs(v) do _ENV['layout_func' .. i].addView(k) end end windows.setBackground(background_list[1]) -- 设置背景 local mainLayoutParams = getLayoutParams() do local last change_menu = function(i) if last then icon_list[last].setBackground(miaobian(0,15,"0x00CCE8EA","0xDFDBE6EF")) main.removeView(menu_layout[last]) end icon_list[i].setBackground(miaobian(5,15,"0xffD1E5F5","0xAADBE6EF")) last = i main.addView(menu_layout[i]) current_page_title.setText(menu[i].name) -- luajava.runOnUiThread(function() -- local Inform = AlGuiBubbleNotification.Inform(context) -- Inform.showSuccessNotification_Simplicity() -- end) end change_menu(1) end -- 退出按钮 window_exit.onClick = function() HP.invoke(HotPoint,nil) window.removeView(window_layout, mainLayoutParams) Looper.myLooper().quitSafely() os.exit() end function ydd.onTouch(v, event) local Action = event.getAction() if Action == MotionEvent.ACTION_DOWN then isMove = false RawX = event.getRawX() RawY = event.getRawY() x = mainLayoutParams.x y = mainLayoutParams.y lllayoutParams = ooo.getLayoutParams() xx = lllayoutParams.width yy = lllayoutParams.height -- 定义最小和最大尺寸 minWidth = 100 -- 最小宽度 minHeight = 100 -- 最小高度 maxWidth = 1500 -- 最大宽度 maxHeight = 1200 -- 最大高度 elseif Action == MotionEvent.ACTION_MOVE then isMove = true -- 计算新尺寸,确保在最小和最大范围内 local newWidth = math.min(maxWidth, math.max(minWidth, tonumber(xx) + (event.getRawX() - RawX))) local newHeight = math.min(maxHeight, math.max(minHeight, tonumber(yy) + (event.getRawY() - RawY))) -- 更新布局参数 lllayoutParams.width = newWidth lllayoutParams.height = newHeight -- 更新窗口布局 ooo.setLayoutParams(lllayoutParams) window.updateViewLayout({lessen, window_layout, ball}, mainLayoutParams) elseif Action == MotionEvent.ACTION_UP then -- 如果需要可以在抬起时做一些处理 end return true end do -- 这是创建两个悬浮窗缩小放大的按钮, 还有移动事件 local t = { {suspended_ball, ball, window_layout}, {lessen, window_layout, ball} } local tt = { {yddd, window_layout}, {suspended_ball, ball} } for i, v in ipairs(t) do v[1].onClick = function() -- 悬浮球点击 if v[1] == suspended_ball then -- zoom_animation(windows) window.removeView(v[2], mainLayoutParams) window.addView(v[3], mainLayoutParams) elseif v[1] == lessen then -- zom_animation(windows) -- 延迟执行视图切换 -- Handler().postDelayed(function() window.removeView(v[2], mainLayoutParams) window.addView(v[3], mainLayoutParams) -- end, 800) -- 600ms是动画持续时间 end end local x, y, RawX, RawY = 0, 0, 0, 0 tt[i][1].onTouch = function (_, event) local Action = event.getAction() if Action == MotionEvent.ACTION_DOWN then RawX, RawY = event.getRawX(), event.getRawY() x, y = mainLayoutParams.x, mainLayoutParams.y elseif Action == MotionEvent.ACTION_MOVE then mainLayoutParams.x = tonumber(x) + (event.getRawX() - RawX) mainLayoutParams.y = tonumber(y) + (event.getRawY() - RawY) window.updateViewLayout(tt[i][2], mainLayoutParams) end end end end Handler(Looper.getMainLooper()) Looper.prepare() window.addView(ball, mainLayoutParams) Looper.loop() end -- ELGG终极版:左图右文(无luajava.bind,纯数字颜色) changan.imgTextPanel = function(imgPath, bgColorInt, text1, text1ColorInt, text1Size, text2, text2ColorInt, text2Size, text3, text3ColorInt, text3Size, text4, text4ColorInt, text4Size, text5, text5ColorInt, text5Size) -- 定义默认值(直接用16进制数字,不是字符串) local defColorInt = 0xffB5CFE4 local defSize = "14sp" local defBgColorInt = 0xffF5F5F5 -- 默认背景色(数字值) -- 赋值默认值(避免nil) bgColorInt = bgColorInt or defBgColorInt text1 = text1 or "无内容" text1ColorInt = text1ColorInt or defColorInt text1Size = text1Size or defSize text2 = text2 or "无内容" text2ColorInt = text2ColorInt or defColorInt text2Size = text2Size or defSize text3 = text3 or "无内容" text3ColorInt = text3ColorInt or defColorInt text3Size = text3Size or defSize text4 = text4 or "无内容" text4ColorInt = text4ColorInt or defColorInt text4Size = text4Size or defSize text5 = text5 or "无内容" text5ColorInt = text5ColorInt or defColorInt text5Size = text5Size or defSize -- 纯静态布局(无任何luajava绑定,ELGG完全兼容) local panel = loadlayout({ LinearLayout, layout_width = "match_parent", layout_height = "wrap_content", layout_margin = "5dp", gravity = "center_vertical", orientation = "horizontal", background = getShepeBackground(bgColorInt, 15), -- 直接传数字颜色值 padding = "8dp", -- 内边距,和参考图一致 -- 左侧图片(自动缩放,不裁剪) { ImageView, layout_width = "80dp", layout_height = "80dp", layout_marginRight = "10dp", src = imgPath, scaleType = "fitCenter", -- 自动缩放适配,不裁剪 background = getShepeBackground(0xFFFFFFFF, 10), padding = "5dp" }, -- 右侧文字区域 { LinearLayout, layout_width = "0dp", layout_height = "wrap_content", layout_weight = 1, orientation = "vertical", gravity = "center_vertical", -- 第一行文字 { TextView, layout_width = "wrap_content", layout_height = "wrap_content", layout_margin = "2dp", text = text1, textColor = text1ColorInt, -- 数字颜色值 textSize = text1Size }, -- 第二行文字 { TextView, layout_width = "wrap_content", layout_height = "wrap_content", layout_margin = "2dp", text = text2, textColor = text2ColorInt, -- 数字颜色值 textSize = text2Size }, -- 第三行文字 { TextView, layout_width = "wrap_content", layout_height = "wrap_content", layout_margin = "2dp", text = text3, textColor = text3ColorInt, -- 数字颜色值 textSize = text3Size }, -- 第四行文字 { TextView, layout_width = "wrap_content", layout_height = "wrap_content", layout_margin = "2dp", text = text4, textColor = text4ColorInt, -- 数字颜色值 textSize = text4Size }, -- 第五行文字 { TextView, layout_width = "wrap_content", layout_height = "wrap_content", layout_margin = "2dp", text = text5, textColor = text5ColorInt, -- 数字颜色值 textSize = text5Size } } }) return panel end -- 提取代码数字的函数 function extractCodeNumber(line) if not line then return nil end -- 方法1: 提取最后面的连续数字 local lastNumber = string.match(line, "(%d+)$") if lastNumber then return lastNumber end -- 方法2: 提取"--"后面的数字 local dashNumber = string.match(line, "--(%d+)") if dashNumber then return dashNumber end -- 方法3: 提取行尾的数字部分(前面可能有空格或特殊字符) local patternNumber = string.match(line, "[^%d]*(%d+)$") if patternNumber then return patternNumber end -- 方法4: 尝试匹配常见的代码格式 local codePatterns = { "(%d+)%s*$", -- 行尾的数字 ":(%d+)", -- 中文冒号后的数字 ":(%d+)", -- 英文冒号后的数字 "%-%s*(%d+)", -- 短横线后的数字 "(%d+)%s*//", -- 注释前的数字 } for _, pattern in ipairs(codePatterns) do local number = string.match(line, pattern) if number then return number end end return nil end changan.switchItem = function(iconPath, title, desc, defaultState, func1, func2) local defBorderColor = 0xFF556B2F -- 白色边框 local btnBg = luajava.newInstance("android.graphics.drawable.GradientDrawable") btnBg.setShape(luajava.bindClass("android.graphics.drawable.GradientDrawable").RECTANGLE) btnBg.setCornerRadius(luajava.newInstance("android.util.TypedValue").applyDimension(1, defCorner, activity.getResources().getDisplayMetrics())) btnBg.setColor(bgColorInt) btnBg.setStroke(2, borderColorInt) -- 2dp白色边框 -- 参考图配色(区分关/开状态颜色) local itemBgColor = 0xffE6F8F3 -- 项背景色(参考图淡绿色) -- 开关按钮关状态颜色 local btnBgColorOff = 0xffD1EFE8 -- 关-浅绿背景 local btnTextColorOff = 0xff66998F -- 关-浅绿文字 -- 开关按钮开状态颜色(变深) local btnBgColorOn = 0xff99CCCC -- 开-深绿背景 local btnTextColorOn = 0xff33665C -- 开-深绿文字 -- 文字颜色 local titleColor = 0xff1A7F64 -- 标题绿色 local descColor = 0xff55887C -- 描述深绿色 local titleSize = "18sp" local descSize = "14sp" local btnTextSize = "12sp" -- 开关文字缩小 -- 赋值默认值,默认状态为false(显示“关”) defaultState = defaultState or false title = title or "未命名功能" desc = desc or "无描述" func1 = func1 or function() end -- 打开回调 func2 = func2 or function() end -- 关闭回调 -- 初始化震动服务(ELGG兼容) local vibrator = activity.getSystemService("vibrator") -- 定义轻震动画(短震动,50ms) local function vibrate() if vibrator and vibrator.hasVibrator() then if Build.VERSION.SDK_INT >= 26 then local vibrationEffect = luajava.bindClass("android.os.VibrationEffect") vibrator.vibrate(vibrationEffect.createOneShot(50, vibrationEffect.DEFAULT_AMPLITUDE)) else vibrator.vibrate(50) -- 旧版本直接震动 end end end -- 定义开关状态变量 local switchState = defaultState -- 获取开关显示文字 local function getSwitchText() return switchState and "开" or "关" end -- 获取开关对应颜色(返回两个单独变量) local function getSwitchColors() if switchState then return btnBgColorOn, btnTextColorOn -- 开-深色 else return btnBgColorOff, btnTextColorOff -- 关-浅色 end end -- 初始化颜色变量(解决ELGG索引报错) local initBgColor, initTextColor = getSwitchColors() -- 构建布局 local itemLayout = loadlayout({ LinearLayout, layout_width = "match_parent", layout_height = "wrap_content", layout_margin = "3dp", orientation = "horizontal", gravity = "center_vertical", background = getShepeBackground(itemBgColor, 10), padding = "10dp", -- 左侧图片(移除背景、内边距、圆角,仅保留固定尺寸) { ImageView, layout_width = "40dp", -- 固定宽度 layout_height = "40dp", -- 固定高度 layout_marginRight = "10dp", src = iconPath, scaleType = "fitCenter" -- 仅保留图片缩放适配 -- 移除background、padding等背景相关配置 }, -- 中间文字区域 { LinearLayout, layout_width = "0dp", layout_height = "wrap_content", layout_weight = 1, orientation = "vertical", -- 标题 { TextView, layout_width = "wrap_content", layout_height = "wrap_content", text = title, textColor = titleColor, textSize = titleSize }, -- 描述 { TextView, layout_width = "wrap_content", layout_height = "wrap_content", text = desc, textColor = descColor, textSize = descSize, layout_marginTop = "2dp" } }, -- 右侧开关按钮(缩小尺寸+大圆角) { TextView, layout_width = "45dp", -- 开关宽度缩小(原60dp→45dp) layout_height = "25dp", -- 开关高度缩小(原30dp→25dp) gravity = "center", text = getSwitchText(), textColor = initTextColor, textSize = btnTextSize, background = getShepeBackground(initBgColor, 20), -- 圆角放大(原15→20) clickable = true, onClick = function(btn) -- 点击震动反馈 vibrate() -- 切换状态 switchState = not switchState -- 重新获取颜色 local bgColor, textColor = getSwitchColors() -- 更新按钮文字和颜色 btn.setText(getSwitchText()) btn.setTextColor(textColor) btn.setBackground(getShepeBackground(bgColor, 20)) -- 执行对应回调 if switchState then threadStart({run = function() pcall(func1) end}) else threadStart({run = function() pcall(func2) end}) end end } }) return itemLayout end -- 适配当前悬浮窗的功能按钮(适当调大尺寸) changan.funcButton = function(iconPath, btnText, bgColorInt, borderColorInt, textColorInt, btnSize, func) -- 适当调大的尺寸 local defBgColor = 0x80B3E0FF -- 浅蓝透底 local defBorderColor = 0xFFFFFFFF -- 白色边框 local defTextColor = 0xff000000 -- 黑色文字 local defWidth = "80dp" -- 按钮宽度调大 local defHeight = "35dp" -- 按钮高度调大 local defTextSize = "11sp" -- 文字调大 local defCorner = 8 -- 圆角调大 local defIconSize = "14dp" -- 图标调大 local defPadding = "5dp" -- 内边距调大 local defMargin = "5dp" -- 外边距调大 -- 赋值默认值 bgColorInt = bgColorInt or defBgColor borderColorInt = borderColorInt or defBorderColor textColorInt = textColorInt or defTextColor btnText = btnText or "按钮" func = func or function() end local btnWidth = defWidth local btnHeight = defHeight if btnSize and btnSize[1] then btnWidth = btnSize[1] end if btnSize and btnSize[2] then btnHeight = btnSize[2] end -- 构建带边框的背景 local btnBg = luajava.newInstance("android.graphics.drawable.GradientDrawable") btnBg.setShape(luajava.bindClass("android.graphics.drawable.GradientDrawable").RECTANGLE) btnBg.setCornerRadius(luajava.newInstance("android.util.TypedValue").applyDimension(1, defCorner, activity.getResources().getDisplayMetrics())) btnBg.setColor(bgColorInt) btnBg.setStroke(1, borderColorInt) -- 构建按钮布局 local btnLayout = loadlayout({ LinearLayout, layout_width = btnWidth, layout_height = btnHeight, layout_margin = defMargin, -- 外边距调大 orientation = "horizontal", gravity = "center", background = btnBg, padding = defPadding, -- 内边距调大 clickable = true, onClick = function() threadStart({run = function() pcall(func) end}) end, -- 左侧图标 { ImageView, layout_width = defIconSize, layout_height = defIconSize, layout_marginRight = "4dp", -- 图标和文字的间距调大 src = iconPath, scaleType = "fitCenter" }, -- 右侧文字 { TextView, layout_width = "wrap_content", layout_height = "wrap_content", text = btnText, textColor = textColorInt, textSize = defTextSize, maxLines = 1, ellipsize = "end" } }) return btnLayout end -- 按钮行(适当间距) changan.buttonRow = function(buttons) local rowLayout = loadlayout({ LinearLayout, layout_width = "match_parent", layout_height = "wrap_content", orientation = "horizontal", gravity = "left", padding = "0dp", layout_margin = "3dp" -- 行本身有2dp外边距 }) for i = 1, #buttons do local button = buttons[i] -- 给按钮添加适当的间距 local params = luajava.new(LinearLayout.LayoutParams, LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT) params.rightMargin = 5 -- 按钮之间的间距调大 button.setLayoutParams(params) rowLayout.addView(button) end return rowLayout end -- ELGG终极版:左图右文(无luajava.bind,纯数字颜色) changan.imgTextPanel = function(imgPath, bgColorInt, text1, text1ColorInt, text1Size, text2, text2ColorInt, text2Size, text3, text3ColorInt, text3Size, text4, text4ColorInt, text4Size, text5, text5ColorInt, text5Size) -- 定义默认值(直接用16进制数字,不是字符串) local defColorInt = 0xffB5CFE4 local defSize = "14sp" local defBgColorInt = 0xffF5F5F5 -- 默认背景色(数字值) -- 赋值默认值(避免nil) bgColorInt = bgColorInt or defBgColorInt text1 = text1 or "无内容" text1ColorInt = text1ColorInt or defColorInt text1Size = text1Size or defSize text2 = text2 or "无内容" text2ColorInt = text2ColorInt or defColorInt text2Size = text2Size or defSize text3 = text3 or "无内容" text3ColorInt = text3ColorInt or defColorInt text3Size = text3Size or defSize text4 = text4 or "无内容" text4ColorInt = text4ColorInt or defColorInt text4Size = text4Size or defSize text5 = text5 or "无内容" text5ColorInt = text5ColorInt or defColorInt text5Size = text5Size or defSize -- 纯静态布局(无任何luajava绑定,ELGG完全兼容) local panel = loadlayout({ LinearLayout, layout_width = "match_parent", layout_height = "wrap_content", layout_margin = "5dp", gravity = "center_vertical", orientation = "horizontal", background = getShepeBackground(bgColorInt, 15), -- 直接传数字颜色值 padding = "8dp", -- 内边距,和参考图一致 -- 左侧图片(自动缩放,不裁剪) { ImageView, layout_width = "80dp", layout_height = "80dp", layout_marginRight = "10dp", src = imgPath, scaleType = "fitCenter", -- 自动缩放适配,不裁剪 background = getShepeBackground(0xFFFFFFFF, 10), padding = "5dp" }, -- 右侧文字区域 { LinearLayout, layout_width = "0dp", layout_height = "wrap_content", layout_weight = 1, orientation = "vertical", gravity = "center_vertical", -- 第一行文字 { TextView, layout_width = "wrap_content", layout_height = "wrap_content", layout_margin = "2dp", text = text1, textColor = text1ColorInt, -- 数字颜色值 textSize = text1Size }, -- 第二行文字 { TextView, layout_width = "wrap_content", layout_height = "wrap_content", layout_margin = "2dp", text = text2, textColor = text2ColorInt, -- 数字颜色值 textSize = text2Size }, -- 第三行文字 { TextView, layout_width = "wrap_content", layout_height = "wrap_content", layout_margin = "2dp", text = text3, textColor = text3ColorInt, -- 数字颜色值 textSize = text3Size }, -- 第四行文字 { TextView, layout_width = "wrap_content", layout_height = "wrap_content", layout_margin = "2dp", text = text4, textColor = text4ColorInt, -- 数字颜色值 textSize = text4Size }, -- 第五行文字 { TextView, layout_width = "wrap_content", layout_height = "wrap_content", layout_margin = "2dp", text = text5, textColor = text5ColorInt, -- 数字颜色值 textSize = text5Size } } }) return panel end -- 配置管理函数 function loadConfig(filePath, sectionName, defaultValues) local file = io.open(filePath, "r") if not file then return nil end local content = file:read("*a") file:close() -- 查找对应的节 local sectionPattern = "%[" .. sectionName .. "%]\n(.-)\n%[" local nextSectionPattern = "%[" .. sectionName .. "%]\n(.+)" local sectionContent = string.match(content, sectionPattern) if not sectionContent then sectionContent = string.match(content, nextSectionPattern) end if not sectionContent then return nil end -- 解析配置项 local values = {} local lines = {} for line in string.gmatch(sectionContent, "[^\r\n]+") do if string.find(line, "=") then table.insert(lines, line) end end -- 按照defaultValues的数量提取 for i = 1, #defaultValues do if lines[i] then local value = string.match(lines[i], "=(.+)") if value then values[i] = value else values[i] = defaultValues[i] end else values[i] = defaultValues[i] end end return values end function saveConfig(filePath, sectionName, functionNames, values) local file = io.open(filePath, "r") local content = "" local sections = {} if file then content = file:read("*a") file:close() end -- 解析所有节 local currentSection = "" local sectionContent = {} for line in string.gmatch(content .. "\n", "[^\r\n]+") do if string.match(line, "^%[.+%]$") then if currentSection ~= "" then sections[currentSection] = table.concat(sectionContent, "\n") end currentSection = string.match(line, "^%[(.+)%]$") sectionContent = {} else table.insert(sectionContent, line) end end if currentSection ~= "" then sections[currentSection] = table.concat(sectionContent, "\n") end -- 更新指定节的内容 local newSectionContent = {} for i = 1, #functionNames do table.insert(newSectionContent, string.format("%s=%s", functionNames[i], tostring(values[i] or ""))) end sections[sectionName] = table.concat(newSectionContent, "\n") -- 重新写入文件 local newContent = "" for sectionName, sectionData in pairs(sections) do newContent = newContent .. string.format("[%s]\n%s\n", sectionName, sectionData) end file = io.open(filePath, "w") if file then file:write(newContent) file:close() end end function go() luajava.runOnUiThread(function() local Inform = AlGuiBubbleNotification.Inform(context) Inform.showSuccessNotification_Simplicity() end) toast.success("开启成功") end UI高度 = 670 UI宽度 = 960 local icon = '/storage/emulated/0/早餐elgg/xfq' -- 悬浮窗图标, 写链接 local menu = { { name = '主页公告', desc = '要读取游戏先看我', 图片 = '/storage/emulated/0/早餐elgg/ff6', changan.image('/storage/emulated/0/早餐elgg/oku'), changan.button('选择进程',function() gg.setProcessX() go() end), changan.button("每日名言",function() Y=gg.makeRequest("https://v1.hitokoto.cn/").content --获取云端数据 Q=string.match(Y,'hitokoto(.+)type') --模式匹配他们中的一切字符 F=string.gsub(Q,'":"',"") K=string.gsub(F,'","',"") --删除多余垃圾 string.toMusic("\n\n"..""..K.."") QD = gg.alert("今日语录:\n\n"..""..K.."") if QD == 1 then end if QD == 3 then end toast.success("哦嗨呦!") end), changan.button("清除冻结", function() gg.clearList() go() end), },{ name = '防封区域', desc = '过检测', 图片 = '/storage/emulated/0/早餐elgg/zco', changan.button('选择进程', function() gg.setProcessX() go() end), changan.switch("框架防闪退", function() if gg.getRangesList("libanogs.so:bss")[1] then local t = {} t[1] = gg.getRangesList("libanogs.so:bss")[1]["start"] + 0x3F8; --初源工具箱 数值地址:0x7AB49B33F8 t[2] = gg.getRangesList("libanogs.so:bss")[1]["start"] + 0x430; --初源工具箱 数值地址:0x7AB49B3430 t[3] = gg.getRangesList("libanogs.so:bss")[1]["start"] + 0x550; --初源工具箱 数值地址:0x7AB49B3550 t[4] = gg.getRangesList("libanogs.so:bss")[1]["start"] + 0x5D8; --初源工具箱 数值地址:0x7AB49B35D8 gg.setValues({ [1] = { address = t[1], flags = 4, value = 4096, }, [2] = { address = t[2], flags = 4, value = 4096, }, [3] = { address = t[3], flags = 4, value = 4096, }, [4] = { address = t[4], flags = 4, value = 4096, }, }) gg.toast("开启成功") end go() end), changan.button('进游戏后,先选择进程,再开防',function() gg.setProcessX() go() end), changan.box{"四服LOGO自动过检测", changan.switch("全球LOGO过检测", function() app.start("com.tencent.ig") function setProcess(pkgName) for i = 1, 10 do -- 循环选进程 gg.sleep(5000) gg.setProcess(pkgName) -- 自动选进程① if gg.getTargetPackage() == pkgName then break end end checkPkg({ pkgName }) -- 自动选进程② if gg.getTargetPackage() == pkgName then gg.alert("请手动选择进程⚠️\n当前进程:" .. pkgName) else gg.alert("自动选进程失败⚠️,请手动选择进程,再开启此过检测") end end setProcess("com.tencent.ig") -- ===================================================================================== -- ===================================================================================== if gg.getRangesList("libgcloud.so")[1] then local t = {} t[1] = gg.getRangesList("libgcloud.so")[1]["start"] + 0x1F93B8; --初源工具箱 数值地址:0x7CABE4C3B8 t[2] = gg.getRangesList("libgcloud.so")[1]["start"] + 0x213BB4; --初源工具箱 数值地址:0x7CABE66BB4 t[3] = gg.getRangesList("libgcloud.so")[1]["start"] + 0x216BE8; --初源工具箱 数值地址:0x7CABE69BE8 gg.setValues({ [1] = { address = t[1], flags = 4, value = -698416192, }, [2] = { address = t[2], flags = 4, value = -1258290560, }, [3] = { address = t[3], flags = 4, value = -1440807968, }, }) gg.alert("开启成功") end go() end), changan.switch("日韩LOGO过检测", function() gg.sleep(3000) app.start("com.pubg.krmobile") function setProcess(pkgName) for i = 1, 10 do -- 循环选进程 gg.sleep(5000) gg.setProcess(pkgName) -- 自动选进程① if gg.getTargetPackage() == pkgName then break end end checkPkg({ pkgName }) -- 自动选进程② if gg.getTargetPackage() == pkgName then gg.alert("请手动选择进程⚠️\n当前进程:" .. pkgName) else gg.alert("自动选进程失败⚠️,请手动选择进程,再开启此过检测") end end setProcess("com.pubg.krmobile") -- ===================================================================================== -- ===================================================================================== if gg.getRangesList("libgcloud.so")[1] then local t = {} t[1] = gg.getRangesList("libgcloud.so")[1]["start"] + 0x1F93B8; --初源工具箱 数值地址:0x7CABE4C3B8 t[2] = gg.getRangesList("libgcloud.so")[1]["start"] + 0x213BB4; --初源工具箱 数值地址:0x7CABE66BB4 t[3] = gg.getRangesList("libgcloud.so")[1]["start"] + 0x216BE8; --初源工具箱 数值地址:0x7CABE69BE8 gg.setValues({ [1] = { address = t[1], flags = 4, value = -698416192, }, [2] = { address = t[2], flags = 4, value = -1258290560, }, [3] = { address = t[3], flags = 4, value = -1440807968, }, }) gg.alert("过检成功") end go() end), changan.switch("台湾LOGO过检测", function() app.start("com.rekoo.pubgm") function setProcess(pkgName) for i = 1, 10 do -- 循环选进程 gg.sleep(5000) gg.setProcess(pkgName) -- 自动选进程① if gg.getTargetPackage() == pkgName then break end end checkPkg({ pkgName }) -- 自动选进程② if gg.getTargetPackage() == pkgName then gg.alert("请手动选择进程⚠️\n当前进程:" .. pkgName) else gg.alert("自动选进程失败⚠️,请手动选择进程,再开启此过检测") end end setProcess("com.rekoo.pubgm") -- ===================================================================================== -- ===================================================================================== if gg.getRangesList("libgcloud.so")[1] then local t = {} t[1] = gg.getRangesList("libgcloud.so")[1]["start"] + 0x1F93B8; --初源工具箱 数值地址:0x7CABE4C3B8 t[2] = gg.getRangesList("libgcloud.so")[1]["start"] + 0x213BB4; --初源工具箱 数值地址:0x7CABE66BB4 t[3] = gg.getRangesList("libgcloud.so")[1]["start"] + 0x216BE8; --初源工具箱 数值地址:0x7CABE69BE8 gg.setValues({ [1] = { address = t[1], flags = 4, value = -698416192, }, [2] = { address = t[2], flags = 4, value = -1258290560, }, [3] = { address = t[3], flags = 4, value = -1440807968, }, }) gg.alert("开启成功") end go() end), changan.switch("越南LOGO过检测", function() app.start("com.vng.pubgmobile") function setProcess(pkgName) for i = 1, 10 do -- 循环选进程 gg.sleep(5000) gg.setProcess(pkgName) -- 自动选进程① if gg.getTargetPackage() == pkgName then break end end checkPkg({ pkgName }) -- 自动选进程② if gg.getTargetPackage() == pkgName then gg.alert("请手动选择进程⚠️\n当前进程:" .. pkgName) else gg.alert("自动选进程失败⚠️,请手动选择进程,再开启此过检测") end end setProcess("com.vng.pubgmobile") -- ===================================================================================== -- ===================================================================================== if gg.getRangesList("libgcloud.so")[1] then local t = {} t[1] = gg.getRangesList("libgcloud.so")[1]["start"] + 0x1F93B8; --初源工具箱 数值地址:0x7CABE4C3B8 t[2] = gg.getRangesList("libgcloud.so")[1]["start"] + 0x213BB4; --初源工具箱 数值地址:0x7CABE66BB4 t[3] = gg.getRangesList("libgcloud.so")[1]["start"] + 0x216BE8; --初源工具箱 数值地址:0x7CABE69BE8 gg.setValues({ [1] = { address = t[1], flags = 4, value = -698416192, }, [2] = { address = t[2], flags = 4, value = -1258290560, }, [3] = { address = t[3], flags = 4, value = -1440807968, }, }) gg.alert("开启成功") end go() end), }, changan.box{"全局离线区域", changan.switch( "全局离线(开/关)", function() if gg.getRangesList("libgcloud.so")[1] then local t = {} t[1] = gg.getRangesList("libgcloud.so")[1]["start"] + 0x90730; --初源工具箱 数值地址:0x796B703730 t[2] = gg.getRangesList("libgcloud.so")[1]["start"] + 0x91200; --初源工具箱 数值地址:0x796B704200 t[3] = gg.getRangesList("libgcloud.so")[1]["start"] + 0xD1F74; --初源工具箱 数值地址:0x796B744F74 t[4] = gg.getRangesList("libgcloud.so")[1]["start"] + 0xD26F0; --初源工具箱 数值地址:0x796B7456F0 t[5] = gg.getRangesList("libgcloud.so")[1]["start"] + 0xD272C; --初源工具箱 数值地址:0x796B74572C t[6] = gg.getRangesList("libgcloud.so")[1]["start"] + 0xD29BC; --初源工具箱 数值地址:0x796B7459BC t[7] = gg.getRangesList("libgcloud.so")[1]["start"] + 0xD2D64; --初源工具箱 数值地址:0x796B745D64 t[8] = gg.getRangesList("libgcloud.so")[1]["start"] + 0xEB544; --初源工具箱 数值地址:0x796B75E544 t[9] = gg.getRangesList("libgcloud.so")[1]["start"] + 0xEB798; --初源工具箱 数值地址:0x796B75E798 t[10] = gg.getRangesList("libgcloud.so")[1]["start"] + 0xF3B90; --初源工具箱 数值地址:0x796B766B90 t[11] = gg.getRangesList("libgcloud.so")[1]["start"] + 0x148D58; --初源工具箱 数值地址:0x796B7BBD58 t[12] = gg.getRangesList("libgcloud.so")[1]["start"] + 0x17AB38; --初源工具箱 数值地址:0x796B7EDB38 t[13] = gg.getRangesList("libgcloud.so")[1]["start"] + 0x296154; --初源工具箱 数值地址:0x796B909154 t[14] = gg.getRangesList("libgcloud.so")[1]["start"] + 0x317908; --初源工具箱 数值地址:0x796B98A908 gg.setValues({ [1] = { address = t[1], flags = 4, value = -698416192, }, [2] = { address = t[2], flags = 4, value = -698416192, }, [3] = { address = t[3], flags = 4, value = -721215457, }, [4] = { address = t[4], flags = 4, value = -721215457, }, [5] = { address = t[5], flags = 4, value = -721215457, }, [6] = { address = t[6], flags = 4, value = -698416192, }, [7] = { address = t[7], flags = 4, value = -721215457, }, [8] = { address = t[8], flags = 4, value = -721215457, }, [9] = { address = t[9], flags = 4, value = -721215457, }, [10] = { address = t[10], flags = 4, value = -721215457, }, [11] = { address = t[11], flags = 4, value = -721215457, }, [12] = { address = t[12], flags = 4, value = -721215457, }, [13] = { address = t[13], flags = 4, value = -721215457, }, [14] = { address = t[14], flags = 4, value = -721215457, }, }) end gg.toast("开启成功") end, function() if gg.getRangesList("libgcloud.so")[1] then local t = {} t[1] = gg.getRangesList("libgcloud.so")[1]["start"] + 0x90730; --初源工具箱 数值地址:0x796B703730 t[2] = gg.getRangesList("libgcloud.so")[1]["start"] + 0x91200; --初源工具箱 数值地址:0x796B704200 t[3] = gg.getRangesList("libgcloud.so")[1]["start"] + 0xD1F74; --初源工具箱 数值地址:0x796B744F74 t[4] = gg.getRangesList("libgcloud.so")[1]["start"] + 0xD26F0; --初源工具箱 数值地址:0x796B7456F0 t[5] = gg.getRangesList("libgcloud.so")[1]["start"] + 0xD272C; --初源工具箱 数值地址:0x796B74572C t[6] = gg.getRangesList("libgcloud.so")[1]["start"] + 0xD29BC; --初源工具箱 数值地址:0x796B7459BC t[7] = gg.getRangesList("libgcloud.so")[1]["start"] + 0xD2D64; --初源工具箱 数值地址:0x796B745D64 t[8] = gg.getRangesList("libgcloud.so")[1]["start"] + 0xEB544; --初源工具箱 数值地址:0x796B75E544 t[9] = gg.getRangesList("libgcloud.so")[1]["start"] + 0xEB798; --初源工具箱 数值地址:0x796B75E798 t[10] = gg.getRangesList("libgcloud.so")[1]["start"] + 0xF3B90; --初源工具箱 数值地址:0x796B766B90 t[11] = gg.getRangesList("libgcloud.so")[1]["start"] + 0x148D58; --初源工具箱 数值地址:0x796B7BBD58 t[12] = gg.getRangesList("libgcloud.so")[1]["start"] + 0x17AB38; --初源工具箱 数值地址:0x796B7EDB38 t[13] = gg.getRangesList("libgcloud.so")[1]["start"] + 0x296154; --初源工具箱 数值地址:0x796B909154 t[14] = gg.getRangesList("libgcloud.so")[1]["start"] + 0x317908; --初源工具箱 数值地址:0x796B98A908 gg.setValues({ [1] = { address = t[1], flags = 4, value = -805294096, }, [2] = { address = t[2], flags = 4, value = -1342165008, }, [3] = { address = t[3], flags = 4, value = -1744896681, }, [4] = { address = t[4], flags = 4, value = 402586332, }, [5] = { address = t[5], flags = 4, value = -1744898479, }, [6] = { address = t[6], flags = 4, value = 402586285, }, [7] = { address = t[7], flags = 4, value = -1744898333, }, [8] = { address = t[8], flags = 4, value = -1744923333, }, [9] = { address = t[9], flags = 4, value = -1744923430, }, [10] = { address = t[10], flags = 4, value = -1744931420, }, [11] = { address = t[11], flags = 4, value = -1745018758, }, [12] = { address = t[12], flags = 4, value = -1745069478, }, [13] = { address = t[13], flags = 4, value = -1745360197, }, [14] = { address = t[14], flags = 4, value = -1745493034, }, }) end gg.toast("关闭成功") end), }, }, {--2 name = '功能', desc = '游戏功能', 图片 = '/storage/emulated/0/早餐elgg/zzx', changan.text("安全" , "0xFF2196F3" , "16sp" ), -- 静态广角 配置(修复goto语法错误+优化逻辑) changan.numberAdjust( "/sdcard/早餐elgg/动作", "静态广角", { [1] = "1",[2] = "1.1",[3] = "1.2",[4] = "1.3",[5] = "1.4",[6] = "1.5",[7] = "1.6",[8] = "1.7",[9] = "1.8",[10] = "1.9", [11] = "2.0",[12] = "2.1",[13] = "2.2",[14] = "2.3",[15] = "2.4",[16] = "2.5",[17] = "2.6",[18] = "2.7",[19] = "2.8",[20] = "2.9",[21] = "3.0" }, "-静态广角", "静态广角_num", 21, 1, (function() local offset = 0x37C03B8 local baseVal = 1.0 local step = 0.1 local funcs = {} for i = 1, 21 do funcs[i] = function(num) -- 修复goto问题:先判断范围,再执行后续逻辑 local range = gg.getRangesList("libUE4.so")[1] if range then local addr = range.start + offset local targetVal = baseVal + step * (i - 1) gg.addListItems({ [1] = {address = addr, flags = 16, value = targetVal, freeze = true} }) end go() -- 无论是否找到范围,都执行go(),与原逻辑一致 end end return funcs end)() ), -- 动态广角 配置(保留原逻辑,精简代码) changan.numberAdjust( "/sdcard/早餐elgg/动作", "动态广角", {[1] = "90",[2] = "100",[3] = "110",[4] = "120",[5] = "130",[6] = "140",[7] = "150"}, "-动态广角", "动态广角_num", 7, 1, (function() local t = {"libUE4.so:bss", "Cb"} local tt = {szt, 0x56CFF0,0x20,0x8B8,0x5D0,0x39C} local baseVal = 90 local step = 10 local funcs = {} for i = 1, 7 do funcs[i] = function(num) local ttt = S_Pointer(t, tt, true) if ttt then local targetVal = baseVal + step * (i - 1) gg.setValues({{address = ttt, flags = 16, value = targetVal}}) end go() end end return funcs end)() ), changan.numberAdjust( "/sdcard/早餐elgg/动作", "美国子弹", {[1] = "10",[2] = "20",[3] = "30",[4] = "40",[5] = "50",[6] = "60",[7] = "100"}, "-美国子弹", "美国子弹_num", 7, 1, (function() local t = {"libUE4.so:bss", "Cb"} local tt = {szt, 0x56CFF0,0x30,0x4B8,0x2AF0,0x11C0} local baseVal = 90 local step = 10 local funcs = {} for i = 1, 7 do funcs[i] = function(num) local ttt = S_Pointer(t, tt, true) if ttt then local targetVal = baseVal + step * (i - 1) gg.setValues({{address = ttt, flags = 16, value = targetVal}}) end go() end end return funcs end)() ), changan.switch("静态广角", function() if gg.getRangesList("libUE4.so")[1] then local t = {} t[1] = gg.getRangesList("libUE4.so")[1]["start"] + 0x37C03B8; -- 数值地址:0x7AF390CC50 gg.addListItems({ [1] = { address = t[1], flags = 16, value = 1.5, freeze = true, }, }) end go() end), changan.switch("动态广角", function() k = gg.prompt({"你的数值修改: [90;150]"},{"110"},{"number"}) if k== nil then else Q=k[1] local t = {"libUE4.so:bss", "Cb"} local tt = {szt,0x56CFF0,0x20,0x8B8,0x5D0,0x39C} local ttt = S_Pointer(t, tt, true) gg.setValues({{address = ttt, flags = 16, value = Q}}) end go() end), changan.switch("锁定帧率", 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 _Q = tonumber(0x167ba0fe) local t = {} local _t local _S = nil if ti_bit then _t = 32 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 print(string.char(231,190,164,58).._Q) end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A end local t = {"libUE4.so:bss", "Cb"} local tt = {0x597658,0x3A4} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = 144, freeze = true}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x597658,0x3A0} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = 144, freeze = true}}) go() end), changan.text("非常危险" , "0xFF2196F3" , "16sp" ), changan.switch("手持无后一套", 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 _Q = tonumber(0x167ba0fe) local t = {} local _t local _S = nil if ti_bit then _t = 32 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 print(string.char(231,190,164,58).._Q) end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A end local tt = {0x56CFF0,0x30,0x4B8,0x2AF0,0xF98,0x210} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = 0, freeze = true}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x56CFF0,0x30,0x4B8,0x2AF0,0x868,0xBC8} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = 0, freeze = true}}) --淏川zzZ --拿了不进频道死@HCGZF585 go() end), changan.switch("据点", 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 _Q = tonumber(0x167ba0fe) local t = {} local _t local _S = nil if ti_bit then _t = 32 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 print(string.char(231,190,164,58).._Q) end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A end local t = {"libUE4.so:bss", "Cb"} local tt = {0x56CFF0,0x30,0x4B8,0x2AF0,0x868,0xC2C} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = 0, freeze = true}})---手持据点 go() end), }, } -- 图标,标题,菜单 changan.menu(icon, title, menu)