wilmans2m

SubwaySurfers

Mar 29th, 2024 (edited)
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 31.61 KB | Gaming | 0 0
  1. LUA = 'WILS2M'
  2. GLabel = 'Subway Surf'
  3. GProcess = 'com.kiloo.subwaysurf'
  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. printx="---------------------------------------------------------------"
  25. print(printx)
  26. print(xTAGx)
  27. print("Telegram = "..xLINKx)
  28. print("TikTok = "..xLINK1x)
  29. print(printx)  
  30. print("Script = "..GLabel.."  "..GVersion)
  31. --███████████████████████
  32. --███████████████████████
  33. --███████████████████████
  34. -- APEX[GG]v2
  35. apex=1
  36. gg.setVisible(false)
  37. v=gg.getTargetInfo()
  38.     if v==nil then
  39.         print("×× ERROR ××\n×× INVALID PROCESS SELECTED / OR NO ROOT ACCESS")
  40.         gg.setVisible(true) os.exit()
  41.         return
  42.     end
  43.    
  44. HxEmenu = ('            ⚡HxE Menu by wils2m⚡\
  45.           ❦ ════ •⊰❂ - ❂⊱• ════ ❦\
  46.                     ⛥🇮‌🇳‌🇫‌🇴‌⛥\
  47.  🎮🅖🅐🅜🅔🎮 : '..GLabel..'\
  48.  🎰🅥🅔🅡🅢🎰 : '..GVersion..'\
  49.    🎰🅐🅡🅜🎰   : '..xbit..'\
  50. \
  51. ⏳Exᴘɪʀᴇᴅ Date⏳ : '..expire..'\
  52. 🎁 Encryption 🎁 :  '..expire..'\
  53.            ❦ ════ •⊰❂ - ❂⊱• ════ ❦')
  54.            
  55. gg.alert(HxEmenu)
  56.  
  57. gg.alert("                           Patch Note\
  58.           ❦ ════ •⊰❂ - ❂⊱• ════ ❦\
  59. - HxE script menu\
  60. - Huge thanks to Apex[GG]\
  61. - Script auto updated\
  62. - NEW\
  63. - Added real money hook\
  64. .............................................\
  65. - God mode\
  66. - Free resurrection\
  67. - Free In-App Purchase\
  68. - Unlimited Gold/Gems available\
  69. - Multiple Score available\
  70. - Speed hack\
  71. - More++\
  72.           ❦ ════ •⊰❂ - ❂⊱• ════ ❦\
  73. ")
  74. ------------------------------------------------------------------------------
  75. A={} for i =1,100 do A[i]={} end
  76. ------------------------------------------------------------------------------
  77. OFF="× " ON="√ "
  78. GM=OFF AA=OFF CD=OFF UM=OFF SM=OFF
  79. FR=OFF FP=OFF SH=OFF NT=OFF PO=OFF
  80. ST=OFF JP=OFF HJ=OFF
  81.     if v.x64 then x1="hC0BEA0D2" x2='h006A98D2'
  82.     else x1="h990040E3" x2='h640000E3'
  83.     end
  84.  
  85. function menu()
  86. apex=0
  87. gg.toast(xTAGx)  
  88. mc=gg.multiChoice({
  89. FR.."Free resurrection",
  90. GM.."God mode",
  91. AA.."All achievements",
  92. UM.."Unlimited Coins/Gems",
  93. CD.."Coins doubler",
  94. SM.."Multiple score",  
  95. FP.."Free In-App Purchase/Free Shop",
  96. JP.."Air Jump",
  97. NT.."No Train",
  98. PO.."PowerUp",
  99. SH.."Speed",
  100. HJ.."High Jump",
  101.     "[ EXIT ]"},
  102.     {},xTAGx.."\n"..xLINKx.."\n"..GLabel.." "..GVersion.." "..xBITx)
  103.    
  104.     if mc==nil then cancel() return end
  105.     if mc[1] == true then res() end
  106.     if mc[2] == true then god() end
  107.     if mc[3] == true then achieve() end
  108.     if mc[4] == true then gold() end
  109.     if mc[5] == true then doublers() end
  110.     if mc[6] == true then scorea() end
  111.     if mc[7] == true then free() end
  112.     if mc[8] == true then jump() end
  113.     if mc[9] == true then notrain() end
  114.     if mc[10] == true then powerup() end
  115.     if mc[11] == true then speed() end
  116.     if mc[12] == true then hjump() end 
  117.    
  118. xhaX={
  119. FR.."Free resurrection",
  120. GM.."God mode",
  121. AA.."All achievements",
  122. UM.."Unlimited Coins/Gems",
  123. CD.."Coins doubler",
  124. SM.."Multiple score",  
  125. FP.."Free In-App Purchase",
  126. JP.."Air Jump",
  127. NT.."No Train",
  128. PO.."PowerUp",
  129. SH.."Speed",
  130. HJ.."High Jump",
  131.     }
  132. xhaX=table.concat(xhaX, "\n")
  133. xhaX=tostring(xhaX)
  134.  
  135.     if mc[13] then exit() return end
  136.  
  137. gg.toast("[√] Complete")
  138. gg.alert(GLabel.." "..GVersion.." "..xBITx.."\n\n"..xhaX,"OK",nil,xTAGx)  
  139.  
  140. end
  141.  
  142. --█████████████████████████████████████████████
  143.  
  144. --// Namespace: SYBO.Subway
  145. --public class ScoreMultiplierManager
  146. --public int get_BaseMultiplierSum()
  147.  
  148.     A[1].name="SYBO.Subway"
  149.     A[1].class="ScoreMultiplierManager"
  150.     A[1].method="get_BaseMultiplierSum"
  151.  
  152.     function scorea()
  153.     if A[1].error==1 then error() return end
  154.     for i = A[1].start, A[1].finish do o=I[i]
  155.     if SM==OFF then x="hE0E184D2" arm() else revert() end
  156.     end
  157.  
  158.     if SM==OFF then SM=ON else SM=OFF end
  159.     end
  160.        
  161. --█████████████████████████████████████████████
  162.  
  163. --//Namespace: SYBO.Subway
  164. --public class EndRunSequence : MonoBehaviour
  165. --private int get_Score()
  166.     A[2].name="SYBO.Subway"
  167.     A[2].class="EndRunSequence"
  168.     A[2].method="get_Score"
  169. --01 02 A0 E3 1E FF 2F E1
  170.  
  171. function scoreb()
  172.     if A[2].error==1 then error() return end
  173. end
  174.  
  175. --█████████████████████████████████████████████
  176.  
  177. --//Namespace: SYBO.Subway.Meta
  178. --public class WalletModel : ModelBase
  179. --public int GetCurrency(CurrencyType type)
  180.     A[3].name="SYBO.Subway.Meta"
  181.     A[3].class="WalletModel"
  182.     A[3].method="GetCurrency"
  183. --public bool HasCurrency(CurrencyType type)
  184.     A[4].name="SYBO.Subway.Meta"
  185.     A[4].class="WalletModel"
  186.     A[4].method="HasCurrency"
  187. --public bool CanAfford(Currency currencyValue)
  188. --public bool CanAfford(CurrencyType currencyType, int amount)
  189.     A[5].name="SYBO.Subway.Meta"
  190.     A[5].class="WalletModel"
  191.     A[5].method="CanAfford"
  192.    
  193. function gold()
  194.     for i = 3,5  do if A[i].error == 1 then error() break return end end
  195.     for i = A[3].start, A[3].finish do o=I[i]
  196.     if UM==OFF then x="h0000B0D2" arm() else revert() end
  197.     end
  198.     for i = A[4].start, A[5].finish do o=I[i]
  199.     if UM==OFF then x=1 arm() else revert() end
  200.     end
  201.  
  202.     if UM==OFF then UM=ON else UM=OFF end
  203. end
  204.  
  205. --█████████████████████████████████████████████
  206.  
  207. --// Namespace: SYBO.Subway
  208. --public class EndRunCoinWidget : MonoBehaviour
  209. --private bool get_OwnsCoinDoubler()
  210.     A[6].name="SYBO.Subway"
  211.     A[6].class="EndRunCoinWidget"
  212.     A[6].method="get_OwnsCoinDoubler"
  213. --private bool get_HasGivenBonusCoins()
  214.     A[7].name="SYBO.Subway"
  215.     A[7].class="EndRunCoinWidget"
  216.     A[7].method="get_HasGivenBonusCoins"
  217.    
  218. function doublers()
  219.     for i = 6,7 do if A[i].error == 1 then error() break return end end
  220.     for i = A[6].start, A[7].finish do o=I[i]
  221.     if CD==OFF then x=1 arm() else revert() end
  222.     end
  223.  
  224.     if CD==OFF then CD=ON else CD=OFF end
  225. end
  226.  
  227. --█████████████████████████████████████████████
  228.  
  229. --//Namespace: SYBO.Subway.Meta
  230. --public class AvailableCharacter : SkinnableItem
  231. --public bool IsOutfitOwned(string outfitId)
  232.     A[8].name="SYBO.Subway.Meta"
  233.     A[8].class="AvailableCharacter"
  234.     A[8].method="IsOutfitOwned"
  235. --public override bool IsSkinOwned(string skinId)
  236.     A[9].name="SYBO.Subway.Meta"
  237.     A[9].class="AvailableCharacter"
  238.     A[9].method="IsSkinOwned"
  239. --public class OwnedCharacterState : BaseOwnedItem
  240. --public bool HasOutfit(string outfitId)
  241.     A[10].name="SYBO.Subway.Meta"
  242.     A[10].class="OwnedCharacterState"
  243.     A[10].method="HasOutfit"
  244. --public bool IsOutfitLocked(string outfitId)
  245. --?????
  246. --// Namespace: SYBO.Subway.Meta
  247. --public class AvailableCharacter : SkinnableItem
  248. --public override bool get_IsOwned()
  249.     A[11].name="SYBO.Subway.Meta"
  250.     A[11].class="AvailableCharacter"
  251.     A[11].method="get_IsOwned"
  252.  
  253. function free()
  254.     for i = 8,11 do if A[i].error == 1 then error() break return end end
  255.     if A[25].error==1 then error() return end
  256.     for i = A[8].start, A[11].finish do o=I[i]
  257.     if FP==OFF then x=1 arm() else revert() end
  258.     end
  259.     for i = A[25].start, A[25].finish do o=I[i]
  260.     if FP==OFF then x=0 arm() else revert() end
  261.     end
  262.  
  263.     if FP==OFF then FP=ON else FP=OFF end
  264. end
  265.  
  266. --█████████████████████████████████████████████
  267.  
  268. --// Namespace: SYBO.Subway
  269. --public class CharacterStumble : MonoBehaviour
  270. --private bool IsAutoReviveEnabled()
  271.     A[12].name="SYBO.Subway"
  272.     A[12].class="CharacterStumble"
  273.     A[12].method="IsAutoReviveEnabled"
  274.  
  275. function res()
  276.     if A[12].error==1 then error() return end
  277.     for i = A[12].start, A[12].finish do o=I[i]
  278.     if FR==OFF then x=1 arm() else revert() end
  279.     end
  280.  
  281.     if FR==OFF then FR=ON else FR=OFF end
  282. end
  283.  
  284. --█████████████████████████████████████████████
  285.  
  286. --// Namespace: SYBO.Subway
  287. --public class CharacterStumble : MonoBehaviour
  288. --public void Stumble(DeathCause cause)
  289.     A[13].name="SYBO.Subway"
  290.     A[13].class="CharacterStumble"
  291.     A[13].method="Stumble"
  292. --public class CharacterStumble : MonoBehaviour
  293. --public void Kill(DeathCause cause)
  294.     A[14].name="SYBO.Subway"
  295.     A[14].class="CharacterStumble"
  296.     A[14].method="Kill"
  297. --//Namespace: SYBO.RunnerCore.Character
  298. --public class CharacterMotor : MonoBehaviour
  299. --public bool CheckFrontalImpact(ImpactFrameState impactState)
  300.     A[15].name="SYBO.RunnerCore.Character"
  301.     A[15].class="CharacterMotor"
  302.     A[15].method="CheckFrontalImpact"
  303.  
  304. function god()
  305.     for i = 13,15 do if A[i].error == 1 then error() break return end end
  306.     for i = A[13].start, A[15].finish do o=I[i]
  307.     if GM==OFF then x=0 arm() else revert() end
  308.     end
  309.  
  310.     if GM==OFF then GM=ON else GM=OFF end
  311. end
  312.    
  313. --█████████████████████████████████████████████
  314.  
  315. --//Namespace: SYBO.Subway.Meta
  316. --public class Achievement : IComparable<Achievement>
  317. --public void set_ProgressRatio(float value)
  318.     A[16].name="SYBO.Subway.Meta"
  319.     A[16].class="Achievement"
  320.     A[16].method="set_ProgressRatio"
  321. --public bool get_IsTierCompleted()
  322.     A[17].name="SYBO.Subway.Meta"
  323.     A[17].class="Achievement"
  324.     A[17].method="get_IsTierCompleted"
  325. --public bool get_IsAchievementCompleted()
  326.     A[18].name="SYBO.Subway.Meta"
  327.     A[18].class="Achievement"
  328.     A[18].method="get_IsAchievementCompleted"
  329.  
  330. function achieve()
  331.     for i = 16,18 do if A[i].error == 1 then error() break return end end
  332.     for i = A[16].start, A[16].finish do o=I[i]
  333.     if AA==OFF then x="h0000B0D2" arm() else revert() end
  334.     end    
  335.     for i = A[17].start, A[18].finish do o=I[i]
  336.     if AA==OFF then x=1 arm() else revert() end
  337.     end
  338.  
  339.     if AA==OFF then AA=ON else AA=OFF end
  340. end
  341.  
  342. --█████████████████████████████████████████████
  343.  
  344. --//Namespace: SYBO.Subway
  345. --public class MovingTrain : SubwayEntity
  346. --private void Update()
  347.     A[19].name="SYBO.Subway"
  348.     A[19].class="MovingTrain"
  349.     A[19].method="Update"
  350. --public override void Disable()
  351.  
  352. function notrain()
  353.     if A[19].error==1 then error() return end
  354.     for i = A[19].start, A[19].finish do o=I[i]
  355.     if NT==OFF then x=0 arm() else revert() end
  356.     end
  357.  
  358.     if NT==OFF then NT=ON else NT=OFF end
  359. end
  360.  
  361. --█████████████████████████████████████████████
  362.  
  363. --//Namespace: SYBO.Subway.Meta
  364. --public class UpgradesModel : ModelBase
  365. --public int GetPowerupLevel(string powerupId)
  366.     A[20].name="SYBO.Subway.Meta"
  367.     A[20].class="UpgradesModel"
  368.     A[20].method="GetPowerupLevel"
  369.  
  370. function powerup()
  371.     if A[20].error==1 then error() return end
  372.     for i = A[20].start, A[20].finish do o=I[i]
  373.     if PO==OFF then x="hE07C80D2" arm() else revert() end
  374.     end
  375.  
  376.     if PO==OFF then PO=ON else PO=OFF end
  377. end
  378.  
  379. --█████████████████████████████████████████████
  380.  
  381. --█████████████████████████████████████████████
  382.  
  383. --//Namespace: SYBO.RunnerCore.Character
  384. --public class CharacterMotorAbilities : MonoBehaviour
  385. --public float get_MinSpeed
  386.     A[21].name="SYBO.RunnerCore.Character"
  387.     A[21].class="CharacterMotorAbilities"
  388.     A[21].method="get_MinSpeed"
  389. --public float get_MaxSpeed
  390.     A[22].name="SYBO.RunnerCore.Character"
  391.     A[22].class="CharacterMotorAbilities"
  392.     A[22].method="get_MaxSpeed"
  393.  
  394. function speed()
  395.     for i = 21,22 do if A[i].error == 1 then error() break return end end
  396.     for i = A[21].start, A[22].finish do o=I[i]
  397.     if SH==OFF then x="hC072A8D2" arm() else revert() end
  398.     end
  399.  
  400.     if SH==OFF then SH=ON else SH=OFF end
  401. end
  402.  
  403. --█████████████████████████████████████████████
  404.  
  405. --//Namespace: SYBO.RunnerCore.Character
  406. --public class CharacterMotor : MonoBehaviour
  407. --public float get_CanJump
  408.     A[23].name="SYBO.RunnerCore.Character"
  409.     A[23].class="CharacterMotor"
  410.     A[23].method="get_CanJump"
  411.  
  412. function jump()
  413.     if A[23].error==1 then error() return end
  414.     for i = A[23].start, A[23].finish do o=I[i]
  415.     if JP==OFF then x=1 arm() else revert() end
  416.     end
  417.  
  418.     if JP==OFF then JP=ON else JP=OFF end
  419. end
  420.  
  421. --█████████████████████████████████████████████
  422.  
  423. --//Namespace: SYBO.RunnerCore.Character
  424. --public class CharacterMotorAbilities : MonoBehaviour
  425. --public float get_JumpHeight() { }
  426.     A[24].name="SYBO.RunnerCore.Character"
  427.     A[24].class="CharacterMotorAbilities"
  428.     A[24].method="get_JumpHeight"
  429.  
  430. function hjump()
  431.     if A[24].error==1 then error() return end
  432.     for i = A[24].start, A[24].finish do o=I[i]
  433.     if HJ==OFF then x="h00F0271E" arm() else revert() end
  434.     end
  435.  
  436.     if HJ==OFF then HJ=ON else HJ=OFF end
  437. end
  438.  
  439. --█████████████████████████████████████████████
  440.  
  441. --//Namespace: SYBO.Subway.Meta
  442. --public class Currency : IEquatable<Currency>
  443. --public bool get_IsIAP()
  444.     A[25].name="SYBO.Subway.Meta"
  445.     A[25].class="Currency"
  446.     A[25].method="get_IsIAP"
  447.  
  448. --█████████████████████████████████████████████
  449. --█████████████████████████████████████████████
  450.     if v.processName~=GProcess then
  451.         print("This Script is For:\n    "..GLabel.."\n    "..GProcess.."\nYou Selected:\n    "..v.label.."\n    "..v.processName)
  452.         gg.setVisible (true) os.exit()
  453.         return
  454.     end
  455. ------------------------------------------------------------------------------
  456.     if v.x64 then bitx=64 xBITx="[x64]" else bitx=32 xBITx="[x32]" end
  457.         print(xBITx)  
  458.         print(printx)  
  459. ------------------------------------------------------------------------------
  460.  
  461.  
  462. isrdy=gg.alert("Subway Surfer\n\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)  
  463. if isrdy~=2 then gg.setVisible(true) os.exit() return end
  464.  
  465. --█████████████████████████████████████████████
  466.     if LibResult==1 then
  467.     xAPEXx={} xXx=0
  468.     xLibRes=0
  469.     libx=gg.getRangesList()
  470.         if #(libx)==0 then
  471.         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' ")
  472.         gg.setVisible(true)
  473.         os.exit()
  474.         end
  475.     libx=gg.getRangesList(xlib)
  476.         if #(libx)==0 then  
  477.         print("×× No "..xlib.." Found")
  478.         xLibRes=2
  479.         goto APEX_SPLIT
  480.         end
  481.     xlibn=0
  482.         for i, v in ipairs(libx) do
  483.             if libx[i].state=="Xa" then
  484.             xXx=xXx+1
  485.             xAPEXx[xXx]=libx[i].start
  486.             xLibRes=1
  487.             end
  488.         end
  489.         if xLibRes==0 then
  490.         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' ")
  491.         gg.setVisible(true)
  492.         os.exit()    
  493.         end    
  494.                  
  495.         ::APEX_SPLIT::    
  496.         if xLibRes==2 then
  497.         splitapk=0
  498.         libx=gg.getRangesList()
  499.             for i, v in ipairs(libx) do
  500.                 if libx[i].state=="Xa" and string.match(libx[i].name,"split_config") then
  501.                 splitapk=1
  502.                 end
  503.             end
  504.             if splitapk==1 then
  505.             xsapk={} xsapkx=0
  506.                 for i, v in ipairs(libx) do
  507.                     if libx[i].state=="Xa" then
  508.                     xsapkx=xsapkx+1
  509.                     xsapk[xsapkx]=libx[i]["end"]-libx[i].start
  510.                     end
  511.                 end
  512.                 if xsapkx~=0 then                
  513.                 APEXQ=math.max(table.unpack(xsapk))
  514.                     for i, v in ipairs(libx) do              
  515.                         if libx[i].state=="Xa" and libx[i]["end"]-libx[i].start==APEXQ then              
  516.                         xXx=xXx+1            
  517.                        xAPEXx[xXx]=libx[i].start
  518.                         print("√√ Split Apk Lib Found\n√√ "..libx[i].name)
  519.                         xLibRes=1                      
  520.                         end
  521.                     end
  522.                 end
  523.             end
  524.          
  525.              if splitapk==0 and xLibRes~=1 then
  526.              print("×× No split_config Lib Found")  
  527.              xc=1 xt={}
  528.              libx=gg.getRangesList()
  529.                  for i, v in ipairs(libx) do
  530.                      if libx[i].state=="Xa" then
  531.                      xt[xc]=tonumber(libx[i]["end"]-libx[i].start)
  532.                      xc=xc+1
  533.                      end
  534.                  end
  535.              APEXQ=math.max(table.unpack(xt))
  536.                  for i, v in ipairs(libx) do              
  537.                      if libx[i].state=="Xa" and libx[i]["end"]-libx[i].start==APEXQ then        
  538.                      xXx=xXx+1      
  539.                      xAPEXx[xXx]=libx[i].start
  540.                      print("√√ math.max Xa Lib Found\n√√ "..libx[i].name)
  541.                      xLibRes=1  
  542.                      end
  543.                  end
  544.             end                        
  545.  
  546.             if xLibRes~=1 then
  547.             print("×× Correct Lib Not Found ××\n×× Direct/Split Config/Xa Max ××")
  548.             gg.setVisible(true)
  549.             os.exit()
  550.              return
  551.             end
  552.         end
  553.     end
  554. --█████████████████████████████████████████████
  555. function arm()
  556. o=tonumber(o)
  557.     for XxX=1,#(xAPEXx) do
  558.     xdump=nil xdump={}
  559.     xdump[1]={} xdump[2]={}
  560.     xdump[1].address=xAPEXx[XxX] + o
  561.     xdump[1].flags=4
  562.         if x==0 then xdump[1].value=xfalse end
  563.         if x==1 then xdump[1].value=xtrue end
  564.         if x~=0 and x~=1 then xdump[1].value=x end
  565.     xdump[2].address=xAPEXx[XxX]+(o+4)
  566.     xdump[2].flags=4
  567.     xdump[2].value=xEND
  568.     gg.setValues(xdump)
  569.     end
  570. end
  571. ------------------------------------------------------------------------------  
  572. function revert()
  573.     for XxX=1,#(xAPEXx) do
  574.     REVERT=nil REVERT={} xRx=nil xRx=1
  575.         for i, v in ipairs(ORIG) do
  576.             if tonumber(xAPEXx[XxX]+o)==ORIG[i].address then
  577.             REVERT[xRx]={}
  578.             REVERT[xRx].address=xAPEXx[XxX]+o
  579.             REVERT[xRx].flags=4
  580.             REVERT[xRx].value=ORIG[i].value
  581.             xRx=xRx+1
  582.             REVERT[xRx]={}
  583.             REVERT[xRx].address=xAPEXx[XxX]+o+4
  584.             REVERT[xRx].flags=4
  585.             REVERT[xRx].value=ORIG[i+1].value
  586.             gg.setValues(REVERT)
  587.             break
  588.             end
  589.         xRx=xRx+1
  590.         end
  591.     end
  592. end
  593.  
  594. --█████████████████████████████████████████████
  595.  
  596. function sort()
  597. SORT1={} apexsort=0
  598.      for sorti = A[s].start, A[s].finish do
  599.          apexsort=apexsort+1
  600.          SORT1[apexsort] = I[sorti]
  601.      end
  602. SORT2={} table.sort(SORT1)
  603.     for sort2, v in pairs(SORT1) do
  604.         SORT2[sort2]=v
  605.     end
  606. r=SORT2[r]
  607. end
  608.  
  609. --█████████████████████████████████████████████
  610. if v.x64 then
  611. xtrue="h200080D2" -- MOV X0, #0x1
  612. xfalse="h000080D2" -- MOV X0, #0x0
  613. xEND="hC0035FD6" -- RET
  614. else
  615. xtrue="h0100A0E3" -- MOVW R0, #1
  616. xfalse="h0000A0E3" -- MOVW R0, #0
  617. xEND="h1EFF2FE1" -- BX LR
  618. end
  619.  
  620. --█████████████████████████████████████████████
  621. -- APEX[GG]v2
  622. function clear()
  623. gg.getResults(gg.getResultsCount())
  624. gg.clearResults()
  625. end
  626. ------------------------------------------------------------------------------  
  627. function get()
  628. gg.getResults(gg.getResultsCount())
  629. end
  630. ------------------------------------------------------------------------------  
  631. function search()
  632. gg.getResults(gg.getResultsCount())
  633. gg.clearResults()
  634. gg.searchNumber(x,t)
  635. end
  636. ------------------------------------------------------------------------------  
  637. function refine()
  638. gg.refineNumber(x,t)
  639. end
  640. ------------------------------------------------------------------------------  
  641. function refinenot()
  642. gg.refineNumber(x,t,false,gg.SIGN_NOT_EQUAL)
  643. end
  644. ------------------------------------------------------------------------------  
  645. function edit()
  646. gg.getResults(gg.getResultsCount())
  647. gg.editAll(x,t)
  648. end
  649. ------------------------------------------------------------------------------  
  650. function check()
  651. E=nil E=gg.getResultsCount()
  652. end
  653. ------------------------------------------------------------------------------  
  654. function offset()
  655. o=tonumber(o) addoff=nil
  656. addoff=gg.getResults(gg.getResultsCount())
  657.     for i, v in ipairs(addoff) do
  658.         addoff[i].address=addoff[i].address+o
  659.         addoff[i].flags=t
  660.     end
  661. gg.loadResults(addoff)
  662. end
  663.  
  664. --█████████████████████████████████████████████
  665. function cancel()
  666. gg.toast("CANCELLED")
  667. end
  668. ------------------------------------------------------------------------------  
  669. function wait()
  670. gg.toast("Please Wait..")
  671. end
  672. ------------------------------------------------------------------------------  
  673. function error()
  674. gg.toast("× ERROR ×")
  675. gg.sleep(1000)
  676. end
  677. ------------------------------------------------------------------------------  
  678. function exit()
  679. gg.getListItems()
  680. gg.clearList()
  681. gg.getResults(gg.getResultsCount())
  682. gg.clearResults()
  683. gg.toast("[ EXIT ]")  
  684.     if xhaX~=nil then
  685.         print(printx)
  686.         print(xhaX)
  687.         print(printx)  
  688.     end
  689. gg.setVisible(true)
  690. os.exit()
  691. return
  692. end
  693. --█████████████████████████████████████████████
  694. if v.x64 then off1=-16 typ=32 else off1=-8 typ=4 end
  695. gg.setRanges(gg.REGION_OTHER | gg.REGION_C_ALLOC)
  696. gmdx=gg.getRangesList("global-metadata.dat")
  697.     if #(gmdx)~=0 then        
  698.     gmds=gg.getRangesList("global-metadata.dat")[1].start
  699.     gmde=gg.getRangesList("global-metadata.dat")[1]["end"]
  700.     else gmds=nil gmde=nil
  701.     end
  702. ATOTAL=0
  703. for i = 1,100 do
  704.     if A[i].method==nil then break end
  705.     ATOTAL=ATOTAL+1
  706. end
  707.  
  708. ASTART=1 AEND=0 ATABT=ATOTAL+1 ATAB=1
  709. S=0
  710.     while ATAB<=ATOTAL do
  711.     ::AUTOSTART::
  712.     if gg.isVisible() then gg.setVisible(false) end
  713.         if ATAB>ATOTAL then break goto FINISHED end
  714.     gg.toast("Please Wait.. [ "..ATABT-ATAB.." ]")
  715.     A[ATAB].error=1
  716.     ANAME=nil ANAME={}
  717.     if A[ATAB].name~=nil then
  718.         for i = 1,#(tostring(A[ATAB].name)) do
  719.             ANAME[i]=string.byte(A[ATAB].name,i)
  720.         end
  721.     else
  722.         A[ATAB].name=0
  723.     end
  724.     ACLASS=nil ACLASS={}
  725.     if A[ATAB].class~=nil then
  726.         for i = 1,#(tostring(A[ATAB].class)) do
  727.             ACLASS[i]=string.byte(A[ATAB].class,i)
  728.         end
  729.     else
  730.         A[ATAB].class=0
  731.     end
  732.    
  733.                 ASTART=AEND+1
  734.                 clear() t=1
  735.                 gg.searchNumber(":"..tostring(A[ATAB].method),1,false,gg.SIGN_EQUAL,gmds, gmde)
  736.                 xm=gg.getResults(2) gg.getResults(gg.getResultsCount())
  737.                 check()
  738.                     if E==0 then ATAB=ATAB+1
  739.                         if ATAB>ATOTAL then break return end
  740.                     goto AUTOSTART return
  741.                     end
  742.                 x=xm[1].value..";"..xm[2].value.."::2" refine()
  743.                 x=xm[1].value refine()
  744.                 o=-1 offset() x=0 refine() oo=#(tostring(A[ATAB].method))
  745.                 o=oo+1 offset() refine() o=-oo offset()
  746.                 check()
  747.                     if E==0 then ATAB=ATAB+1
  748.                         if ATAB>ATOTAL then break return end
  749.                     goto AUTOSTART return
  750.                     end
  751.                 gg.searchPointer(0) xcount=gg.getResultsCount()
  752.                 xpoint=gg.getResults(xcount,nil, nil, nil, nil, nil, nil, nil,gg.POINTER_READ_ONLY)
  753.                     if #(xpoint)==0 then ATAB=ATAB+1
  754.                         if ATAB>ATOTAL then break return end
  755.                     goto AUTOSTART return
  756.                     end
  757.                 clear()
  758.                     for xp=1,#(xpoint) do
  759.                     xpoint[xp].address=xpoint[xp].address+off1
  760.                     xpoint[xp].flags=typ
  761.                     end
  762.                 gg.loadResults(xpoint)
  763.                 xoff=gg.getResults(#(xpoint),nil, nil, nil, nil, nil, nil, nil, gg.POINTER_EXECUTABLE)
  764.                     if #(xoff)==0 then ATAB=ATAB+1
  765.                         if ATAB>ATOTAL then break return end
  766.                     goto AUTOSTART return
  767.                     end
  768.                     xfin=1
  769.                     while xfin<=#(xoff) do
  770.                     ::XFIN::
  771.                         if xfin>#(xoff) then ATAB=ATAB+1
  772.                             if ATAB>ATOTAL then break return end
  773.                         goto AUTOSTART return
  774.                         end
  775.                         if gg.getTargetInfo().x64 then
  776.                             xadd=tonumber(xoff[xfin].value)  
  777.                         else
  778.                             xadd=string.format("%X",tonumber(xoff[xfin].value))
  779.                             xadd=string.sub(tostring(xadd), -8,-1)
  780.                             xadd=tonumber("0x"..xadd)
  781.                         end    
  782.                     gval1=nil gval1={} gval1[1]={}
  783.                         if gg.getTargetInfo().x64 then gvo=24 gvo1=16 gvo2=24 else gvo=12 gvo1=8 gvo2=12 end
  784.                     gval1[1].address=xoff[xfin].address+gvo
  785.                     gval1[1].flags=typ
  786.                     gval1=gg.getValues(gval1)
  787.                         if gg.getTargetInfo().x64 then
  788.                             gval=tonumber(gval1[1].value)  
  789.                         else
  790.                             gval=string.format("%X",tonumber(gval1[1].value))
  791.                             gval=string.sub(tostring(gval), -8,-1)
  792.                             gval=tonumber("0x"..gval)
  793.                         end    
  794.                     gval2=nil gval2={} gval2[1]={} gval2[2]={}
  795.                     gval2[1].address=gval+gvo1
  796.                     gval2[1].flags=typ
  797.                     gval2[2].address=gval+gvo2
  798.                     gval2[2].flags=typ
  799.                     gval2=gg.getValues(gval2)
  800.                         if gg.getTargetInfo().x64 then
  801.                             gval21=tonumber(gval2[1].value)  
  802.                             gval22=tonumber(gval2[2].value)
  803.                         else
  804.                             gval21=string.format("%X",tonumber(gval2[1].value))
  805.                             gval21=string.sub(tostring(gval21), -8,-1)
  806.                             gval21=tonumber("0x"..gval21)
  807.                             gval22=string.format("%X",tonumber(gval2[2].value))
  808.                             gval22=string.sub(tostring(gval22), -8,-1)
  809.                             gval22=tonumber("0x"..gval22)
  810.                         end    
  811.                          xrefine=0
  812.                          if A[ATAB].class~=0 then
  813.                             for xyz=1,#(ACLASS) do
  814.                                 gvalc={} gvalc[1]={}
  815.                                 gvalc[1].address=gval21+(xyz-1)
  816.                                 gvalc[1].flags=1                        
  817.                                 gvalc=gg.getValues(gvalc)
  818.                                 if gvalc[1].value~=ACLASS[xyz] then xrefine=1 break xfin=xfin+1 goto XFIN end
  819.                             end
  820.                         end
  821.                        
  822.                         if A[ATAB].name~=0 then
  823.                             for xyz=1,#(ANAME) do
  824.                                 gvalc={} gvalc[1]={}
  825.                                 gvalc[1].address=gval22+(xyz-1)
  826.                                 gvalc[1].flags=1                        
  827.                                 gvalc=gg.getValues(gvalc)
  828.                                     if gvalc[1].value~=ANAME[xyz] then xrefine=1 break xfin=xfin+1 goto XFIN end                                
  829.                             end
  830.                         end
  831.                          
  832.                          if xrefine==0 then
  833.                         A[ATAB].start=ASTART AEND=AEND+1
  834.                         A[ATAB].finish=AEND
  835.                         A[ATAB].error=0
  836.                         clear() I[AEND]=xadd-xAPEXx[xXx]
  837.                         end
  838.                     xfin=xfin+1            
  839.                     end -- xfin
  840.     ATAB=ATAB+1
  841.     end -- ATAB
  842.    
  843. ---------------------------------------------------
  844.  
  845. ::FINISHED::
  846.  xBAR=0
  847.     for i = 1, ATOTAL do
  848.         if A[i].error~=0 then xBAR=xBAR+1 end
  849.     end
  850.     if xBAR>=ATOTAL  then
  851.         gg.toast("×× FAILURE ××") gg.alert("× AUTO UPDATE FAILURE ×","EXIT",nil, xTAGx)  
  852.         exit()
  853.         return
  854.     end
  855.     if xBAR>=1 then gg.toast("× ERROR") gg.alert("× Auto Update Errors\nSome/All Hacks May Not Work","OK",nil, xTAGx)
  856.     else gg.toast("√ SUCCESS") gg.alert("\n√ Auto Update Success\n\n'Hacking is the Game'","OK",nil, xTAGx)
  857.     end
  858.    
  859. --█████████████████████████████████████████████
  860. if xREV==1 then
  861. xRx=1 ORIG={} xREV={}
  862.     for XxX=1,#(xAPEXx) do  
  863.         for i, v in ipairs(I) do
  864.         ORIG[xRx]={}
  865.         ORIG[xRx].address=xAPEXx[XxX]+tonumber(I[i])
  866.         ORIG[xRx].flags=4
  867.         xRx=xRx+1
  868.         ORIG[xRx]={}
  869.         ORIG[xRx].address=xAPEXx[XxX]+tonumber(I[i])+4
  870.         ORIG[xRx].flags=4
  871.         xRx=xRx+1
  872.         end    
  873.     end
  874. ORIG=gg.getValues(ORIG)
  875. end
  876. --█████████████████████████████████████████████
  877. while true do
  878.     if gg.isVisible() then
  879.         gg.setVisible(false)
  880.         menu()
  881.     else
  882.         if apex==1 then
  883.             gg.setVisible(false)
  884.             menu()
  885.         end
  886.     end
  887. end
  888.  
Add Comment
Please, Sign In to add comment