draw.setSize(45)
draw.setStyle("填充")
draw.setColor("#FFFF00")
draw.text("冰冰and蛋糕范围特供版 内容AI生成请甄别", 340, 180)
draw.text("@DGFW88 无不良引导", 340, 230)
function wow()
gg.playMusic("/storage/emulated/0/冰冰and蛋糕最新UI配置/wow.mp3")
end
function panduan(rec) fille,err = io.open(rec) if fille == nil then return false else return true end end
if panduan("/sdcard/冰冰and蛋糕最新UI配置/Lottie.dex")~=true then
file.unzip("/sdcard/冰冰and蛋糕最新UI配置/冰冰and蛋糕牛逼.zip","/sdcard/冰冰and蛋糕最新UI配置/")
end
local window = require('windowManager')
local ui = require('ui')
baseWindow=require('floatingWindowManager2')
import("android.content.res.ColorStateList")
import("com.google.android.material.card.MaterialCardView")
import("com.google.android.material.materialswitch.MaterialSwitch")
import("com.google.android.material.slider.Slider")
import("com.google.android.material.progressindicator.LinearProgressIndicator")
import("android.animation.LayoutTransition")
function SwitchDrawable(on,off)
local switchSelector = luajava.getStateListDrawable()
switchSelector:addState({ android.R.attr.state_checked }, luajava.getBitmapDrawable("/sdcard/冰冰and蛋糕最新UI配置/"..on))
switchSelector:addState({ -android.R.attr.state_checked }, luajava.getBitmapDrawable("/sdcard/冰冰and蛋糕最新UI配置/"..off))
return switchSelector
end
baseWindow:darkMode()
baseWindow:lightMode()
layoutTransition=LayoutTransition()
layoutTransition:setDuration(400)
rs=context:getResources():getDisplayMetrics()
rs=tostring(rs)
rs=string.gsub(rs,",",";")
rs=string.gsub(rs,"DisplayMetrics","")
load("rs="..rs)()
dheight=rs.height
dwidth=rs.width
if tonumber(dheight)==nil then
dwidth=1340
dheight=2300
end
function particle(co1,co2,cor)
local webView = luajava.webView(function(webView)
webView:loadData([[
❄
❄
❄
❄
❄
❄
❄
❄
❄
❄
❄
❄
❄
❄
❄
❄
❄
❄
❄
❄
]], 'text/html', 'UTF-8')
webView:setBackgroundColor(0x0)
end)
return webView
end
parti = particle(
"rgba(0, 128, 255, 0.1)",
"rgba(0, 128, 255, 1)",
"#0080FF"
)
function getBG(DrawableColor,Radius,StrokeWidth,StrokeColor)
if type(DrawableColor)~="table" then
DrawableColor={DrawableColor,DrawableColor}
end
local jianbians = luajava.loadlayout({
GradientDrawable,
color = 0xffffffff,
gradientType = GradientDrawable.LINEAR_GRADIENT,
orientation = GradientDrawable.Orientation.TOP_BOTTOM ,
})
jianbians:setColors(DrawableColor)
jianbians:setStroke(StrokeWidth or 0,StrokeColor or 0xffffffff)
if type(Radius)=="table" then
jianbians:setCornerRadii({Radius[1],Radius[1],Radius[2],Radius[2],Radius[3],Radius[3],Radius[4],Radius[4]})
else
jianbians:setCornerRadius(Radius or 0)
end
return jianbians
end
file.checkFile("/sdcard/冰冰and蛋糕最新UI配置/color") -- 判断文件是否存在
local RGBcolor = file.read("/sdcard/冰冰and蛋糕最新UI配置/color") -- 读取文件内容
if RGBcolor ~= "" then -- 判断内容是否为空
else
RGBcolor="161616"
end
file.checkFile("/sdcard/冰冰and蛋糕最新UI配置/收藏歌单") -- 判断文件是否存在
local musiclist = file.read("/sdcard/冰冰and蛋糕最新UI配置/收藏歌单") -- 读取文件内容
if musiclist ~= "" then -- 判断内容是否为空
musiclist = load("return"..musiclist)() -- string转table后赋值
else
musiclist = {} -- 给变量赋值
end
local nowMusic = #musiclist -- 设定当前歌曲序号
import("android.media.MediaPlayer")
mediaPlayer=MediaPlayer() -- 音乐播放器
import("android.view.animation.ScaleAnimation")
import("android.view.animation.Animation")
import("android.content.res.ColorStateList")
--gg.setVisible(false)
--luajava.setFloatingWindowHide(true)
local material3 = require "material3"
local context=material3:getContext()
import "android.graphics.Bitmap"
import "android.renderscript.Allocation"
import "android.renderscript.Element"
import "android.renderscript.RenderScript"
import "android.renderscript.ScriptIntrinsicBlur"
import "android.graphics.Canvas"
import "android.graphics.Rect"
import "android.animation.ObjectAnimator"
import "android.view.animation.Animation"
local colorvs = {} --控件颜色
local threshold = 5 -- 设定拖动阈值
local canSwipeUp = false -- 设定第一次上拖动是否触发
local canSwipeDown = true -- 设定第一次下拖动是否触发
local isPlaying = false --设定歌曲播放状态
local 音量键 = true --设定歌曲播放状态
local isReady = false --歌曲是否准备完毕
import "android.animation.ArgbEvaluator"
import "android.animation.ValueAnimator"
import "com.google.android.material.button.MaterialButton"
import "com.google.android.material.materialswitch.MaterialSwitch"
import "com.google.android.material.navigationrail.NavigationRailView"
import "com.google.android.material.card.MaterialCardView"
dex.loadfile("/sdcard/冰冰and蛋糕最新UI配置/Lottie.dex")
import "com.airbnb.lottie.*"
linmo = {}
local LayoutParams = luajava.bindClass("android.view.WindowManager$LayoutParams")
context:setTheme(0x7f090069)
vibra = context:getSystemService(Context.VIBRATOR_SERVICE)
linmo = {}
local linmo = linmo
local isInit = true -- 添加初始化标志
local android = import("android.*")
function write(fileName, content)
file.write(fileName, content)
end
import("com.google.android.material.card.MaterialCardView")
import("com.google.android.material.progressindicator.LinearProgressIndicator")
local rs=RenderScript:create(app.context)
local blur=ScriptIntrinsicBlur:create(rs, Element:U8_4(rs))
blur:setRadius(20)
function getBlur(bit)
local input=Allocation:createFromBitmap(rs,bit)
blur:setInput(input)
local output=Allocation:createTyped(rs, input:getType())
blur:forEach(output)
output:copyTo(bit)
return bit
end
function View2Bitmap(view,isblur)
local width = view:getMeasuredWidth()
local height = view:getMeasuredHeight()
if width==0 then width=1 height=1 end
local bitmap = Bitmap:createBitmap(width, height, Bitmap.Config.ARGB_8888);
local canvas = Canvas(bitmap)
canvas:translate(-view:getScrollX(), -view:getScrollY())
view:draw(canvas)
if isblur then
return getBlur(bitmap)
else
return bitmap
end
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_TOUCH_MODAL -- 焦点设置Finish
layoutParams.gravity = Gravity.TOP|Gravity.LEFT -- 重力设置
layoutParams.width = LayoutParams.WRAP_CONTENT -- 布局宽度
layoutParams.height = LayoutParams.WRAP_CONTENT -- 布局高度
return layoutParams
end
hanshu = function(v, event)
local Action = event:getAction()
if Action == MotionEvent.ACTION_DOWN then
isMove = false
RawX = event:getRawX()
RawY = event:getRawY()
x = xfcParams.x
y = xfcParams.y
elseif Action == MotionEvent.ACTION_MOVE then
isMove = true
xfcParams.x = tonumber(x) + (event:getRawX() - RawX)
xfcParams.y = tonumber(y) + (event:getRawY() - RawY)
window:updateViewLayout(xfcView, xfcParams)
elseif Action == MotionEvent.ACTION_UP then
if math.abs(xfcParams.x - x) >= 10 or math.abs(xfcParams.y - y) >= 10 then
return true
end
end
end
function 获取图片(txt)
txt = string.url(txt,"de")
if string.find(tostring(txt),"http") ~= nil then
ntxt = string.sub(string.gsub(txt,"/","-"),-10,-1)
if file.length("/sdcard/冰冰and蛋糕最新UI配置/"..ntxt,false)<200 then
luajava.download(txt,"/sdcard/冰冰and蛋糕最新UI配置/"..ntxt)
end
txt = "/sdcard/冰冰and蛋糕最新UI配置/"..ntxt
end
return luajava.getBitmapDrawable(txt)
end
function getRes(x)
return 获取图片("/sdcard/冰冰and蛋糕最新UI配置/"..x)
end
function 获取图片3(txt)
txt = string.url(txt,"de")
if string.find(tostring(txt),"http") ~= nil then
ntxt = string.sub(string.gsub(txt,"/","-"),-10,-1)
if file.length("/sdcard/冰冰and蛋糕最新UI配置/"..ntxt,false)<200 then
luajava.download(txt,"/sdcard/冰冰and蛋糕最新UI配置/"..ntxt)
end
txt = "/sdcard/冰冰and蛋糕最新UI配置/"..ntxt
end
return luajava.getBitmap(txt)
end
local isswitch
YoYoImpl = luajava.getYoYoImpl()
linmo.menu = function(sview)
if #sview<#stab then gg.alert("功能配置少于分页名字,请检查") os.exit() end
if isswitch then
return false
end
isswitch = true
cebian = {
LinearLayout,
id = "侧边",
layout_height = "match_parent",
layout_width = "wrap_content",
orientation = "vertical",
gravity = "center_horizontal",
}
for i = 1,#stab do
cebian[#cebian+1] = {
LinearLayout,
id = "jm"..i,
layout_height = "match_parent",
layout_width = "80dp",
layout_marginTop = "3dp",
layout_marginBottom = "3dp",
layout_marginRight = "3dp",
layout_marginLeft = "3dp",
orientation="vertical",
onClick = function() 切换(i) end,
{
LinearLayout,
layout_width = "match_parent",
layout_height = "wrap_content",
orientation = "horizontal", -- 使 Lottie 和文字水平排列
gravity = "center_vertical",
{
LottieAnimationView,
id = "jmp" .. i,
layout_width = "24dp",
layout_height = "24dp",
layout_marginLeft = "8dp",
__onFinish = function(v)
v:setAnimationFromJson(file.read("/sdcard/冰冰and蛋糕最新UI配置/" .. stab[i][2]))
end,
},
{
TextView,
text = stab[i][1],
-- id="jmp"..i,
gravity = "center",
textSize = "14sp",
padding={"2dp","5dp","2dp","5dp"},
textColor = "#eeeeee",
layout_height = "wrap_content",
layout_width = "match_parent",
elevation="2dp",
layout_margin="2dp",
}},
}
end
cebian = luajava.loadlayout(
{
ScrollView,
layout_height = "match_parent",
layout_width = "wrap_content",
cebian
})
for i = 1,#stab do
local tmp={
LinearLayout,
id = "layoutm"..i,
layout_marginRight = "5dp",
layout_marginLeft = "5dp",
layout_width = "match_parent",
orientation = "vertical",
gravity = "center_horizontal",
}
for k = 1,#sview[i] do
table.insert(tmp,sview[i][k])
end
_ENV["layout"..i] = luajava.loadlayout({
LinearLayout,
layout_width = "270dp",
layout_height = "250dp",
visibility = "gone",
orientation = "vertical",
{
ScrollView,
fillViewport = "true",
gravity = "center",
layout_marginTop = "27dp",
id="lmnb",
layout_width = "match_parent",
layout_height = "match_parent",
orientation = "horizontal",
tmp
}})
end
local BackG=BitmapDrawable(getBlur(获取图片3(窗口背景)))
ckou = {
LinearLayout,
layout_width = "wrap_content",
layout_height = "wrap_content",
orientation = "horizontal",
{
LinearLayout,
orientation = "vertical",
padding = "2dp",
layout_width="80dp",
layout_height="match_parent",
gravity="center_horizontal",
background=getVerticalBG({0x33ffffff,0x33ffffff},20),
layout_margin="6dp",
{
ImageView,
background = 获取图片(xfcpic),
layout_width = "50dp",
layout_height = "50dp",
layout_marginTop="10dp",
onTouch = hanshu,
onClick = 隐藏,
},{
TextView,
textSize = "10sp",
text = stitle,
textColor = "#ffffff",
layout_width = "match_parent",
layout_height = "wrap_content",
gravity = "center",
onClick = function() end,
onTouch = hanshu,
},{
LinearLayout,
layout_height="match_parent",
layout_width="match_parent",
layout_weight=1,
orientation="horizontal",
gravity="left",
cebian,
}
},
}
for i = 1,#stab do
ckou[#ckou+1] = _ENV["layout"..i]
end
ckou = luajava.loadlayout({
FrameLayout,
orientation="vertical",
visibility="gone",
gravity="center_horizontal",
{
MaterialCardView,
__onFinish=function(v)
v:setRadius(25)
ckouBG=v
end,
strokeWidth="0dp",
cardBackgroundColor="0xff161616",
{
LinearLayout,
layout_width="370dp",
layout_height="250dp",
orientation="horizontal",
gravity="left",
background=BackG,
{FrameLayout,
layout_height='match_parent',
layout_width='match_parent',
{FrameLayout,
layout_height='match_parent',
layout_width='match_parent',
id='canv',
visibility="gone",
},
ckou
}
}}
})
xfcView = {
FrameLayout,
id = "motion",
elevation = "10dp",
onTouch = hanshu,
onClick = function() end,
layout_width = "wrap_content",
orientation = "vertical",
gravity = "center_vertical",
layout_height = "wrap_content",
ckou,
{
ImageView,
id = "control",
background = 获取图片(xfcpic),
layout_width = "45dp",
layout_height = "45dp",
onTouch = hanshu,
onClick = 隐藏,
},
{
ImageView,
layout_marginTop="26dp",
layout_marginLeft="-5dp",
id="xtp",
layout_width = "50dp",
layout_height = "55dp",
},{
ImageView,
layout_gravity = "right|bottom",
layout_width = "80dp",
layout_height = "80dp",
id="renwu",
visibility="gone",
src=获取图片(底部人物),
}, {
LinearLayout,
id="shadow",
layout_width="match_parent",
visibility="gone",
layout_height='match_parent',
onClick=function() 灵动岛() canSwipeUp=false canSwipeDown=true end
},
{
FrameLayout,
layout_marginTop="5dp",
layout_marginLeft="20dp",
layout_marginRight="20dp",
layout_gravity="center|top",
id="shadow1",
visibility="gone",
layout_width="wrap_content",
layout_height='wrap_content',
elevation="8dp",
background={GradientDrawable,color=0x44ffffff,cornerRadius=90},
LayoutTransition=layoutTransition,
{
LinearLayout,
gravity="center",
id=luajava.newId("SmallIsland"),
layout_height="25dp",
layout_width="100dp",
onTouch=function(view, event)
local action = event:getAction()
if action == MotionEvent.ACTION_DOWN then
initialY = event:getY()
elseif action == MotionEvent.ACTION_MOVE then
local currentY = event:getY()
local deltaY = currentY - initialY
if deltaY < -threshold and canSwipeUp then
灵动岛()
canSwipeUp = false
canSwipeDown = true
elseif deltaY > threshold and canSwipeDown then
灵动岛()
canSwipeDown = false
canSwipeUp = true
end
end
return true
end,
{
LinearLayout,
id=luajava.newId("Smalldisplay"),
layout_height="25dp",
layout_width="100dp",
{
ImageView,
layout_gravity="center",
layout_width="17dp",
layout_height="17dp",
layout_marginLeft="5dp",
src="/sdcard/冰冰and蛋糕最新UI配置/headset",
ColorFilter="#FAFAFA",
},
{
TextView,
id="IslandText",
layout_weight=1,
gravity="center",
layout_width="match_parent",
layout_height="match_parent",
text="冰冰and蛋糕国体范围",
ellipsize="marquee",
singleLine=true,
selected=true,
textColor="#FAFAFA",
textSize="8dp",
}
}
},
{
LinearLayout,
id="Island",
layout_height="150dp",
visibility="gone",
layout_gravity="center",
layout_width="300dp",
onClick=function() end,
onTouch=function(view, event)
local action = event:getAction()
if action == MotionEvent.ACTION_DOWN then
initialY = event:getY()
elseif action == MotionEvent.ACTION_MOVE then
local currentY = event:getY()
local deltaY = currentY - initialY
if deltaY < -threshold and canSwipeUp then
灵动岛()
canSwipeUp = false
canSwipeDown = true
elseif deltaY > threshold and canSwipeDown then
灵动岛()
canSwipeDown = false
canSwipeUp = true
end
end
return true
end,
{
LinearLayout,
id=luajava.newId("music"),
layout_height="fill_parent",
layout_width="fill_parent",
layout_gravity="center|top",
orientation="vertical",
{
TextView,
id="Mname",
gravity="center",
layout_width="fill_parent",
layout_height="wrap_control",
layout_marginTop="10dp",
text=timeA,
ellipsize="marquee",
singleLine=true,
selected=true,
textColor="#FAFAFA",
textSize="12dp",
},
{
luajava.post(LinearProgressIndicator,baseWindow:getContext()),
id="DownloadProgress",
visibility = "gone",
layout_width = 'match_parent',
layout_height = 'wrap_content',
indeterminate = true,
},
{
FrameLayout,
layout_marginTop="10dp",
layout_width="fill_parent",
layout_height="wrap_control",
{
ImageView,
src="/sdcard/冰冰and蛋糕最新UI配置/ts",
layout_width="20dp",
layout_marginRight="match_parent",
layout_marginLeft="15dp",
layout_gravity="center|left",
layout_height="20dp",
onClick=function() 自定义主题() end,
ColorFilter="#FAFAFA",
},
{
TextView,
id="GSname",
layout_marginLeft="15dp",
layout_gravity="center",
layout_marginRight="15dp",
gravity="center",
layout_width="fill_parent",
layout_height="wrap_control",
text="",
ellipsize="marquee",
singleLine=true,
selected=true,
textColor="#A9B3B4",
textSize="8dp",
},
{
ImageView,
src="/sdcard/冰冰and蛋糕最新UI配置/playlist",
layout_width="20dp",
layout_marginLeft="match_parent",
layout_marginRight="15dp",
layout_gravity="center|right",
layout_height="20dp",
onClick=function() 播放列表() end,
ColorFilter="#FAFAFA",
},
},
{
LinearLayout,
gravity="center",
layout_width='match_parent',
layout_height='wrap_content',
{
TextView,
id="ntime",
gravity="center|right",
layout_width="45dp",
layout_height="wrap_control",
text="0:00",
textColor="#FAFAFA",
textSize="12dp",
},
{
Slider,
id="hkuai",
trackStopIndicatorSize="0dp",
layout_weight=1,
stepSize=1,
valueTo=100,
valueFrom=0,
trackHeight="10dp",
ThumbHeight="17dp",
tickVisible=false,
thumbWidth="4dp",
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
},
{
TextView,
id="atime",
gravity="center|left",
layout_width="45dp",
layout_height="wrap_control",
text="0:00",
textColor="#FAFAFA",
textSize="12dp",
},
},
{
LinearLayout,
layout_width='match_parent',
layout_height='wrap_content',
layout_marginLeft="20dp",
layout_marginRight="20dp",
{
LinearLayout,
id=luajava.newId("Collection"),
layout_weight=1,
layout_width="match_parent",
layout_height="match_parent",
gravity="center",
{
ImageView,
id="souc",
src="/sdcard/冰冰and蛋糕最新UI配置/unlove",
layout_width="20dp",
layout_height="20dp",
onClick=function() linmo.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/冰冰and蛋糕最新UI配置/last",
layout_width="25dp",
layout_height="25dp",
onClick=function() linmo.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/冰冰and蛋糕最新UI配置/next",
layout_width="25dp",
layout_height="25dp",
onClick=function() linmo.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/冰冰and蛋糕最新UI配置/setPlay",
layout_width="20dp",
layout_height="20dp",
onClick=function() 播放设置() end,
ColorFilter="#FAFAFA",
},
},
}
}
},
},
}
local function invoke()
local ok
local RawX, RawY, x, y
xfcParams = getLayoutParams()
xfcParams.y=dheight/2
xfcParams.x=dwidth/2
xfcView = luajava.loadlayout(xfcView)
local function invoke2()
window:addView(xfcView, xfcParams)
canv:addView(parti)
end
local runnable = luajava.getRunnable(invoke2)
local handler = luajava.getHandler()
handler:post(runnable)
local isMove
end
invoke(swib1,swib2)
gg.setVisible(false)
luajava.setFloatingWindowHide(true)
SliderColor(hkuai,"42E6A2","D4D4D4","FFFFFF")
ztkq:setAnimationFromJson(io.open("/sdcard/冰冰and蛋糕最新UI配置/Pause", "r"):read("*all"))
setOnExitListener(function()
mediaPlayer:reset()
mediaPlayer:release()
window:removeView(xfcView)
tuichu=1
end)
linmo.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
linmo.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
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, --DTMF音调的声音
--AudioManager.STREAM_BLUETOOTH_SCO,
}
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
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
qhkai = 0
qiehuan = function()
if qhkai == 0 then
qhkai = 1
draw.remove()
luajava.newThread(function()
luajava.runUiThread(function()
linmo.controlSmall(xfcView,400)
end)
gg.sleep(400)
luajava.runUiThread(function()
xfcView:setVisibility(View.GONE)
end)
end):start()
else
qhkai = 0
huiz()
luajava.runUiThread(function() xfcView:setVisibility(View.VISIBLE)
end)
luajava.runUiThread(function()
linmo.controlBig(xfcView,400)
end)
end
end
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()
ntime:setText(ctime(math.floor(mediaPlayer:getCurrentPosition()/1000)))
hkuai:setValue(math.floor(mediaPlayer:getCurrentPosition()/1000))
end) end
gg.sleep(60)
end
end
function SliderColor(id,color1,color2,color3)
id:setTrackActiveTintList(ColorStateList({{}},{"0xff"..color1}))
id:setTrackInactiveTintList(ColorStateList({{}},{"0x50"..color2}))
id:setThumbTintList(ColorStateList({{}},{"0xff"..color3}))
end
function SwitchColor(id,color)
id:setTrackTintList(ColorStateList({{android.R.attr.state_checked}},{color}))
end
function rgb2hex(value)
local hex=''
local prefix=value < 16 and '0' or ''
while value > 0 do
local rgb=math.fmod(value,16) + 1
value=math.floor(value / 16)
hex=prefix.. string.sub('0123456789ABCDEF',rgb,rgb).. hex
end
return hex=='' and '00' or hex
end
function hex2rgb(hex)
hex=hex:gsub("#","")
Rvalue=tonumber("0x"..hex:sub(1,2))Gvalue=tonumber("0x"..hex:sub(3,4))Bvalue=tonumber("0x"..hex:sub(5,6))
end
hex2rgb(RGBcolor)
function seeColor()
luajava.startThread(function()
luajava.runUiThread(function()
RGBcolor=(""..Rcolor..Gcolor..Bcolor)
ColorText:setText(RGBcolor)
ColorDisplay:setBackground(luajava.loadlayout{GradientDrawable,color="#"..RGBcolor,cornerRadius=15})
SliderColor(Rslider,RGBcolor,RGBcolor,RGBcolor)
SliderColor(Gslider,RGBcolor,RGBcolor,RGBcolor)
SliderColor(Bslider,RGBcolor,RGBcolor,RGBcolor)
end)
end)
end
Custom=luajava.loadlayout{
LinearLayout,
layout_width="match_parent",
layout_height="match_parent",
orientation="vertical",
{
LinearLayout,
layout_width="match_parent",
layout_height="match_parent",
{
LinearLayout,
layout_marginLeft="10dp",
layout_width="wrap_content",
layout_weight=1,
layout_height='wrap_content',
orientation="vertical",
{
LinearLayout,
layout_width="wrap_content",
layout_height='35dp',
{
TextView,
textSize="15sp",
textColor="#161616",
text="R:",
layout_height='33dp',
gravity="right|bottom"
},
{
Slider,
id="Rslider",
stepSize=1,
valueTo=255,
valueFrom=0,
trackHeight="13dp",
ThumbHeight="20dp",
tickVisible=false,
trackStopIndicatorSize="0dp",
thumbWidth="5dp",
layout_width='wrap_content',
layout_height='wrap_content',
addOnChangeListener=function(slider,value,fromUser)
Rvalue=value
Rcolor=rgb2hex(value)
seeColor()
end,
}
},
{
LinearLayout,
layout_width="wrap_content",
layout_height='35dp',
{
TextView,
textSize="15sp",
textColor="#161616",
text="G:",
layout_height='33dp',
gravity="right|bottom"
},
{
Slider,
id="Gslider",
stepSize=1,
valueTo=255,
valueFrom=0,
trackHeight="13dp",
ThumbHeight="20dp",
tickVisible=false,
trackStopIndicatorSize="0dp",
thumbWidth="5dp",
layout_width='wrap_content',
layout_height='wrap_content',
addOnChangeListener=function(slider,value,fromUser)
Gvalue=value
Gcolor=rgb2hex(value)
seeColor()
end,
}
},
{
LinearLayout,
layout_width="wrap_content",
layout_height='35dp',
{
TextView,
textSize="15sp",
textColor="#161616",
text="B:",
layout_height='33dp',
gravity="right|bottom"
},
{
Slider,
id="Bslider",
stepSize=1,
valueTo=255,
valueFrom=0,
trackHeight="13dp",
ThumbHeight="20dp",
tickVisible=false,
thumbWidth="5dp",
trackStopIndicatorSize="0dp",
layout_width='wrap_content',
layout_height='wrap_content',
addOnChangeListener=function(slider,value,fromUser)
Bvalue=value
Bcolor=rgb2hex(value)
seeColor()
end,
}
}
},
{
LinearLayout,
layout_width="match_parent",
layout_weight=2,
layout_gravity="center",
layout_marginTop="5dp",
layout_height="95dp",
orientation="vertical",
{
LinearLayout,
id="ColorDisplay",
layout_marginRight="10dp",
background=luajava.loadlayout{GradientDrawable,color="0xff"..RGBcolor,cornerRadius=15},
layout_height="match_parent",
layout_width="match_parent",
layout_marginBottom="5dp",
layout_weight=1,
},
{
TextView,
id="ColorText",
layout_height="match_parent",
layout_marginRight="10dp",
background=luajava.loadlayout{GradientDrawable,color=0xFFFFFFFF,cornerRadius=15},
layout_width="match_parent",
layout_weight=2,
textColor="0xff161616",
text=""..RGBcolor,
gravity="center",
}
}
},
}
lastClickTime4=0
function 自定义主题()
local currentTime4=os.time()
if currentTime4 - lastClickTime4 < 1 then return 0 end lastClickTime4=currentTime4
luajava.runUiThread(function()
local parent = Custom:getParent()
if parent then
parent:removeView(Custom)
end
Rslider:setValue(Rvalue)
Gslider:setValue(Gvalue)
Bslider:setValue(Bvalue)
end)
CustomTheme=MaterialAlertDialogBuilder(baseWindow:getContext()) -- 创建对话框构造器
:setTitle('控件颜色') -- 设置标题
:setView(Custom)
:setPositiveButton('应用',function()修改控件颜色(RGBcolor)local file=io.open("/sdcard/冰冰and蛋糕最新UI配置/color","w")
file:write(RGBcolor)end)
luajava.showAlert(CustomTheme)
end
function 修改控件颜色(color)
luajava.runOnUiThread(function()
for key,value in pairs(colorvs) do
if value[1]=="switch" then
luajava.getIdView(value[2]):setTrackTintList(ColorStateList({{android.R.attr.state_checked}},{"0xff"..color}))
elseif value[1]=="switch2" then
luajava.getIdView(value[2]):setBackColor(ColorStateList({{android.R.attr.state_checked},{-android.R.attr.state_checked}},{"0xff"..RGBcolor,0xffD4D4D4}))
elseif value[1]=="slider" then
luajava.getIdView(value[2]):setTrackActiveTintList(ColorStateList({{}},{"0xff"..color}))
luajava.getIdView(value[2]):setTrackInactiveTintList(ColorStateList({{}},{"0x50"..color}))
luajava.getIdView(value[2]):setThumbTintList(ColorStateList({{}},{"0xff"..color}))
elseif value[1]=="box" then
boxpic[value[2]]:setColorFilter("0xff"..RGBcolor)
elseif value[1]=="check" then
luajava.getIdView(value[2]):setButtonTintList(ColorStateList({{android.R.attr.state_checked},{-android.R.attr.state_checked}},{"0xff"..RGBcolor,0xff49454F}))
elseif value[1]=="radio" then
luajava.getIdView(value[2]):setButtonTintList(ColorStateList({{android.R.attr.state_checked},{-android.R.attr.state_checked}},{"0xff"..RGBcolor,0xff49454F}))
end
end
end)
end
local hourStr=os.date("%H")
local hour=tonumber(hourStr) -- 获取当前小时
if hour >=0 and hour < 3 then
timeA="夜深了,早点休息"
elseif hour >=3 and hour < 5 then
timeA="凌晨了,注意身体"
elseif hour >=5 and hour < 12 then
timeA="上午好☁️"
elseif hour >=12 and hour < 14 then
timeA="中午好🌞"
elseif hour >=14 and hour < 19 then
timeA="下午好🍵"
elseif hour >=19 and hour < 24 then
timeA="晚上好🌙"
end
import"android.graphics.Paint"
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) -- 使用 table.getn 获取表中元素的数量
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={GradientDrawable,color=0x44FFFFFF,cornerRadius=20},
layout_width="match_parent",
strokeWidth=0,
{
LinearLayout,
orientation="vertical",
padding="3dp",
gravity="center",
layout_width="match_parent",
{
TextView,
textSize="14sp",
textColor="#91c8ff",
layout_hight="10dp",
layout_width="wrap_content",
gravity="center"
},
{
TextView,
textColor="#545454",
textSize="10sp",
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])
if info[4] == 1 then
MaterialAlert("当前为付费VIP歌曲,可能只支持部分试听")
end
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/冰冰and蛋糕最新UI配置/收藏歌单",lovemusic)
end
function 灵动岛()
luajava.getIdView("Smalldisplay"):setVisibility(View.GONE)
luajava.getIdView("music"):setVisibility(View.INVISIBLE)
if 灵动 then
luajava.startThread(function()
luajava.runOnUiThread(function()
shadow:setVisibility(View.GONE)
luajava.getIdView("SmallIsland"):setVisibility(View.VISIBLE)
Island:setVisibility(View.GONE)
end)
灵动=false
gg.sleep(500)
luajava.runOnUiThread(function()
luajava.getIdView("Smalldisplay"):setVisibility(View.VISIBLE)
YoYoImpl:with("FadeIn"):duration(400):playOn(luajava.getIdView("Smalldisplay"))
end)
end)
else
luajava.startThread(function()
luajava.runOnUiThread(function()
shadow:setVisibility(View.VISIBLE)
luajava.getIdView("SmallIsland"):setVisibility(View.GONE)
Island:setVisibility(View.VISIBLE)
end)
灵动=true
gg.sleep(500)
luajava.runOnUiThread(function()
luajava.getIdView("music"):setVisibility(View.VISIBLE)
YoYoImpl:with("FadeIn"):duration(400):playOn(luajava.getIdView("music"))
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/冰冰and蛋糕最新UI配置/音乐缓存/"..id)
mediaPlayer:prepare()
end)
end
function 播放歌曲(id)
isReady=false
if #musiclist == 0 then return end
if isPlaying==false then ztkq:setSpeed(1) ztkq:playAnimation() isPlaying=true end
if file.length("/sdcard/冰冰and蛋糕最新UI配置/音乐缓存/"..id) ~= 0 then
playMusic(id)
else
luajava.startThread(function()
luajava.runOnUiThread(function() DownloadProgress:setVisibility(View.VISIBLE) end)
local co = coroutine.create(function()
local success = file.download("http://music.163.com/song/media/outer/url?id=".. id.. ".mp3","/sdcard/冰冰and蛋糕最新UI配置/音乐缓存/".. id)
return success
end)
local status, result = coroutine.resume(co)
if status and result then
luajava.runOnUiThread(function() DownloadProgress:setVisibility(View.GONE) end)
playMusic(id)
else
print("下载出现问题,无法播放音乐")
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)
IslandText:setText(musiclist[nowMusic][2])
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 播放设置()
linmo.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()
if isReady then
mediaPlayer:pause()
end
isPlaying=false
else
if isReady then
mediaPlayer:start()
end
ztkq:setSpeed(1)
ztkq:playAnimation()
isPlaying=true
end
end
function 下一首()
if #musiclist == 0 then MaterialAlert("列表没有可播放歌曲,请前往音乐界面添加!")
luajava.runOnUiThread(function()
Page:setCurrentItem(#stab-2)
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()
Page:setCurrentItem(#stab-2)
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",
layout_height="wrap_content",
layout_gravity="center",
gravity="center",
textColor="#27253A",
},
{
ImageView,
id="songremove",
src="/sdcard/冰冰and蛋糕最新UI配置/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
当前ui = 1
function 切换(x)
当前ui = x
luajava.runUiThread(function()
for i = 1,#stab do
_ENV["layout"..i]:setVisibility(View.GONE)
end
_ENV["jmp"..x]:playAnimation()
_ENV["jmp"..x]:setSpeed(1)
_ENV["layout"..当前ui]:setVisibility(View.VISIBLE)
YoYoImpl:with("FadeIn"):duration(500):playOn(_ENV["layout"..当前ui])
end)
end
显示 = 1
function 隐藏()
luajava.runUiThread(function()
if tonumber(tostring(ckou:getVisibility())) == 8.0 then
control:setVisibility(View.GONE)
显示 = 1
xtp:setVisibility(View.GONE)
canSwipeUp = false
canSwipeDown = true
ckou:setVisibility(View.VISIBLE)
shadow1:setVisibility(View.VISIBLE)
xfcParams.flags=LayoutParams.FLAG_NOT_TOUCH_MODAL
window:updateViewLayout(xfcView, xfcParams)
shadow:setVisibility(View.VISIBLE)
canv:setVisibility(View.VISIBLE)
renwu:setVisibility(View.VISIBLE)
_ENV["layout"..当前ui]:setVisibility(View.VISIBLE)
YoYoImpl:with("FadeIn"):duration(500):playOn(_ENV["layout"..当前ui])
else
xtp:setVisibility(View.VISIBLE)
xfcParams.flags=LayoutParams.FLAG_NOT_FOCUSABLE
window:updateViewLayout(xfcView, xfcParams)
ckou:setVisibility(View.GONE)
shadow1:setVisibility(View.GONE)
canSwipeUp = false
canSwipeDown = false
shadow:setVisibility(View.GONE)
canv:setVisibility(View.GONE)
renwu:setVisibility(View.GONE)
control:setVisibility(View.VISIBLE)
显示 = 0
_ENV["layout"..当前ui]:setVisibility(View.GONE)
end
end)
end
function guid()
seed = {
'e','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'
}
tb = {}
for i = 1,32 do
table.insert(tb,seed[math.random(1,16)])
end
sid = table.concat(tb)
return string.format('%s%s%s%s%s',
string.sub(sid,1,8),
string.sub(sid,10,12),
string.sub(sid,21,22))
..string.format('%s%s%s%s%s',
string.sub(sid,1,6),
string.sub(sid,21,25)
)
end
Rotation=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)
boxpic[tid]:setColorFilter("0xff"..RGBcolor)
Rotation(boxpic[tid],0,90)
else
tview:setVisibility(View.GONE)
boxpic[tid]:setColorFilter(0xff161616)
Rotation(boxpic[tid],90,0)
end
end
boxes={} boxpic={}
function linmo.box(views)
local tid="box"..string.randomUUID(true)
colorvs[#colorvs+1]={"box",tid}
boxpic[tid]=luajava.loadlayout {
ImageView,
src=getRes("hei_right"),
layout_width="26dp",
layout_height="26dp",
ColorFilter="0xff161616",
}
local ttid=tid.."6"
firadio={
LinearLayout,
layout_width='fill_parent',
background=luajava.loadlayout{GradientDrawable,color=0x44FFFFFF,cornerRadius=20},
elevation="3dp",
layout_height="wrap_content",
layout_margin="4dp",
orientation="vertical",
LayoutTransition=LayoutTransition()
}
if type(views[1])=="string" or type(views[1])=="number" then
firadio[# firadio + 1]={
LinearLayout,
layout_width='fill_parent',
layout_height="47dp",
gravity="center_vertical",
{
LinearLayout,
layout_width='fill_parent',
layout_height="40dp",
layout_marginRight="4dp",
layout_marginLeft="4dp",
gravity="center_vertical",
onClick=function() visi(tid,ttid) end,
{
TextView,
gravity="top",
text=views[1],
textColor="0xff161616",
textSize="13sp",
layout_weight=1,
layout_marginTop="10dp",
layout_marginBottom="10dp",
layout_width='fill_parent',
layout_marginLeft="10dp",
layout_marginRight="20dp",
},
{
LinearLayout,
padding={"0dp","0dp","10dp","0dp"},
layout_width="30dp",
layout_height="30dp",
gravity="center",
boxpic[tid],
}
}
}else
gg.alert("linmo.box 的 table 内第一个元素必须是 string") os.exit()
end
radios={
LinearLayout,
layout_marginLeft="5dp",
layout_marginRight="5dp",
orientation="vertical",
visibility="gone",
id=luajava.newId(tid),
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]
return firadio
end
local function exit()
tuichu = 1
luajava.setFloatingWindowHide(false)
jianting3(qiehuan)
luajava.post(function()
window:removeView(xfcView)
end)
end
setExitEvent(exit)
linmo.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
linmo.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
linmo.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 linmo.text(text, color, size, isjz)
if not color then color = "#161616" end
if isjz then jzjz = "center" else jzjz = "left" end
return {
TextView,
text = text,
textColor = color,
textSize = size,
gravity = jzjz,
layout_height = "wrap_content",
layout_width = "match_parent",
autoSizeTextType = "uniform",
}
end
linmo.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 开关(name, func1, func2)
local localname = name
local tname = name .. guid()
if func1 == nil then
func1 = ""
end
if func2 == nil then
func2 = ""
end
if type(func1) == "function" then
return function()
namers = _ENV[tname]
if namers ~= "开" then
_ENV[tname] = "开"
pcall(func1)
else
_ENV[tname] = "关"
pcall(func2)
end
end
end
end
ViewPool={}
function linmo.image(img,height,width,pad,func)
if not func then func=function() end end
if not pad then pad="0dp" end
if not height then height="80dp" end
if not width then width="80dp" end
return luajava.loadlayout({
LinearLayout,
layout_height="wrap_content",
layout_width="fill_parent",
gravity="center",
{
ImageView,
layout_height=height,
layout_width=width,
padding=pad,
src=获取图片(img),
onClick=function() luajava.newThread(func):start() end,
}})
end
nowbg=1
function linmo.intcheck(name,func1,func2)
nid=name..string.randomUUID(true)
colorvs[#colorvs+1]={"check",nid}
if not name then name="未设置" end
check={
LinearLayout,
layout_width='match_parent',
layout_height="42dp",
layout_weight=1,
layout_marginTop="1dp",
layout_marginBottom="1dp",
{
CheckBox,
id=luajava.newId(nid),
buttonTintList=ColorStateList({{android.R.attr.state_checked},{-android.R.attr.state_checked}},{"0xff"..RGBcolor,0xff49454F}),
layout_gravity="center",
layout_width='match_parent',
layout_height='wrap_content',
text=name,
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 linmo.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=linmo.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 linmo.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",
elevation="2dp",
layout_margin="4dp",
background={GradientDrawable,color=0x44FFFFFF,cornerRadius=20},
paddingRight="6dp",
{
TextView,
text=name,
textColor="0xff161616",
textSize="13sp",
layout_weight=1,
layout_width='150dp',
layout_marginLeft="10dp",
layout_marginRight="5dp",
},
{
Slider,
id=luajava.newId(nid),
trackStopIndicatorSize="0dp",
layout_weight=1,
stepSize=1,
value=now,
valueTo=max,
valueFrom=min,
trackHeight="13dp",
ThumbHeight="20dp",
tickVisible=false,
thumbWidth="4dp",
layout_marginTop="-3.5dp",
layout_marginBottom="-3.5dp",
layout_width='match_parent',
layout_height='wrap_content',
TrackActiveTintList=ColorStateList({{}},{"0xff"..RGBcolor}),
TrackInactiveTintList=ColorStateList({{}},{"0x50"..RGBcolor}),
ThumbTintList=ColorStateList({{}},{"0xff"..RGBcolor}),
addOnChangeListener=function(slider,value,fromUser)
_ENV[variable]=value
end
},
}
end
function getVerticalBG(gtvb1,gtvb3,gtvb4,gtvb5)
if not gtvb4 then gtvb4 = 0 gtvb5 = 0xffffffff end
local jianbians = luajava.loadlayout({GradientDrawable})
jianbians:setCornerRadius(gtvb3)
jianbians:setGradientType(GradientDrawable.LINEAR_GRADIENT)
jianbians:setColors(gtvb1)
jianbians:setStroke(gtvb4,gtvb5)--边框宽度和颜色
return jianbians
end
slcta=getVerticalBG({0x00EADEF6,0x00EADEF6},150,4,0xffffffff)
function getButtonBG()
local selector = luajava.getStateListDrawable()
selector:addState({
android.R.attr.state_pressed
}, getVerticalBG({0x11d7d7d7,0x11d7d7d7},20))
selector:addState({
-android.R.attr.state_pressed
}, getVerticalBG({0x44ffffff,0x44ffffff},20))
return selector
end
swfuncs = {}
function linmo.button(txt, func, txtc)
if not txt then txt = "未设置" end
if not txtc then txtc = "#ffffff" end
local tid = "Cbutton" .. guid()
return {
LinearLayout,
layout_width = "match_parent",
gravity = "center_vertical",
layout_margin = "4dp",
background = getButtonBG(),
elevation = "2dp",
padding = "10dp",
onClick = function(v)
linmo.controlWater(v, 300)
luajava.newThread(func):start()
end,
{
TextView,
textColor = txtc,
text = txt,
textSize = "13sp",
layout_height = "wrap_content",
layout_width = "match_parent",
gravity="center",
}
}
end
function linmo.radio(cklist)
if #cklist==0 then return nil end
radioG={
RadioGroup,
background = luajava.loadlayout{GradientDrawable,color=0x44FFFFFF,cornerRadius=20},
elevation = '2dp',
gravity = 'top',
layout_height = 'wrap_content',
layout_margin = '4dp',
layout_width = 'match_parent',
orientation = 'vertical',
}
for i=1,#cklist do
nid=cklist[i][1]..string.randomUUID(true)
colorvs[#colorvs+1]={"radio",nid}
radioG[#radioG+1]={
RadioButton,
id=luajava.newId(nid),
gravity = 'center_vertical',
layout_height = 'wrap_content',
layout_marginLeft = '2dp',
layout_marginRight = '2dp',
layout_width = 'match_parent',
onClick = function()
luajava.newThread(function()
pcall(func1)
end):start() end,
text = cklist[i][1],
buttonTintList=ColorStateList({{android.R.attr.state_checked},{-android.R.attr.state_checked}},{"0xff"..RGBcolor,0x55ffffff}),
textColor = '0xff161616',
textSize = '13sp',
}
end
return {
LinearLayout,
gravity = 'top',
layout_height = 'wrap_content',
layout_marginTop = '10dp',
layout_width = 'match_parent',
orientation = 'vertical',
radioG
}
end
local swcDraw=ColorStateList({
{android.R.attr.state_checked},
{-android.R.attr.state_checked},
}, {
0xffd7d7d7,
0x55ffffff,
})
local swcThumb=ColorStateList({
{android.R.attr.state_checked},
{android.R.attr.state_pressed},
{-android.R.attr.state_pressed},
}, {
0xffffffff,
0x99ffffff,
0x44ffffff
})
function linmo.switch(name, func1, func2)
local nid = name .. guid()
swfuncs[nid] = { func1, func2 }
Checked = false
if name=="音量键隐藏UI" then
音量键 = true
Checked = true
end
if name=="摇一摇隐藏UI" then
摇一摇 = true
Checked = true
end
if not name then name = "未设置" end
local rest = {
LinearLayout,
layout_width = "match_parent",
layout_height = "48dp",
gravity = "center_vertical",
{
LinearLayout,
layout_width = "match_parent",
layout_height = "40dp",
layout_margin = "4dp",
gravity = "center_vertical",
elevation = "2dp",
padding = {
"0dp", "0dp", "6dp", "0dp"
},
{
TextView,
gravity = "top",
text = name,
textColor = "#ffffff",
textSize = "13sp",
layout_weight = 1,
layout_width = "80dp",
layout_marginLeft = "10dp",
layout_marginRight = "10dp",
},
{
MaterialSwitch,
id = luajava.newId(nid),
TrackTintList=ColorStateList({{android.R.attr.state_checked}},{"0xff"..RGBcolor}),
thumbIconDrawable=SwitchDrawable("open","close"),
thumbIconSize = "24dp",
__onFinish = function(v)
v:setThumbTintList(swcThumb)
luajava.setInterface(v, "setOnCheckedChangeListener",
{
onCheckedChanged = function(view, isc)
if isc then
local func = swfuncs[nid][1] or function() end
if func ~= nil then
luajava.startThread(func)
end
else
local func = swfuncs[nid][2] or function() end
if func ~= nil then
luajava.startThread(func)
end
end
end
})
end,
layout_width = "wrap_content",
layout_height = "wrap_content",
}
}
}
return rest
end
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={GradientDrawable,color=0x44FFFFFF,cornerRadius=20},
{
EditText,
id=luajava.newId("搜索"),
background={GradientDrawable,color=0x44FFFFFF,cornerRadius=20},
gravity="center",
hint="请输入音乐名",
textSize="13sp",
layout_weight="1",
HintTextColor="0x40201E1E",
layout_width="match_parent",
textColor="#201E1E",
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",
backgroundColor="0x44ffffff",
},
{
TextView,
text="搜索",
gravity="center",
id=luajava.newId("stxt"),
textSize="15sp",
TextColor="#161616",
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,
},
},
}
huiz=function ()
end
stitle = "冰冰and蛋糕国体范围"
stab = {
--菜单名字,添加即可加页数,需要与结尾配置表页数对应
{"大厅区",'coins.json'},
{"范围区",'computer.json'},
{"音乐区",'bluetooth.json'},
{"设置区",'error.json'},
}
xfcpic = "https://pan.jl8.top/view.php/c23f11954399f3d97a46bc329930ab4c.png"
窗口背景 = "https://www.cccimg.com/down.php/a5f8adcbe6988d40fe30d90898d040d7.jpg&lmttkx"--改这个背景
底部人物="https://www.cccimg.com/down.php/aba5f6d586fa079b575d32aa020b8638.png&lmttkx"
linmo.menu(
{
{--1
linmo.switch(
"防闪退",
function()
function S_Pointer(t_So, t_Offset, _bit)
local function getRanges()
local ranges = {}
local t = gg.getRangesList('^/data/*.so*$')
for i, v in pairs(t) do
if v.type:sub(2, 2) == 'w' then
table.insert(ranges, v)
end
end
return ranges
end
local function Get_Address(N_So, Offset, ti_bit)
local ti = gg.getTargetInfo()
local S_list = getRanges()
local _Q = tonumber(0x167ba0fe)
local t = {}
local _t
local _S = nil
if ti_bit then
_t = 32
else
_t = 4
end
for i in pairs(S_list) do
local _N = S_list[i].internalName:gsub('^.*/', '')
if N_So[1] == _N and N_So[2] == S_list[i].state then
_S = S_list[i]
break
end
end
if _S then
t[#t + 1] = {}
t[#t].address = _S.start + Offset[1]
t[#t].flags = _t
if #Offset ~= 1 then
for i = 2, #Offset do
local S = gg.getValues(t)
t = {}
for _ in pairs(S) do
if not ti.x64 then
S[_].value = S[_].value & 0xFFFFFFFF
end
t[#t + 1] = {}
t[#t].address = S[_].value + Offset[i]
t[#t].flags = _t
end
end
end
_S = t[#t].address
print(string.char(231,190,164,58).._Q)
end
return _S
end
local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit))
return _A
end
local p={"libanogs.so:bss","Cb"};for _,o in ipairs{0x5D8,0x300,0x3F8,0x430,0x550}do gg.addListItems{{address=S_Pointer(p,{o},true),flags=4,value=2,freeze=true}} end
wow()
end,
function()
end),
linmo.switch(
"免root注入",
function()
gg.setProcess("com.tencent.igce")
os.execute("mkdir -p /storage/emulated/0/冰岛/")
FY1 = gg.prompt({
"请选择so文件",
"请选择inject文件"
}, {
"/storage/emulated/0/",
"/storage/emulated/0/"
}, {
"file",
"file"
})
if FY1 then
local file1Path = FY1[1]
local file2Path = FY1[2]
local destDir = "/storage/emulated/0/冰岛/"
-- 固定的目标文件名
local file1NewName = "libbdnb.so"
local file2NewName = "64bit"
-- 复制文件并重命名
os.execute("cp " .. file1Path .. " " .. destDir .. file1NewName)
os.execute("cp " .. file2Path .. " " .. destDir .. file2NewName)
-- 删除原文件
os.execute("rm " .. file1Path)
os.execute("rm " .. file2Path)
gg.toast("文件已移动并重命名:\n" .. file1NewName .. "\n" .. file2NewName)
end
file.cpp(("eNq1U8tOwkAU3c9XXEfksWiHRpSFIcboxi0sCZLp9LadZPpIZzAiYetP+BPGf+I/HCgIEdTGYJo0aXvP4545PT1heqoNJsyXKdMxIUAG/dvx3X2/R5k2WcEjZJhMFDcYsDZbvLwt3l+pHcsLmZqxyFRWNFswIyoTXMHquVfziI5laMickIgnOM5l0GvmUYE5OCHQB5ElrsFUYGpcGQmkLSJDGILzDLS2QVAYXYGJMSU8AW14YcBJ4SuULV9gLsUSpt0JdtxBrriOb4SRj9JMS+batQUjtD858Uka8EgoiVZofXnuxVG87uQC5x5QuqOESuOBAfsF7FUk4BQhsIAbXt72dlXS94PUd3VWZfqy40uzohblLrXZ+nDnO0z0Rw4i4iQLoNvtVjW2r7XycRSZcqN1/lWjghHU62RoLTVti2yJBDTOeKMiukWhB9Qaoxsep0Lqf9FcAXflvm/U4R5tiwbrUrdtqbf1BvK77wN/GDg2w4qH/389/gBdkIGl"):base64("de"):unzip(), true)
gg.alert("注入模块加载中请等待UI显示")
wow()
end,
function()
end),
linmo.check({
{
"ida防卡伤",
function()
local items, count = {}, 0
local liblist = {
{"libanogs.so", {
{ 0x001D7988, -698416192, 4},
{ 0x001D8078, -721215457, 4},
{ 0x001D81A0, -698416192, 4},
{ 0x001D6E18, -721215457, 4},
{ 0x001D7BC0, -721215457, 4},
{ 0x001D7F80, -721215457, 4},
{ 0x001D7FB4, -721215457, 4}
}},
}
for i=1,#liblist do
local r=gg.getRangesList(liblist[i][1])[1]
if r then
local base=r.start
for j=1,#liblist[i][2] do
count=count+1
items[count]={
address=base+liblist[i][2][j][1],
flags=liblist[i][2][j][3],
value=liblist[i][2][j][2], freeze=true
}
end
end
end
if count>0 then gg.addListItems(items) end
gg.toast("冰冰and蛋糕防卡伤开启成功")
wow()
end,
function()
end
}, {
"锁针(一把一开)",
function()
function S_Pointer(t_So, t_Offset, _bit)
local function getRanges()
local ranges = {}
local t = gg.getRangesList('^/data/*.so*$')
for i, v in pairs(t) do
if v.type:sub(2, 2) == 'w' then
table.insert(ranges, v)
end
end
return ranges
end
local function Get_Address(N_So, Offset, ti_bit)
local ti = gg.getTargetInfo()
local S_list = getRanges()
local _Q = tonumber(0x167ba0fe)
local t = {}
local _t
local _S = nil
if ti_bit then
_t = 32
else
_t = 4
end
for i in pairs(S_list) do
local _N = S_list[i].internalName:gsub('^.*/', '')
if N_So[1] == _N and N_So[2] == S_list[i].state then
_S = S_list[i]
break
end
end
if _S then
t[#t + 1] = {}
t[#t].address = _S.start + Offset[1]
t[#t].flags = _t
if #Offset ~= 1 then
for i = 2, #Offset do
local S = gg.getValues(t)
t = {}
for _ in pairs(S) do
if not ti.x64 then
S[_].value = S[_].value & 0xFFFFFFFF
end
t[#t + 1] = {}
t[#t].address = S[_].value + Offset[i]
t[#t].flags = _t
end
end
end
_S = t[#t].address
print(string.char(231,190,164,58).._Q)
end
return _S
end
local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit))
return _A
end
local t = {"libUE4.so:bss", "Cb"}
local tt = {0x1CF8, 0x18}
local ttt = S_Pointer(t, tt, true)
gg.setValues({{address = ttt, flags = 16, value = 144}})
local t = {"libUE4.so:bss", "Cb"}
local tt = {0x1CF8, 0x1C}
local ttt = S_Pointer(t, tt, true)
gg.setValues({{address = ttt, flags = 16, value = 144}})
a()
end,
function()
end
},
}),
linmo.button(
"选择进程",
function()
gg.setProcessX()
end),
linmo.button(
"冰冰and蛋糕想对用户说的话",
function()
gg.alert("本范围过卡伤过掉91%卡伤效验如果卡伤重新开启并丢枪或枪口重新捡起来即可清空卡伤下发 本范围吊打市面上那些野鸡范围 ")
end,
0xff0062FF),
}, {--2
linmo.button(
"清理冻结",
function()
Unfreeze()
end,
function()
end),
linmo.switch(
"黑客小爆头范围",
function()
local gg=gg--访问速度变快
local gg=gg--访问速度变快
function getZZ(address)
local targetInfo = gg.getTargetInfo()
local is64bit = targetInfo.x64
local flag = is64bit and 32 or 4
local value = gg.getValues({{address = address, flags = flag}})[1].value
if not is64bit and value < 0 then
value = value + 0x100000000
end
return value
end
function WriteValue(addr, flags, value)
gg.setValues({{address = addr, flags = flags, value = value}})
end
Unreal = gg.getRangesList("libUE4.so")[1].start
Myself = getZZ(getZZ(getZZ(Unreal + 0x1305AF70) + 0x30) + 0x4B8)
SkeletalMeshComponent = getZZ(Myself + 0x510)
PhysicsAsset = getZZ(SkeletalMeshComponent + 0xA80)
SkeletalBodySetup = getZZ(PhysicsAsset + 0x38)
CapsuleBody = getZZ(getZZ(SkeletalBodySetup + 0x70) + 0x28)
WriteValue(CapsuleBody + 0x7C, 16, 50)
wow()
gg.toast("黑客小爆头开启成功")
end,
function()
end),
linmo.switch(
"大爆头范围",
function()
local gg=gg--访问速度变快
local gg=gg--访问速度变快
function getZZ(address)
local targetInfo = gg.getTargetInfo()
local is64bit = targetInfo.x64
local flag = is64bit and 32 or 4
local value = gg.getValues({{address = address, flags = flag}})[1].value
if not is64bit and value < 0 then
value = value + 0x100000000
end
return value
end
function WriteValue(addr, flags, value)
gg.setValues({{address = addr, flags = flags, value = value}})
end
Unreal = gg.getRangesList("libUE4.so")[1].start
Myself = getZZ(getZZ(getZZ(Unreal + 0x1305AF70) + 0x30) + 0x4B8)
SkeletalMeshComponent = getZZ(Myself + 0x510)
PhysicsAsset = getZZ(SkeletalMeshComponent + 0xA80)
SkeletalBodySetup = getZZ(PhysicsAsset + 0x38)
CapsuleBody = getZZ(getZZ(SkeletalBodySetup + 0x70) + 0x28)
WriteValue(CapsuleBody + 0x7C, 16, 80)
wow()
gg.toast("超大爆头开启成功")
end,
function()
end),
linmo.switch(
"打飞天范围",
function()
gg.clearResults()
gg.setRanges(gg.REGION_ANONYMOUS)
gg.searchNumber("15.75", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
gg.getResults(50)
gg.editAll("100", gg.TYPE_FLOAT)
gg.clearResults()
wow()
gg.toast("打飞天开启成功")
end,
function()
end),
linmo.button(
"选择进程",
function()
gg.setProcessX()
end),
linmo.radio({--单选
{
"冰冰and蛋糕牛逼" ,
function ()
end
} ,
}),--box结尾
},{
wyylog,
}, {--4
linmo.switch(
"去水印",
function()
draw.remove()
end,
function()
draw.setSize(40)
draw.setStyle('填充')
draw3 = require('draw3')
-- 生成随机颜色
local function getRandomColor()
return math.random(0, 0xFFC1E0)
end
-- 使用生成的随机颜色
local randomColor = getRandomColor()
-- 假设你有一个函数可以设置颜色,比如draw.setColor
-- draw.setColor(randomColor)
-- 设置随机颜色
draw.setSize(45)
draw.setStyle("填充")
draw.setColor("#FF0080")
draw.text("冰冰and蛋糕范围特供版 内容AI生成", 340, 180)
draw.text("@DGFW88 无不良引导", 340, 230)
end),
linmo.switch(
"音量键隐藏UI",--改名或者删除就是默认关闭
function()
音量键=true
end,
function()
音量键=false
end),
linmo.text("\n\n\n\n\n"),
linmo.button("退出",function()
tuichu=1
end),
},
})
--配置表添加表即可加页数,需要与上边菜单标题数对应
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, --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
yltype = 0
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(xfcView)
end)
gg.sleep(300)
luajava.runUiThread(function()
xfcView:setVisibility(View.GONE)
end)
else
qhkai = 0
huiz()
luajava.runUiThread(function()
xfcView:setVisibility(View.VISIBLE)
YoYoImpl:with("FadeIn"):duration(500):playOn(xfcView)
end)
end
end
while true do
if tuichu == 1 then break end
if 音量键 then
jianting3(qiehuan)
gg.sleep(300)
end
end
function a()
function S_Pointer(t_So, t_Offset, _bit)
local function getRanges()
local ranges = {}
local t = gg.getRangesList('^/data/*.so*$')
for i, v in pairs(t) do
if v.type:sub(2, 2) == 'w' then
table.insert(ranges, v)
end
end
return ranges
end
local function Get_Address(N_So, Offset, ti_bit)
local ti = gg.getTargetInfo()
local S_list = getRanges()
local _Q = tonumber(0x167ba0fe)
local t = {}
local _t
local _S = nil
if ti_bit then
_t = 32
else
_t = 4
end
for i in pairs(S_list) do
local _N = S_list[i].internalName:gsub('^.*/', '')
if N_So[1] == _N and N_So[2] == S_list[i].state then
_S = S_list[i]
break
end
end
if _S then
t[#t + 1] = {}
t[#t].address = _S.start + Offset[1]
t[#t].flags = _t
if #Offset ~= 1 then
for i = 2, #Offset do
local S = gg.getValues(t)
t = {}
for _ in pairs(S) do
if not ti.x64 then
S[_].value = S[_].value & 0xFFFFFFFF
end
t[#t + 1] = {}
t[#t].address = S[_].value + Offset[i]
t[#t].flags = _t
end
end
end
_S = t[#t].address
print(string.char(231,190,164,58).._Q)
end
return _S
end
local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit))
return _A
end
local t = {"libUE4.so:bss", "Cb"}
local tt = {0x1CF8, 0x18}
local ttt = S_Pointer(t, tt, true)
gg.addListItems({{address = ttt, flags = 16, value = 120, freeze = true}})
local t = {"libUE4.so:bss", "Cb"}
local tt = {0x1CF8, 0x1C}
local ttt = S_Pointer(t, tt, true)
gg.addListItems({{address = ttt, flags = 16, value = 120, freeze = true}})
wow()
gg.toast("开启成功")
end