toMusic("欢迎使用麻辣蛋仔辅助祝您游戏愉快")
gg.alert('欢迎使用麻辣蛋仔辅助,祝您游戏愉快','欢迎回来')
gg.alert("免责声明本辅助仅为本地修改,未与游戏服务器交互,影响极小,不破坏其他玩家的正常游戏体验使用任何辅助均存在账号被封禁风险,使用说明中已明确提醒不上榜不开端口玩美化不超过4分钟的情况下通常较安全,但仍由用户自行承担全部风险若用户将美化用于登录正常游戏账号,由此产生的一切后果(包括但不限于封号财产损失等),本辅助作者及相关方概不负责", "喵")
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/06/6ac45e0c6cd6e.jpg"),
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/06/6ac4628d42005.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/06/6ac45e0c6cd6e.jpg'
xfcpic = "https://free-img.400040.xyz/4/2026/10/06/6ac45d3c00fbb.jpg"
第一页 = {
['分页名字']="基础",
[1]={
['分区名字']="进程",
['功能配置']={
changan.button('选择进程',gg.setProcessX),
changan.button('初始化', function() Fd() end),
changan.button('登录防封', function() F2() end),
changan.switch(
"引流水印",
function()
draw.text("麻辣蛋仔:1125305631", 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)