Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function update()
- gg.clearResults()
- gg.setRanges(gg.REGION_CODE_APP)
- gg.searchNumber("1D;2D;3D;4D;5D;6D;7D;8D;9D;16D::37",4,nil,gg.SIGN_EQUAL,libil2cpp["start"],libil2cpp["end"])
- gg.refineNumber(5)
- local Xr = gg.getResults(gg.getResultsCount())
- if #Xr < 1 then gg.toast("ERROR") return false end
- gg.clearResults()
- local t = "_ = (function()\n offset = "..string.format("0x%X",Xr[1].address - libil2cpp["start"]).."\n return\nend)([[\n\n"..Xinfo.."\n\n]])"
- gg.saveList(Qfile)
- io.open(Qfile,"w"):write(string.dump(load(t),true))
- return true
- end
- local function lvalue(offset,value)
- local Xl = {{
- address = libil2cpp["start"] + offset,
- value = value,
- flags = 4,
- freeze = true
- }}
- gg.addListItems(Xl)
- gg.removeListItems(Xl)
- return
- end
- local x64 = gg.getTargetInfo().x64
- local Xversion = gg.getTargetInfo().versionName
- libil2cpp = gg.getRangesList("libil2cpp.so")[(x64 and 2 or 1)]
- Qfile = "/sdcard/Q/file/t.S-S.t"
- off = 5
- if #gg.getRangesList("libil2cpp.so") < 1 then
- print("[ERROR]")
- print("If the game is split, Anti split it.")
- return
- end
- Qinfo = loadfile(Qfile) and io.open(Qfile,"r"):read("*all"):match("CPM%[.-%]%[x.-%]") or "CPM[NaN][NaN]"
- Xinfo = "CPM["..Xversion.."][x"..(x64 and 64 or 32).."]"
- if Qinfo ~= Xinfo then
- Qinfo = "Please update the script\n"..Qinfo.." > "..Xinfo
- else
- loadfile(Qfile)()
- end
- Xvalue = {
- [3] = 1,
- [4] = 16,
- [5] = 256,
- [6] = 4096,
- [7] = 65536,
- [8] = 1048576,
- }
- repeat
- repeat until gg.isVisible()
- gg.setVisible(false)
- local menu = gg.prompt({Qinfo.."\nSend","[OFF]","[Update]","[Exit]"},last,{"number","checkbox","checkbox","checkbox"})
- if menu then
- menu[1] = #menu[1] > 8 and menu[1]:sub(1,8) or menu[1]
- last = {menu[1]}
- if menu[4] then break end
- if menu[3] or Qinfo ~= Xinfo then
- if gg.alert(Qinfo.."\nDo you want to update","yes","no") == 1 then update() break end
- end
- if Qinfo == Xinfo then
- if menu[2] then
- lvalue(offset,off)
- gg.toast("OFF")
- elseif tonumber(menu[1]) then
- local on = 0
- for i = #menu[1] - 2, 1, -1 do on = on + (Xvalue[#menu[1] - i + 1]*tonumber(menu[1]:sub(i,i))) end
- lvalue(offset,on)
- gg.toast("ON")
- end
- end
- end
- until nil
- gg.setVisible(true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement