wilmans2m

OtherworldLegends

Mar 29th, 2024 (edited)
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 31.55 KB | None | 0 0
  1. LUA = 'WILS2M'
  2. GLabel = 'Otherworld Legends'
  3. GProcess = 'com.chillyroom.zhmr.gp'
  4. GVersion = '(vAU.02)'
  5. xbit = 64
  6. LibResult = 1
  7. xlib = 'libil2cpp.so'
  8. xREV = 1  I={}
  9. xCNE = 0
  10. xSSE = 0
  11. XbitX = 2
  12. printx = '---------------------------------------------------------------'
  13. expire='free'
  14. game = gg.getTargetInfo()
  15. P=game.processName
  16. FP=game.name
  17. L=gg.getTargetInfo().label
  18. M=gg.getTargetInfo()["label"]
  19. V=game.versionName
  20. TP=gg.getTargetPackage()
  21. xTAGx="Have fun"
  22. xLINKx="https://t.me/HxE_Chat"
  23. xLINK1x="https://www.tiktok.com/@hxesq"
  24. APEXSN=gg.getFile():match('[^/]+$')
  25. printx="---------------------------------------------------------------"
  26. print(printx)
  27. print(xTAGx)
  28. print("Telegram = "..xLINKx)
  29. print("TikTok = "..xLINK1x)
  30. print(printx)  
  31. print("Script = "..GLabel.."  "..GVersion)
  32. --███████████████████████
  33. --███████████████████████
  34. --███████████████████████
  35. -- APEX[GG]v2
  36. apex=1
  37. gg.setVisible(false)
  38. v=gg.getTargetInfo()
  39.     if v==nil then
  40.         print("×× ERROR ××\n×× INVALID PROCESS SELECTED / OR NO ROOT ACCESS")
  41.         gg.setVisible(true) os.exit()
  42.         return
  43.     end
  44.    
  45. HxEmenu = ('            ⚡HxE Menu by wils2m⚡\
  46.           ❦ ════ •⊰❂ - ❂⊱• ════ ❦\
  47.                     ⛥🇮‌🇳‌🇫‌🇴‌⛥\
  48.  🎮🅖🅐🅜🅔🎮 : '..GLabel..'\
  49.  🎰🅥🅔🅡🅢🎰 : '..GVersion..'\
  50.    🎰🅐🅡🅜🎰   : '..xbit..'\
  51. \
  52. ⏳Exᴘɪʀᴇᴅ Date⏳ : '..expire..'\
  53. 🎁 Encryption 🎁 :  '..expire..'\
  54.            ❦ ════ •⊰❂ - ❂⊱• ════ ❦')
  55.            
  56. gg.alert(HxEmenu)
  57.  
  58. gg.alert("                           Patch Note\
  59.           ❦ ════ •⊰❂ - ❂⊱• ════ ❦\
  60. - HxE script menu\
  61. - Huge thanks to Apex[GG]\
  62. - Script auto updated\
  63. - Battlepass activated\
  64. - VIP card activated\
  65. - Achievements completed hack\
  66. - God Mode\
  67. - Always Crit\
  68. - Disable Ennemies\
  69. - Skill Hacks\
  70. - Attack and Player Speedhack\
  71. - Coins Hacks (very unstable)\
  72. - Unlimited Hero shards\
  73. - Unlimited Ressources\
  74. - Unlocking Hero, skin...\
  75.           ❦ ════ •⊰❂ - ❂⊱• ════ ❦\
  76. ")
  77. ------------------------------------------------------------------------------
  78. A={} for i =1,100 do A[i]={} end
  79. ------------------------------------------------------------------------------
  80. OFF="× " ON="√ "
  81. GM=OFF DE=OFF SH=OFF AC=OFF US=OFF AS=OFF PS=OFF UH=OFF UR=OFF UW=OFF SS=OFF BS=OFF RS=OFF DM=OFF HC=OFF BV=OFF
  82.     if v.x64 then x1="hC0BEA0D2" x2='h006A98D2'
  83.     else x1="h990040E3" x2='h640000E3'
  84.     end
  85.  
  86. function menu()
  87. apex=0
  88. gg.toast(xTAGx)  
  89. mc=gg.multiChoice({
  90. GM.."God Mode",
  91. DE.."Disable Ennemies",
  92. HC.."Always Crit",
  93. SH.."Skills Hacks",
  94. AC.."Achievements completed",
  95. US.."Unlock Skins",
  96. AS.."Attack Speedhack",
  97. PS.."Player Speedhack",
  98. UH.."Unlimited Shards",
  99. UR.."Unlimited Resurrection",
  100. UW.."Unlimited Weapon Upgrade",
  101. SS.."Unlimited Soul Stone",
  102. BS.."Unlimited Blue Stone",
  103. RS.."Unlimited Red Stone",
  104. DM.."Coins Hacks (unstable)",
  105.     "[ EXIT ]"},
  106.     {},xTAGx.."\n"..xLINKx.."\n"..GLabel.." "..GVersion.." "..xBITx)
  107.    
  108.     if mc==nil then cancel() return end
  109.     if mc[1] then god() end
  110.     if mc[2] then disable() end
  111.     if mc[3] then crit() end
  112.     if mc[4] then skill() end
  113.     if mc[5] then achievement() end
  114.     if mc[6] then skin() end
  115.     if mc[7] then atk() end
  116.     if mc[8] then player() end
  117.     if mc[9] then shard() end
  118.     if mc[10] then resticket() end
  119.     if mc[11] then weapon() end
  120.     if mc[12] then soul() end
  121.     if mc[13] then bstone() end
  122.     if mc[14] then rstone() end
  123.     if mc[15] then drop() end
  124.    
  125. xhaX={
  126. GM.."God Mode",
  127. DE.."Disable Ennemies",
  128. HC.."Always Crit",
  129. SH.."Skills Hacks",
  130. AC.."Achievements completed",
  131. US.."Unlock Skins",
  132. AS.."Attack Speedhack",
  133. PS.."Player Speedhack",
  134. UH.."Unlimited Shards",
  135. UR.."Unlimited Resurrection",
  136. UW.."Unlimited Weapon Upgrade",
  137. SS.."Unlimited Soul Stone",
  138. BS.."Unlimited Blue Stone",
  139. RS.."Unlimited Red Stone",
  140. DM.."Coins Hacks (very unstable)",
  141.     }
  142. xhaX=table.concat(xhaX, "\n")
  143. xhaX=tostring(xhaX)
  144.  
  145.     if mc[16] then exit() return end
  146.  
  147. gg.toast("[√] Complete")
  148. gg.alert(GLabel.." "..GVersion.." "..xBITx.."\n\n"..xhaX,"OK",nil,xTAGx)  
  149.  
  150. end
  151.  
  152. --█████████████████████████████████████████████
  153.  
  154. --public class BattlePassComponent
  155. --public int get_CurrentLevel()
  156.     A[1].class="BattlePassComponent"
  157.     A[1].method="get_CurrentLevel"
  158. --public bool get_isBuyHighReward()
  159.     A[2].class="BattlePassComponent"
  160.     A[2].method="get_isBuyHighReward"
  161. --public bool get_isSystemUnlock()
  162.     A[3].class="BattlePassComponent"
  163.     A[3].method="get_isSystemUnlock"
  164.  
  165. --public static class Archive.PlayerArchive
  166. --public static bool get_HasBuyBarVipCard()
  167.     A[4].class="PlayerArchive"
  168.     A[4].method="get_HasBuyBarVipCard"
  169.  
  170.     function battlevip()
  171.     for i = 1,4 do if A[i].error == 1 then error() break return end end
  172.     for i = A[1].start, A[1].finish do o=I[i]
  173.     if BV==OFF then x="hC0038052" arm() else revert() end
  174.     end
  175.     for i = A[2].start, A[4].finish do o=I[i]
  176.     if BV==OFF then x=1 arm() else revert() end
  177.     end
  178.    
  179.     if BV==OFF then BV=ON else BV=OFF end
  180. end
  181.        
  182. --█████████████████████████████████████████████
  183.  
  184. --public class Character : MonoBehaviour
  185. --public bool get_isLockHealth()
  186.     A[5].class="Character"
  187.     A[5].method="get_isLockHealth"
  188. --public bool get_isHealthFull()
  189.     A[6].class="Character"
  190.     A[6].method="get_isHealthFull"
  191.  
  192. function god()
  193.     for i = 5,6 do if A[i].error == 1 then error() break return end end
  194.     for i = A[5].start, A[6].finish do o=I[i]
  195.     if GM==OFF then x=1 arm() else revert() end
  196.     end
  197.  
  198.     if GM==OFF then GM=ON else GM=OFF end
  199. end
  200.  
  201. --█████████████████████████████████████████████
  202.  
  203. --public class Character : MonoBehaviour
  204. --protected virtual void Update()  
  205.     A[7].class="Character"
  206.     A[7].method="Update"
  207.  
  208. function disable()
  209.     if A[7].error==1 then error() return end
  210.     for i = A[7].start, A[7].finish do o=I[i]
  211.     if DE==OFF then x=0 arm() else revert() end
  212.     end
  213.  
  214.     if DE==OFF then DE=ON else DE=OFF end
  215. end
  216.  
  217. --█████████████████████████████████████████████
  218.  
  219. --public class Archive.HeroArchive
  220. --public bool get_isAnySkillUnlock()
  221.     A[8].class="HeroArchive"
  222.     A[8].method="get_isAnySkillUnlock"
  223. --public bool IsStyleUnlock(HeroSkillStyleName styleName)
  224.     A[9].class="HeroArchive"
  225.     A[9].method="IsStyleUnlock"
  226. --public bool IsSkillUnlock(SkillName skillName)
  227.     A[10].class="HeroArchive"
  228.     A[10].method="IsSkillUnlock"
  229. --public abstract class Skill : IveBehaviour
  230. --public float get_mainSkillCooldown()
  231. --I[8]=0x1FEEF2C
  232. --public static float SkillDefaultCD(SkillName name)
  233. --I[9]=0x1FF3454
  234. --public float GetSkillCoolDown()
  235.     A[11].class="Skill"
  236.     A[11].method="GetSkillCoolDown"
  237. ----public class Character : MonoBehaviour
  238. --public float get_coolDown()
  239. --I[10]=0x1F54890
  240.  
  241. function skill()
  242.     for i = 1,11 do if A[i].error == 1 then error() break return end end
  243.     for i = A[8].start, A[10].finish do o=I[i]
  244.     if SH==OFF then x=1 arm() else revert() end
  245.     end
  246.     for i = A[11].start, A[11].finish do o=I[i]
  247.     if SH==OFF then x=0 arm() else revert() end
  248.     end
  249.  
  250.     if SH==OFF then SH=ON else SH=OFF end
  251. end
  252.  
  253. --█████████████████████████████████████████████
  254.  
  255. --public static class AchievementManager
  256. --public static int GetAchievementPoint()
  257.     A[12].class="AchievementManager"
  258.     A[12].method="GetAchievementPoint"
  259. --//Namespace: Achievement
  260. --public class AchievementItem
  261. --public bool get_isComplete()
  262.     A[13].name="Achievement"
  263.     A[13].class="AchievementItem"
  264.     A[13].method="get_isComplete"
  265.  
  266. function achievement()
  267.     for i = 12,13 do if A[i].error == 1 then error() break return end end
  268.     for i = A[12].start, A[12].finish do o=I[i]
  269.     if AC==OFF then x="hC0038052" arm() else revert() end
  270.     end
  271.     for i = A[13].start, A[13].finish do o=I[i]
  272.     if AC==OFF then x=1 arm() else revert() end
  273.     end
  274.  
  275.     if AC==OFF then AC=ON else AC=OFF end
  276. end
  277.  
  278. --█████████████████████████████████████████████
  279.  
  280. --public static class Archive.PlayerArchive
  281. --public static bool IsSkinUnlock(HeroSkinConfig.HeroSkinName skinName)
  282.     A[14].class="PlayerArchive"
  283.     A[14].method="IsSkinUnlock"
  284.  
  285. function skin()
  286.     if A[14].error==1 then error() return end
  287.     for i = A[14].start, A[14].finish do o=I[i]
  288.     if US==OFF then x=1 arm() else revert() end
  289.     end
  290.  
  291.     if US==OFF then US=ON else US=OFF end
  292. end
  293.  
  294. --█████████████████████████████████████████████
  295. --public class Character : MonoBehaviour
  296. --public float get_attackSpeed()
  297.     A[15].class="Character"
  298.     A[15].method="get_attackSpeed"
  299.  
  300. function atk()
  301.     if A[15].error==1 then error() return end
  302.     for i = A[15].start, A[15].finish do o=I[i]
  303.     if AS==OFF then x="h0010241E" arm() else revert() end
  304.     end
  305.  
  306.     if AS==OFF then AS=ON else AS=OFF end
  307. end
  308.  
  309. --█████████████████████████████████████████████
  310.  
  311. --public class Character : MonoBehaviour
  312. --public float get_critRate()
  313.     A[16].class="Character"
  314.     A[16].method="get_critRate"
  315.  
  316. function crit()
  317.     if A[16].error==1 then error() return end
  318.     for i = A[16].start, A[16].finish do o=I[i]
  319.     if HC==OFF then x="h0059A8D2" arm() else revert() end
  320.     end
  321.  
  322.     if HC==OFF then HC=ON else HC=OFF end
  323. end
  324.    
  325. --█████████████████████████████████████████████
  326.  
  327. --public class Character : MonoBehaviour
  328. --public float get_moveSpeed()
  329.     A[17].class="Character"
  330.     A[17].method="get_moveSpeed"
  331.  
  332. function player()
  333.     if A[17].error==1 then error() return end
  334.     for i = A[17].start, A[17].finish do o=I[i]
  335.     if PS==OFF then x="h0010241E" arm() else revert() end
  336.     end
  337.  
  338.     if PS==OFF then PS=ON else PS=OFF end
  339. end
  340.  
  341. --█████████████████████████████████████████████
  342.  
  343. --public class HeroConfirmUI.SkinPiecePrice
  344. --public int get_Item(HeroSkinConfig.HeroSkinName skinName)
  345.     A[18].class="SkinPiecePrice"
  346.     A[18].method="get_Item"
  347. --public class HeroPieceComponent
  348. --public int get_HeroCommonPieceCount()
  349.     A[19].class="HeroPieceComponent"
  350.     A[19].method="get_HeroCommonPieceCount"
  351.  
  352. function shard()
  353.     for i = 18,19 do if A[i].error == 1 then error() break return end end
  354.     for i = A[18].start, A[19].finish do o=I[i]
  355.     if UH==OFF then x="hE0E18452" arm() else revert() end
  356.     end
  357.  
  358.     if UH==OFF then UH=ON else UH=OFF end
  359. end
  360.  
  361. --█████████████████████████████████████████████
  362.  
  363. --public static class Archive.PlayerArchive
  364. --public static int get_RebornCard()
  365.     A[20].class="PlayerArchive"
  366.     A[20].method="get_RebornCard"
  367.  
  368. function resticket()
  369.     if A[20].error==1 then error() return end
  370.     for i = A[20].start, A[20].finish do o=I[i]
  371.     if UR==OFF then x="hE0E18452" arm() else revert() end
  372.     end
  373.  
  374.     if UR==OFF then UR=ON else UR=OFF end
  375. end
  376.  
  377. --█████████████████████████████████████████████
  378.  
  379. --public static class Archive.PlayerArchive
  380. --public static int get_WeaponUpgradeTicket()
  381.     A[21].class="PlayerArchive"
  382.     A[21].method="get_WeaponUpgradeTicket"
  383.  
  384. function weapon()
  385.     if A[21].error==1 then error() return end
  386.     for i = A[21].start, A[21].finish do o=I[i]
  387.     if UW==OFF then x="hE0E18452" arm() else revert() end
  388.     end
  389.  
  390.     if UW==OFF then UW=ON else UW=OFF end
  391. end
  392.  
  393. --█████████████████████████████████████████████
  394.  
  395. --public static class Archive.PlayerArchive
  396. --public static int get_SoulStoneCount()
  397.     A[22].class="PlayerArchive"
  398.     A[22].method="get_SoulStoneCount"
  399.  
  400. function soul()
  401.     if A[22].error==1 then error() return end
  402.     for i = A[22].start, A[22].finish do o=I[i]
  403.     if SS==OFF then x="hE0E18452" arm() else revert() end
  404.     end
  405.  
  406.     if SS==OFF then SS=ON else SS=OFF end
  407. end
  408.    
  409. --█████████████████████████████████████████████
  410.  
  411. --public static class Archive.PlayerArchive
  412. --public static int get_BlueStoneCount()
  413.     A[23].class="PlayerArchive"
  414.     A[23].method="get_BlueStoneCount"
  415.  
  416. function bstone()
  417.     if A[23].error==1 then error() return end
  418.     for i = A[23].start, A[23].finish do o=I[i]
  419.     if BS==OFF then x="hE0E18452" arm() else revert() end
  420.     end
  421.  
  422.     if BS==OFF then BS=ON else BS=OFF end
  423. end
  424.  
  425. --█████████████████████████████████████████████
  426.  
  427. --public static class Archive.PlayerArchive
  428. --public static int get_RedStoneCount()
  429.     A[24].class="PlayerArchive"
  430.     A[24].method="get_RedStoneCount"
  431.    
  432. function rstone()
  433.     if A[24].error==1 then error() return end
  434.     for i = A[24].start, A[24].finish do o=I[i]
  435.     if RS==OFF then x="hE0E18452" arm() else revert() end
  436.     end
  437.  
  438.     if RS==OFF then RS=ON else RS=OFF end
  439. end
  440.  
  441. --█████████████████████████████████████████████
  442.  
  443. function drop()
  444. gg.setRanges(gg.REGION_ANONYMOUS)
  445. current=gg.prompt({'💰💰Current coins 💰💰','💰💰Coins You want💰💰'},{100,9999})
  446. gg.searchNumber(current[1],gg.TYPE_DWORD)
  447. gg.getResults(100)
  448. gg.editAll(current[2],gg.TYPE_DWORD)
  449. end
  450.  
  451. --█████████████████████████████████████████████
  452. --█████████████████████████████████████████████
  453. --█████████████████████████████████████████████
  454.     if v.processName~=GProcess then
  455.         print("This Script is For:\n    "..GLabel.."\n    "..GProcess.."\nYou Selected:\n    "..v.label.."\n    "..v.processName)
  456.         gg.setVisible (true) os.exit()
  457.         return
  458.     end
  459. ------------------------------------------------------------------------------
  460.     if v.x64 then bitx=64 xBITx="[x64]" else bitx=32 xBITx="[x32]" end
  461.         print(xBITx)  
  462.         print(printx)  
  463. ------------------------------------------------------------------------------
  464.  
  465.  
  466. isrdy=gg.alert("Otherworld Legends\nThis Script is Auto-Updating. \nInitial Calibration May Take A While.\n\nYOU MUST NOT CURRENTLY BE IN ANY GAMEPLAY (MISSION/BATTLE/ETC). Otherwise, Calibration will Fail and Hacks Not Work\n\n(All hacks must be activated from lobby)","EXIT","START",xTAGx)  
  467. if isrdy~=2 then gg.setVisible(true) os.exit() return end
  468.  
  469. --█████████████████████████████████████████████
  470.     if LibResult==1 then
  471.     xAPEXx={} xXx=0
  472.     xLibRes=0
  473.     libx=gg.getRangesList()
  474.         if #(libx)==0 then
  475.         print("×× LIB ERROR #01 ××\nNo Libs Found\nTry a Different Virtual Environment \nor Try a Better Game Installation Method\nor Download Game From 'apkcombo.com' ")
  476.         gg.setVisible(true)
  477.         os.exit()
  478.         end
  479.     libx=gg.getRangesList(xlib)
  480.         if #(libx)==0 then  
  481.         print("×× No "..xlib.." Found")
  482.         xLibRes=2
  483.         goto APEX_SPLIT
  484.         end
  485.     xlibn=0
  486.         for i, v in ipairs(libx) do
  487.             if libx[i].state=="Xa" then
  488.             xXx=xXx+1
  489.             xAPEXx[xXx]=libx[i].start
  490.             xLibRes=1
  491.             end
  492.         end
  493.         if xLibRes==0 then
  494.         print("×× LIB ERROR #03 ××\nNo "..xlib.." Found in Xa\nTry a Different Virtual Environment \nor Try a Better Game Installation Method\nor Download Game From 'apkcombo.com' ")
  495.         gg.setVisible(true)
  496.         os.exit()    
  497.         end    
  498.                  
  499.         ::APEX_SPLIT::    
  500.         if xLibRes==2 then
  501.         splitapk=0
  502.         libx=gg.getRangesList()
  503.             for i, v in ipairs(libx) do
  504.                 if libx[i].state=="Xa" and string.match(libx[i].name,"split_config") then
  505.                 splitapk=1
  506.                 end
  507.             end
  508.             if splitapk==1 then
  509.             xsapk={} xsapkx=0
  510.                 for i, v in ipairs(libx) do
  511.                     if libx[i].state=="Xa" then
  512.                     xsapkx=xsapkx+1
  513.                     xsapk[xsapkx]=libx[i]["end"]-libx[i].start
  514.                     end
  515.                 end
  516.                 if xsapkx~=0 then                
  517.                 APEXQ=math.max(table.unpack(xsapk))
  518.                     for i, v in ipairs(libx) do              
  519.                         if libx[i].state=="Xa" and libx[i]["end"]-libx[i].start==APEXQ then              
  520.                         xXx=xXx+1            
  521.                        xAPEXx[xXx]=libx[i].start
  522.                         print("√√ Split Apk Lib Found\n√√ "..libx[i].name)
  523.                         xLibRes=1                      
  524.                         end
  525.                     end
  526.                 end
  527.             end
  528.          
  529.              if splitapk==0 and xLibRes~=1 then
  530.              print("×× No split_config Lib Found")  
  531.              xc=1 xt={}
  532.              libx=gg.getRangesList()
  533.                  for i, v in ipairs(libx) do
  534.                      if libx[i].state=="Xa" then
  535.                      xt[xc]=tonumber(libx[i]["end"]-libx[i].start)
  536.                      xc=xc+1
  537.                      end
  538.                  end
  539.              APEXQ=math.max(table.unpack(xt))
  540.                  for i, v in ipairs(libx) do              
  541.                      if libx[i].state=="Xa" and libx[i]["end"]-libx[i].start==APEXQ then        
  542.                      xXx=xXx+1      
  543.                      xAPEXx[xXx]=libx[i].start
  544.                      print("√√ math.max Xa Lib Found\n√√ "..libx[i].name)
  545.                      xLibRes=1  
  546.                      end
  547.                  end
  548.             end                        
  549.  
  550.             if xLibRes~=1 then
  551.             print("×× Correct Lib Not Found ××\n×× Direct/Split Config/Xa Max ××")
  552.             gg.setVisible(true)
  553.             os.exit()
  554.              return
  555.             end
  556.         end
  557.     end
  558. --█████████████████████████████████████████████
  559. function arm()
  560. o=tonumber(o)
  561.     for XxX=1,#(xAPEXx) do
  562.     xdump=nil xdump={}
  563.     xdump[1]={} xdump[2]={}
  564.     xdump[1].address=xAPEXx[XxX] + o
  565.     xdump[1].flags=4
  566.         if x==0 then xdump[1].value=xfalse end
  567.         if x==1 then xdump[1].value=xtrue end
  568.         if x~=0 and x~=1 then xdump[1].value=x end
  569.     xdump[2].address=xAPEXx[XxX]+(o+4)
  570.     xdump[2].flags=4
  571.     xdump[2].value=xEND
  572.     gg.setValues(xdump)
  573.     end
  574. end
  575. ------------------------------------------------------------------------------  
  576. function revert()
  577.     for XxX=1,#(xAPEXx) do
  578.     REVERT=nil REVERT={} xRx=nil xRx=1
  579.         for i, v in ipairs(ORIG) do
  580.             if tonumber(xAPEXx[XxX]+o)==ORIG[i].address then
  581.             REVERT[xRx]={}
  582.             REVERT[xRx].address=xAPEXx[XxX]+o
  583.             REVERT[xRx].flags=4
  584.             REVERT[xRx].value=ORIG[i].value
  585.             xRx=xRx+1
  586.             REVERT[xRx]={}
  587.             REVERT[xRx].address=xAPEXx[XxX]+o+4
  588.             REVERT[xRx].flags=4
  589.             REVERT[xRx].value=ORIG[i+1].value
  590.             gg.setValues(REVERT)
  591.             break
  592.             end
  593.         xRx=xRx+1
  594.         end
  595.     end
  596. end
  597.  
  598. --█████████████████████████████████████████████
  599.  
  600. function sort()
  601. SORT1={} apexsort=0
  602.      for sorti = A[s].start, A[s].finish do
  603.          apexsort=apexsort+1
  604.          SORT1[apexsort] = I[sorti]
  605.      end
  606. SORT2={} table.sort(SORT1)
  607.     for sort2, v in pairs(SORT1) do
  608.         SORT2[sort2]=v
  609.     end
  610. r=SORT2[r]
  611. end
  612.  
  613. --█████████████████████████████████████████████
  614. if v.x64 then
  615. xtrue="h200080D2" -- MOV X0, #0x1
  616. xfalse="h000080D2" -- MOV X0, #0x0
  617. xEND="hC0035FD6" -- RET
  618. else
  619. xtrue="h0100A0E3" -- MOVW R0, #1
  620. xfalse="h0000A0E3" -- MOVW R0, #0
  621. xEND="h1EFF2FE1" -- BX LR
  622. end
  623.  
  624. --█████████████████████████████████████████████
  625. -- APEX[GG]v2
  626. function clear()
  627. gg.getResults(gg.getResultsCount())
  628. gg.clearResults()
  629. end
  630. ------------------------------------------------------------------------------  
  631. function get()
  632. gg.getResults(gg.getResultsCount())
  633. end
  634. ------------------------------------------------------------------------------  
  635. function search()
  636. gg.getResults(gg.getResultsCount())
  637. gg.clearResults()
  638. gg.searchNumber(x,t)
  639. end
  640. ------------------------------------------------------------------------------  
  641. function refine()
  642. gg.refineNumber(x,t)
  643. end
  644. ------------------------------------------------------------------------------  
  645. function refinenot()
  646. gg.refineNumber(x,t,false,gg.SIGN_NOT_EQUAL)
  647. end
  648. ------------------------------------------------------------------------------  
  649. function edit()
  650. gg.getResults(gg.getResultsCount())
  651. gg.editAll(x,t)
  652. end
  653. ------------------------------------------------------------------------------  
  654. function check()
  655. E=nil E=gg.getResultsCount()
  656. end
  657. ------------------------------------------------------------------------------  
  658. function offset()
  659. o=tonumber(o) addoff=nil
  660. addoff=gg.getResults(gg.getResultsCount())
  661.     for i, v in ipairs(addoff) do
  662.         addoff[i].address=addoff[i].address+o
  663.         addoff[i].flags=t
  664.     end
  665. gg.loadResults(addoff)
  666. end
  667.  
  668. --█████████████████████████████████████████████
  669. function cancel()
  670. gg.toast("CANCELLED")
  671. end
  672. ------------------------------------------------------------------------------  
  673. function wait()
  674. gg.toast("Please Wait..")
  675. end
  676. ------------------------------------------------------------------------------  
  677. function error()
  678. gg.toast("× ERROR ×")
  679. gg.sleep(1000)
  680. end
  681. ------------------------------------------------------------------------------  
  682. function exit()
  683. gg.getListItems()
  684. gg.clearList()
  685. gg.getResults(gg.getResultsCount())
  686. gg.clearResults()
  687. gg.toast("[ EXIT ]")  
  688.     if xhaX~=nil then
  689.         print(printx)
  690.         print(xhaX)
  691.         print(printx)  
  692.     end
  693. gg.setVisible(true)
  694. os.exit()
  695. return
  696. end
  697. --█████████████████████████████████████████████
  698. if v.x64 then off1=-16 typ=32 else off1=-8 typ=4 end
  699. gg.setRanges(gg.REGION_OTHER | gg.REGION_C_ALLOC)
  700. gmdx=gg.getRangesList("global-metadata.dat")
  701.     if #(gmdx)~=0 then        
  702.     gmds=gg.getRangesList("global-metadata.dat")[1].start
  703.     gmde=gg.getRangesList("global-metadata.dat")[1]["end"]
  704.     else gmds=nil gmde=nil
  705.     end
  706. ATOTAL=0
  707. for i = 1,100 do
  708.     if A[i].class==nil then break end
  709.     ATOTAL=ATOTAL+1
  710. end
  711.  
  712. ASTART=1 AEND=0 ATABT=ATOTAL+1 ATAB=1
  713. S=0
  714.     while ATAB<=ATOTAL do
  715.     ::AUTOSTART::
  716.         if ATAB>ATOTAL then break goto FINISHED end
  717.     gg.toast("Please Wait.. [ "..ATABT-ATAB.." ]")
  718.     A[ATAB].error=1
  719.     ANAME=nil ANAME={}
  720.     if A[ATAB].name~=nil then
  721.         for i = 1,#(tostring(A[ATAB].name)) do
  722.             ANAME[i]=string.byte(A[ATAB].name,i)
  723.         end
  724.     else
  725.         ANAME[1]=0
  726.     end
  727.     ACLASS=nil ACLASS={}
  728.     if A[ATAB].class~=nil then
  729.         for i = 1,#(tostring(A[ATAB].class)) do
  730.             ACLASS[i]=string.byte(A[ATAB].class,i)
  731.         end
  732.     else
  733.         A[ATAB].class=0
  734.     end
  735.    
  736.                 ASTART=AEND+1
  737.                 clear() t=1
  738.                 gg.searchNumber(":"..tostring(A[ATAB].method),1,false,gg.SIGN_EQUAL,gmds, gmde)
  739.                 xm=gg.getResults(2) gg.getResults(gg.getResultsCount())
  740.                 check()
  741.                     if E==0 then ATAB=ATAB+1
  742.                         if ATAB>ATOTAL then break return end
  743.                     goto AUTOSTART return
  744.                     end
  745.                 x=xm[1].value..";"..xm[2].value.."::2" refine()
  746.                 x=xm[1].value refine()
  747.                 o=-1 offset() x=0 refine() oo=#(tostring(A[ATAB].method))
  748.                 o=oo+1 offset() refine() o=-oo offset()
  749.                 check()
  750.                     if E==0 then ATAB=ATAB+1
  751.                         if ATAB>ATOTAL then break return end
  752.                     goto AUTOSTART return
  753.                     end
  754.                 gg.searchPointer(0) xcount=gg.getResultsCount()
  755.                 xpoint=gg.getResults(xcount,nil, nil, nil, nil, nil, nil, nil,gg.POINTER_READ_ONLY)
  756.                     if #(xpoint)==0 then ATAB=ATAB+1
  757.                         if ATAB>ATOTAL then break return end
  758.                     goto AUTOSTART return
  759.                     end
  760.                 clear()
  761.                     for xp=1,#(xpoint) do
  762.                     xpoint[xp].address=xpoint[xp].address+off1
  763.                     xpoint[xp].flags=typ
  764.                     end
  765.                 gg.loadResults(xpoint)
  766.                 xoff=gg.getResults(#(xpoint),nil, nil, nil, nil, nil, nil, nil, gg.POINTER_EXECUTABLE)
  767.                     if #(xoff)==0 then ATAB=ATAB+1
  768.                         if ATAB>ATOTAL then break return end
  769.                     goto AUTOSTART return
  770.                     end
  771.                     xfin=1
  772.                     while xfin<=#(xoff) do
  773.                     ::XFIN::
  774.                         if xfin>#(xoff) then ATAB=ATAB+1
  775.                             if ATAB>ATOTAL then break return end
  776.                         goto AUTOSTART return
  777.                         end
  778.                         if gg.getTargetInfo().x64 then
  779.                             xadd=tonumber(xoff[xfin].value)  
  780.                         else
  781.                             xadd=string.format("%X",tonumber(xoff[xfin].value))
  782.                             xadd=string.sub(tostring(xadd), -8,-1)
  783.                             xadd=tonumber("0x"..xadd)
  784.                         end    
  785.                     gval1=nil gval1={} gval1[1]={}
  786.                         if gg.getTargetInfo().x64 then gvo=24 gvo1=16 gvo2=24 else gvo=12 gvo1=8 gvo2=12 end
  787.                     gval1[1].address=xoff[xfin].address+gvo
  788.                     gval1[1].flags=typ
  789.                     gval1=gg.getValues(gval1)
  790.                         if gg.getTargetInfo().x64 then
  791.                             gval=tonumber(gval1[1].value)  
  792.                         else
  793.                             gval=string.format("%X",tonumber(gval1[1].value))
  794.                             gval=string.sub(tostring(gval), -8,-1)
  795.                             gval=tonumber("0x"..gval)
  796.                         end    
  797.                     gval2=nil gval2={} gval2[1]={} gval2[2]={}
  798.                     gval2[1].address=gval+gvo1
  799.                     gval2[1].flags=typ
  800.                     gval2[2].address=gval+gvo2
  801.                     gval2[2].flags=typ
  802.                     gval2=gg.getValues(gval2)
  803.                         if gg.getTargetInfo().x64 then
  804.                             gval21=tonumber(gval2[1].value)  
  805.                             gval22=tonumber(gval2[2].value)
  806.                         else
  807.                             gval21=string.format("%X",tonumber(gval2[1].value))
  808.                             gval21=string.sub(tostring(gval21), -8,-1)
  809.                             gval21=tonumber("0x"..gval21)
  810.                             gval22=string.format("%X",tonumber(gval2[2].value))
  811.                             gval22=string.sub(tostring(gval22), -8,-1)
  812.                             gval22=tonumber("0x"..gval22)
  813.                         end    
  814.                          xrefine=0
  815.                          if A[ATAB].class~=0 then
  816.                             for xyz=1,#(ACLASS) do
  817.                                 gvalc={} gvalc[1]={}
  818.                                 gvalc[1].address=gval21+(xyz-1)
  819.                                 gvalc[1].flags=1                        
  820.                                 gvalc=gg.getValues(gvalc)
  821.                                 if gvalc[1].value~=ACLASS[xyz] then xrefine=1 break xfin=xfin+1 goto XFIN end
  822.                             end
  823.                         end
  824.                        
  825.                         if A[ATAB].name~=0 then
  826.                             for xyz=1,#(ANAME) do
  827.                                 gvalc={} gvalc[1]={}
  828.                                 gvalc[1].address=gval22+(xyz-1)
  829.                                 gvalc[1].flags=1                        
  830.                                 gvalc=gg.getValues(gvalc)
  831.                                     if gvalc[1].value~=ANAME[xyz] then xrefine=1 break xfin=xfin+1 goto XFIN end                                
  832.                             end
  833.                         end
  834.                          
  835.                          if xrefine==0 then
  836.                         A[ATAB].start=ASTART AEND=AEND+1
  837.                         A[ATAB].finish=AEND
  838.                         A[ATAB].error=0
  839.                         clear() I[AEND]=xadd-xAPEXx[xXx]
  840.                         end
  841.                     xfin=xfin+1            
  842.                     end -- xfin
  843.     ATAB=ATAB+1
  844.     end -- ATAB
  845.    
  846. ---------------------------------------------------
  847.  
  848. ::FINISHED::
  849.  xBAR=0
  850.     for i = 1, ATOTAL do
  851.         if A[i].error~=0 then xBAR=xBAR+1 end
  852.     end
  853.     if xBAR==ATOTAL  then
  854.         gg.alert("× AUTO UPDATE FAILURE ×","EXIT",nil, xTAGx)  
  855.         exit()
  856.         return
  857.     end
  858.     if xBAR>=1 then gg.alert("× Auto Update Errors\nSome/All Hacks May Not Work","OK",nil, xTAGx)
  859.     else gg.alert("√ Auto Update Success","OK",nil, xTAGx)
  860.     end
  861.  
  862. ----------------------------
  863. battlevip()
  864.    
  865. --█████████████████████████████████████████████
  866. if xREV==1 then
  867. xRx=1 ORIG={} xREV={}
  868.     for XxX=1,#(xAPEXx) do  
  869.         for i, v in ipairs(I) do
  870.         ORIG[xRx]={}
  871.         ORIG[xRx].address=xAPEXx[XxX]+tonumber(I[i])
  872.         ORIG[xRx].flags=4
  873.         xRx=xRx+1
  874.         ORIG[xRx]={}
  875.         ORIG[xRx].address=xAPEXx[XxX]+tonumber(I[i])+4
  876.         ORIG[xRx].flags=4
  877.         xRx=xRx+1
  878.         end    
  879.     end
  880. ORIG=gg.getValues(ORIG)
  881. end
  882. --█████████████████████████████████████████████
  883. while true do
  884.     if gg.isVisible() then
  885.         gg.setVisible(false)
  886.         menu()
  887.     else
  888.         if apex==1 then
  889.             gg.setVisible(false)
  890.             menu()
  891.         end
  892.     end
  893. end
  894.  
Add Comment
Please, Sign In to add comment