Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Decompiled with JetBrains decompiler
- // Type: DeadFrontier2.Main
- // Assembly: DeadFrontier2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
- // MVID: 57159255-1C65-4522-9248-74105B082B80
- // Assembly location: C:\Users\Zenken\Desktop\df2\b\DeadFrontier2.dll
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using System.Reflection;
- using System.Text.RegularExpressions;
- using UnityEngine;
- #nullable disable
- namespace DeadFrontier2;
- internal class Main : MonoBehaviour
- {
- private bool TransformMovement;
- private bool OHK;
- private bool Enemyesp = true;
- private bool Containeresp;
- private bool Playeresp;
- private bool Chamsesp;
- private bool MobVac;
- private bool ConVac;
- private bool ShowHealthbar;
- private GameObject player;
- private CF_da92fcabfd58f8b78e136d77571bcd5fa6b83ebd_Corpsefuscated comp;
- private static bool footstepRangeActive = false;
- private static bool incomingDamageActive = false;
- private static bool visibilityRangeActive = false;
- private static bool espActive = false;
- private static bool isVisible = true;
- public static bool enemyEspActive = false;
- public static bool playerEspActive = false;
- public static bool npcEspActive = false;
- public static bool instantLootActive = false;
- public bool aimbotEnabled;
- public float maxAimbotDistance = 15550f;
- public Camera cameraController;
- public float aimSmooth = 10f;
- public float aimDistance = 50f;
- public Vector3 rotationOffset = Vector3.zero;
- public bool DoorEsp;
- private Vector3 targetPosition;
- private bool isNoClipEnabled;
- private CharacterController characterController;
- private Dictionary<GameObject, float> playerHealthCache = new Dictionary<GameObject, float>();
- public static bool weaponColliders = false;
- private bool weaponCollidersLastState;
- public static bool freezePlayer = false;
- private Vector3 frozenPosition;
- public static List<CF_901297a6fc58add3c63fb6a8009b435c56f6fbf4_Corpsefuscated> ContainerBase = new List<CF_901297a6fc58add3c63fb6a8009b435c56f6fbf4_Corpsefuscated>();
- public static List<CF_60f299bc78d66f622f93c69da2a0e4195c7775c0_Corpsefuscated> EnemyBase = new List<CF_60f299bc78d66f622f93c69da2a0e4195c7775c0_Corpsefuscated>();
- public static List<CF_2e995b97571a12ff09fb17b2c53dc5ae7dd3498d_Corpsefuscated> Playerst = new List<CF_2e995b97571a12ff09fb17b2c53dc5ae7dd3498d_Corpsefuscated>();
- public static List<CF_0705e1f8dcbd51041af0cd432b9e2e45e681a7a4_Corpsefuscated> PlayerHealthbar = new List<CF_0705e1f8dcbd51041af0cd432b9e2e45e681a7a4_Corpsefuscated>();
- public static List<Transform> Offices = new List<Transform>();
- private string[] doorKeywords = new string[4]
- {
- "basicdoubledoor 3m",
- "BasicHallDoubleDoor 5M",
- "basicdoor 3m",
- "stairexit"
- };
- private float natNextUpdateTime;
- private static Material chamsMaterial;
- private static Material headChamsMaterial;
- public static Camera cam;
- private bool showMenu = true;
- private Rect menuRect = new Rect(10f, 10f, 259f, 225f);
- private int selectedTab;
- private string[] tabNames = new string[2]
- {
- nameof (Main),
- "Esp"
- };
- private CF_3980daa940efe5d6b70f20f72753354dc6b9ad14_Corpsefuscated _cachedPlayer;
- public static Color TestColor => new Color(1f, 0.0f, 1f, 1f);
- private void SaveConfig()
- {
- PlayerPrefs.SetInt("TransformMovement", this.TransformMovement ? 1 : 0);
- PlayerPrefs.SetInt("OHK", this.OHK ? 1 : 0);
- PlayerPrefs.SetInt("MobVac", this.MobVac ? 1 : 0);
- PlayerPrefs.SetInt("ConVac", this.ConVac ? 1 : 0);
- PlayerPrefs.SetInt("Playeresp", this.Playeresp ? 1 : 0);
- PlayerPrefs.SetInt("Enemyesp", this.Enemyesp ? 1 : 0);
- PlayerPrefs.SetInt("Containeresp", this.Containeresp ? 1 : 0);
- PlayerPrefs.SetInt("Chamsesp", this.Chamsesp ? 1 : 0);
- PlayerPrefs.Save();
- Debug.Log((object) "Config saved.");
- }
- private void LoadConfig()
- {
- if (!PlayerPrefs.HasKey("TransformMovement"))
- return;
- this.TransformMovement = PlayerPrefs.GetInt("TransformMovement") == 1;
- this.OHK = PlayerPrefs.GetInt("OHK") == 1;
- this.MobVac = PlayerPrefs.GetInt("MobVac") == 1;
- this.ConVac = PlayerPrefs.GetInt("ConVac") == 1;
- this.Playeresp = PlayerPrefs.GetInt("Playeresp") == 1;
- this.Enemyesp = PlayerPrefs.GetInt("Enemyesp") == 1;
- this.Containeresp = PlayerPrefs.GetInt("Containeresp") == 1;
- this.Chamsesp = PlayerPrefs.GetInt("Chamsesp") == 1;
- Debug.Log((object) "Config loaded.");
- }
- private void DrawMenu(int windowID)
- {
- GUILayout.BeginHorizontal(new GUILayoutOption[0]);
- for (int index = 0; index < this.tabNames.Length; ++index)
- {
- if (GUILayout.Toggle((this.selectedTab == index ? 1 : 0) != 0, this.tabNames[index], GUIStyle.op_Implicit("Button"), new GUILayoutOption[1]
- {
- GUILayout.ExpandWidth(true)
- }))
- this.selectedTab = index;
- }
- GUILayout.EndHorizontal();
- switch (this.selectedTab)
- {
- case 0:
- GUILayout.BeginVertical(GUI.skin.box, new GUILayoutOption[0]);
- GUILayout.BeginHorizontal(new GUILayoutOption[0]);
- GUILayout.BeginVertical(new GUILayoutOption[0]);
- this.OHK = GUILayout.Toggle(this.OHK, "1 HP Zombies", new GUILayoutOption[0]);
- this.MobVac = GUILayout.Toggle(this.MobVac, "Zombie Vac", new GUILayoutOption[0]);
- Main.incomingDamageActive = GUILayout.Toggle(Main.incomingDamageActive, "God Mode", new GUILayoutOption[0]);
- Main.footstepRangeActive = GUILayout.Toggle(Main.footstepRangeActive, "Visibility Range", new GUILayoutOption[0]);
- Main.visibilityRangeActive = GUILayout.Toggle(Main.visibilityRangeActive, "Footstep Range", new GUILayoutOption[0]);
- Main.freezePlayer = GUILayout.Toggle(Main.freezePlayer, "Freeze Player", new GUILayoutOption[0]);
- GUILayout.EndVertical();
- GUILayout.Space(10f);
- GUILayout.BeginVertical(new GUILayoutOption[0]);
- this.ConVac = GUILayout.Toggle(this.ConVac, "LongLOOT", new GUILayoutOption[0]);
- this.ShowHealthbar = GUILayout.Toggle(this.ShowHealthbar, "df1 Hitbox", new GUILayoutOption[0]);
- this.aimbotEnabled = GUILayout.Toggle(this.aimbotEnabled, "Aimbot", new GUILayoutOption[0]);
- this.isNoClipEnabled = GUILayout.Toggle(this.isNoClipEnabled, "No-Clip", new GUILayoutOption[0]);
- Main.instantLootActive = GUILayout.Toggle(Main.instantLootActive, "FastLoot", new GUILayoutOption[0]);
- Main.weaponColliders = GUILayout.Toggle(Main.weaponColliders, "Titbox", new GUILayoutOption[0]);
- GUILayout.EndVertical();
- GUILayout.EndHorizontal();
- GUILayout.EndVertical();
- break;
- case 1:
- GUILayout.BeginVertical(GUI.skin.box, new GUILayoutOption[0]);
- GUILayout.BeginHorizontal(new GUILayoutOption[0]);
- GUILayout.BeginVertical(new GUILayoutOption[0]);
- this.Enemyesp = GUILayout.Toggle(this.Enemyesp, "Zombies", new GUILayoutOption[0]);
- this.Playeresp = GUILayout.Toggle(this.Playeresp, "Players", new GUILayoutOption[0]);
- this.DoorEsp = GUILayout.Toggle(this.DoorEsp, "Doors", new GUILayoutOption[0]);
- GUILayout.EndVertical();
- GUILayout.Space(10f);
- GUILayout.BeginVertical(new GUILayoutOption[0]);
- this.Containeresp = GUILayout.Toggle(this.Containeresp, "Container", new GUILayoutOption[0]);
- this.Chamsesp = GUILayout.Toggle(this.Chamsesp, "Chams", new GUILayoutOption[0]);
- GUILayout.EndVertical();
- GUILayout.EndHorizontal();
- GUILayout.EndVertical();
- break;
- }
- GUILayout.BeginArea(new Rect(10f, ((Rect) ref this.menuRect).height - 30f, ((Rect) ref this.menuRect).width - 20f, 40f));
- GUILayout.BeginHorizontal(new GUILayoutOption[0]);
- if (GUILayout.Button("Save Config", new GUILayoutOption[0]))
- this.SaveConfig();
- if (GUILayout.Button("Load Config", new GUILayoutOption[0]))
- this.LoadConfig();
- GUILayout.EndHorizontal();
- GUILayout.EndArea();
- GUI.DragWindow();
- }
- public static List<Transform> GetAllBones(Animator a)
- {
- return new List<Transform>()
- {
- a.GetBoneTransform((HumanBodyBones) 10),
- a.GetBoneTransform((HumanBodyBones) 9),
- a.GetBoneTransform((HumanBodyBones) 7),
- a.GetBoneTransform((HumanBodyBones) 0),
- a.GetBoneTransform((HumanBodyBones) 11),
- a.GetBoneTransform((HumanBodyBones) 13),
- a.GetBoneTransform((HumanBodyBones) 15),
- a.GetBoneTransform((HumanBodyBones) 17),
- a.GetBoneTransform((HumanBodyBones) 12),
- a.GetBoneTransform((HumanBodyBones) 14),
- a.GetBoneTransform((HumanBodyBones) 16 /*0x10*/),
- a.GetBoneTransform((HumanBodyBones) 18),
- a.GetBoneTransform((HumanBodyBones) 1),
- a.GetBoneTransform((HumanBodyBones) 3),
- a.GetBoneTransform((HumanBodyBones) 5),
- a.GetBoneTransform((HumanBodyBones) 2),
- a.GetBoneTransform((HumanBodyBones) 4),
- a.GetBoneTransform((HumanBodyBones) 6)
- };
- }
- public static string GetLootContainerNames(string pText)
- {
- pText = pText.Replace("BarrelA_Barrel1 (1)3_Optimized", "Barrel").Replace("BarrelA_Barrel2 (1)2_Optimized", "Barrel").Replace("PowerboxA_Powerbox20_Optimized", "Powerbox").Replace("PowerboxA_Powerbox31_Optimized", "Powerbox").Replace("PowerboxA_Powerbox12_Optimized", "Powerbox").Replace("BarrelA_Barrel1 (1)3_Optimized", "Barrel").Replace("BarrelA_Barrel21_Optimized", "Barrel").Replace("BarrelA_Barrel10_Optimized", "Barrel").Replace("CarTruckA_Car1A0_Optimized", "Truck").Replace("CarTruckA_Car1B1_Optimized", "Truck").Replace("Cupboard_kitch_down1 (2)", "Kitchen Cupboard").Replace("Cupboard_kitch_down1 (5)", "Kitchen Cupboard").Replace("Cupboard_kitch_down1 (1)", "Kitchen Cupboard").Replace("Cupboard_kitch_down3 (3)", "Kitchen Cupboard").Replace("Cupboard_kitch_down1 (4)", "Kitchen Cupboard").Replace("Cupboard_kitch_down3 (2)", "Kitchen Cupboard").Replace("Cupboard_kitch_down3 (1)", "Kitchen Cupboard").Replace("CarBusA_Bus20_Optimized", "Bus").Replace("CarBusA_Bus11_Optimized", "Bus").Replace("Cupboard_kitch_up3 (2)", "Kitchen Cupboard").Replace("Cupboard_kitch_up2 (1)", "Kitchen Cupboard").Replace("Desk_large_Simple_Grid", "Desk Large").Replace("ZombieWoman_B_v01 (1)", "Zombie Woman").Replace("CarB_Car3B0_Optimized", "Car").Replace("CarB_Car3A1_Optimized", "Car").Replace("CarA_Car4B1_Optimized", "Car").Replace("Bathroom_Furniture_02", "Bathroom Furniture").Replace("Bathroom_Furniture_01", "Bathroom Furniture").Replace("ZombieMan_D_V1 (1)", "Zombie Man").Replace("Cupboard_kitch_down2", "Kitchen Cupboard").Replace("Cupboard_kitch_down3", "Kitchen Cupboard").Replace("CarA_Car40_Optimized", "Car").Replace("FemaleCorpseDecayed", "Female Corpse Decayed").Replace("ZombieWoman_A01 (1)", "Zombie Woman").Replace("ZombieWomanC_V1 (1)", "Zombie Woman").Replace("ZombieWomanD_V1 (1)", "Zombie Woman").Replace("Bed_Cabinet_Medical", "Bed Cabinet Medical").Replace("ZombieMan_C_V1 (1)", "Zombie Man").Replace("Cupboard_kitch_up1", "Kitchen Cupboard").Replace("Cupboard_kitch_up3", "Kitchen Cupboard").Replace("ZombieMan_D_V1 (1)", "Zombie Man").Replace("ZombieWoman_B_v01", "Zombie Woman").Replace("ZombieMan_B01 (1)", "Zombie Man").Replace("ZombieWoman_A01", "Zombie Woman").Replace("ZombieWomanC_V1", "Zombie Woman").Replace("ZombieWomanD_V1", "Zombie Woman").Replace("ZombieManA (1)", "Zombie Man").Replace("ZombieMan_C_V1", "Zombie Man").Replace("ZombieMan_D_V1", "Zombie Man").Replace("FemaleCorpseA", "Female Corpse").Replace("FemaleCorpseB", "Female Corpse").Replace("FemaleCorpseC", "Female Corpse").Replace("FemaleCorpseD", "Female Corpse").Replace("FemaleCorpseE", "Female Corpse").Replace("Cupboard_old1", "Old Cupboard").Replace("Cupboard_old2", "Old Cupboard").Replace("Cupboard_old3", "Old Cupboard").Replace("Cupboard_old4", "Old Cupboard").Replace("Cupboard_old5", "Old Cupboard").Replace("ZombieMan_B01", "Zombie Man").Replace("Sideboard_1", "Sideboard").Replace("Sideboard_2", "Sideboard").Replace("Sideboard_3", "Sideboard").Replace("MaleCorpseA", "Male Corpse").Replace("MaleCorpseB", "Male Corpse").Replace("MaleCorpseC", "Male Corpse").Replace("MaleCorpseD", "Male Corpse").Replace("MaleCorpseE", "Male Corpse").Replace("MaleCorpseF", "Male Corpse").Replace("MaleCorpseG", "Male Corpse").Replace("Wardrobe3_B", "Wardrobe").Replace("Wardrobe3_A", "Wardrobe").Replace("ZombieManA", "Zombie Man").Replace("ZombieManB", "Zombie Man").Replace("Desk_Large", "Desk Large").Replace("PowerboxA", "Powerbox").Replace("PowerboxB", "Powerbox").Replace("CarTruckA", "Truck").Replace("DumpsterA", "Dumpster").Replace("Cupboard1", "Cupboard").Replace("Wardrobe1", "Wardrobe").Replace("Wardrobe2", "Wardrobe").Replace("Cupboard2", "Cupboard").Replace("Cabinet_2", "Cabinet").Replace("TractorA", "Tractor").Replace("Cupboard", "Cupboard").Replace("CarBusA", "Bus").Replace("CarVanA", "Van").Replace("BarrelA", "Barrel").Replace("BarrelB", "Barrel").Replace("Cabinet", "Cabinet").Replace("Desk_1", "Desk").Replace("Desk_2", "Desk").Replace("Desk_3", "Desk").Replace("BinA", "Trash Bin").Replace("BinB", "Trash Bin").Replace("CarA", "Car").Replace("CarB", "Car").Replace("ShelfBase01", "Shelf").Replace("Enemy1", "Boss Loot").Replace("cardboard_boxes", "Cardboard Boxes B").Replace("cardboard_boxes_small", "Cardboard Boxes Small").Replace("cardboard_boxes_small_2", "Cardboard Boxes Small").Replace("Cupboard_Old_Paint1", "Cardboard Boxes Small");
- return new Regex("\\([\\d-]\\)").Replace(pText, string.Empty);
- }
- public static string GetDoorNames(string pText)
- {
- pText = pText.Replace("BasicDoor 3M(Clone)", "Basic Door").Replace("BasicDoor 3M", "Basic Door").Replace("BasicDoubleDoor 3M", "Double Door").Replace("BasicHallDoubleDoor 5M", "Double Door").Replace("BasicHallDoubleDoor 5M(Clone)", "Double Door").Replace("StairExit", "Stair Exit");
- return new Regex("\\([\\d-]\\)").Replace(pText, string.Empty);
- }
- public void OnGUI()
- {
- if (this.showMenu)
- {
- GUI.backgroundColor = Color.black;
- // ISSUE: method pointer
- this.menuRect = GUI.Window(0, this.menuRect, new GUI.WindowFunction((object) this, __methodptr(DrawMenu)), "DeadFrontierz by Dreamz");
- }
- if (this.aimbotEnabled)
- this.Aimbot();
- if (Main.instantLootActive)
- this.ApplyInstantLootModification(true);
- else
- this.ApplyInstantLootModification(false);
- if (Main.footstepRangeActive)
- this.ApplyFootstepRangeModification();
- if (Main.incomingDamageActive)
- this.ApplyIncomingDamageModification();
- if (Main.visibilityRangeActive)
- this.ApplyVisibilityRangeModification();
- if (this.Enemyesp)
- {
- foreach (CF_60f299bc78d66f622f93c69da2a0e4195c7775c0_Corpsefuscated obj in Main.EnemyBase)
- {
- Vector3 screenPoint = Main.cam.WorldToScreenPoint(((Component) obj).transform.position);
- Animator component = ((Component) obj).GetComponent<Animator>();
- if (ESPUtils.IsOnScreen(screenPoint) && CF_46a7199999cccef739e5a3aeb80ad6c602868f5c_Corpsefuscated.op_GreaterThan(obj.health, 0.0f) && this.Enemyesp)
- {
- ESPUtils.DrawAllBones(Main.GetAllBones(component), ESPUtils.GetHealthColour(CF_46a7199999cccef739e5a3aeb80ad6c602868f5c_Corpsefuscated.op_Implicit(obj.health), 99999f));
- ESPUtils.DrawString(new Vector2(screenPoint.x, (float) ((double) Screen.height - (double) screenPoint.y + 8.0)), $"Zombie\nHP: {obj.health.ToString()}\n", Color.red);
- }
- }
- }
- if (this.Playeresp)
- {
- foreach (CF_2e995b97571a12ff09fb17b2c53dc5ae7dd3498d_Corpsefuscated obj in Main.Playerst)
- {
- Vector3 screenPoint = Main.cam.WorldToScreenPoint(((Component) obj).transform.position);
- Animator component = ((Component) obj).GetComponent<Animator>();
- if (ESPUtils.IsOnScreen(screenPoint) && this.Playeresp)
- {
- ESPUtils.DrawAllBones(Main.GetAllBones(component), Color.green);
- ESPUtils.DrawString(new Vector2(screenPoint.x, (float) ((double) Screen.height - (double) screenPoint.y + 8.0)), $"{obj.characterName}\nCharID: {obj.characterID.ToString()}", Color.green);
- }
- }
- }
- if (this.Containeresp)
- {
- foreach (CF_901297a6fc58add3c63fb6a8009b435c56f6fbf4_Corpsefuscated obj in Main.ContainerBase)
- {
- Vector3 screenPoint = Main.cam.WorldToScreenPoint(((Component) obj).transform.position);
- if (ESPUtils.IsOnScreen(screenPoint) && obj.requireLootAllowed && this.Containeresp)
- ESPUtils.DrawString(new Vector2(screenPoint.x, (float) ((double) Screen.height - (double) screenPoint.y + 8.0)), Main.GetLootContainerNames(((Object) ((Component) obj).gameObject).name) + "\n", Color.cyan);
- }
- }
- if (!this.DoorEsp)
- return;
- foreach (Transform office in Main.Offices)
- {
- Vector3 screenPoint = Main.cam.WorldToScreenPoint(office.position);
- if (ESPUtils.IsOnScreen(screenPoint))
- ESPUtils.DrawString(new Vector2(screenPoint.x, (float) ((double) Screen.height - (double) screenPoint.y + 8.0)), Main.GetDoorNames(((Object) ((Component) office).gameObject).name) + "\n", Color.yellow);
- }
- }
- private void Start()
- {
- Material material = new Material(Shader.Find("Hidden/Internal-Colored"));
- ((Object) material).hideFlags = (HideFlags) 5;
- Main.headChamsMaterial = material;
- Main.headChamsMaterial.SetInt("_ZTest", 8);
- Main.headChamsMaterial.SetColor("_Color", Color.blue);
- Main.headChamsMaterial.SetInt("_SrcBlend", 1);
- Main.headChamsMaterial.SetInt("_DstBlend", 0);
- Main.headChamsMaterial.SetInt("_Cull", 0);
- Main.headChamsMaterial.SetInt("_Blend", 0);
- Main.headChamsMaterial.SetInt("_Mode", 0);
- Main.headChamsMaterial.SetFloat("_Glossiness", 0.0f);
- Main.headChamsMaterial.SetFloat("_Metallic", 0.0f);
- }
- public void Update()
- {
- if (Input.GetKeyDown((KeyCode) 277))
- this.showMenu = !this.showMenu;
- this.natNextUpdateTime += Time.deltaTime;
- if ((double) this.natNextUpdateTime >= 4.0)
- {
- Main.ContainerBase = ((IEnumerable<CF_901297a6fc58add3c63fb6a8009b435c56f6fbf4_Corpsefuscated>) Object.FindObjectsOfType<CF_901297a6fc58add3c63fb6a8009b435c56f6fbf4_Corpsefuscated>()).ToList<CF_901297a6fc58add3c63fb6a8009b435c56f6fbf4_Corpsefuscated>();
- Main.EnemyBase = ((IEnumerable<CF_60f299bc78d66f622f93c69da2a0e4195c7775c0_Corpsefuscated>) Object.FindObjectsOfType<CF_60f299bc78d66f622f93c69da2a0e4195c7775c0_Corpsefuscated>()).ToList<CF_60f299bc78d66f622f93c69da2a0e4195c7775c0_Corpsefuscated>();
- Main.Playerst = ((IEnumerable<CF_2e995b97571a12ff09fb17b2c53dc5ae7dd3498d_Corpsefuscated>) Object.FindObjectsOfType<CF_2e995b97571a12ff09fb17b2c53dc5ae7dd3498d_Corpsefuscated>()).ToList<CF_2e995b97571a12ff09fb17b2c53dc5ae7dd3498d_Corpsefuscated>();
- Main.Offices = ((IEnumerable<Transform>) Object.FindObjectsOfType<Transform>()).Where<Transform>((Func<Transform, bool>) (t => ((IEnumerable<string>) this.doorKeywords).Any<string>((Func<string, bool>) (keyword => ((Object) ((Component) t).gameObject).name.ToLower().Contains(keyword))))).ToList<Transform>();
- this.natNextUpdateTime = 0.0f;
- }
- if (Main.weaponColliders != this.weaponCollidersLastState)
- {
- if (Main.weaponColliders)
- this.InflateWeaponColliders(90f);
- else
- this.InflateWeaponColliders(0.6f);
- this.weaponCollidersLastState = Main.weaponColliders;
- }
- if (Main.freezePlayer && Object.op_Inequality((Object) this.player, (Object) null))
- {
- if (Vector3.op_Equality(this.frozenPosition, Vector3.zero))
- this.frozenPosition = this.player.transform.position;
- this.player.transform.position = this.frozenPosition;
- }
- else
- this.frozenPosition = Vector3.zero;
- if (Object.op_Equality((Object) this.player, (Object) null))
- {
- this.player = GameObject.Find("Player");
- if (Object.op_Inequality((Object) this.player, (Object) null))
- this.characterController = this.player.GetComponent<CharacterController>();
- }
- if (Object.op_Inequality((Object) this.player, (Object) null) && Object.op_Inequality((Object) this.characterController, (Object) null))
- ((Collider) this.characterController).enabled = !this.isNoClipEnabled;
- if (this.ShowHealthbar)
- {
- string[] strArray = new string[2]
- {
- "CrawlingHitbox",
- "HitCollider4 (1)"
- };
- Vector3 vector3;
- // ISSUE: explicit constructor call
- ((Vector3) ref vector3).\u002Ector(153f, 153f, 153f);
- foreach (string str in strArray)
- {
- GameObject gameObject = GameObject.Find(str);
- if (Object.op_Inequality((Object) gameObject, (Object) null))
- gameObject.transform.localScale = vector3;
- }
- }
- int num = this.TransformMovement ? 1 : 0;
- if (this.OHK)
- {
- foreach (CF_60f299bc78d66f622f93c69da2a0e4195c7775c0_Corpsefuscated obj in Main.EnemyBase)
- {
- if (CF_46a7199999cccef739e5a3aeb80ad6c602868f5c_Corpsefuscated.op_GreaterThan(obj.health, 0.0f))
- obj.health = CF_46a7199999cccef739e5a3aeb80ad6c602868f5c_Corpsefuscated.op_Implicit(0.1f);
- }
- }
- if (this.MobVac)
- {
- foreach (Component component in Main.EnemyBase)
- component.transform.position = new Vector3(CF_10d9cd501e6ef4ddd7208995c3c7092f303b98d1_Corpsefuscated.player.transform.position.x, CF_10d9cd501e6ef4ddd7208995c3c7092f303b98d1_Corpsefuscated.player.transform.position.y, CF_10d9cd501e6ef4ddd7208995c3c7092f303b98d1_Corpsefuscated.player.transform.position.z + 3f);
- }
- if (this.ConVac)
- {
- if (Object.op_Equality((Object) this._cachedPlayer, (Object) null))
- {
- this._cachedPlayer = Object.FindObjectOfType<CF_3980daa940efe5d6b70f20f72753354dc6b9ad14_Corpsefuscated>();
- if (Object.op_Equality((Object) this._cachedPlayer, (Object) null))
- return;
- }
- if ((double) this._cachedPlayer.CF_45a7bf455e4c74ec498129616ce8f23e98873571_Corpsefuscated != 200.0)
- this._cachedPlayer.CF_45a7bf455e4c74ec498129616ce8f23e98873571_Corpsefuscated = 200f;
- }
- Main.cam = Camera.main;
- }
- public void ApplyFootstepRangeModification()
- {
- this.player = GameObject.Find("Player");
- if (!Object.op_Inequality((Object) this.player, (Object) null))
- return;
- this.comp = this.player.GetComponent<CF_da92fcabfd58f8b78e136d77571bcd5fa6b83ebd_Corpsefuscated>();
- if (!Object.op_Inequality((Object) this.comp, (Object) null))
- return;
- IDictionary dictionary = (IDictionary) this.comp.GetType().GetField("CF_8d765dc5047c985ba4298a9abf20fa6e55cf798d_Corpsefuscated", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).GetValue((object) this.comp);
- if (dictionary == null)
- return;
- foreach (DictionaryEntry dictionaryEntry in dictionary)
- {
- if (dictionaryEntry.Key.ToString() == "footstepRange")
- {
- dictionary[dictionaryEntry.Key] = (object) -30;
- break;
- }
- }
- }
- public void ApplyIncomingDamageModification()
- {
- this.player = GameObject.Find("Player");
- if (!Object.op_Inequality((Object) this.player, (Object) null))
- return;
- this.comp = this.player.GetComponent<CF_da92fcabfd58f8b78e136d77571bcd5fa6b83ebd_Corpsefuscated>();
- if (!Object.op_Inequality((Object) this.comp, (Object) null))
- return;
- IDictionary dictionary = (IDictionary) this.comp.GetType().GetField("CF_8d765dc5047c985ba4298a9abf20fa6e55cf798d_Corpsefuscated", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).GetValue((object) this.comp);
- if (dictionary == null)
- return;
- List<object> objectList = new List<object>();
- int num = 0;
- foreach (DictionaryEntry dictionaryEntry in dictionary)
- {
- object key = dictionaryEntry.Key;
- object obj = dictionaryEntry.Value;
- if (key.ToString() == "incomingDamageMulti")
- objectList.Add(key);
- ++num;
- }
- foreach (object key in objectList)
- dictionary[key] = (object) 0.0f;
- }
- public void ApplyVisibilityRangeModification()
- {
- this.player = GameObject.Find("Player");
- if (!Object.op_Inequality((Object) this.player, (Object) null))
- return;
- this.comp = this.player.GetComponent<CF_da92fcabfd58f8b78e136d77571bcd5fa6b83ebd_Corpsefuscated>();
- if (!Object.op_Inequality((Object) this.comp, (Object) null))
- return;
- IDictionary dictionary = (IDictionary) this.comp.GetType().GetField("CF_8d765dc5047c985ba4298a9abf20fa6e55cf798d_Corpsefuscated", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).GetValue((object) this.comp);
- if (dictionary == null)
- return;
- foreach (DictionaryEntry dictionaryEntry in dictionary)
- {
- if (dictionaryEntry.Key.ToString() == "visibilityRange")
- {
- dictionary[dictionaryEntry.Key] = (object) -30.0;
- break;
- }
- }
- }
- public void ApplyInstantLootModification(bool state)
- {
- GameObject gameObject = GameObject.Find("Player");
- if (!Object.op_Inequality((Object) gameObject, (Object) null))
- return;
- Component component = gameObject.GetComponent("CF_3980daa940efe5d6b70f20f72753354dc6b9ad14_Corpsefuscated");
- if (!Object.op_Inequality((Object) component, (Object) null))
- return;
- float num = state ? 0.9f : 0.1f;
- component.GetType().GetField("CF_f4455094146c9892600b95431ba2cf48819dc675_Corpsefuscated", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)?.SetValue((object) component, (object) num);
- }
- private void Aimbot()
- {
- float radius = 150f;
- Vector2 screenCenter;
- // ISSUE: explicit constructor call
- ((Vector2) ref screenCenter).\u002Ector((float) Screen.width / 2f, (float) Screen.height / 2f);
- this.DrawFOVCircle(radius, screenCenter);
- GameObject closestEnemy = this.GetClosestEnemy();
- if (!Object.op_Inequality((Object) closestEnemy, (Object) null))
- return;
- Transform targetBone = this.GetTargetBone(closestEnemy.GetComponent<Animator>());
- if (!Object.op_Inequality((Object) targetBone, (Object) null))
- return;
- this.player.transform.rotation = Quaternion.Slerp(this.player.transform.rotation, Quaternion.LookRotation(Vector3.op_Subtraction(targetBone.position, this.player.transform.position)), Time.deltaTime * 10f);
- }
- private void DrawFOVCircle(float radius, Vector2 screenCenter)
- {
- ESPUtils.DrawCircle(Color.white, screenCenter, radius);
- }
- public void Aim()
- {
- if (Application.isPlaying)
- {
- GameObject closestEnemy = this.GetClosestEnemy();
- if (!Object.op_Inequality((Object) closestEnemy, (Object) null))
- return;
- Transform targetBone = this.GetTargetBone(closestEnemy.GetComponent<Animator>());
- if (!Object.op_Inequality((Object) targetBone, (Object) null))
- return;
- ((Component) this).transform.rotation = Quaternion.RotateTowards(((Component) this).transform.rotation, Quaternion.LookRotation(Vector3.op_Subtraction(targetBone.position, ((Component) this).transform.position)), this.aimSmooth * Time.deltaTime);
- }
- else
- {
- this.targetPosition = Vector3.op_Addition(((Component) this.cameraController).transform.position, Vector3.op_Multiply(((Component) this.cameraController).transform.forward, this.aimDistance));
- Transform transform = ((Component) this).transform;
- Vector3 vector3 = Vector3.op_Subtraction(this.targetPosition, ((Component) this).transform.position);
- Quaternion quaternion = Quaternion.op_Multiply(Quaternion.LookRotation(((Vector3) ref vector3).normalized, Vector3.up), Quaternion.Euler(this.rotationOffset));
- transform.rotation = quaternion;
- }
- }
- private GameObject GetClosestEnemy()
- {
- GameObject closestEnemy = (GameObject) null;
- float num1 = this.maxAimbotDistance;
- foreach (CF_60f299bc78d66f622f93c69da2a0e4195c7775c0_Corpsefuscated obj in Main.EnemyBase)
- {
- if (Object.op_Inequality((Object) obj, (Object) null))
- {
- float num2 = Vector3.Distance(((Component) this).transform.position, ((Component) obj).transform.position);
- if ((double) num2 < (double) num1)
- {
- num1 = num2;
- closestEnemy = ((Component) obj).gameObject;
- }
- }
- }
- return closestEnemy;
- }
- private Transform GetTargetBone(Animator animator)
- {
- Transform boneTransform = animator.GetBoneTransform((HumanBodyBones) 10);
- if (Object.op_Equality((Object) boneTransform, (Object) null))
- boneTransform = ((Component) animator).transform.Find("Geo/Zombie_Parts/Head");
- return boneTransform;
- }
- public void MouseMove(Vector3 screenPos)
- {
- float num1 = 10f;
- float num2 = (screenPos.x - (float) (Screen.width / 2)) / num1;
- float num3 = (screenPos.y - (float) (Screen.height / 2)) / num1;
- Cursor.lockState = (CursorLockMode) 1;
- Cursor.visible = false;
- Vector3 vector3;
- // ISSUE: explicit constructor call
- ((Vector3) ref vector3).\u002Ector(num2, num3, 0.0f);
- Cursor.SetCursor((Texture2D) null, Vector2.op_Implicit(vector3), (CursorMode) 0);
- }
- private void AimAtClosestEnemyHead()
- {
- GameObject[] gameObjectsWithTag = GameObject.FindGameObjectsWithTag("Enemy");
- GameObject enemy = (GameObject) null;
- float num1 = this.maxAimbotDistance;
- foreach (GameObject gameObject in gameObjectsWithTag)
- {
- float num2 = Vector3.Distance(this.player.transform.position, gameObject.transform.position);
- if ((double) num2 < (double) num1)
- {
- enemy = gameObject;
- num1 = num2;
- }
- }
- if (!Object.op_Inequality((Object) enemy, (Object) null))
- return;
- Transform headTransform = this.GetHeadTransform(enemy);
- if (!Object.op_Inequality((Object) headTransform, (Object) null))
- return;
- ((Component) this.cameraController).transform.rotation = Quaternion.Slerp(((Component) this.cameraController).transform.rotation, Quaternion.LookRotation(Vector3.op_Subtraction(headTransform.position, ((Component) this.cameraController).transform.position)), Time.deltaTime * this.aimSmooth);
- }
- private Transform GetHeadTransform(GameObject enemy)
- {
- Transform transform1 = enemy.transform.Find("Geo");
- if (Object.op_Inequality((Object) transform1, (Object) null))
- {
- Transform transform2 = transform1.Find("Zombie_Parts");
- if (Object.op_Inequality((Object) transform2, (Object) null))
- return transform2.Find("Head");
- }
- return (Transform) null;
- }
- public void ToggleNoClip()
- {
- if (Object.op_Equality((Object) this.player, (Object) null))
- {
- this.player = GameObject.Find("Player");
- if (Object.op_Inequality((Object) this.player, (Object) null))
- this.characterController = this.player.GetComponent<CharacterController>();
- }
- if (!Object.op_Inequality((Object) this.player, (Object) null) || !Object.op_Inequality((Object) this.characterController, (Object) null))
- return;
- if (this.isNoClipEnabled)
- ((Collider) this.characterController).enabled = false;
- else
- ((Collider) this.characterController).enabled = true;
- }
- public void ApplyHeadChamsToZombies()
- {
- GameObject[] gameObjectsWithTag = GameObject.FindGameObjectsWithTag("Enemy");
- if (gameObjectsWithTag.Length == 0)
- return;
- for (int index = 0; index < gameObjectsWithTag.Length; ++index)
- {
- GameObject gameObject = gameObjectsWithTag[index];
- string name = ((Object) gameObject).name;
- Transform transform = gameObject.transform;
- Transform headInHierarchy = this.FindHeadInHierarchy(gameObject.transform);
- if (Object.op_Inequality((Object) headInHierarchy, (Object) null))
- {
- Renderer component = ((Component) headInHierarchy).GetComponent<Renderer>();
- if (Object.op_Inequality((Object) component, (Object) null))
- component.material = Main.headChamsMaterial;
- }
- }
- }
- private Transform FindHeadInHierarchy(Transform enemyTransform)
- {
- foreach (Transform enemyTransform1 in enemyTransform)
- {
- if (((Object) enemyTransform1).name.ToLower().Contains("head"))
- return enemyTransform1;
- Transform headInHierarchy = this.FindHeadInHierarchy(enemyTransform1);
- if (Object.op_Inequality((Object) headInHierarchy, (Object) null))
- return headInHierarchy;
- }
- return (Transform) null;
- }
- public void InflateWeaponColliders(float radius)
- {
- foreach (CF_2b9256c0fb7ef387d0256374eb46b0b30bf3a47e_Corpsefuscated obj1 in Object.FindObjectsOfType<CF_2b9256c0fb7ef387d0256374eb46b0b30bf3a47e_Corpsefuscated>())
- {
- FieldInfo field1 = obj1.GetType().GetField("CF_378dccbb010019c8067cf0ba0e3fd321c60a7393_Corpsefuscated", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
- if ((object) field1 != null && field1.GetValue((object) obj1) is IEnumerable<object> objects)
- {
- foreach (object obj2 in objects)
- {
- FieldInfo field2 = obj2.GetType().GetField("weapon", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
- if ((object) field2 != null)
- {
- object obj3 = field2.GetValue(obj2);
- if (obj3 != null)
- {
- FieldInfo field3 = obj3.GetType().GetField("colliders", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
- if ((object) field3 != null && field3.GetValue(obj3) is IEnumerable<Collider> colliders)
- {
- foreach (Collider collider in colliders)
- {
- if (collider is SphereCollider sphereCollider)
- sphereCollider.radius = radius;
- }
- }
- }
- }
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment