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(0x167ba0fe) 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 function GetValue(Address , Flag) return gg.getValues({{address = Address , flags = Flag}})[1].value end function SetValue(Address , Flag , Value) return gg.setValues({{address = Address , flags = Flag , value = Value}}) end function GetSo(So) local So_List = gg.getRangesList('^/data/*.so*$') for i = 1 , #So_List do if So_List[i].internalName:gsub('^.*/', '') == So[1] and So_List[i].state == So[2] then return So_List[i].start end end end function ToPointer(So_Start,Offsets) local Address = So_Start for i = 1 , #Offsets do Address = gg.getValues({{ address = Address + Offsets[i] , flags = 32 }})[1]["value"] end return Address end function FH_Pointer(So,Pointer,Flag) Temp_So = gg.getRangesList(So)[1].start Address = Temp_So + Pointer return Address end function GetDistance(x1 , y1 , z1 , x2 , y2 , z2) return ( (x2 - x1) ^ 2 + (y2 - y1) ^ 2 + (z2 - z1) ^ 2 ) ^ 0.5 end function GetPlayer(Deepty , Offset_Y , Offset_Self , Pointer , Self, DetectDistance) Player = {} local ListPage , GetList , GetList1 = ToPointer(So_Start_Cb , Pointer) , {} , {} for i = 1 , Deepty do table.insert(GetList , {address = ListPage + 8 * i , flags = 32}) end local GetList , GetList2 = gg.getValues(GetList) , {} for i = 1 , Deepty do table.insert(GetList1 , {address = GetList[i].value + Offset_Self , flags = 32}) end local GetList1 = gg.getValues(GetList1) for i = 1 , #GetList1 do if GetList1[i].value == 7497081 then table.insert(GetList2 , {address = GetList[i].value + Offset_Y - 4 , flags = 16}) table.insert(GetList2 , {address = GetList[i].value + Offset_Y , flags = 16}) table.insert(GetList2 , {address = GetList[i].value + Offset_Y + 4 , flags = 16}) end end local GetList2 = gg.getValues(GetList2) for i = 1 , #GetList2 / 3 do local d = GetDistance(GetList2[i * 3 - 2].value , GetList2[i * 3 - 1].value , GetList2[i * 3 - 0].value, Self_Info.X , Self_Info.Y , Self_Info.Z) if d > 0.5 and d <= DetectDistance then table.insert(Player , { Address = GetList[i].value , X = GetList2[i * 3 - 2].value , Y = GetList2[i * 3 - 1].value , Z = GetList2[i * 3].value , Distance = d }) end end end function GetClosestId(X , Y , Z) local Min = 1 if #Player > 1 then for i = 1 , #Player do if Player[i].X ~= X and Player[i].Y ~= Y and Player[i].Z ~= Z then if GetDistance(Player[i].X , Player[i].Y , Player[i].Z , X , Y , Z) <= GetDistance(Player[Min].X , Player[Min].Y , Player[Min].Z , X , Y , Z) and Player[i].Distance > 1 then Min = i end end end end return Min end function Move(x , y , z) gg.setValues({ {address = Self.Y - 4 , flags = 16 , value = x}, {address = Self.Y , flags = 16 , value = y}, {address = Self.Y + 4 , flags = 16 , value = z}, {address = Self.Y - 4 + 0xC, flags = 16 , value = x}, {address = Self.Y + 0xC, flags = 16 , value = y}, {address = Self.Y + 4 + 0xC, flags = 16 , value = z} }) --gg.toast('已传送至坐标\nX:'..x..'\nY:'..y..'\nZ:'..z) end function GravityChange(Speed,Duration) timer = 0 if Duration == nil then Duration = 10 gg.toast('Duration = nil') end for i=1,Duration do if Speed[1] == nil then else gg.setValues({{address = Func.MotionY - 4 , flags = 16 , value = Speed[1]}}) end if Speed[2] == nil then else gg.setValues({{address = Func.MotionY , flags = 16 , value = Speed[2]}}) end if Speed[3] == nil then else gg.setValues({{address = Func.MotionY + 4 , flags = 16 , value = Speed[3]}}) end end end function ViewChange(Direction,Duration) timer = 0 if Duration == nil then Duration = 10 gg.toast('Duration = nil') end for i=1,Duration do if Direction[1] == nil then else gg.setValues({{address = Func.ViewY - 4 , flags = 16 , value = Direction[1]}}) end if Direction[2] == nil then else gg.setValues({{address = Func.ViewY , flags = 16 , value = Direction[2]}}) end end end function Kill(Duration) timer = 0--98312 8486920 if Duration == nil then Duration = 10 gg.toast('Duration = nil') end for i=1,Duration do gg.setValues({{address = Func.Kill , flags = 4 , value = 8486920}}) end end function HitBox(HitBoxW,HitBoxH,Duration) timer = 0 if Duration == nil then Duration = 10 gg.toast('Duration = nil') end for i=1,Duration do for i = 1 , #Player do if Player[i].Distance > 0.5 and Player[i].Distance < 1000 then SetValue(Player[i].Address + 0x1C8+0x314 + 20 , 16 , HitBoxW) SetValue(Player[i].Address + 0x1C8+0x314 + 24 , 16 , HitBoxH) SetValue(SelfSite + 0x1C8+0x314 + 20 , 16 , 0.6) SetValue(SelfSite + 0x1C8+0x314 + 24 , 16 , 1.8) end end end end function ViewHeight(Value) if Value[1] == nil then else gg.setValues({{address = Func.ViewHeight - 4 , flags = 16 , value = Value[1]}}) end if Value[2] == nil then else gg.setValues({{address = Func.ViewHeight , flags = 16 , value = Value[2]}}) end if Value[3] == nil then else gg.setValues({{address = Func.ViewHeight + 4 , flags = 16 , value = Value[3]}}) end end function RefreshPlayersInfo(Depth,GetPlayers_DetectDistance) if GetPlayers_DetectDistance == nil then gg.toast('GetPlayers_DetectDistance = nil') GetPlayers_DetectDistance = 100 end GetPlayer(Depth , 0x1C8+0x314 , 0x42C , {0x641A20,0x980,0xC8} , SelfSite , GetPlayers_DetectDistance) ClosestId = GetClosestId(Self_Info.X , Self_Info.Y , Self_Info.Z) end function RefreshSelf(UpdateDataPlayers) local GetTable = gg.getValues(FunctionList) --设定值变量 Self_Info.X,Self_Info.Y,Self_Info.Z = GetTable[1].value,GetTable[2].value,GetTable[3].value SelfMotion.X,SelfMotion.Y,SelfMotion.Z = GetTable[4].value,GetTable[5].value,GetTable[6].value FlightState = GetTable[7].value MagnifyingGlass_Value = GetTable[8].value ViewX_Value,ViewY_Value = GetTable[9].value,GetTable[10].value ViewHeight_Value = GetTable[11].value FrontSightValue_X,FrontSightValue_Y,FrontSightValue_Z = GetTable[12].value,GetTable[13].value,GetTable[14].value if UpdateDataPlayers then RefreshPlayersInfo(120,256) end end gg.setRanges(4) Cb_So , Xa_So = {"libminecraftpe.so:bss", "Cb"} , {"libminecraftpe.so", "Xa"}--so立表 So_Start_Cb , So_Start_Xa = GetSo(Cb_So) , GetSo(Xa_So) So_Cb , So_Xa = So_Start_Cb , So_Start_Xa if not So_Cb and So_Xa then os.exit(gg.alert('无法获取到So')) end Self_Info,SelfMotion,Self,Player,InitialValue,Func = {},{},{},{},{},{}--设置空列表 Offsets_List = {--偏移表 Y = 0x594,--Y = 0x3A0, MotionY = 0x38,--MotionY = 0x38, FlyState = 0x314,--FlightState = 0x2AC ViewY = 0x1F3228, MagnifyingGlass = 0x1B0E108, ViewHeight = 0x79E54 } GameMemory = gg.PACKAGE local LongJump = {0x52CCF0,0x20,0x98,0x390}--立基址偏移表 跳远 Self.Y = S_Pointer(Cb_So,LongJump, true) - Offsets_List.Y--跳远偏移到Y SelfSite = ToPointer(So_Start_Cb,{0x641A20,0x10B0,0x38}) local Temp_Pointer = {0x641A20,0x10B0,0x38,0x168,0x0,0x14} Self_Kill = S_Pointer(Cb_So,Temp_Pointer, true) MagnifyingGlass = FH_Pointer('libminecraftpe.so',Offsets_List.MagnifyingGlass,16) FrontSight_Y = S_Pointer(Cb_So,{0x37DF50,0x98,0xCD4}, true) Func = { ViewY = Self.Y + Offsets_List.ViewY, MotionY = Self.Y + Offsets_List.MotionY, MagnifGlass = MagnifyingGlass, Kill = Self_Kill, FlightState = Self.Y - Offsets_List.FlyState, ViewHeight = Self.Y - Offsets_List.ViewHeight, FrontSightX = FrontSight_Y - 4, FrontSightY = FrontSight_Y, FrontSightZ = FrontSight_Y + 4 } FunctionList = {--立表单批量获取值 {address = Self.Y - 4 , flags = 16 , name = 'Self.X'},--y偏移-4 得到x {address = Self.Y , flags = 16 , name = 'Self.Y'},--y 得到y {address = Self.Y + 4 , flags = 16 , name = 'Self.Z'},--y偏移+4 得到z {address = Func.MotionY - 4 , flags = 16 , name = 'SelfMotion.X'},--y偏移得到MotionX {address = Func.MotionY , flags = 16 , name = 'SelfMotion.Y'},--y偏移得到MotionY {address = Func.MotionY + 4 , flags = 16 , name = 'SelfMotion.Z'},--y偏移得到MotionZ {address = Func.FlightState , flags = 1 , name = 'FlightState'},--y偏移得到Motion状态 {address = Func.MagnifGlass , flags = 16 , name = 'MagnifGlass'},--Xa视角 {address = Func.ViewY - 4 , flags = 16 , name = 'ViewX'},--y偏移得到ViewX {address = Func.ViewY , flags = 16 , name = 'ViewY'},--y偏移得到ViewY {address = Func.ViewHeight , flags = 16 , name = 'ViewHeight'},--y偏移得到ViewHeight {address = Func.FrontSightX , flags = 1 , name = 'FrontSight.X'},--FrontSight.X {address = Func.FrontSightY , flags = 1 , name = 'FrontSight.Y'},--FrontSight.Y {address = Func.FrontSightZ , flags = 1 , name = 'FrontSight.Z'}--FrontSight.Z } RefreshSelf(false)--RefreshSelf if Self.X == 0 and Self.Y == 0 and Self.Z == 0 then content = '读取游戏基址时出现错误\n脚本被迫退出 请检查基址是否正确或尝试重新进入游戏和重新执行脚本' os.exit(print(content),gg.alert(content,'好')) end print(--打印输出值 'String GameMemory:'..GameMemory.. '\nValue Self X:'..Self_Info.X..' Y:'..Self_Info.Y..' Z:'..Self_Info.Z.. '\nAddr Self.Y:'..Self.Y.. '\nValue Motion X:'..SelfMotion.X..' Y:'..SelfMotion.Y..' Z:'..SelfMotion.Z.. '\nAddr MotionY:'..Func.MotionY.. '\nValue FlightState:'..FlightState..' Addr:'..Func.FlightState.. '\nAddr SelfSite:'..SelfSite.. '\nAddr MagnifyingGlass:'..MagnifyingGlass..' Value:'..MagnifyingGlass_Value.. '\nValue ViewX ViewY:'..ViewX_Value..' '..ViewY_Value..' Y_Addr:'..Func.ViewY.. '\nAddr ViewHeight'..Func.ViewHeight..' Value:'..ViewHeight_Value.. '\nValue FrontSight X:'..FrontSightValue_X..' Y:'..FrontSightValue_Y..' Z:'..FrontSightValue_Z.. '\nAddr FrontSight X:'..Func.FrontSightX..' Y:'..Func.FrontSightY..' Z:'..Func.FrontSightZ ) gg.clearResults()--清除结果 gg.setVisible(false)--关闭框 gg.addListItems(FunctionList) gg.addListItems({{address = Func.Kill , flags = 4 , name = 'Self_Kill'}}) gg.addListItems({{address = SelfSite , flags = 4 , name = 'SelfSite'}}) gg.setValues({{address = Func.MagnifGlass , flags = 16 , value = -2.5}}) --Move(Self_Info.X , Self_Info.Y + 5 , Self_Info.Z) GravityChange({nil,0.5,nil},1) ViewChange({90,0},1) ViewHeight({nil,1,nil}) --Kill(1) --虚空回弹 --[[while true do if gg.isVisible(true) then break end RefreshSelf(false) if NoFallTime == nil then NoFallTime = 0 end if FlightState == 1 then Temp_Coordinates_X,Temp_Coordinates_Y,Temp_Coordinates_Z = Self_Info.X,Self_Info.Y,Self_Info.Z NoFallTime = 0 end if FlightState == 0 then NoFallTime = NoFallTime + 1 end if NoFallTime > 12 then Move(Temp_Coordinates_X,Temp_Coordinates_Y,Temp_Coordinates_Z) GravityChange({0,0.5,0},2) NoFallTime = 0 end gg.sleep(100) end--]] --传送至最近玩家 伪百(7block)米 --[[while true do if gg.isVisible(true) then break end RefreshSelf(false) RefreshPlayersInfo(120,200) if #Player > 0 then value = ClosestId InitialValue.X,InitialValue.Y,InitialValue.Z = Self_Info.X,Self_Info.Y,Self_Info.Z HitBox(10,10,1) Move(Player[value].X , Player[value].Y , Player[value].Z) GravityChange({nil,0.4,nil},1) Kill(3) gg.sleep(500) Move(InitialValue.X,InitialValue.Y,InitialValue.Z) HitBox(0.6,1.8,1) end print('找到'..#Player..'个玩家') gg.toast(#Player..'Player'..'\n'..InitialValue.X..'\n'..InitialValue.Y..'\n'..InitialValue.Z) gg.sleep(1000) end--]] --自动搭路 --[[while true do RefreshSelf(false) Temp_List = { {address = Func.FroSightX, flags = 1 , value = Self_Info.X , freeze = true}, {address = Func.FroSightY, flags = 1 , value = Self_Info.Y - 1 , freeze = true}, {address = Func.FroSightZ, flags = 1 , value = Self_Info.Z , freeze = true} } gg.setValues(Temp_List) end--]] --传送至最近玩家 --[[while true do if gg.isVisible(true) then break end RefreshSelf(false) RefreshPlayersInfo(120,100) if #Player > 0 then value = math.random(1,#Player) Move(Player[value].X , Player[value].Y + 1 , Player[value].Z) GravityChange({0,0.5,0},1) content = '找到'..#Player..'个玩家 随机到'..value gg.toast(content) print(content) end --gg.sleep(1000) end--]] --骑人/环绕 --[[ RefreshPlayersInfo(120,50) --Move(Player[1].X , Player[1].Y + 1 , Player[1].Z) while true do if gg.isVisible(true) then break end RefreshSelf(false) if #Player < 1 then gg.alert('附近找不到玩家') break os.exit(print('找不到玩家')) end value = ClosestId local TargetX,TargetY,TargetZ = Player[value].X,Player[value].Y,Player[value].Z gg.toast('TargetX:'..TargetX..'\nTargetY:'..TargetY..'\nTargetZ:'..TargetZ) --TargetX = TargetX + 2 Aura_Speed = 0.25 local Angle_XZ = math.atan(TargetX - Self_Info.X , TargetZ - Self_Info.Z) local Angle_YZ = math.atan(TargetY - Self_Info.Y , TargetZ - Self_Info.Z) GravityChange({math.sin(Angle_XZ), math.sin(Angle_YZ), math.cos(Angle_XZ)},1) end--]] --Players List --[[PlayerSite_List = {} RefreshPlayersInfo(120,1000000000) if #Player > 0 then for i=1,#Player do value = i PlayerSite_List[i] = '玩家:'..i..' 位置:\nX:'..Player[value].X..' Y:'..Player[value].Y..' Z:'..Player[value].Z..'\n--------------------' end else gg.alert('找不到任何玩家') os.exit(print('找不到任何玩家')) end choice = gg.choice(PlayerSite_List,nil,'玩家列表 选择后打开菜单\n共找到'..#Player..'个玩家') if not choice then gg.toast('选择弹窗被取消') end if choice then UI = { '[ - ]坐标传送至此玩家', '[ - ]动量追踪此玩家', '[ - ]准星瞄准追踪此玩家', '[ - ]复制此玩家坐标至剪切板' } choice2 = gg.choice(UI,nil,PlayerSite_List[choice]) if not choice2 then gg.toast('选择弹窗被取消') return end if choice2 == 1 then Move(Player[value].X,Player[value].Y,Player[value].Z) GravityChange({0,0.5,0},1) gg.toast('已传送') end if choice2 == 2 then prompt = gg.prompt({'\n输入人物追踪速度\n[3;15]','是否启用响应超时','响应超时判断时间 单位:S(秒) *10 转换率:1=10s[6;60]','追踪穿墙模式'}, {5,false,6,false},{'number','checkbox','number','checkbox'}) if not prompt then gg.toast('选择框被取消') end if prompt then temp_timer = 0 MoveSpeed = prompt[1] / 3 ResponseTimeout = prompt[2] if ResponseTimeout == true then ResponseTimeout_Timer = prompt[3] * 10 end if prompt[4] == true then Move(Self_Info.X , Self_Info.Y + 2 , Self_Info.Z) end value = choice while true do RefreshSelf(true) local TargetX,TargetY,TargetZ = Player[value].X,Player[value].Y,Player[value].Z local Angle_XZ = math.atan(TargetX - Self_Info.X , TargetZ - Self_Info.Z) local Angle_YZ = math.atan(TargetY - Self_Info.Y , TargetZ - Self_Info.Z) GravityChange({math.sin(Angle_XZ) * MoveSpeed , math.sin(Angle_YZ) * MoveSpeed , math.cos(Angle_XZ) * MoveSpeed},1) MoveDistanceX,MoveDistanceY,MoveDistanceZ = TargetX-Self_Info.X,TargetY-Self_Info.Y,TargetZ-Self_Info.Z MoveDistance = MoveDistanceX-MoveDistanceY-MoveDistanceZ DetectMoveSpeed = MoveSpeed + math.random(1,10) + MoveDistance..' Block/s' gg.toast('与目标坐标距离:'..MoveDistance..' Blocks\n追踪目标移动速度:'..DetectMoveSpeed) temp_timer = temp_timer + 1 if temp_timer == ResponseTimeout_Timer then gg.alert('响应超时'..ResponseTimeout_Timer..' 追踪被迫结束','好') break end if MoveDistance < 0.8 and MoveDistance > -0.8 then gg.alert('已到达目标坐标:\nX:'..TargetX..'\nY:'..TargetY..'\nZ:'..TargetZ..'\n追踪时平均速度:'..DetectMoveSpeed,'好') break end end else gg.toast('选择弹窗被取消') end end if choice2 == 3 then RefreshSelf(true) AimBot_OffsetX , AimBot_OffsetY , AimBot_OffsetZ , AimBot_Range = 0 , 1 , 0 , 6 function Rad(A) local A_ = 0.0 if A > math.pi/2 then A_ = A - math.pi end if A <- math.pi/2 then A_ = A + math.pi end if A_ == 0.0 then A_ = A end return A_ end while true do local TargetX , TargetY , TargetZ = Player[value].X + AimBot_OffsetX , Player[value].Y + AimBot_OffsetY , Player[value].Z + AimBot_OffsetZ local Distance = Player[value].Distance local Sp = Distance / AimBot_Range if Distance <= AimBot_Range then local Angle_XZ = math.atan(Self_Info.X - TargetX , Self_Info.Z - TargetZ + 0.000000001) local Angle_YZ = math.atan(Self_Info.Y - TargetY , Self_Info.Z - TargetZ + 0.000000001) Value_Write(Self_View , 16 , Angle_XZ) Value_Write(Self_View + 4 , 16 , -math.abs(Rad(Angle_YZ))) end end end if choice2 == 4 then content = 'X:'..Player[value].X..' Y:'..Player[value].Y..' Z:'..Player[value].Z gg.copyText(content) gg.toast('已复制内容\n'..content) end end--]] --[[ --完美激流 RefreshSelf(true) gg.setRanges(16384) gg.clearResults() gg.searchNumber("774429696;505546785:10", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1) if gg.getResultCount() == 0 then print('无法找到激流不减速地址\n可能是已经被更改过一次') else gg.getResults(5) gg.editAll('-721215457', gg.TYPE_DWORD) gg.alert('设置激流不减速') end gg.setRanges(4) gg.clearResults() while true do Kill(1) ViewHeight({nil,2.5,nil}) end ]]