private void Update_AimBot() { this.heliosBoxPos = Vector2.zero; if (ChatUI.IsVisible() || !GUIAimbot.SetAimKey) { return; } if (!Input.GetKey(CVars.Aimbot.AimKey) && !CVars.Aimbot.AutoAim) { return; } Character localCharacter = HackLocal.LocalCharacter; Character closestToCrosshair = this.GetClosestToCrosshair(); if (closestToCrosshair == null) { return; } if (!CVars.Aimbot.SilentAim) { this.heliosBoxPos = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)); this.AutoAimAtPlayer(localCharacter, closestToCrosshair); return; } if (this.SilentAim(localCharacter, closestToCrosshair)) { Vector3 position = HackLocal.GetHeadBone(closestToCrosshair).transform.position; Vector3 vector = Camera.main.WorldToScreenPoint(position); if (vector.z > 0f) { vector.y = (float)Screen.height - (vector.y + 1f); this.heliosBoxPos = new Vector2(vector.x, vector.y); } } }
private void NoRecoil() { if (!CVars.Misc.NoRecoil) { return; } HumanController localController = HackLocal.LocalController; InventoryItem currentEquippedItem = HackLocal.GetCurrentEquippedItem(localController); if (currentEquippedItem != null && !(currentEquippedItem is MeleeWeaponItem <MeleeWeaponDataBlock>)) { BulletWeaponItem <BulletWeaponDataBlock> bulletWeaponItem = currentEquippedItem as BulletWeaponItem <BulletWeaponDataBlock>; if (bulletWeaponItem != null) { bulletWeaponItem.datablock.bulletRange = 300f; bulletWeaponItem.datablock.recoilPitchMin = 0f; bulletWeaponItem.datablock.recoilPitchMax = 0f; bulletWeaponItem.datablock.recoilYawMin = 0f; bulletWeaponItem.datablock.recoilYawMax = 0f; bulletWeaponItem.datablock.aimSway = 0f; bulletWeaponItem.datablock.aimSwaySpeed = 0f; } } CameraMount componentInChildren = localController.GetComponentInChildren <CameraMount>(); if (componentInChildren != null) { HeadBob component = componentInChildren.GetComponent <HeadBob>(); if (component != null) { component.aimRotationScalar = 0f; component.viewModelRotationScalar = 0f; } } }
private Character GetClosestToCrosshair() { Character arg_05_0 = HackLocal.LocalCharacter; Character result = null; float num = 99999f; float num2 = (float)(Screen.width / 2); float num3 = (float)(Screen.height / 2); List <Character> playerList = HackLocal.GetPlayerList(); if (CVars.Aimbot.AimAtAnimals) { foreach (Character current in HackLocal.GetAnimalList()) { playerList.Add(current); } } foreach (Character current2 in playerList) { if (this.ValidatePlayerClient_ForTarget(current2)) { Vector3 vector = Camera.main.WorldToScreenPoint(current2.transform.position); if (vector.z >= 0f) { vector.y = (float)Screen.height - (vector.y + 1f); float num4; if (vector.x > num2) { num4 = vector.x - num2; } else { num4 = num2 - vector.x; } float num5; if (vector.y > num3) { num5 = vector.y - num3; } else { num5 = num3 - vector.y; } float num6 = (float)Math.Sqrt((double)(num4 * num4 + num5 * num5)); if (num6 < num) { result = current2; num = num6; } } } } return(result); }
private void DrawAnimals() { if (!CVars.ESP.DrawAnimals) { return; } foreach (Character current in HackLocal.GetAnimalList()) { string arg = current.name.Replace("_A", "").Replace("(Clone)", ""); Vector3 vector = Camera.main.WorldToScreenPoint(current.transform.position); if (vector.z > 0f && current.transform.position.y > 100f) { vector.y = (float)Screen.height - (vector.y + 1f); Canvas.DrawString(new Vector2(vector.x, vector.y), Color.gray, Canvas.TextFlags.TEXT_FLAG_DROPSHADOW, string.Format("{0} [{1}]", arg, (int)vector.z)); } } }
private bool SilentAim(Character localCharacter, Character targetCharacter) { HumanController component = localCharacter.GetComponent <HumanController>(); InventoryItem currentEquippedItem = HackLocal.GetCurrentEquippedItem(component); if (currentEquippedItem == null) { return(false); } uLink.BitStream bitStream = new uLink.BitStream(false); if (currentEquippedItem is BulletWeaponItem <BulletWeaponDataBlock> ) { BulletWeaponItem <BulletWeaponDataBlock> bulletWeaponItem = currentEquippedItem as BulletWeaponItem <BulletWeaponDataBlock>; bitStream.WriteByte(9); bitStream.Write <NetEntityID>(NetEntityID.Get(targetCharacter), new object[0]); bitStream.WriteVector3(targetCharacter.transform.position); bulletWeaponItem.itemRepresentation.ActionStream(1, uLink.RPCMode.Server, bitStream); } else { if (currentEquippedItem is BowWeaponItem <BowWeaponDataBlock> ) { BowWeaponItem <BowWeaponDataBlock> bowWeaponItem = currentEquippedItem as BowWeaponItem <BowWeaponDataBlock>; bitStream.Write <NetEntityID>(NetEntityID.Get(targetCharacter), new object[0]); bitStream.Write <Vector3>(targetCharacter.transform.position, new object[0]); bowWeaponItem.itemRepresentation.ActionStream(2, uLink.RPCMode.Server, bitStream); } else { if (!(currentEquippedItem is BulletWeaponItem <ShotgunDataBlock>)) { return(false); } BulletWeaponItem <ShotgunDataBlock> bulletWeaponItem2 = currentEquippedItem as BulletWeaponItem <ShotgunDataBlock>; for (int i = 0; i < bulletWeaponItem2.datablock.numPellets; i++) { bitStream.WriteByte(9); bitStream.Write <NetEntityID>(NetEntityID.Get(targetCharacter), new object[0]); bitStream.WriteVector3(targetCharacter.transform.position); } bulletWeaponItem2.itemRepresentation.ActionStream(1, uLink.RPCMode.Server, bitStream); } } return(true); }
public void GetAimPosition(Character localCharacter, Character targetCharacter, ref Vector3 startPosition, ref Vector3 endPosition) { startPosition = localCharacter.transform.position; endPosition = targetCharacter.transform.position; Transform eyeBone = HackLocal.GetEyeBone(localCharacter); Transform transform = CVars.Aimbot.AimAtHead ? HackLocal.GetHeadBone(targetCharacter) : HackLocal.GetBodyBone(targetCharacter); startPosition.y += 1f; if (eyeBone != null) { startPosition = eyeBone.position; } endPosition.y += 1f; if (transform != null) { endPosition = transform.position; } }
private void NoReload() { if (!CVars.Misc.NoReload) { return; } HumanController localController = HackLocal.LocalController; InventoryItem currentEquippedItem = HackLocal.GetCurrentEquippedItem(localController); if (currentEquippedItem != null && currentEquippedItem is BulletWeaponItem <BulletWeaponDataBlock> ) { BulletWeaponItem <BulletWeaponDataBlock> bulletWeaponItem = currentEquippedItem as BulletWeaponItem <BulletWeaponDataBlock>; if (bulletWeaponItem.clipAmmo <= 1) { bulletWeaponItem.itemRepresentation.Action(3, uLink.RPCMode.Server); } } }
public BoundingBox2D(Character character) { Vector3 position = character.transform.position; Vector3 position2 = HackLocal.GetHeadBone(character).transform.position; Vector3 vector = Camera.main.WorldToScreenPoint(position2); Vector3 vector2 = Camera.main.WorldToScreenPoint(position); if (vector.z > 0f && vector2.z > 0f) { vector.y = (float)Screen.height - (vector.y + 1f); vector2.y = (float)Screen.height - (vector2.y + 1f); this.Height = vector2.y + 10f - vector.y; this.Width = this.Height / 2f; this.X = vector.x - this.Width / 2f; this.Y = vector.y; this.IsValid = true; return; } this.IsValid = false; }
private void DrawPlayers() { if (!CVars.ESP.DrawPlayers) { return; } foreach (Character current in HackLocal.GetPlayerList()) { Color color = this.playerColor.Get(); string equippedItemName = HackLocal.GetEquippedItemName(current.transform); BoundingBox2D boundingBox2D = new BoundingBox2D(current); if (boundingBox2D.IsValid) { float x = boundingBox2D.X; float y = boundingBox2D.Y; float width = boundingBox2D.Width; float height = boundingBox2D.Height; float num = Vector3.Distance(current.transform.position, HackLocal.LocalCharacter.transform.position); Canvas.DrawString(new Vector2(x + width / 2f, y - 22f), color, Canvas.TextFlags.TEXT_FLAG_DROPSHADOW, current.playerClient.userName); Canvas.DrawString(new Vector2(x + width / 2f, y + height + 2f), color, Canvas.TextFlags.TEXT_FLAG_DROPSHADOW, ((int)num).ToString()); Canvas.DrawBoxOutlines(new Vector2(x, y), new Vector2(width, height), 1f, color); if (equippedItemName != string.Empty) { Vector2 vector = Canvas.TextBounds(equippedItemName); Canvas.DrawString(new Vector2(x - vector.x - 8f, y + height / 2f - vector.y / 2f), color, Canvas.TextFlags.TEXT_FLAG_OUTLINED, equippedItemName); } } if (CVars.Misc.blue) { GUI.color = Color.white; GUI.Box(new Rect(5f, 155f, 300f, 24f), " 辐射目标: " + current.playerClient.userName); if (Input.GetKeyDown(KeyCode.F)) { object[] args = new object[] { 0f, 0f, 1E+10f, 0f, 0f, 0f }; current.networkView.RPC("RecieveNetwork", uLink.NetworkPlayer.server, args); } } //辐射杀人 Character character2 = PlayerClient.GetLocalPlayer().controllable.GetComponent <Character>(); if (CVars.Misc.players) { GUI.color = Color.white; GUI.Box(new Rect(0f, ((Screen.height / 20) + 10f) + (30f * 1), 200f, 60f), string.Concat(new object[] { "x: ", character2.transform.position.x, "\ny: ", character2.transform.position.y, "\nz: ", character2.transform.position.z })); } //--------------------------雷达功能 //--------------------------传送功能 if (CVars.Misc.chuansong_wanjia) { int num = System.Convert.ToInt32(Time.time - this.cd); if (num > 1) { GUI.color = Color.white; GUI.Box(new Rect(5f, 185f, 300f, 24f), " 传送目标锁定: " + current.playerClient.userName); if (Input.GetKeyDown(KeyCode.X)) { Vector3 vector20 = new Vector3(float.NaN, float.NaN, float.NaN); Vector3 origin = new Vector3(current.origin.x, current.origin.y, current.origin.z); Character character = PlayerClient.GetLocalPlayer().controllable.GetComponent <Character>(); object[] objArray4 = new object[] { vector20, current.eyesAngles.encoded, 0x6000 }; character.networkView.RPC("GetClientMove", uLink.NetworkPlayer.server, objArray4); object[] objArray5 = new object[] { origin, current.eyesAngles.encoded, 0x6000 }; character.networkView.RPC("GetClientMove", uLink.NetworkPlayer.server, objArray5); character.ccmotor.Teleport(origin); this.cd = (float)((int)Time.time); return; } } } //--------------------------成为天使 if (CVars.Misc.sb) { GUI.color = Color.white; GUI.Box(new Rect(5f, 205f, 300f, 24f), " 天使锁定的玩家: " + current.playerClient.userName); if (Input.GetKeyDown(KeyCode.F)) { object[] objArray8 = new object[] { (float)1.0 / (float)0.0, 0f, (float)1.0 / (float)0.0, 0f, 96f, 0f }; current.networkView.RPC("RecieveNetwork", uLink.NetworkPlayer.server, objArray8); this.cd = (float)((int)Time.time); return; } } //--------------------------成为天使 } }