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); } } }
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; } }
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; }