Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Reflection;
- using System.Text.RegularExpressions;
- using UnityEngine;
- namespace DeadFrontier2
- {
- // Token: 0x02000003 RID: 3
- internal class Main : MonoBehaviour
- {
- // Token: 0x17000001 RID: 1
- // (get) Token: 0x0600000E RID: 14 RVA: 0x00002082 File Offset: 0x00000282
- public static Color TestColor
- {
- get
- {
- return new Color(1f, 0f, 1f, 1f);
- }
- }
- // Token: 0x0600000F RID: 15 RVA: 0x00003410 File Offset: 0x00001610
- private void SaveConfig()
- {
- PlayerPrefs.SetInt("TransformMovement", (this.TransformMovement > false) ? 1 : 0);
- PlayerPrefs.SetInt("OHK", (this.OHK > false) ? 1 : 0);
- PlayerPrefs.SetInt("MobVac", (this.MobVac > false) ? 1 : 0);
- PlayerPrefs.SetInt("ConVac", (this.ConVac > false) ? 1 : 0);
- PlayerPrefs.SetInt("Playeresp", (this.Playeresp > false) ? 1 : 0);
- PlayerPrefs.SetInt("Enemyesp", (this.Enemyesp > false) ? 1 : 0);
- PlayerPrefs.SetInt("Containeresp", (this.Containeresp > false) ? 1 : 0);
- PlayerPrefs.SetInt("Chamsesp", (this.Chamsesp > false) ? 1 : 0);
- PlayerPrefs.Save();
- Debug.Log("Config saved.");
- }
- // Token: 0x06000010 RID: 16 RVA: 0x000034C4 File Offset: 0x000016C4
- private void LoadConfig()
- {
- if (PlayerPrefs.HasKey("TransformMovement"))
- {
- 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("Config loaded.");
- }
- }
- // Token: 0x06000011 RID: 17 RVA: 0x00003584 File Offset: 0x00001784
- private void DrawMenu(int windowID)
- {
- GUILayout.BeginHorizontal(new GUILayoutOption[0]);
- for (int i = 0; i < this.tabNames.Length; i++)
- {
- if (GUILayout.Toggle(this.selectedTab == i, this.tabNames[i], "Button", new GUILayoutOption[] { GUILayout.ExpandWidth(true) }))
- {
- this.selectedTab = i;
- }
- }
- 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, "ContVac(Risky)", new GUILayoutOption[0]);
- this.ShowHealthbar = GUILayout.Toggle(this.ShowHealthbar, "Show HP", 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, "InstantLoot", new GUILayoutOption[0]);
- Main.weaponColliders = GUILayout.Toggle(Main.weaponColliders, "Infinite Range", 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;
- case 2:
- GUILayout.BeginVertical(GUI.skin.box, new GUILayoutOption[0]);
- GUILayout.BeginHorizontal(new GUILayoutOption[0]);
- GUILayout.BeginVertical(new GUILayoutOption[0]);
- if (GUILayout.Button("Police Station", new GUILayoutOption[0]) && this.player != null)
- {
- this.player.transform.position = new Vector3(-949.4828f, 0.068f, 17.1117f);
- }
- if (GUILayout.Button("Lvl50 Archbrook", new GUILayoutOption[0]) && this.player != null)
- {
- this.player.transform.position = new Vector3(906.3092f, 0.01f, -23.9571f);
- }
- GUILayout.EndVertical();
- GUILayout.Space(10f);
- GUILayout.BeginVertical(new GUILayoutOption[0]);
- GUILayout.EndVertical();
- GUILayout.EndHorizontal();
- GUILayout.EndVertical();
- break;
- }
- GUILayout.BeginArea(new Rect(10f, this.menuRect.height - 30f, 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();
- }
- // Token: 0x06000012 RID: 18 RVA: 0x000039E8 File Offset: 0x00001BE8
- public static List<Transform> GetAllBones(Animator a)
- {
- return new List<Transform>
- {
- a.GetBoneTransform(HumanBodyBones.Head),
- a.GetBoneTransform(HumanBodyBones.Neck),
- a.GetBoneTransform(HumanBodyBones.Spine),
- a.GetBoneTransform(HumanBodyBones.Hips),
- a.GetBoneTransform(HumanBodyBones.LeftShoulder),
- a.GetBoneTransform(HumanBodyBones.LeftUpperArm),
- a.GetBoneTransform(HumanBodyBones.LeftLowerArm),
- a.GetBoneTransform(HumanBodyBones.LeftHand),
- a.GetBoneTransform(HumanBodyBones.RightShoulder),
- a.GetBoneTransform(HumanBodyBones.RightUpperArm),
- a.GetBoneTransform(HumanBodyBones.RightLowerArm),
- a.GetBoneTransform(HumanBodyBones.RightHand),
- a.GetBoneTransform(HumanBodyBones.LeftUpperLeg),
- a.GetBoneTransform(HumanBodyBones.LeftLowerLeg),
- a.GetBoneTransform(HumanBodyBones.LeftFoot),
- a.GetBoneTransform(HumanBodyBones.RightUpperLeg),
- a.GetBoneTransform(HumanBodyBones.RightLowerLeg),
- a.GetBoneTransform(HumanBodyBones.RightFoot)
- };
- }
- // Token: 0x06000013 RID: 19 RVA: 0x00003AF0 File Offset: 0x00001CF0
- 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);
- }
- // Token: 0x06000014 RID: 20 RVA: 0x00004130 File Offset: 0x00002330
- 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);
- }
- // Token: 0x06000015 RID: 21 RVA: 0x000041B0 File Offset: 0x000023B0
- public void OnGUI()
- {
- if (this.showMenu)
- {
- GUI.backgroundColor = Color.black;
- this.menuRect = GUI.Window(0, this.menuRect, new GUI.WindowFunction(this.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_b01305f761ea65b017350a752dbb3a7860aa790e_Corpsefuscated cf_b01305f761ea65b017350a752dbb3a7860aa790e_Corpsefuscated in Main.EnemyBase)
- {
- Vector3 vector = Main.cam.WorldToScreenPoint(cf_b01305f761ea65b017350a752dbb3a7860aa790e_Corpsefuscated.transform.position);
- Animator component = cf_b01305f761ea65b017350a752dbb3a7860aa790e_Corpsefuscated.GetComponent<Animator>();
- if (ESPUtils.IsOnScreen(vector) && cf_b01305f761ea65b017350a752dbb3a7860aa790e_Corpsefuscated.health > 0f && this.Enemyesp)
- {
- ESPUtils.DrawAllBones(Main.GetAllBones(component), ESPUtils.GetHealthColour(cf_b01305f761ea65b017350a752dbb3a7860aa790e_Corpsefuscated.health, 99999f));
- Vector2 vector2 = new Vector2(vector.x, (float)Screen.height - vector.y + 8f);
- string text = "Zombie\nHP: ";
- CF_7ce4616aaf704c97b51300c32faee12c71db29d1_Corpsefuscated health = cf_b01305f761ea65b017350a752dbb3a7860aa790e_Corpsefuscated.health;
- ESPUtils.DrawString(vector2, text + health.ToString() + "\n", Color.red, true, 12, FontStyle.Bold, 1);
- }
- }
- }
- if (this.Playeresp)
- {
- foreach (CF_f9ea1dc1978da4f019f187f7ab2f7f55ae4ab798_Corpsefuscated cf_f9ea1dc1978da4f019f187f7ab2f7f55ae4ab798_Corpsefuscated in Main.Playerst)
- {
- Vector3 vector3 = Main.cam.WorldToScreenPoint(cf_f9ea1dc1978da4f019f187f7ab2f7f55ae4ab798_Corpsefuscated.transform.position);
- Animator component2 = cf_f9ea1dc1978da4f019f187f7ab2f7f55ae4ab798_Corpsefuscated.GetComponent<Animator>();
- if (ESPUtils.IsOnScreen(vector3) && this.Playeresp)
- {
- ESPUtils.DrawAllBones(Main.GetAllBones(component2), Color.green);
- ESPUtils.DrawString(new Vector2(vector3.x, (float)Screen.height - vector3.y + 8f), cf_f9ea1dc1978da4f019f187f7ab2f7f55ae4ab798_Corpsefuscated.characterName + "\nCharID: " + cf_f9ea1dc1978da4f019f187f7ab2f7f55ae4ab798_Corpsefuscated.characterID.ToString(), Color.green, true, 12, FontStyle.Bold, 1);
- }
- }
- }
- if (this.Containeresp)
- {
- foreach (CF_a1b81d72fa50e48f12bfd55dd95dc7e4ea230166_Corpsefuscated cf_a1b81d72fa50e48f12bfd55dd95dc7e4ea230166_Corpsefuscated in Main.ContainerBase)
- {
- Vector3 vector4 = Main.cam.WorldToScreenPoint(cf_a1b81d72fa50e48f12bfd55dd95dc7e4ea230166_Corpsefuscated.transform.position);
- if (ESPUtils.IsOnScreen(vector4) && cf_a1b81d72fa50e48f12bfd55dd95dc7e4ea230166_Corpsefuscated.requireLootAllowed && this.Containeresp)
- {
- ESPUtils.DrawString(new Vector2(vector4.x, (float)Screen.height - vector4.y + 8f), Main.GetLootContainerNames(cf_a1b81d72fa50e48f12bfd55dd95dc7e4ea230166_Corpsefuscated.gameObject.name) + "\n", Color.cyan, true, 12, FontStyle.Bold, 1);
- }
- }
- }
- if (this.DoorEsp)
- {
- foreach (Transform transform in Main.Offices)
- {
- Vector3 vector5 = Main.cam.WorldToScreenPoint(transform.position);
- if (ESPUtils.IsOnScreen(vector5))
- {
- ESPUtils.DrawString(new Vector2(vector5.x, (float)Screen.height - vector5.y + 8f), Main.GetDoorNames(transform.gameObject.name) + "\n", Color.yellow, true, 12, FontStyle.Bold, 1);
- }
- }
- }
- }
- // Token: 0x06000016 RID: 22 RVA: 0x00004594 File Offset: 0x00002794
- private void Start()
- {
- Main.headChamsMaterial = new Material(Shader.Find("Hidden/Internal-Colored"))
- {
- hideFlags = (HideFlags.HideInHierarchy | HideFlags.DontSaveInEditor)
- };
- 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", 0f);
- Main.headChamsMaterial.SetFloat("_Metallic", 0f);
- }
- // Token: 0x06000017 RID: 23
- public void Update()
- {
- if (Input.GetKeyDown(KeyCode.Insert))
- {
- this.showMenu = !this.showMenu;
- }
- this.natNextUpdateTime += Time.deltaTime;
- if (this.natNextUpdateTime >= 2f)
- {
- Main.ContainerBase = global::UnityEngine.Object.FindObjectsOfType<CF_a1b81d72fa50e48f12bfd55dd95dc7e4ea230166_Corpsefuscated>().ToList<CF_a1b81d72fa50e48f12bfd55dd95dc7e4ea230166_Corpsefuscated>();
- Main.EnemyBase = global::UnityEngine.Object.FindObjectsOfType<CF_b01305f761ea65b017350a752dbb3a7860aa790e_Corpsefuscated>().ToList<CF_b01305f761ea65b017350a752dbb3a7860aa790e_Corpsefuscated>();
- Main.Playerst = global::UnityEngine.Object.FindObjectsOfType<CF_f9ea1dc1978da4f019f187f7ab2f7f55ae4ab798_Corpsefuscated>().ToList<CF_f9ea1dc1978da4f019f187f7ab2f7f55ae4ab798_Corpsefuscated>();
- Main.PlayerHealthbar = global::UnityEngine.Object.FindObjectsOfType<CF_1382b9b6b9205bb038b69eeb031616c3d99b7a69_Corpsefuscated>().ToList<CF_1382b9b6b9205bb038b69eeb031616c3d99b7a69_Corpsefuscated>();
- Main.Offices = (from t in global::UnityEngine.Object.FindObjectsOfType<Transform>()
- where this.doorKeywords.Any((string keyword) => t.gameObject.name.ToLower().Contains(keyword))
- select t).ToList<Transform>();
- if (this.Chamsesp)
- {
- this.ApplyHeadChamsToZombies();
- }
- this.natNextUpdateTime = 0f;
- }
- if (Input.GetMouseButton(1) && this.aimbotEnabled)
- {
- this.AimAtClosestEnemyHead();
- }
- if (Input.GetKeyDown(KeyCode.F10))
- {
- this.DumpAllGameObjects();
- }
- if (Main.weaponColliders != this.weaponCollidersLastState)
- {
- if (Main.weaponColliders)
- {
- this.InflateWeaponColliders(999999f);
- }
- else
- {
- this.InflateWeaponColliders(0.6f);
- }
- this.weaponCollidersLastState = Main.weaponColliders;
- }
- if (Main.freezePlayer && this.player != null)
- {
- if (this.frozenPosition == Vector3.zero)
- {
- this.frozenPosition = this.player.transform.position;
- }
- this.player.transform.position = this.frozenPosition;
- }
- else
- {
- this.frozenPosition = Vector3.zero;
- }
- if (this.player == null)
- {
- this.player = GameObject.Find("Player");
- if (this.player != null)
- {
- this.characterController = this.player.GetComponent<CharacterController>();
- }
- }
- if (this.player != null && this.characterController != null)
- {
- if (this.isNoClipEnabled)
- {
- this.characterController.enabled = false;
- }
- else
- {
- this.characterController.enabled = true;
- }
- }
- if (this.ShowHealthbar)
- {
- foreach (CF_1382b9b6b9205bb038b69eeb031616c3d99b7a69_Corpsefuscated cf_1382b9b6b9205bb038b69eeb031616c3d99b7a69_Corpsefuscated in Main.PlayerHealthbar)
- {
- cf_1382b9b6b9205bb038b69eeb031616c3d99b7a69_Corpsefuscated.compassArrow.gameObject.SetActive(true);
- cf_1382b9b6b9205bb038b69eeb031616c3d99b7a69_Corpsefuscated.statusText.gameObject.SetActive(true);
- cf_1382b9b6b9205bb038b69eeb031616c3d99b7a69_Corpsefuscated.characterNameTextTemplate.gameObject.SetActive(true);
- cf_1382b9b6b9205bb038b69eeb031616c3d99b7a69_Corpsefuscated.interactionText.gameObject.SetActive(true);
- }
- }
- if (this.TransformMovement)
- {
- if (Input.GetKey(KeyCode.LeftControl))
- {
- CF_d805f451e3be3065db4f93b7f501851780f4df27_Corpsefuscated.player.transform.position += 1.25f * Camera.main.transform.forward;
- }
- if (Input.GetKeyDown(KeyCode.UpArrow))
- {
- CF_d805f451e3be3065db4f93b7f501851780f4df27_Corpsefuscated.player.transform.position += new Vector3(0f, 5f, 0f);
- }
- if (Input.GetKeyDown(KeyCode.DownArrow))
- {
- CF_d805f451e3be3065db4f93b7f501851780f4df27_Corpsefuscated.player.transform.position += new Vector3(0f, -5f, 0f);
- }
- }
- if (this.OHK)
- {
- foreach (CF_b01305f761ea65b017350a752dbb3a7860aa790e_Corpsefuscated cf_b01305f761ea65b017350a752dbb3a7860aa790e_Corpsefuscated in Main.EnemyBase)
- {
- if (cf_b01305f761ea65b017350a752dbb3a7860aa790e_Corpsefuscated.health > 0f)
- {
- cf_b01305f761ea65b017350a752dbb3a7860aa790e_Corpsefuscated.health = 0.1f;
- }
- }
- }
- if (this.MobVac)
- {
- foreach (CF_b01305f761ea65b017350a752dbb3a7860aa790e_Corpsefuscated cf_b01305f761ea65b017350a752dbb3a7860aa790e_Corpsefuscated2 in Main.EnemyBase)
- {
- cf_b01305f761ea65b017350a752dbb3a7860aa790e_Corpsefuscated2.transform.position = new Vector3(CF_d805f451e3be3065db4f93b7f501851780f4df27_Corpsefuscated.player.transform.position.x, CF_d805f451e3be3065db4f93b7f501851780f4df27_Corpsefuscated.player.transform.position.y, CF_d805f451e3be3065db4f93b7f501851780f4df27_Corpsefuscated.player.transform.position.z + 3f);
- }
- }
- if (this.ConVac)
- {
- foreach (CF_a1b81d72fa50e48f12bfd55dd95dc7e4ea230166_Corpsefuscated cf_a1b81d72fa50e48f12bfd55dd95dc7e4ea230166_Corpsefuscated in Main.ContainerBase)
- {
- if (cf_a1b81d72fa50e48f12bfd55dd95dc7e4ea230166_Corpsefuscated.requireLootAllowed)
- {
- cf_a1b81d72fa50e48f12bfd55dd95dc7e4ea230166_Corpsefuscated.transform.position = new Vector3(CF_d805f451e3be3065db4f93b7f501851780f4df27_Corpsefuscated.player.transform.position.x, CF_d805f451e3be3065db4f93b7f501851780f4df27_Corpsefuscated.player.transform.position.y, CF_d805f451e3be3065db4f93b7f501851780f4df27_Corpsefuscated.player.transform.position.z + 3f);
- }
- }
- }
- }
- // Token: 0x06000018 RID: 24 RVA: 0x00004B2C File Offset: 0x00002D2C
- public void ApplyFootstepRangeModification()
- {
- this.player = GameObject.Find("Player");
- if (this.player != null)
- {
- this.comp = this.player.GetComponent<CF_8e13141191f104f691ee62491ff28eb32caf3c96_Corpsefuscated>();
- if (this.comp != null)
- {
- IDictionary dictionary = (IDictionary)this.comp.GetType().GetField("CF_ca685e3e6a3d252da431bba0ea6d1344343ccfcb_Corpsefuscated", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).GetValue(this.comp);
- if (dictionary != null)
- {
- foreach (object obj in dictionary)
- {
- DictionaryEntry dictionaryEntry = (DictionaryEntry)obj;
- if (dictionaryEntry.Key.ToString() == "footstepRange")
- {
- dictionary[dictionaryEntry.Key] = -30;
- break;
- }
- }
- }
- }
- }
- }
- // Token: 0x06000019 RID: 25 RVA: 0x00004C18 File Offset: 0x00002E18
- public void ApplyIncomingDamageModification()
- {
- this.player = GameObject.Find("Player");
- if (this.player != null)
- {
- this.comp = this.player.GetComponent<CF_8e13141191f104f691ee62491ff28eb32caf3c96_Corpsefuscated>();
- if (this.comp != null)
- {
- IDictionary dictionary = (IDictionary)this.comp.GetType().GetField("CF_56ec253bae376ae9a857c68158e8621dabd5ff8e_Corpsefuscated", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).GetValue(this.comp);
- if (dictionary != null)
- {
- List<object> list = new List<object>();
- int num = 0;
- foreach (object obj in dictionary)
- {
- DictionaryEntry dictionaryEntry = (DictionaryEntry)obj;
- object key = dictionaryEntry.Key;
- object value = dictionaryEntry.Value;
- if (key.ToString() == "incomingDamageMulti")
- {
- list.Add(key);
- }
- num++;
- }
- foreach (object obj2 in list)
- {
- dictionary[obj2] = 0f;
- }
- }
- }
- }
- }
- // Token: 0x0600001A RID: 26 RVA: 0x00004D5C File Offset: 0x00002F5C
- public void ApplyVisibilityRangeModification()
- {
- this.player = GameObject.Find("Player");
- if (this.player != null)
- {
- this.comp = this.player.GetComponent<CF_8e13141191f104f691ee62491ff28eb32caf3c96_Corpsefuscated>();
- if (this.comp != null)
- {
- IDictionary dictionary = (IDictionary)this.comp.GetType().GetField("CF_56ec253bae376ae9a857c68158e8621dabd5ff8e_Corpsefuscated", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).GetValue(this.comp);
- if (dictionary != null)
- {
- foreach (object obj in dictionary)
- {
- DictionaryEntry dictionaryEntry = (DictionaryEntry)obj;
- if (dictionaryEntry.Key.ToString() == "visibilityRange")
- {
- dictionary[dictionaryEntry.Key] = -30.0;
- break;
- }
- }
- }
- }
- }
- }
- // Token: 0x0600001B RID: 27 RVA: 0x00004E4C File Offset: 0x0000304C
- public void ApplyInstantLootModification(bool state)
- {
- GameObject gameObject = GameObject.Find("Player");
- if (gameObject != null)
- {
- Component component = gameObject.GetComponent("CF_2e290af84f0d934a5613892477e5e1bc52e28378_Corpsefuscated");
- if (component != null)
- {
- float num = (state ? 3f : 0.1f);
- FieldInfo field = component.GetType().GetField("CF_56ec253bae376ae9a857c68158e8621dabd5ff8e_Corpsefuscated", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
- if (field != null)
- {
- field.SetValue(component, num);
- }
- }
- }
- }
- // Token: 0x0600001C RID: 28 RVA: 0x00004EB8 File Offset: 0x000030B8
- private void Aimbot()
- {
- float num = 150f;
- Vector2 vector = new Vector2((float)Screen.width / 2f, (float)Screen.height / 2f);
- this.DrawFOVCircle(num, vector);
- GameObject closestEnemy = this.GetClosestEnemy();
- if (closestEnemy != null)
- {
- Animator component = closestEnemy.GetComponent<Animator>();
- Transform targetBone = this.GetTargetBone(component);
- if (targetBone != null)
- {
- Quaternion quaternion = Quaternion.LookRotation(targetBone.position - this.player.transform.position);
- this.player.transform.rotation = Quaternion.Slerp(this.player.transform.rotation, quaternion, Time.deltaTime * 10f);
- }
- }
- }
- // Token: 0x0600001D RID: 29 RVA: 0x0000209D File Offset: 0x0000029D
- private void DrawFOVCircle(float radius, Vector2 screenCenter)
- {
- ESPUtils.DrawCircle(Color.white, screenCenter, radius);
- }
- // Token: 0x0600001E RID: 30 RVA: 0x00004F74 File Offset: 0x00003174
- public void Aim()
- {
- if (Application.isPlaying)
- {
- GameObject closestEnemy = this.GetClosestEnemy();
- if (closestEnemy != null)
- {
- Animator component = closestEnemy.GetComponent<Animator>();
- Transform targetBone = this.GetTargetBone(component);
- if (targetBone != null)
- {
- Quaternion quaternion = Quaternion.LookRotation(targetBone.position - base.transform.position);
- base.transform.rotation = Quaternion.RotateTowards(base.transform.rotation, quaternion, this.aimSmooth * Time.deltaTime);
- return;
- }
- }
- }
- else
- {
- this.targetPosition = this.cameraController.transform.position + this.cameraController.transform.forward * this.aimDistance;
- base.transform.rotation = Quaternion.LookRotation((this.targetPosition - base.transform.position).normalized, Vector3.up) * Quaternion.Euler(this.rotationOffset);
- }
- }
- // Token: 0x0600001F RID: 31 RVA: 0x00005078 File Offset: 0x00003278
- private GameObject GetClosestEnemy()
- {
- GameObject gameObject = null;
- float num = this.maxAimbotDistance;
- foreach (CF_b01305f761ea65b017350a752dbb3a7860aa790e_Corpsefuscated cf_b01305f761ea65b017350a752dbb3a7860aa790e_Corpsefuscated in Main.EnemyBase)
- {
- if (cf_b01305f761ea65b017350a752dbb3a7860aa790e_Corpsefuscated != null)
- {
- float num2 = Vector3.Distance(base.transform.position, cf_b01305f761ea65b017350a752dbb3a7860aa790e_Corpsefuscated.transform.position);
- if (num2 < num)
- {
- num = num2;
- gameObject = cf_b01305f761ea65b017350a752dbb3a7860aa790e_Corpsefuscated.gameObject;
- }
- }
- }
- return gameObject;
- }
- // Token: 0x06000020 RID: 32 RVA: 0x00005104 File Offset: 0x00003304
- private Transform GetTargetBone(Animator animator)
- {
- Transform transform = animator.GetBoneTransform(HumanBodyBones.Head);
- if (transform == null)
- {
- transform = animator.transform.Find("Geo/Zombie_Parts/Head");
- }
- return transform;
- }
- // Token: 0x06000021 RID: 33 RVA: 0x00005138 File Offset: 0x00003338
- public void MouseMove(Vector3 screenPos)
- {
- float num = 10f;
- float num2 = (screenPos.x - (float)(Screen.width / 2)) / num;
- float num3 = (screenPos.y - (float)(Screen.height / 2)) / num;
- Cursor.lockState = CursorLockMode.Locked;
- Cursor.visible = false;
- Vector3 vector = new Vector3(num2, num3, 0f);
- Cursor.SetCursor(null, vector, CursorMode.Auto);
- }
- // Token: 0x06000022 RID: 34 RVA: 0x00005198 File Offset: 0x00003398
- private void AimAtClosestEnemyHead()
- {
- GameObject[] array = GameObject.FindGameObjectsWithTag("Enemy");
- GameObject gameObject = null;
- float num = this.maxAimbotDistance;
- foreach (GameObject gameObject2 in array)
- {
- float num2 = Vector3.Distance(this.player.transform.position, gameObject2.transform.position);
- if (num2 < num)
- {
- gameObject = gameObject2;
- num = num2;
- }
- }
- if (gameObject != null)
- {
- Transform headTransform = this.GetHeadTransform(gameObject);
- if (headTransform != null)
- {
- Quaternion quaternion = Quaternion.LookRotation(headTransform.position - this.cameraController.transform.position);
- this.cameraController.transform.rotation = Quaternion.Slerp(this.cameraController.transform.rotation, quaternion, Time.deltaTime * this.aimSmooth);
- }
- }
- }
- // Token: 0x06000023 RID: 35 RVA: 0x0000526C File Offset: 0x0000346C
- private Transform GetHeadTransform(GameObject enemy)
- {
- Transform transform = enemy.transform.Find("Geo");
- if (transform != null)
- {
- Transform transform2 = transform.Find("Zombie_Parts");
- if (transform2 != null)
- {
- return transform2.Find("Head");
- }
- }
- return null;
- }
- // Token: 0x06000024 RID: 36 RVA: 0x000052B8 File Offset: 0x000034B8
- public void ToggleNoClip()
- {
- if (this.player == null)
- {
- this.player = GameObject.Find("Player");
- if (this.player != null)
- {
- this.characterController = this.player.GetComponent<CharacterController>();
- }
- }
- if (this.player != null && this.characterController != null)
- {
- if (this.isNoClipEnabled)
- {
- this.characterController.enabled = false;
- return;
- }
- this.characterController.enabled = true;
- }
- }
- // Token: 0x06000025 RID: 37 RVA: 0x00005340 File Offset: 0x00003540
- public void ApplyHeadChamsToZombies()
- {
- GameObject[] array = GameObject.FindGameObjectsWithTag("Enemy");
- if (array.Length != 0)
- {
- foreach (GameObject gameObject in array)
- {
- string name = gameObject.name;
- Transform transform = gameObject.transform;
- Transform transform2 = this.FindHeadInHierarchy(gameObject.transform);
- if (transform2 != null)
- {
- Renderer component = transform2.GetComponent<Renderer>();
- if (component != null)
- {
- component.material = Main.headChamsMaterial;
- }
- }
- }
- }
- }
- // Token: 0x06000026 RID: 38 RVA: 0x000053B0 File Offset: 0x000035B0
- private Transform FindHeadInHierarchy(Transform enemyTransform)
- {
- foreach (object obj in enemyTransform)
- {
- Transform transform = (Transform)obj;
- if (transform.name.ToLower().Contains("head"))
- {
- return transform;
- }
- Transform transform2 = this.FindHeadInHierarchy(transform);
- if (transform2 != null)
- {
- return transform2;
- }
- }
- return null;
- }
- // Token: 0x06000027 RID: 39 RVA: 0x00005434 File Offset: 0x00003634
- public void InflateWeaponColliders(float radius)
- {
- foreach (CF_c241fb54e59af74ac88dff61a4ae4ee48265d031_Corpsefuscated cf_c241fb54e59af74ac88dff61a4ae4ee48265d031_Corpsefuscated in global::UnityEngine.Object.FindObjectsOfType<CF_c241fb54e59af74ac88dff61a4ae4ee48265d031_Corpsefuscated>())
- {
- foreach (FieldInfo fieldInfo in cf_c241fb54e59af74ac88dff61a4ae4ee48265d031_Corpsefuscated.GetType().GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic))
- {
- if (typeof(IEnumerable<Collider>).IsAssignableFrom(fieldInfo.FieldType))
- {
- IEnumerable<Collider> enumerable = fieldInfo.GetValue(cf_c241fb54e59af74ac88dff61a4ae4ee48265d031_Corpsefuscated) as IEnumerable<Collider>;
- if (enumerable != null)
- {
- foreach (Collider collider in enumerable)
- {
- SphereCollider sphereCollider = collider as SphereCollider;
- if (sphereCollider != null)
- {
- sphereCollider.radius = radius;
- if (!string.IsNullOrEmpty(sphereCollider.name))
- {
- string name = sphereCollider.name;
- }
- }
- }
- }
- }
- }
- }
- }
- // Token: 0x06000028 RID: 40 RVA: 0x00005518 File Offset: 0x00003718
- private void DumpAllGameObjects()
- {
- using (StreamWriter streamWriter = new StreamWriter("GameObjectDump.txt"))
- {
- foreach (GameObject gameObject in global::UnityEngine.Object.FindObjectsOfType<GameObject>())
- {
- string fullPath = this.GetFullPath(gameObject.transform);
- streamWriter.WriteLine("[GO] " + gameObject.name + " | Path: " + fullPath);
- }
- }
- Debug.Log("✅ Dumped all GameObjects to GameObjectDump.txt");
- }
- // Token: 0x06000029 RID: 41 RVA: 0x0000559C File Offset: 0x0000379C
- private string GetFullPath(Transform current)
- {
- string text = "/" + current.name;
- while (current.parent != null)
- {
- current = current.parent;
- text = "/" + current.name + text;
- }
- return text;
- }
- // Token: 0x04000008 RID: 8
- private bool TransformMovement;
- // Token: 0x04000009 RID: 9
- private bool OHK;
- // Token: 0x0400000A RID: 10
- private bool Enemyesp = true;
- // Token: 0x0400000B RID: 11
- private bool Containeresp;
- // Token: 0x0400000C RID: 12
- private bool Playeresp;
- // Token: 0x0400000D RID: 13
- private bool Chamsesp;
- // Token: 0x0400000E RID: 14
- private bool MobVac;
- // Token: 0x0400000F RID: 15
- private bool ConVac;
- // Token: 0x04000010 RID: 16
- private bool ShowHealthbar;
- // Token: 0x04000011 RID: 17
- private GameObject player;
- // Token: 0x04000012 RID: 18
- private CF_8e13141191f104f691ee62491ff28eb32caf3c96_Corpsefuscated comp;
- // Token: 0x04000013 RID: 19
- private static bool footstepRangeActive = false;
- // Token: 0x04000014 RID: 20
- private static bool incomingDamageActive = false;
- // Token: 0x04000015 RID: 21
- private static bool visibilityRangeActive = false;
- // Token: 0x04000016 RID: 22
- private static bool espActive = false;
- // Token: 0x04000017 RID: 23
- private static bool isVisible = true;
- // Token: 0x04000018 RID: 24
- public static bool enemyEspActive = false;
- // Token: 0x04000019 RID: 25
- public static bool playerEspActive = false;
- // Token: 0x0400001A RID: 26
- public static bool npcEspActive = false;
- // Token: 0x0400001B RID: 27
- public static bool instantLootActive = false;
- // Token: 0x0400001C RID: 28
- public bool aimbotEnabled;
- // Token: 0x0400001D RID: 29
- public float maxAimbotDistance = 15550f;
- // Token: 0x0400001E RID: 30
- public Camera cameraController;
- // Token: 0x0400001F RID: 31
- public float aimSmooth = 10f;
- // Token: 0x04000020 RID: 32
- public float aimDistance = 50f;
- // Token: 0x04000021 RID: 33
- public Vector3 rotationOffset = Vector3.zero;
- // Token: 0x04000022 RID: 34
- public bool DoorEsp;
- // Token: 0x04000023 RID: 35
- private Vector3 targetPosition;
- // Token: 0x04000024 RID: 36
- private bool isNoClipEnabled;
- // Token: 0x04000025 RID: 37
- private CharacterController characterController;
- // Token: 0x04000026 RID: 38
- private Dictionary<GameObject, float> playerHealthCache = new Dictionary<GameObject, float>();
- // Token: 0x04000027 RID: 39
- public static bool weaponColliders = false;
- // Token: 0x04000028 RID: 40
- private bool weaponCollidersLastState;
- // Token: 0x04000029 RID: 41
- public static bool freezePlayer = false;
- // Token: 0x0400002A RID: 42
- private Vector3 frozenPosition;
- // Token: 0x0400002B RID: 43
- private Vector3 policeStationPos = new Vector3(-949.4828f, 0.068f, 17.1117f);
- // Token: 0x0400002C RID: 44
- private Vector3 archbrookPos = new Vector3(906.3092f, 0.01f, -23.9571f);
- // Token: 0x0400002D RID: 45
- public static List<CF_a1b81d72fa50e48f12bfd55dd95dc7e4ea230166_Corpsefuscated> ContainerBase = new List<CF_a1b81d72fa50e48f12bfd55dd95dc7e4ea230166_Corpsefuscated>();
- // Token: 0x0400002E RID: 46
- public static List<CF_b01305f761ea65b017350a752dbb3a7860aa790e_Corpsefuscated> EnemyBase = new List<CF_b01305f761ea65b017350a752dbb3a7860aa790e_Corpsefuscated>();
- // Token: 0x0400002F RID: 47
- public static List<CF_f9ea1dc1978da4f019f187f7ab2f7f55ae4ab798_Corpsefuscated> Playerst = new List<CF_f9ea1dc1978da4f019f187f7ab2f7f55ae4ab798_Corpsefuscated>();
- // Token: 0x04000030 RID: 48
- public static List<CF_1382b9b6b9205bb038b69eeb031616c3d99b7a69_Corpsefuscated> PlayerHealthbar = new List<CF_1382b9b6b9205bb038b69eeb031616c3d99b7a69_Corpsefuscated>();
- // Token: 0x04000031 RID: 49
- public static List<Transform> Offices = new List<Transform>();
- // Token: 0x04000032 RID: 50
- private string[] doorKeywords = new string[] { "basicdoubledoor 3m", "BasicHallDoubleDoor 5M", "basicdoor 3m", "stairexit" };
- // Token: 0x04000033 RID: 51
- private float natNextUpdateTime;
- // Token: 0x04000034 RID: 52
- private static Material chamsMaterial;
- // Token: 0x04000035 RID: 53
- private static Material headChamsMaterial;
- // Token: 0x04000036 RID: 54
- public static Camera cam;
- // Token: 0x04000037 RID: 55
- private bool showMenu = true;
- // Token: 0x04000038 RID: 56
- private Rect menuRect = new Rect(10f, 10f, 259f, 225f);
- // Token: 0x04000039 RID: 57
- private int selectedTab;
- // Token: 0x0400003A RID: 58
- private string[] tabNames = new string[] { "Main", "Esp", "Teleports" };
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment