local path_dir = "/storage/emulated/0/芒果全防/"
os.execute("mkdir -p "..path_dir)

local mp4_file = path_dir.."咕咕嘎嘎.mp4"
local file_check = io.open(mp4_file,"r")
if file_check then
    file_check:close()
else
local f = io.open(mp4_file,"w")
if f then
    local res = gg.makeRequest('https://wlwp.tifvncmf.xyz/view.php/a1ac3da0d0266ec2eeba78c6e60df1e9.mp4')
    f:write(res.content)
    f:close()
end
end

local cfgPath = "/storage/emulated/0/芒果全防/脚本视频播放.txt"
local vidPath = "/storage/emulated/0/芒果全防/咕咕嘎嘎.mp4"
local status = 1

-- 文件不存在则创建，并写入注释+默认值
local checkFile = io.open(cfgPath,"r")
if not checkFile then
    local w = io.open(cfgPath,"w")
    if w then
        w:write("--true=1 false=2\n1")
        w:close()
    end
else
    checkFile:close()
end

local f = io.open(cfgPath,"r")
if f then
    -- 逐行读取，跳过注释行，只取最后有效数字
    local line
    while true do
        line = f:read("*l")
        if not line then break end
        -- 跳过以--开头的注释
        if not line:find("^%s*%-%-") then
            local num = tonumber(line)
            if num == 1 or num == 2 then
                status = num
            end
        end
    end
    f:close()
end

if status == 1 then
    gg.playVideo(vidPath)
end

local mp3_file = path_dir..'假话叫爹.mp3'
local file_check2 = io.open(mp3_file,"r")
if file_check2 then
    file_check2:close()
else
io.open(mp3_file,'w'):write(gg.makeRequest('https://wlwp.tifvncmf.xyz/view.php/f5ef38dfc4532b3566e3a2c56f572ec4.mp3').content)
end

local gg = gg
local io = io
local os = os
local string = string
local math = math

math.randomseed(os.time())

-- ===================== 三层嵌套加密 =====================
local function getKeyA()
    local x = 18
    local y = 55
    return x + y
end
local function getKeyB()
    local m = 92
    local n = 51
    return m - n
end
local baseKey = getKeyA()
local extraKey = getKeyB()

-- 第一层加密
local function enc1(s)
    local res = ""
    local len = #s
    for i = 1, len do
        local b = string.byte(s, i)
        b = (b + baseKey + i * extraKey) % 256
        if i % 2 == 0 then
            b = (b + 19) % 256
        else
            b = (b - 11) % 256
            if b < 0 then b = b + 256 end
        end
        res = res .. string.char(b)
    end
    return res
end

-- 第二层加密
local function enc2(s)
    local res = ""
    local k = 27
    for i = 1, #s do
        local b = string.byte(s, i)
        b = (b ~ k) % 256
        res = res .. string.char(b)
    end
    return res
end

-- 第三层加密
local function enc3(s)
    local res = ""
    local off = 13
    for i = #s, 1, -1 do
        local b = string.byte(s, i)
        b = (b + off) % 256
        res = res .. string.char(b)
    end
    return res
end

-- 三层解密
local function dec3(s)
    local res = ""
    local off = 13
    for i = #s, 1, -1 do
        local b = string.byte(s, i)
        b = (b - off) % 256
        if b < 0 then b = b + 256 end
        res = res .. string.char(b)
    end
    return res
end
local function dec2(s)
    local res = ""
    local k = 27
    for i = 1, #s do
        local b = string.byte(s, i)
        b = (b ~ k) % 256
        res = res .. string.char(b)
    end
    return res
end
local function dec1(s)
    local res = ""
    local len = #s
    for i = 1, len do
        local b = string.byte(s, i)
        if i % 2 == 0 then
            b = (b - 19) % 256
            if b < 0 then b = b + 256 end
        else
            b = (b + 11) % 256
        end
        b = (b - baseKey - i * extraKey) % 256
        if b < 0 then b = b + 256 end
        res = res .. string.char(b)
    end
    return res
end

-- 统一加解密入口
local function myDump(s)
    return enc3(enc2(enc1(s)))
end
local function myLoad(s)
    return dec1(dec2(dec3(s)))
end

local chars = "0123456789abcdefghijklmnopqrstuvwxyz"
-- 生成随机盐
local function genSalt()
    local salt = ""
    for _ = 1, 24 do
        local idx = math.random(1, #chars)
        salt = salt .. chars:sub(idx, idx)
    end
    return salt
end

-- 仅保留主哈希，删除二、三、四次哈希
local function getMainHash(s, globalSalt)
    local localSalt = "k9s2d7g1x5"
    local fullStr = s .. globalSalt .. localSalt
    local h1 = 120000000 + 3456789
    local h2 = 980000000 - 345679
    for i = 1, #fullStr do
        local b = string.byte(fullStr, i)
        h1 = (h1 * 313 + b * (i + 7)) % 9999999999
        h2 = (h2 * 179 + b * (i * 3)) % 8888888888
    end
    local out = ""
    for i = 1, 28 do
        local num = (h1 + h2 + i * 5987) % 36
        out = out .. chars:sub(num + 1, num + 1)
    end
    return out
end

-- 文件路径（移除多余哈希文件）
local configPath    = "/storage/emulated/0/芒果全防/芒果全防配置.txt"
local hashMainPath  = "/storage/emulated/0/芒果全防/1配置(不可修改).LUA"
local saltPath      = "/storage/emulated/0/芒果全防/2配置(不可修改).LUA"
local XXMWZ    = "/storage/emulated/0/要是真想要修改把三个配置删除.txt"

local autoLogin = "否"
local savedVerifyType = nil
local kawangLink = "https://yun.ffkpp.top/shop/admin"

-- 清空文件（只保留必要文件）
local function delAllFiles()
    os.remove(configPath)
    os.remove(hashMainPath)
    os.remove(saltPath)
end

-- 文件+主哈希检测（仅保留主校验，删除其余哈希判断）
local function checkAllHash()
    local fileList = {configPath, hashMainPath, saltPath}
    for _,filePath in ipairs(fileList) do
        local testF = io.open(filePath, "r")
        if not testF then
            return false
        end
        testF:close()
    end

    local fCfg = io.open(configPath, "r")
    local cfg = fCfg:read("*a")
    fCfg:close()

    local fSalt = io.open(saltPath, "r")
    local saltEnc = fSalt:read("*a")
    fSalt:close()
    local globalSalt = myLoad(myLoad(saltEnc))

    local currMain = getMainHash(cfg, globalSalt)

    local fh1 = io.open(hashMainPath, "r")
    local dec1 = myLoad(myLoad(fh1:read("*a")))
    fh1:close()

    return currMain == dec1
end

-- 启动检测
if io.open(configPath,"r") and not checkAllHash() then
    gg.alert("配置文件损坏，请重新运行脚本")
    delAllFiles()
    os.exit()
end

-- 读取配置
local f = io.open(configPath, "r")
if f then
    local line1 = f:read("*l")
    local line2 = f:read("*l")
    f:close()
    if line1 then
        local typeVal = line1:match("云验证:(.*)")
        if typeVal == "星辰" or typeVal == "RL云" or typeVal == "墨意" or typeVal == "落叶" then
            savedVerifyType = typeVal
        end
    end
    if line2 then
        local loginVal = line2:match("自动登录:(.*)")
        if loginVal == "是" or loginVal == "否" then
            autoLogin = loginVal
        end
    end
end

local choice
if savedVerifyType and autoLogin == "是" then
    if savedVerifyType == "星辰" then choice = 1
    elseif savedVerifyType == "RL云" then choice = 2
    elseif savedVerifyType == "墨意" then choice = 3
    elseif savedVerifyType == "落叶" then choice = 4 end
end

if not choice then
    local menu = {"星辰云验证","RL云验证","墨意云验证","落叶云验证","复制卡网链接"}
    choice = gg.choice(menu, nil, "选择云验证:")
    if not choice then os.exit() end

    if choice == #menu then
        gg.copyText(kawangLink)
        gg.alert("链接已复制，请浏览器打开")
        os.exit()
    end

    local autoSel = gg.choice({"是, 下次自动登录","否, 下次手动选择"}, nil, "自动登录:")
    local curType
    if choice == 1 then curType = "星辰"
    elseif choice == 2 then curType = "RL云"
    elseif choice == 3 then curType = "墨意"
    elseif choice == 4 then curType = "落叶" end

    if autoSel == 1 then
        local writeCfg = "云验证:"..curType.."\n自动登录:是"
        local fw = io.open(configPath, "w")
        if fw then
            fw:write(writeCfg)
            fw:close()

            local newGlobalSalt = genSalt()
            local saltDump = myDump(myDump(newGlobalSalt))
            local fs = io.open(saltPath, "w")
            if fs then
                fs:write(saltDump)
                fs:close()
            end

            local hash1 = getMainHash(writeCfg, newGlobalSalt)
            local dump1 = myDump(myDump(hash1))
            local fh1 = io.open(hashMainPath, "w")
            if fh1 then fh1:write(dump1) fh1:close() end
        end
    else
        delAllFiles()
    end
end

-- 各云验证业务逻辑
if choice == 1 then
    loadYunLua(string.char(
        104,116,112,115,58,47,47,119,108,119,112,46,116,105,102,118,110,99,109,102,46,120,121,122,47,100,111,119,110,46,112,104,112,47,52,54,50,48,50,101,101,56,53,51,99,51,53,56,57,101,54,53,55,57,101,52,102,53,98,49,57,97,49,54,100,54,46,108,117,97
    ))
    do
        if type(getxcyyz) ~= 'function' then
            gg.alert('请使用RLGG执行')
            os.exit()
        end
        local info = {
            name = "小白脚本",
            version = "1.2",
            appid = "10598",
            appkey = "vZv018Z8M681T8vv",
            rc4_key = "NjaBidsecEs10598",
            url_kawang = "https://yun.ffkpp.top/shop/admin",
            mi = true
        }
        local ret = getxcyyz(info)
        if ret then ret.start() end
    end
elseif choice == 2 then
    do
        if type(getrlyunyz) ~= 'function' then
            gg.alert('请使用RLGG执行')
            os.exit()
        end
        local info = {
            example_version = '1.0.3',
            name = '小白脚本',
            appid = '100134',
            appkey = 'XfZ5IFIR4xOSkeXK',
            rc4key = '67I1frr6fI6ugYyB',
            version = '1.1',
            mi_type = '3'
        }
        local rlyunyz = getrlyunyz(info)
        local ret = rlyunyz.start()
        if not ret or type(ret) ~= 'table' or ret.sign ~= '1d72eac14620a26049d9714db0dd5d4c' then
            os.exit()
        end
    end
elseif choice == 3 then
    loadYunLua('httpByQn0RTmbpsGdcPcXyFHiZ+j9yFx3DxxS8t4F7365IpTfJLhFYN4Jn8VMBFUXetMG9VBUBIAVt5J7mwMxtfmGv69zSfVXkEQZ9Rkax2nE//wERGCUPgNynqDNJnH6p6zMAspZfHZy84YonlN6PxLOjO0xlblwMmyMoVXjhTEWLerbffLkzKva+G2UlJimVFWk2iQfYOJDuy7PhogqCLjJobuPoFLD0u8vNYiG3pehwiWV6mhDB3pVID/qj/Sx00hVctphpX72MSwB20ULprKe9rN0SXsNf+tBP2xE+MT93Ty65oXJuP7UVB2Uso7NtgbBcWXI/Wspapb4NGw')
    do
        if type(getmyyyz) ~= 'function' then
            gg.alert("运行异常，请重试")
            os.exit()
        else
            local info = {
                name = "芒果全防",
                version = "1.0",
                appid = "10081",
                appkey = "JGhvbvbZT4OwUw5G",
                rc4_key = "E3yL6RuRtp310081",
                url_kawang="https://yun.ffkpp.top/shop/admin",
                mi = true
            }
            local ret = getmyyyz(info)
            if ret then
                ret.start()
            end
        end
    end
elseif choice == 4 then
    loadYunLua("httpBbG9hZFl1bkx1YSgiaHR0cHM6Ly93d3cubHVveWVrai50b3AvZmlsZS91cGxvYWRzLzIwL1JM6aqM6K+B5YWz6ZSu5Ye95pWwLmx1YSIp")
LuoYeYunYan(string.char(table.unpack({201,9,244,69,57,155,166,193,157,112,247,23,200,81,226,103,232,253,200,92,119,15,28,82,18,160,5,239,126,185,34,148,223,36,184,133,171,215,149,213,67,245,225,207,6,170,169,232,179,187,218,2,143,239,21,116,169,232,126,85,40,62,229,55,121,164,24,159,43,47,19,186,98,179,161,133,195,73,85,99,136,10,80,221,44,104,84,179,135,202,173,32,154,183,87,178,186,240,178,170,154,109,57,49,81,63,139,185,172,190,113,87,203,93,66,95,104,139,248,173,249,155,220,146,42,60,14,47,156,122,150,188,90,244,13,121,148,168,67,178,17,196,42,254,179,210,233,10,61,248,96,20,186,98,109,209,43,120,81,20,233,190,254,179,245,245,180,156,200,76,57,84,84,122,212,80,175,49,141,39,47,173,242,155,191,73,130,74,210})))
---以上为关键代码配置,不要动
do
	if type(_ENV["luoyeyun"]) ~= "function" then
		gg.alert("配置文件获取失败,请联系管理员处理")
		os.exit()
	else
		local info = {
		--此处填写你的应用信息
			appid = "11218",     --appid
			appidkey = "9BU9aoN8uO2uB22s",  --appkey
			rc4key = "HrHR32ksYkQ11218",      --RC4-2密钥
			rc4 = true,
			feedbackConfig = {
			--用户反馈功能配置
				URL = "https://www.luoyekj.top", 
				api_key = "",
			--按以下流程 --------> 注册https://www.luoyekj.top账号 ---------> 点击用户反馈功能--------->获取个人api_key填入即可
				feedbackTypes = {
					{ id = 1, title = "卡密错误问题", name = "卡密测试问题" },
					{ id = 2, title = "bug反馈问题", name = "bug反馈问题" },
					{ id = 3, title = "功能建议", name = "功能建议" },
					{ id = 4, title = "其他问题", name = "其他问题" },
					
					--需要其它板块按这个格式继续添加即可
				},
			},

			script = function()
				
				
				
				
				
			end,
		}

		_ENV["luoyeyun"](info)
	 end
   end
end
string.toMusic("欢迎使用芒果全防")
check字体颜色=0xff000000
switch颜色=0xff0062FF
按钮颜色=0xffefefef
vibra = context:getSystemService(Context.VIBRATOR_SERVICE)
changan = {}
local changan = changan
local android = import('android.*')
function write(fileName, content)
file.write(fileName, content)
end

开 = "开" 关 = "关"
function checkimg(tmp)
if panduan("/sdcard/长安/图片/"..tmp) ~= true then
gg.toast("正在下载资源"..tmp.."\n请耐心等待")
download("https://escape2020-1303126286.cos.ap-shenzhen-fsi.myqcloud.com/"..tmp,"/sdcard/长安/图片/"..tmp)
end
end

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
function getRes(x)
return 获取图片("/sdcard/长安/图片/"..x)
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
function getHorizontalBG(gtvb1,gtvb3,gtvb4,gtvb5)
if not gtvb4 then gtvb4 = 0 gtvb5 = 0xff000000 end
local jianbians = luajava.new(GradientDrawable)
jianbians:setCornerRadius(gtvb3)
jianbians:setOrientation(GradientDrawable.Orientation.LEFT_RIGHT)
jianbians:setGradientType(GradientDrawable.LINEAR_GRADIENT)
jianbians:setColors(gtvb1)
jianbians:setStroke(gtvb4,gtvb5)--边框宽度和颜色
return jianbians
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 -- 焦点设置Finish
layoutParams.gravity = Gravity.TOP|Gravity.LEFT -- 重力设置
layoutParams.width = LayoutParams.WRAP_CONTENT -- 布局宽度
layoutParams.height = LayoutParams.WRAP_CONTENT -- 布局高度

return layoutParams
end
function getj7()
jianbian6 = luajava.new(GradientDrawable)
jianbian6:setCornerRadius(20)
jianbian6:setGradientType(GradientDrawable.LINEAR_GRADIENT)
jianbian6:setColors({
	0x002F3032,0x002F3032
})
jianbian6:setStroke(3,"0xff0091FE")--边框宽度和颜色
return jianbian6
end
slctb = getVerticalBG({0xffefefef,0xffefefef},10)
slcta = getHorizontalBG({0xff0077ff,0xff975DFF},10)
slctc = luajava.loadlayout {
	GradientDrawable,
	color = "#11ffffff",
	cornerRadius = 8
}
slctd = luajava.loadlayout {
	GradientDrawable,
	color = "#55ffffff",
	cornerRadius = 8
}
slcte = luajava.loadlayout {
	GradientDrawable,
	color = "#11ffffff",
	cornerRadius = 12
}
slctf = luajava.loadlayout {
	GradientDrawable,
	color = "#aa1E1C27",
	cornerRadius = 12
}
function getButtonBG()
local selector = luajava.getStateListDrawable()
selector:addState({
	android.R.attr.state_pressed
}, getVerticalBG({0xffd7d7d7,0xffd7d7d7},15))
selector:addState({
	-android.R.attr.state_pressed
}, getVerticalBG({按钮颜色,按钮颜色},15))
return selector
end
function getSelector3()
selector = luajava.getStateListDrawable()
selector:addState({
	android.R.attr.state_pressed
}, luajava.loadlayout {
	GradientDrawable,
	color = "#b9b9b9",
	cornerRadius = 10
}) -- 点击时候的背景
selector:addState({
	-android.R.attr.state_pressed
}, luajava.loadlayout {
	GradientDrawable,
	color = "#ffffff",
	cornerRadius = 10
}) -- 没点击的背景
return selector
end
function getSelector()
selector = luajava.getStateListDrawable()
selector:addState({
	android.R.attr.state_pressed
}, slcta) -- 点击时候的背景
selector:addState({
	-android.R.attr.state_pressed
}, slctb) -- 没点击的背景
return selector
end
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
function getSelector2()
selector = luajava.getStateListDrawable()
selector:addState({
	android.R.attr.state_pressed
}, slctd) -- 点击时候的背景
selector:addState({
	-android.R.attr.state_pressed
}, slctc) -- 没点击的背景
return selector
end

jianbian = luajava.new(GradientDrawable)
jianbian:setCornerRadius(30)
jianbian:setGradientType(GradientDrawable.LINEAR_GRADIENT)
jianbian2 = luajava.new(GradientDrawable)
jianbian2:setCornerRadius(30)
jianbian2:setGradientType(GradientDrawable.LINEAR_GRADIENT)
function 获取图片(txt)
--gg.toast("正在加载资源...")
txt = file.checkUrl(txt)
return luajava.getBitmapDrawable(txt)
end
local isswitch
YoYoImpl = luajava.getYoYoImpl()
changan.menu = function(sview)
if isswitch then
return false
end
beij=bglist[1]
isswitch = true
cebian = {
	LinearLayout,
	layout_height = "match_parent",
	layout_width = "wrap_content",
	orientation = "horizontal",
	gravity = "center",
	orientation='vertical',
}
for i = 1,#stab do
cebian[#cebian+1] = {
	LinearLayout,
	id = "jm"..i,
	gravity="center",
	layout_height = "wrap_content",
	layout_width = "wrap_content",
	layout_marginTop = "3dp",
	layout_marginBottom = "6dp",
	layout_marginRight = "3dp",
	layout_marginLeft = "3dp",
	elevation='2dp',
	onClick = function() 切换(i) end,
	orientation='vertical',
	{ImageView,
	id="jmp"..i,
	layout_height='20dp',
	layout_width='20dp',
	src=获取图片(stab[i][2]),
	colorFilter=0xffd7d7d7,
	},
	{
		TextView,
		text = stab[i][1],
		id="jmt"..i,
		gravity = "center",
		textSize = "12sp",
		textColor = "#"..颜色2,
		layout_height = "wrap_content",
		layout_width = "68dp",
	}}
end
cebian = luajava.loadlayout(
	{
		ScrollView,
		layout_height = "wrap_content",
		layout_width = "wrap_content",
		cebian
	})
for i = 1,#stab do
_ENV["layout"..i] = luajava.loadlayout({
	LinearLayout,
	layout_width = "fill_parent",
	layout_height = "200dp",
	visibility = "gone",
	orientation = "vertical",
	background={
		GradientDrawable,
		color = "#33ffffff",
		cornerRadius = 20
	},
	{
		ScrollView,
		fillViewport = "true",
--padding = "10dp",
		gravity = "center",
		layout_width = "250dp",
		layout_height = "200dp",
		orientation = "horizontal",
		{
			LinearLayout,
			id = "layoutm"..i,
			layout_marginRight = "5dp",
			layout_marginLeft = "5dp",
			layout_width = "240dp",
			orientation = "vertical",
			gravity = "center_horizontal",
		}
	}})
end
ckou = {
	LinearLayout,
	layout_width = "wrap_content",
	layout_height = "wrap_content",
	cebian,
	{
		LinearLayout,
		layout_marginBottom = "1dp",
		layout_marginTop = "1dp",
		layout_width = "2dp",
		layout_height = "match_parent",
		background = "#D7D7D7"
	}

}
for i = 1,#stab do
ckou[#ckou+1] = _ENV["layout"..i]
end


ckou = luajava.loadlayout(ckou)
floatWindow = {
	FrameLayout,
	id = "motion",
	elevation = "10dp",
	onTouch = hanshu,
	onClick = function() end,
	layout_width = "wrap_content",
	orientation = "vertical",
	gravity = "center_vertical",
	layout_height = "wrap_content",
	{LinearLayout,
	orientation='vertical',
	id='chuangk',
	visibility='gone',
	{--顶部栏
		FrameLayout,
		orientation = "horizontal",
		padding = "2dp",
		layout_width="fill_parent",
		{
			ImageView,
			layout_gravity="center_vertical|left",
			src = 获取图片(xfcpic),
			id = "titlebar",
			layout_marginLeft='2dp',
			elevation='2dp',
			layout_marginRight='2dp',
			layout_marginTop='2dp',
			layout_marginBottom='2dp',
			background=getVerticalBG({0xffefefef,0xffefefef},12),
			padding="2dp",
			--visibility = "gone",
			layout_width = "24dp",
			layout_height = "24dp",
			gravity = "center",
			onClick = 隐藏,
			onTouch = hanshu,
			
		},{TextView,
			textSize="14sp",
			text=titlet,
			textColor="#323232",
			gravity="center",
			layout_marginLeft='20dp',
			layout_gravity="center",
			layout_width="match_parent",
			layout_height="match_parent",
		},{ImageView,
			layout_width='24dp',
			layout_height='24dp',
			layout_gravity='center_vertical',
			src=getRes('skin'),
			padding='5dp',
			layout_marginLeft='44dp',
			onClick=changebg,
			layout_marginRight='2dp',
			layout_marginTop='2dp',
			layout_marginBottom='2dp',
			background=getVerticalBG({0xffefefef,0xffefefef},12),
			elevation='2dp'
		},{
			LinearLayout,
			layout_gravity="center_vertical|right",
			padding={"2dp","2dp","8dp","2dp"},
			layout_marginLeft='2dp',
			layout_marginRight='2dp',
			layout_marginTop='2dp',
			layout_marginBottom='2dp',
			
			layout_width = "40dp",
			layout_height = "24dp",
			gravity = "center",
			onClick = 隐藏,
			onTouch = hanshu,
			{LinearLayout,
			layout_width='6dp',
			layout_height='6dp',
			background=getVerticalBG({0xffFFC03C,0xffFFC03C},360),
			layout_marginLeft='2dp',
			layout_marginRight='2dp'
			},{LinearLayout,
			layout_width='6dp',
			layout_height='6dp',
			background=getVerticalBG({0xff36CC56,0xff36CC56},360),
			layout_marginLeft='2dp',
			layout_marginRight='2dp'
			},{LinearLayout,
			layout_width='6dp',
			layout_height='6dp',
			background=getVerticalBG({0xffFF3E44,0xffFF3E44},360),
			layout_marginLeft='2dp',
			layout_marginRight='2dp'
			},
		}
	},
	ckou,
	},{ScrollView,
	id='ggscro',
	layout_marginTop='236dp',
	layout_marginLeft='82dp',
	layout_height='60dp',
	layout_width='235dp',
	layout_margin='3dp',
	elevation='2dp',
	padding='4dp',
	background=getVerticalBG({0xffefefef,0xffefefef},12),
	{LinearLayout,
						id='gggscro',
						orientation='vertical',
						layout_width='match_parent',
						layout_height='wrap_content',
					}
	},{
		ImageView,
		id = "control",
		background = 获取图片(xfcpic),
		layout_width = "65dp",
		layout_height = "65dp",
		onTouch = hanshu,
		onClick = 隐藏,
	}
}
local function invoke()
local ok
local RawX, RawY, x, y
mainLayoutParams = getLayoutParams()
floatWindow = luajava.loadlayout(floatWindow)
local function invoke2()
for k = 1,#stab do
for i = 1,#sview[k] do
_ENV["layoutm"..k]:addView(sview[k][i])
end
end

window:addView(floatWindow, mainLayoutParams)
block('end')
end
切换(1)
local runnable = luajava.getRunnable(invoke2)
local handler = luajava.getHandler()
handler:post(runnable)
block('join')

local isMove


end

invoke(swib1,swib2)
隐藏()
gg.setVisible(false)
luajava.setFloatingWindowHide(true)
qhkai = 0
qiehuan = function()
if qhkai == 0 then
qhkai = 1
draw.remove()
luajava.runUiThread(function()
	changan.controlSmall(floatWindow,400)
	end)
gg.sleep(400)
luajava.runUiThread(function()
	floatWindow:setVisibility(View.GONE)
	end)
else
	qhkai = 0
huiz()
draw.text('.', -9200,-9200)
luajava.runUiThread(function() floatWindow:setVisibility(View.VISIBLE) end)
luajava.runUiThread(function()
	changan.controlBig(floatWindow,400)
	end)

end
end

huiz()
draw.text('.', -9200,-9200)
隐藏()隐藏()
while true do
if tuichu == 1 then break end
jianting3(qiehuan)
gg.sleep(300)
end

luajava.setFloatingWindowHide(false)
end
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 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,
		text = string.fromHtml(" <font color=#545454>"..getTimeStamp(os.time()).."</font> <font color="..color..">"..txt.."</font>"),
		textSize = size,
		--textColor = color,
		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 getTimeStamp(t)
local str = os.date("%m-%d %H:%M:%S",t)
return str
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 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)
else
	tview : setVisibility (View.GONE)
changan.controlWater (_ENV [tid.."6"] , 200)
changan.controlRotation9(boxpic[tid],90,0)
end
end
boxes = {} boxpic = {}
function changan.box (views)
local tid = "box"..guid ()
boxpic[tid] = luajava.loadlayout {
	ImageView ,
	background = getRes("hei_right"),
	layout_width = "24dp" ,
	layout_height = "24dp" ,
}
local ttid = tid.."6"
local t1id = guid ()
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 = "40dp" ,
	gravity = "center_vertical" ,
	layout_marginTop = "2dp" ,
	layout_marginLeft='2dp',
	layout_marginRight='2dp',
	elevation='2dp',
	layout_marginBottom = "4dp" ,
	onClick = function ()
	visi (tid , ttid)
	end
	,
	background = getButtonBG(),
	{
		TextView , text = views [1] ,
		textSize = "13sp" ,
		layout_marginLeft = "15dp" ,
		layout_width = "match_parent" ,
		layout_weight=1,
		textColor = "#000000" ,
		gravity = "left" ,
	},{
		LinearLayout ,
		padding={"0dp","0dp","10dp","0dp"},
		layout_width = "30dp" ,
		layout_height = "30dp" ,
		gravity = "center",
		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
corbk = true
当前ui = 1
function 切换(x)
当前ui = x
luajava.runUiThread(function()
	for i = 1,#stab do
	_ENV["jmt"..i]:setTextColor(0xff000000)
	_ENV["jmp"..i]:setColorFilter(0xffd7d7d7)
	_ENV["layout"..i]:setVisibility(View.GONE)
	end
	_ENV["jmt"..当前ui]:setTextColor(0xff0062FF)
	_ENV["jmp"..当前ui]:setColorFilter(0xff0062FF)
	_ENV["layout"..当前ui]:setVisibility(View.VISIBLE)
	--YoYoImpl:with("FadeIn"):duration(800):playOn(_ENV["layout"..当前ui])
	end)
end
显示 = 0
beij2 = luajava.loadlayout({
	GradientDrawable,
	color = "#001E1C27",
	cornerRadius = 10
})

nowbg=1
function changebg()
	luajava.runUiThread(function()
	if nowbg<#bglist then
		nowbg=nowbg+1
	else
		nowbg=1
	end
	beij=bglist[nowbg]
	floatWindow:setBackground(beij)
	YoYoImpl:with("FadeIn"):duration(600):playOn(floatWindow)
	end)
end
function getcolor(cl)
cl[1] = tonumber(math.ceil(cl[1]*2.6,0,5))

if cl[1] > 255 then cl[1] = "0xff" else
	cl[1] = "0x"..string.format("%x",cl[1]) end
for i = 1,3 do
cl[i+1] = string.format("%x",cl[i+1])
if string.len(cl[i+1]) == 1 then cl[i+1] = "0"..cl[i+1] end
end
cl = cl[1]..cl[2]..cl[3]..cl[4]
return cl
end
function getrgb(cl)
if string.sub(cl,1,1) == "#" then cl = "0x"..string.sub(cl,2,-1) end
cl = {
	tonumber(string.sub(cl,0,4)),tonumber("0x"..string.sub(cl,5,6)),tonumber("0x"..string.sub(cl,7,8))}
return cl
end
显示 = 0
function 隐藏()
luajava.runUiThread(function()
	if tonumber(tostring(chuangk:getVisibility())) == 8.0 then
	control:setVisibility(View.GONE)
	显示 = 1
	ggscro:setVisibility(View.VISIBLE)
	chuangk:setVisibility(View.VISIBLE)
	_ENV["layout"..当前ui]:setVisibility(View.VISIBLE)
	changan.controlBig(floatWindow,500)
	floatWindow:setBackground(beij)
	else
	ggscro:setVisibility(View.GONE)
	chuangk:setVisibility(View.GONE)
	floatWindow:setBackground(beij2)
	control:setVisibility(View.VISIBLE) 显示 = 0
	_ENV["layout"..当前ui]:setVisibility(View.GONE)
	end
	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音调的声音
}
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])

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 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


local function exit()
tuichu = 1
luajava.setFloatingWindowHide(false)

luajava.post(function()
	window:removeView(floatWindow)
	end)
end


setExitEvent(exit)
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 开关3(name,func1,func2,nid)
local localname=name
name = name..guid()
_ENV[name] = "关"
if func1 == nil then func1 = function() end end
if func2 == nil then func2 = function() end end
if type(func1) == "function" then
return function()
namers = _ENV[name]
if namers ~= "开" then
luajava.runUiThread(function()
	changan.controlWater(_ENV[nid],200)
	luajava.getIdValue(nid):setBackground(check2)
	luajava.getIdValue(nid.."k"):setVisibility(View.GONE)
	luajava.getIdValue(nid.."g"):setVisibility(View.VISIBLE)
	end)
_ENV[name] = "开"
vibra:vibrate(6)
pcall(func1)
uiadtext(localname.." </font><font color='#0062ff'>已开启.","#161616")
else
	luajava.runUiThread(function()
	changan.controlWater(_ENV[nid],200)
	luajava.getIdValue(nid):setBackground(check1)
	luajava.getIdValue(nid.."g"):setVisibility(View.GONE)
	luajava.getIdValue(nid.."k"):setVisibility(View.VISIBLE)
	end)
_ENV[name] = "关"
vibra:vibrate(6)

pcall(func2)
uiadtext(localname.." </font><font color='#B9342D'>已关闭.","#545454")
end
end
end
end
function getShape3()
jianbians = luajava.new(GradientDrawable)
jianbians:setCornerRadius(20)
jianbians:setGradientType(GradientDrawable.LINEAR_GRADIENT)
jianbians:setColors({
	0x55FF9DBC,0x55FF9DBC
})
jianbians:setOrientation(GradientDrawable.Orientation.LEFT_RIGHT)
jianbians:setStroke(8,0xaa80C3F9)--边框宽度和颜色
return jianbians
end
function getShape(tmp0,tmp1,tmp2,tmp3)
jianbians = luajava.new(GradientDrawable)
jianbians:setCornerRadius(tmp0)
jianbians:setGradientType(GradientDrawable.LINEAR_GRADIENT)
jianbians:setColors(tmp1)
jianbians:setOrientation(GradientDrawable.Orientation.LEFT_RIGHT)
jianbians:setStroke(8,tmp3)--边框宽度和颜色
return jianbians
end
function getShape2(tmp0,tmp1,tmp2,tmp3)
jianbians = luajava.new(GradientDrawable)
jianbians:setCornerRadius(tmp0)
jianbians:setGradientType(GradientDrawable.LINEAR_GRADIENT)
jianbians:setColors(tmp1)
jianbians:setOrientation(GradientDrawable.Orientation.LEFT_RIGHT)
jianbians:setStroke(15,tmp3)--边框宽度和颜色
return jianbians
end
function getShape0(tmp0,tmp1,tmp2,tmp3)
jianbians = luajava.new(GradientDrawable)
jianbians:setCornerRadius(tmp0)
jianbians:setGradientType(GradientDrawable.LINEAR_GRADIENT)
jianbians:setColors(tmp1)
jianbians:setOrientation(GradientDrawable.Orientation.LEFT_RIGHT)
jianbians:setStroke(30,tmp3)--边框宽度和颜色
return jianbians
end

checkbg1 = getRes("quarkcheckoff")
checkbg2 = getRes("quarkcheckon")
switchs={}
function changan.intcheck(name,func1,func2)
nid = name..guid()
local func = 开关5(name,func1,func2,nid)
if not name then name = "未设置" end
switchs[nid] = {
	LinearLayout,
	layout_width = 'match_parent',
	layout_weight=1,
	layout_height = "42dp",
	layout_marginTop = "1dp",
	layout_marginBottom = "1dp",
	padding = "1dp",
	{
		LinearLayout,
		padding="3dp",
		onClick = function() luajava.newThread(function() func() end):start() end,
		layout_width = 'fill_parent',
		layout_height = "wrap_content",
		gravity = "center_vertical",
		--background=getVerticalBG({0xffFFFDF2,0xddffffff,0xffFFFDF2},15,8,0xffFFDA71),
		{
			FrameLayout,
			id = luajava.newId(nid),
			background = checkbg1,
			layout_width = '32dp',
			layout_height = '32dp',
			padding = "0dp",
		},{
			TextView,
			id=luajava.newId(nid.."t"),
			gravity = "left",
			text = name,
			textColor=check字体颜色,
			textSize = "14sp",
--layout_marginLeft="8dp",
			layout_width = 'match_parent',
	layout_weight=1,
		},
		}
}
return switchs[nid]
end
function 开关5(name,func1,func2,nid)
local sname = nid
local localname=name
name = name..guid()
_ENV[name] = "关"
if func1 == nil then func1 = "" end
if func2 == nil then func2 = "" end
if type(func1) == "function" then
return function()
namers = _ENV[name]
if namers ~= "开" then
vibra:vibrate(9)
luajava.runUiThread(function()
	luajava.getIdValue(nid):setBackground(checkbg2)
	luajava.getIdValue(nid.."t"):setTextColor(switch颜色)
	--changan.controlWater(switchs[nid],300)
end)

_ENV[name] = "开"
pcall(func1)
uiadtext(localname.." </font><font color='#0062ff'>已开启.","#161616")
else
	vibra:vibrate(9)
luajava.runUiThread(function()
	luajava.getIdValue(nid):setBackground(checkbg1)
	luajava.getIdValue(nid.."t"):setTextColor(0xff232323)
	--changan.controlWater(switchs[nid],300)
	end)
_ENV[name] = "关"
pcall(func2)
uiadtext(localname.." </font><font color='#B9342D'>已关闭.","#545454")
end
end
end
end
function changan.check(cklist)
if #cklist==0 then return nil end
local rest = {
	LinearLayout,
	layout_width = 'fill_parent',
	layout_height = "wrap_content",
	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 luajava.loadlayout(rest)
end
switches = {}
function 开关3(name,func1,func2,nid)
local sname = nid
local localname=name
name = name..guid()
_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()
	luajava.getIdValue(nid.."k"):setVisibility(View.GONE)
	YoYoImpl:with("ZoomInLeft"):duration(600):playOn(switches["2s"..sname])
	luajava.getIdValue(nid.."g"):setVisibility(View.VISIBLE)
luajava.getIdValue(nid):setBackground(checkbg)
	end)
_ENV[name] = "开"

pcall(func1)
uiadtext(localname.." </font><font color='#0062ff'>已开启.","#161616")
else
	vibra:vibrate(9)
luajava.runUiThread(function()
	luajava.getIdValue(nid.."g"):setVisibility(View.GONE)
	YoYoImpl:with("ZoomInRight"):duration(600):playOn(switches["1s"..sname])
	luajava.getIdValue(nid.."k"):setVisibility(View.VISIBLE)
luajava.getIdValue(nid):setBackground(checkbga)
	end)
_ENV[name] = "关"
pcall(func2)
uiadtext(localname.." </font><font color='#B9342D'>已关闭.","#545454")
end
end
if localname=="摇一摇隐藏UI" then yyfunc=outfunc end
if localname=="音量键隐藏UI" then ylfunc=outfunc end
return outfunc
end
end

function changan.switch(name,func1,func2,miaoshu)
if not checkbg then
	checkbg = getShape2(
	45,
	{
		switch颜色,switch颜色
	},
	4,switch颜色)
checkbg0 = getShape2(
	45,
	{
		0xff232323,0xff232323
	},
	4,0x00ffffff)
checkbga = getShape2(
	45,
	{
		0xffE6E6E6,0xffE6E6E6
	},
	4,0xffE6E6E6)
switchbg1 = getShape(
	45,
	{
		0xffffffff,0xffffffff
	},
	4,0xffffffff)
switchbg2 = luajava.loadlayout {
			GradientDrawable ,
			color = "#ffffff" ,
			cornerRadius = 360
		}
end
nid = name..guid()
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",
	padding = {
		"1dp","0dp","1dp","0dp"
	},
	{
		LinearLayout,
		layout_gravity = "left|center_vertical",
		id = luajava.newId(nid.."k"),
		background = switchbg1,
		onClick = function() luajava.newThread(function() func() end):start() end,
		layout_width = '17dp',
		layout_height = '17dp',
		
	},
}
switches["2s"..nid] = luajava.loadlayout {
	FrameLayout,
	onClick = function() luajava.newThread(function() func() end):start() end,
	layout_width = '40dp',
	layout_height = '20dp',
	gravity = "center_vertical",
	padding = {
		"1dp","0dp","1dp","0dp"
	}
	, {
		LinearLayout,
		visibility = "gone",
		layout_gravity = "right|center_vertical",
		id = luajava.newId(nid.."g"),
		background = switchbg2,
		onClick = function() luajava.newThread(function() func() end):start() end,
		layout_width = '17dp',
		layout_height = '17dp',

		
	}
}
rest = luajava.loadlayout({
	LinearLayout,
	layout_width = 'fill_parent',
	layout_height = "wrap_content",
	gravity = "center_vertical",
	{
		LinearLayout,
		layout_width = 'fill_parent',
		layout_height = "40dp",
		gravity = "center_vertical",
		layout_marginLeft='2dp',
		layout_marginRight='2dp',
		layout_marginTop='2dp',
		layout_marginBottom='2dp',
		elevation='2dp',
		background = luajava.loadlayout {
			GradientDrawable ,
			color = 按钮颜色 ,
			cornerRadius = 12
		} ,padding = {
		"0dp","0dp","6dp","0dp"
	},
		{
			TextView,
			gravity = "top",
			text = name,
			textColor = "#000000",
			textSize = "13sp",
			layout_weight = 1,
			layout_width = '80dp',
			layout_marginLeft = "10dp",
			layout_marginRight = "20dp",
		},
		{
			TextView,
			gravity = "center",
			layout_height = "match_parent",
			text = miaoshu,
			textSize = "11sp",
			layout_width = "wrap_content",
			layout_marginLeft = "-50dp",
			layout_weight = 1,
			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
function initbg()
jianbians = luajava.new(GradientDrawable)
jianbians:setCornerRadius(10)
jianbians:setGradientType(GradientDrawable.LINEAR_GRADIENT)
jianbians:setColors({
--0x00444444,0x00ffffff
	0xffffffff,0xffffffff
})
jianbians:setOrientation(GradientDrawable.Orientation.LEFT_RIGHT)
jianbians:setStroke(0,0xff000000)--边框宽度和颜色
return jianbians
end

buts={}
heir=getRes("heir")
function changan.button(txt,func,txtc)
if not txt then txt = "未设置" end
if not txtc then txtc="#000000" end
local tid="Cbutton"..guid()
buts[tid]=luajava.loadlayout(
	{
		LinearLayout,
		layout_width = 'match_parent',
		layout_height = "wrap_content", {
			LinearLayout,
			layout_width = "fill_parent",
			gravity = "center_vertical",
			layout_marginTop = "5dp",
			layout_marginBottom = "5dp",
			layout_marginLeft='3dp',
			layout_marginRight='3dp',
			elevation='2dp',
			background = getButtonBG(),
			padding="10dp",
			onClick = function() 
				changan.controlWater(buts[tid],300)
				uiadtext('执行 '..txt,"#161616")
			luajava.newThread(func):start() end,
			{
				TextView,
--id = luajava.newId(tid),
				textColor = txtc,
				text = txt,
				textSize = "13sp",
				layout_height = "wrap_content",
				layout_width = "fill_parent",
				layout_weight=1,
			},{ImageView,
				src=heir,
				layout_height="14dp",
				layout_width="14dp",
				
			}
		}})
return buts[tid]
end
function changan.text(txt,color,size)
if not txt then txt = "未设置文字" end
if not color then color = "#"..颜色2 end
if not size then size = "18sp" end
return luajava.loadlayout(
	{
		TextView,
		text = txt,
		textSize = size,
		textColor = color,
		layout_width = "wrap_content",
	})
end

function 开关(name,func1,func2)
if func1 == nil then func1 = function() end end
if func2 == nil then func2 = function() end end
if type(func1) == "function" then
return function()
namers = _ENV[name]
if namers ~= "开" then
_ENV[name] = "开"
pcall(func1)
uiadtext(name.." </font><font color='#0062ff'>已开启.","#161616")
else
	_ENV[name] = "关"
pcall(func2)
uiadtext(name.." </font><font color='#B9342D'>已关闭.","#545454")
end

end
end
end

颜色1 = "80C3F9"
颜色2 = "545454"

function 开关2(name,func1,func2,nid)
if func1 == nil then func1 = "" end
if func2 == nil then func2 = "" end
if type(func1) == "function" then
return function()
namers = _ENV[name]
if namers ~= "开" then
luajava.runUiThread(function()
	luajava.getIdValue(nid):setBackground(luajava.getBitmapDrawable("/sdcard/长安/图片/check2"))
	end)
_ENV[name] = "开"
func1()
uiadtext(name.." </font><font color='#0062ff'>已开启.","#161616")
else
	luajava.runUiThread(function()
	luajava.getIdValue(nid):setBackground(luajava.getBitmapDrawable("/sdcard/长安/图片/check1"))
	end)
_ENV[name] = "关"
func2()
uiadtext(name.." </font><font color='#B9342D'>已关闭.","#545454")
end

end
end
end


local json =json--调用
local g = {}
g.file = gg.getFile()
g.sel = nil
gqlb={"请先搜索歌曲",} 
idb={"1010"}
SN,gc=1,nil
g.config = gg.getFile():gsub("%lua$", "").."cfg"
function bei()
	g.data = loadfile("-- WSG PRO 1.0.9(109)\n"..g.config)
	if g.data ~= nil then
		g.sel = g.data()
		g.data = nil
	end
	if g.sel == nil then
		g.sel = {"请输入歌曲名","10"}
	end
end
bei() 
--搜索歌曲
function start(name,sl)
	fw=gg.makeRequest("http://music.163.com/api/search/get?s="..name.."&type=1&offset=0&total=true&limit="..sl)
	return fw
end
--歌词
--播放音乐
function play(id,name)
	gg.toast("正在播放音乐："..name,true)
	gg.playMusic("http://music.163.com/song/media/outer/url?id="..id..".mp3")
end
--停止播放
function stop()
	gg.toast("正在停止音乐")
	for i=1,100 do
		gg.playMusic("stop")
		gg.playMusic("stop")
		gg.playMusic("stop") 
	end
end
----
function Play(gqlb,idb)
	SN = gg.choice(gqlb,nil,ts)
	if SN == nil then XGCK =-1 else
		sn=gg.choice({"播放歌曲","播放并下载"},nil,"歌曲："..gqlb[SN])
		if sn == nil then end
		if sn == 1 then
			play(idb[SN],gqlb[SN])
		end
		if sn == 2 then
			local XEY=gg.makeRequest("http://music.163.com/song/media/outer/url?id="..idb[SN]..".mp3").content
			local XEY1=gg.getFile():gsub("[^/]+$","")..gqlb[SN]..".mp3"
			io.open(XEY1,"w"):write(XEY)
			gg.alert("提示:\n\n音乐已成功下载位置:\n\n"..XEY1)
		end
		XGCK=-1
	end
end
function zjson(jsonr)
	local str = jsonr
	-- 匹配Json Key的正则表达式
	local pattern = "\"[%w]+\":"
	string.gsub(str, pattern, function(v)
		if string.find(str, v) then
			str = string.gsub(str, v, string.gsub(v, "\"", ""))
		end
	end)
	str = string.gsub(str, ":", "=")
	str = string.gsub(str, "%[", "{")
	str = string.gsub(str, "%]", "}")
	local data = "-- WSG PRO 1.0.9(109)\nreturn " .. str
	local res = load(data)()
	return res
end

function json(con)
	res=zjson(con)
	zd=res.result.songCount
	pd=go3-zd
	if pd <= 0 then else go3=zd end
	ts="《"..go1.."》找到"..zd.."首歌曲，当前显示"..go3.."首"
	gqlb={}
	idb={}
	for i=1,go3 do
		gqlb[i]=res.result.songs[i].name
		idb[i]=res.result.songs[i].id
	end
	--print(idb)
end
function YY998() Obtain=gg.makeRequest("https://api.uomg.com/api/rand.music?sort=热歌榜&format=json").content muchen=Obtain:match('url":"(.-)","picurl') gg.playMusic(muchen) end
local function readD (a)
return gg.getValues ( {
	{
		address = a ,
		flags = 4
	}
}) [1].value
end
------------------------------
	
------------------------------
function setvalue(address,flags,value)
local tt = {} tt[1] = {}
tt[1].address = address
tt[1].flags = flags
tt[1].value = value
gg.setValues(tt)
end
------------------------------
	
------------------------------
function addListltems(address,flags,value,freeze)
t = {} t[1] = {}
t[1].address = address
t[1].flags = flags
t[1].value = value
t[1].freeze = freeze
gg.addListItems(t)
end
------------------------------
	
------------------------------
function xfnb(add,lx)
return gg.getValues({
	{
		address = add,flags = lx
	}
})[1].value
end
------------------------------
	
------------------------------
local function RUI(address)
return gg.getValues({{
	address = address, flags = gg.TYPE_QWORD
}})[1].value
end
function setvalue(address,flags,value) local tt = {} tt[1] = {} tt[1].address = address tt[1].flags = flags tt[1].value = value gg.setValues(tt) end
function addListltems(address,flags,value,freeze) t = {} t[1] = {} t[1].address = address t[1].flags = flags t[1].value = value t[1].freeze = freeze gg.addListItems(t) end
local function RUI(address)
return gg.getValues({{
	address = address, flags = gg.TYPE_QWORD
}})[1].value
end
function readPointer(name, offset, i)
local re = gg.getRangesList(name)
local x64 = gg.getTargetInfo().x64
local va = {[true] = 32, [false] = 4
}
if re[i or 1] then
local addr = re[i or 1].start + offset[1]
for i = 2, #offset do
addr = gg.getValues({{
	address = addr, flags = va[x64]}})
if not x64 then
addr[1].value = addr[1].value & 0xBAE0FFFF
end
addr = addr[1].value + offset[i]
end
return addr
end
end
------------------------------
	
------------------------------
function gg.edits(addr, Table, name)
local Table1 = {{}, {}}
for k, v in ipairs(Table) do
local value = {
	address = addr + v[3], value = v[1], flags = v[2], freeze = v[4]}
if v[4] then
Table1[2][#Table1[2] + 1] = value
else
	Table1[1][#Table1[1] + 1] = value
end
end
gg.addListItems(Table1[2])
gg.setValues(Table1[1])
gg.toast((name or "") .. "开启成功, 共修改" .. #Table .. "个值")
end
function LSQ_Chain(so, offset, format, value, type, Function)--模块设置, 偏移量, 功能参数, 修改值, 类型, 功能
getRanges = getRanges or (function()
	local ranges = {}
	local t = gg.getRangesList('^/data/*.so*$')
	for i, v in pairs(t) do
	if v["type"]:sub(2, 2) == 'w' then--判断so是否可读可写
	ranges[#ranges+1] = v
	end
	end
	return ranges
	end)
local rest, ranges, sostart, valtype = {}, getRanges(), nil , gg.TYPE_DWORD
if gg.getTargetInfo()["x64"] then--判断应用程序是否为64位
valtype = gg.TYPE_QWORD
end
------------------------------
	
------------------------------
for i in pairs(ranges) do
local _name = ranges[i]["internalName"]:gsub('^.*/', '')
if so[1] == _name and so[2] == ranges[i]["state"] then
sostart = ranges[i]["start"]
break
end
end
------------------------------
	
------------------------------
if sostart then
if offset[1] then
for i = 1, #offset do
rest = {{
	flags = valtype,address = sostart + offset[i]}}
rest = gg.getValues(rest)
if i == #offset then
break
end
if valtype == gg.TYPE_DWORD then
sostart = rest[1].value & 0xBAE0FFFF--对值进行补位操作
else
	sostart = rest[1].value
end
end
end
print(rest)
if #rest == 1 then

end
return Format(rest, format, value, type, Function)
end
gg.toast("功能:" .. Function .. "开启失败")
print("功能开启失败原因: 未找到静态头")
return os.exit()
end
------------------------------
	
------------------------------
function Format(tab, format, value, type, Function)
if format == "查看" then
tab[1]["flags"] = type
return print(gg.getValues(tab))
elseif format == "修改" then
tab[1]["flags"] = type
tab[1]["value"] = value
return gg.setValues(tab)
elseif format == "冻结" then
tab[1]["flags"] = type
tab[1]["freeze"] = true
tab[1]["name"] = Function or "功能"
return gg.addListItems(tab)
elseif format == "加载" then
tab[1]["flags"] = type
return gg.loadResults(tab)
end
end
------------------------------
	
------------------------------
function split(szFullString, szSeparator) local nFindStartIndex = 1 local nSplitIndex = 1 local nSplitArray = {} while true do local nFindLastIndex = string.find(szFullString, szSeparator, nFindStartIndex) if not nFindLastIndex then nSplitArray[nSplitIndex] = string.sub(szFullString, nFindStartIndex, string.len(szFullString)) break end nSplitArray[nSplitIndex] = string.sub(szFullString, nFindStartIndex, nFindLastIndex - 1) nFindStartIndex = nFindLastIndex + string.len(szSeparator) nSplitIndex = nSplitIndex + 1 end return nSplitArray end function xgxc(szpy, qmxg) for x = 1, #(qmxg) do xgpy = szpy + qmxg[x]["offset"] xglx = qmxg[x]["type"] xgsz = qmxg[x]["value"] gg.setValues({[1] = {
	address = xgpy, flags = xglx, value = xgsz
}}) xgsl = xgsl + 1 end end function xqmnb(qmnb) gg.clearResults() gg.setRanges(qmnb[1]["memory"]) gg.searchNumber(qmnb[3]["value"], qmnb[3]["type"]) if gg.getResultCount() == 0 then gg.toast(qmnb[2]["name"] .. "开启失败") else gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) if gg.getResultCount() == 0 then gg.toast(qmnb[2]["name"] .. "开启失败") else sl = gg.getResults(999999) sz = gg.getResultCount() xgsl = 0 if sz > 999999 then sz = 999999 end for i = 1, sz do pdsz = true for v = 4, #(qmnb) do if pdsz == true then pysz = {} pysz[1] = {} pysz[1].address = sl[i].address + qmnb[v]["offset"] pysz[1].flags = qmnb[v]["type"] szpy = gg.getValues(pysz) pdpd = qmnb[v]["lv"] .. ";" .. szpy[1].value szpd = split(pdpd, ";") tzszpd = szpd[1] pyszpd = szpd[2] if tzszpd == pyszpd then pdjg = true pdsz = true else pdjg = false pdsz = false end end end if pdjg == true then szpy = sl[i].address xgxc(szpy, qmxg) xgjg = true end end if xgjg == true then gg.toast(qmnb[2]["name"] .. "开启成功,共修改" .. xgsl .. "条数据") else gg.toast(qmnb[2]["name"] .. "开启失败") end end end end
function setvalue(address, flags, value)
local tt = {}
tt[1] = {}
tt[1].address = address
tt[1].flags = flags
tt[1].value = value
gg.setValues(tt)
end
function read(address, flags)
local tt = {}
tt[1] = {}
tt[1].address = address
tt[1].flags = flags
filzer = gg.getValues(tt)[1].value
return filzer
end
function getbase(address)
local tt = {}
tt[1] = {}
tt[1].address = address
tt[1].flags = 32
filzer = gg.getValues(tt)[1].value
return filzer
end
------------------------------
	
------------------------------

local json = json--调用
local g = {}
g.file = gg.getFile()
g.sel = nil
gqlb = {
	"请先搜索歌曲",
}
idb = {
	"1010"
}
SN,gc = 1,nil
g.config = gg.getFile():gsub("%lua$", "").."cfg"
function bei()
g.data = loadfile("音乐配置"..g.config)
if g.data ~= nil then
g.sel = g.data()
g.data = nil
end
if g.sel == nil then
g.sel = {
	"","10"
}
end
end
bei()

------------------------------
	
------------------------------


function start(name,sl)
fw = gg.makeRequest("http://music.163.com/api/search/get?s="..name.."&type=1&offset=0&total=true&limit="..sl) return fw end
function play(id,name)
gg.toast("正在播放音乐："..name,true)
gg.playMusic("http://music.163.com/song/media/outer/url?id="..id..".mp3") end

function Play(gqlb,idb)
SN = gg.choice(gqlb,nil,ts) if SN == nil then XGCK =-1 else sn = gg.choice({
	"播放歌曲","播放并下载"
},nil,"歌曲："..gqlb[SN]) if sn == nil then end if sn == 1 then play(idb[SN],gqlb[SN]) end if sn == 2 then
local XEY = gg.makeRequest("http://music.163.com/song/media/outer/url?id="..idb[SN]..".mp3").content local XEY1 = gg.getFile():gsub("[^/]+$","")..gqlb[SN]..".mp3" io.open(XEY1,"w"):write(XEY) gg.toast("提示:\n\n音乐已成功下载位置:\n\n"..XEY1) end XGCK=-1 end end

function zjson(jsonr)
local str = jsonr local pattern = "\"[%w]+\":" string.gsub(str, pattern, function(v) if string.find(str, v) then str = string.gsub(str, v, string.gsub(v, "\"", "")) end end) str = string.gsub(str, ":", "=") str = string.gsub(str, "%[", "{") str = string.gsub(str, "%]", "}") local data = "-- WSG PRO 1.0.9(109)\nreturn " .. str local res = load(data)() return res end

function json(con)
res = zjson(con) zd = res.result.songCount pd = go3-zd if pd <= 0 then else go3 = zd end ts = "《"..go1.."》找到"..zd.."首歌曲，当前显示"..go3.."首" gqlb = {} idb = {} for i = 1,go3 do gqlb[i] = res.result.songs[i].name idb[i] = res.result.songs[i].id
end 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 _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit))
	return _A
end
------------------------------
	
------------------------------
----动态基址写法配置

function PS() end
function setvalue(address,flags,value) PS('修改地址数值(地址,数值类型,要65536)') local tt = {} tt[1] = {} tt[1].address = address tt[1].flags = flags tt[1].value = value gg.setValues(tt) end
---静态基址写法配置
------------------------------
	
------------------------------

function split(szFullString, szSeparator) local nFindStartIndex = 1 local nSplitIndex = 1 local nSplitArray = {} while true do local nFindLastIndex = string.find(szFullString, szSeparator, nFindStartIndex) if not nFindLastIndex then nSplitArray[nSplitIndex] = string.sub(szFullString, nFindStartIndex, string.len(szFullString)) break end nSplitArray[nSplitIndex] = string.sub(szFullString, nFindStartIndex, nFindLastIndex - 1) nFindStartIndex = nFindLastIndex + string.len(szSeparator) nSplitIndex = nSplitIndex + 1 end return nSplitArray end function xgxc(szpy, qmxg) for x = 1, #(qmxg) do xgpy = szpy + qmxg[x]["offset"] xglx = qmxg[x]["type"] xgsz = qmxg[x]["value"] xgdj = qmxg[x]["freeze"] if xgdj == nil or xgdj == "" then gg.setValues({[1] = {
	address = xgpy, flags = xglx, value = xgsz
}}) else gg.addListItems({[1] = {
	address = xgpy, flags = xglx, freeze = xgdj, value = xgsz
}}) end xgsl = xgsl + 1 xgjg = true end end function xqmnb(qmnb) gg.clearResults() gg.setRanges(qmnb[1]["memory"]) gg.searchNumber(qmnb[3]["value"], qmnb[3]["type"]) if gg.getResultCount() == 0 then gg.toast(qmnb[2]["name"] .. "失败") else gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) if gg.getResultCount() == 0 then gg.toast(qmnb[2]["name"] .. "失败") else sl = gg.getResults(999999) sz = gg.getResultCount() xgsl = 0 if sz > 999999 then sz = 999999 end for i = 1, sz do pdsz = true for v = 4, #(qmnb) do if pdsz == true then pysz = {} pysz[1] = {} pysz[1].address = sl[i].address + qmnb[v]["offset"] pysz[1].flags = qmnb[v]["type"] szpy = gg.getValues(pysz) pdpd = qmnb[v]["lv"] .. ";" .. szpy[1].value szpd = split(pdpd, ";") tzszpd = szpd[1] pyszpd = szpd[2] if tzszpd == pyszpd then pdjg = true pdsz = true else pdjg = false pdsz = false end end end if pdjg == true then szpy = sl[i].address xgxc(szpy, qmxg) end end if xgjg == true then gg.toast(qmnb[2]["name"] .. "地址成功,共修改" .. xgsl .. "条数据") else gg.toast(qmnb[2]["name"] .. "失败") end end end end
------------------------------
	
------------------------------
--仿SX写法配置
------------------------------
	
------------------------------
function xqmnb(Search,Modification)
gg.clearResults() gg.setRanges(Search[1].memory) gg.searchNumber(Search[3].value,Search[3].type,false,536870912,0,-1) if gg.getResultCount() == 0 then gg.toast(Search[2].name..'开启失败') return end local Result = gg.getResults(gg.getResultCount()) local sum for index = 4,#Search do sum = 0 for i = 1,#Result do if gg.getValues({{
	address = Result[i].address+Search[index].offset,flags = Search[index].type
}})[1].value ~= Search[index].lv then Result[i].Usable = true sum = sum+1 end end if sum==#Result then gg.toast(Search[2].name..'开启失败') return end end local Data,Freeze,Freezes = {}, {},0 sum = 0 for index,value in ipairs(Modification)do for index = 1,#Result do if not Result[index].Usable then local Value = {
	address = Result[index].address+value.offset,flags = value.type,value = value.value,freeze = true
} if value.freeze then Freeze[#Freeze+1] = Value Freezes = Freezes+1 else Data[#Data+1] = Value end sum = sum+1 end end end gg.setValues(Data) gg.addListItems(Freeze) if Freezes == 0 then gg.toast(Search[2].name..'开启成功,共修改'..sum..'条数据') else gg.toast(Search[2].name..'开启成功,共修改'..sum..'条数据,冻结'..Freezes..'条数据') end gg.clearResults() end



-- 读取内存地址的函数
function readPointer(name, offset, i)
local re = gg.getRangesList(name) local x64 = gg.getTargetInfo().x64 local va = {[true] = 32, [false] = 4
} if re[i or 1] then local addr = re[i or 1].start + offset[1] for i = 2, #offset do addr = gg.getValues({{
		address = addr, flags = va[x64]}}) if not x64 then addr[1].value = addr[1].value & 0xBAE0FFFF end addr = addr[1].value + offset[i] end return addr end end
-- 修改内存地址的函数
function gg.edits(addr, Table, name)
local Table1 = {{}, {}} for k, v in ipairs(Table) do local value = {
	address = addr+v[3], value = v[1], flags = v[2], freeze = v[4]} if v[4] then Table1[2][#Table1[2]+1] = value else Table1[1][#Table1[1]+1] = value end end gg.addListItems(Table1[2]) gg.setValues(Table1[1]) gg.toast((name or "") .. "开启成功, 共修改"..#Table.."个值") end
local Ranges = gg.getRangesList('/')
local function Read(module,type)
for k,v in pairs(Ranges) do
if v['internalName']:match('[^/]*$') == module and v['type'] == type then
return v['start']
end
end
end
------------------------------
	
------------------------------
local Table = {}
local function Modify(address,value,flags)
Table[#Table+1] = {
	address = address,value = value,flags = flags
}
end

------------------------------
	
------------------------------

-- 读取内存地址的函数
function readPointer(name, offset, i)
    local re = gg.getRangesList(name) 
    local x64 = gg.getTargetInfo().x64 
    local va = {[true]=32, [false]=4} 
    if re[i or 1] then
        local addr = re[i or 1].start + offset[1] 
        for i = 2, #offset do
            addr = gg.getValues({{address=addr, flags=va[x64]}}) 
            if not x64 then
                addr[1].value = addr[1].value & 0xFFFFFFFF 
            end
            addr = addr[1].value + offset[i] 
        end
        return addr
    end
end
-- 修改内存地址的函数
function gg.edits(addr, Table, name)
    local Table1 = {{}, {}} 
    for k, v in ipairs(Table) do
        local value = {address = addr+v[3], value = v[1], flags = v[2], freeze = v[4]}
        if v[4] then
            Table1[2][#Table1[2]+1] = value 
        else
            Table1[1][#Table1[1]+1] = value
        end
    end
    gg.addListItems(Table1[2])
    gg.setValues(Table1[1])
end

function getRanges()
local ranges = {}
local t = gg.getRangesList('^/dev/kgsl-3d0*$')
for i, v in pairs(t) do
if v.type:sub(4, 4) == 's' then
table.insert(ranges, v)
end
end
return ranges
end

local function readD(a)
return gg.getValues({{
	address = a,
	flags = gg.TYPE_DWORD
}})[1].value
end

local function readF(a)
return gg.getValues({{
	address = a,
	flags = gg.TYPE_FLOAT
}})[1].value
end
------------------------------
	
------------------------------
function setvalue(address,flags,value)
local t = {}
t[1] = {}
t[1].address = address
t[1].flags = flags
t[1].value = value
gg.setValues(t)
gg.addListItems(t)
end

------------------------------
	
------------------------------
function _V(add,value1,flag,value2)
local num = 0;ednum = 0
if flag == gg.TYPE_DWORD then
readV = readD
elseif flag == gg.TYPE_FLOAT then
readV = readF
else
	os.exit("不支持的类型")
end
local S_list = getRanges()
for i in pairs(S_list) do
num = num+1
addr = S_list[i].start+add
if readV(addr) == value1 then
setvalue(addr,flag,value2)
ednum = ednum+1
end
end
return "遍历了"..num.."个地址\n".."修改了"..ednum.."个地址"
end

function PS() end
function setvalue(address,flags,value) PS('修改地址数值(地址,数值类型,要修改的值)') local tt={} tt[1]={} tt[1].address=address tt[1].flags=flags tt[1].value=value gg.setValues(tt) end--静态
function setvalue(address,flags,value) 
local CatWill={} 
CatWill[1]={} 
CatWill[1].address=address 
CatWill[1].flags=flags 
CatWill[1].value=value 
gg.setValues(CatWill) 
end
function readPointer(name, offset, i)
	local re = gg.getRangesList(name)
	local x64 = gg.getTargetInfo().x64
	local va = {[true] = 32, [false] = 4}
	if re[i or 1] then
		local addr = re[i or 1].start + offset[1]
		for i = 2, #offset do
			addr = gg.getValues({{address = addr, flags = va[x64]}})
			if not x64 then
				addr[1].value = addr[1].value & 0xFFFFFFFF
			end
			addr = addr[1].value + offset[i]
		end
		return addr
	end
end

function gg.edits(addr, Table, name)
	local Table1 = {{}, {}}
	for k, v in ipairs(Table) do
		local value = {address = addr + v[3], value = v[1], flags = v[2], freeze = v[4]}
		if v[4] then
			Table1[2][#Table1[2] + 1] = value
		else
			Table1[1][#Table1[1] + 1] = value
		end
	end
	gg.addListItems(Table1[2])
	gg.setValues(Table1[1])
end










































bglist={
	getHorizontalBG({0xffe9e9e9,0xffe9e9e9},12),
	getHorizontalBG({0xff7F58FF,0xff2964FF,0xff5399FF},12),
	getHorizontalBG({0xaaffffff,0xaaffffff},12,3,0xaa232323),
	
}


function huiz()---绘制必须放在这里面
draw.setColor('#00FFFF')
draw.setSize(40)draw.setStyle('描边并填充')
--绘制内容请写到这里面，否则会消失
			     

	

	
end

titlet="小白脚本"

stitle = "小白"

stab = {
--菜单名字，添加即可加页数，需要与结尾配置表对应
	{"公告","http://wl.luoyeyun.icu/view.php/c2f7d93245e39d0e1cf1120be80ca3f1.png"},
	{"防封","http://wl.luoyeyun.icu/view.php/c2f7d93245e39d0e1cf1120be80ca3f1.png"},
	{"功能","http://wl.luoyeyun.icu/view.php/c2f7d93245e39d0e1cf1120be80ca3f1.png"},
	{"全火功能","http://wl.luoyeyun.icu/view.php/c2f7d93245e39d0e1cf1120be80ca3f1.png"},
    {"设置","http://wl.luoyeyun.icu/view.php/c2f7d93245e39d0e1cf1120be80ca3f1.png"},	
}




xfcpic = "http://wl.luoyeyun.icu/view.php/c2f7d93245e39d0e1cf1120be80ca3f1.png"
--悬浮窗链接或路径
---公告
changan.menu(
	{
		{--1
		
		changan.button("选择进程", 
                   function()
                   gg.setConfig("冻结间隔", 0)
                   gg.setConfig("快速冻结", 1)
				string.toMusic("请选择游戏进程") 
			gg.setProcessX()
			end),

					changan.button("假话叫爹", 
                   function()
			gg.playMusic("/storage/emulated/0/芒果全防/假话叫爹.mp3")
			end),
					
					changan.button("删除云验证自动登录配置文件",
function()
    local pathList = {
        "/storage/emulated/0/芒果全防/2配置(不可修改).LUA",
        "/storage/emulated/0/芒果全防/1配置(不可修改).LUA",
        "/storage/emulated/0/芒果全防/芒果全防配置.txt"
    }
    pcall(function()
        for _, path in ipairs(pathList) do
            os.remove(path)
        end
    end)
end)


		}, {
--2功能changan.button("选择进程", gg.setProcessX),
			--changan.text("文字演示","#0077FF","20sp"),
			--changan.text("文字演示文字演示文字演示","#545454","10sp"),
         changan.button("选择进程",
		      	function()
		      	gg.setConfig("冻结间隔", 0)
                gg.setConfig("快速冻结", 1)
				string.toMusic("请选择游戏进程") 
			gg.setProcessX()
			end),

		
		changan.switch(
				"防闪",
				function()
if gg.getRangesList("libanogs.so:bss")[1] then
	local t = {}
	t[1] = gg.getRangesList("libanogs.so:bss")[1]["start"] + 0x25CB44; --初源工具箱 数值地址:0x6EDFF6ECA0
	gg.addListItems({
		[1] = { 
			address = t[1],
			flags = 4,
			value = 4096,
			freeze = true,
		},
	})
	gg.toast("防闪开启成功")
end
string.toMusic("防闪开启成功")
end),
             
            
             

		changan.switch(
				"LOGO¹",
				function()
if gg.getRangesList("libUE4.so")[1] then
	local t = {}
	t[1] = gg.getRangesList("libUE4.so")[1]["start"] + 0x82F0F8C; -- 数值地址:0x7627F8EF8C
	t[2] = gg.getRangesList("libUE4.so")[1]["start"] + 0x82F0F94; -- 数值地址:0x7627F8EF94
	gg.addListItems({
		[1] = { 
			address = t[1],
			flags = 4,
			value = -721215457,
			freeze = true,
		},
		[2] = { 
			address = t[2],
			flags = 4,
			value = 335544397,
			freeze = true,
		},
	})
	gg.toast("防封开启成功")
end
if gg.getRangesList("libanogs.so")[1] then
	local t = {}
	t[1] = gg.getRangesList("libanogs.so")[1]["start"] + 0x1DEFF0; -- 数值地址:0x76F7605FF0
	t[2] = gg.getRangesList("libanogs.so")[1]["start"] + 0x1DF4B4; -- 数值地址:0x76F76064B4
	t[3] = gg.getRangesList("libanogs.so")[1]["start"] + 0x1DF62C; -- 数值地址:0x76F760662C
	t[4] = gg.getRangesList("libanogs.so")[1]["start"] + 0x213000; -- 数值地址:0x76F763A000
	t[5] = gg.getRangesList("libanogs.so")[1]["start"] + 0x213F88; -- 数值地址:0x76F763AF88
	t[6] = gg.getRangesList("libanogs.so")[1]["start"] + 0x2142E0; -- 数值地址:0x76F763B2E0
	t[7] = gg.getRangesList("libanogs.so")[1]["start"] + 0x21AFA0; -- 数值地址:0x76F7641FA0
	t[8] = gg.getRangesList("libanogs.so")[1]["start"] + 0x227080; -- 数值地址:0x76F764E080
	t[9] = gg.getRangesList("libanogs.so")[1]["start"] + 0x2CA7A4; -- 数值地址:0x76F76F17A4
	t[10] = gg.getRangesList("libanogs.so")[1]["start"] + 0x2E281C; -- 数值地址:0x76F770981C
	t[11] = gg.getRangesList("libanogs.so")[1]["start"] + 0x31DCE0; -- 数值地址:0x76F7744CE0
	t[12] = gg.getRangesList("libanogs.so")[1]["start"] + 0x31DD2C; -- 数值地址:0x76F7744D2C
	t[13] = gg.getRangesList("libanogs.so")[1]["start"] + 0x31E744; -- 数值地址:0x76F7745744
	t[14] = gg.getRangesList("libanogs.so")[1]["start"] + 0x3304B8; -- 数值地址:0x76F77574B8
	t[15] = gg.getRangesList("libanogs.so")[1]["start"] + 0x3386C4; -- 数值地址:0x76F775F6C4
	t[16] = gg.getRangesList("libanogs.so")[1]["start"] + 0x362A00; -- 数值地址:0x76F7789A00
	t[17] = gg.getRangesList("libanogs.so")[1]["start"] + 0x362C38; -- 数值地址:0x76F7789C38
	t[18] = gg.getRangesList("libanogs.so")[1]["start"] + 0x37C958; -- 数值地址:0x76F77A3958
	t[19] = gg.getRangesList("libanogs.so")[1]["start"] + 0x37F82C; -- 数值地址:0x76F77A682C
	t[20] = gg.getRangesList("libanogs.so")[1]["start"] + 0x37FDD0; -- 数值地址:0x76F77A6DD0
	t[21] = gg.getRangesList("libanogs.so")[1]["start"] + 0x387990; -- 数值地址:0x76F77AE990
	t[22] = gg.getRangesList("libanogs.so")[1]["start"] + 0x39F598; -- 数值地址:0x76F77C6598
	t[23] = gg.getRangesList("libanogs.so")[1]["start"] + 0x39F674; -- 数值地址:0x76F77C6674
	t[24] = gg.getRangesList("libanogs.so")[1]["start"] + 0x39F76C; -- 数值地址:0x76F77C676C
	t[25] = gg.getRangesList("libanogs.so")[1]["start"] + 0x3A0BF8; -- 数值地址:0x76F77C7BF8
	t[26] = gg.getRangesList("libanogs.so")[1]["start"] + 0x3AFF1C; -- 数值地址:0x76F77D6F1C
	t[27] = gg.getRangesList("libanogs.so")[1]["start"] + 0x3DFAE0; -- 数值地址:0x76F7806AE0
	t[28] = gg.getRangesList("libanogs.so")[1]["start"] + 0x43A018; -- 数值地址:0x76F7861018
	t[29] = gg.getRangesList("libanogs.so")[1]["start"] + 0x49AA48; -- 数值地址:0x76F78C1A48
	t[30] = gg.getRangesList("libanogs.so")[1]["start"] + 0x51FA80; -- 数值地址:0x76F7946A80
	t[31] = gg.getRangesList("libanogs.so")[1]["start"] + 0x51FA84; -- 数值地址:0x76F7946A84
	gg.addListItems({
		[1] = { 
			address = t[1],
			flags = 4,
			value = -698416192,
			freeze = true,
		},
		[2] = { 
			address = t[2],
			flags = 4,
			value = -698416192,
			freeze = true,
		},
		[3] = { 
			address = t[3],
			flags = 4,
			value = -698416192,
			freeze = true,
		},
		[4] = { 
			address = t[4],
			flags = 4,
			value = -698416192,
			freeze = true,
		},
		[5] = { 
			address = t[5],
			flags = 4,
			value = -721215457,
			freeze = true,
		},
		[6] = { 
			address = t[6],
			flags = 4,
			value = -698416192,
			freeze = true,
		},
		[7] = { 
			address = t[7],
			flags = 4,
			value = -721215457,
			freeze = true,
		},
		[8] = { 
			address = t[8],
			flags = 4,
			value = 706675680,
			freeze = true,
		},
		[9] = { 
			address = t[9],
			flags = 4,
			value = -721215457,
			freeze = true,
		},
		[10] = { 
			address = t[10],
			flags = 4,
			value = -721215457,
			freeze = true,
		},
		[11] = { 
			address = t[11],
			flags = 4,
			value = -721215457,
			freeze = true,
		},
		[12] = { 
			address = t[12],
			flags = 4,
			value = 706675680,
			freeze = true,
		},
		[13] = { 
			address = t[13],
			flags = 4,
			value = -721215457,
			freeze = true,
		},
		[14] = { 
			address = t[14],
			flags = 4,
			value = -721215457,
			freeze = true,
		},
		[15] = { 
			address = t[15],
			flags = 4,
			value = -721215457,
			freeze = true,
		},
		[16] = { 
			address = t[16],
			flags = 4,
			value = -721215457,
			freeze = true,
		},
		[17] = { 
			address = t[17],
			flags = 4,
			value = -721215457,
			freeze = true,
		},
		[18] = { 
			address = t[18],
			flags = 4,
			value = -721215457,
			freeze = true,
		},
		[19] = { 
			address = t[19],
			flags = 4,
			value = 706675680,
			freeze = true,
		},
		[20] = { 
			address = t[20],
			flags = 4,
			value = -721215457,
			freeze = true,
		},
		[21] = { 
			address = t[21],
			flags = 4,
			value = 335544356,
			freeze = true,
		},
		[22] = { 
			address = t[22],
			flags = 4,
			value = 335544356,
			freeze = true,
		},
		[23] = { 
			address = t[23],
			flags = 4,
			value = 335544356,
			freeze = true,
		},
		[24] = { 
			address = t[24],
			flags = 4,
			value = 706675689,
			freeze = true,
		},
		[25] = { 
			address = t[25],
			flags = 4,
			value = -698416192,
			freeze = true,
		},
		[26] = { 
			address = t[26],
			flags = 4,
			value = -721215457,
			freeze = true,
		},
		[27] = { 
			address = t[27],
			flags = 4,
			value = 943720076,
			freeze = true,
		},
		[28] = { 
			address = t[28],
			flags = 4,
			value = 335544326,
			freeze = true,
		},
		[29] = { 
			address = t[29],
			flags = 4,
			value = 943719433,
			freeze = true,
		},
		[30] = { 
			address = t[30],
			flags = 4,
			value = -698416192,
			freeze = true,
		},
		[31] = { 
			address = t[31],
			flags = 4,
			value = -698416192,
			freeze = true,
		},
	})
	gg.toast("防封开启成功")
end
string.toMusic("LOGO1 开启成功")
end),
		
						
					
		}, {
 changan.switch(
            "静态广角",
            function()

OP=gg.prompt({'1到3'},{[1]='1.2'},{[1]='number'})---广角
	if OP == nil or OP[1] == '' or OP[1] == '0' then gg.toast("取消")
		else
so=gg.getRangesList('libUE4.so')[1].start
py=0x3594978
setvalue(so+py,16,OP[1])

end

string.toMusic('开启成功')            
             
            end),
            
            changan.switch(
            "动态广角",
            function()
            
k = gg.prompt({"你的数值修改: [90;150]"},{"110"},{"number"})
if k== nil then else
Q=k[1]
local t = {"libUE4.so:bss", "Cb"}
local tt = {0x555C70,0x30,0x4B8,0x1D50,0x39C}
local ttt = S_Pointer(t, tt, true)
gg.setValues({{address = ttt, flags = 16, value = Q}})
end
 string.toMusic('开启成功')                       
             
            end),
            
           
            changan.switch(
            "锁帧",
            function()
            
local t = {"libUE4.so:bss", "Cb"}
local tt = {0x26E8, 0x34}
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 = {0x26E8, 0x38}
local ttt = S_Pointer(t, tt, true)
gg.addListItems({{address = ttt, flags = 16, value = 120, freeze = true}})

  string.toMusic('开启成功')                      
             
            end),

           
            
        changan.switch(
            "手持特效",
            function()
            
local t = {"libUE4.so:bss", "Cb"}
local tt = {0x555C70,0x30,0x4B8,0x2A90,0x7E8,0xCF8}
local ttt = S_Pointer(t, tt, true)
gg.setValues({{address = ttt, flags = 16, value = 9990}})
local t = {"libUE4.so:bss", "Cb"}
local tt = {0x555C70,0x30,0x4B8,0x2A90,0x7E8,0xCF8}
local ttt = S_Pointer(t, tt, true)
gg.setValues({{address = ttt, flags = 16, value =9990}})
local t = {"libUE4.so:bss", "Cb"}
local tt = {0x5C4570,0x30,0x4C8,0x5A0,0x90}
local ttt = S_Pointer(t, tt, true)
gg.setValues({{address = ttt, flags = 16, value =9990}})
local t = {"libUE4.so:bss", "Cb"}
local tt = {0x5C4570,0x30,0x4C8,0x5A0,0xD0}
local ttt = S_Pointer(t, tt, true)
gg.setValues({{address = ttt, flags = 16, value =9990}})
--深度
local t = {"libUE4.so:bss", "Cb"}
local tt = {0x5C4570,0x30,0x4C8,0x5A0,0x14}
local ttt = S_Pointer(t, tt, true)
gg.setValues({{address = ttt, flags = 16, value = 99}})
local t = {"libUE4.so:bss", "Cb"}
local tt = {0x5C4570,0x30,0x4C8,0x5A0,0x54}
local ttt = S_Pointer(t, tt, true)
gg.setValues({{address = ttt, flags = 16, value =99}})
local t = {"libUE4.so:bss", "Cb"}
local tt = {0x5C4570,0x30,0x4C8,0x5A0,0x94}
local ttt = S_Pointer(t, tt, true)
gg.setValues({{address = ttt, flags = 16, value =99}})
local t = {"libUE4.so:bss", "Cb"}
local tt = {0x5C4570,0x30,0x4C8,0x5A0,0xD4}
local ttt = S_Pointer(t, tt, true)
gg.setValues({{address = ttt, flags = 16, value =99}})

string.toMusic('开启成功')            
            
             
            end),     
              
       
          
changan.switch("手持据点",
function()
local t = {"libUE4.so:bss", "Cb"}
local tt = {0x555C70,0x30,0x4B8,0x2A90,0x7E8,0xC2C}
local ttt = S_Pointer(t, tt, true)
gg.addListItems({{address = ttt, flags = 16, value = 0, freeze = true}})---手持据点


string.toMusic('开启成功')            
--gg.playMusic("https://cccimg.com/view.php/74383ed3cf8b749d697a9f01fe326831.mp3")
gg.toast("枪械据点开启成功")			
end,
function()
local t = {"libUE4.so:bss", "Cb"}
local tt = {0x555C70,0x30,0x4B8,0x2A90,0x7E8,0xC3C}
local ttt = S_Pointer(t, tt, true)
gg.addListItems({{address = ttt, flags = 16, value = 0, freeze = true}})---手持据点

					
end),


changan.switch("手持秒收枪",
function()
local t = {"libUE4.so:bss", "Cb"}
local tt = {0x555C70,0x30,0x4B8,0x2A90,0x7E8,0x248}
local ttt = S_Pointer(t, tt, true)
gg.addListItems({{address = ttt, flags = 16, value = 0, freeze = true}})---手持秒收枪


string.toMusic('开启成功')            
--gg.playMusic("https://cccimg.com/view.php/74383ed3cf8b749d697a9f01fe326831.mp3")
gg.toast("秒收枪开启成功")			
end,
function()
local t = {"libUE4.so:bss", "Cb"}
local tt = {0x555C70,0x30,0x4B8,0x2A90,0x7E8,0x24C}
local ttt = S_Pointer(t, tt, true)
gg.addListItems({{address = ttt, flags = 16, value = 0, freeze = true}})---手持秒收枪

					
end),


changan.switch("手持射速",
function()
local t = {"libUE4.so:bss", "Cb"}
local tt = {0x555C70,0x30,0x4B8,0x2A90,0x7E8,0x5A0}
local ttt = S_Pointer(t, tt, true)
gg.addListItems({{address = ttt, flags = 16, value = 0, freeze = true}})---手持秒收枪

string.toMusic('开启成功')            
gg.toast("射速开启成功")			
end),

    
    changan.switch("手持瞬击",
function()
local t = {"libUE4.so:bss", "Cb"}
local tt = {0x555C70,0x30,0x4B8,0x2A90,0x7E8,0x560}
local ttt = S_Pointer(t, tt, true)
gg.addListItems({{address = ttt, flags = 16, value = 0, freeze = true}})---手持秒收枪

string.toMusic('开启成功')            
gg.toast("瞬击开启成功")			
end),

    
    
 
changan.switch("手持防抖",
function()

local t = {"libUE4.so:bss", "Cb"}
local tt = {0x555C70,0x30,0x4B8,0x2A90,0x7E8,0xCF4}
local ttt = S_Pointer(t, tt, true)
gg.addListItems({{address = ttt, flags = 16, value = 0, freeze = true}})---手持防抖


local t = {"libUE4.so:bss", "Cb"}
local tt = {0x555C70,0x30,0x4B8,0x2A90,0x7E8,0xCEC}
local ttt = S_Pointer(t, tt, true)
gg.addListItems({{address = ttt, flags = 16, value = 0, freeze = true}})---手持防抖

local t = {"libUE4.so:bss", "Cb"}
local tt = {0x555C70,0x30,0x4B8,0x2A90,0x7E8,0xCF0}
local ttt = S_Pointer(t, tt, true)
gg.addListItems({{address = ttt, flags = 16, value = 0, freeze = true}})---手持防抖
string.toMusic('开启成功')            
gg.toast("枪械防抖开启成功")			
end,
function()

local t = {"libUE4.so:bss", "Cb"}
local tt = {0x5D0470,0x30,0x440,0x29A0,0x770,0xBF4}
local ttt = S_Pointer(t, tt, true)
gg.addListItems({{address = ttt, flags = 16, value = 0, freeze = true}})---手持防抖


local t = {"libUE4.so:bss", "Cb"}
local tt = {0x5D0470,0x30,0x440,0x29A0,0x770,0xBFC}
local ttt = S_Pointer(t, tt, true)
gg.addListItems({{address = ttt, flags = 16, value = 0, freeze = true}})---手持防抖

local t = {"libUE4.so:bss", "Cb"}
local tt = {0x5D0470,0x30,0x440,0x29A0,0x770,0xBF8}
local ttt = S_Pointer(t, tt, true)
gg.addListItems({{address = ttt, flags = 16, value = 0, freeze = true}})---手持防抖
end),



		
        changan.switch(
				"弹孔变大",
			function()
if gg.getRangesList("libUE4.so")[1] then
	local t = {}
	t[1] = gg.getRangesList("libUE4.so")[1]["start"] + 0x60CCB0C; --不要工具箱 数值地址:0x78A08E6EDC
	gg.setValues({
		[1] = { 
			address = t[1],
			flags = 16,
			value = 8.57951974e-21,
		},
	})  
	gg.toast("弹孔变大开启成功") 
end  
string.toMusic("开启成功")
end),




     changan.switch("微加速",
function()

local t = {"libUE4.so:bss", "Cb"}
local tt = {0x555C70,0x30,0x4B8,0x1168}
local ttt = S_Pointer(t, tt, true)
gg.addListItems({{address = ttt, flags = 16, value = 3, freeze = true}})---手持无后

string.toMusic('微加速开启成功')            

					
end),
			
			
			changan.switch("原地罚站",
function()

local t = {"libUE4.so:bss", "Cb"}
local tt = {0x555C70,0x30,0x4B8,0x1168}
local ttt = S_Pointer(t, tt, true)
gg.addListItems({{address = ttt, flags = 16, value = 0, freeze = true}})---手持无后

string.toMusic('原地罚站开启成功')            
end),
			
		changan.switch("一枪秒",
function()
k = gg.prompt({"你的数值修改: [1;40]"},{"5"},{"number"})
if k== nil then else
Q=k[1]
local t = {"libUE4.so:bss", "Cb"}
local tt = {0x555C70,0x30,0x4B8,0x2A90,0x7E8,0x648}
local ttt = S_Pointer(t, tt, true)
gg.setValues({{address = ttt, flags = 16, value = Q}})

end
 string.toMusic('一枪秒开启成功')   
 end),
 
 
 
 changan.switch("人物大小",
function()
k = gg.prompt({"推荐0.20~0.50"},{"0.35"},{"number"})
if k== nil then else
Q=k[1]
local t = {"libUE4.so:bss", "Cb"}
local tt = {0x555C70,0x30,0x4B8,0x510,0x1FC}
local ttt = S_Pointer(t, tt, true)
gg.setValues({{address = ttt, flags = 16, value = Q}})

local t = {"libUE4.so:bss", "Cb"}
local tt = {0x555C70,0x30,0x4B8,0x510,0x200}
local ttt = S_Pointer(t, tt, true)
gg.setValues({{address = ttt, flags = 16, value = Q}})

local t = {"libUE4.so:bss", "Cb"}
local tt = {0x555C70,0x30,0x4B8,0x510,0x204}
local ttt = S_Pointer(t, tt, true)
gg.setValues({{address = ttt, flags = 16, value = Q}})

end
 string.toMusic('人物大小开启成功')   
 end),
 
 
 
 
        changan.switch("人物倾斜",
function()
k = gg.prompt({"推荐1~80"},{"80"},{"number"})
if k== nil then else
Q=k[1]
local t = {"libUE4.so:bss", "Cb"}
local tt = {0x555C70,0x30,0x4B8,0x510,0x1F0}
local ttt = S_Pointer(t, tt, true)
gg.setValues({{address = ttt, flags = 16, value = Q}})

end
 string.toMusic('人物倾斜开启成功')          
               
                             
end),


		}, {
		changan.switch("功能", 
                   function()
				string.toMusic("请选择游戏进程") 
			gg.setProcessX()
			end),
				
		changan.switch("功能", 
                   function()
				string.toMusic("请选择游戏进程") 
			gg.setProcessX()
			end),
			
		},{
			changan.button("退出脚本",function()
				luajava.setFloatingWindowHide(false)
				tuichu=1
				end),	
			
		},{
			
		},{
			
		},{
			
		},{
			
		},{
			
		},{
			
		}


	})
--配置表添加表即可加页数，只需要与上边菜单标题数对应




