public void OnGUI() { if (Event.current.type != EventType.Repaint) { return; } if (!DrawUtilities.ShouldRun()) { return; } DrawUtilities.DrawLabel(ESPComponent.ESPFont, LabelLocation.BottomRight, new Vector2(10, 20), $"TA Charge: {OV_PlayerInput.SequenceDiff} Ticks", Color.white, Color.black, 1, null, 13); }
public void OnGUI() { bool flag = WeaponComponent.MainCamera == null; if (flag) { WeaponComponent.MainCamera = Camera.main; } bool noSway = WeaponOptions.NoSway; if (noSway) { bool flag2 = OptimizationVariables.MainPlayer != null && OptimizationVariables.MainPlayer.animator != null; if (flag2) { OptimizationVariables.MainPlayer.animator.viewSway = Vector3.zero; } } bool flag3 = Event.current.type != EventType.Repaint; if (!flag3) { bool flag4 = !DrawUtilities.ShouldRun(); if (!flag4) { bool tracers = WeaponOptions.Tracers; if (tracers) { ESPComponent.GLMat.SetPass(0); GL.PushMatrix(); GL.LoadProjectionMatrix(WeaponComponent.MainCamera.projectionMatrix); GL.modelview = WeaponComponent.MainCamera.worldToCameraMatrix; GL.Begin(1); for (int i = WeaponComponent.Tracers.Count - 1; i > -1; i--) { TracerLine tracerLine = WeaponComponent.Tracers[i]; bool flag5 = DateTime.Now - tracerLine.CreationTime > TimeSpan.FromSeconds(5.0); if (flag5) { WeaponComponent.Tracers.Remove(tracerLine); } else { GL.Color(tracerLine.Hit ? ColorUtilities.getColor("_BulletTracersHitColor") : ColorUtilities.getColor("_BulletTracersColor")); GL.Vertex(tracerLine.StartPosition); GL.Vertex(tracerLine.EndPosition); } } GL.End(); GL.PopMatrix(); } bool showWeaponInfo = WeaponOptions.ShowWeaponInfo; if (showWeaponInfo) { bool flag6 = !(OptimizationVariables.MainPlayer.equipment.asset is ItemGunAsset); if (!flag6) { GUI.depth = 0; ItemGunAsset itemGunAsset = (ItemGunAsset)OptimizationVariables.MainPlayer.equipment.asset; string content = string.Format("<size=15>{0}\nДальность: {1}\nУрон игрокам: {2}</size>", itemGunAsset.itemName, itemGunAsset.range, itemGunAsset.playerDamageMultiplier.damage); DrawUtilities.DrawLabel(ESPComponent.ESPFont, LabelLocation.MiddleLeft, new Vector2(Screen.width - 20, Screen.height / 2), content, ColorUtilities.getColor("_WeaponInfoColor"), ColorUtilities.getColor("_WeaponInfoBorder"), 1, null, 12); } } if (ESPOptions.ShowCoordinates) { float x = OptimizationVariables.MainPlayer.transform.position.x; float y = OptimizationVariables.MainPlayer.transform.position.y; float z = OptimizationVariables.MainPlayer.transform.position.z; string content = string.Format("<size=10>Координаты(X,Y,Z): {0},{1},{2}</size>", System.Math.Round(x, 2).ToString(), System.Math.Round(y, 2).ToString(), System.Math.Round(z, 2).ToString()); DrawUtilities.DrawLabel(ESPComponent.ESPFont, LabelLocation.TopRight, new Vector2(Screen.width / Screen.width + 10, Screen.height / 38), content, ColorUtilities.getColor("_CoordInfoColor"), ColorUtilities.getColor("_CoordInfoBorder"), 1, null, 12); } float radius = RaycastOptions.SilentAimFOV * 7 + 20; float radiusAim = AimbotOptions.FOV * 7 + 20; if (RaycastOptions.ShowSilentAimUseFOV) { DrawUtilities.DrawCircle(AssetVariables.Materials["ESP"], ColorUtilities.getColor("_ShowFOV"), new Vector2(Screen.width / 2, Screen.height / 2), radius); } if (RaycastOptions.ShowAimUseFOV) { DrawUtilities.DrawCircle(AssetVariables.Materials["ESP"], ColorUtilities.getColor("_ShowFOVAim"), new Vector2(Screen.width / 2, Screen.height / 2), radiusAim); } } } }
public void OnGUI() { if (Event.current.type != EventType.Repaint || !ESPOptions.Enabled) return; if (!DrawUtilities.ShouldRun()) return; GUI.depth = 1; if (MainCamera == null) MainCamera = OptimizationVariables.MainCam; Vector3 localPos = OptimizationVariables.MainPlayer.transform.position; Vector3 aimPos = OptimizationVariables.MainPlayer.look.aim.position; Vector3 aimForward = OptimizationVariables.MainPlayer.look.aim.forward; for (int i = 0; i < ESPVariables.Objects.Count; i++) { ESPObject obj = ESPVariables.Objects[i]; ESPVisual visual = ESPOptions.VisualOptions[(int)obj.Target]; GameObject go = obj.GObject; if (!visual.Enabled) { Highlighter highlighter = go.GetComponent<Highlighter>(); if (highlighter != null && highlighter != TrajectoryComponent.Highlighted) highlighter.ConstantOffImmediate(); continue; } if (obj.Target == ESPTarget.Items && ESPOptions.FilterItems) if (!ItemUtilities.Whitelisted(((InteractableItem)obj.Object).asset, ItemOptions.ItemESPOptions)) continue; Color c = ColorUtilities.getColor($"_{obj.Target}"); LabelLocation ll = visual.Location; if (go == null) continue; Vector3 position = go.transform.position; double dist = VectorUtilities.GetDistance(position, localPos); if (dist < 0.5 || (dist > visual.Distance && !visual.InfiniteDistance)) continue; Vector3 cpos = MainCamera.WorldToScreenPoint(position); if (cpos.z <= 0) continue; string text = ""; Vector3 scale = go.transform.localScale; Bounds b; switch (obj.Target) { case ESPTarget.Players: case ESPTarget.Zombies: b = new Bounds(new Vector3(position.x, position.y + 1, position.z), new Vector3(scale.x * 2, scale.y * 3, scale.z * 2)); break; case ESPTarget.Vehicles: b = go.transform.Find("Model_0").GetComponent<MeshRenderer>().bounds; Transform child = go.transform.Find("Model_1"); if (child != null) b.Encapsulate(child.GetComponent<MeshRenderer>().bounds); break; default: b = go.GetComponent<Collider>().bounds; break; } int size = DrawUtilities.GetTextSize(visual, dist); double rounded = Math.Round(dist); /*#if DEBUG DebugUtilities.Log(obj.Target.ToString()); //Holy f**k nuggets this is laggy #endif*/ string outerText = $"<size={size}>"; text = $"<size={size}>"; switch (obj.Target) { #region Players case ESPTarget.Players: { Player p = (Player)obj.Object; if (p.life.isDead) continue; if (visual.ShowName) text += GetSteamPlayer(p).playerID.characterName + "\n"; if (RaycastUtilities.TargetedPlayer == p && RaycastOptions.EnablePlayerSelection) text += "[Targeted]\n"; if (ESPOptions.ShowPlayerWeapon) text += (p.equipment.asset != null ? p.equipment.asset.itemName : "Fists") + "\n"; if (ESPOptions.ShowPlayerVehicle) text += (p.movement.getVehicle() != null ? p.movement.getVehicle().asset.name + "\n" : "No Vehicle\n"); b.size = b.size / 2; b.size = new Vector3(b.size.x, b.size.y * 1.25f, b.size.z); if (FriendUtilities.IsFriendly(p) && ESPOptions.UsePlayerGroup) c = ColorUtilities.getColor("_ESPFriendly"); break; } #endregion #region Zombies case ESPTarget.Zombies: { if (((Zombie)obj.Object).isDead) continue; if (visual.ShowName) text += $"Zombie\n"; break; } #endregion #region Items case ESPTarget.Items: { InteractableItem item = (InteractableItem)obj.Object; if (visual.ShowName) text += item.asset.itemName + "\n"; break; } #endregion #region Sentries case ESPTarget.Sentries: { InteractableSentry sentry = (InteractableSentry)obj.Object; if (visual.ShowName) { text += "Sentry\n"; outerText += "Sentry\n"; } if (ESPOptions.ShowSentryItem) { outerText += SentryName(sentry.displayItem, false) + "\n"; text += SentryName(sentry.displayItem, true) + "\n"; } break; } #endregion #region Beds case ESPTarget.Beds: { InteractableBed bed = (InteractableBed)obj.Object; if (visual.ShowName) { text += "Bed\n"; outerText += "Bed\n"; } if (ESPOptions.ShowClaimed) { text += GetOwned(bed, true) + "\n"; outerText += GetOwned(bed, false) + "\n"; } break; } #endregion #region Claim Flags case ESPTarget.ClaimFlags: { if (visual.ShowName) text += "Claim Flag\n"; break; } #endregion #region Vehicles case ESPTarget.Vehicles: { InteractableVehicle vehicle = (InteractableVehicle)obj.Object; if (vehicle.health == 0) continue; if (ESPOptions.FilterVehicleLocked && vehicle.isLocked) continue; vehicle.getDisplayFuel(out ushort displayFuel, out ushort MaxFuel); float health = Mathf.Round(100 * (vehicle.health / (float)vehicle.asset.health)); float fuel = Mathf.Round(100 * (displayFuel / (float)MaxFuel)); if (visual.ShowName) { text += vehicle.asset.name + "\n"; outerText += vehicle.asset.name + "\n"; } if (ESPOptions.ShowVehicleHealth) { text += $"Health: {health}%\n"; outerText += $"Health: {health}%\n"; } if (ESPOptions.ShowVehicleFuel) { text += $"Fuel: {fuel}%\n"; outerText += $"Fuel: {fuel}%\n"; } if (ESPOptions.ShowVehicleLocked) { text += GetLocked(vehicle, true) + "\n"; outerText += GetLocked(vehicle, false) + "\n"; } break; } #endregion #region Storage case ESPTarget.Storage: { if (visual.ShowName) text += "Storage\n"; break; } #endregion #region Generators case ESPTarget.Generators: { InteractableGenerator gen = (InteractableGenerator)obj.Object; float fuel = Mathf.Round(100 * (gen.fuel / (float)gen.capacity)); if (ESPOptions.ShowGeneratorFuel) { text += $"Fuel: {fuel}%\n"; outerText += $"Fuel: {fuel}%\n"; } if (ESPOptions.ShowGeneratorPowered) { text += GetPowered(gen, true) + "\n"; outerText += GetPowered(gen, false) + "\n"; } break; } #endregion } if (outerText == $"<size={size}>") outerText = null; if (visual.ShowDistance) { text += $"{rounded}m\n"; if (outerText != null) outerText += $"{rounded}m\n"; } if (visual.ShowAngle) { double roundedFOV = Math.Round(VectorUtilities.GetAngleDelta(aimPos, aimForward, position), 2); text += $"Angle: {roundedFOV}°\n"; if (outerText != null) outerText += $"{roundedFOV}°\n"; } text += "</size>"; if (outerText != null) outerText += "</size>"; Vector3[] vectors = DrawUtilities.GetBoxVectors(b); Vector2[] W2SVectors = DrawUtilities.GetRectangleLines(MainCamera, b, c); Vector3 LabelVector = DrawUtilities.Get2DW2SVector(MainCamera, W2SVectors, ll); if (MirrorCameraOptions.Enabled && W2SVectors.Any(v => MirrorCameraComponent.viewport.Contains(v))) { Highlighter highlighter = go.GetComponent<Highlighter>(); if (highlighter != null) highlighter.ConstantOffImmediate(); continue; } if (visual.Boxes) { if (visual.TwoDimensional) DrawUtilities.PrepareRectangleLines(W2SVectors, c); else { DrawUtilities.PrepareBoxLines(vectors, c); LabelVector = DrawUtilities.Get3DW2SVector(MainCamera, b, ll); } } if (visual.Glow) { Highlighter highlighter = go.GetComponent<Highlighter>() ?? go.AddComponent<Highlighter>(); //highlighter.OccluderOn(); //highlighter.SeeThroughOn(); highlighter.occluder = true; highlighter.overlay = true; highlighter.ConstantOnImmediate(c); Highlighters.Add(highlighter); } else { Highlighter highlighter = go.GetComponent<Highlighter>(); if (highlighter != null && highlighter != TrajectoryComponent.Highlighted) highlighter.ConstantOffImmediate(); } if (visual.Labels) DrawUtilities.DrawLabel(ESPFont, ll, LabelVector, text, visual.CustomTextColor ? ColorUtilities.getColor($"_{obj.Target}_Text") : c, ColorUtilities.getColor($"_{obj.Target}_Outline"), visual.BorderStrength, outerText); if (visual.LineToObject) ESPVariables.DrawBuffer2.Enqueue(new ESPBox2 { Color = c, Vertices = new[] { new Vector2(Screen.width / 2, Screen.height), new Vector2(cpos.x, Screen.height - cpos.y) } }); } GLMat.SetPass(0); GL.PushMatrix(); GL.LoadProjectionMatrix(MainCamera.projectionMatrix); GL.modelview = MainCamera.worldToCameraMatrix; GL.Begin(GL.LINES); for (int i = 0; i < ESPVariables.DrawBuffer.Count; i++) { ESPBox box = ESPVariables.DrawBuffer.Dequeue(); GL.Color(box.Color); Vector3[] vertices = box.Vertices; for (int j = 0; j < vertices.Length; j++) GL.Vertex(vertices[j]); } GL.End(); GL.PopMatrix(); GL.PushMatrix(); GL.Begin(GL.LINES); for (int i = 0; i < ESPVariables.DrawBuffer2.Count; i++) { ESPBox2 box = ESPVariables.DrawBuffer2.Dequeue(); GL.Color(box.Color); Vector2[] vertices = box.Vertices; bool Run = true; for (int j = 0; j < vertices.Length; j++) if (j < vertices.Length - 1) { Vector2 v1 = vertices[j]; Vector2 v2 = vertices[j + 1]; if (Vector2.Distance(v2, v1) > Screen.width / 2) { Run = false; break; } } if (!Run) continue; for (int j = 0; j < vertices.Length; j++) GL.Vertex3(vertices[j].x, vertices[j].y, 0); } GL.End(); GL.PopMatrix(); }
// Token: 0x060001FD RID: 509 RVA: 0x00013024 File Offset: 0x00011224 public void OnGUI() { bool flag = WeaponComponent.MainCamera == null; bool flag2 = flag; if (flag2) { WeaponComponent.MainCamera = Camera.main; } bool noSway = WeaponOptions.NoSway; bool flag3 = noSway; if (flag3) { bool flag4 = OptimizationVariables.MainPlayer != null && OptimizationVariables.MainPlayer.animator != null; bool flag5 = flag4; if (flag5) { OptimizationVariables.MainPlayer.animator.viewSway = Vector3.zero; } } bool flag6 = Event.current.type != EventType.Repaint; bool flag7 = !flag6; if (flag7) { bool flag8 = !DrawUtilities.ShouldRun(); bool flag9 = !flag8; if (flag9) { bool tracers = WeaponOptions.Tracers; bool flag10 = tracers; if (flag10) { ESPComponent.GLMat.SetPass(0); GL.PushMatrix(); GL.LoadProjectionMatrix(WeaponComponent.MainCamera.projectionMatrix); GL.modelview = WeaponComponent.MainCamera.worldToCameraMatrix; GL.Begin(1); for (int i = WeaponComponent.Tracers.Count - 1; i > -1; i--) { TracerLine tracerLine = WeaponComponent.Tracers[i]; bool flag11 = DateTime.Now - tracerLine.CreationTime > TimeSpan.FromSeconds(5.0); bool flag12 = flag11; if (flag12) { WeaponComponent.Tracers.Remove(tracerLine); } else { GL.Color(tracerLine.Hit ? ColorUtilities.getColor("_BulletTracersHitColor") : ColorUtilities.getColor("_BulletTracersColor")); GL.Vertex(tracerLine.StartPosition); GL.Vertex(tracerLine.EndPosition); } } GL.End(); GL.PopMatrix(); } bool showWeaponInfo = WeaponOptions.ShowWeaponInfo; bool flag13 = showWeaponInfo; if (flag13) { bool flag14 = !(OptimizationVariables.MainPlayer.equipment.asset is ItemGunAsset); bool flag15 = !flag14; if (flag15) { GUI.depth = 0; ItemGunAsset itemGunAsset = (ItemGunAsset)OptimizationVariables.MainPlayer.equipment.asset; string content = string.Format("<size=15>{0}\nДальность: {1}\nУрон игрокам: {2}</size>", itemGunAsset.itemName, itemGunAsset.range, itemGunAsset.playerDamageMultiplier.damage); DrawUtilities.DrawLabel(ESPComponent.ESPFont, LabelLocation.MiddleLeft, new Vector2((float)(Screen.width - 20), (float)(Screen.height / 2)), content, ColorUtilities.getColor("_WeaponInfoColor"), ColorUtilities.getColor("_WeaponInfoBorder"), 1, null, 12); } } float radius = RaycastOptions.SilentAimFOV * 7f + 20f; float radius2 = AimbotOptions.FOV * 7f + 20f; bool showSilentAimUseFOV = RaycastOptions.ShowSilentAimUseFOV; if (showSilentAimUseFOV) { DrawUtilities.DrawCircle(AssetVariables.Materials["ESP"], ColorUtilities.getColor("_ShowFOV"), new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)), radius); } bool showAimUseFOV = RaycastOptions.ShowAimUseFOV; if (showAimUseFOV) { DrawUtilities.DrawCircle(AssetVariables.Materials["ESP"], ColorUtilities.getColor("_ShowFOVAim"), new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)), radius2); } } } }
public void OnGUI() { if (MainCamera == null) { MainCamera = Camera.main; } if (WeaponOptions.NoSway) { if (OptimizationVariables.MainPlayer != null && OptimizationVariables.MainPlayer.animator != null) { OptimizationVariables.MainPlayer.animator.viewSway = Vector3.zero; } } if (Event.current.type != EventType.Repaint) { return; } if (!DrawUtilities.ShouldRun()) { return; } if (WeaponOptions.Tracers) { ESPComponent.GLMat.SetPass(0); GL.PushMatrix(); GL.LoadProjectionMatrix(MainCamera.projectionMatrix); GL.modelview = MainCamera.worldToCameraMatrix; GL.Begin(GL.LINES); for (int i = Tracers.Count - 1; i > -1; i--) { TracerLine t = Tracers[i]; if (DateTime.Now - t.CreationTime > TimeSpan.FromSeconds(5)) { Tracers.Remove(t); continue; } GL.Color(t.Hit ? ColorUtilities.getColor("_BulletTracersHitColor") : ColorUtilities.getColor("_BulletTracersColor")); GL.Vertex(t.StartPosition); GL.Vertex(t.EndPosition); } GL.End(); GL.PopMatrix(); } if (WeaponOptions.ShowWeaponInfo) { if (!(OptimizationVariables.MainPlayer.equipment.asset is ItemGunAsset)) { return; } GUI.depth = 0; ItemGunAsset PAsset = (ItemGunAsset)OptimizationVariables.MainPlayer.equipment.asset; string text = $"<size=15>{PAsset.itemName}\nRange: {PAsset.range}</size>"; DrawUtilities.DrawLabel(ESPComponent.ESPFont, LabelLocation.MiddleLeft, new Vector2(Screen.width - 20, Screen.height / 2), text, ColorUtilities.getColor("_WeaponInfoColor"), ColorUtilities.getColor("_WeaponInfoBorder"), 1); } }