baseDir = gg.FILES_DIR .. "/我真没想重生啊配置" zipPath = gg.FILES_DIR .. "/我真没想重生啊.zip" filesDir = gg.FILES_DIR .. "/" if io.open(baseDir .. "/5d0b465b6585a1561019995.bin") == nil then gg.toast("第一次打开,正在下载资源配置") gg.alert("第一次打开,正在下载资源配置") file.download("https://image.rlyun.fun/down.php/da782df80acadadfcdb8af1fcaaeec8a.zip", zipPath) gg.alert("资源下载完成正在解压") file.unzip(zipPath, filesDir) os.remove(zipPath) gg.alert("资源解压完成") end info = { name = 'gc', appid = '101517', appkey = 'gY3vpGgUe6Jy4Yg6', rc4key = 'hXO1dm1PxBBopbo6', version = '1.0', mi_type = '3' } rlyunyz = getrlyunyz(info) gg.setVisible(false) luajava.setFloatingWindowHide(true) import "android.widget.LinearLayout" import "android.widget.TextView" import "android.widget.EditText" import "android.widget.FrameLayout" import "android.widget.ScrollView" import "android.widget.CheckBox" import "android.widget.ImageView" import "android.graphics.drawable.GradientDrawable" import "android.view.WindowManager" import "android.graphics.PixelFormat" import "android.os.Build" import "android.view.View" import "android.view.Gravity" import "android.view.inputmethod.EditorInfo" import "android.view.animation.AccelerateInterpolator" import "android.view.animation.DecelerateInterpolator" import "android.graphics.Matrix" import "android.view.MotionEvent" import "android.text.method.TransformationMethod" import "android.graphics.Rect" window = context:getSystemService("window") density = context:getResources():getDisplayMetrics().density Typeface = luajava.bindClass("android.graphics.Typeface") defaultBold = Typeface.DEFAULT_BOLD ImageViewClass = luajava.bindClass("android.widget.ImageView") 宽度=400 高度=270 function getBg(corner, color) local gd = luajava.newInstance('android.graphics.drawable.GradientDrawable') gd:setShape(0) -- 圆角增强:非零圆角值最小12dp,让所有按钮/输入框/栏位统一变为圆角 if corner > 0 and corner < 12 then corner = 12 end gd:setCornerRadius(corner * density) gd:setColor(color) return gd end function getRadiiBg(color, lt, rt, rb, lb) local gd = luajava.newInstance('android.graphics.drawable.GradientDrawable') gd:setShape(0) gd:setColor(color) local r = 16 * density local lt2 = lt and r or 0 local rt2 = rt and r or 0 local rb2 = rb and r or 0 local lb2 = lb and r or 0 gd:setCornerRadii({lt2, lt2, rt2, rt2, rb2, rb2, lb2, lb2}) return gd end -- Q弹动画插值器(用Decelerate模拟弹性出,Accelerate模拟弹性入) local easeQPopOut = nil local easeQPopIn = nil function initQPopAnim() easeQPopOut = luajava.newInstance("android.view.animation.DecelerateInterpolator", 2.5) easeQPopIn = luajava.newInstance("android.view.animation.AccelerateInterpolator", 2.0) end -- 启动Q弹弹出动画 function startQPopAnim(view, onEnd) view:setAlpha(0) view:setScaleX(0.4) view:setScaleY(0.4) view:setTranslationY(40 * density) -- 第一段:快速放大到1.1倍(过冲) view:animate() :alpha(1) :scaleX(1.1) :scaleY(1.1) :translationY(0) :setDuration(350) :setInterpolator(luajava.newInstance("android.view.animation.DecelerateInterpolator", 1.8)) :withEndAction(toRun(function() -- 第二段:回弹到1倍(Q弹效果) view:animate() :scaleX(1) :scaleY(1) :setDuration(200) :setInterpolator(luajava.newInstance("android.view.animation.DecelerateInterpolator", 1.5)) :withEndAction(toRun(function() if onEnd then onEnd() end end)) :start() end)) :start() end -- 关闭Q弹收缩动画 function endQPopAnim(view, onEnd) view:animate():cancel() -- 第一段:轻微放大一下再收缩(有回弹感) view:animate() :scaleX(1.05) :scaleY(1.05) :setDuration(80) :setInterpolator(luajava.newInstance("android.view.animation.DecelerateInterpolator", 1.5)) :withEndAction(toRun(function() -- 第二段:快速缩小消失 + 下移 + 淡出 view:animate() :alpha(0) :scaleX(0.5) :scaleY(0.5) :translationY(30 * density) :setDuration(280) :setInterpolator(luajava.newInstance("android.view.animation.AccelerateInterpolator", 2.0)) :withEndAction(toRun(function() if onEnd then onEnd() end end)) :start() end)) :start() end -- ======== 动画工具函数 ======== local easeOutCubic = nil local easeInOutCubic = nil local easeOutBack = nil local easeInBack = nil local easeInOutBack = nil local easeOutQuart = nil function initAnimInterpolators() -- 只用原始代码已验证可用的两个插值器 easeOutCubic = luajava.newInstance("android.view.animation.DecelerateInterpolator", 1.5) easeInBack = luajava.newInstance("android.view.animation.AccelerateInterpolator", 2.0) easeInOutCubic = luajava.newInstance("android.view.animation.DecelerateInterpolator", 1.2) easeOutBack = luajava.newInstance("android.view.animation.DecelerateInterpolator", 2.5) easeInOutBack = easeOutCubic easeOutQuart = luajava.newInstance("android.view.animation.DecelerateInterpolator", 2.0) end -- 平滑按钮按下动画 function btnPressAnim(v, scale) scale = scale or 0.96 v:animate():cancel() v:animate() :scaleX(scale) :scaleY(scale) :setDuration(120) :setInterpolator(easeOutCubic) :start() end -- 平滑按钮释放动画 function btnReleaseAnim(v) v:animate():cancel() v:animate() :scaleX(1) :scaleY(1) :setDuration(250) :setInterpolator(easeOutBack) :start() end -- 颜色平滑过渡(降级方案:直接设置,保证兼容) function animateTextColor(view, fromColor, toColor, duration) view:setTextColor(toColor) end -- 平滑抖动动画(用多段animate模拟阻尼衰减) function smoothShake(v, onEnd) local d = density v:animate():cancel() local function step(endX, dur, interp, next) v:animate() :translationX(endX) :setDuration(dur) :setInterpolator(interp) :withEndAction(toRun(next)) :start() end -- 7段衰减:振幅递减,模拟阻尼效果 step( 9 * d, 55, easeOutCubic, function() step(-7 * d, 55, easeInOutCubic, function() step( 5 * d, 55, easeInOutCubic, function() step(-3.5 * d, 50, easeInOutCubic, function() step( 2 * d, 45, easeInOutCubic, function() step(-1 * d, 40, easeInOutCubic, function() step(0, 35, easeOutCubic, function() if onEnd then onEnd() end end) end) end) end) end) end) end) end function loadImg(v, path, mult) mult = mult or 1.2 local ok, d = pcall(function() return luajava.getBitmapDrawable(path) end) if not ok or not d then return end v:setImageDrawable(d) v:setScaleType(ImageViewClass.ScaleType.MATRIX) v:post(function() local dr = v:getDrawable() if not dr then return end local dw, dh = dr:getIntrinsicWidth(), dr:getIntrinsicHeight() local vw, vh = v:getWidth(), v:getHeight() if vw == 0 or vh == 0 or dw == 0 or dh == 0 then return end local s = math.max(vw / dw, vh / dh) * mult local m = luajava.newInstance("android.graphics.Matrix") m:setScale(s, s) m:postTranslate((vw - dw * s) / 2, (vh - dh * s) / 2) v:setImageMatrix(m) end) end initAnimInterpolators() local inputBorderBg = getBg(4, 0xFFFFFFFF) inputBorderBg:setStroke(1 * density, 0xFFD0D0D0) local noLineBg = getBg(0, 0x00FFFFFF) local labelBg = getBg(8, 0xFFFFFFFF) local cursorBg = getBg(50, 0xFF333333) local noticeBarBg = getBg(1, 0xFF007AFF) local noticeLineBg = getBg(0, 0xFFE8E8E8) local innerHeight, frameHeight = 38, 45 local labelMarginTop, labelMarginLeft = 16, 8 local floatTransY, floatTransX = -17, -5 local leftBg = getRadiiBg(0xFFFFFFFF, true, false, false, true) local rightBg = getRadiiBg(0xFFFFFFFF, false, true, true, false) hanshu = function(v, event) local Action = event:getAction() if Action == MotionEvent.ACTION_DOWN then RawX = event:getRawX() RawY = event:getRawY() x = mainLayoutParams.x y = mainLayoutParams.y elseif Action == MotionEvent.ACTION_MOVE then local newX = x + (event:getRawX() - RawX) local newY = y + (event:getRawY() - RawY) local metrics = context:getResources():getDisplayMetrics() local screenW = metrics.widthPixels local screenH = metrics.heightPixels -- 限制不超出屏幕边界 if newX < 0 then newX = 0 end if newX > screenW - mainLayoutParams.width then newX = screenW - mainLayoutParams.width end if newY < 0 then newY = 0 end if newY > screenH - mainLayoutParams.height then newY = screenH - mainLayoutParams.height end mainLayoutParams.x = newX mainLayoutParams.y = newY window:updateViewLayout(floatWindow, mainLayoutParams) end return false end iconTouch = function(v, event) local action = event:getAction() if action == MotionEvent.ACTION_DOWN then iconRawX = event:getRawX() iconRawY = event:getRawY() iconStartX = mainLayoutParams.x iconStartY = mainLayoutParams.y iconStartTime = os.clock() * 1000 iconIsDragging = false return true elseif action == MotionEvent.ACTION_MOVE then local dx = math.abs(event:getRawX() - iconRawX) local dy = math.abs(event:getRawY() - iconRawY) if not iconIsDragging and (dx > 8 * density or dy > 8 * density) then iconIsDragging = true end if iconIsDragging then mainLayoutParams.x = iconStartX + (event:getRawX() - iconRawX) mainLayoutParams.y = iconStartY + (event:getRawY() - iconRawY) if mainLayoutParams.x < 0 then mainLayoutParams.x = 0 end if mainLayoutParams.y < 0 then mainLayoutParams.y = 0 end window:updateViewLayout(floatWindow, mainLayoutParams) end return true elseif action == MotionEvent.ACTION_UP or action == MotionEvent.ACTION_CANCEL then if not iconIsDragging then local elapsed = os.clock() * 1000 - iconStartTime if elapsed < 250 then 隐藏() end end return true end return false end local view = luajava.loadlayout({ LinearLayout, layout_width = "match_parent", layout_height = "match_parent", orientation = "horizontal", { FrameLayout, id = "leftPanel", layout_width = "0dp", layout_height = "match_parent", layout_weight = 1, background = leftBg, { ImageView, id = "rightImage", layout_width = "match_parent", layout_height = "match_parent", alpha = 0, }, { LinearLayout, id = "loginForm", orientation = "vertical", layout_width = "match_parent", layout_height = "match_parent", paddingLeft = "20dp", paddingTop = "20dp", paddingBottom = "20dp", paddingRight = "8dp", { LinearLayout, layout_width = "match_parent", layout_height = "wrap_content", orientation = "horizontal", gravity = 16, { TextView, id = "titleText", text = "登录", textSize = "18sp", textColor = 0xFF333333, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "wrap_content", layout_height = "wrap_content", }, { View, layout_width = "0dp", layout_weight = 1, layout_height = "1dp", }, { TextView, id = "quickLoginBtn", text = "快速登录", textSize = "12sp", textColor = 0xFF007AFF, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "wrap_content", layout_height = "26dp", gravity = 17, paddingLeft = "10dp", paddingRight = "10dp", background = luajava.newInstance('android.graphics.drawable.GradientDrawable'), }, }, { TextView, id = "subText", text = "尊敬的用户您好", textSize = "12sp", textColor = 0xFF999999, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "wrap_content", layout_height = "wrap_content", layout_marginTop = "2dp", }, { FrameLayout, layout_width = "match_parent", layout_height = frameHeight .. "dp", layout_marginTop = "8dp", { LinearLayout, id = "inputContainer", layout_width = "match_parent", layout_height = innerHeight .. "dp", background = inputBorderBg, paddingLeft = "6dp", paddingRight = "6dp", { FrameLayout, layout_width = "0dp", layout_weight = 1, layout_height = "match_parent", { EditText, id = "inputBox", layout_width = "match_parent", layout_height = "match_parent", background = noLineBg, textSize = "14sp", textColor = 0xFF333333, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, singleLine = true, inputType = 0x00000081, paddingLeft = "8dp", }, { View, id = "cursorView", layout_width = "1.5dp", layout_height = "15dp", layout_marginLeft = "8dp", background = cursorBg, }, }, { TextView, id = "pasteBtn", text = "粘贴", textSize = "12sp", textColor = 0xFF007AFF, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "wrap_content", layout_height = "match_parent", gravity = 16, paddingLeft = "10dp", paddingRight = "4dp", }, }, { TextView, id = "floatLabel", text = "请输入卡密", textSize = "14sp", textColor = 0xFF999999, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "wrap_content", layout_height = "wrap_content", layout_marginTop = labelMarginTop .. "dp", layout_marginLeft = labelMarginLeft .. "dp", background = labelBg, paddingLeft = "4dp", paddingRight = "4dp", }, }, { LinearLayout, layout_width = "match_parent", layout_height = "8dp", }, { TextView, id = "loginBtn", text = "登 录", textSize = "14sp", textColor = 0xFFFFFFFF, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "match_parent", layout_height = "36dp", background = luajava.newInstance('android.graphics.drawable.GradientDrawable'), }, { View, layout_width = "match_parent", layout_height = "0.5dp", background = noticeLineBg, layout_marginTop = "14dp", }, { LinearLayout, id = "noticeBar", layout_width = "match_parent", layout_height = "30dp", orientation = "horizontal", gravity = 16, layout_marginTop = "8dp", visibility = View.GONE, { TextView, id = "noticeDot", text = "●", textSize = "8sp", textColor = 0xFFFF6B35, layout_width = "wrap_content", layout_height = "wrap_content", layout_marginLeft = "8dp", layout_marginRight = "4dp", }, { TextView, id = "noticeBarText", text = "有新内容 点击查看", textSize = "11sp", textColor = 0xFFFF6B35, textStyle = "bold", shadowColor = 0x22000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "wrap_content", layout_height = "wrap_content", }, { View, layout_width = "0dp", layout_weight = 1, layout_height = "1dp", }, { TextView, id = "noticeArrow", text = "›", textSize = "14sp", textColor = 0xFFFF6B35, textStyle = "bold", layout_width = "wrap_content", layout_height = "wrap_content", layout_marginRight = "8dp", }, }, { LinearLayout, id = "agreementBar", layout_width = "match_parent", layout_height = "30dp", orientation = "horizontal", gravity = 16, layout_marginTop = "6dp", visibility = View.GONE, { TextView, id = "agreementDot", text = "●", textSize = "8sp", textColor = 0xFF007AFF, layout_width = "wrap_content", layout_height = "wrap_content", layout_marginLeft = "8dp", layout_marginRight = "4dp", }, { TextView, id = "agreementBarText", text = "使用协议 点击阅读并同意", textSize = "11sp", textColor = 0xFF007AFF, textStyle = "bold", shadowColor = 0x22000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "wrap_content", layout_height = "wrap_content", }, { View, layout_width = "0dp", layout_weight = 1, layout_height = "1dp", }, { TextView, id = "agreementArrow", text = "›", textSize = "14sp", textColor = 0xFF007AFF, textStyle = "bold", layout_width = "wrap_content", layout_height = "wrap_content", layout_marginRight = "8dp", }, }, { LinearLayout, id = "countBar", layout_width = "match_parent", layout_height = "30dp", orientation = "horizontal", gravity = 16, layout_marginTop = "6dp", visibility = View.GONE, { TextView, id = "countDot", text = "●", textSize = "8sp", textColor = 0xFF34C759, layout_width = "wrap_content", layout_height = "wrap_content", layout_marginLeft = "8dp", layout_marginRight = "4dp", }, { TextView, id = "countBarText", text = "全网启动次数加载中...", textSize = "11sp", textColor = 0xFF34C759, textStyle = "bold", shadowColor = 0x22000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "wrap_content", layout_height = "wrap_content", }, { View, layout_width = "0dp", layout_weight = 1, layout_height = "1dp", }, { TextView, id = "countRefresh", text = "↻", textSize = "14sp", textColor = 0xFF34C759, textStyle = "bold", layout_width = "wrap_content", layout_height = "wrap_content", layout_marginRight = "8dp", }, }, }, { TextView, id = "errorText", text = "", textSize = "11sp", textColor = 0xFFFF4444, textStyle = "bold", layout_width = "wrap_content", layout_height = "wrap_content", layout_marginBottom = "8dp", alpha = 0, }, { LinearLayout, id = "kamiErrorPage", layout_width = "match_parent", layout_height = "match_parent", orientation = "vertical", gravity = 17, background = leftBg, paddingLeft = "20dp", paddingRight = "20dp", paddingTop = "20dp", paddingBottom = "20dp", visibility = View.GONE, { TextView, id = "kamiErrorTitle", text = "卡密不存在", textSize = "16sp", textColor = 0xFF333333, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "wrap_content", layout_height = "wrap_content", }, { TextView, id = "kamiErrorSub", text = "验证未通过,请确认后重试", textSize = "12sp", textColor = 0xFF999999, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "wrap_content", layout_height = "wrap_content", layout_marginTop = "4dp", }, { View, layout_width = "match_parent", layout_height = "14dp", }, { TextView, id = "kamiBackBtn", text = "返 回", textSize = "14sp", textColor = 0xFFFFFFFF, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "match_parent", layout_height = "36dp", background = luajava.newInstance('android.graphics.drawable.GradientDrawable'), }, { View, layout_width = "match_parent", layout_height = "8dp", }, { TextView, id = "kamiExitBtn", text = "退 出", textSize = "14sp", textColor = 0xFF999999, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "match_parent", layout_height = "36dp", background = luajava.newInstance('android.graphics.drawable.GradientDrawable'), }, }, { LinearLayout, id = "noticePage", layout_width = "match_parent", layout_height = "match_parent", orientation = "vertical", gravity = 17, background = leftBg, paddingLeft = "20dp", paddingRight = "20dp", paddingTop = "20dp", paddingBottom = "20dp", visibility = View.GONE, { TextView, id = "noticePageTitle", text = "云端公告", textSize = "16sp", textColor = 0xFF333333, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "wrap_content", layout_height = "wrap_content", }, { View, layout_width = "match_parent", layout_height = "10dp", }, { ScrollView, layout_width = "match_parent", layout_height = "130dp", { TextView, id = "noticePageContent", textSize = "12sp", textColor = 0xFF666666, textStyle = "bold", shadowColor = 0x22000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "match_parent", layout_height = "wrap_content", text = "", }, }, { View, layout_width = "match_parent", layout_height = "16dp", }, { TextView, id = "noticeBackBtn", text = "返 回", textSize = "14sp", textColor = 0xFFFFFFFF, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "match_parent", layout_height = "36dp", background = luajava.newInstance('android.graphics.drawable.GradientDrawable'), }, }, { LinearLayout, id = "agreementPage", layout_width = "match_parent", layout_height = "match_parent", orientation = "vertical", gravity = 17, background = leftBg, paddingLeft = "20dp", paddingRight = "8dp", paddingTop = "20dp", paddingBottom = "20dp", visibility = View.GONE, { TextView, id = "agreementTitle", text = "使用协议", textSize = "16sp", textColor = 0xFF333333, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "wrap_content", layout_height = "wrap_content", }, { TextView, text = "请仔细阅读以下内容", textSize = "9sp", textColor = 0xFFBBBBBB, layout_width = "wrap_content", layout_height = "wrap_content", layout_marginTop = "4dp", }, { View, layout_width = "match_parent", layout_height = "8dp", }, { ScrollView, id = "agreementScroll", layout_width = "match_parent", layout_height = "0dp", layout_weight = 1, fadeScrollbars = false, scrollbars = "vertical", { TextView, id = "agreementContent", textSize = "11sp", textColor = 0xFF555555, layout_width = "match_parent", layout_height = "wrap_content", text = "", lineSpacingExtra = "3dp", }, }, { View, layout_width = "match_parent", layout_height = "8dp", }, { TextView, id = "agreementHint", text = "请向下滑动阅读完整协议", textSize = "10sp", textColor = 0xFFAAAAAA, textStyle = "bold", gravity = 17, layout_width = "match_parent", layout_height = "wrap_content", }, { View, layout_width = "match_parent", layout_height = "6dp", }, { TextView, id = "agreementAgreeBtn", text = "请向下滑动阅读完整协议", textSize = "13sp", textColor = 0xFFFFFFFF, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "match_parent", layout_height = "36dp", background = luajava.newInstance('android.graphics.drawable.GradientDrawable'), }, { TextView, id = "agreementExitBtn", text = "不同意,退出", textSize = "11sp", textColor = 0xFF999999, layout_width = "wrap_content", layout_height = "wrap_content", layout_marginTop = "8dp", }, }, }, { FrameLayout, id = "rightPanel", layout_width = "0dp", layout_weight = 1, layout_height = "match_parent", background = rightBg, { ImageView, id = "finalImage", layout_width = "match_parent", layout_height = "match_parent", alpha = 0, }, { LinearLayout, id = "successView", orientation = "vertical", layout_width = "match_parent", layout_height = "match_parent", alpha = 0, { TextView, id = "successText", text = "卡密验证成功", textSize = "16sp", textColor = 0xFF333333, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "wrap_content", layout_height = "wrap_content", }, }, { ImageView, id = "leftImage", layout_width = "match_parent", layout_height = "match_parent", }, }, }) titleText:setGravity(3) subText:setGravity(3) local inputContainerLp = inputContainer:getLayoutParams() local inputContainerNewLp = luajava.newInstance("android.widget.FrameLayout$LayoutParams", inputContainerLp.width, inputContainerLp.height) inputContainerNewLp.gravity = 80 inputContainer:setLayoutParams(inputContainerNewLp) inputContainer:setGravity(16) inputBox:setGravity(16) pasteBtn:setTypeface(customTypeface) pasteBtn:setGravity(16) pasteBtn:setOnClickListener(luajava.createProxy("android.view.View$OnClickListener", { onClick = function(v) pcall(function() -- 尝试多种方式获取剪贴板内容 local text = nil -- 方式1:通过ClipboardManager获取 pcall(function() local clipboard = context:getSystemService("clipboard") if clipboard then local clip = clipboard:getPrimaryClip() if clip and clip:getItemCount() > 0 then local item = clip:getItemAt(0) if item then local t = item:getText() if t then text = tostring(t) end end end end end) -- 方式2:通过Context.CLIPBOARD_SERVICE常量获取 if not text or #text == 0 then pcall(function() local Context = luajava.bindClass("android.content.Context") local clipboard = context:getSystemService(Context.CLIPBOARD_SERVICE) if clipboard then local clip = clipboard:getPrimaryClip() if clip and clip:getItemCount() > 0 then local item = clip:getItemAt(0) if item then local t = item:getText() if t then text = tostring(t) end end end end end) end -- 方式3:使用ClipData.Item的coerceToText if not text or #text == 0 then pcall(function() local clipboard = context:getSystemService("clipboard") if clipboard then local clip = clipboard:getPrimaryClip() if clip and clip:getItemCount() > 0 then local t = clip:getItemAt(0):coerceToText(context) if t then text = tostring(t) end end end end) end if text and #text > 0 then inputBox:setText(text) -- 兼容设置光标位置 pcall(function() inputBox:setSelection(text:len()) end) pcall(function() inputBox:setSelection(inputBox:getText():length()) end) else gg.toast("请给APP粘贴权限") end end) end })) local cursorLp = cursorView:getLayoutParams() local cursorNewLp = luajava.newInstance("android.widget.FrameLayout$LayoutParams", cursorLp.width, cursorLp.height) cursorNewLp.gravity = 19 cursorNewLp:setMargins(math.floor(8 * density + 0.5), 0, 0, 0) cursorView:setLayoutParams(cursorNewLp) local floatLabelLp = floatLabel:getLayoutParams() local floatLabelNewLp = luajava.newInstance("android.widget.FrameLayout$LayoutParams", floatLabelLp.width, floatLabelLp.height) floatLabelNewLp.gravity = 51 floatLabelNewLp:setMargins(math.floor(labelMarginLeft * density + 0.5), math.floor(labelMarginTop * density + 0.5), 0, 0) floatLabel:setLayoutParams(floatLabelNewLp) loginBtn:setGravity(17) local errorLp = errorText:getLayoutParams() local errorNewLp = luajava.newInstance("android.widget.FrameLayout$LayoutParams", errorLp.width, errorLp.height) errorNewLp.gravity = 81 errorNewLp:setMargins(0, 0, 0, math.floor(8 * density + 0.5)) errorText:setLayoutParams(errorNewLp) successView:setGravity(17) successText:setGravity(17) if Build.VERSION.SDK_INT >= 21 then leftPanel:setClipToOutline(true) rightPanel:setClipToOutline(true) end local loginBg = getBg(4, 0xFF007AFF) local loginBgDown = getBg(4, 0xFF0051D5) loginBtn:setBackground(loginBg) loginBtn:setOnTouchListener(luajava.createProxy("android.view.View$OnTouchListener", { onTouch = function(v, event) local a = event:getAction() if a == MotionEvent.ACTION_DOWN then v:setBackground(loginBgDown) btnPressAnim(v, 0.95) elseif a == MotionEvent.ACTION_UP or a == MotionEvent.ACTION_CANCEL then v:setBackground(loginBg) btnReleaseAnim(v) end return false end })) -- ======== 快速登录按钮样式与事件 ======== local quickLoginBg = getBg(12, 0xFFEBF4FF) local quickLoginBgDown = getBg(12, 0xFFD0E6FF) quickLoginBtn:setBackground(quickLoginBg) quickLoginBtn:setTypeface(customTypeface) quickLoginBtn:setClickable(true) quickLoginBtn:setFocusable(true) function doQuickLogin() if not isAgreementAccepted() then showAgreementDirect() gg.toast("请先阅读并同意使用协议") return end local saved = loadSavedKami() if not saved or saved == "" then gg.toast("暂无保存的卡密") return end -- 直接设置待验证卡密,不走doLogin(避免2秒防抖拦截) if KMUI and KMUI._running then KMUI._pendingKami = saved gg.toast("正在快速登录...") else -- KMUI还没启动,走doLogin方式 inputBox:setText(saved) doLogin() inputBox:setText("") gg.toast("正在快速登录...") end end quickLoginBtn:setOnTouchListener(luajava.createProxy("android.view.View$OnTouchListener", { onTouch = function(v, event) local a = event:getAction() if a == MotionEvent.ACTION_DOWN then v:setBackground(quickLoginBgDown) btnPressAnim(v, 0.92) elseif a == MotionEvent.ACTION_UP then v:setBackground(quickLoginBg) btnReleaseAnim(v) pcall(doQuickLogin) elseif a == MotionEvent.ACTION_CANCEL then v:setBackground(quickLoginBg) btnReleaseAnim(v) end return true end })) -- 初始化快速登录按钮状态 local function initQuickLoginBtn() local saved = loadSavedKami() if saved and saved ~= "" then quickLoginBtn:setVisibility(View.VISIBLE) -- 不自动填充卡密到输入框,保护隐私 else quickLoginBtn:setVisibility(View.GONE) end end loadImg(leftImage, baseDir .. "/萧容鱼向左", 1.2) loadImg(rightImage, baseDir .. "/萧容鱼向右", 1.2) inputBox:setCursorVisible(true) cursorView:setVisibility(View.GONE) local asteriskTransform = luajava.createProxy("android.text.method.TransformationMethod", { getTransformation = function(source, view) if source == nil then return nil end local n = source:length() if n == 0 then return source end local sb = luajava.newInstance("java.lang.StringBuilder") for i = 1, n do sb:append("*") end return sb:toString() end, onFocusChanged = function(view, sourceText, focused, direction, previouslyFocusedRect) end }) inputBox:setTransformationMethod(asteriskTransform) titleText:setTypeface(defaultBold) subText:setTypeface(defaultBold) inputBox:setTypeface(defaultBold) floatLabel:setTypeface(defaultBold) successText:setTypeface(defaultBold) local customTypeface = Typeface:createFromFile(baseDir .. "/5d0b465b6585a1561019995.bin") loginBtn:setTypeface(customTypeface) kamiErrorTitle:setTypeface(defaultBold) kamiErrorSub:setTypeface(defaultBold) kamiErrorTitle:setGravity(17) kamiErrorSub:setGravity(17) kamiBackBtn:setTypeface(customTypeface) kamiBackBtn:setGravity(17) kamiExitBtn:setTypeface(customTypeface) kamiExitBtn:setGravity(17) local backBtnBg = getBg(4, 0xFF007AFF) local backBtnBgDown = getBg(4, 0xFF0051D5) kamiBackBtn:setBackground(backBtnBg) local exitBtnBg = getBg(4, 0xFFFFFFFF) exitBtnBg:setStroke(1 * density, 0xFFD0D0D0) local exitBtnBgDown = getBg(4, 0xFFF5F5F5) exitBtnBgDown:setStroke(1 * density, 0xFFD0D0D0) kamiExitBtn:setBackground(exitBtnBg) kamiBackBtn:setOnTouchListener(luajava.createProxy("android.view.View$OnTouchListener", { onTouch = function(v, event) local a = event:getAction() if a == MotionEvent.ACTION_DOWN then v:setBackground(backBtnBgDown) btnPressAnim(v, 0.95) elseif a == MotionEvent.ACTION_UP or a == MotionEvent.ACTION_CANCEL then v:setBackground(backBtnBg) btnReleaseAnim(v) end return false end })) kamiExitBtn:setOnTouchListener(luajava.createProxy("android.view.View$OnTouchListener", { onTouch = function(v, event) local a = event:getAction() if a == MotionEvent.ACTION_DOWN then v:setBackground(exitBtnBgDown) btnPressAnim(v, 0.95) elseif a == MotionEvent.ACTION_UP or a == MotionEvent.ACTION_CANCEL then v:setBackground(exitBtnBg) btnReleaseAnim(v) end return false end })) kamiBackBtn:setOnClickListener(luajava.createProxy("android.view.View$OnClickListener", { onClick = function(v) backToLogin() end })) kamiExitBtn:setOnClickListener(luajava.createProxy("android.view.View$OnClickListener", { onClick = function(v) os.exit(0) end })) -- ======== 公告样式与事件 ======== noticePageTitle:setTypeface(defaultBold) noticePageContent:setTypeface(defaultBold) noticeBackBtn:setTypeface(defaultBold) noticeBackBtn:setGravity(17) noticeBarText:setTypeface(defaultBold) local noticeBarBgDrawable = getBg(6, 0xFFFFF8F0) noticeBarBgDrawable:setStroke(1 * density, 0xFFFFE4CC) noticeBar:setBackground(noticeBarBgDrawable) local noticeBackBtnBg = getBg(4, 0xFF007AFF) local noticeBackBtnBgDown = getBg(4, 0xFF0051D5) noticeBackBtn:setBackground(noticeBackBtnBg) noticeBackBtn:setOnTouchListener(luajava.createProxy("android.view.View$OnTouchListener", { onTouch = function(v, event) local a = event:getAction() if a == MotionEvent.ACTION_DOWN then v:setBackground(noticeBackBtnBgDown) btnPressAnim(v, 0.95) elseif a == MotionEvent.ACTION_UP or a == MotionEvent.ACTION_CANCEL then v:setBackground(noticeBackBtnBg) btnReleaseAnim(v) end return false end })) noticeBackBtn:setOnClickListener(luajava.createProxy("android.view.View$OnClickListener", { onClick = function(v) hideNoticePage() end })) noticeBar:setOnClickListener(luajava.createProxy("android.view.View$OnClickListener", { onClick = function(v) showNoticePage() end })) -- ======== 使用协议样式与事件 ======== agreementTitle:setTypeface(defaultBold) agreementAgreeBtn:setTypeface(defaultBold) agreementAgreeBtn:setGravity(17) agreementBarText:setTypeface(defaultBold) agreementHint:setTypeface(defaultBold) local agreementBarBgDrawable = getBg(6, 0xFFF0F6FF) agreementBarBgDrawable:setStroke(1 * density, 0xFFCCE0FF) agreementBar:setBackground(agreementBarBgDrawable) -- ======== 全网启动次数栏样式与事件 ======== countBarText:setTypeface(defaultBold) local countBarBgDrawable = getBg(6, 0xFFF0FFF5) countBarBgDrawable:setStroke(1 * density, 0xFFCCEBD8) countBar:setBackground(countBarBgDrawable) local countBarBgDown = getBg(6, 0xFFE0F5EC) countBarBgDown:setStroke(1 * density, 0xFFB8DCC8) countBar:setOnTouchListener(luajava.createProxy("android.view.View$OnTouchListener", { onTouch = function(v, event) local a = event:getAction() if a == MotionEvent.ACTION_DOWN then v:setBackground(countBarBgDown) btnPressAnim(v, 0.97) elseif a == MotionEvent.ACTION_UP or a == MotionEvent.ACTION_CANCEL then v:setBackground(countBarBgDrawable) btnReleaseAnim(v) end return false end })) countBar:setOnClickListener(luajava.createProxy("android.view.View$OnClickListener", { onClick = function(v) refreshGlobalCount() end })) local agreementText = [[ 使用游戏作弊工具风险提示与免责声明 一、账号风险 使用本工具可能导致您的游戏账号被官方检测并封禁,包括但不限于永久封号、临时封禁、清除游戏数据等处理。由此造成的账号损失及充值损失由使用者自行承担。 二、设备风险 本工具可能需要特殊权限运行,可能对设备系统稳定性产生影响,包括但不限于闪退、卡顿、数据异常等。请确保重要数据已备份,因使用本工具导致的设备问题由使用者自行承担。 三、法律风险 在部分国家或地区,使用游戏作弊工具可能违反相关法律法规或游戏服务协议。使用者应自行了解并遵守所在地法律法规,因违规使用产生的法律责任由使用者本人承担。 四、游戏体验 使用作弊工具可能破坏游戏平衡性,影响其他玩家的正常游戏体验,可能导致被其他玩家举报。 五、免责声明 本工具仅供学习交流与技术研究使用。创作者不对使用本工具产生的任何直接或间接后果负责,包括但不限于账号封禁、财产损失、法律责任等。使用者需对自己的行为负全部责任。 六、确认 点击下方"我同意并承担所有后果"即表示您已充分阅读并理解以上内容,自愿承担一切因使用本工具可能产生的后果,与工具创作者无关。]] agreementContent:setText(agreementText) local agreeBtnBg = getBg(4, 0xFF007AFF) local agreeBtnBgDisabled = getBg(4, 0xFF999999) local agreeBtnBgDown = getBg(4, 0xFF0051D5) agreementAgreeBtn:setBackground(agreeBtnBgDisabled) agreementAgreeBtn:setEnabled(false) agreementAgreeBtn:setClickable(false) -- 滑动到底部检测 local _agreementScrolledToBottom = false local function onAgreementScrolledToBottom() if _agreementScrolledToBottom then return end _agreementScrolledToBottom = true agreementAgreeBtn:setText("我同意并承担所有后果") agreementAgreeBtn:setBackground(agreeBtnBg) agreementAgreeBtn:setEnabled(true) agreementAgreeBtn:setClickable(true) agreementHint:setText("已阅读完整协议,可点击下方按钮继续") agreementHint:setTextColor(0xFF007AFF) end local function checkAgreementScroll() local scrollY = agreementScroll:getScrollY() local height = agreementScroll:getHeight() local child = agreementScroll:getChildAt(0) if child == nil then return end local contentHeight = child:getHeight() -- 内容高度不超过可视区域,无需滑动也算到底 if contentHeight <= height then onAgreementScrolledToBottom() elseif scrollY + height >= contentHeight - 5 then onAgreementScrolledToBottom() end end agreementScroll:getViewTreeObserver():addOnScrollChangedListener( luajava.createProxy("android.view.ViewTreeObserver$OnScrollChangedListener", { onScrollChanged = function() checkAgreementScroll() end }) ) -- 页面显示时延迟检查一次(处理内容不足一屏的情况) local function checkAgreementScrollDelayed() local Handler = luajava.bindClass("android.os.Handler") local Looper = luajava.bindClass("android.os.Looper") local handler = luajava.newInstance("android.os.Handler", Looper:getMainLooper()) handler:postDelayed(toRun(function() checkAgreementScroll() end), 300) end agreementAgreeBtn:setOnTouchListener(luajava.createProxy("android.view.View$OnTouchListener", { onTouch = function(v, event) local a = event:getAction() if a == MotionEvent.ACTION_DOWN then if _agreementScrolledToBottom then v:setBackground(agreeBtnBgDown) end btnPressAnim(v, 0.95) elseif a == MotionEvent.ACTION_UP or a == MotionEvent.ACTION_CANCEL then if _agreementScrolledToBottom then v:setBackground(agreeBtnBg) else v:setBackground(agreeBtnBgDisabled) end btnReleaseAnim(v) end return false end })) agreementAgreeBtn:setOnClickListener(luajava.createProxy("android.view.View$OnClickListener", { onClick = function(v) if not _agreementScrolledToBottom then return end saveAgreementAccepted() hideAgreementPage() end })) agreementExitBtn:setOnClickListener(luajava.createProxy("android.view.View$OnClickListener", { onClick = function(v) os.exit(0) end })) agreementBar:setOnClickListener(luajava.createProxy("android.view.View$OnClickListener", { onClick = function(v) showAgreementPage() end })) inputBox:setImeActionLabel("登录", EditorInfo.IME_ACTION_DONE) inputBox:setImeOptions(EditorInfo.IME_ACTION_DONE) local labelFloated = false function updateCursor() local text = inputBox:getText():toString() local w = inputBox:getPaint():measureText(text) cursorView:setTranslationX(w + 2 * density) cursorView:setTranslationY(-1 * density) end function doFloatLabel() if labelFloated then return end labelFloated = true floatLabel:animate():cancel() floatLabel:animate() :translationY(density * floatTransY) :translationX(density * floatTransX) :scaleX(0.8) :scaleY(0.8) :setDuration(280) :setInterpolator(easeOutBack) :start() animateTextColor(floatLabel, 0xFF999999, 0xFF007AFF, 280) end function doSinkLabel() if not labelFloated then return end if inputBox:getText():toString() == "" then labelFloated = false floatLabel:animate():cancel() floatLabel:animate() :translationY(0) :translationX(0) :scaleX(1) :scaleY(1) :setDuration(240) :setInterpolator(easeInOutCubic) :start() animateTextColor(floatLabel, 0xFF007AFF, 0xFF999999, 240) end end inputBox:setOnFocusChangeListener(luajava.createProxy("android.view.View$OnFocusChangeListener", { onFocusChange = function(v, hasFocus) if hasFocus then doFloatLabel() else doSinkLabel() end end })) inputBox:addTextChangedListener(luajava.createProxy("android.text.TextWatcher", { beforeTextChanged = function(s, start, count, after) end, onTextChanged = function(s, start, before, count) if s and s:length() > 0 then doFloatLabel() end errorText:setAlpha(0) end, afterTextChanged = function(s) end })) local verified = false local lastClickTime = 0 function toRun(func) return luajava.createProxy("java.lang.Runnable", { run = func }) end function safeThread(func, tip) if type(func) ~= "function" then return end luajava.newThread(function() local ok, err = pcall(func) if not ok then local msg = (tip or "功能") .. " 执行出错:\n" .. tostring(err) pcall(function() gg.alert(msg) end) end end):start() end function shake(v, onEnd) smoothShake(v, onEnd) end function showError(msg) errorText:setText(msg) errorText:setAlpha(0) errorText:setTranslationY(10 * density) errorText:animate():cancel() errorText:animate() :alpha(1) :translationY(0) :setDuration(350) :setInterpolator(easeOutBack) :withEndAction(toRun(function() local Handler = luajava.bindClass("android.os.Handler") local Looper = luajava.bindClass("android.os.Looper") local handler = luajava.newInstance("android.os.Handler", Looper:getMainLooper()) handler:postDelayed(toRun(function() smoothShake(errorText, function() errorText:animate() :alpha(0) :translationY(-10 * density) :setDuration(250) :setInterpolator(easeInBack) :start() end) end), 400) end)) :start() end function showKamiError(msg) kamiErrorTitle:setText(msg) pcall(function() local imm = context:getSystemService("input_method") imm:hideSoftInputFromWindow(inputBox:getWindowToken(), 0) end) loginForm:animate():cancel() kamiErrorPage:animate():cancel() -- 登录表单向左滑出并淡出 loginForm:animate() :alpha(0) :translationX(-30 * density) :setDuration(280) :setInterpolator(easeInBack) :withEndAction(toRun(function() loginForm:setVisibility(View.GONE) loginForm:setTranslationX(0) loginForm:setAlpha(1) -- 错误页从右侧滑入并淡入 kamiErrorPage:setVisibility(View.VISIBLE) kamiErrorPage:setAlpha(0) kamiErrorPage:setTranslationX(30 * density) kamiErrorPage:animate() :alpha(1) :translationX(0) :setDuration(380) :setInterpolator(easeOutBack) :start() end)) :start() end function backToLogin() kamiErrorPage:animate():cancel() loginForm:animate():cancel() -- 错误页向右滑出并淡出 kamiErrorPage:animate() :alpha(0) :translationX(30 * density) :setDuration(250) :setInterpolator(easeInBack) :withEndAction(toRun(function() kamiErrorPage:setVisibility(View.GONE) kamiErrorPage:setTranslationX(0) kamiErrorPage:setAlpha(1) -- 登录表单从左侧滑入并淡入 loginForm:setVisibility(View.VISIBLE) loginForm:setAlpha(0) loginForm:setTranslationX(-30 * density) loginForm:animate() :alpha(1) :translationX(0) :setDuration(380) :setInterpolator(easeOutBack) :start() end)) :start() end -- ======== 公告栏滑入 ======== local _noticeBarShown = false function showNoticeBar() if _noticeBarShown then return end _noticeBarShown = true noticeBar:setVisibility(View.VISIBLE) noticeBar:setAlpha(0) noticeBar:setTranslationY(-15 * density) noticeBar:animate():cancel() noticeBar:animate() :alpha(1) :translationY(0) :setDuration(450) :setInterpolator(easeOutBack) :start() end -- ======== 公告详情页切换 ======== function showNoticePage() loginForm:animate():cancel() noticePage:animate():cancel() loginForm:animate() :alpha(0) :translationX(-30 * density) :setDuration(280) :setInterpolator(easeInBack) :withEndAction(toRun(function() loginForm:setVisibility(View.GONE) loginForm:setTranslationX(0) loginForm:setAlpha(1) noticePage:setVisibility(View.VISIBLE) noticePage:setAlpha(0) noticePage:setTranslationX(30 * density) noticePage:animate() :alpha(1) :translationX(0) :setDuration(380) :setInterpolator(easeOutBack) :start() end)) :start() end function hideNoticePage() loginForm:animate():cancel() noticePage:animate():cancel() noticePage:animate() :alpha(0) :translationX(30 * density) :setDuration(250) :setInterpolator(easeInBack) :withEndAction(toRun(function() noticePage:setVisibility(View.GONE) noticePage:setTranslationX(0) noticePage:setAlpha(1) loginForm:setVisibility(View.VISIBLE) loginForm:setAlpha(0) loginForm:setTranslationX(-30 * density) loginForm:animate() :alpha(1) :translationX(0) :setDuration(380) :setInterpolator(easeOutBack) :start() end)) :start() end -- ======== 使用协议栏显示 ======== local _agreementBarShown = false function showAgreementBar() if _agreementBarShown then return end _agreementBarShown = true agreementBar:setVisibility(View.VISIBLE) agreementBar:setAlpha(0) agreementBar:setTranslationY(-15 * density) agreementBar:animate():cancel() agreementBar:animate() :alpha(1) :translationY(0) :setDuration(450) :setInterpolator(easeOutBack) :start() end -- ======== 全网启动次数栏显示 ======== local _countBarShown = false function showCountBar() if _countBarShown then return end _countBarShown = true countBar:setVisibility(View.VISIBLE) countBar:setAlpha(0) countBar:setTranslationY(-15 * density) countBar:animate():cancel() countBar:animate() :alpha(1) :translationY(0) :setDuration(450) :setInterpolator(easeOutBack) :start() end -- ======== 全网启动次数刷新 ======== function refreshGlobalCount() countBarText:setText("全网启动次数刷新中...") countDot:setTextColor(0xFFAAAAAA) countBarText:setTextColor(0xFFAAAAAA) countRefresh:setTextColor(0xFFAAAAAA) safeThread(function() local ok, ini = pcall(function() return rlyunyz.checkUpdate() end) luajava.runOnUiThread(function() local count = 0 if ok and type(ini) == 'table' then count = tonumber(ini.api_total) or 0 end countBarText:setText(string.format("全网启动次数:%s次", count)) countDot:setTextColor(0xFF34C759) countBarText:setTextColor(0xFF34C759) countRefresh:setTextColor(0xFF34C759) showCountBar() end) end, "全网启动次数") end -- ======== 使用协议页面切换 ======== function showAgreementPage() loginForm:animate():cancel() agreementPage:animate():cancel() loginForm:animate() :alpha(0) :translationX(-30 * density) :setDuration(280) :setInterpolator(easeInBack) :withEndAction(toRun(function() loginForm:setVisibility(View.GONE) loginForm:setTranslationX(0) loginForm:setAlpha(1) agreementPage:setVisibility(View.VISIBLE) agreementPage:setAlpha(0) agreementPage:setTranslationX(30 * density) -- 重置协议滑动状态 _agreementScrolledToBottom = false agreementScroll:scrollTo(0, 0) agreementAgreeBtn:setText("请向下滑动阅读完整协议") agreementAgreeBtn:setBackground(agreeBtnBgDisabled) agreementAgreeBtn:setEnabled(false) agreementAgreeBtn:setClickable(false) agreementHint:setText("请向下滑动阅读完整协议") agreementHint:setTextColor(0xFFAAAAAA) agreementPage:animate() :alpha(1) :translationX(0) :setDuration(380) :setInterpolator(easeOutBack) :start() checkAgreementScrollDelayed() end)) :start() end function hideAgreementPage() loginForm:animate():cancel() agreementPage:animate():cancel() agreementPage:animate() :alpha(0) :translationX(30 * density) :setDuration(250) :setInterpolator(easeInBack) :withEndAction(toRun(function() agreementPage:setVisibility(View.GONE) agreementPage:setTranslationX(0) agreementPage:setAlpha(1) loginForm:setVisibility(View.VISIBLE) loginForm:setAlpha(0) loginForm:setTranslationX(-30 * density) loginForm:animate() :alpha(1) :translationX(0) :setDuration(380) :setInterpolator(easeOutBack) :start() end)) :start() end -- ======== 首次使用直接显示协议页 ======== function showAgreementDirect() loginForm:setVisibility(View.GONE) -- 重置协议滑动状态 _agreementScrolledToBottom = false agreementScroll:scrollTo(0, 0) agreementAgreeBtn:setText("请向下滑动阅读完整协议") agreementAgreeBtn:setBackground(agreeBtnBgDisabled) agreementAgreeBtn:setEnabled(false) agreementAgreeBtn:setClickable(false) agreementHint:setText("请向下滑动阅读完整协议") agreementHint:setTextColor(0xFFAAAAAA) agreementPage:setVisibility(View.VISIBLE) agreementPage:setAlpha(0) agreementPage:animate():cancel() agreementPage:animate() :alpha(1) :setDuration(400) :setInterpolator(easeOutCubic) :start() checkAgreementScrollDelayed() end function backToLoginPage() pcall(function() leftPanel:animate():cancel() end) pcall(function() rightPanel:animate():cancel() end) pcall(function() loginForm:animate():cancel() end) pcall(function() leftImage:animate():cancel() end) pcall(function() rightImage:animate():cancel() end) pcall(function() successView:animate():cancel() end) pcall(function() finalImage:animate():cancel() end) if Build.VERSION.SDK_INT >= 21 then view:setClipToOutline(false) end view:setBackgroundColor(0x00000000) leftPanel:setAlpha(1) leftPanel:setVisibility(View.VISIBLE) rightPanel:setAlpha(1) rightPanel:setVisibility(View.VISIBLE) rightImage:setAlpha(0) loginForm:setVisibility(View.VISIBLE) loginForm:setAlpha(1) loginForm:setTranslationX(0) leftImage:setAlpha(1) leftImage:setVisibility(View.VISIBLE) leftImage:setTranslationX(0) successView:setAlpha(0) pcall(function() while successView:getChildCount() > 1 do successView:removeViewAt(successView:getChildCount() - 1) end end) finalImage:setAlpha(0) kamiErrorPage:setVisibility(View.GONE) kamiErrorPage:setAlpha(1) noticePage:setVisibility(View.GONE) noticePage:setAlpha(1) noticePage:setTranslationX(0) agreementPage:setVisibility(View.GONE) agreementPage:setAlpha(1) agreementPage:setTranslationX(0) inputBox:setText("") verified = false lastClickTime = 0 local llp = luajava.newInstance("android.widget.LinearLayout$LayoutParams", 0, -1) llp.weight = 1 view:addView(leftPanel, llp) local rlp = luajava.newInstance("android.widget.LinearLayout$LayoutParams", 0, -1) rlp.weight = 1 view:addView(rightPanel, rlp) end function showUnbindInfo() local kami = KMUI._verifiedKami or "" local unbindDone = false local function maskKami(k) local len = #k if len <= 4 then return k:sub(1, 1) .. string.rep("*", len - 2) .. k:sub(-1) end return k:sub(1, 3) .. string.rep("*", len - 4) .. k:sub(-1) end local unbindLineBg = getBg(0, 0xFFE8E8E8) local unbindDotBg = getBg(50, 0xFF007AFF) local unbindLayout = luajava.loadlayout({ LinearLayout, layout_width = "match_parent", layout_height = "match_parent", orientation = "vertical", background = getBg(16, 0xFFFFFFFF), paddingLeft = "24dp", paddingRight = "24dp", paddingTop = "28dp", paddingBottom = "28dp", { TextView, text = "解绑信息", textSize = "16sp", textColor = 0xFF333333, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "wrap_content", layout_height = "wrap_content", }, { View, layout_width = "match_parent", layout_height = "0.5dp", background = unbindLineBg, layout_marginTop = "12dp", }, { LinearLayout, layout_width = "match_parent", layout_height = "wrap_content", orientation = "horizontal", gravity = 16, layout_marginTop = "14dp", { View, layout_width = "2.5dp", layout_height = "10dp", background = unbindDotBg, layout_marginRight = "5dp", }, { TextView, text = "当前卡密", textSize = "13sp", textColor = 0xFF999999, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "wrap_content", layout_height = "wrap_content", }, { View, layout_width = "0dp", layout_height = "1dp", layout_weight = 1, }, { TextView, id = "unbindStatus", text = maskKami(kami), textSize = "13sp", textColor = 0xFF007AFF, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "wrap_content", layout_height = "wrap_content", }, }, { LinearLayout, layout_width = "match_parent", layout_height = "wrap_content", orientation = "horizontal", gravity = 16, layout_marginTop = "12dp", { View, layout_width = "2.5dp", layout_height = "10dp", background = unbindDotBg, layout_marginRight = "5dp", }, { TextView, text = "设备状态", textSize = "13sp", textColor = 0xFF999999, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "wrap_content", layout_height = "wrap_content", }, { View, layout_width = "0dp", layout_height = "1dp", layout_weight = 1, }, { TextView, id = "unbindDevice", text = "已绑定", textSize = "13sp", textColor = 0xFF007AFF, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "wrap_content", layout_height = "wrap_content", }, }, { View, layout_width = "match_parent", layout_height = "0dp", layout_weight = 1, }, { TextView, id = "unbindBtn", text = "内置解绑", textSize = "14sp", textColor = 0xFFFFFFFF, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "match_parent", layout_height = "36dp", background = luajava.newInstance('android.graphics.drawable.GradientDrawable'), }, { View, layout_width = "match_parent", layout_height = "8dp", }, { TextView, id = "unbindEnterBtn", text = "直接进入", textSize = "14sp", textColor = 0xFF999999, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "match_parent", layout_height = "36dp", background = luajava.newInstance('android.graphics.drawable.GradientDrawable'), }, }) local wrapper = luajava.newInstance('android.widget.FrameLayout', context) local wlp = luajava.newInstance("android.widget.LinearLayout$LayoutParams", -1, -1) view:addView(wrapper, wlp) local flp = luajava.newInstance("android.widget.FrameLayout$LayoutParams", -1, -1) wrapper:addView(unbindLayout, flp) unbindLayout:setAlpha(0) unbindLayout:setScaleX(0.9) unbindLayout:setScaleY(0.9) unbindLayout:animate() :alpha(1) :scaleX(1) :scaleY(1) :setDuration(350) :setInterpolator(easeOutBack) :start() unbindBtn:setTypeface(customTypeface) unbindBtn:setGravity(17) unbindEnterBtn:setTypeface(customTypeface) unbindEnterBtn:setGravity(17) local unbindBtnBg = getBg(4, 0xFF007AFF) local unbindBtnBgDown = getBg(4, 0xFF0051D5) local unbindBtnBgDone = getBg(4, 0xFF1DC981) unbindBtn:setBackground(unbindBtnBg) local enterBtnBg = getBg(4, 0xFFFFFFFF) enterBtnBg:setStroke(1 * density, 0xFFD0D0D0) local enterBtnBgDown = getBg(4, 0xFFF5F5F5) enterBtnBgDown:setStroke(1 * density, 0xFFD0D0D0) unbindEnterBtn:setBackground(enterBtnBg) unbindBtn:setOnTouchListener(luajava.createProxy("android.view.View$OnTouchListener", { onTouch = function(v, event) if unbindDone then return true end local a = event:getAction() if a == MotionEvent.ACTION_DOWN then v:setBackground(unbindBtnBgDown) btnPressAnim(v, 0.95) elseif a == MotionEvent.ACTION_UP or a == MotionEvent.ACTION_CANCEL then v:setBackground(unbindBtnBg) btnReleaseAnim(v) end return false end })) unbindEnterBtn:setOnTouchListener(luajava.createProxy("android.view.View$OnTouchListener", { onTouch = function(v, event) local a = event:getAction() if a == MotionEvent.ACTION_DOWN then v:setBackground(enterBtnBgDown) btnPressAnim(v, 0.95) elseif a == MotionEvent.ACTION_UP or a == MotionEvent.ACTION_CANCEL then v:setBackground(enterBtnBg) btnReleaseAnim(v) end return false end })) unbindBtn:setOnClickListener(luajava.createProxy("android.view.View$OnClickListener", { onClick = function(v) if unbindDone then return end unbindBtn:setEnabled(false) unbindEnterBtn:setEnabled(false) if Build.VERSION.SDK_INT >= 31 then local RenderEffect = luajava.bindClass("android.graphics.RenderEffect") unbindLayout:setRenderEffect(RenderEffect:createBlurEffect(8, 8, luajava.bindClass("android.graphics.Shader$TileMode").CLAMP)) else unbindLayout:setAlpha(0.3) end local confirmLayout = luajava.loadlayout({ LinearLayout, layout_width = "match_parent", layout_height = "match_parent", orientation = "vertical", gravity = 17, background = getBg(16, 0x80000000), paddingLeft = "20dp", paddingRight = "20dp", paddingTop = "20dp", paddingBottom = "20dp", { TextView, id = "cfmTitle", text = "解绑页面", textSize = "16sp", textColor = 0xFFFFFFFF, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "wrap_content", layout_height = "wrap_content", }, { TextView, id = "cfmSub", text = "这是最后的警告!\n解绑后将清除当前设备绑定,换设备需重新验证\n解绑后5秒自动退出", textSize = "12sp", textColor = 0xFFCCCCCC, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "wrap_content", layout_height = "wrap_content", layout_marginTop = "4dp", }, { View, layout_width = "match_parent", layout_height = "14dp", }, { TextView, id = "confirmUnbindBtn", text = "坚持解绑", textSize = "14sp", textColor = 0xFFFFFFFF, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "match_parent", layout_height = "36dp", background = luajava.newInstance('android.graphics.drawable.GradientDrawable'), }, { View, layout_width = "match_parent", layout_height = "8dp", }, { TextView, id = "cancelUnbindBtn", text = "取 消", textSize = "14sp", textColor = 0xFFCCCCCC, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, layout_width = "match_parent", layout_height = "36dp", background = luajava.newInstance('android.graphics.drawable.GradientDrawable'), }, }) local clp = luajava.newInstance("android.widget.FrameLayout$LayoutParams", -1, -1) wrapper:addView(confirmLayout, clp) confirmLayout:setAlpha(0) confirmLayout:setScaleX(0.85) confirmLayout:setScaleY(0.85) confirmLayout:animate() :alpha(1) :scaleX(1) :scaleY(1) :setDuration(320) :setInterpolator(easeOutBack) :start() cfmTitle:setTypeface(defaultBold) cfmSub:setTypeface(defaultBold) cfmTitle:setGravity(17) cfmSub:setGravity(17) confirmUnbindBtn:setTypeface(customTypeface) confirmUnbindBtn:setGravity(17) cancelUnbindBtn:setTypeface(customTypeface) cancelUnbindBtn:setGravity(17) local cfmBg = getBg(4, 0xFF007AFF) local cfmBgDown = getBg(4, 0xFF0051D5) confirmUnbindBtn:setBackground(cfmBg) local cclBg = getBg(4, 0xFFFFFFFF) cclBg:setStroke(1 * density, 0xFFD0D0D0) local cclBgDown = getBg(4, 0xFFF5F5F5) cclBgDown:setStroke(1 * density, 0xFFD0D0D0) cancelUnbindBtn:setBackground(cclBg) confirmUnbindBtn:setOnTouchListener(luajava.createProxy("android.view.View$OnTouchListener", { onTouch = function(v2, e2) local a2 = e2:getAction() if a2 == MotionEvent.ACTION_DOWN then v2:setBackground(cfmBgDown) btnPressAnim(v2, 0.95) elseif a2 == MotionEvent.ACTION_UP or a2 == MotionEvent.ACTION_CANCEL then v2:setBackground(cfmBg) btnReleaseAnim(v2) end return false end })) cancelUnbindBtn:setOnTouchListener(luajava.createProxy("android.view.View$OnTouchListener", { onTouch = function(v2, e2) local a2 = e2:getAction() if a2 == MotionEvent.ACTION_DOWN then v2:setBackground(cclBgDown) btnPressAnim(v2, 0.95) elseif a2 == MotionEvent.ACTION_UP or a2 == MotionEvent.ACTION_CANCEL then v2:setBackground(cclBg) btnReleaseAnim(v2) end return false end })) local function closeConfirm() confirmLayout:animate() :alpha(0) :scaleX(0.9) :scaleY(0.9) :setDuration(200) :setInterpolator(easeInBack) :withEndAction(toRun(function() wrapper:removeView(confirmLayout) if Build.VERSION.SDK_INT >= 31 then unbindLayout:setRenderEffect(nil) else unbindLayout:setAlpha(1) end unbindBtn:setEnabled(true) unbindEnterBtn:setEnabled(true) end)):start() end cancelUnbindBtn:setOnClickListener(luajava.createProxy("android.view.View$OnClickListener", { onClick = function(v2) closeConfirm() end })) confirmUnbindBtn:setOnClickListener(luajava.createProxy("android.view.View$OnClickListener", { onClick = function(v2) unbindDone = true confirmUnbindBtn:setText("解绑中...") confirmUnbindBtn:setBackground(cfmBgDown) cancelUnbindBtn:setVisibility(View.GONE) safeThread(function() local res = rlyunyz.postApi('kmunmachine', {kami = kami}) luajava.runOnUiThread(function() if type(res) == 'table' and res.code == 200 then unbindDevice:setText("已解绑") unbindDevice:setTextColor(0xFF1DC981) unbindBtn:setText("解绑成功") unbindBtn:setBackground(unbindBtnBgDone) cfmTitle:setText("解绑成功") cfmTitle:setTextColor(0xFF1DC981) cfmSub:setText("设备绑定已清除,可更换设备重新验证") confirmUnbindBtn:setVisibility(View.GONE) cancelUnbindBtn:setVisibility(View.GONE) local Handler = luajava.bindClass("android.os.Handler") local Looper = luajava.bindClass("android.os.Looper") local handler = luajava.newInstance("android.os.Handler", Looper:getMainLooper()) handler:postDelayed(toRun(function() confirmLayout:animate() :alpha(0) :scaleX(0.9) :scaleY(0.9) :setDuration(250) :setInterpolator(easeInBack) :withEndAction(toRun(function() wrapper:removeView(confirmLayout) unbindLayout:animate() :alpha(0) :scaleX(0.95) :scaleY(0.95) :setDuration(250) :setInterpolator(easeInBack) :withEndAction(toRun(function() view:removeView(wrapper) backToLoginPage() end)):start() end)):start() end), 6000) else local failMsg = "解绑失败" if type(res) == 'table' and type(res.msg) == 'string' then failMsg = res.msg elseif type(res) == 'string' then failMsg = res end unbindDevice:setText(failMsg) unbindDevice:setTextColor(0xFFFF4444) unbindBtn:setText("解绑失败") unbindBtn:setBackground(unbindBtnBgDone) unbindDone = false cfmTitle:setText("解绑失败") cfmTitle:setTextColor(0xFFFF4444) cfmSub:setText(failMsg) confirmUnbindBtn:setText("确定") confirmUnbindBtn:setBackground(cfmBg) confirmUnbindBtn:setOnClickListener(luajava.createProxy("android.view.View$OnClickListener", { onClick = function(v3) closeConfirm() cancelUnbindBtn:setVisibility(View.VISIBLE) end })) end end) end, "解绑") end })) end })) unbindEnterBtn:setOnClickListener(luajava.createProxy("android.view.View$OnClickListener", { onClick = function(v) unbindLayout:animate() :alpha(0) :scaleX(0.95) :scaleY(0.95) :setDuration(250) :setInterpolator(easeInBack) :withEndAction(toRun(function() view:removeView(wrapper) KMUI._running = false if KMUI.onEnter then KMUI.onEnter(KMUI._verifiedKami or '') end end)):start() end })) end function showSuccess(remainStr, useCount) if verified then return end verified = true local imm = context:getSystemService("input_method") imm:hideSoftInputFromWindow(inputBox:getWindowToken(), 0) local dist = 100 * density -- 取消所有进行中的动画 loginForm:animate():cancel() leftImage:animate():cancel() rightImage:animate():cancel() successView:animate():cancel() -- 第一步:登录表单向右滑出,左侧图片向左滑出 loginForm:animate() :translationX(dist) :alpha(0) :setDuration(400) :setInterpolator(easeInBack) :start() leftImage:animate() :translationX(-dist * 1.2) :alpha(0) :setDuration(450) :setInterpolator(easeInBack) :setStartDelay(20) :start() -- 第二步:萧容鱼向右(右侧图片)从右边缓慢滑入+淡入 rightImage:setAlpha(0) rightImage:setScaleX(1.1) rightImage:setScaleY(1.1) rightImage:setTranslationX(60 * density) rightImage:animate() :alpha(1) :scaleX(1) :scaleY(1) :translationX(0) :setDuration(800) :setInterpolator(easeOutCubic) :setStartDelay(200) :withEndAction(toRun(function() -- 右侧图片完全显示后,再弹出成功文字 loginForm:setVisibility(View.GONE) leftImage:setVisibility(View.GONE) -- 成功文字弹入 successView:setAlpha(0) successView:setScaleX(0.8) successView:setScaleY(0.8) successView:setTranslationY(20 * density) successView:animate() :alpha(1) :scaleX(1) :scaleY(1) :translationY(0) :setDuration(500) :setInterpolator(easeOutBack) :start() -- 剩余时间延迟一点再上滑淡入 local expireText = luajava.newInstance("android.widget.TextView", context) expireText:setText(remainStr) expireText:setTextSize(12) expireText:setTextColor(0xFF999999) expireText:setTypeface(defaultBold) expireText:setGravity(17) expireText:setAlpha(0) expireText:setTranslationY(10 * density) local lp = luajava.newInstance("android.widget.LinearLayout$LayoutParams", luajava.newInstance("android.view.ViewGroup$LayoutParams", -2, -2)) lp:setMargins(0, 8 * density, 0, 0) expireText:setLayoutParams(lp) successView:addView(expireText) -- 使用次数文本 local countText = luajava.newInstance("android.widget.TextView", context) countText:setText("使用次数:" .. tostring(useCount)) countText:setTextSize(12) countText:setTextColor(0xFF007AFF) countText:setTypeface(defaultBold) countText:setGravity(17) countText:setAlpha(0) countText:setTranslationY(10 * density) local lp2 = luajava.newInstance("android.widget.LinearLayout$LayoutParams", luajava.newInstance("android.view.ViewGroup$LayoutParams", -2, -2)) lp2:setMargins(0, 5 * density, 0, 0) countText:setLayoutParams(lp2) successView:addView(countText) local Handler = luajava.bindClass("android.os.Handler") local Looper = luajava.bindClass("android.os.Looper") local handler = luajava.newInstance("android.os.Handler", Looper:getMainLooper()) -- 剩余时间上滑淡入(比成功文字稍晚) handler:postDelayed(toRun(function() expireText:animate() :alpha(1) :translationY(0) :setDuration(400) :setInterpolator(easeOutBack) :start() end), 200) -- 使用次数上滑淡入(比剩余时间稍晚) handler:postDelayed(toRun(function() countText:animate() :alpha(1) :translationY(0) :setDuration(400) :setInterpolator(easeOutBack) :start() end), 350) loadImg(finalImage, baseDir .. "/沈幼楚", 1.2) -- 停留2.5秒后,过渡到沈幼楚图片 handler:postDelayed(toRun(function() -- 成功文字+到期时间 淡出上滑 successView:animate() :alpha(0) :translationY(-15 * density) :setDuration(350) :setInterpolator(easeInBack) :withEndAction(toRun(function() -- 文字消失后20ms再显示沈幼楚图片 handler:postDelayed(toRun(function() -- 沈幼楚图片淡入放大 finalImage:setAlpha(0) finalImage:setScaleX(0.92) finalImage:setScaleY(0.92) finalImage:animate() :alpha(1) :scaleX(1) :scaleY(1) :setDuration(600) :setInterpolator(easeOutBack) :withEndAction(toRun(function() -- 沈幼楚显示1.5秒后,过渡到解绑页 handler:postDelayed(toRun(function() local whiteBg = getBg(16, 0xFFFFFFFF) view:setBackground(whiteBg) if Build.VERSION.SDK_INT >= 21 then view:setClipToOutline(true) end leftPanel:animate():alpha(0):setDuration(600):setInterpolator(easeInOutCubic):start() rightPanel:animate():alpha(0):setDuration(600):setInterpolator(easeInOutCubic):withEndAction(toRun(function() view:removeAllViews() showUnbindInfo() end)):start() end), 1500) end)) :start() end), 20) end)) :start() end), 2500) end)) :start() end function doLogin() if not isAgreementAccepted() then showAgreementDirect() gg.toast("请先阅读并同意使用协议") return end local now = os.time() if now - lastClickTime < 2 then return end lastClickTime = now local kami = inputBox:getText():toString() if kami == "" then return end KMUI._pendingKami = kami end loginBtn:setOnClickListener(luajava.createProxy("android.view.View$OnClickListener", { onClick = function(v) onLoginClick() end })) inputBox:setOnEditorActionListener(luajava.createProxy("android.widget.TextView$OnEditorActionListener", { onEditorAction = function(v, actionId, event) if actionId == EditorInfo.IME_ACTION_DONE or (event ~= nil and event:getKeyCode() == 66) then doLogin() return true end return false end })) xfqpic=baseDir .. "/陈楚生" ICON_SIZE = math.floor(45 * density + 0.5) EXPANDED_WIDTH = math.floor(宽度 * density + 0.5) EXPANDED_HEIGHT = math.floor(高度 * density + 0.5) lastExpandedWidth = EXPANDED_WIDTH lastExpandedHeight = EXPANDED_HEIGHT iconBgDrawable = luajava.newInstance('android.graphics.drawable.GradientDrawable') iconBgDrawable:setShape(1) iconBgDrawable:setColor(0xFF007AFF) iconLayer = luajava.loadlayout({ FrameLayout, id = "iconLayer", layout_width = "45dp", layout_height = "45dp", background = iconBgDrawable, visibility = View.GONE, { ImageView, layout_width = "match_parent", layout_height = "match_parent", src = xfqpic, scaleType = "centerCrop", onTouch = iconTouch, } }) if Build.VERSION.SDK_INT >= 21 then iconLayer:setClipToOutline(true) iconLayer:setElevation(6 * density) end morphRoot = luajava.loadlayout({ FrameLayout, id = "morphRoot", layout_width = "match_parent", layout_height = "match_parent", view, { FrameLayout, id = "dragBar", layout_width = "60dp", layout_height = "48dp", onTouch = function(v, event) hanshu(v, event) return true end, background = getBg(0, 0x00000000), } }) floatWindow = luajava.loadlayout({ FrameLayout, id = "floatWindow", layout_width = "wrap_content", layout_height = "wrap_content", morphRoot, iconLayer, }) -- ======== 跳转卡网询问弹窗 ======== kawangUrl = "http://xmcvip.zh.kg/" local kawangDimColor = 0x80000000 local kawangCardBg = getBg(20, 0x80FFFFFF) local kawangAccentBg = getBg(50, 0xFF007AFF) local kawangConfirmBg = getBg(12, 0xFF007AFF) local kawangConfirmBgDown = getBg(12, 0xFF0051D5) local kawangCancelBg = getBg(12, 0xFFEFF1F4) kawangOverlay = luajava.loadlayout({ FrameLayout, id = "kawangOverlay", layout_width = "match_parent", layout_height = "match_parent", background = kawangDimColor, visibility = View.GONE, { FrameLayout, id = "kawangCard", layout_width = "match_parent", layout_height = "wrap_content", background = kawangCardBg, { LinearLayout, id = "kawangCardContent", layout_width = "match_parent", layout_height = "wrap_content", orientation = "vertical", gravity = 17, paddingLeft = "24dp", paddingRight = "24dp", paddingTop = "24dp", paddingBottom = "20dp", { FrameLayout, layout_width = "46dp", layout_height = "46dp", background = kawangAccentBg, { TextView, text = "💰", textSize = "22sp", textColor = 0xFFFFFFFF, textStyle = "bold", gravity = 17, layout_width = "match_parent", layout_height = "match_parent", }, }, { TextView, id = "kawangTitle", text = "前往卡网", textSize = "16sp", textColor = 0xFF222222, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, gravity = 17, layout_width = "match_parent", layout_height = "wrap_content", layout_marginTop = "14dp", }, { TextView, id = "kawangMsg", text = "本提示只提示一次后面不会再次提示\n请收藏好官网地址", textSize = "12sp", textColor = 0xFF8A8A8A, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, gravity = 17, layout_width = "match_parent", layout_height = "wrap_content", layout_marginTop = "6dp", lineSpacingExtra = "3dp", }, { LinearLayout, layout_width = "match_parent", layout_height = "wrap_content", orientation = "horizontal", layout_marginTop = "20dp", { TextView, id = "kawangCancelBtn", text = "继续登录", textSize = "13sp", textColor = 0xFF555555, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, gravity = 17, layout_width = "0dp", layout_weight = 1, layout_height = "42dp", background = kawangCancelBg, layout_marginRight = "10dp", }, { TextView, id = "kawangConfirmBtn", text = "前往卡网", textSize = "13sp", textColor = 0xFFFFFFFF, textStyle = "bold", shadowColor = 0x33000000, shadowDx = 1, shadowDy = 1, shadowRadius = 2, gravity = 17, layout_width = "0dp", layout_weight = 1, layout_height = "42dp", background = kawangConfirmBg, }, }, }, }, }) -- 卡片在遮罩层内垂直水平居中 do local cardLp = luajava.newInstance("android.widget.FrameLayout$LayoutParams", -1, -2) cardLp.gravity = 17 local m = math.floor(26 * density + 0.5) cardLp:setMargins(m, 0, m, 0) kawangCard:setLayoutParams(cardLp) end -- 圆角裁剪 if Build.VERSION.SDK_INT >= 21 then kawangCard:setClipToOutline(true) end kawangTitle:setTypeface(customTypeface) kawangMsg:setTypeface(customTypeface) kawangCancelBtn:setTypeface(customTypeface) kawangConfirmBtn:setTypeface(customTypeface) kawangConfirmBtn:setClickable(true) kawangConfirmBtn:setFocusable(true) kawangCancelBtn:setClickable(true) kawangCancelBtn:setFocusable(true) -- ======== 跳转卡网:只提示一次(本地记录) ======== kawangShownPath = gg.FILES_DIR .. "/我真没想重生啊配置/卡网已提示" function isKawangShown() local f = io.open(kawangShownPath, "r") if f then f:close() return true end return false end function setKawangShown() local f = io.open(kawangShownPath, "w") if f then f:write("shown") f:close() end end -- 显示弹窗 function showKawangDialog() kawangOverlay:setVisibility(View.VISIBLE) kawangOverlay:setAlpha(0) kawangOverlay:animate():cancel() kawangOverlay:animate() :alpha(1) :setDuration(220) :setInterpolator(easeOutCubic) :start() kawangCard:setAlpha(0) kawangCard:setScaleX(0.7) kawangCard:setScaleY(0.7) kawangCard:setTranslationY(22 * density) kawangCard:animate():cancel() kawangCard:animate() :alpha(1) :scaleX(1) :scaleY(1) :translationY(0) :setDuration(340) :setInterpolator(easeOutBack) :start() end -- 关闭弹窗 function hideKawangDialog(onEnd) kawangCard:animate():cancel() kawangCard:animate() :alpha(0) :scaleX(0.86) :scaleY(0.86) :translationY(16 * density) :setDuration(180) :setInterpolator(easeInBack) :start() kawangOverlay:animate():cancel() kawangOverlay:animate() :alpha(0) :setDuration(200) :setInterpolator(easeInBack) :withEndAction(toRun(function() kawangOverlay:setVisibility(View.GONE) kawangCard:setAlpha(1) kawangCard:setScaleX(1) kawangCard:setScaleY(1) kawangCard:setTranslationY(0) if onEnd then onEnd() end end)) :start() end -- 登录按钮入口:先询问是否跳转卡网(只提示一次) function onLoginClick() if not isAgreementAccepted() then showAgreementDirect() gg.toast("请先阅读并同意使用协议") return end -- 已提示过,直接登录 if isKawangShown() then doLogin() return end showKawangDialog() end -- 前往卡网:调用跳转函数 function goKawang() pcall(function() app.openUrl(kawangUrl) end) end -- 「前往卡网」按钮:按下/释放样式 kawangConfirmBtn:setOnTouchListener(luajava.createProxy("android.view.View$OnTouchListener", { onTouch = function(v, event) local a = event:getAction() if a == MotionEvent.ACTION_DOWN then v:setBackground(kawangConfirmBgDown) btnPressAnim(v, 0.95) elseif a == MotionEvent.ACTION_UP or a == MotionEvent.ACTION_CANCEL then v:setBackground(kawangConfirmBg) btnReleaseAnim(v) end return false end })) kawangConfirmBtn:setOnClickListener(luajava.createProxy("android.view.View$OnClickListener", { onClick = function(v) setKawangShown() hideKawangDialog(function() goKawang() end) end })) -- 「继续登录」按钮:按下/释放样式 kawangCancelBtn:setOnTouchListener(luajava.createProxy("android.view.View$OnTouchListener", { onTouch = function(v, event) local a = event:getAction() if a == MotionEvent.ACTION_DOWN then btnPressAnim(v, 0.96) elseif a == MotionEvent.ACTION_UP or a == MotionEvent.ACTION_CANCEL then btnReleaseAnim(v) end return false end })) kawangCancelBtn:setOnClickListener(luajava.createProxy("android.view.View$OnClickListener", { onClick = function(v) setKawangShown() hideKawangDialog(function() doLogin() end) end })) local LayoutParams = luajava.bindClass("android.view.WindowManager$LayoutParams") local params = luajava.new(LayoutParams) if Build.VERSION.SDK_INT >= 26 then params.type = LayoutParams.TYPE_APPLICATION_OVERLAY else params.type = LayoutParams.TYPE_PHONE end params.format = PixelFormat.RGBA_8888 params.flags = LayoutParams.FLAG_NOT_TOUCH_MODAL params.gravity = Gravity.LEFT | Gravity.TOP local metrics = context:getResources():getDisplayMetrics() local screenW = metrics.widthPixels local screenH = metrics.heightPixels params.x = math.floor((screenW - EXPANDED_WIDTH) / 2 + 0.5) params.y = math.floor((screenH - EXPANDED_HEIGHT) / 2 + 0.5) params.width = EXPANDED_WIDTH params.height = EXPANDED_HEIGHT params.softInputMode = LayoutParams.SOFT_INPUT_ADJUST_RESIZE mainLayoutParams = params luajava.runOnUiThread(function() window:addView(floatWindow, mainLayoutParams) -- 把跳转卡网弹窗挂到悬浮窗最上层(初始隐藏) pcall(function() floatWindow:addView(kawangOverlay) end) -- 初始化快速登录按钮 initQuickLoginBtn() -- 启动Q弹弹出动画 startQPopAnim(morphRoot) -- 检查使用协议:首次使用必须阅读并同意,同意后不再显示 if not isAgreementAccepted() then showAgreementDirect() end end) safeThread(function() local res = rlyunyz.postApi('notice', nil) luajava.runOnUiThread(function() local txt = nil if type(res) == 'table' and res.code == 200 then if type(res.msg) == 'table' and res.msg.app_gg then txt = res.msg.app_gg elseif type(res.msg) == 'string' and #res.msg > 0 then txt = res.msg end end if txt and #txt > 0 then noticePageContent:setText(txt) else noticePageContent:setText("暂无公告") noticeBarText:setText("暂无公告") noticeBarText:setTextColor(0xFFAAAAAA) noticeDot:setTextColor(0xFFCCCCCC) noticeArrow:setTextColor(0xFFCCCCCC) end showNoticeBar() end) end, "公告") -- ======== 全网启动次数获取 ======== safeThread(function() local ok, ini = pcall(function() return rlyunyz.checkUpdate() end) luajava.runOnUiThread(function() local count = 0 if ok and type(ini) == 'table' then count = tonumber(ini.api_total) or 0 end countBarText:setText(string.format("全网启动次数:%s次", count)) showCountBar() end) end, "全网启动次数") isExpanded = true isAnimating = false function 隐藏() if isAnimating then return end luajava.runOnUiThread(function() if not morphRoot then return end if isExpanded then -- ========== 收起动画:窗口 → 图标 ========== isExpanded = false isAnimating = true lastExpandedWidth = mainLayoutParams.width lastExpandedHeight = mainLayoutParams.height -- 计算缩放中心点(从左上角缩放到图标大小) morphRoot:setPivotX(0) morphRoot:setPivotY(0) -- 内容先淡出并轻微缩小 view:animate():cancel() view:animate() :alpha(0) :scaleX(0.92) :scaleY(0.92) :setDuration(180) :setInterpolator(easeInBack) :start() -- 整体缩小到图标大小(带一点回弹感) morphRoot:animate():cancel() morphRoot:animate() :scaleX(ICON_SIZE / lastExpandedWidth) :scaleY(ICON_SIZE / lastExpandedHeight) :setDuration(320) :setInterpolator(easeInOutBack) :withEndAction(toRun(function() view:setVisibility(View.GONE) view:setAlpha(1) view:setScaleX(1) view:setScaleY(1) mainLayoutParams.width = ICON_SIZE mainLayoutParams.height = ICON_SIZE mainLayoutParams.flags = LayoutParams.FLAG_NOT_FOCUSABLE window:updateViewLayout(floatWindow, mainLayoutParams) morphRoot:setScaleX(1) morphRoot:setScaleY(1) -- 图标弹入(从小到大带弹性) iconLayer:setVisibility(View.VISIBLE) iconLayer:setAlpha(0) iconLayer:setScaleX(0.3) iconLayer:setScaleY(0.3) iconLayer:animate():cancel() iconLayer:animate() :alpha(1) :scaleX(1) :scaleY(1) :setDuration(350) :setInterpolator(easeOutBack) :withEndAction(toRun(function() isAnimating = false end)) :start() end)) :start() else -- ========== 展开动画:图标 → 窗口 ========== isExpanded = true isAnimating = true -- 图标缩小并淡出 iconLayer:animate():cancel() iconLayer:animate() :alpha(0) :scaleX(0.7) :scaleY(0.7) :setDuration(150) :setInterpolator(easeInBack) :withEndAction(toRun(function() iconLayer:setVisibility(View.GONE) iconLayer:setAlpha(1) iconLayer:setScaleX(1) iconLayer:setScaleY(1) mainLayoutParams.width = lastExpandedWidth mainLayoutParams.height = lastExpandedHeight mainLayoutParams.flags = LayoutParams.FLAG_NOT_TOUCH_MODAL window:updateViewLayout(floatWindow, mainLayoutParams) -- 设置初始状态:从图标大小开始 morphRoot:setPivotX(0) morphRoot:setPivotY(0) morphRoot:setScaleX(ICON_SIZE / lastExpandedWidth) morphRoot:setScaleY(ICON_SIZE / lastExpandedHeight) -- 整体放大到完整大小(带弹性过冲) morphRoot:animate():cancel() morphRoot:animate() :scaleX(1) :scaleY(1) :setDuration(420) :setInterpolator(easeOutBack) :withEndAction(toRun(function() isAnimating = false end)) :start() -- 内容淡入(比缩放稍晚开始,形成层次感) view:setVisibility(View.VISIBLE) view:setAlpha(0) view:setScaleX(0.95) view:setScaleY(0.95) view:animate():cancel() view:animate() :alpha(1) :scaleX(1) :scaleY(1) :setDuration(350) :setInterpolator(easeOutCubic) :setStartDelay(80) :start() end)) :start() end end) end -- ======== 使用次数本地统计 ======== useCountPath = gg.FILES_DIR .. "/我真没想重生啊配置/usecount.dat" -- ======== 快速登录:卡密本地保存 ======== savedKamiPath = gg.FILES_DIR .. "/我真没想重生啊配置/savedkami.dat" -- ======== 使用协议:本地记录 ======== agreementPath = gg.FILES_DIR .. "/我真没想重生啊配置/使用协议" function isAgreementAccepted() local f = io.open(agreementPath, "r") if f then f:close() return true end return false end function saveAgreementAccepted() local f = io.open(agreementPath, "w") if f then f:write("agreed") f:close() end end function saveKami(kami) if not kami or kami == "" then return end local f = io.open(savedKamiPath, "w") if f then f:write(kami) f:close() end end function loadSavedKami() local f = io.open(savedKamiPath, "r") if f then local kami = f:read("*a") f:close() if kami and kami ~= "" then return kami end end return nil end function clearSavedKami() os.remove(savedKamiPath) end function addUseCount(kami) local counts = {} local f = io.open(useCountPath, "r") if f then local content = f:read("*a") f:close() if content and content ~= "" then for k, v in content:gmatch("(%S+)=(%d+)") do counts[k] = tonumber(v) or 0 end end end counts[kami] = (counts[kami] or 0) + 1 local out = {} for k, v in pairs(counts) do out[#out + 1] = k .. "=" .. tostring(v) end f = io.open(useCountPath, "w") if f then f:write(table.concat(out, "\n")) f:close() end return counts[kami] end KMUI = {} KMUI._running = true KMUI._pendingKami = nil KMUI._verifiedKami = nil KMUI.onEnter = nil -- 用户可自定义:验证通过点击"进入"后的回调 function(kami) ... end function KMUI.exit() KMUI._running = false end function KMUI.start() while KMUI._running do if KMUI._pendingKami then local kami = KMUI._pendingKami local kamiyz = rlyunyz.postApi('kmlogon', {kami = kami}) luajava.runOnUiThread(function() local success = false local remainStr = "使用剩余时间:未知" local useCount = 0 if type(kamiyz) == 'table' and kamiyz.code == 200 then success = true local msg = kamiyz.msg if type(msg) == 'table' and msg.vip then local n = tonumber(msg.vip) if n then local now = tonumber(kamiyz.time) or os.time() local remainSec = n - now if remainSec > 0 then local days = math.floor(remainSec / 86400) local hours = math.floor((remainSec % 86400) / 3600) local mins = math.floor((remainSec % 3600) / 60) if days > 0 then remainStr = string.format("使用剩余时间:%d天%d小时%d分钟", days, hours, mins) elseif hours > 0 then remainStr = string.format("使用剩余时间:%d小时%d分钟", hours, mins) else remainStr = string.format("使用剩余时间:%d分钟", mins) end else remainStr = "使用剩余时间:已到期" end end end useCount = addUseCount(kami) end if not success then local errMsg = "卡密验证失败" if type(kamiyz) == 'string' then if kamiyz:find("不存在") then errMsg = "卡密不存在" elseif kamiyz:find("到期") or kamiyz:find("过期") then errMsg = "卡密已到期" else errMsg = kamiyz end elseif type(kamiyz) == 'table' and type(kamiyz.msg) == 'string' then errMsg = kamiyz.msg end KMUI._pendingKami = nil showKamiError(errMsg) else KMUI._verifiedKami = kami saveKami(kami) -- 验证成功,保存卡密用于快速登录 showSuccess(remainStr, useCount) end end) KMUI._pendingKami = nil end gg.sleep(100) end luajava.runOnUiThread(function() pcall(function() if floatWindow then -- 先播放关闭Q弹动画,再移除 endQPopAnim(morphRoot, function() pcall(function() if floatWindow then window:removeView(floatWindow) floatWindow = nil end end) end) end end) end) end -- 启动卡密验证 KMUI.start() --[[ .::::.. ::::rrr7QQJi::i:iirijQBBBQB BBQBBBQBP. ......:::..1BBBB .BuPBBBX .........r. vBQL :Y. rd:iQQ ..........7L MB rr 7biLX .::.:....:.:q. ri . JX1: .r:.r....i.r::...:. gi5 ..vr .7: 7:. :ii: v.:iv :BQg : r: 7r:i7i::ri:DBr..2S i.:r:. .i:XBBK... :BP ::jr .7. r i....ir r7. r.J: u. :..X: .. .v: .:.Ji i. ..i .. .u:. . 77: si 1Q ::.. .r .. :P7.r7r..:iLQQJ: rv .. 7 iK::r . ii7r LJLrL1r7DPi iJ r . ::.: . ri 5DZDBg7JR7.:r: i. .Pi r..r7: i.:XBRJBY:uU.ii:. . QB rJ.:rvDE: .. ri uv . iir.7j r7. iBg ::.7251QZ. . :. irr:Iu: r. QB .:5.71Si.......... .sr7ivi:U 7BJ .7: i2. ........:.. sJ7Lvr7s jBBdD. :. ........:r... YB Bi :7j1. : : ]] toMusic("欢迎使用凛冬和小绿开发的辅助祝您游戏愉快") gg.alert('欢迎使用凛冬和小绿开发的辅助,祝您游戏愉快','欢迎回来') gg.alert("免责声明本辅助仅为本地修改,未与游戏服务器交互,影响极小,不破坏其他玩家的正常游戏体验使用任何辅助均存在账号被封禁风险,使用说明中已明确提醒不上榜不开端口玩美化不超过4分钟的情况下通常较安全,但仍由用户自行承担全部风险若用户将美化用于登录正常游戏账号,由此产生的一切后果(包括但不限于封号财产损失等),本辅助作者及相关方概不负责", "喵") toMusic("这个卡密验证的UI还有功能,有很多行,大概7000多行,所以运行的时候很慢,需要耐心等待哦") gg.alert('这个卡密验证的UI还有功能,有很多行,大概7000多行,所以运行的时候很慢,需要耐心等待哦','收到,喵') sG1="作者:凛冬和小绿" function 摩天轮开关(on) gg.clearResults() gg.setRanges(gg.REGION_C_ALLOC | gg.REGION_OTHER) local target = on and '10600002' or '10670005' local replace = on and '10670005' or '10600002' gg.searchNumber(target, gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1) gg.searchNumber(target, gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1) gg.getResults(100) gg.editAll(replace, gg.TYPE_DWORD) gg.toast(on and "摩天轮已开启" or "摩天轮已关闭") return true end -- ==================== 新增:蓝色水印 + 动作功能 ==================== import "android.view.WindowManager" import "android.view.Gravity" import "android.graphics.PixelFormat" import "android.os.Build" 水印View = nil function 显示水印() if 水印View ~= nil then return end local 水印Params = luajava.newInstance("android.view.WindowManager$LayoutParams") if Build.VERSION.SDK_INT >= 26 then 水印Params.type = 2038 else 水印Params.type = 2002 end 水印Params.format = PixelFormat.RGBA_8888 水印Params.flags = 8 | 16 水印Params.gravity = Gravity.TOP | Gravity.LEFT 水印Params.x = 20 水印Params.y = 100 水印Params.width = -2 水印Params.height = -2 local tv = luajava.newInstance("android.widget.TextView", context) tv:setText("Q群1125305631") tv:setTextColor(0xFF007AFF) tv:setTextSize(16) tv:setPadding(16, 16, 16, 16) pcall(function() tv:setAlpha(0.65) end) 水印View = tv window:addView(水印View, 水印Params) end 动作列表 = { {"鞠躬","10600001"},{"磕头","10600002"},{"挥手","10600003"}, {"耍赖","10600004"},{"心痛","10600005"},{"害羞","10600006"}, {"运动","10600007"},{"加油","10600008"},{"飞吻","10600009"}, {"倾斜舞","10600010"},{"拜年","10600011"},{"转圈","10600012"}, {"抓狂","10600013"},{"欢呼","10600014"},{"呐喊","10600015"}, {"生气","10600016"},{"秀肌肉","10600017"},{"出拳","10600018"}, {"撒红包","10600019"},{"甩手舞","10600020"},{"惬意","10600021"}, {"打我呀","10600022"},{"摸摸","10600023"},{"互压","10600024"}, {"双人比心","10600025"},{"机甲护身","10600026"},{"小天鹅","10600027"}, {"转篮球","10600028"},{"放烟花","10600029"},{"撒花","10600030"}, {"机器招手","10600031"},{"机械舞","10600032"},{"太极","10600033"}, {"拜年2","10600034"},{"决斗","10600035"},{"木头人","10600036"}, {"热身舞","10600037"},{"蹑手蹑脚","10600038"},{"害怕","10600039"}, {"双人对对碰","10600040"},{"双人撒花","10600041"},{"双人牵手","10600042"}, {"双人贴贴","10600043"},{"健身","10600044"},{"坐下","10600045"}, {"猎罪时刻","10600046"},{"吃薯片","10600047"},{"摇可乐","10600048"}, {"预备出发","10600049"},{"好热","10600050"},{"喝彩","10600051"}, {"后空翻","10600052"},{"圣光裁决","10600053"},{"火冒三丈","10600054"}, {"吹泡泡","10600055"},{"张望","10600056"},{"起飞","10600057"}, {"惊慌","10600058"},{"悲伤","10600059"},{"手足无措","10600060"}, {"草裙舞","10600061"},{"装死","10600062"},{"行礼","10600063"}, {"安抚","10600064"},{"打弹弓","10600065"},{"浇水","10600066"}, } 上次动作值 = nil 动作冷却中 = false function 添加动作(name, num) if 动作冷却中 then gg.toast("冷却中,请稍候…"); return false end 动作冷却中 = true gg.clearResults() gg.setRanges(gg.REGION_C_ALLOC | gg.REGION_OTHER) if 上次动作值 == nil then gg.searchNumber('小绿', gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1) local results = gg.getResults(100) if results and #results > 0 then local first = results[1] first.value = num first.freeze = false gg.setValues({first}) gg.toast('第一次修改:' .. name) else gg.toast('未找到动作数据,请进入对局后再试') 动作冷却中 = false return false end else gg.searchNumber(上次动作值, gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1) gg.searchNumber(上次动作值, gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1) gg.getResults(100) gg.editAll(num, gg.TYPE_DWORD) gg.toast('已切换到动作:' .. name) end 上次动作值 = num luajava.newThread(function() gg.sleep(1000) 动作冷却中 = false end):start() return true end function 动作还原() if 上次动作值 == nil then gg.toast("当前没有已修改的动作"); return true end if 动作冷却中 then gg.toast("冷却中,请稍候…"); return false end 动作冷却中 = true gg.clearResults() gg.setRanges(gg.REGION_C_ALLOC | gg.REGION_OTHER) gg.searchNumber(上次动作值, gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1) gg.searchNumber(上次动作值, gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1) gg.getResults(100) gg.editAll('10600002', gg.TYPE_DWORD) 上次动作值 = nil gg.toast("动作已还原(坐下)") luajava.newThread(function() gg.sleep(1000) 动作冷却中 = false end):start() return true end -- ==================== 新增结束 ==================== function UImain() if io.open("/sdcard/林默/猫羽霏/love")==nil then gg.toast("正在下载资源配置,喵") gg.alert("正在下载资源配置,喵") file.download("https://wp.kayyw.com/f/WDdJfe/%E7%8C%AB%E7%BE%BD%E9%9C%8F.zip","/sdcard/林默/猫羽霏/林默.zip") file.unzip("/sdcard/林默/猫羽霏/林默.zip","/sdcard/林默/猫羽霏/") end dex.loadfile("/sdcard/林默/猫羽霏/CircleImageView.dex") import("android.widget.CircleImageView") local start_time = os.clock() local baseWindow = require 'floatingWindowManager2' baseWindow:darkMode() baseWindow:lightMode() local ui = require('ui') import "android.animation.LayoutTransition" layoutTransition=LayoutTransition() layoutTransition:setDuration(900) import("android.view.animation.Animation") import("android.animation.ObjectAnimator") import("android.view.animation.ScaleAnimation") context:setTheme(0xff98C6D5) import 'com.google.android.material.progressindicator.LinearProgressIndicator' local window = require('windowManager') local ui = require('ui') file.checkFile("/sdcard/林默/猫羽霏/收藏歌单") local musiclist = {} local nowMusic = #musiclist import("android.media.MediaPlayer") mediaPlayer=MediaPlayer() local currentLyrics = "词:未播放歌曲" local lyricCache = {} local lyricLineCache = {} currentLyricColor = "#fffffff" defaultLyricColor = "#d6d6d6" local isPlaying = false local 音量键 =false local isReady = false import "android.animation.ArgbEvaluator" import "android.animation.ValueAnimator" import("android.content.res.ColorStateList") dex.loadfile("/sdcard/林默/猫羽霏/Lottie.dex") import "com.airbnb.lottie.*" local typeface = import("android.graphics.Typeface") local FontPath = "/storage/emulated/0/林默/猫羽霏/软糖.ttf" local font = typeface:createFromFile(FontPath) import "android.animation.ValueAnimator" import "android.graphics.Path" import "android.view.animation.*" import("android.media.AudioManager") audi = context:getSystemService("audio") audiotype = { AudioManager.STREAM_ALARM, AudioManager.STREAM_MUSIC, AudioManager.STREAM_NOTIFICATION, AudioManager.STREAM_RING, AudioManager.STREAM_SYSTEM, AudioManager.STREAM_VOICE_CALL, AudioManager.STREAM_DTMF, } yinl = {} for i = 1,#audiotype do yinl[i] = {} yinl[i].type = audiotype[i] yinl[i].min = audi:getStreamMinVolume(audiotype[i]) yinl[i].max = audi:getStreamMaxVolume(audiotype[i]) yinl[i].now = audi:getStreamVolume(audiotype[i]) end function jianting2() yinln = {} for i = 1,#audiotype do yinln[i] = {} yinln[i].type = audiotype[i] yinln[i].min = audi:getStreamMinVolume(audiotype[i]) yinln[i].max = audi:getStreamMaxVolume(audiotype[i]) yinln[i].now = audi:getStreamVolume(audiotype[i]) _ENV['tupian'..当前ui..当前分区[当前ui]]:setColorFilter(0xff000000) _ENV['tupian'..当前ui..i]:setColorFilter(0xff9C9FA5) if yinln[i].now > yinl[i].now then audi:adjustStreamVolume(yinln[i].type,AudioManager.ADJUST_LOWER,0) gg.alert("up") elseif yinln[i].now < yinl[i].now then audi:adjustStreamVolume(yinln[i].type,AudioManager.ADJUST_RAISE,0) gg.alert("down\n"..yinln[i].now.."\n"..yinl[i].now) end end end yltype = 0 function jianting3(func) yinln = {} for i = 1,#audiotype do yinln[i] = {} yinln[i].type = audiotype[i] yinln[i].now = audi:getStreamVolume(audiotype[i]) if yinln[i].now > yinl[i].now then yinl[i].now = yinln[i].now if yltype == 1 then yltype = 0 func() end elseif yinln[i].now < yinl[i].now then yinl[i].now = yinln[i].now if yltype == 0 then yltype = 1 func() end end end end function jianting(func) yinln = {} for i = 1,#audiotype do yinln[i] = {} yinln[i].type = audiotype[i] yinln[i].now = audi:getStreamVolume(audiotype[i]) if yinln[i].now >= yinl[i].max then audi:adjustStreamVolume(yinln[i].type,AudioManager.ADJUST_LOWER,0) end if yinln[i].now > yinl[i].now then audi:setStreamVolume(yinln[i].type,yinl[i].now,0) func() end end end function jianting3(func) if 音量键==false then return 0 end yinln = {} for i = 1,#audiotype do yinln[i] = {} yinln[i].type = audiotype[i] yinln[i].now = audi:getStreamVolume(audiotype[i]) if yinln[i].now > yinl[i].now then yinl[i].now = yinln[i].now if yltype == 1 then yltype = 0 func() end elseif yinln[i].now < yinl[i].now then yinl[i].now = yinln[i].now if yltype == 0 then yltype = 1 func() end end end end qhkai = 0 qiehuan = function() if qhkai == 0 then qhkai = 1 draw.remove() luajava.runUiThread(function() YoYoImpl:with("FadeOut"):duration(300):playOn(floatWindow) end) gg.sleep(300) luajava.runUiThread(function() floatWindow:setVisibility(View.GONE) end) else qhkai = 0 luajava.runUiThread(function() floatWindow:setVisibility(View.VISIBLE) YoYoImpl:with("FadeIn"):duration(500):playOn(floatWindow) end) end end local function dpToPx(dp) local resources = luajava.bindClass("android.content.res.Resources").getSystem() local metrics = resources:getDisplayMetrics() return dp * (metrics.densityDpi / 160) end function getVerticalBG(gtvb1,gtvb3,gtvb4,gtvb5) if not gtvb4 then gtvb4 = 0 gtvb5 = 0xff000000 end local jianbians = luajava.new(GradientDrawable) jianbians:setCornerRadius(gtvb3) jianbians:setGradientType(GradientDrawable.LINEAR_GRADIENT) jianbians:setColors(gtvb1) jianbians:setStroke(gtvb4,gtvb5) return jianbians end vibra = context:getSystemService(Context.VIBRATOR_SERVICE) changan = {} local changan = changan local android = import('android.*') local rotateAnimator = nil changan.controlRotation = function(control, time) luajava.runUiThread(function() import "android.view.animation.Animation" import "android.animation.ObjectAnimator" if rotateAnimator ~= nil then if rotateAnimator:isPaused() then rotateAnimator:resume() end return end rotateAnimator = ObjectAnimator:ofFloat(control, "rotation", {0, 360}) rotateAnimator:setRepeatCount(-1) rotateAnimator:setRepeatMode(Animation.RESTART) rotateAnimator:setDuration(time) rotateAnimator:start() end) end changan.pauseRotation = function() luajava.runUiThread(function() if rotateAnimator ~= nil and rotateAnimator:isRunning() then rotateAnimator:pause() end end) end local rotateAnimator1 = nil changan.controlRotation1 = function(control, time) luajava.runUiThread(function() import "android.view.animation.Animation" import "android.animation.ObjectAnimator" if rotateAnimator1 ~= nil then if rotateAnimator1:isPaused() then rotateAnimator1:resume() end return end rotateAnimator1 = ObjectAnimator:ofFloat(control, "rotation", {0, 360}) rotateAnimator1:setRepeatCount(-1) rotateAnimator1:setRepeatMode(Animation.RESTART) rotateAnimator1:setDuration(time) rotateAnimator1:start() end) end changan.pauseRotation1 = function() luajava.runUiThread(function() if rotateAnimator1 ~= nil and rotateAnimator1:isRunning() then rotateAnimator1:pause() end end) end function proo() changan.controlRotation(IslandPic1, 10000) end function proo1() changan.pauseRotation() end function proo3() changan.controlRotation1(IslandPic2, 10000) end function proo4() changan.pauseRotation1() end function getpx(x) if type(x) == 'string' then if string.find(x, 'dp') then x = string.gsub(x, 'dp', '') x = tonumber(x) end return x * (context:getResources():getDisplayMetrics().densityDpi / 160) else return x end end local DP40 = getpx("40dp") function write(fileName, content) file.write(fileName, content) end local function 获取图片(txt) txt = string.url(txt,"de") ntxt = string.sub(string.gsub(txt,"/","-"),-10,-1) if string.find(tostring(txt),"http") ~= nil then if panduan("/sdcard/林默/猫羽霏/"..ntxt) == false then file.download(txt,"/sdcard/林默/猫羽霏/"..ntxt) else if file.length("/sdcard/林默/猫羽霏/"..ntxt) <= 1 then file.download(txt,"/sdcard/林默/猫羽霏/"..ntxt) end end txt = "/sdcard/林默/猫羽霏/"..ntxt end return luajava.getBitmapDrawable(txt) end local function getRes(x) return 获取图片("/sdcard/林默/猫羽霏/"..x) end function panduan(rec) fille,err = io.open(rec) if fille == nil then return false else return true end end context = app.context window = context:getSystemService("window") function getLayoutParams() LayoutParams = WindowManager.LayoutParams layoutParams = luajava.new(LayoutParams) if (Build.VERSION.SDK_INT >= 26) then layoutParams.type = LayoutParams.TYPE_APPLICATION_OVERLAY else layoutParams.type = LayoutParams.TYPE_PHONE end layoutParams.format = PixelFormat.RGBA_8888 layoutParams.flags = LayoutParams.FLAG_NOT_FOCUSABLE layoutParams.gravity = Gravity.TOP|Gravity.LEFT layoutParams.width = LayoutParams.WRAP_CONTENT layoutParams.height = LayoutParams.WRAP_CONTENT return layoutParams end slctb = luajava.loadlayout { GradientDrawable, color = "#00000000", cornerRadius = 30 } slcta = getVerticalBG({0xffE6EEF9,0xffE6EEF9},10,2,0xff969FAE) slctb1 = getVerticalBG({0xffE6EEF9,0xffE6EEF9},10,2,0xff969FAE) slcta1 = getVerticalBG({0xdd66709A,0xdd66709A},10,2,0xdd66709A) hanshu = function(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 elseif Action == MotionEvent.ACTION_MOVE then isMove = true mainLayoutParams.x = tonumber(x) + (event:getRawX() - RawX) mainLayoutParams.y = tonumber(y) + (event:getRawY() - RawY) window:updateViewLayout(floatWindow, mainLayoutParams) end end YoYoImpl = luajava.getYoYoImpl() changan.menu = function(sview) forsview = sview 菜单页数=#sview 当前分区={} 分区页数={} 侧边={} 功能区={} IslandPic2=luajava.loadlayout({ CircleImageView, id=luajava.newId("IslandPic2"), src=获取图片(xfcpic), layout_width="70dp", layout_height="70dp", clipToOutline=true, onClick=function() 灵动岛() end, }) IslandPic1=luajava.loadlayout({ CircleImageView, id=luajava.newId("IslandPic"), src=获取图片(xfcpic), layout_width="25dp", layout_height="25dp", layout_marginLeft="8dp", clipToOutline=true, onClick=function() 灵动岛() end, }) cebian = { LinearLayout, id = "cebiannn", layout_marginTop="5dp", layout_marginLeft="2dp", background = "#00000000", layout_height = "match_parent", layout_width = "match_parent", orientation = "vertical", gravity = "center_horizontal", } 顶边 = { LinearLayout, background = "#00000000", layout_height = "wrap_content", layout_width = "match_parent", gravity = "center_vertical", } for i = 1,菜单页数 do 分区页数[i]= #sview[i] table.insert(cebian, { TextView, Typeface=font, id="jm"..i, gravity = "center", text=sview[i]['分页名字'], layout_width = "90dp", onClick = function() 切换(i) end, layout_height = "23dp", textColor = "#66709A", textSize = "14sp", }) 功能区[i]={} local layoutm={ LinearLayout, id = "layoutm"..i, layout_marginLeft = "10dp", layout_width = "match_parent", orientation = "vertical", gravity = "center_horizontal", } local 顶边菜单 = { LinearLayout, layout_margin="5dp", id = "cebigannn", background = "#00000000", layout_height = "wrap_content", layout_width = "match_parent", orientation = "horizontal", } for j = 1,分区页数[i] do table.insert(顶边菜单, { TextView, Typeface=font, layout_height = "23dp", layout_marginLeft="3dp", layout_marginRight="3dp", paddingLeft = "8dp", paddingRight = "8dp", layout_width = "wrap_content", gravity = "center", text = sview[i][j]['分区名字'], id="dingwen"..i..j, onClick = function() 分区(j) end, background=slctb1, textColor = "#66709A", textSize = "12sp", }) 侧边[i] = luajava.loadlayout( { HorizontalScrollView, layout_height = "35dp", visibility = "gone", layout_width = "match_parent", 顶边菜单 }) table.insert(顶边,侧边[i]) local menulayout={ LinearLayout, layout_width='match_parent', layout_height='wrap_content', orientation = "vertical", id='menu'..i..j, } for k,v in pairs(sview[i][j]['功能配置']) do table.insert(menulayout,v) end local menulayout=menulayout 功能区[i][j]=menulayout table.insert(layoutm,menulayout) end local menus={ LinearLayout, layout_width = "250dp", layout_height = "280dp", orientation = "vertical", padding = { "5dp","1dp","0dp","0dp" }, { ScrollView, fillViewport = "true", gravity = "center", layout_width = "match_parent", layout_height = "match_parent", orientation = "horizontal", layoutm }} _ENV["layout"..i] =luajava.loadlayout(menus) end control=luajava.loadlayout({ImageView, id = "control", background = 获取图片(xfcpic), layout_width = "40dp", layout_height = "40dp", onTouch = hanshu, onClick = 隐藏,}) ckou = { LinearLayout, layout_width = "match_parent", layout_height = "match_parent", orientation = "vertical", } for i = 1,菜单页数 do ckou[#ckou+1] = _ENV["layout"..i] end ckou=luajava.loadlayout(ckou) heir=getRes("heir") leftbar=luajava.loadlayout({ LinearLayout, orientation = "vertical", padding = "1dp", layout_height = "match_parent", { MaterialCardView, id="cnm", layout_width='100dp', layout_height='70dp', useCompatPadding=false, layout_margin='3dp', cardElevation='5dp', cardBackgroundColor=获取图片(左上角头像), strokeColor=0x00ffffff, background=getVerticalBG({0xffFEFEFD,0xffFEFEFD},15,2,0xffD7D7D7), onClick=隐藏, onTouch=hanshu, __onCreate=function(v) v:setRadius(20) local c=ColorStateList({{android.R.attr.state_pressed},{-android.R.attr.state_pressed}}, {0x00ffffff,0x00ffffff}) v:setRippleColor(c) end, { ImageView, layout_width='match_parent', layout_height='55dp', gravity='center', background=获取图片(左上角头像), }, { TextView, layout_width='match_parent', layout_height='10dp', gravity='center', textSize='10sp', Typeface=font, textColor = "#66709A", layout_marginBottom = "3dp", layout_gravity='bottom', text=左上角标题, }, }, { LinearLayout, layout_width = "match_parent", layout_height = "0dp", layout_weight = 1, orientation = "vertical", cebian, }, { TextView, Typeface = font, layout_width = "match_parent", layout_height = "20dp", gravity = "center", id="banben", textSize = "12sp", textColor = "#66709A", text = "小绿", }, }) musicldd=luajava.loadlayout({ FrameLayout, layout_gravity="center", id="shadow", visibility="gone", {MaterialCardView, __onCreate=function(v) v:setRadius(20) local c=ColorStateList({{android.R.attr.state_pressed},{-android.R.attr.state_pressed}}, {0x00ffffff,0x00ffffff}) v:setRippleColor(c) end, { LinearLayout, id="Island", layout_height="280dp", layout_width="468dp", visibility="gone", layout_gravity="center", background=获取图片("https://free-img.400040.xyz/4/2026/10/07/6ac5f27b48098.webp"), onClick=function() end, { LinearLayout, id=luajava.newId("music"), layout_height="fill_parent", layout_width="fill_parent", layout_gravity="center|top", orientation="vertical", { LinearLayout, layout_height="230dp", gravity="center|left", orientation="horizontal", layout_width="460dp", onClick=function() end, { ImageView, layout_gravity="center|top", src = "/storage/emulated/0/林默/猫羽霏/111", ColorFilter="#FAFAFA", background = getVerticalBG({0x80000000,0x80000000},20), layout_marginLeft = "5dp", layout_marginTop = "5dp", layout_width = "25dp", layout_height = "25dp", onClick=function() canSwipeUp=false canSwipeDown=true if 灵动 then luajava.startThread(function() luajava.runOnUiThread(function() changan.controlSmall(shadow,1500) Island:setVisibility(View.GONE) luajava.getIdView("music"):setVisibility(View.INVISIBLE) end) 灵动=false gg.sleep(500) end) end end, }, { LinearLayout, layout_marginLeft = "25dp", layout_height="125dp", layout_width="125dp", layout_gravity="center|left", gravity="center", background=获取图片("https://wp.kayyw.com/f/JDpjCx/1762874221285.jpg.png"), IslandPic2, }, { LinearLayout, orientation="vertical", layout_width="230dp", layout_marginLeft = "20dp", layout_gravity="center|top", layout_height="wrap_content", gravity="center_horizontal", { LinearLayout, layout_height="wrap_content", layout_width="fill_parent", orientation="vertical", { TextView, id="Mname", gravity="center", layout_width="fill_parent", layout_height="wrap_content", layout_marginTop="10dp", Typeface = font, text="当前无音乐播放", ellipsize="marquee", singleLine=true, selected=true, textColor="#FAFAFA", textSize="12dp", }, { TextView, id="GSname", gravity="center", layout_width="fill_parent", Typeface = font, layout_height="wrap_content", text="作者:小绿", ellipsize="marquee", singleLine=true, selected=true, textColor="#000000", textSize="8dp", }, }, { ScrollView, layout_width="fill_parent", layout_height="wrap_content", scrollbars="vertical", fadingEdge="vertical", { TextView, id=luajava.newId("Muname"), gravity="center_horizontal|top", layout_width="fill_parent", layout_height="wrap_content", Typeface = font, layout_marginTop="5dp", layout_marginBottom="5dp", text="词:未播放歌曲", ellipsize="none", selected=true, textColor="#FAFAFA", textSize="12dp", __onFinish = function(v) v:setLineSpacing(dpToPx(4), 1.2) end, } } } }, { LinearLayout, gravity="center", layout_width='match_parent', layout_height='20dp', { Slider, id="hkuai", trackStopIndicatorSize="0dp", stepSize=1, valueTo=100, valueFrom=0, trackHeight="6dp", ThumbHeight="12dp", tickVisible=false, thumbWidth="3dp", layout_width='match_parent', layout_height='wrap_content', labelFormatter=function(seconds) if isPlaying then return ctime(seconds) else return "0:00" end end, addOnChangeListener=function(slider, value, fromUser) if fromUser and isPlaying and isReady then mediaPlayer:seekTo(value*1000) end end }, }, { LinearLayout, layout_width='468dp', layout_height='30dp', background = getVerticalBG({0x80000000,0x80000000},0), { LinearLayout, layout_weight=1, layout_width="match_parent", layout_height="match_parent", gravity="center", { TextView, id="ntime", gravity="center|right", layout_width="wrap_content", layout_height="wrap_content", text="0:00", textColor="#FAFAFA", textSize="11dp", }, { TextView, gravity="center|right", layout_width="wrap_content", layout_height="wrap_content", text="/", textColor="#FAFAFA", textSize="11dp", }, { TextView, id="atime", gravity="center|left", layout_width="wrap_content", layout_height="wrap_content", text="0:00", textColor="#FAFAFA", textSize="11dp", }, }, { LinearLayout, id=luajava.newId("Collection"), layout_weight=1, layout_width="match_parent", layout_height="match_parent", gravity="center", { ImageView, id="souc", src="/sdcard/林默/猫羽霏/unlove", layout_width="20dp", layout_height="20dp", onClick=function() changan.controlWater(luajava.getIdView("Collection"),200) 收藏() end, ColorFilter="#FAFAFA", }, }, { LinearLayout, id=luajava.newId("PreviousAong"), layout_weight=1, layout_width="match_parent", layout_height="match_parent", gravity="center", { ImageView, src="/sdcard/林默/猫羽霏/last", layout_width="25dp", layout_height="25dp", onClick=function() changan.controlWater(luajava.getIdView("PreviousAong"),200) 上一首() end, ColorFilter="#FAFAFA", }, }, { LinearLayout, layout_weight=1, id=luajava.newId("PauseLayout"), layout_width="match_parent", layout_height="match_parent", gravity="center", { LottieAnimationView, id="ztkq", layout_width="25dp", layout_height="25dp", onClick=function() 暂停() end, }, }, { LinearLayout, id=luajava.newId("NextSong"), layout_weight=1, layout_width="match_parent", layout_height="match_parent", gravity="center", { ImageView, src="/sdcard/林默/猫羽霏/next", layout_width="25dp", layout_height="25dp", onClick=function() changan.controlWater(luajava.getIdView("NextSong"),200) 下一首() end, ColorFilter="#FAFAFA", }, }, { LinearLayout, layout_weight=1, id=luajava.newId("LoopSetting"), layout_width="match_parent", layout_height="match_parent", gravity="center", { ImageView, id="bfsz", src="/sdcard/林默/猫羽霏/setPlay", layout_width="20dp", layout_height="20dp", onClick=function() 播放设置() end, ColorFilter="#FAFAFA", }, }, { LinearLayout, layout_weight=1, layout_width="match_parent", layout_height="match_parent", gravity="center", { ImageView, src="/sdcard/林默/猫羽霏/playlist", layout_width="20dp", layout_marginLeft="match_parent", layout_marginRight="15dp", layout_gravity="center|right", layout_height="20dp", onClick=function() 播放列表() end, ColorFilter="#FAFAFA", } }, }} } }, }) linelm=luajava.loadlayout({ LinearLayout, layout_width = "1dp", layout_height = "fill_parent", background = "#D7D7D7" }) centerbar=luajava.loadlayout({LinearLayout, layout_width='match_parent', layout_height='match_parent', orientation='vertical', {LinearLayout, layout_width = "match_parent", layout_height = "35dp", orientation = "horizontal", gravity = "center_vertical", paddingLeft = "10dp", {ImageView, src=heir, rotation=180, layout_height="18dp", layout_width="20dp", ColorFilter=0xffB8B8B8, onClick=function() if 当前分区[当前ui] > 1 then 分区(当前分区[当前ui] - 1) end end, onTouch=hanshu, id=luajava.newId('toleft'), },{ImageView, src=heir, layout_height="18dp", onClick=function() if 当前分区[当前ui] < 分区页数[当前ui] then 分区(当前分区[当前ui] + 1) end end, layout_width="20dp", ColorFilter=0xffB8B8B8, id=luajava.newId('toright'), }, { HorizontalScrollView, HorizontalScrollBarEnabled=false, layout_height='wrap_content', layout_width="210dp", fillViewport = "true", 顶边,} }, ckou,}) rightbar=luajava.loadlayout({LinearLayout, id="yj1", orientation='vertical', layout_gravity = "right|top", { MaterialCardView, orientation = "horizontal", layout_width = "95dp", layout_height = "25dp", layout_margin = "2dp", background=getVerticalBG({0xffFEFEFD,0xffFEFEFD},15,2,0xffD7D7D7), cardElevation='3dp', strokeColor=0x00ffffff, onClick=隐藏, onTouch=hanshu, { ImageView, padding = "5dp", src = getRes("lcsz"), ColorFilter=0xff66709A, layout_width = "wrap_content", layout_height = "wrap_content", layout_marginLeft = "5dp", layout_gravity="center_vertical|left", onClick = 隐藏, onTouch = hanshu, }, { LinearLayout, layout_width = "1dp", layout_margin = "3dp", layout_height = "match_parent", background = "#D7D7D7", layout_gravity = "center", }, { ImageView, padding = "5dp", layout_gravity = "right", src = getRes("heix"), ColorFilter=0xff66709A, layout_width = "wrap_content", layout_height = "wrap_content", layout_marginRight = "5dp", layout_gravity="center_vertical|right", onClick = 隐藏, onTouch = hanshu, } }, { MaterialCardView, orientation = "horizontal", layout_marginTop = "5dp", layout_width = "95dp", layout_height = "25dp", layout_margin = "2dp", background=getVerticalBG({0xffFEFEFD,0xffFEFEFD},15,2,0xffD7D7D7), cardElevation='3dp', strokeColor=0x00ffffff, { LinearLayout, gravity="center_vertical", layout_height="match_parent", layout_width = "match_parent", {LinearLayout, layout_weight=1, layout_height='34dp', layout_marginTop='3dp', layout_marginBottom='3dp', layout_marginLeft='3dp', layout_marginRight='3dp', layout_width='match_parent', padding='3dp', elevation='2dp', {ScrollView, id='ggscro', layout_height='match_parent', layout_width='match_parent', {LinearLayout, id='gggscro', orientation='vertical', layout_margin = "1dp", layout_width='match_parent', layout_height='wrap_content', } } } } }, { MaterialCardView, orientation = "horizontal", layout_marginTop = "5dp", layout_width = "95dp", layout_height = "50dp", layout_margin = "2dp", cardElevation='3dp', strokeColor=0x00ffffff, background=getVerticalBG({0xffFEFEFD,0xffFEFEFD},15,2,0xffD7D7D7), {LinearLayout, layout_gravity = "center", gravity = "center", layout_height="40dp", layout_width="40dp", background="https://wp.kayyw.com/f/JDpjCx/1762874221285.jpg.png", IslandPic1, }, }, { MaterialCardView, cardBackgroundColor="https://free-img.400040.xyz/4/2026/10/06/6ac4628d42005.webp", layout_marginTop = "5dp", layout_width = "95dp", layout_height = "155dp", layout_margin = "1dp", cardElevation='3dp', strokeColor=0x00ffffff, background=getVerticalBG({0xffFEFEFD,0xffFEFEFD},15,2,0xffD7D7D7), { ImageView, layout_width='match_parent', layout_height='155dp', gravity='center', background="https://free-img.400040.xyz/4/2026/10/07/6ac5f3a6320ee.webp", }, }, }) floatWindow = { FrameLayout, id = "motion", elevation = "10dp", onTouch = hanshu, onClick = function() end, layout_width = "470dp", orientation = "vertical", gravity = "center_vertical", layout_height = "wrap_content", { LinearLayout, id = "chuangk", background=beij, visibility = "visible", layout_width = "wrap_content", layout_height = "wrap_content", orientation = "horizontal", leftbar, linelm, centerbar, rightbar},musicldd, control, } local function invoke() local ok local RawX, RawY, x, y mainLayoutParams = getLayoutParams() floatWindow = luajava.loadlayout(floatWindow) local function invoke2() block('start') window:addView(floatWindow, mainLayoutParams) block('end') end local runnable = luajava.getRunnable(invoke2) local handler = luajava.getHandler() handler:post(runnable) block('join') local isMove end invoke(swib1,swib2) 隐藏() uiadtext("UI启动成功.","#161616") 切换(1) 分区(1) gg.setVisible(false) luajava.setFloatingWindowHide(true) setOnExitListener(function() mediaPlayer:reset() mediaPlayer:release() window:removeView(floatWindow) tuichu=1 end) function SliderColor(id,color1,color2,color3) id:setTrackActiveTintList(ColorStateList({{}},{"0xff"..color1})) id:setTrackInactiveTintList(ColorStateList({{}},{"0x55"..color2})) id:setThumbTintList(ColorStateList({{}},{"0x55"..color3})) end function SwitchColor(id,color) id:setTrackTintList(ColorStateList({{android.R.attr.state_checked}},{color})) end SliderColor(hkuai,"ffffff","ffffff","FFFFFF") ztkq:setAnimationFromJson(io.open("/sdcard/林默/猫羽霏/Pause", "r"):read("*all")) while true do if tuichu == 1 then os.exit() end if 音量键 then jianting3(qiehuan) gg.sleep(300) end if isPlaying and isReady and #musiclist ~= 0 then luajava.runOnUiThread(function() local currentPos = mediaPlayer:getCurrentPosition() ntime:setText(ctime(math.floor(currentPos/1000))) hkuai:setValue(math.floor(currentPos/1000)) syncLyricWithProgress(currentPos) end) end gg.sleep(60) end end function souyy(txt) return table.json(gg.makeRequest("http://music.163.com/api/search/get?s="..txt.."&type=1&offset=0&total=true&limit=20").content) end function searchmusic() mustxt=luajava.getIdView("搜索"):getText() mustxt=tostring(mustxt) luajava.runOnUiThread(function() luajava.getIdView("搜索"):setText("") luajava.getIdView("musicWindow"):setVisibility(View.GONE) SearchProgress:setVisibility(View.VISIBLE) end) if string.trim(mustxt)~="" then musictable={} mustable=souyy(mustxt) mustable=mustable.result.songs for k,v in pairs(mustable) do musictable[#musictable + 1]=v end Sortsong(20) end luajava.runOnUiThread(function() luajava.getIdView("musicWindow"):setVisibility(View.VISIBLE) SearchProgress:setVisibility(View.GONE) YoYoImpl:with("FadeIn"):duration(500):playOn(luajava.getIdView("musicWindow")) end) end function Sortsong(formath) musiccheck={} for i=1,formath do musid=musictable[#musictable+1-i].id musname=musictable[#musictable+1-i].name musart=musictable[#musictable+1-i].artists[0].name musvip=musictable[#musictable+1-i].fee musiccheck[#musiccheck+1]={musid,musname,musart,musvip} end musicadapter=ui.BaseAdapter({ getCount = function() return table.getn(musiccheck) end, getItem = function(position) return musiccheck[position + 1] end, getItemId = function(position) return position end, getView=function(position, convertView, parent) local SwitchView local info=musicadapter:getItem(position) if not convertView then SwitchView=luajava.loadlayout({ MaterialCardView, background=getVerticalBG({0xffE6EEF9,0xffE6EEF9},10,2,0xff969FAE), layout_width="match_parent", strokeWidth=0, layout_margin = "2dp", { LinearLayout, orientation="vertical", padding="3dp", gravity="center", layout_width="match_parent", { TextView, textSize="14sp", textColor="#66709A", Typeface = font, layout_hight="10dp", layout_width="wrap_content", gravity="center" }, { TextView, textColor="#000000", textSize="10sp", Typeface = font, layout_hight="10dp", layout_width="wrap_content", gravity="center" } } }) else SwitchView=convertView end SwitchView:getChildAt(0):getChildAt(0):setText(info[2]) SwitchView:getChildAt(0):getChildAt(1):setText(info[3]) SwitchView:setOnClickListener(function() bofang(info[1],info[2],info[3]) end) return SwitchView end }) luajava.runOnUiThread(function() musiclistview:setAdapter(musicadapter) end) end lastClickTime1=0 function bofang(musicid, musicname, musicstart) local currentTime1=os.time() if currentTime1 - lastClickTime1 < 1 then return 0 end lastClickTime1=currentTime1 isExist=false for i, _ in ipairs(musiclist) do if musiclist[i][1] == musicid then nowMusic = i 播放歌曲(musiclist[i][1]) isExist=true end end if not isExist then table.insert(musiclist, {musicid, musicname, musicstart, false}) nowMusic = #musiclist 播放歌曲(musicid) end end function 写入() lovemusic = {} for _, v in pairs(musiclist) do if v[4] then table.insert(lovemusic, v) end end file.write("/sdcard/林默/猫羽霏/收藏歌单",lovemusic) end function 灵动岛() luajava.runOnUiThread(function() end) luajava.getIdView("music"):setVisibility(View.VISIBLE) if 灵动 then luajava.startThread(function() luajava.runOnUiThread(function() changan.controlSmall(shadow1,1500) Island:setVisibility(View.GONE) end) 灵动=false luajava.runOnUiThread(function() end) end) else luajava.startThread(function() luajava.runOnUiThread(function() Island:setVisibility(View.VISIBLE) end) 灵动=true luajava.runOnUiThread(function() luajava.getIdView("music"):setVisibility(View.VISIBLE) end) end) end end function ctime(value) local minutes=math.floor(value / 60) local seconds=value % 60 return string.format("%d:%02d",minutes,seconds) end function setTime(value) local minutes=math.floor(value/1000) luajava.runOnUiThread(function() hkuai:setValueTo(minutes) atime:setText(ctime(minutes)) end) end function playMusic(id) pcall(function() mediaPlayer:reset() mediaPlayer:setDataSource("/sdcard/林默/猫羽霏/音乐缓存/"..id) mediaPlayer:prepare() luajava.getIdValue("IslandPic"):setImageDrawable(获取图片("/sdcard/林默/猫羽霏/音乐缓存/Pic2"..id)) luajava.getIdValue("IslandPic2"):setImageDrawable(获取图片("/sdcard/林默/猫羽霏/音乐缓存/Pic2"..id)) proo() proo3() end) end function parseLyrics(lyricText) local lines = {} if not lyricText or lyricText == "" then return lines end for line in lyricText:gmatch("[^\r\n]+") do local timeStr, text = line:match("%[(%d+:%d+%.?%d*)%](.*)") if timeStr and text then local textTrimmed = text:trim() if textTrimmed ~= "" then local minutes, seconds = timeStr:match("(%d+):(%d+%.?%d*)") if minutes and seconds then local totalMs = math.floor((tonumber(minutes) * 60 + tonumber(seconds)) * 1000) table.insert(lines, { timestamp = totalMs, text = textTrimmed }) end end end end table.sort(lines, function(a, b) return a.timestamp < b.timestamp end) for i, line in ipairs(lines) do line.text = line.text:gsub("\r\n", "\n"):gsub("\r", "\n") end return lines end function getLyrics(songId) if not songId then return "暂无歌词", {} end if lyricCache[songId] and lyricLineCache[songId] then return lyricCache[songId], lyricLineCache[songId] end local url = "http://music.163.com/api/song/lyric?os=pc&id=" .. songId .. "&lv=-1&kv=-1&tv=-1" local success, response = pcall(gg.makeRequest, url) if not success or not response or not response.content then lyricCache[songId] = "歌词加载失败:网络异常" lyricLineCache[songId] = {} return lyricCache[songId], lyricLineCache[songId] end local jsonData = table.json(response.content) if not jsonData or not jsonData.lrc or not jsonData.lrc.lyric then lyricCache[songId] = "暂无歌词" lyricLineCache[songId] = {} return lyricCache[songId], lyricLineCache[songId] end local originalLyrics = jsonData.lrc.lyric local translatedLyrics = jsonData.tlyric and jsonData.tlyric.lyric and jsonData.tlyric.lyric ~= "" and jsonData.tlyric.lyric or "" local mergedLyric, formattedLines = mergeLyrics(originalLyrics, translatedLyrics) lyricCache[songId] = mergedLyric lyricLineCache[songId] = formattedLines return mergedLyric, formattedLines end function mergeLyrics(original, translated) local origLines = parseLyrics(original) local transLines = parseLyrics(translated) if #origLines == 0 then return "暂无歌词", {} end local result = "" local formattedLines = {} local transMap = {} for _, trans in ipairs(transLines) do transMap[trans.timestamp] = trans.text end local matchThreshold = 300 for _, origLine in ipairs(origLines) do local transText = nil if transMap[origLine.timestamp] then transText = transMap[origLine.timestamp] else for transTs, text in pairs(transMap) do if math.abs(transTs - origLine.timestamp) < matchThreshold then transText = text break end end end result = result .. origLine.text .. "\n" if transText then result = result .. "「" .. transText .. "」\n" table.insert(formattedLines, { timestamp = origLine.timestamp, fullText = origLine.text .. "\n「" .. transText .. "」" }) else table.insert(formattedLines, { timestamp = origLine.timestamp, fullText = origLine.text }) end end result = result:gsub("\n$", ""):gsub("\r\n", "\n"):gsub("\r", "\n") return result, formattedLines end function getMusicPictures(id) local briefIntroduction = table.json(file.read("/sdcard/林默/猫羽霏/音乐缓存/pic".. id)) if briefIntroduction.code == 200 then picUrl = briefIntroduction.songs[0].album.picUrl else picUrl = 'https://free-img.400040.xyz/4/2026/10/06/6ac45d3c00fbb.jpg' end return picUrl end function syncLyricWithProgress(progressMs) if not currentFormattedLyrics or #currentFormattedLyrics == 0 then return end luajava.runOnUiThread(function() local scrollView = luajava.getIdView("Muname"):getParent() local munameView = luajava.getIdView("Muname") if not munameView or not isPlaying or not scrollView then return end local targetIndex = 1 for i = #currentFormattedLyrics, 1, -1 do if currentFormattedLyrics[i].timestamp <= progressMs then targetIndex = i break end end local fullLyric = "" for i = 1, #currentFormattedLyrics do local lineText = currentFormattedLyrics[i].fullText:gsub("\n", "
") if i == targetIndex then fullLyric = fullLyric .. "" .. lineText .. "
" else fullLyric = fullLyric .. "" .. lineText .. "
" end end fullLyric = fullLyric:gsub("
$", "") munameView:setText(string.fromHtml(fullLyric)) munameView:setLineSpacing(dpToPx(8), 1.5) local lineHeight = munameView:getLineHeight() local scrollY = (targetIndex - 2) * lineHeight scrollY = math.max(0, scrollY) scrollView:smoothScrollTo(0, scrollY) end) end function updateLyricDisplay(songId) luajava.newThread(function() local lyricText, formattedLines = getLyrics(songId) luajava.runOnUiThread(function() local scrollView = luajava.getIdView("Muname"):getParent() local munameView = luajava.getIdView("Muname") if not munameView or not scrollView then return end local defaultFullLyric = "" .. lyricText .. "" munameView:setText(string.fromHtml(defaultFullLyric)) munameView:setLineSpacing(dpToPx(6), 1.3) munameView:setGravity(Gravity.CENTER_HORIZONTAL + Gravity.TOP) currentFormattedLyrics = formattedLines scrollView:fullScroll(View.FOCUS_DOWN) scrollView:scrollTo(0, 0) end) end):start() end function 播放歌曲(id) isReady=false if #musiclist == 0 then return end if isPlaying==false then ztkq:setSpeed(1) ztkq:playAnimation() isPlaying=true end currentFormattedLyrics = {} if file.length("/sdcard/林默/猫羽霏/音乐缓存/"..id) ~= 0 or file.length("/sdcard/林默/猫羽霏/音乐缓存/Pic2"..id) ~= 0 then playMusic(id) updateLyricDisplay(id) else luajava.startThread(function() local co = coroutine.create(function() local success = file.download("http://music.163.com/song/media/outer/url?id=".. id.. ".mp3","/sdcard/林默/猫羽霏/音乐缓存/".. id) file.download('http://music.163.com/api/song/detail/?id='..id..'&ids=['..id..']',"/sdcard/林默/猫羽霏/音乐缓存/pic".. id) file.download(getMusicPictures(id),"/sdcard/林默/猫羽霏/音乐缓存/Pic2"..id) return success end) local status, result = coroutine.resume(co) if status and result then playMusic(id) updateLyricDisplay(id) else gg.alert("播放失败\n下载出现问题,无法播放音乐") end end) end end luajava.setInterface(mediaPlayer, 'setOnPreparedListener',{ onPrepared=function(media) isReady=true mediaTime=media:getDuration() media:start() setTime(mediaTime) luajava.runOnUiThread(function() hkuai:setValue(1) Mname:setText(musiclist[nowMusic][2]) GSname:setText(musiclist[nowMusic][3]) if musiclist[nowMusic][4] then sc=false souc:setImageDrawable(getRes("love")) souc:setColorFilter(0xffEC2937) else sc=true souc:setImageDrawable(getRes("unlove")) souc:setColorFilter(0xffFAFAFA) end end) end }) luajava.setInterface(mediaPlayer, 'setOnCompletionListener', {onCompletion=function(media) 换一首() end}) function MaterialAlert(text) MaterialAlertDialog=MaterialAlertDialogBuilder(baseWindow:getContext()) :setTitle(项目名字) :setMessage(text) :setPositiveButton('确定') luajava.showAlert(MaterialAlertDialog) end BSZ=0 function 换一首() if BSZ==0 then 下一首() elseif BSZ==1 then local randomnowMusic=math.random(1,#musiclist) local selectedNumber=musiclist[randomnowMusic] nowMusic=randomnowMusic 播放歌曲(selectedNumber[1]) elseif BSZ==2 then 播放歌曲(musiclist[nowMusic][1]) elseif BSZ==3 then luajava.newThread(function() 播放歌曲(musiclist[nowMusic][1]) gg.sleep(110) isPlaying=false mediaPlayer:pause() luajava.runOnUiThread(function() ztkq:setSpeed(-1) ztkq:playAnimation() end) end):start() end end function 播放设置() changan.controlWater(luajava.getIdView("LoopSetting"),200) if BSZ==0 then BSZ=BSZ+1 bfsz:setImageDrawable(getRes("repeatone")) elseif BSZ==1 then BSZ=BSZ+1 bfsz:setImageDrawable(getRes("stoploop")) elseif BSZ==2 then BSZ=BSZ+1 bfsz:setImageDrawable(getRes("listloop")) elseif BSZ==3 then BSZ=0 bfsz:setImageDrawable(getRes("setPlay")) end end function 暂停() if isPlaying then ztkq:setSpeed(-1) ztkq:playAnimation() proo1() proo4() if isReady then proo1() proo4() mediaPlayer:pause() end isPlaying=false else if isReady then mediaPlayer:start() end ztkq:setSpeed(1) proo() proo3() ztkq:playAnimation() isPlaying=true end end function 下一首() if #musiclist == 0 then MaterialAlert("列表没有可播放歌曲,请前往音乐界面添加!") 切换(5) luajava.runOnUiThread(function() end) return end nowMusic=nowMusic + 1 if nowMusic > #musiclist then nowMusic=1 end musicInfo=musiclist[nowMusic] 播放歌曲(musicInfo[1]) end function 上一首() if #musiclist == 0 then MaterialAlert("列表没有可播放歌曲,请前往音乐界面添加!") luajava.runOnUiThread(function() end) return end nowMusic=nowMusic - 1 if nowMusic < 1 then nowMusic=#musiclist end musicInfo=musiclist[nowMusic] 播放歌曲(musicInfo[1]) end sc=true function 收藏() if isReady then if sc then sc=false musiclist[nowMusic][4]=true souc:setImageDrawable(getRes("love")) souc:setColorFilter(0xffEC2937) else sc=true musiclist[nowMusic][4]=false souc:setImageDrawable(getRes("unlove")) souc:setColorFilter(0xffFAFAFA) end 写入() end end function 刷新列表() playadapter=ui.BaseAdapter({ getCount = function() return #musiclist end, getItem = function(position) return musiclist[position + 1] end, getItemId = function(position) return position end, getView=function(position, convertView, parent) local SwitchView local info=playadapter:getItem(position) if info[4] then MTP=getRes("love") MTPC=0xffEC2937 else MTP=getRes("unlove") MTPC=0xff4B484F end if not convertView then SwitchView=luajava.loadlayout( { FrameLayout, layout_width="match_parent", layout_height="30dp", paddingLeft="5dp", paddingRight="5dp", { ImageView, id="Playlike", src=MTP, layout_gravity="center|left", ColorFilter=MTPC, layout_width="22dp", layout_height="22dp", }, { TextView, id="playname", layout_marginLeft="25dp", layout_marginRight="25dp", layout_width="match_parent", Typeface = font, layout_height="wrap_content", layout_gravity="center", gravity="center", textColor="#27253A", }, { ImageView, id="songremove", src="/sdcard/林默/猫羽霏/heix", ColorFilter="#4B484F", layout_gravity="center|right", layout_width="18dp", layout_height="18dp", }, }) else SwitchView=convertView end Playlike:setOnClickListener(function() if info[4] then info[4]=false musiclist[position+1][4]=false 写入() 刷新列表() luajava.runOnUiThread(function() if nowMusic==position+1 then sc=true souc:setImageDrawable(getRes("unlove")) souc:setColorFilter(0xffFAFAFA) end end) else info[4]=true musiclist[position+1][4]=true 写入() 刷新列表() luajava.runOnUiThread(function() if nowMusic==position+1 then sc=false souc:setImageDrawable(getRes("love")) souc:setColorFilter(0xffEC2937) end end) end end) playname:setOnClickListener(function() 播放歌曲(info[1],info[2],info[3],info[4]) nowMusic=position+1 end) playname:setText(info[2]) songremove:setOnClickListener(function() luajava.startThread(function() if gg.alert('确定删除['..info[2]..']吗?','确定','点错了')==1 then table.remove(musiclist,position+1) 刷新列表() 写入() if nowMusic==position+1 then 下一首() end end end) end) return SwitchView end }) luajava.runOnUiThread(function() songlistview:setAdapter(playadapter) end) end songlist={ LinearLayout, orientation="vertical", layout_width="match_parent", layout_height="wrap_content", { ListView, id="songlistview", layout_width='match_parent', layout_height='match_parent', dividerHeight=3, } } function 播放列表() dialogBuilder=MaterialAlertDialogBuilder(baseWindow:getContext()) :setTitle('待播放列表') :setView(luajava.loadlayout(songlist)) :setPositiveButton('确定') luajava.showAlert(dialogBuilder) 刷新列表() end function uiadtext(txt,color,size) if not txt then txt = "" end if not color then color = "#000000" end if not size then size = "10sp" end local tmp=luajava.loadlayout( { TextView, Typeface=font, text = string.fromHtml(" "..getTimeStamp55(os.time()).." "..txt..""), textSize = size, gravity="left", layout_width = "wrap_content", }) luajava.post(function() gggscro:addView(tmp) end) luajava.newThread(function() gg.sleep(100) luajava.post(function() ggscro:fullScroll(View.FOCUS_DOWN) end) end):start() end function addadView(tmp) local function invoke() parentv:addView(tmp) end luajava.post(invoke) end function rmdadView(tmp) local function invoke() parentv:removeView(tmp) end luajava.post(invoke) end function getTimeStamp55(t) local str = os.date("%H:%M:%S",t) return str end 当前ui = 1 function 切换(x) 当前ui = x luajava.runUiThread(function() if 当前分区[当前ui]==nil then 分区(1) else for i=1,分区页数[当前ui] do _ENV['dingwen'..当前ui..i]:setBackground(getVerticalBG({0xffE6EEF9,0xffE6EEF9},10,2,0xff969FAE)) _ENV['dingwen'..当前ui..i]:setTextColor(0xff66709A) end _ENV['dingwen'..当前ui..当前分区[当前ui]]:setBackground(getVerticalBG({0xdd66709A,0xdd66709A},10,2,0xdd66709A)) _ENV['dingwen'..当前ui..当前分区[当前ui]]:setTextColor(0xffffffff) end for i = 1,菜单页数 do _ENV["layout"..i]:setVisibility(View.GONE) _ENV["jm"..i]:setBackground(slctb) 侧边[i]:setVisibility(View.GONE) end _ENV["layout"..当前ui]:setVisibility(View.VISIBLE) 侧边[当前ui]:setVisibility(View.VISIBLE) _ENV["jm"..当前ui]:setBackground(slcta) currentFuncLayout = _ENV['menu'..当前ui..当前分区[当前ui]] end) end function 分区(x) 当前分区[当前ui]=x luajava.runUiThread(function() for i=1,分区页数[当前ui] do _ENV['menu'..当前ui..i]:setVisibility(View.GONE) _ENV['dingwen'..当前ui..i]:setBackground(getVerticalBG({0xffE6EEF9,0xffE6EEF9},10,2,0xff969FAE)) _ENV['dingwen'..当前ui..i]:setTextColor(0xff66709A) end _ENV['menu'..当前ui..当前分区[当前ui]]:setVisibility(View.VISIBLE) _ENV['dingwen'..当前ui..当前分区[当前ui]]:setBackground(getVerticalBG({0xdd66709A,0xdd66709A},10,2,0xdd66709A)) _ENV['dingwen'..当前ui..当前分区[当前ui]]:setTextColor(0xffffffff) currentFuncLayout = _ENV['menu'..当前ui..当前分区[当前ui]] end) end 显示 = 0 beij = luajava.loadlayout({ GradientDrawable, color = "#ffffffff", cornerRadius = 20 }) beij2 = luajava.loadlayout({ GradientDrawable, color = "#001E1C27", cornerRadius = 10 }) import "android.animation.FloatEvaluator" import "android.view.animation.AccelerateDecelerateInterpolator" 显示 = 0 function 隐藏() luajava.runUiThread(function() if tonumber(tostring(control:getVisibility())) == 0 then control:setVisibility(View.GONE) 显示 = 1 luajava.runUiThread(function() height1 = DP40 width1 = DP40 local animator = ValueAnimator:ofFloat({0, 1}) animator:setDuration(600) local path = Path() path:moveTo(0.0, 0.0) path:cubicTo(0.4, 0.0, 0.2, 1.0, 1.0, 1.0) animator:setInterpolator(PathInterpolator(path)) local listener = luajava.createProxy('android.animation.ValueAnimator$AnimatorUpdateListener', { onAnimationUpdate = function(animation) local animatedProgress = animation:getAnimatedValue() if animatedProgress > 1 then animatedProgress = 1 + (animatedProgress - 1) / 6 end mainLayoutParams.height = height1 + (getpx("300") - height1) * animatedProgress mainLayoutParams.width = width1 + (getpx("470") - width1) * animatedProgress window:updateViewLayout(floatWindow, mainLayoutParams) end }) animator:addUpdateListener(listener) local listener = luajava.createProxy('android.animation.Animator$AnimatorListener', { onAnimationStart = function() YoYoImpl:with("FadeOut"):duration(1000):playOn(control) chuangk:setVisibility(View.VISIBLE) end, onAnimationEnd = function() control:setVisibility(View.GONE) chuangk:setVisibility(View.VISIBLE) shadow:setVisibility(View.VISIBLE) end, onAnimationCancel = function(animator) end }) animator:addListener(listener) animator:start() end) mainLayoutParams.flags = LayoutParams.FLAG_NOT_TOUCH_MODAL window:updateViewLayout(floatWindow, mainLayoutParams) else luajava.runUiThread(function() height1 = getpx("300") width1 = getpx("470") local animator = ValueAnimator:ofFloat({0, 1}) animator:setDuration(600) local path = Path() path:moveTo(0.0, 0.0) path:cubicTo(0.4, 0.0, 0.2, 1.0, 1.0, 1.0) animator:setInterpolator(PathInterpolator(path)) local listener = luajava.createProxy('android.animation.ValueAnimator$AnimatorUpdateListener', { onAnimationUpdate = function(animation) local animatedProgress = animation:getAnimatedValue() if animatedProgress > 1 then animatedProgress = 1 + (animatedProgress - 1) / 6 end mainLayoutParams.height = height1 + (DP40 - height1) * animatedProgress mainLayoutParams.width = width1 + (DP40 - width1) * animatedProgress window:updateViewLayout(floatWindow, mainLayoutParams) end }) animator:addUpdateListener(listener) local listener = luajava.createProxy('android.animation.Animator$AnimatorListener', { onAnimationStart = function() YoYoImpl:with("FadeIn"):duration(500):playOn(control) control:setVisibility(View.VISIBLE) end, onAnimationEnd = function() chuangk:setVisibility(View.GONE) control:setVisibility(View.VISIBLE) shadow:setVisibility(View.GONE) end, onAnimationCancel = function(animator) end }) animator:addListener(listener) animator:start() end) mainLayoutParams.flags = LayoutParams.FLAG_NOT_FOCUSABLE window : updateViewLayout (floatWindow , mainLayoutParams) 显示 = 0 end end) end changan.controlWater = function(control,time) luajava.runUiThread(function() import "android.animation.ObjectAnimator" ObjectAnimator():ofFloat(control,"scaleX", { 1, 0.8, 0.9, 1 }):setDuration(time):start() ObjectAnimator():ofFloat(control,"scaleY", { 1,0.8,0.9,1 }):setDuration(time):start() end) end changan.controlSmall = function(control,time) luajava.runUiThread(function() import "android.animation.ObjectAnimator" ObjectAnimator():ofFloat(control,"scaleX", { 1, 0.7, 0.4, 0 }):setDuration(time):start() ObjectAnimator():ofFloat(control,"scaleY", { 1, 0.7, 0.4, 0 }):setDuration(time):start() end) end changan.controlBig = function(control,time) luajava.runUiThread(function() import "android.animation.ObjectAnimator" ObjectAnimator():ofFloat(control,"scaleX", { 0, 0.4, 0.7, 1 }):setDuration(time):start() ObjectAnimator():ofFloat(control,"scaleY", { 0, 0.4, 0.7, 1 }):setDuration(time):start() end) end function getButtonBG() local selector = luajava.getStateListDrawable() selector:addState({ android.R.attr.state_pressed }, getVerticalBG({0x66d7d7d7,0x66d7d7d7},15)) selector:addState({ -android.R.attr.state_pressed }, getVerticalBG({0xffffffff,0xffffffff},15,3,0xffB8B8B8)) return selector end function changan.text(txt , color , size,bjz ) if not txt then txt = "未设置文字" end if not color then color = "#ffffff" end if not size then size = "18sp" end if not bjz then bjz = "left" end return luajava.loadlayout ( { TextView , text = txt , textSize = size , Typeface = font, gravity = bjz , textColor = color , layout_width = "fill_parent" , } ) end buts={} function changan.button(txt,func,txtc) if not txt then txt = "未设置" end if not txtc then txtc="#66709A" end local tid="button"..string.randomUUID(true) buts[tid]=luajava.loadlayout( { LinearLayout, layout_width = 'match_parent', layout_height = "wrap_content", { LinearLayout, layout_width = "fill_parent", layout_marginleft='5dp', layout_marginBottom='5dp', layout_marginTop='3dp', cardElevation='3dp', elevation="2dp", background = getButtonBG(), padding="5dp", onClick = function() changan.controlWater(buts[tid],300) uiadtext(txt.." 已开启.","#161616") luajava.newThread(func):start() end, { TextView, Typeface=font, textColor = txtc, Typeface = font, text = txt, gravity="center", textSize = "13sp", layout_height = "wrap_content", layout_width = "fill_parent", } }}) return buts[tid] end colorvs = {} function changan.seek(name,variable,min,max,now) local nid=name..string.randomUUID(true) colorvs[#colorvs+1]={"slider",nid} return{ LinearLayout, layout_width='fill_parent', layout_height="wrap_content", gravity="center_vertical", orientation="horizontal", { TextView, Typeface=font, text=name, textColor="0xff66709A", textSize="13sp", layout_width='50dp', layout_height='wrap_content', gravity="center_right", layout_marginLeft = "8dp", }, { Slider, id=luajava.newId(nid), trackStopIndicatorSize="0dp", stepSize=1, valueTo=max, valueFrom=min, value=now, trackHeight="4dp", ThumbHeight="20dp", ThumbWidth="20dp", tickVisible=false, layout_width='0dp', layout_height='wrap_content', layout_weight=1, CustomThumbDrawable = luajava.getBitmapDrawable("/storage/emulated/0/林默/猫羽霏/seek图标"), TrackActiveTintList=ColorStateList({{}},{0xffD4E3F6}), TrackInactiveTintList=ColorStateList({{}},{0xffC4C4C4}), ThumbTintList=ColorStateList({{}},{0xffD4E3F6}), onClick = function() luajava.newThread(function() func() end):start() end, addOnChangeListener=function(slider,value,fromUser) if not fromUser then return end if variable then _ENV[variable] = value end end }, } end function 开关3(name,func1,func2,nid) local sname = nid local localname=name name = name..string.randomUUID(true) _ENV[name] = "关" if func1 == nil then func1 = "" end if func2 == nil then func2 = "" end if type(func1) == "function" then local outfunc=function() namers = _ENV[name] if namers ~= "开" then vibra:vibrate(9) luajava.runUiThread(function() uiadtext(localname.." 已开启.","#161616") luajava.getIdValue(nid.."k"):setVisibility(View.GONE) YoYoImpl:with("Swing"):duration(600):playOn(switches["2s"..sname]) luajava.getIdValue(nid.."g"):setVisibility(View.VISIBLE) luajava.getIdValue(nid):setBackground(checkbg) luajava.newThread(function() pcall(func1) end):start() end) _ENV[name] = "开" else vibra:vibrate(9) luajava.runUiThread(function() uiadtext(localname.." 已关闭.","#161616") luajava.getIdValue(nid.."g"):setVisibility(View.GONE) YoYoImpl:with("Swing"):duration(600):playOn(switches["1s"..sname]) luajava.getIdValue(nid.."k"):setVisibility(View.VISIBLE) luajava.getIdValue(nid):setBackground(checkbga) luajava.newThread(function() pcall(func2) end):start() end) _ENV[name] = "关" end end return outfunc end end function changan.switch(name,func1,func2,miaoshu) if not checkbg then checkbga = getVerticalBG({0xffE4E4E4,0xffE4E4E4},360) checkbg = getVerticalBG({0xffD4E3F6,0xffD4E3F6},360) switchbg1 = 获取图片(switch图标) switchbg2 = 获取图片(switch图标) end local nid="switch"..string.randomUUID(true) local func = 开关3(name,func1,func2,nid) if not name then name = "未设置" end switches["1s"..nid] = luajava.loadlayout { FrameLayout, layout_width = '40dp', layout_height = '20dp', gravity = "center_vertical", { ImageView, layout_gravity = "left|center_vertical", id = luajava.newId(nid.."k"), src = switchbg1, background=getVerticalBG({0xffffffff,0xffffffff},360), onClick = function() luajava.newThread(function() func() end):start() end, layout_width = '20dp', layout_height = '20dp', }, } switches["2s"..nid] = luajava.loadlayout { FrameLayout, onClick = function() luajava.newThread(function() func() end):start() end, layout_width = '40dp', layout_height = '20dp', gravity = "center_vertical", { ImageView, visibility = "gone", layout_gravity = "right|center_vertical", id = luajava.newId(nid.."g"), src = switchbg2, background= getVerticalBG({0xffffffff,0xffffffff},360), onClick = function() luajava.newThread(function() func() end):start() end, layout_width = '20dp', layout_height = '20dp', } } rest = luajava.loadlayout({ LinearLayout, layout_width = 'fill_parent', layout_height = "37dp", gravity = "center", { LinearLayout, layout_width = 'match_parent', layout_height = "35dp", gravity = "center", elevation = "0dp", layout_marginRight = "4dp", layout_marginLeft = "4dp", { TextView, gravity = "top", text = name, textColor = "0xff66709A", textSize = "15sp", Typeface=font, layout_weight = 1, layout_width = 'wrap_content', layout_marginLeft = "4dp", layout_marginRight = "20dp", }, { TextView, gravity = "left", layout_height = "wrap_content", text = miaoshu, textSize = "8sp", Typeface=font, layout_width = "wrap_content", textColor = "#A5A5A5", }, { FrameLayout, id=luajava.newId(nid), background = checkbga, elevation = "1dp", onClick = function() luajava.newThread(function() func() end):start() end, layout_width = 'wrap_content', layout_height = 'wrap_content', gravity = "left", padding="1dp", switches["1s"..nid],switches["2s"..nid] }} }) return rest end switches = {} wyylog=luajava.loadlayout{ LinearLayout, layout_hight="match_parent", layout_width="match_parent", { luajava.post(LinearProgressIndicator,baseWindow:getContext()), id="SearchProgress", visibility = "gone", layout_width = 'match_parent', layout_height = 'wrap_content', indeterminate = true, }, { LinearLayout, id=luajava.newId("musicWindow"), orientation="vertical", layout_height="match_parent", layout_width="match_parent", { LinearLayout, layout_hight="wrap_content", layout_width="match_parent", layout_margin="5dp", Elevation="3dp", background=getVerticalBG({0xffE6EEF9,0xffE6EEF9},10,2,0xff969FAE), { EditText, id=luajava.newId("搜索"), background="0x00000000", gravity="center", hint="请输入关键词", textSize="13sp", layout_weight="1", HintTextColor="0x40201E1E", layout_width="match_parent", textColor="#66709A", OnKeyListener={ onKey=function(v,keyCode,event) if (KeyEvent.KEYCODE_ENTER == keyCode and KeyEvent.ACTION_DOWN == event:getAction()) then thread=luajava.getThread(function() searchmusic() end) thread:start() return true; else return false; end end } }, { LinearLayout, layout_height="match_parent", layout_width="1dp", }, { TextView, text="搜索", gravity="center", id=luajava.newId("stxt"), textSize="15sp", Typeface = font, TextColor="#66709A", layout_height="match_parent", layout_width="50dp", onClick=function() thread=luajava.getThread(function() searchmusic() end) thread:start() end }, }, { ListView, id="musiclistview", layout_width='match_parent', layout_height='match_parent', dividerHeight=3, }, }, } changan.controlRotation9 = function(control, time,t) luajava.runUiThread(function() import "android.view.animation.Animation" import "android.animation.ObjectAnimator" xuanzhuandonghua = ObjectAnimator:ofFloat(control, "rotation", { time,t }) xuanzhuandonghua:setRepeatCount(0) xuanzhuandonghua:setRepeatMode(Animation.RESTART) xuanzhuandonghua:setDuration(400) xuanzhuandonghua:start() end) end function visi (tid , ttid) vibra:vibrate(4) local tview = luajava.getIdValue (tid) local ttview = luajava.getIdValue (ttid) if not tview then return 0 end if tonumber (tostring (tview : getVisibility ())) == 8.0 then tview : setVisibility (View.VISIBLE) YoYoImpl:with("FadeIn"):duration(200):playOn(boxes[tid]) changan.controlRotation9(boxpic[tid],0,90) boxpic[tid]:setColorFilter("0xff66709A") else tview : setVisibility (View.GONE) changan.controlWater (_ENV [tid.."6"] , 200) changan.controlRotation9(boxpic[tid],90,0) boxpic[tid]:setColorFilter(nil) end end boxes = {} boxpic = {} function changan.box (views) local tid="box"..string.randomUUID(true) boxpic[tid] = luajava.loadlayout { ImageView , src = getRes("hei_right"), layout_width = "24dp" , layout_height = "24dp" , } local ttid = tid.."6" local t1id = "box22"..string.randomUUID(true) firadio = { LinearLayout , layout_width = 'fill_parent' , layout_height = "wrap_content" , layout_marginTop = "2dp" , layout_marginBottom = "2dp" , orientation = "vertical" , } if type (views [1]) == "string" or type (views [1]) == "number" then firadio [# firadio + 1] = { LinearLayout , layout_width = 'fill_parent' , layout_height = "30dp" , gravity = "center_vertical" , orientation="horizontal", layout_marginTop = "2dp" , layout_marginLeft='4dp', layout_marginRight='4dp', elevation='2dp', layout_marginBottom = "2dp" , onClick = function () visi (tid , ttid) end , background = getButtonBG(), { TextView , text = views [1] , textSize = "13sp" , layout_marginLeft = "15dp" , layout_marginRight='-20dp', Typeface = font, layout_width = "wrap_content" , layout_weight=1, textColor = "#66709A" , gravity = "left" , },{ LinearLayout , padding={"0dp","0dp","10dp","0dp"}, layout_width = "30dp" , layout_height = "30dp" , gravity = "center", layout_gravity="center_vertical|right" , boxpic[tid], } } else gg.alert ("changan.box的table内第一个元素必须是string") os.exit () end radios = { LinearLayout , layout_marginLeft = "0dp" , layout_marginRight = "0dp" , orientation = "vertical" , visibility = "gone" , id = luajava.newId (tid) , padding = "0dp" , layout_width = 'fill_parent' , } for i = 2 , # views do radios [# radios + 1] = views [i] end boxes[tid] = luajava.loadlayout(radios) firadio [# firadio + 1] = boxes[tid] _ENV [t1id] = luajava.loadlayout (firadio) return _ENV [t1id] end function changan.intcheck(name,func1,func2) nid=name..string.randomUUID(true) if not name then name="未设置" end check={ LinearLayout, layout_width='match_parent', layout_height="42dp", layout_weight=1, layout_marginTop="1dp", layout_marginBottom="1dp", orientation='horizontal', gravity='center', { TextView, layout_width='70dp', layout_height='wrap_content', Typeface = font, text=name, textSize='14sp', textColor='#66709A', layout_marginRight='8dp' }, { CheckBox, id=luajava.newId(nid), buttonTintList=ColorStateList({{android.R.attr.state_checked},{-android.R.attr.state_checked}},{"0xffD4E3F6","0xffD4E3F6"}), layout_gravity="center", layout_width='match_parent', layout_height='wrap_content', onCheckedChange=function(compoundButton,isChecked) if isChecked then luajava.newThread(function() pcall(func1) end):start() else luajava.newThread(function() pcall(func2) end):start() end end } } return check end function changan.check(cklist) if #cklist==0 then return nil end local rest={ LinearLayout, layout_width='fill_parent', layout_height="wrap_content", layout_marginRight="4dp", layout_marginLeft="4dp", layout_marginTop="3.5dp", layout_marginBottom="3.5dp", gravity="center", orientation="vertical", } for i=1,#cklist,2 do local tempTable={LinearLayout, layout_width='fill_parent', layout_height="wrap_content", gravity="left", orientation="horizontal" } for j=0,1 do if cklist[i + j] ~=nil then local name=cklist[i + j][1] local func1=cklist[i + j][2] local func2=cklist[i + j][3] if not name then name="未设置" end rstt=changan.intcheck(name,func1,func2) table.insert(tempTable,rstt) else table.insert(tempTable,{LinearLayout, layout_width='match_parent', layout_weight=1,}) end end table.insert(rest,tempTable) end return rest end 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 addr = Get_Address(t_So, t_Offset, _bit) if addr == nil then return nil end return string.format('0x%X', addr) end -- ============================================================ -- 【全新UI 功能页】函数库移植 -- ============================================================ local 安全冻结_移植 = function(addr, flags, value, 收集) if addr == nil then return false end local s = tostring(addr) if s == "" or s == "0x0" then return false end pcall(function() gg.addListItems({{address = addr, flags = flags, value = value, freeze = true}}) end) if 收集 then 收集[#收集 + 1] = {address = addr, flags = flags} end return true end local 移除冻结_移植 = function(收集) if not 收集 or #收集 == 0 then return end pcall(function() gg.removeListItems(收集) end) end function SearchWrite(Search, Write, Type, 收集) gg.clearResults() gg.setVisible(false) gg.searchNumber(Search[1][1], Type) local count = gg.getResultCount() local result = gg.getResults(count) gg.clearResults() local data = {} local base = Search[1][2] if (count > 0) then for i, v in ipairs(result) do v.isUseful = true end for k=2, #Search do local tmp = {} local offset = Search[k][2] - base local num = Search[k][1] for i, v in ipairs(result) do tmp[#tmp+1] = {} tmp[#tmp].address = v.address + offset tmp[#tmp].flags = v.flags end tmp = gg.getValues(tmp) for i, v in ipairs(tmp) do if tostring(v.value) ~= tostring(num) then result[i].isUseful = false end end end for i, v in ipairs(result) do if v.isUseful then data[#data+1] = v.address end end if (#data > 0) then local t = {} for i=1, #data do for k, w in ipairs(Write) do local offset = w[2] - base t[#t+1] = {} t[#t].address = data[i] + offset t[#t].flags = Type t[#t].value = w[1] if (w[3] == true) then local entry = t[#t] local item = {entry} item[1].freeze = true gg.addListItems(item) if 收集 then 收集[#收集 + 1] = {address = entry.address, flags = Type} end end end end gg.setValues(t) return true else return false end else return false end end local CB_移植 = {"libclient.so:bss", "Cb"} local function 取地址_移植(t_so, t_off) local ok, addr = pcall(S_Pointer, t_so, t_off, true) if ok then return addr end return nil end local function 冻_移植(addr, flags, value, 收集) if addr == nil then return false end local ok = pcall(function() gg.addListItems({{address = addr, flags = flags, value = value, freeze = true}}) end) if ok and 收集 then 收集[#收集 + 1] = {address = addr, flags = flags} end return ok end local function 写_移植(addr, flags, value) if addr == nil then return false end return pcall(function() gg.setValues({{address = addr, flags = flags, value = value}}) end) end local function 造指针开关(指针偏移, 类型, 开值, 关值) local 记录 = {} return function(on) if on then local addr = 取地址_移植(CB_移植, 指针偏移) if not addr then return false end if 冻_移植(addr, 类型, 开值, 记录) then return true end return false else local addr = 取地址_移植(CB_移植, 指针偏移) if addr then 写_移植(addr, 类型, 关值) end if #记录 > 0 then pcall(function() gg.removeListItems(记录) end) 记录 = {} end return true end end end local 加速记录_移植, 浮空记录_移植 = {}, {} function 加速开关(on) if on then 加速记录_移植 = {} gg.setRanges(4) local tb1 = {{8.545188559031288E26, 0}, {5.605193857299268E-44, -20}} local tb2 = {{1200, 12, true},{1200, 100, true}} if not SearchWrite(tb1, tb2, 16, 加速记录_移植) then return false end return true end 移除冻结_移植(加速记录_移植) 加速记录_移植 = {} return true end function 浮空开关(on) if on then 浮空记录_移植 = {} local t = {"libclient.so:bss", "Cb"} 安全冻结_移植(S_Pointer(t, {0x28450, 0x90, 0x98, 0x4C}, true), 4, 0, 浮空记录_移植) 安全冻结_移植(S_Pointer(t, {0x28450, 0x98, 0xB0, 0x4C}, true), 4, 0, 浮空记录_移植) return true end 移除冻结_移植(浮空记录_移植) 浮空记录_移植 = {} return true end function 组合开关(on) if on then local a = 加速开关(true) local f = 浮空开关(true) if a ~= true and f ~= true then return false end return true end 加速开关(false) 浮空开关(false) return true end local 秒过记录_移植 = {} function 秒过开关(on) if on then 秒过记录_移植 = {} local t = {"libclient.so:bss", "Cb"} 安全冻结_移植(S_Pointer(t, {0x57A20, 0x90, 0x98, 0x4C}, true), 4, 0, 秒过记录_移植) 安全冻结_移植(S_Pointer(t, {0x57A20, 0x98, 0xB0, 0x4C}, true), 4, 0, 秒过记录_移植) return true end 移除冻结_移植(秒过记录_移植) 秒过记录_移植 = {} return true end function F1() gg.toast("正在...,喵",true) gg.setProcessX() gg.setConfig("隐藏辅助",23) gg.setConfig("运行守护",3) gg.setConfig("冻结间隔",0) gg.setConfig("快速冻结",1) gg.toast("清除成功,喵") end function Fd() gg.setProcess("com.netease.party") gg.clearList() gg.toast("开启成功,喵") end function F2() gg.setRanges(gg.REGION_C_ALLOC) gg.searchNumber("16384", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0) gg.getResults(5000) gg.editAll("0.1", gg.TYPE_FLOAT) gg.refineNumber("99999999999999", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1, 0) gg.toast("开启成功,喵") end function F1ON() local t = {"libclient.so:bss", "Cb"} local tt = {0x1E1E8, 0x90, 0x98, 0x4C} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 4, value = -1, name = "浮空", freeze = true}}) gg.toast("开启成功,喵") end function F1OFF() local t = {"libclient.so:bss", "Cb"} local tt = {0x1E1E8, 0x90, 0x98, 0x4C} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 4, value = 1, name = "踏空", freeze = true}}) gg.toast("开启成功,喵") end function F2ON() local t = {"libclient.so:bss", "Cb"} local tt = {0x1E1E8, 0x90, 0x98, 0xA4C} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 4, value = 99, name = "加速", freeze = true}}) gg.toast("开启成功,喵") end function F2OFF() local t = {"libclient.so:bss", "Cb"} local tt = {0x1E1E8, 0x90, 0x98, 0xA4C} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 4, value = 1, name = "加速", freeze = true}}) gg.toast("开启成功,喵") end function F3ON() local t = {"libclient.so:bss", "Cb"} local tt = {0x1E1E8, 0x90, 0x98, 0x334} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 4, value = 20, name = "高跳", freeze = true}}) gg.toast("开启成功,喵") end function F3OFF() local t = {"libclient.so:bss", "Cb"} local tt = {0x1E1E8, 0x90, 0x98, 0x334} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 4, value = -90, name = "高跳", freeze = true}}) gg.toast("开启成功,喵") end function F4ON() local t = {"libclient.so:bss", "Cb"} local tt = {0x1E1E8, 0x90, 0x98, 0x20C} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 4, value = 120, name= "踏空跳", freeze = true}}) gg.toast("开启成功,喵") end function F4OFF() local t = {"libclient.so:bss", "Cb"} local tt = {0x1E1E8, 0x90, 0x98, 0x20C} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 4, value = 0, name= "踏空跳", freeze = false}}) gg.toast("开启成功,喵") end function F5ON() local t = {"libclient.so:bss", "Cb"} local tt = {0x1E1E8, 0x90, 0x98,0x5C+0x9F0} local ttt = S_Pointer(t, tt, true) gg.setValues({{address = ttt, flags = 4, value = 3}}) local tt = {0x1E1E8, 0x90, 0x98,0x5C-0x10} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 4, value = 0, name = "踏空", freeze = true}}) local tt = {0x1E1E8, 0x90, 0x98,0xA50,0x34} local ttt = S_Pointer(t, tt, true) gg.setValues({{address = ttt, flags = 4, value = 7}}) gg.setValues({{address = ttt+0x58, flags = 4, value = 7}}) gg.setValues({{address = ttt-0x20, flags = 4, value = 40000000}}) gg.setValues({{address = ttt+0x58-0x20, flags = 4, value = 4000000}}) gg.setValues({{address = ttt-0x28, flags = 4, value = 25000}}) gg.setValues({{address = ttt+0x58-0x28, flags = 4, value = 12000}}) gg.setValues({{address = ttt-0x30, flags = 4, value = 2000}}) gg.setValues({{address = ttt+0x58-0x30, flags = 4, value = 1000}}) gg.toast("开启成功,喵") end function F5OFF() local t = {"libclient.so:bss", "Cb"} local tt = {0x1E1E8, 0x90, 0x98,0x5C+0x9F0} local ttt = S_Pointer(t, tt, true) gg.setValues({{address = ttt, flags = 4, value = 1}}) local tt = {0x1E1E8, 0x90, 0x98,0x5C-0x10} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 4, value = 1}}) local tt = {0x1E1E8, 0x90, 0x98,0xA50,0x34} local ttt = S_Pointer(t, tt, true) gg.setValues({{address = ttt, flags = 4, value = 7}}) gg.setValues({{address = ttt+0x58, flags = 4, value = 7}}) gg.setValues({{address = ttt-0x20, flags = 4, value = 40}}) gg.setValues({{address = ttt+0x58-0x20, flags = 4, value = 4}}) gg.setValues({{address = ttt-0x28, flags = 4, value = 25}}) gg.setValues({{address = ttt+0x58-0x28, flags = 4, value = 12}}) gg.setValues({{address = ttt-0x30, flags = 4, value = 2}}) gg.setValues({{address = ttt+0x58-0x30, flags = 4, value = 1}}) gg.toast("开启成功,喵") end function F6() local t = {"libclient.so:bss", "Cb"} local tt = {0x1E1E8, 0x90, 0x98, 0x44} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 4, value = 0, name = "秒过", freeze = true}}) gg.toast("开启成功,喵") end function K1() local input = gg.prompt( {"请你是否打开功能 打开后将无法关闭 打开话输入\"是\""} ) if input == nil then return gg.toast("开启成功,喵") end local t = {"libclient.so:bss", "Cb"} local tt = {0x1D950, 0x60} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = 0, name = "透墙", freeze = true}}) gg.toast("开启成功,喵") end function KH2ON() local t = {"libclient.so:bss", "Cb"} local tt = {0x1D950, 0x78, 0x18, 0xA4} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = 1.5, name = "变大(1)", freeze = true}}) local t = {"libclient.so:bss", "Cb"} local tt = {0x1D950, 0x78, 0x18, 0xA8} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = 1.5, name = "变大(2)", freeze = true}}) local t = {"libclient.so:bss", "Cb"} local tt = {0x1D950, 0x78, 0x18, 0xAC} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = 1.5, name = "变大(3)", freeze = true}}) end function KH2OFF() local t = {"libclient.so:bss", "Cb"} local tt = {0x1D950, 0x78, 0x18, 0xA4} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = 1.0, name = "变大(1)", freeze = true}}) local t = {"libclient.so:bss", "Cb"} local tt = {0x1D950, 0x78, 0x18, 0xA8} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = 1.0, name = "变大(2)", freeze = true}}) local t = {"libclient.so:bss", "Cb"} local tt = {0x1D950, 0x78, 0x18, 0xAC} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = 1.0, name = "变大(3)", freeze = true}}) gg.toast("开启成功,喵") end function K3ON() local t = {"libclient.so:bss", "Cb"} local tt = {0x1D950, 0x64} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = 90, name = "视野", freeze = true}}) gg.toast("开启成功,喵") end function K4ON() local t = {"libclient.so:bss", "Cb"} local tt = {0x1D950, 0x64} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = 120, name = "视野", freeze = true}}) gg.toast("开启成功,喵") end function K34OFF() local t = {"libclient.so:bss", "Cb"} local tt = {0x1D950, 0x64} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = 55, name = "视野", freeze = true}}) gg.toast("开启成功,喵") end function K5ON() local t = {"libclient.so:bss", "Cb"} local tt = {0x1E1E8, 0x48, 0x8, 0x30} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 4, value = 7, name = "动作重复", freeze = true}}) gg.toast("开启成功,喵") end function K5OFF() local t = {"libclient.so:bss", "Cb"} local tt = {0x1E1E8, 0x48, 0x8, 0x30} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 4, value = 0, name = "动作重复", freeze = false}}) gg.toast("开启成功,喵") end function Y1YON() local input = gg.prompt( {"改蛋仔大小",[1]="x坐标",[2]="y坐标",[3]="z坐标"}, {[1]="2.0",[2]="2.0",[3]="2.0"}, {[1]="number",[2]="number",[3]="number"} ) if input == nil then return gg.toast("开启成功,喵") end local t = {"libclient.so:bss", "Cb"} local tt = {0x1D950, 0x78, 0x18, 0xA4} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = input[1], name = "变大(1)", freeze = true}}) local t = {"libclient.so:bss", "Cb"} local tt = {0x1D950, 0x78, 0x18, 0xA8} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = input[2], name = "变大(2)", freeze = true}}) local t = {"libclient.so:bss", "Cb"} local tt = {0x1D950, 0x78, 0x18, 0xAC} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = input[3], name = "变大(3)", freeze = true}}) gg.toast("开启成功,喵") end function Y2ON() local input = gg.prompt( {"请输入数值 原数值55"}, {[1]="60"}, {[1]="number"} ) if input == nil then return gg.toast("开启成功,喵") end local t = {"libclient.so:bss", "Cb"} local tt = {0x1D950, 0x64} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = input[1], name = "视野", freeze = true}}) gg.toast("开启成功,喵") end function Y2OFF() local t = {"libclient.so:bss", "Cb"} local tt = {0x1D950, 0x64} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = 55, name = "视野", freeze = false}}) gg.toast("开启成功,喵") end function Y3ON() local input = gg.prompt( {"请输入数值 原数值-90"}, {[1]="10"}, {[1]="number"} ) if input == nil then return gg.toast("开启成功,喵") end local t = {"libclient.so:bss", "Cb"} local tt = {0x1E1E8, 0x90, 0x98, 0x334} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 4, value = input[1], name = "高跳", freeze = true}}) gg.toast("开启成功,喵") end function Y3OFF() local t = {"libclient.so:bss", "Cb"} local tt = {0x1E1E8, 0x90, 0x98, 0x334} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 4, value = -90, name = "高跳", freeze = true}}) gg.toast("开启成功,喵") end function Y4ON() local input = gg.prompt( {"请输入数值 原数值1"}, {[1]="40"}, {[1]="number"} ) if input == nil then return gg.toast("开启成功,喵") end local t = {"libclient.so:bss", "Cb"} local tt = {0x1E1E8, 0x90, 0x98, 0xA4C} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 4, value = input[1], name = "加速", freeze = true}}) gg.toast("开启成功,喵") end function Y4OFF() local t = {"libclient.so:bss", "Cb"} local tt = {0x1E1E8, 0x90, 0x98, 0xA4C} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 4, value = 1, name = "加速", freeze = true}}) gg.toast("开启成功,喵") end 心碎开关 = { ["钩子加速"] = 造指针开关({0x23A58,0x90,0x98,0xA50,0x34}, 4, 25000, 25), ["变大"] = 造指针开关({0x231B8,0x78,0x18,0xA4}, 16, 3, 1), ["锁120帧"] = 造指针开关({0x968,0x8}, 4, 120, 60), ["踏空跳"] = 造指针开关({0x23A58,0x90,0x98,0x20C}, 4, 100, 0), ["高跳"] = 造指针开关({0x23A58,0x90,0x98,0x334}, 4, 200, -90), ["疾跑"] = 造指针开关({0x23A58,0x90,0x98,0xDC}, 4, 400, 0), ["移动转圈"] = 造指针开关({0x23A58,0x90,0x98,0x8C}, 4, -1, 0), ["移动磕碰"] = 造指针开关({0x23A58,0x90,0x98,0x134}, 4, 200, 0), ["透视"] = 造指针开关({0x231B8,0x60}, 4, 20, -5), ["去建筑物"] = 造指针开关({0x231B8,0x5C}, 16, 0, 1), ["碰撞无僵直"] = 造指针开关({0x23A58,0x90,0x98,0x174}, 4, 50, 1), ["碰撞反弹"] = 造指针开关({0x23A58,0x90,0x98,0x178}, 4, 50, 0), ["禁止移动"] = 造指针开关({0x23A58,0x90,0x98,0x3AC}, 4, 500, 0), ["禁止跳跃"] = 造指针开关({0x23A58,0x90,0x98,0x36C}, 4, -1, 0), ["蛋仔静止"] = 造指针开关({0x23A58,0x90,0x98,0x3D8}, 4, 1, 512), ["平地浮空"] = 造指针开关({0x23A58,0x90,0x98,0x21C}, 4, 1, 0), ["跳跃滑步"] = 造指针开关({0x23A58,0x90,0x98,0x100}, 4, 150, 0), ["跳跃急停"] = 造指针开关({0x23A58,0x90,0x98,0x304}, 4, 1, 0), ["斜坡加速"] = 造指针开关({0x23A58,0x90,0x98,0x2CC}, 4, 50, 0), ["碰缝隙起飞"] = 造指针开关({0x23A58,0x90,0x98,0x25C}, 4, 100, 0), ["广角"] = 造指针开关({0x231B8,0x18,0x40,0x3C}, 16, 90, 55), ["超广角"] = 造指针开关({0x231B8,0x18,0x40,0x3C}, 16, 150, 55), ["滚动浮空"] = 造指针开关({0x23A58,0x98,0xB0,0x54}, 4, -9999999, 0), ["无限滚动"] = 造指针开关({0x23A58,0x90,0x98,0x9D0}, 4, 0, 0), ["无限模型滚动"] = 造指针开关({0x23A58,0x48,0x8,0x30}, 4, 1, 0), } switch图标="/storage/emulated/0/林默/猫羽霏/seek图标" 左上角标题 = "小绿永远牛逼" 左上角头像='https://free-img.400040.xyz/4/2026/10/07/6ac5f11352861.webp' xfcpic = "https://free-img.400040.xyz/4/2026/10/07/6ac5f124b484b.webp" 第一页 = { ['分页名字']="基础", [1]={ ['分区名字']="进程", ['功能配置']={ changan.button('选择进程',gg.setProcessX), changan.button('初始化', function() Fd() end), changan.button('登录防封', function() F2() end), changan.switch( "引流水印", function() draw.text("小绿辅助QQ群:1126613135", 200,200) draw.setColor("#4A90E2") draw.setSize(47) draw.setStyle("描边并填充") end, function() draw.remove() end), } }, [2]={ ['分区名字']="公告", ['功能配置']={ changan.button('免责声明本辅助仅为本地修改,未与游戏服务器交互,影响极小,不破坏其他玩家的正常游戏体验使用任何辅助均存在账号被封禁风险,使用说明中已明确提醒不上榜不开端口玩美化不超过4分钟的情况下通常较安全,但仍由用户自行承担全部风险若用户将美化用于登录正常游戏账号,由此产生的一切后果(包括但不限于封号财产损失等),本辅助作者及相关方概不负责', function() tuichu=1 end), } }, } 第二页 = { ['分页名字']="功能", -- 【基础】子分类 [1]={ ['分区名字']="基础", ['功能配置']={ changan.button('选择进程', gg.setProcessX), changan.button("❄清除冻结❄", function() gg.clearList() gg.toast("清除冻结成功,喵") end), changan.switch('加速', function() return 加速开关(true) end, function() return 加速开关(false) end), changan.switch('浮空', function() return 浮空开关(true) end, function() return 浮空开关(false) end), changan.switch('加速+浮空', function() return 组合开关(true) end, function() return 组合开关(false) end), changan.switch('秒过', function() return 秒过开关(true) end, function() return 秒过开关(false) end), changan.switch('钩子加速', function() return 心碎开关["钩子加速"](true) end, function() return 心碎开关["钩子加速"](false) end), changan.switch('疾跑', function() return 心碎开关["疾跑"](true) end, function() return 心碎开关["疾跑"](false) end), changan.switch('移动转圈', function() return 心碎开关["移动转圈"](true) end, function() return 心碎开关["移动转圈"](false) end), changan.switch('移动磕碰', function() return 心碎开关["移动磕碰"](true) end, function() return 心碎开关["移动磕碰"](false) end), changan.switch('斜坡加速', function() return 心碎开关["斜坡加速"](true) end, function() return 心碎开关["斜坡加速"](false) end), } }, -- 【玩法】子分类 [2]={ ['分区名字']="玩法", ['功能配置']={ changan.switch('踏空跳', function() return 心碎开关["踏空跳"](true) end, function() return 心碎开关["踏空跳"](false) end), changan.switch('高跳', function() return 心碎开关["高跳"](true) end, function() return 心碎开关["高跳"](false) end), changan.switch('平地浮空', function() return 心碎开关["平地浮空"](true) end, function() return 心碎开关["平地浮空"](false) end), changan.switch('跳跃滑步', function() return 心碎开关["跳跃滑步"](true) end, function() return 心碎开关["跳跃滑步"](false) end), changan.switch('跳跃急停', function() return 心碎开关["跳跃急停"](true) end, function() return 心碎开关["跳跃急停"](false) end), changan.switch('碰缝隙起飞', function() return 心碎开关["碰缝隙起飞"](true) end, function() return 心碎开关["碰缝隙起飞"](false) end), changan.switch('禁止跳跃', function() return 心碎开关["禁止跳跃"](true) end, function() return 心碎开关["禁止跳跃"](false) end), changan.switch('碰撞无僵直', function() return 心碎开关["碰撞无僵直"](true) end, function() return 心碎开关["碰撞无僵直"](false) end), changan.switch('碰撞反弹', function() return 心碎开关["碰撞反弹"](true) end, function() return 心碎开关["碰撞反弹"](false) end), changan.switch('禁止移动', function() return 心碎开关["禁止移动"](true) end, function() return 心碎开关["禁止移动"](false) end), changan.switch('蛋仔静止', function() return 心碎开关["蛋仔静止"](true) end, function() return 心碎开关["蛋仔静止"](false) end), changan.switch('滚动浮空', function() return 心碎开关["滚动浮空"](true) end, function() return 心碎开关["滚动浮空"](false) end), changan.switch('无限滚动', function() return 心碎开关["无限滚动"](true) end, function() return 心碎开关["无限滚动"](false) end), changan.switch('无限模型滚动', function() return 心碎开关["无限模型滚动"](true) end, function() return 心碎开关["无限模型滚动"](false) end), changan.switch('广角', function() return 心碎开关["广角"](true) end, function() return 心碎开关["广角"](false) end), changan.switch('超广角', function() return 心碎开关["超广角"](true) end, function() return 心碎开关["超广角"](false) end), changan.switch('透视', function() return 心碎开关["透视"](true) end, function() return 心碎开关["透视"](false) end), changan.switch('去建筑物', function() return 心碎开关["去建筑物"](true) end, function() return 心碎开关["去建筑物"](false) end), changan.switch('锁120帧', function() return 心碎开关["锁120帧"](true) end, function() return 心碎开关["锁120帧"](false) end), changan.switch('变大(固定)', function() return 心碎开关["变大"](true) end, function() return 心碎开关["变大"](false) end), } }, } 第四页 = { ['分页名字']="美化", [1]={ ['分区名字']="摩天轮", ['功能配置']={ changan.switch( "摩天轮", function() 摩天轮开关(true) end, function() 摩天轮开关(false) end, "小绿 ⇄ 小绿" ), } }, [2]={ ['分区名字']="动作", ['功能配置']={ changan.switch("动作·鞠躬", function() 添加动作("鞠躬","10600001") end, function() 动作还原() end), changan.switch("动作·磕头", function() 添加动作("磕头","10600002") end, function() 动作还原() end), changan.switch("动作·挥手", function() 添加动作("挥手","10600003") end, function() 动作还原() end), changan.switch("动作·耍赖", function() 添加动作("耍赖","10600004") end, function() 动作还原() end), changan.switch("动作·心痛", function() 添加动作("心痛","10600005") end, function() 动作还原() end), changan.switch("动作·害羞", function() 添加动作("害羞","10600006") end, function() 动作还原() end), changan.switch("动作·运动", function() 添加动作("运动","10600007") end, function() 动作还原() end), changan.switch("动作·加油", function() 添加动作("加油","10600008") end, function() 动作还原() end), changan.switch("动作·飞吻", function() 添加动作("飞吻","10600009") end, function() 动作还原() end), changan.switch("动作·倾斜舞", function() 添加动作("倾斜舞","10600010") end, function() 动作还原() end), changan.switch("动作·拜年", function() 添加动作("拜年","10600011") end, function() 动作还原() end), changan.switch("动作·转圈", function() 添加动作("转圈","10600012") end, function() 动作还原() end), changan.switch("动作·抓狂", function() 添加动作("抓狂","10600013") end, function() 动作还原() end), changan.switch("动作·欢呼", function() 添加动作("欢呼","10600014") end, function() 动作还原() end), changan.switch("动作·呐喊", function() 添加动作("呐喊","10600015") end, function() 动作还原() end), changan.switch("动作·生气", function() 添加动作("生气","10600016") end, function() 动作还原() end), changan.switch("动作·秀肌肉", function() 添加动作("秀肌肉","10600017") end, function() 动作还原() end), changan.switch("动作·出拳", function() 添加动作("出拳","10600018") end, function() 动作还原() end), changan.switch("动作·撒红包", function() 添加动作("撒红包","10600019") end, function() 动作还原() end), changan.switch("动作·甩手舞", function() 添加动作("甩手舞","10600020") end, function() 动作还原() end), changan.switch("动作·惬意", function() 添加动作("惬意","10600021") end, function() 动作还原() end), changan.switch("动作·打我呀", function() 添加动作("打我呀","10600022") end, function() 动作还原() end), changan.switch("动作·摸摸", function() 添加动作("摸摸","10600023") end, function() 动作还原() end), changan.switch("动作·互压", function() 添加动作("互压","10600024") end, function() 动作还原() end), changan.switch("动作·双人比心",function() 添加动作("双人比心","10600025") end,function() 动作还原() end), changan.switch("动作·机甲护身",function() 添加动作("机甲护身","10600026") end,function() 动作还原() end), changan.switch("动作·小天鹅", function() 添加动作("小天鹅","10600027") end, function() 动作还原() end), changan.switch("动作·转篮球", function() 添加动作("转篮球","10600028") end, function() 动作还原() end), changan.switch("动作·放烟花", function() 添加动作("放烟花","10600029") end, function() 动作还原() end), changan.switch("动作·撒花", function() 添加动作("撒花","10600030") end, function() 动作还原() end), changan.switch("动作·机器招手",function() 添加动作("机器招手","10600031") end,function() 动作还原() end), changan.switch("动作·机械舞", function() 添加动作("机械舞","10600032") end, function() 动作还原() end), changan.switch("动作·太极", function() 添加动作("太极","10600033") end, function() 动作还原() end), changan.switch("动作·拜年2", function() 添加动作("拜年2","10600034") end, function() 动作还原() end), changan.switch("动作·决斗", function() 添加动作("决斗","10600035") end, function() 动作还原() end), changan.switch("动作·木头人", function() 添加动作("木头人","10600036") end, function() 动作还原() end), changan.switch("动作·热身舞", function() 添加动作("热身舞","10600037") end, function() 动作还原() end), changan.switch("动作·蹑手蹑脚",function() 添加动作("蹑手蹑脚","10600038") end,function() 动作还原() end), changan.switch("动作·害怕", function() 添加动作("害怕","10600039") end, function() 动作还原() end), changan.switch("动作·双人对对碰",function() 添加动作("双人对对碰","10600040") end,function() 动作还原() end), changan.switch("动作·双人撒花",function() 添加动作("双人撒花","10600041") end,function() 动作还原() end), changan.switch("动作·双人牵手",function() 添加动作("双人牵手","10600042") end,function() 动作还原() end), changan.switch("动作·双人贴贴",function() 添加动作("双人贴贴","10600043") end,function() 动作还原() end), changan.switch("动作·健身", function() 添加动作("健身","10600044") end, function() 动作还原() end), changan.switch("动作·坐下", function() 添加动作("坐下","10600045") end, function() 动作还原() end), changan.switch("动作·猎罪时刻",function() 添加动作("猎罪时刻","10600046") end,function() 动作还原() end), changan.switch("动作·吃薯片", function() 添加动作("吃薯片","10600047") end, function() 动作还原() end), changan.switch("动作·摇可乐", function() 添加动作("摇可乐","10600048") end, function() 动作还原() end), changan.switch("动作·预备出发",function() 添加动作("预备出发","10600049") end,function() 动作还原() end), changan.switch("动作·好热", function() 添加动作("好热","10600050") end, function() 动作还原() end), changan.switch("动作·喝彩", function() 添加动作("喝彩","10600051") end, function() 动作还原() end), changan.switch("动作·后空翻", function() 添加动作("后空翻","10600052") end, function() 动作还原() end), changan.switch("动作·圣光裁决",function() 添加动作("圣光裁决","10600053") end,function() 动作还原() end), changan.switch("动作·火冒三丈",function() 添加动作("火冒三丈","10600054") end,function() 动作还原() end), changan.switch("动作·吹泡泡", function() 添加动作("吹泡泡","10600055") end, function() 动作还原() end), changan.switch("动作·张望", function() 添加动作("张望","10600056") end, function() 动作还原() end), changan.switch("动作·起飞", function() 添加动作("起飞","10600057") end, function() 动作还原() end), changan.switch("动作·惊慌", function() 添加动作("惊慌","10600058") end, function() 动作还原() end), changan.switch("动作·悲伤", function() 添加动作("悲伤","10600059") end, function() 动作还原() end), changan.switch("动作·手足无措",function() 添加动作("手足无措","10600060") end,function() 动作还原() end), changan.switch("动作·草裙舞", function() 添加动作("草裙舞","10600061") end, function() 动作还原() end), changan.switch("动作·装死", function() 添加动作("装死","10600062") end, function() 动作还原() end), changan.switch("动作·行礼", function() 添加动作("行礼","10600063") end, function() 动作还原() end), changan.switch("动作·安抚", function() 添加动作("安抚","10600064") end, function() 动作还原() end), changan.switch("动作·打弹弓", function() 添加动作("打弹弓","10600065") end, function() 动作还原() end), changan.switch("动作·浇水", function() 添加动作("浇水","10600066") end, function() 动作还原() end), } }, } 第五页 = { ['分页名字']="音乐", [1]={ ['分区名字']="搜索音乐", ['功能配置']={ wyylog, } }, } 第六页 = { ['分页名字']="设置", [1]={ ['分区名字']="设置", ['功能配置']={ changan.switch( "音量键隐藏UI", function() 音量键=true end, function() 音量键=false end ), changan.button('退出', function() tuichu=1 end), } }, } changan.menu({ 第一页, 第二页, 第四页, 第五页, 第六页, }) bloc = luajava.getBlock() bloc('join') end gg.alert(sG1) pcall(function()UImain()()()end)