Decompiled source of EnemySpawning v1.1.0
r.e.p.o.cheat.dll
Decompiled 11 hours ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using Photon.Pun; using Photon.Realtime; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("r.e.p.o cheat")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("r.e.p.o cheat")] [assembly: AssemblyCopyright("Copyright © 2025")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("07205e12-856a-40bf-a8ee-41329506be39")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] public class ItemSpawner : MonoBehaviourPunCallbacks { public static void SpawnItem(Vector3 position) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) if (!PhotonNetwork.IsConnected) { Debug.Log((object)"Offline mode: Spawning locally."); GameObject val = Object.Instantiate<GameObject>(AssetManager.instance.surplusValuableSmall, position, Quaternion.identity); if ((Object)(object)val != (Object)null) { EnsureItemVisibility(val); } return; } object[] array = new object[3] { position.x, position.y, position.z }; GameObject val2 = PhotonNetwork.Instantiate("Valuables/" + ((Object)AssetManager.instance.surplusValuableSmall).name, position, Quaternion.identity, (byte)0, array); if ((Object)(object)val2 != (Object)null) { Vector3 val3 = position; Debug.Log((object)("Item spawned at: " + ((object)(Vector3)(ref val3)).ToString())); ConfigureSyncComponents(val2); } else { Debug.LogError((object)"Item spawn failed!"); } } private static void ConfigureSyncComponents(GameObject item) { //IL_00e8: Unknown result type (might be due to invalid IL or missing references) PhotonView val = item.GetComponent<PhotonView>(); if ((Object)(object)val == (Object)null) { val = item.AddComponent<PhotonView>(); val.ViewID = PhotonNetwork.AllocateViewID(0); Debug.Log((object)("PhotonView adicionado ao item: " + val.ViewID)); } PhotonTransformView val2 = item.GetComponent<PhotonTransformView>(); if ((Object)(object)val2 == (Object)null) { val2 = item.AddComponent<PhotonTransformView>(); Debug.Log((object)"PhotonTransformView adicionado ao item"); } Rigidbody component = item.GetComponent<Rigidbody>(); if ((Object)(object)component != (Object)null && (Object)(object)item.GetComponent<PhotonRigidbodyView>() == (Object)null) { PhotonRigidbodyView obj = item.AddComponent<PhotonRigidbodyView>(); obj.m_SynchronizeVelocity = true; obj.m_SynchronizeAngularVelocity = true; Debug.Log((object)"PhotonRigidbodyView adicionado e configurado no item"); } if ((Object)(object)item.GetComponent<ItemSync>() == (Object)null) { item.AddComponent<ItemSync>(); } val.ObservedComponents = new List<Component> { (Component)(object)val2 }; if ((Object)(object)component != (Object)null) { PhotonRigidbodyView component2 = item.GetComponent<PhotonRigidbodyView>(); if ((Object)(object)component2 != (Object)null) { val.ObservedComponents.Add((Component)(object)component2); } } val.Synchronization = (ViewSynchronization)1; EnsureItemVisibility(item); } private static void EnsureItemVisibility(GameObject item) { item.SetActive(true); Renderer[] componentsInChildren = item.GetComponentsInChildren<Renderer>(true); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].enabled = true; } item.layer = LayerMask.NameToLayer("Default"); } } public class ItemSync : MonoBehaviour, IPunInstantiateMagicCallback, IPunObservable { private Rigidbody rb; private void Awake() { rb = ((Component)this).GetComponent<Rigidbody>(); } public void OnPhotonInstantiate(PhotonMessageInfo info) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) object[] instantiationData = info.photonView.InstantiationData; if (instantiationData != null && instantiationData.Length == 3) { Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor((float)instantiationData[0], (float)instantiationData[1], (float)instantiationData[2]); ((Component)this).transform.position = val; Vector3 val2 = val; Debug.Log((object)("Posição inicial definida para: " + ((object)(Vector3)(ref val2)).ToString())); } else { Debug.LogWarning((object)"Dados de instanciação ausentes ou inválidos!"); } if (!info.photonView.IsMine && (Object)(object)rb != (Object)null) { rb.isKinematic = true; Debug.Log((object)"Rigidbody definido como kinematic no cliente"); } } public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info) { //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) if (stream.IsWriting) { stream.SendNext((object)((Component)this).transform.position); stream.SendNext((object)((Component)this).transform.rotation); if ((Object)(object)rb != (Object)null) { stream.SendNext((object)rb.velocity); stream.SendNext((object)rb.angularVelocity); } } else { ((Component)this).transform.position = (Vector3)stream.ReceiveNext(); ((Component)this).transform.rotation = (Quaternion)stream.ReceiveNext(); if ((Object)(object)rb != (Object)null) { rb.velocity = (Vector3)stream.ReceiveNext(); rb.angularVelocity = (Vector3)stream.ReceiveNext(); } } } private void Update() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) if (!PhotonNetwork.IsMasterClient) { Vector3 position = ((Component)this).transform.position; Debug.Log((object)("Posição atual no cliente: " + ((object)(Vector3)(ref position)).ToString())); } } } public class GameHelper : MonoBehaviour { public static object FindObjectOfType(Type type) { return Object.FindObjectOfType(type, true); } } namespace r.e.p.o_cheat; internal class CrashLobby { } internal static class PlayerTumbleManager { private static Type playerTumbleType = Type.GetType("PlayerTumble, Assembly-CSharp"); private static object playerTumbleInstance; private static readonly byte[] disableBytes = new byte[1] { 195 }; private static readonly byte[] enableBytes = new byte[1] { 85 }; public static void Initialize() { if (playerTumbleType == null) { Hax2.Log1("PlayerTumble type not found."); return; } playerTumbleInstance = GameHelper.FindObjectOfType(playerTumbleType); if (playerTumbleInstance == null) { Hax2.Log1("PlayerTumble instance not found in the scene."); } else { Hax2.Log1("PlayerTumble instance updated successfully."); } } public static void DisableMethod(string methodName) { if (methodName == "Update" || methodName == "Setup") { Hax2.Log1("Skipping disable for critical method: " + methodName); } else { ModifyMethod(methodName, disableBytes); } } public static void EnableMethod(string methodName) { ModifyMethod(methodName, enableBytes); } private unsafe static void ModifyMethod(string methodName, byte[] patch) { if (playerTumbleType == null || playerTumbleInstance == null) { Initialize(); if (playerTumbleInstance == null) { Hax2.Log1("Cannot modify method " + methodName + " because PlayerTumble instance is null."); return; } } MethodInfo method = playerTumbleType.GetMethod(methodName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (method == null) { Hax2.Log1("Method " + methodName + " not found in PlayerTumble."); return; } byte* ptr = (byte*)method.MethodHandle.GetFunctionPointer().ToPointer(); for (int i = 0; i < patch.Length; i++) { ptr[i] = patch[i]; } Hax2.Log1("Modified method: " + methodName + " (Patched with " + BitConverter.ToString(patch) + ")"); } public static void DisableAll() { DisableMethod("ImpactHurtSet"); DisableMethod("ImpactHurtSetRPC"); DisableMethod("Update"); DisableMethod("TumbleSet"); DisableMethod("Setup"); } public static void EnableAll() { EnableMethod("ImpactHurtSet"); EnableMethod("ImpactHurtSetRPC"); EnableMethod("Update"); EnableMethod("TumbleSet"); EnableMethod("Setup"); } } public static class ItemTeleport { public class GameItem { public string Name { get; set; } public int Value { get; set; } public object ItemObject { get; set; } public GameItem(string name, int value, object itemObject = null) { Name = name; Value = value; ItemObject = itemObject; } } private static PhotonView punManagerPhotonView; public static void SetItemValue(GameItem selectedItem, int newValue) { if (selectedItem == null || selectedItem.ItemObject == null) { Hax2.Log1("Error: Selected item or ItemObject is null!"); return; } try { FieldInfo field = selectedItem.ItemObject.GetType().GetField("dollarValueCurrent", BindingFlags.Instance | BindingFlags.Public); if (field == null) { Hax2.Log1("Error: Could not find 'dollarValueCurrent' field in " + selectedItem.Name); return; } field.SetValue(selectedItem.ItemObject, newValue); selectedItem.Value = newValue; Hax2.Log1($"Successfully set '{selectedItem.Name}' value to ${newValue}"); } catch (Exception ex) { Hax2.Log1("Error setting value for '" + selectedItem.Name + "': " + ex.Message); } } private static void InitializePunManager() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown if (!((Object)(object)punManagerPhotonView == (Object)null)) { return; } Type type = Type.GetType("PunManager, Assembly-CSharp"); object obj = GameHelper.FindObjectOfType(type); if (obj != null) { punManagerPhotonView = (PhotonView)(type.GetField("photonView", BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue(obj)); if ((Object)(object)punManagerPhotonView == (Object)null) { Hax2.Log1("PhotonView not found in PunManager."); } } else { Hax2.Log1("PunManager instance not found."); } } public static List<GameItem> GetItemList() { List<GameItem> list = new List<GameItem>(); foreach (object valuableObject in DebugCheats.valuableObjects) { if (valuableObject == null) { continue; } object? obj = valuableObject.GetType().GetProperty("transform", BindingFlags.Instance | BindingFlags.Public)?.GetValue(valuableObject); Transform val = (Transform)((obj is Transform) ? obj : null); if ((Object)(object)val == (Object)null || !((Component)val).gameObject.activeInHierarchy) { continue; } string text; try { text = valuableObject.GetType().GetProperty("name", BindingFlags.Instance | BindingFlags.Public)?.GetValue(valuableObject) as string; if (string.IsNullOrEmpty(text)) { object obj2 = ((valuableObject is Object) ? valuableObject : null); text = ((obj2 != null) ? ((Object)obj2).name : null) ?? "Unknown"; } } catch (Exception ex) { object obj3 = ((valuableObject is Object) ? valuableObject : null); text = ((obj3 != null) ? ((Object)obj3).name : null) ?? "Unknown"; Hax2.Log1("Erro ao acessar 'name' do item: " + ex.Message + ". Usando nome do GameObject: " + text); } if (text.StartsWith("Valuable", StringComparison.OrdinalIgnoreCase)) { text = text.Substring("Valuable".Length).Trim(); } if (text.EndsWith("(Clone)", StringComparison.OrdinalIgnoreCase)) { text = text.Substring(0, text.Length - "(Clone)".Length).Trim(); } FieldInfo field = valuableObject.GetType().GetField("dollarValueCurrent", BindingFlags.Instance | BindingFlags.Public); int value = ((field != null) ? Convert.ToInt32(field.GetValue(valuableObject)) : 0); list.Add(new GameItem(text, value, valuableObject)); } if (list.Count == 0) { list.Add(new GameItem("No items found", 0)); } return list; } public static void TeleportItemToMe(GameItem selectedItem) { if (selectedItem == null || selectedItem.ItemObject == null) { Hax2.Log1("Item selecionado ou ItemObject é nulo!"); } else { PerformTeleport(selectedItem); } } public static void TeleportAllItemsToMe() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) try { GameObject localPlayer = DebugCheats.GetLocalPlayer(); if ((Object)(object)localPlayer == (Object)null) { Hax2.Log1("Jogador local não encontrado!"); return; } Vector3 val = localPlayer.transform.position + localPlayer.transform.forward * 1f + Vector3.up * 1.5f; Hax2.Log1($"Target position for teleporting all items: {val}"); List<GameItem> itemList = GetItemList(); int num = 0; foreach (GameItem item in itemList) { if (item.ItemObject != null) { PerformTeleport(item); num++; } } Hax2.Log1($"Teleporte de todos os itens concluído. Total de itens teleportados: {num}"); } catch (Exception ex) { Hax2.Log1("Erro ao teleportar todos os itens: " + ex.Message); } } public static void TeleportSelectedItemToMe(GameItem selectedItem) { if (selectedItem == null || selectedItem.ItemObject == null) { Hax2.Log1("Item selecionado ou ItemObject é nulo!"); } else { PerformTeleport(selectedItem); } } private static void PerformTeleport(GameItem item) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) try { GameObject localPlayer = DebugCheats.GetLocalPlayer(); if ((Object)(object)localPlayer == (Object)null) { Hax2.Log1("Jogador local não encontrado!"); return; } Vector3 val = localPlayer.transform.position + localPlayer.transform.forward * 1f + Vector3.up * 1.5f; Hax2.Log1($"Target position for teleport of '{item.Name}': {val}"); Transform val2 = null; PropertyInfo property = item.ItemObject.GetType().GetProperty("transform", BindingFlags.Instance | BindingFlags.Public); if (property != null) { object? value = property.GetValue(item.ItemObject); val2 = (Transform)((value is Transform) ? value : null); } else { object itemObject = item.ItemObject; MonoBehaviour val3 = (MonoBehaviour)((itemObject is MonoBehaviour) ? itemObject : null); if ((Object)(object)val3 != (Object)null) { val2 = ((Component)val3).transform; } } if ((Object)(object)val2 == (Object)null) { Hax2.Log1("Não foi possível obter o Transform do item '" + item.Name + "'!"); return; } PhotonView component = ((Component)val2).GetComponent<PhotonView>(); if ((Object)(object)component == (Object)null) { Hax2.Log1("Item '" + item.Name + "' não tem PhotonView, teleporte apenas local."); val2.position = val; return; } if (PhotonNetwork.IsConnected && !component.IsMine) { component.RequestOwnership(); Hax2.Log1($"Solicitada posse do item '{item.Name}' (ViewID: {component.ViewID})"); } PhotonTransformView component2 = ((Component)val2).GetComponent<PhotonTransformView>(); bool flag = false; if ((Object)(object)component2 != (Object)null && ((Behaviour)component2).enabled) { flag = true; ((Behaviour)component2).enabled = false; Hax2.Log1("PhotonTransformView desativado temporariamente no item '" + item.Name + "'"); } Rigidbody component3 = ((Component)val2).GetComponent<Rigidbody>(); bool flag2 = false; if ((Object)(object)component3 != (Object)null) { flag2 = !component3.isKinematic; component3.isKinematic = true; Hax2.Log1("Rigidbody do item '" + item.Name + "' desativado temporariamente"); } val2.position = val; Hax2.Log1($"Item '{item.Name}' teleportado localmente para {val}"); Vector3 position = val2.position; Hax2.Log1($"Posição atual do item '{item.Name}' após teleporte: {position}"); if (PhotonNetwork.IsConnected && (Object)(object)component != (Object)null) { component.RPC("TeleportItemRPC", (RpcTarget)3, new object[1] { val }); Hax2.Log1("Enviado RPC 'TeleportItemRPC' para todos para item '" + item.Name + "'"); } if (flag || flag2) { ((Component)val2).gameObject.AddComponent<DelayedPhysicsReset>().Setup(component3, component2); } GameObject gameObject = ((Component)val2).gameObject; if ((Object)(object)gameObject != (Object)null) { gameObject.SetActive(false); gameObject.SetActive(true); Hax2.Log1("Item '" + item.Name + "' reativado para forçar renderização."); } Hax2.Log1("Teleporte do item '" + item.Name + "' concluído."); } catch (Exception ex) { Hax2.Log1("Erro ao teleportar item '" + item.Name + "': " + ex.Message); } } } public class ItemTeleportComponent : MonoBehaviour, IPunOwnershipCallbacks { private PhotonView photonView; private void Awake() { photonView = ((Component)this).GetComponent<PhotonView>(); if ((Object)(object)photonView == (Object)null) { Hax2.Log1("PhotonView não encontrado no item '" + ((Object)((Component)this).gameObject).name + "', adicionando um novo."); photonView = ((Component)this).gameObject.AddComponent<PhotonView>(); } PhotonNetwork.AddCallbackTarget((object)this); } private void OnDestroy() { PhotonNetwork.RemoveCallbackTarget((object)this); } [PunRPC] private void TeleportItemRPC(Vector3 targetPosition) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) ((Component)this).transform.position = targetPosition; Hax2.Log1($"Item '{((Object)((Component)this).gameObject).name}' sincronizado para {targetPosition} via RPC"); } public void OnOwnershipRequest(PhotonView targetView, Player requestingPlayer) { if ((Object)(object)targetView == (Object)(object)photonView) { Hax2.Log1($"Ownership requested for '{((Object)((Component)this).gameObject).name}' by player {requestingPlayer.ActorNumber}"); } } public void OnOwnershipTransfered(PhotonView targetView, Player previousOwner) { if ((Object)(object)targetView == (Object)(object)photonView) { Hax2.Log1($"Ownership of '{((Object)((Component)this).gameObject).name}' transferred from {((previousOwner != null) ? new int?(previousOwner.ActorNumber) : null)} to {targetView.OwnerActorNr}"); } } public void OnOwnershipTransferFailed(PhotonView targetView, Player senderOfFailedRequest) { if ((Object)(object)targetView == (Object)(object)photonView) { Hax2.Log1($"Ownership transfer failed for '{((Object)((Component)this).gameObject).name}' by player {senderOfFailedRequest.ActorNumber}"); } } } public class DelayedPhysicsReset : MonoBehaviour { private Rigidbody rb; private PhotonTransformView transformView; private float delay = 1f; public void Setup(Rigidbody rigidbody, PhotonTransformView tView = null) { rb = rigidbody; transformView = tView; ((MonoBehaviour)this).Invoke("ResetPhysics", delay); } private void ResetPhysics() { if ((Object)(object)rb != (Object)null) { rb.isKinematic = false; Hax2.Log1("Physics reativada para '" + ((Object)((Component)this).gameObject).name + "' após teleporte"); } if ((Object)(object)transformView != (Object)null) { ((Behaviour)transformView).enabled = true; Hax2.Log1("PhotonTransformView reativado para '" + ((Object)((Component)this).gameObject).name + "' após teleporte"); } Object.Destroy((Object)(object)this); } } public class PlayerCheatSync : MonoBehaviourPunCallbacks { [PunRPC] public void SpawnItemRPC(Vector3 spawnPosition) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) if (PhotonNetwork.IsMasterClient) { Vector3 val = spawnPosition; Hax2.Log1("Master Client received RPC and spawned item at: " + ((object)(Vector3)(ref val)).ToString()); } } } internal static class DebugCheats { public class PlayerData { public object PlayerObject { get; } public PhotonView PhotonView { get; } public Transform Transform { get; } public bool IsAlive { get; set; } public string Name { get; set; } public PlayerData(object player) { PlayerObject = player; ref PhotonView reference = ref PhotonView; object? obj = player.GetType().GetField("photonView", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)?.GetValue(player); reference = (PhotonView)((obj is PhotonView) ? obj : null); ref Transform reference2 = ref Transform; object? obj2 = player.GetType().GetProperty("transform", BindingFlags.Instance | BindingFlags.Public)?.GetValue(player); reference2 = (Transform)((obj2 is Transform) ? obj2 : null); Name = (((Object)((player is PlayerAvatar) ? player : null) != (Object)null) ? (SemiFunc.PlayerGetName((PlayerAvatar)((player is PlayerAvatar) ? player : null)) ?? "Unknown Player") : "Unknown Player"); IsAlive = true; } } public class ExtractionPointData { public ExtractionPoint ExtractionPoint { get; } public string CachedState { get; } public Vector3 CachedPosition { get; } public ExtractionPointData(ExtractionPoint ep, string state, Vector3 position) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) ExtractionPoint = ep; CachedState = state; CachedPosition = position; } } private static int frameCounter; public static List<Enemy> enemyList; public static List<object> valuableObjects; private static List<object> playerList; private static Camera cachedCamera; private static float scaleX; private static float scaleY; public static Texture2D texture2; private static float lastUpdateTime; private static float lastExtractionUpdateTime; private const float updateInterval = 1f; private const float extractionUpdateInterval = 5f; private static GameObject localPlayer; private static List<ExtractionPointData> extractionPointList; public static bool drawEspBool; public static bool drawItemEspBool; public static bool drawPlayerEspBool; public static bool draw3DItemEspBool; public static bool draw3DPlayerEspBool; public static bool drawExtractionPointEspBool; public static bool showEnemyNames; public static bool showEnemyDistance; public static bool showItemNames; public static bool showItemValue; public static bool showItemDistance; public static bool showExtractionNames; public static bool showExtractionDistance; public static bool showPlayerNames; public static bool showPlayerDistance; public static bool showPlayerHP; private static List<PlayerData> playerDataList; private static float lastPlayerUpdateTime; private static float playerUpdateInterval; private static Dictionary<int, int> playerHealthCache; private const float maxEspDistance = 100f; static DebugCheats() { frameCounter = 0; enemyList = new List<Enemy>(); valuableObjects = new List<object>(); playerList = new List<object>(); lastUpdateTime = 0f; lastExtractionUpdateTime = 0f; extractionPointList = new List<ExtractionPointData>(); drawEspBool = false; drawItemEspBool = false; drawPlayerEspBool = false; draw3DItemEspBool = false; draw3DPlayerEspBool = false; drawExtractionPointEspBool = false; showEnemyNames = true; showEnemyDistance = true; showItemNames = true; showItemValue = true; showItemDistance = false; showExtractionNames = true; showExtractionDistance = true; showPlayerNames = true; showPlayerDistance = true; showPlayerHP = true; playerDataList = new List<PlayerData>(); lastPlayerUpdateTime = 0f; playerUpdateInterval = 1f; playerHealthCache = new Dictionary<int, int>(); cachedCamera = Camera.main; if ((Object)(object)cachedCamera != (Object)null) { scaleX = (float)Screen.width / (float)cachedCamera.pixelWidth; scaleY = (float)Screen.height / (float)cachedCamera.pixelHeight; } UpdateLists(); UpdateLocalPlayer(); UpdateExtractionPointList(); UpdatePlayerDataList(); } private static void UpdatePlayerDataList() { playerDataList.Clear(); playerHealthCache.Clear(); List<PlayerAvatar> list = SemiFunc.PlayerGetList(); if (list != null) { foreach (PlayerAvatar item in list) { if ((Object)(object)item != (Object)null) { PlayerData playerData = new PlayerData(item); if ((Object)(object)playerData.PhotonView != (Object)null && (Object)(object)playerData.Transform != (Object)null) { playerDataList.Add(playerData); int playerHealth = GetPlayerHealth(item); playerHealthCache[playerData.PhotonView.ViewID] = playerHealth; } } } } lastPlayerUpdateTime = Time.time; Hax2.Log1($"Lista de dados de jogadores atualizada: {playerDataList.Count} jogadores."); } private static void UpdateExtractionPointList() { //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) extractionPointList.Clear(); Object[] array = Object.FindObjectsOfType(Type.GetType("ExtractionPoint, Assembly-CSharp")); if (array == null) { return; } Object[] array2 = array; foreach (Object obj in array2) { ExtractionPoint val = (ExtractionPoint)(object)((obj is ExtractionPoint) ? obj : null); if ((Object)(object)val != (Object)null && ((Component)val).gameObject.activeInHierarchy) { FieldInfo field = ((object)val).GetType().GetField("currentState", BindingFlags.Instance | BindingFlags.NonPublic); string state = "Unknown"; if (field != null) { state = field.GetValue(val)?.ToString() ?? "Unknown"; } Vector3 position = ((Component)val).transform.position; extractionPointList.Add(new ExtractionPointData(val, state, position)); Hax2.Log1($"Extraction Point cacheado na posição: {position}"); } } Hax2.Log1($"Lista de Extraction Points atualizada: {extractionPointList.Count} pontos encontrados."); } private static void UpdateLists() { UpdateExtractionPointList(); enemyList.Clear(); Type type = Type.GetType("EnemyDirector, Assembly-CSharp"); if (type != null) { object obj = type.GetField("instance", BindingFlags.Static | BindingFlags.Public)?.GetValue(null); if (obj != null) { FieldInfo field = type.GetField("enemiesSpawned", BindingFlags.Instance | BindingFlags.Public); if (field != null && field.GetValue(obj) is IEnumerable<object> enumerable) { foreach (object item in enumerable) { if (item == null) { continue; } FieldInfo fieldInfo = item.GetType().GetField("enemyInstance", BindingFlags.Instance | BindingFlags.NonPublic) ?? item.GetType().GetField("Enemy", BindingFlags.Instance | BindingFlags.NonPublic) ?? item.GetType().GetField("childEnemy", BindingFlags.Instance | BindingFlags.NonPublic); if (fieldInfo != null) { object? value = fieldInfo.GetValue(item); Enemy val = (Enemy)((value is Enemy) ? value : null); if ((Object)(object)val != (Object)null && (Object)(object)((Component)val).gameObject != (Object)null && ((Component)val).gameObject.activeInHierarchy) { enemyList.Add(val); } } } } } } playerList.Clear(); List<PlayerAvatar> list = SemiFunc.PlayerGetList(); if (list != null) { foreach (PlayerAvatar item2 in list) { if ((Object)(object)item2 != (Object)null) { playerList.Add(item2); } } } lastUpdateTime = Time.time; Hax2.Log1($"Listas atualizadas: {enemyList.Count} inimigos, {valuableObjects.Count} itens, {playerList.Count} jogadores."); } private static void UpdateLocalPlayer() { localPlayer = GetLocalPlayer(); if ((Object)(object)localPlayer != (Object)null) { Hax2.Log1("Jogador local atualizado com sucesso: " + ((Object)localPlayer).name); } else { Hax2.Log1("Falha ao atualizar jogador local!"); } } public static GameObject GetLocalPlayer() { if (PhotonNetwork.IsConnected) { List<PlayerAvatar> list = SemiFunc.PlayerGetList(); if (list != null) { foreach (PlayerAvatar item in list) { FieldInfo field = ((object)item).GetType().GetField("photonView", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (!(field != null)) { continue; } object? value = field.GetValue(item); PhotonView val = (PhotonView)((value is PhotonView) ? value : null); if ((Object)(object)val != (Object)null && val.IsMine) { PropertyInfo property = ((object)item).GetType().GetProperty("gameObject", BindingFlags.Instance | BindingFlags.Public); if (property != null) { object? value2 = property.GetValue(item); GameObject val2 = (GameObject)((value2 is GameObject) ? value2 : null); Hax2.Log1("Local player encontrado via Photon: " + ((Object)val2).name); return val2; } Hax2.Log1("Local player encontrado via PhotonView: " + ((Object)((Component)val).gameObject).name); return ((Component)val).gameObject; } } } if (PhotonNetwork.LocalPlayer != null) { PhotonView[] array = Object.FindObjectsOfType<PhotonView>(); foreach (PhotonView val3 in array) { if (val3.Owner == PhotonNetwork.LocalPlayer && val3.IsMine) { Hax2.Log1("Local player encontrado via Photon fallback: " + ((Object)((Component)val3).gameObject).name); return ((Component)val3).gameObject; } } } Hax2.Log1("Nenhum jogador local encontrado!"); return null; } List<PlayerAvatar> list2 = SemiFunc.PlayerGetList(); if (list2 != null && list2.Count > 0) { PlayerAvatar val4 = list2[0]; PropertyInfo property2 = ((object)val4).GetType().GetProperty("gameObject", BindingFlags.Instance | BindingFlags.Public); if (property2 != null) { object? value3 = property2.GetValue(val4); GameObject val5 = (GameObject)((value3 is GameObject) ? value3 : null); Hax2.Log1("Local player encontrado em singleplayer via PlayerGetList: " + ((Object)val5).name); return val5; } } Type type = Type.GetType("PlayerAvatar, Assembly-CSharp"); if (type != null) { Object obj = Object.FindObjectOfType(type); MonoBehaviour val6 = (MonoBehaviour)(object)((obj is MonoBehaviour) ? obj : null); if ((Object)(object)val6 != (Object)null) { Hax2.Log1("Local player encontrado em singleplayer via PlayerAvatar: " + ((Object)((Component)val6).gameObject).name); return ((Component)val6).gameObject; } } GameObject val7 = GameObject.FindWithTag("Player"); if ((Object)(object)val7 != (Object)null) { Hax2.Log1("Local player encontrado em singleplayer via tag 'Player': " + ((Object)val7).name); return val7; } GameObject[] array2 = Object.FindObjectsOfType<GameObject>(); foreach (GameObject val8 in array2) { if (((Object)val8).name.Contains("Player") && val8.activeInHierarchy) { Hax2.Log1("Local player encontrado em singleplayer via nome genérico: " + ((Object)val8).name); return val8; } } Hax2.Log1("Nenhum jogador local encontrado no singleplayer após todas as tentativas!"); return null; } public static void UpdateEnemyList() { enemyList.Clear(); Type type = Type.GetType("EnemyDirector, Assembly-CSharp"); if (type != null) { object obj = type.GetField("instance", BindingFlags.Static | BindingFlags.Public)?.GetValue(null); if (obj != null) { FieldInfo field = type.GetField("enemiesSpawned", BindingFlags.Instance | BindingFlags.Public); if (field != null) { if (field.GetValue(obj) is IEnumerable<object> enumerable) { { foreach (object item in enumerable) { if (item == null) { continue; } FieldInfo fieldInfo = item.GetType().GetField("enemyInstance", BindingFlags.Instance | BindingFlags.NonPublic) ?? item.GetType().GetField("Enemy", BindingFlags.Instance | BindingFlags.NonPublic) ?? item.GetType().GetField("childEnemy", BindingFlags.Instance | BindingFlags.NonPublic); if (fieldInfo != null) { object? value = fieldInfo.GetValue(item); Enemy val = (Enemy)((value is Enemy) ? value : null); if ((Object)(object)val != (Object)null && (Object)(object)((Component)val).gameObject != (Object)null && ((Component)val).gameObject.activeInHierarchy) { enemyList.Add(val); } } } return; } } Hax2.Log1("Nenhum inimigo encontrado em enemiesSpawned"); } else { Hax2.Log1("Campo 'enemiesSpawned' não encontrado"); } } else { Hax2.Log1("Instância de EnemyDirector é nula"); } } else { Hax2.Log1("EnemyDirector não encontrado"); } } public static void RectFilled(float x, float y, float width, float height, Texture2D text) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) GUI.DrawTexture(new Rect(x, y, width, height), (Texture)(object)text); } public static void RectOutlined(float x, float y, float width, float height, Texture2D text, float thickness = 1f) { RectFilled(x, y, thickness, height, text); RectFilled(x + width - thickness, y, thickness, height, text); RectFilled(x + thickness, y, width - thickness * 2f, thickness, text); RectFilled(x + thickness, y + height - thickness, width - thickness * 2f, thickness, text); } public static void Box(float x, float y, float width, float height, Texture2D text, float thickness = 2f) { RectOutlined(x - width / 2f, y - height, width, height, text, thickness); } private static void CreateBoundsEdges(Bounds bounds, Color color) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) Vector3[] array = (Vector3[])(object)new Vector3[8]; Vector3 min = ((Bounds)(ref bounds)).min; Vector3 max = ((Bounds)(ref bounds)).max; array[0] = new Vector3(min.x, min.y, min.z); array[1] = new Vector3(max.x, min.y, min.z); array[2] = new Vector3(max.x, min.y, max.z); array[3] = new Vector3(min.x, min.y, max.z); array[4] = new Vector3(min.x, max.y, min.z); array[5] = new Vector3(max.x, max.y, min.z); array[6] = new Vector3(max.x, max.y, max.z); array[7] = new Vector3(min.x, max.y, max.z); Vector2[] array2 = (Vector2[])(object)new Vector2[8]; bool flag = false; for (int i = 0; i < 8; i++) { Vector3 val = cachedCamera.WorldToScreenPoint(array[i]); if (val.z > 0f) { flag = true; } array2[i] = new Vector2(val.x * scaleX, (float)Screen.height - val.y * scaleY); } if (flag) { DrawLine(array2[0], array2[1], color); DrawLine(array2[1], array2[2], color); DrawLine(array2[2], array2[3], color); DrawLine(array2[3], array2[0], color); DrawLine(array2[4], array2[5], color); DrawLine(array2[5], array2[6], color); DrawLine(array2[6], array2[7], color); DrawLine(array2[7], array2[4], color); DrawLine(array2[0], array2[4], color); DrawLine(array2[1], array2[5], color); DrawLine(array2[2], array2[6], color); DrawLine(array2[3], array2[7], color); } } private static void DrawLine(Vector2 start, Vector2 end, Color color) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)texture2 == (Object)null)) { float num = Vector2.Distance(start, end); float num2 = Mathf.Atan2(end.y - start.y, end.x - start.x) * 57.29578f; GUI.color = color; Matrix4x4 matrix = GUI.matrix; GUIUtility.RotateAroundPivot(num2, start); GUI.DrawTexture(new Rect(start.x, start.y, num, 1f), (Texture)(object)texture2); GUI.matrix = matrix; GUI.color = Color.white; } } private static Bounds GetActiveColliderBounds(GameObject obj) { //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) Collider[] componentsInChildren = obj.GetComponentsInChildren<Collider>(true); List<Collider> list = new List<Collider>(); Collider[] array = componentsInChildren; foreach (Collider val in array) { if (val.enabled && ((Component)val).gameObject.activeInHierarchy) { list.Add(val); } } if (list.Count == 0) { Renderer[] componentsInChildren2 = obj.GetComponentsInChildren<Renderer>(true); if (componentsInChildren2.Length != 0) { Bounds bounds = componentsInChildren2[0].bounds; for (int j = 1; j < componentsInChildren2.Length; j++) { if (componentsInChildren2[j].enabled && ((Component)componentsInChildren2[j]).gameObject.activeInHierarchy) { ((Bounds)(ref bounds)).Encapsulate(componentsInChildren2[j].bounds); } } return bounds; } return new Bounds(obj.transform.position, Vector3.one * 0.5f); } Bounds bounds2 = list[0].bounds; for (int k = 1; k < list.Count; k++) { ((Bounds)(ref bounds2)).Encapsulate(list[k].bounds); } ((Bounds)(ref bounds2)).Expand(0.1f); return bounds2; } public static void DrawESP() { //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Expected O, but got Unknown //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_03e8: Unknown result type (might be due to invalid IL or missing references) //IL_03f2: Unknown result type (might be due to invalid IL or missing references) //IL_03f9: Unknown result type (might be due to invalid IL or missing references) //IL_0401: Unknown result type (might be due to invalid IL or missing references) //IL_0408: Unknown result type (might be due to invalid IL or missing references) //IL_040f: Unknown result type (might be due to invalid IL or missing references) //IL_0414: Unknown result type (might be due to invalid IL or missing references) //IL_041e: Expected O, but got Unknown //IL_0420: Expected O, but got Unknown //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_0435: Unknown result type (might be due to invalid IL or missing references) //IL_043f: Unknown result type (might be due to invalid IL or missing references) //IL_0446: Unknown result type (might be due to invalid IL or missing references) //IL_044e: Unknown result type (might be due to invalid IL or missing references) //IL_0457: Expected O, but got Unknown //IL_07d6: Unknown result type (might be due to invalid IL or missing references) //IL_07db: Unknown result type (might be due to invalid IL or missing references) //IL_07e2: Unknown result type (might be due to invalid IL or missing references) //IL_07ea: Unknown result type (might be due to invalid IL or missing references) //IL_07f1: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_07fd: Unknown result type (might be due to invalid IL or missing references) //IL_0807: Expected O, but got Unknown //IL_0809: Expected O, but got Unknown //IL_0813: Unknown result type (might be due to invalid IL or missing references) //IL_0818: Unknown result type (might be due to invalid IL or missing references) //IL_081e: Unknown result type (might be due to invalid IL or missing references) //IL_0828: Unknown result type (might be due to invalid IL or missing references) //IL_082f: Unknown result type (might be due to invalid IL or missing references) //IL_0837: Unknown result type (might be due to invalid IL or missing references) //IL_0a74: Unknown result type (might be due to invalid IL or missing references) //IL_0a79: Unknown result type (might be due to invalid IL or missing references) //IL_0a7f: Unknown result type (might be due to invalid IL or missing references) //IL_0a89: Unknown result type (might be due to invalid IL or missing references) //IL_0a90: Unknown result type (might be due to invalid IL or missing references) //IL_0a98: Unknown result type (might be due to invalid IL or missing references) //IL_0a9f: Unknown result type (might be due to invalid IL or missing references) //IL_0aa6: Unknown result type (might be due to invalid IL or missing references) //IL_0aab: Unknown result type (might be due to invalid IL or missing references) //IL_0ab5: Expected O, but got Unknown //IL_0ab7: Expected O, but got Unknown //IL_0ac1: Unknown result type (might be due to invalid IL or missing references) //IL_0ac6: Unknown result type (might be due to invalid IL or missing references) //IL_0acc: Unknown result type (might be due to invalid IL or missing references) //IL_0ad6: Unknown result type (might be due to invalid IL or missing references) //IL_0add: Unknown result type (might be due to invalid IL or missing references) //IL_0ae5: Unknown result type (might be due to invalid IL or missing references) //IL_0aee: Expected O, but got Unknown //IL_0af8: Unknown result type (might be due to invalid IL or missing references) //IL_0afd: Unknown result type (might be due to invalid IL or missing references) //IL_0b03: Unknown result type (might be due to invalid IL or missing references) //IL_0b0d: Unknown result type (might be due to invalid IL or missing references) //IL_0b14: Unknown result type (might be due to invalid IL or missing references) //IL_0b1c: Unknown result type (might be due to invalid IL or missing references) //IL_068f: Unknown result type (might be due to invalid IL or missing references) //IL_0694: Unknown result type (might be due to invalid IL or missing references) //IL_06ee: Unknown result type (might be due to invalid IL or missing references) //IL_06fa: Expected O, but got Unknown //IL_0700: Unknown result type (might be due to invalid IL or missing references) //IL_070c: Expected O, but got Unknown //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_0746: Unknown result type (might be due to invalid IL or missing references) //IL_0888: Unknown result type (might be due to invalid IL or missing references) //IL_088d: Unknown result type (might be due to invalid IL or missing references) //IL_0892: Unknown result type (might be due to invalid IL or missing references) //IL_0894: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_076c: Unknown result type (might be due to invalid IL or missing references) //IL_08a5: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0797: Unknown result type (might be due to invalid IL or missing references) //IL_079c: Unknown result type (might be due to invalid IL or missing references) //IL_08b6: Unknown result type (might be due to invalid IL or missing references) //IL_04c0: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04cc: Unknown result type (might be due to invalid IL or missing references) //IL_04ce: Unknown result type (might be due to invalid IL or missing references) //IL_04d3: Unknown result type (might be due to invalid IL or missing references) //IL_04d5: Unknown result type (might be due to invalid IL or missing references) //IL_08c8: Unknown result type (might be due to invalid IL or missing references) //IL_04e6: Unknown result type (might be due to invalid IL or missing references) //IL_0bbd: Unknown result type (might be due to invalid IL or missing references) //IL_0bc2: Unknown result type (might be due to invalid IL or missing references) //IL_08d9: Unknown result type (might be due to invalid IL or missing references) //IL_04f7: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_0be2: Unknown result type (might be due to invalid IL or missing references) //IL_0be7: Unknown result type (might be due to invalid IL or missing references) //IL_08eb: Unknown result type (might be due to invalid IL or missing references) //IL_0900: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Expected O, but got Unknown //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_051a: Unknown result type (might be due to invalid IL or missing references) //IL_0bfc: Unknown result type (might be due to invalid IL or missing references) //IL_0bfe: Unknown result type (might be due to invalid IL or missing references) //IL_0c07: Unknown result type (might be due to invalid IL or missing references) //IL_0c09: Unknown result type (might be due to invalid IL or missing references) //IL_0c10: Unknown result type (might be due to invalid IL or missing references) //IL_0c15: Unknown result type (might be due to invalid IL or missing references) //IL_0c1a: Unknown result type (might be due to invalid IL or missing references) //IL_0c21: Unknown result type (might be due to invalid IL or missing references) //IL_0c23: Unknown result type (might be due to invalid IL or missing references) //IL_0c28: Unknown result type (might be due to invalid IL or missing references) //IL_0c2f: Unknown result type (might be due to invalid IL or missing references) //IL_0c31: Unknown result type (might be due to invalid IL or missing references) //IL_0c36: Unknown result type (might be due to invalid IL or missing references) //IL_0c38: Unknown result type (might be due to invalid IL or missing references) //IL_0957: Unknown result type (might be due to invalid IL or missing references) //IL_095e: Unknown result type (might be due to invalid IL or missing references) //IL_052c: Unknown result type (might be due to invalid IL or missing references) //IL_0541: Unknown result type (might be due to invalid IL or missing references) //IL_0c46: Unknown result type (might be due to invalid IL or missing references) //IL_09af: Unknown result type (might be due to invalid IL or missing references) //IL_09a8: Unknown result type (might be due to invalid IL or missing references) //IL_09a1: Unknown result type (might be due to invalid IL or missing references) //IL_0c5c: Unknown result type (might be due to invalid IL or missing references) //IL_0c71: Unknown result type (might be due to invalid IL or missing references) //IL_0c85: Unknown result type (might be due to invalid IL or missing references) //IL_0ca7: Unknown result type (might be due to invalid IL or missing references) //IL_0d0b: Unknown result type (might be due to invalid IL or missing references) //IL_0d10: Unknown result type (might be due to invalid IL or missing references) //IL_09f4: Unknown result type (might be due to invalid IL or missing references) //IL_0a00: Expected O, but got Unknown //IL_0a2f: Unknown result type (might be due to invalid IL or missing references) //IL_0de6: Unknown result type (might be due to invalid IL or missing references) //IL_0df2: Expected O, but got Unknown //IL_0df8: Unknown result type (might be due to invalid IL or missing references) //IL_0e04: Expected O, but got Unknown //IL_0e4d: Unknown result type (might be due to invalid IL or missing references) //IL_0e73: Unknown result type (might be due to invalid IL or missing references) if (!drawEspBool && !drawItemEspBool && !drawExtractionPointEspBool && !drawPlayerEspBool && !draw3DPlayerEspBool && !draw3DItemEspBool) { return; } if ((Object)(object)localPlayer == (Object)null) { UpdateLocalPlayer(); } if (Time.time - lastUpdateTime > 1f) { UpdatePlayerDataList(); if (drawEspBool || drawItemEspBool || drawExtractionPointEspBool || drawPlayerEspBool || draw3DPlayerEspBool || draw3DItemEspBool) { UpdateLists(); } UpdateLocalPlayer(); } frameCounter++; if (frameCounter % 2 != 0) { return; } if ((Object)(object)cachedCamera == (Object)null || (Object)(object)cachedCamera != (Object)(object)Camera.main) { cachedCamera = Camera.main; if ((Object)(object)cachedCamera == (Object)null) { Hax2.Log1("Camera.main não encontrada!"); return; } } scaleX = (float)Screen.width / (float)cachedCamera.pixelWidth; scaleY = (float)Screen.height / (float)cachedCamera.pixelHeight; if (drawEspBool) { GUIStyle val = new GUIStyle(GUI.skin.label) { alignment = (TextAnchor)4, wordWrap = true, fontSize = 12, fontStyle = (FontStyle)1 }; foreach (Enemy enemy in enemyList) { if ((Object)(object)enemy == (Object)null || !((Component)enemy).gameObject.activeInHierarchy || (Object)(object)enemy.CenterTransform == (Object)null) { continue; } Vector3 position = ((Component)enemy).transform.position; float num = 2f; Vector3 val2 = ((Component)enemy).transform.position + Vector3.up * num; Vector3 val3 = cachedCamera.WorldToScreenPoint(position); Vector3 val4 = cachedCamera.WorldToScreenPoint(val2); if (val3.z > 0f && val4.z > 0f) { float num2 = val3.x * scaleX; float num3 = (float)Screen.height - val3.y * scaleY; float num4 = (float)Screen.height - val4.y * scaleY; float num5 = Mathf.Abs(num3 - num4); float num6 = ((Component)enemy).transform.localScale.y * 200f; float z = val3.z; float num7 = num6 / z * scaleX; num7 = Mathf.Clamp(num7, 30f, num5 * 1.2f); num5 = Mathf.Clamp(num5, 40f, 400f); float num8 = num3; Box(num2, num8, num7, num5, texture2, 1f); float num9 = 100f; float num10 = num2 - num9 / 2f; Component componentInParent = ((Component)enemy).GetComponentInParent(Type.GetType("EnemyParent, Assembly-CSharp")); string text = "Enemy"; if ((Object)(object)componentInParent != (Object)null) { text = (((object)componentInParent).GetType().GetField("enemyName", BindingFlags.Instance | BindingFlags.Public)?.GetValue(componentInParent) as string) ?? "Enemy"; } string text2 = ""; if (showEnemyDistance && (Object)(object)localPlayer != (Object)null) { float num11 = Vector3.Distance(localPlayer.transform.position, ((Component)enemy).transform.position); text2 = $" [{num11:F1}m]"; } string text3 = ""; if (showEnemyNames) { text3 = text; } if (showEnemyDistance) { text3 += text2; } float num12 = val.CalcHeight(new GUIContent(text3), num9); float num13 = num8 - num5 - num12; GUI.Label(new Rect(num10, num13, num9, num12), text3, val); } } } if (drawItemEspBool) { GUIStyle val5 = new GUIStyle(GUI.skin.label); val5.normal.textColor = Color.yellow; val5.alignment = (TextAnchor)4; val5.fontSize = 14; val5.fontStyle = (FontStyle)1; val5.wordWrap = true; val5.border = new RectOffset(1, 1, 1, 1); GUIStyle val6 = val5; GUIStyle val7 = new GUIStyle(GUI.skin.label); val7.normal.textColor = Color.green; val7.alignment = (TextAnchor)4; val7.fontSize = 12; val7.fontStyle = (FontStyle)1; GUIStyle val8 = val7; foreach (object valuableObject in valuableObjects) { if (valuableObject == null) { continue; } object? obj = valuableObject.GetType().GetProperty("transform", BindingFlags.Instance | BindingFlags.Public)?.GetValue(valuableObject); Transform val9 = (Transform)((obj is Transform) ? obj : null); if ((Object)(object)val9 == (Object)null || !((Component)val9).gameObject.activeInHierarchy) { continue; } Vector3 position2 = val9.position; Vector3 val10 = cachedCamera.WorldToScreenPoint(position2); if (!(val10.z > 0f) || !(val10.x > 0f) || !(val10.x < (float)Screen.width) || !(val10.y > 0f) || !(val10.y < (float)Screen.height)) { continue; } float num14 = val10.x * scaleX; float num15 = (float)Screen.height - val10.y * scaleY; string text4; try { text4 = valuableObject.GetType().GetProperty("name", BindingFlags.Instance | BindingFlags.Public)?.GetValue(valuableObject) as string; if (string.IsNullOrEmpty(text4)) { object obj2 = ((valuableObject is Object) ? valuableObject : null); text4 = ((obj2 != null) ? ((Object)obj2).name : null) ?? "Unknown"; } } catch (Exception ex) { object obj3 = ((valuableObject is Object) ? valuableObject : null); text4 = ((obj3 != null) ? ((Object)obj3).name : null) ?? "Unknown"; Hax2.Log1("Erro ao acessar 'name' do item: " + ex.Message + ". Usando nome do GameObject: " + text4); } if (text4.StartsWith("Valuable", StringComparison.OrdinalIgnoreCase)) { text4 = text4.Substring("Valuable".Length).Trim(); } if (text4.EndsWith("(Clone)", StringComparison.OrdinalIgnoreCase)) { text4 = text4.Substring(0, text4.Length - "(Clone)".Length).Trim(); } FieldInfo field = valuableObject.GetType().GetField("dollarValueCurrent", BindingFlags.Instance | BindingFlags.Public); int num16 = ((field != null) ? Convert.ToInt32(field.GetValue(valuableObject)) : 0); string text5 = ""; if (showItemDistance && (Object)(object)localPlayer != (Object)null) { float num17 = Vector3.Distance(localPlayer.transform.position, position2); text5 = $" [{num17:F1}m]"; } string text6 = (showItemNames ? text4 : ""); if (showItemDistance) { text6 += text5; } float num18 = 150f; float num19 = val8.CalcHeight(new GUIContent(num16 + "$"), num18); float num20 = val6.CalcHeight(new GUIContent(text6), num18); float num21 = num20 + num19 + 5f; float num22 = num14 - num18 / 2f; float num23 = num15 - num21 - 5f; if (!string.IsNullOrEmpty(text6)) { GUI.Label(new Rect(num22, num23, num18, num20), text6, val6); } if (showItemValue) { GUI.Label(new Rect(num22, num23 + num20 + 2f, num18, num19), num16 + "$", val8); } if (draw3DItemEspBool) { CreateBoundsEdges(GetActiveColliderBounds(((Component)val9).gameObject), Color.yellow); } } } if (drawExtractionPointEspBool) { GUIStyle val11 = new GUIStyle(GUI.skin.label) { alignment = (TextAnchor)4, fontSize = 14, fontStyle = (FontStyle)1, wordWrap = true, border = new RectOffset(1, 1, 1, 1) }; GUIStyle val12 = new GUIStyle(GUI.skin.label); val12.normal.textColor = Color.white; val12.alignment = (TextAnchor)4; val12.fontSize = 12; val12.fontStyle = (FontStyle)1; foreach (ExtractionPointData extractionPoint in extractionPointList) { if ((Object)(object)extractionPoint.ExtractionPoint == (Object)null || !((Component)extractionPoint.ExtractionPoint).gameObject.activeInHierarchy) { continue; } Vector3 val13 = cachedCamera.WorldToScreenPoint(extractionPoint.CachedPosition); if (val13.z > 0f && val13.x > 0f && val13.x < (float)Screen.width && val13.y > 0f && val13.y < (float)Screen.height) { float num24 = val13.x * scaleX; float num25 = (float)Screen.height - val13.y * scaleY; string text7 = "Extraction Point"; string text8 = " (" + extractionPoint.CachedState + ")"; string text9 = ((showExtractionDistance && (Object)(object)localPlayer != (Object)null) ? $"{Vector3.Distance(localPlayer.transform.position, extractionPoint.CachedPosition):F1}m" : ""); val11.normal.textColor = ((extractionPoint.CachedState == "Active") ? Color.green : ((extractionPoint.CachedState == "Idle") ? Color.red : Color.cyan)); string text10 = (showExtractionNames ? (text7 + text8) : ""); if (showExtractionDistance) { text10 = text10 + " " + text9; } float num26 = 150f; float num27 = val11.CalcHeight(new GUIContent(text10), num26); float num28 = num27; float num29 = num24 - num26 / 2f; float num30 = num25 - num28 - 5f; if (!string.IsNullOrEmpty(text10)) { GUI.Label(new Rect(num29, num30, num26, num27), text10, val11); } } } } if (!drawPlayerEspBool && !draw3DPlayerEspBool) { return; } GUIStyle val14 = new GUIStyle(GUI.skin.label); val14.normal.textColor = Color.white; val14.alignment = (TextAnchor)4; val14.fontSize = 14; val14.fontStyle = (FontStyle)1; val14.wordWrap = true; val14.border = new RectOffset(1, 1, 1, 1); GUIStyle val15 = val14; GUIStyle val16 = new GUIStyle(GUI.skin.label); val16.normal.textColor = Color.green; val16.alignment = (TextAnchor)4; val16.fontSize = 12; val16.fontStyle = (FontStyle)1; GUIStyle val17 = val16; GUIStyle val18 = new GUIStyle(GUI.skin.label); val18.normal.textColor = Color.yellow; val18.alignment = (TextAnchor)4; val18.fontSize = 12; val18.fontStyle = (FontStyle)1; foreach (PlayerData playerData in playerDataList) { bool flag = false; if (!PhotonNetwork.IsConnected && (Object)(object)localPlayer != (Object)null && (Object)(object)((Component)playerData.Transform).gameObject == (Object)(object)localPlayer) { flag = true; } if ((Object)(object)playerData.PhotonView == (Object)null || (playerData.PhotonView.IsMine && PhotonNetwork.IsConnected) || flag || !((Component)playerData.Transform).gameObject.activeInHierarchy) { continue; } Vector3 position3 = playerData.Transform.position; float num31 = (((Object)(object)localPlayer != (Object)null) ? Vector3.Distance(localPlayer.transform.position, position3) : float.MaxValue); if (num31 > 100f) { continue; } Vector3 val19 = position3; float num32 = 2f; Vector3 val20 = position3 + Vector3.up * num32; Vector3 val21 = cachedCamera.WorldToScreenPoint(val19); Vector3 val22 = cachedCamera.WorldToScreenPoint(val20); if (val21.z > 0f && val22.z > 0f) { float num33 = val21.x * scaleX; float num34 = (float)Screen.height - val21.y * scaleY; float num35 = (float)Screen.height - val22.y * scaleY; float num36 = Mathf.Abs(num34 - num35); float num37 = playerData.Transform.localScale.y * 200f / (num31 + 1f) * scaleX; num37 = Mathf.Clamp(num37, 30f, num36 * 1.2f); num36 = Mathf.Clamp(num36, 40f, 400f); float x = num33; float y = num34; if (draw3DPlayerEspBool) { CreateBoundsEdges(GetActiveColliderBounds(((Component)playerData.Transform).gameObject), Color.red); } if (drawPlayerEspBool) { Box(x, y, num37, num36, texture2); } int num38 = (playerHealthCache.ContainsKey(playerData.PhotonView.ViewID) ? playerHealthCache[playerData.PhotonView.ViewID] : 100); string text11 = $"HP: {num38}"; string text12 = ((showPlayerDistance && (Object)(object)localPlayer != (Object)null) ? $"{num31:F1}m" : ""); string text13 = (showPlayerNames ? playerData.Name : ""); if (showPlayerDistance) { text13 = text13 + " " + text12; } float num39 = 150f; float num40 = val15.CalcHeight(new GUIContent(text13), num39); float num41 = val17.CalcHeight(new GUIContent(text11), num39); float num42 = num40 + (showPlayerHP ? (num41 + 2f) : 0f); float num43 = num33 - num39 / 2f; float num44 = num34 - num36 - num42 - 10f; if (!string.IsNullOrEmpty(text13)) { GUI.Label(new Rect(num43, num44, num39, num40), text13, val15); } if (showPlayerHP) { GUI.Label(new Rect(num43, num44 + num40 + 2f, num39, num41), text11, val17); } } } } private static int GetPlayerHealth(object player) { try { FieldInfo field = player.GetType().GetField("playerHealth", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field == null) { return 100; } object value = field.GetValue(player); if (value == null) { return 100; } FieldInfo field2 = value.GetType().GetField("health", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field2 == null) { return 100; } return (int)field2.GetValue(value); } catch (Exception ex) { Hax2.Log1("Erro ao obter vida do jogador: " + ex.Message); return 100; } } public static void KillAllEnemies() { //IL_008c: Unknown result type (might be due to invalid IL or missing references) Hax2.Log1("Tentando matar todos os inimigos"); foreach (Enemy enemy in enemyList) { if ((Object)(object)enemy == (Object)null) { continue; } try { FieldInfo field = ((object)enemy).GetType().GetField("Health", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field != null) { object value = field.GetValue(enemy); if (value != null) { MethodInfo method = value.GetType().GetMethod("Hurt", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (method != null) { method.Invoke(value, new object[2] { 9999, Vector3.zero }); Hax2.Log1("Inimigo ferido com 9999 de dano via Hurt"); } else { Hax2.Log1("Método 'Hurt' não encontrado em EnemyHealth"); } } else { Hax2.Log1("Componente EnemyHealth é nulo"); } } else { Hax2.Log1("Campo 'Health' não encontrado em Enemy"); } } catch (Exception ex) { Hax2.Log1("Erro ao matar inimigo: " + ex.Message); } } UpdateEnemyList(); } } internal static class Health_Player { public static object playerHealthInstance; public static object playerMaxHealthInstance; public static void HealPlayer(object targetPlayer, int healAmount, string playerName) { if (targetPlayer == null) { Hax2.Log1("Jogador alvo é nulo!"); return; } try { Hax2.Log1($"Tentando curar: {playerName} | MasterClient: {PhotonNetwork.IsMasterClient}"); FieldInfo field = targetPlayer.GetType().GetField("photonView", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field == null) { Hax2.Log1("PhotonViewField não encontrado!"); return; } object? value = field.GetValue(targetPlayer); PhotonView val = (PhotonView)((value is PhotonView) ? value : null); if ((Object)(object)val == (Object)null) { Hax2.Log1("PhotonView não é válido!"); return; } FieldInfo field2 = targetPlayer.GetType().GetField("playerHealth", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field2 == null) { Hax2.Log1("Campo 'playerHealth' não encontrado!"); return; } object value2 = field2.GetValue(targetPlayer); if (value2 == null) { Hax2.Log1("Instância de playerHealth é nula!"); return; } Type type = value2.GetType(); MethodInfo method = type.GetMethod("Heal", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (method != null) { method.Invoke(value2, new object[2] { healAmount, true }); Hax2.Log1($"Método 'Heal' chamado localmente com {healAmount} HP."); } else { Hax2.Log1("Método 'Heal' não encontrado!"); } if (PhotonNetwork.IsConnected && (Object)(object)val != (Object)null) { FieldInfo field3 = type.GetField("currentHealth", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field4 = type.GetField("maxHealth", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); int num = ((field3 != null) ? ((int)field3.GetValue(value2)) : 0); int num2 = ((field4 != null) ? ((int)field4.GetValue(value2)) : 100); Hax2.Log1((field4 != null) ? $"maxHealth encontrado: {num2}" : "Campo 'maxHealth' não encontrado, usando valor padrão: 100"); val.RPC("UpdateHealthRPC", (RpcTarget)3, new object[3] { num2, num2, true }); Hax2.Log1($"RPC 'UpdateHealthRPC' enviado para todos com saúde={num + num2}, maxHealth={num2}, effect=true."); try { val.RPC("HealRPC", (RpcTarget)3, new object[2] { healAmount, true }); Hax2.Log1($"RPC 'HealRPC' enviado com {healAmount} HP."); } catch { Hax2.Log1("RPC 'HealRPC' não registrado, confiando no UpdateHealthRPC."); } } else { Hax2.Log1("Não conectado ao Photon, cura apenas local."); } Hax2.Log1("Tentativa de curar concluída."); } catch (Exception ex) { Hax2.Log1("Erro ao tentar curar: " + ex.Message); } } public static void DamagePlayer(object targetPlayer, int damageAmount, string playerName) { //IL_01ad: Unknown result type (might be due to invalid IL or missing references) if (targetPlayer == null) { Hax2.Log1("Jogador alvo é nulo!"); return; } try { Hax2.Log1($"Tentando causar dano: {playerName} | MasterClient: {PhotonNetwork.IsMasterClient}"); FieldInfo field = targetPlayer.GetType().GetField("photonView", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field == null) { Hax2.Log1("PhotonViewField não encontrado!"); return; } object? value = field.GetValue(targetPlayer); PhotonView val = (PhotonView)((value is PhotonView) ? value : null); if ((Object)(object)val == (Object)null) { Hax2.Log1("PhotonView não é válido!"); return; } FieldInfo field2 = targetPlayer.GetType().GetField("playerHealth", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field2 == null) { Hax2.Log1("Campo 'playerHealth' não encontrado!"); return; } object value2 = field2.GetValue(targetPlayer); if (value2 == null) { Hax2.Log1("Instância de playerHealth é nula!"); return; } Type type = value2.GetType(); MethodInfo method = type.GetMethod("Hurt", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (method != null) { method.Invoke(value2, new object[3] { damageAmount, true, -1 }); Hax2.Log1($"Método 'Hurt' chamado localmente com {damageAmount} de dano."); } else { Hax2.Log1("Método 'Hurt' não encontrado!"); } if (PhotonNetwork.IsConnected && (Object)(object)val != (Object)null) { FieldInfo field3 = type.GetField("maxHealth", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); int num = ((field3 != null) ? ((int)field3.GetValue(value2)) : 100); Hax2.Log1((field3 != null) ? $"maxHealth encontrado: {num}" : "Campo 'maxHealth' não encontrado, usando valor padrão: 100"); val.RPC("HurtOtherRPC", (RpcTarget)3, new object[4] { damageAmount, Vector3.zero, false, -1 }); Hax2.Log1($"RPC 'HurtOtherRPC' enviado com {damageAmount} de dano."); try { val.RPC("HurtRPC", (RpcTarget)3, new object[3] { damageAmount, true, -1 }); Hax2.Log1($"RPC 'HurtRPC' enviado com {damageAmount} de dano."); } catch { Hax2.Log1("RPC 'HurtRPC' não registrado, confiando no HurtOtherRPC."); } } else { Hax2.Log1("Não conectado ao Photon, dano apenas local."); } Hax2.Log1("Tentativa de causar dano concluída."); } catch (Exception ex) { Hax2.Log1("Erro ao tentar causar dano: " + ex.Message); } } public static void MaxHealth() { Type type = Type.GetType("PlayerController, Assembly-CSharp"); if (type != null) { Hax2.Log1("PlayerController encontrado."); object obj = GameHelper.FindObjectOfType(type); if (obj != null) { FieldInfo field = obj.GetType().GetField("playerAvatarScript", BindingFlags.Instance | BindingFlags.Public); if (field != null) { object value = field.GetValue(obj); FieldInfo field2 = value.GetType().GetField("playerHealth", BindingFlags.Instance | BindingFlags.Public); if (field2 != null) { object value2 = field2.GetValue(value); MethodInfo method = value2.GetType().GetMethod("UpdateHealthRPC"); if (method != null) { if (Hax2.infiniteHealthActive) { method.Invoke(value2, new object[3] { 999999, 100, true }); } else if (!Hax2.infiniteHealthActive) { method.Invoke(value2, new object[3] { 100, 100, true }); } Hax2.Log1("Vida máxima ajustada para 999999."); } else { Hax2.Log1("Método 'UpdateHealthRPC' não encontrado em playerHealth."); } } else { Hax2.Log1("Campo 'playerHealth' não encontrado em playerAvatarScript."); } } else { Hax2.Log1("Campo 'playerAvatarScript' não encontrado em PlayerController."); } } else { Hax2.Log1("playerControllerInstance não encontrado."); } } else { Hax2.Log1("Tipo PlayerController não encontrado."); } } } internal class playerColor { public static bool isRandomizing = false; private static float lastColorChangeTime = 0f; private static float changeInterval = 0.1f; private static Type colorControllerType; private static object colorControllerInstance; private static MethodInfo playerSetColorMethod; private static bool isInitialized = false; private static void Initialize() { if (isInitialized) { return; } colorControllerType = Type.GetType("PlayerAvatar, Assembly-CSharp"); if (colorControllerType == null) { Hax2.Log1("colorControllerType (PlayerAvatar) não encontrado."); return; } Hax2.Log1("colorControllerType (PlayerAvatar) encontrado."); colorControllerInstance = null; if (PhotonNetwork.IsConnected) { PhotonView[] array = Object.FindObjectsOfType<PhotonView>(); Hax2.Log1($"Encontrados {array.Length} PhotonViews na cena."); PhotonView[] array2 = array; foreach (PhotonView val in array2) { if ((Object)(object)val != (Object)null && val.IsMine) { Component component = ((Component)val).gameObject.GetComponent(colorControllerType); if ((Object)(object)component != (Object)null) { colorControllerInstance = component; string name = ((Object)((Component)val).gameObject).name; Player owner = val.Owner; Hax2.Log1("PlayerAvatar local encontrado via PhotonView: " + name + ", Owner: " + ((owner != null) ? owner.NickName : null)); break; } } } } else { Object val2 = Object.FindObjectOfType(colorControllerType); if (val2 != (Object)null) { colorControllerInstance = val2; Hax2.Log1("PlayerAvatar encontrado no singleplayer via FindObjectOfType: " + ((Object)((Component)((val2 is MonoBehaviour) ? val2 : null)).gameObject).name); } else { GameObject localPlayer = DebugCheats.GetLocalPlayer(); if ((Object)(object)localPlayer != (Object)null) { Component component2 = localPlayer.GetComponent(colorControllerType); if ((Object)(object)component2 != (Object)null) { colorControllerInstance = component2; Hax2.Log1("PlayerAvatar encontrado no singleplayer via GetLocalPlayer: " + ((Object)localPlayer).name); } else { Hax2.Log1("Componente PlayerAvatar não encontrado no objeto retornado por GetLocalPlayer."); } } else { Hax2.Log1("Nenhum PlayerAvatar encontrado no singleplayer via GetLocalPlayer."); } } } if (colorControllerInstance == null) { Hax2.Log1("Nenhum PlayerAvatar local encontrado para este cliente (multiplayer ou singleplayer)."); return; } playerSetColorMethod = colorControllerType.GetMethod("PlayerAvatarSetColor", BindingFlags.Instance | BindingFlags.Public); if (playerSetColorMethod == null) { Hax2.Log1("Método PlayerAvatarSetColor não encontrado em PlayerAvatar."); return; } isInitialized = true; Hax2.Log1("playerColor inicializado com sucesso para o jogador local."); } public static void colorRandomizer() { Initialize(); if (!isInitialized || colorControllerInstance == null || playerSetColorMethod == null) { Hax2.Log1("Randomizer ignorado: Falha na inicialização ou instância/método ausentes."); } else if (isRandomizing && Time.time - lastColorChangeTime >= changeInterval) { int num = new Random().Next(0, 30); try { playerSetColorMethod.Invoke(colorControllerInstance, new object[1] { num }); lastColorChangeTime = Time.time; Hax2.Log1($"Cor do jogador local alterada para índice: {num}"); } catch (Exception ex) { Hax2.Log1("Erro ao invocar PlayerAvatarSetColor: " + ex.Message); } } } public static void Reset() { isInitialized = false; colorControllerType = null; colorControllerInstance = null; playerSetColorMethod = null; Hax2.Log1("playerColor reiniciado."); } } internal class PlayerController { public static object playerSpeedInstance; public static object reviveInstance; public static object enemyDirectorInstance; public static object playerControllerInstance; public static Type playerControllerType = Type.GetType("PlayerController, Assembly-CSharp"); private static float desiredDelayMultiplier = 1f; private static float desiredRateMultiplier = 1f; private static void InitializePlayerController() { if (playerControllerType == null) { Hax2.Log1("PlayerController type not found."); return; } playerControllerInstance = GameHelper.FindObjectOfType(playerControllerType); if (playerControllerInstance == null) { Hax2.Log1("PlayerController instance not found in current scene."); } else { Hax2.Log1("PlayerController instance updated successfully."); } } public static void GodMode() { Type type = Type.GetType("PlayerController, Assembly-CSharp"); if (type != null) { Hax2.Log1("PlayerController found."); object obj = GameHelper.FindObjectOfType(type); if (obj != null) { FieldInfo field = obj.GetType().GetField("playerAvatarScript", BindingFlags.Instance | BindingFlags.Public); if (field != null) { object value = field.GetValue(obj); FieldInfo field2 = value.GetType().GetField("playerHealth", BindingFlags.Instance | BindingFlags.Public); if (field2 != null) { object value2 = field2.GetValue(value); FieldInfo field3 = value2.GetType().GetField("godMode", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field3 != null) { bool flag = !(bool)field3.GetValue(value2); field3.SetValue(value2, flag); Hax2.godModeActive = !flag; Hax2.Log1("God Mode " + (flag ? "enabled" : "disabled")); } else { Hax2.Log1("godMode field not found in playerHealth."); } } else { Hax2.Log1("playerHealth field not found in playerAvatarScript."); } } else { Hax2.Log1("playerAvatarScript field not found in PlayerController."); } } else { Hax2.Log1("playerControllerInstance not found."); } } else { Hax2.Log1("PlayerController type not found."); } } public static void RemoveSpeed(float sliderValue) { Type type = Type.GetType("PlayerController, Assembly-CSharp"); if (type != null) { Hax2.Log1("playerInSpeedType n é null"); playerSpeedInstance = GameHelper.FindObjectOfType(type); if (playerSpeedInstance != null) { Hax2.Log1("playerSpeedInstance n é null"); } else { Hax2.Log1("playerSpeedInstance null"); } } else { Hax2.Log1("playerInSpeedType null"); } if (playerSpeedInstance != null) { Hax2.Log1("playerSpeedInstance n é null"); FieldInfo field = playerSpeedInstance.GetType().GetField("MoveSpeed", BindingFlags.Instance | BindingFlags.Public); if (field != null) { field.SetValue(playerSpeedInstance, sliderValue); Hax2.Log1("MoveSpeed value set to " + sliderValue); } else { Hax2.Log1("MoveSpeed field not found in PlayerController."); } } } public static void MaxStamina() { Type type = Type.GetType("PlayerController, Assembly-CSharp"); if (type != null) { Hax2.Log1("PlayerController found."); object obj = GameHelper.FindObjectOfType(type); if (obj != null) { FieldInfo field = obj.GetType().GetField("EnergyCurrent", BindingFlags.Instance | BindingFlags.Public); if (field != null) { if (Hax2.stamineState) { field.SetValue(obj, 999999); } else if (!Hax2.stamineState) { field.SetValue(obj, 40); } Hax2.Log1("EnergyCurrent set to " + (Hax2.stamineState ? 999999 : 40)); } else { Hax2.Log1("EnergyCurrent field not found in playerAvatarScript."); } } else { Hax2.Log1("playerControllerInstance not found."); } } else { Hax2.Log1("PlayerController type not found."); } } public static void DecreaseStaminaRechargeDelay(float delayMultiplier, float rateMultiplier = 1f) { InitializePlayerController(); if (playerControllerInstance != null) { desiredDelayMultiplier = delayMultiplier; desiredRateMultiplier = rateMultiplier; Hax2.Log1("Attempting to decrease stamina recharge delay."); FieldInfo field = playerControllerType.GetField("sprintRechargeTime", BindingFlags.Instance | BindingFlags.NonPublic); if (field != null) { float num = 1f * delayMultiplier; field.SetValue(playerControllerInstance, num); Hax2.Log1($"sprintRechargeTime set to {num} (multiplier: {delayMultiplier})"); } else { Hax2.Log1("sprintRechargeTime field not found in PlayerController."); } FieldInfo field2 = playerControllerType.GetField("sprintRechargeAmount", BindingFlags.Instance | BindingFlags.NonPublic); if (field2 != null) { float num2 = 2f * rateMultiplier; field2.SetValue(playerControllerInstance, num2); Hax2.Log1($"sprintRechargeAmount set to {num2} (multiplier: {rateMultiplier})"); } else { Hax2.Log1("sprintRechargeAmount field not found in PlayerController."); } } } public static void ReapplyStaminaSettings() { InitializePlayerController(); if (playerControllerInstance != null) { DecreaseStaminaRechargeDelay(desiredDelayMultiplier, desiredRateMultiplier); Hax2.Log1("Reapplied stamina settings after scene change."); } } public static void SetFlashlightIntensity(float value) { InitializePlayerController(); if (playerControllerInstance == null) { return; } FieldInfo field = playerControllerType.GetField("playerAvatarScript", BindingFlags.Instance | BindingFlags.Public); if (!(field != null)) { return; } object value2 = field.GetValue(playerControllerInstance); if (value2 == null) { return; } FieldInfo field2 = value2.GetType().GetField("flashlightController", BindingFlags.Instance | BindingFlags.Public); if (!(field2 != null)) { return; } object value3 = field2.GetValue(value2); if (value3 != null) { FieldInfo field3 = value3.GetType().GetField("baseIntensity", BindingFlags.Instance | BindingFlags.NonPublic); if (field3 != null) { field3.SetValue(value3, value); Hax2.Log1($"Flashlight BaseIntensity set to {value}"); } } } public static void SetCrouchDelay(float value) { InitializePlayerController(); if (playerControllerInstance != null) { FieldInfo field = playerControllerType.GetField("CrouchTimeMin", BindingFlags.Instance | BindingFlags.Public); if (field != null) { field.SetValue(playerControllerInstance, value); Hax2.Log1($"CrouchTimeMin set to {value}"); } else { Hax2.Log1("CrouchTimeMin field not found in PlayerController."); } } } public static void SetCrouchSpeed(float value) { InitializePlayerController(); if (playerControllerInstance != null) { FieldInfo field = playerControllerType.GetField("CrouchSpeed", BindingFlags.Instance | BindingFlags.Public); if (field != null) { field.SetValue(playerControllerInstance, value); Hax2.Log1($"CrouchSpeed set to {value}"); } else { Hax2.Log1("CrouchSpeed field not found in PlayerController."); } } } public static void SetJumpForce(float value) { InitializePlayerController(); if (playerControllerInstance != null) { FieldInfo field = playerControllerType.GetField("JumpForce", BindingFlags.Instance | BindingFlags.Public); if (field != null) { field.SetValue(playerControllerInstance, value); Hax2.Log1($"JumpForce set to {value}"); } else { Hax2.Log1("JumpForce field not found in PlayerController."); } } } public static void SetExtraJumps(int value) { InitializePlayerController(); if (playerControllerInstance != null) { FieldInfo field = playerControllerType.GetField("JumpExtra", BindingFlags.Instance | BindingFlags.NonPublic); if (field != null) { field.SetValue(playerControllerInstance, value); Hax2.Log1($"JumpExtra set to {value}"); } else { Hax2.Log1("JumpExtra field not found in PlayerController."); } } } public static void SetCustomGravity(float value) { InitializePlayerController(); if (playerControllerInstance != null) { FieldInfo field = playerControllerType.GetField("CustomGravity", BindingFlags.Instance | BindingFlags.Public); if (field != null) { field.SetValue(playerControllerInstance, value); Hax2.Log1($"CustomGravity set to {value}"); } else { Hax2.Log1("CustomGravity field not found in PlayerController."); } } } public static void SetCrawlDelay(float crawlDelay) { //IL_008e: Unknown result type (might be due to invalid IL or missing references) InitializePlayerController(); if (playerControllerInstance == null) { return; } FieldInfo field = playerControllerType.GetField("CrouchTimeMin", BindingFlags.Instance | BindingFlags.Public); if (field != null) { field.SetValue(playerControllerInstance, crawlDelay); Hax2.Log1($"CrouchTimeMin set locally to {crawlDelay}"); if (PhotonNetwork.IsConnected) { FieldInfo field2 = playerControllerType.GetField("photonView", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); PhotonView val = ((!(field2 != null)) ? ((PhotonView)null) : ((PhotonView)field2.GetValue(playerControllerInstance))); if ((Object)(object)val == (Object)null) { FieldInfo field3 = playerControllerType.GetField("playerAvatarScript", BindingFlags.Instance | BindingFlags.Public); if (field3 != null) { object value = field3.GetValue(playerControllerInstance); object? obj = value?.GetType().GetField("photonView", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)?.GetValue(value); val = (PhotonView)((obj is PhotonView) ? obj : null); } } if ((Object)(object)val != (Object)null) { if (PhotonNetwork.IsMasterClient) { val.RPC("SetCrawlDelayRPC", (RpcTarget)3, new object[1] { crawlDelay }); Hax2.Log1($"Master Client set crawl delay to {crawlDelay} and synced via RPC."); } else { val.RPC("SetCrawlDelayRPC", (RpcTarget)2, new object[1] { crawlDelay }); Hax2.Log1($"Requested Master Client to set crawl delay to {crawlDelay} via RPC."); } } else { Hax2.Log1("PhotonView not found for crawl delay synchronization."); } } else { Hax2.Log1("Not connected to Photon, crawl delay applied only locally."); } } else { Hax2.Log1("CrouchTimeMin field not found in PlayerController."); } } public static void SetGrabRange(float value) { InitializePlayerController(); if (playerControllerInstance == null) { return; } object obj = playerControllerType.GetField("playerAvatarScript", BindingFlags.Instance | BindingFlags.Public)?.GetValue(playerControllerInstance); if (obj == null) { return; } object obj2 = obj.GetType().GetField("physGrabber", BindingFlags.Instance | BindingFlags.Public)?.GetValue(obj); if (obj2 != null) { FieldInfo field = obj2.GetType().GetField("grabRange", BindingFlags.Instance | BindingFlags.Public); if (field != null) { field.SetValue(obj2, value); Hax2.Log1($"GrabRange set to {value}"); } else { Hax2.Log1("GrabRange field not found in PhysGrabber."); } } } public static void SetThrowStrength(float value) { InitializePlayerController(); if (playerControllerInstance == null) { return; } object obj = playerControllerType.GetField("playerAvatarScript", BindingFlags.Instance | BindingFlags.Public)?.GetValue(playerControllerInstance); if (obj == null) { return; } object obj2 = obj.GetType().GetField("physGrabber", BindingFlags.Instance | BindingFlags.Public)?.GetValue(obj); if (obj2 != null) { FieldInfo field = obj2.GetType().GetField("throwStrength", BindingFlags.Instance | BindingFlags.Public); if (field != null) { field.SetValue(obj2, value); Hax2.Log1($"ThrowStrength set to {value}"); } else { Hax2.Log1("ThrowStrength field not found in PhysGrabber."); } } } public static void SetSlideDecay(float value) { InitializePlayerController(); if (playerControllerInstance != null) { FieldInfo field = playerControllerType.GetField("SlideDecay", BindingFlags.Instance | BindingFlags.Public); if (field != null) { field.SetValue(playerControllerInstance, value); Hax2.Log1($"SlideDecay set to {value}"); } else { Hax2.Log1("SlideDecay field not found in PlayerController."); } } } } internal static class Strength { public class PhysGrabObject : MonoBehaviour, IPunOwnershipCallbacks { public Rigidbody rb; private PhotonView photonView; private void Awake() { photonView = ((Component)this).GetComponent<PhotonView>(); PhotonNetwork.AddCallbackTarget((object)this); } private void OnDestroy() { PhotonNetwork.RemoveCallbackTarget((object)this); } [PunRPC] private void ApplyExtraForceRPC(Vector3 direction, float forceMagnitude, Vector3 position) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) if (PhotonNetwork.IsMasterClient) { rb.AddForceAtPosition(direction * forceMagnitude, position, (ForceMode)0); Hax2.Log1($"Applied extra force {forceMagnitude} to {((Object)((Component)this).gameObject).name} via RPC from clien