function getModuleBase(name) local ranges = gg.getRangesList(name) for i, v in ipairs(ranges) do if v.state == "Xa" or v.state == "Xs" then return v.start end end return 0 end function getZZ(addr) if addr == 0 then return 0 end local t = gg.getValues({{address = addr, flags = gg.TYPE_QWORD}}) if #t > 0 then return t[1].value end return 0 end function getDword(addr) if addr == 0 then return 0 end local t = gg.getValues({{address = addr, flags = gg.TYPE_DWORD}}) if #t > 0 then return t[1].value end return 0 end function getSelf(libbase) if libbase == 0 then return 0 end local a = getZZ(libbase + 0x16B24CC8) if a == 0 then return 0 end a = getZZ(a + 0xC0) if a == 0 then return 0 end a = getZZ(a + 0x88) if a == 0 then return 0 end a = getZZ(a + 0x30) if a == 0 then return 0 end a = getZZ(a + 0x34A0) return a end function checkParachute() local UE4 = getModuleBase("libUE4.so") if UE4 == 0 then return -1 end local Self = getSelf(UE4) if Self == 0 then return -1 end local status = getDword(Self + 0x4040) return status 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]["value"] = value tab[1]["name"] = Function or "功能" return gg.addListItems(tab) elseif format == "加载" then tab[1]["flags"] = type return gg.loadResults(tab) end 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 ranges[#ranges+1] = v end end return ranges end) local rest, ranges, sostart, valtype = {}, getRanges(), nil, gg.TYPE_DWORD if gg.getTargetInfo()["x64"] then 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 & 0xFFFFFFFF else sostart = rest[1].value end end end return Format(rest, format, value, type, Function) end gg.toast("功能:" .. Function .. "开启失败") print("功能开启失败原因: 未找到基址头") return os.exit() end function enableSpeed() DM="加速已开启" gg.playMusic("https://fanyi.baidu.com/gettts?lan=zh&text="..DM.."&spd=5&source=wise") LSQ_Chain({'libUE4.so:bss','Cb'},{0xAD0510, 0x30,0x5D8,0x90},"冻结","2",16,"微加速") LSQ_Chain({'libUE4.so:bss','Cb'},{0xAD0510,0x30,0x5D8,0xC78,0x29C},"冻结","999999",16,"0.05防拉") LSQ_Chain({'libUE4.so:bss','Cb'},{0xAD0510,0x30,0x5D8,0xC78,0x270},"冻结","0",16,"60000防拉") LSQ_Chain({'libUE4.so:bss','Cb'},{0xAD0510,0x30,0x5D8,0xC78,0x2F4},"冻结","0",16,"7500防拉") LSQ_Chain({'libUE4.so:bss','Cb'},{0xAD0510,0x30,0x5D8,0xC78,0x280},"冻结","0",16,"落地后摇") end function disableSpeed() LSQ_Chain({'libUE4.so:bss','Cb'},{0xAD0510, 0x30,0x5D8,0x90},"冻结","1",16,"微加速") LSQ_Chain({'libUE4.so:bss','Cb'},{0xAD0510,0x30,0x5D8,0xC78,0x29C},"冻结","0.05",16,"0.05防拉") LSQ_Chain({'libUE4.so:bss','Cb'},{0xAD0510,0x30,0x5D8,0xC78,0x270},"冻结","60000",16,"60000防拉") LSQ_Chain({'libUE4.so:bss','Cb'},{0xAD0510,0x30,0x5D8,0xC78,0x2F4},"冻结","7500",16,"7500防拉") LSQ_Chain({'libUE4.so:bss','Cb'},{0xAD0510,0x30,0x5D8,0xC78,0x280},"冻结","2",16,"落地后摇") end local lastStatus = -1 local speedEnabled = false while true do local status = checkParachute() if status == -1 then if lastStatus ~= -1 then lastStatus = -1 gg.toast("未获取到游戏基址") if speedEnabled then disableSpeed() speedEnabled = false end end elseif status ~= 0 then if not speedEnabled then enableSpeed() speedEnabled = true gg.toast("跳伞加速已开启") end lastStatus = 1 else if speedEnabled then disableSpeed() speedEnabled = false gg.toast("跳伞加速已关闭") end lastStatus = 0 end gg.sleep(800) end