local 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 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 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(0x315fdca1) 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 readAdd(add) t=gg.getValues({[1]={address=add,flags=32}}) add=string.format("%X",t[1].value) if (#add)==16 then add=add:sub(9,16) end if (#add)==1 then add=add.."0000000" else add=string.format("%d","0x"..add) end return add end function getAdd(so,offset,off1) add=gg.getRangesList(so)[1].start add=readAdd(add+offset) return add 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 local function readD ( a ) return gg.getValues ( { { address = a , flags = 4 } } ) [ 1 ].value 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 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 end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A 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 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 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 & 0xFFFFFFFF end addr = addr[1].value + offset[i] end return addr end end function gg.edits(addr, Table) 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 Main() SN = gg.multiChoice({ "枪械美化", "退出脚本" }, nil, "by息白") if SN == nil then else if SN[1] == true then a() end if SN[2] == true then Exit() end end XGCK = -1 end function a() local cfg_file = "/sdcard/息白/枪械美化配置.ini" local chunk = loadfile(cfg_file) local cfg = nil if chunk ~= nil then cfg = chunk() end if cfg == nil then cfg = { 1101001213--ak , 1101002029--m16 , 1101003146--sc , 1101004046--m416 , 1101005055--GROZA , 1101006033--AUG , 10100700--QBZ , 1101008081--M762 , 1101009011--mk47 , 1101010012--g36c , 10101200--蜜罐11 , 1102001024--UZI12 , 1102002061--UMP45 , 1102003080--Vector , 1102004018--汤姆逊 , 1102005007--野牛 , 10200600--MP5K , 1102105002--P90 , 1103001154--98K , 1103002018--m24 , 1103003022--awm , 1103004037--sks22 , 1103005024--vss23 , 10300600--mini14 , 1103007020--mk1425 , 1103008014--win94 , 10300900--slr27 , 10301000--QBU , 1103011001--莫辛纳甘 , 1103012010--amr , 10301300--m417 , 1104001027--s686 , 1104002022--s189 , 1104003031--s12k , 1104004021--dbs , 1105001020--m249 , 1105002035--大盘鸡 , 1105010008--mg3 , 1108001057--大砍刀 , 1108002046--撬棍 , 1108003001--镰刀 , 1108004009--平底锅 , 1010042029--红点 , 1010042028--全息瞄准键 , 1010042027--2倍镜 , 1010042026--3倍镜 , 1010042025--4倍镜 , 1010042024--6被 , 1030020242--八倍 , 1010040462--m4苗具 , 1010040461--m4枪托 , 1010040463--m4弹夹 , true} end QiuCi = gg.prompt({ "AKM美化代码:",--1 "M16A4美化代码:",--2 "SCAR-L美化代码:",--3 "M416美化代码:",--4 "GROZA美化代码:",--5 "AUG美化代码:",--6 "QBZ美化代码:",--7 "M762美化代码:",--8 "MK47美化代码:",--9 "G36C美化代码:",--10 "蜜罐美化代码:",--11 "UZI美化代码:",--12 "UMP45美化代码:",--13 "Vector美化代码:",--14 "汤姆逊美化代码:",--15 "野牛美化代码:",--16 "MP5K美化代码:",--17 "P90美化代码:",--18 "98K美化代码:",--19 "M24美化代码:",--20 "AWM美化代码:",--21 "SKS美化代码:",--22 "VSS美化代码:",--23 "Mini14美化代码:",--24 "Mk14美化代码:",--25 "Win94美化代码:",--26 "SLR美化代码:",--27 "QBU美化代码:",--28- "莫辛纳甘美化代码:",--29 "AMR美化代码:",--30 "M417美化代码:",--31 "S686美化代码:",--32 "S1897代码:",--33 "S12K美化代码:",--34 "DBS美化代码:",--35 "M249美化代码:",--36 "大盘鸡美化代码:",--37 "MG3美化代码:",--38 "大砍刀美化代码:",--39 "撬棍美化代码:",--40 "镰刀美化代码:",--41 "平底锅美化代码:",--42 "红点瞄准镜美化代码:",--43 "全息瞄准镜美化代码:",--44 "二倍瞄准镜美化代码:",--45 "三倍瞄准镜美化代码:",--46 "四倍瞄准镜美化代码:",--47 "六倍瞄准镜美化代码:",--48 "八倍瞄准镜美化代码:",--49 "M4瞄具美化代码:",--50 "M4枪托美化代码:",--51 "M4弹夹美化代码:",--52 },cfg,{ "text",--1 "text",--2 "text",--3 "text",--4 "text",--5 "text",--6 "text",--7 "text",--8 "text",--9 "text",--10 "text",--11 "text",--12 "text",--13 "text",--14 "text",--15 "text",--16 "text",--17 "text",--18 "text",--19 "text",--20 "text",--21 "text",--22 "text",--23 "text",--24 "text",--25 "text",--26 "text",--27 "text",--28 "text",--29 "text",--30 "text",--31 "text",--32 "text",--33 "text",--34 "text",--35 "text",--36 "text",--37 "text",--38 "text",--39 "text",--40 "text",--41 "text",--42 "text",--43 "text",--44 "text",--45 "text",--46 "text",--47 "text",--48 "text",--49 "text",--50 "text",--52 "text"--53 }) if QiuCi == nil then else gg.saveVariable(QiuCi, cfg_file) if QiuCi[1] == true then QiuCi1() end if QiuCi[2] == true then QiuCi2() end if QiuCi[3] == true then QiuCi3() end if QiuCi[4] == true then QiuCi4() end if QiuCi[5] == true then QiuCi5() end if QiuCi[6] == true then QiuCi6() end if QiuCi[7] == true then QiuCi7() end if QiuCi[8] == true then QiuCi8() end if QiuCi[9] == true then QiuCi9() end if QiuCi[10] == true then QiuCi10() end if QiuCi[11] == true then QiuCi11() end if QiuCi[12] == true then QiuCi12() end if QiuCi[13] == true then QiuCi13() end if QiuCi[14] == true then QiuCi14() end if QiuCi[15] == true then QiuCi15() end if QiuCi[16] == true then QiuCi16() end if QiuCi[17] == true then QiuCi17() end if QiuCi[18] == true then QiuCi18() end if QiuCi[19] == true then QiuCi19() end if QiuCi[20] == true then QiuCi20() end if QiuCi[21] == true then QiuCi21() end if QiuCi[22] == true then QiuCi22() end if QiuCi[23] == true then QiuCi23() end if QiuCi[24] == true then QiuCi24() end if QiuCi[25] == true then QiuCi25() end if QiuCi[26] == true then QiuCi26() end if QiuCi[27] == true then QiuCi27() end if QiuCi[28] == true then QiuCi28() end if QiuCi[29] == true then QiuCi29() end if QiuCi[30] == true then QiuCi30() end if QiuCi[31] == true then QiuCi31() end if QiuCi[32] == true then QiuCi32() end if QiuCi[33] == true then QiuCi33() end if QiuCi[34] == true then QiuCi34() end if QiuCi[35] == true then QiuCi35() end if QiuCi[36] == true then QiuCi36() end if QiuCi[37] == true then QiuCi37() end if QiuCi[38] == true then QiuCi38() end if QiuCi[39] == true then QiuCi39() end if QiuCi[40] == true then QiuCi40() end if QiuCi[41] == true then QiuCi41() end if QiuCi[42] == true then QiuCi42() end if QiuCi[43] == true then QiuCi43() end if QiuCi[44] == true then QiuCi44() end if QiuCi[45] == true then QiuCi45() end if QiuCi[46] == true then QiuCi46() end if QiuCi[47] == true then QiuCi47() end if QiuCi[48] == true then QiuCi48() end if QiuCi[49] == true then QiuCi49() end if QiuCi[50] == true then QiuCi50() end if QiuCi[51] == true then QiuCi51() end if QiuCi[52] == true then QiuCi52() end a=0x0 while(a <=0xAF0) do a=a+0x10 mk=gg.getRangesList('libUE4.so')[1].start add = RUI(RUI(RUI(RUI(RUI(mk + 0xC656D90) + 0x558) + a) + 0x30) + 0x38)--动态DD900 adpd = RUI(RUI(RUI(RUI(RUI(mk + 0xC656D90) + 0x558) + a) + 0x30) + 0x30) +0x18 if readD(adpd) == 1000 then --5x3000 --2.9 101001锁链0xDD900+0x558+0x10+0x30+0x30+0x0(0x18就直接到101,001,100) break add=add end end nmsl=0x4148--0x3FF8初始 0x5000 0x4148 0x7500 while(nmsl <=0x866E218)--10850最大 do nmsl=nmsl+0x18 addr=RUI(add+nmsl) if readD(addr+0x58) == 101001 then--AKM setvalue(addr+0x18,4,QiuCi[1]) gg.toast("修改目标:AKM") end if readD(addr+0x58) == 101002 then--M16A4 setvalue(addr+0x18,4,QiuCi[2]) gg.toast("修改目标:M16A4") end if readD(addr+0x58) == 101003 then--SCAR setvalue(addr+0x18,4,QiuCi[3]) gg.toast("修改目标:SCAR") end if readD(addr+0x58) == 101004 then--M416 setvalue(addr+0x18,4,QiuCi[4]) gg.toast("修改目标:M416") end if readD(addr+0x58) == 101005 then --GROZA setvalue(addr+0x18,4,QiuCi[5]) gg.toast("修改目标:GROZA") end if readD(addr+0x58) == 101006 then --AUG setvalue(addr+0x18,4,QiuCi[6]) gg.toast("修改目标:AUG") end if readD(addr+0x58) == 101007 then--QBZ setvalue(addr+0x18,4,QiuCi[7]) gg.toast("修改目标:QBZ") end if readD(addr+0x58) == 101008 then--M762 setvalue(addr+0x18,4,QiuCi[8]) gg.toast("修改目标:M762") end if readD(addr+0x58) == 101009 then--MK47 setvalue(addr+0x18,4,QiuCi[9]) gg.toast("修改目标:MK47") end if readD(addr+0x58) == 101010 then--G36C setvalue(addr+0x18,4,QiuCi[10]) gg.toast("修改目标:G36C") end if readD(addr+0x58) == 101012 then--蜜罐 setvalue(addr+0x18,4,QiuCi[11]) gg.toast("修改目标:蜜罐") end if readD(addr+0x58) == 102001 then--UZI setvalue(addr+0x18,4,QiuCi[12]) gg.toast("修改目标:UZI") end if readD(addr+0x58) == 102002 then--UMP45 setvalue(addr+0x18,4,QiuCi[13]) gg.toast("修改目标:UMP45") end if readD(addr+0x58) == 102003 then--Vector setvalue(addr+0x18,4,QiuCi[14]) gg.toast("修改目标:Vector") end if readD(addr+0x58) == 102004 then--汤姆逊 setvalue(addr+0x18,4,QiuCi[15]) gg.toast("修改目标:汤姆逊") end if readD(addr+0x58) == 102005 then--野牛 setvalue(addr+0x18,4,QiuCi[16]) gg.toast("修改目标:野牛") end if readD(addr+0x58) == 102006 then--MP5K setvalue(addr+0x18,4,QiuCi[17]) gg.toast("修改目标:MP5K") end if readD(addr+0x58) == 102007 then--P90 setvalue(addr+0x18,4,QiuCi[18]) gg.toast("修改目标:P90") end if readD(addr+0x58) == 103001 then--98K setvalue(addr+0x18,4,QiuCi[19]) gg.toast("修改目标:98K") end if readD(addr+0x58) == 103002 then--M24 setvalue(addr+0x18,4,QiuCi[20]) gg.toast("修改目标:M24") end if readD(addr+0x58) == 103003 then--awm setvalue(addr+0x18,4,QiuCi[21]) gg.toast("修改目标:AWM") end if readD(addr+0x58) == 103004 then--SKS setvalue(addr+0x18,4,QiuCi[22]) gg.toast("修改目标:SKS") end if readD(addr+0x58) == 103005 then--VSS setvalue(addr+0x18,4,QiuCi[23]) gg.toast("修改目标:VSS") end if readD(addr+0x58) == 103006 then--Mini14 setvalue(addr+0x18,4,QiuCi[24]) gg.toast("修改目标:MINI14") end if readD(addr+0x58) == 103007 then--MK14 setvalue(addr+0x18,4,QiuCi[25]) gg.toast("修改目标:MK14") end if readD(addr+0x58) == 103008 then--Win94 setvalue(addr+0x18,4,QiuCi[26]) gg.toast("修改目标:Win94") end if readD(addr+0x58) == 103009 then--SLR setvalue(addr+0x18,4,QiuCi[27]) gg.toast("修改目标:SLR") end if readD(addr+0x58) == 103010 then--QBU setvalue(addr+0x18,4,QiuCi[28]) gg.toast("修改目标:QBU") end if readD(addr+0x58) == 103011 then--莫辛纳甘 setvalue(addr+0x18,4,QiuCi[29]) gg.toast("修改目标:莫辛纳甘") end if readD(addr+0x58) == 103012 then--AMR setvalue(addr+0x18,4,QiuCi[30]) gg.toast("修改目标:AMR") end if readD(addr+0x58) == 103013 then--M417 setvalue(addr+0x18,4,QiuCi[31]) gg.toast("修改目标:M417") end if readD(addr+0x58) == 104001 then--S686 setvalue(addr+0x18,4,QiuCi[32]) gg.toast("修改目标:S686") end if readD(addr+0x58) == 104002 then--S1897 setvalue(addr+0x18,4,QiuCi[33]) gg.toast("修改目标:S1897") end if readD(addr+0x58) == 104003 then--S12K setvalue(addr+0x18,4,QiuCi[34]) gg.toast("修改目标:S12K") end if readD(addr+0x58) == 104004 then--DBS setvalue(addr+0x18,4,QiuCi[35]) gg.toast("修改目标:DBS") end if readD(addr+0x58) == 105001 then--M249 setvalue(addr+0x18,4,QiuCi[36]) gg.toast("修改目标:M249") end if readD(addr+0x58) == 105002 then--大盘鸡 setvalue(addr+0x18,4,QiuCi[37]) gg.toast("修改目标:大盘鸡") end if readD(addr+0x58) == 105010 then--MG3 setvalue(addr+0x18,4,QiuCi[38]) gg.toast("修改目标:MG3") end if readD(addr+0x58) == 108001 then--大砍刀 setvalue(addr+0x18,4,QiuCi[39]) gg.toast("修改目标:砍刀") end if readD(addr+0x58) == 108002 then--撬棍 setvalue(addr+0x18,4,QiuCi[40]) gg.toast("修改目标:撬棍") end if readD(addr+0x58) == 108003 then--镰刀 setvalue(addr+0x18,4,QiuCi[41]) gg.toast("修改目标:镰刀") end if readD(addr+0x58) == 108004 then--平底锅 setvalue(addr+0x18,4,QiuCi[42]) gg.toast("修改目标:平底锅") end if readD(addr+0x58) == 203001 then--红点 setvalue(addr+0x18,4,QiuCi[43]) gg.toast("修改目标:红点瞄准器") end if readD(addr+0x58) == 203002 then--全息 setvalue(addr+0x18,4,QiuCi[44]) gg.toast("修改目标:全息瞄准器") end if readD(addr+0x58) == 203003 then--二倍 setvalue(addr+0x18,4,QiuCi[45]) gg.toast("修改目标:二倍瞄准器") end if readD(addr+0x58) == 203006 then--三倍 setvalue(addr+0x18,4,QiuCi[46]) gg.toast("修改目标:三倍瞄准器") end if readD(addr+0x58) == 203004 then--四倍 setvalue(addr+0x18,4,QiuCi[47]) gg.toast("修改目标:四倍瞄准器") end if readD(addr+0x58) == 203007 then--六倍 setvalue(addr+0x18,4,QiuCi[48]) gg.toast("修改目标:六倍瞄准器") end if readD(addr+0x58) == 203005 then--八倍 setvalue(addr+0x18,4,QiuCi[49]) gg.toast("修改目标:8倍瞄准器") end if readD(addr+0x58) == 203008 then--m4瞄具 setvalue(addr+0x18,4,QiuCi[50]) gg.toast("修改目标M416鸡苗:") end if readD(addr+0x58) == 205005 then--m4张托 setvalue(addr+0x18,4,QiuCi[51]) gg.toast("修改目标:M416枪托") end if readD(addr+0x58) == 291004 then --m4弹夹 setvalue(addr+0x18,4,QiuCi[52]) gg.toast("修改目标:M416弹夹") time=os.clock()-time time=string.format("%1.1f",tonumber(time)) gg.alert("修改完毕\n修改总耗时" .. time .. "秒") break end end end end function Exit() print("脚本已关闭") os.exit() end cs = "1670144270" while true do if gg.isVisible(true) then XGCK = 1 gg.setVisible(false) end gg.clearResults() if XGCK == 1 then Main() end end