-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRenderer.cs
More file actions
1405 lines (1177 loc) · 67 KB
/
Renderer.cs
File metadata and controls
1405 lines (1177 loc) · 67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Numerics;
using System.Runtime.InteropServices;
using System.Security.Principal;
using ClickableTransparentOverlay;
using ImGuiNET;
namespace FutaZone
{
public class Renderer : Overlay
{
[DllImport("user32.dll")]
static extern int GetSystemMetrics(int nIndex);
[DllImport("user32.dll", ExactSpelling = true)]
public static extern bool SetWindowDisplayAffinity(IntPtr hWnd, uint dwAffinity);
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr GetActiveWindow();
[DllImport("user32.dll", SetLastError = true)]
static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint lpdwProcessId);
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool EnumWindows(EnumWindowsProc lpEnumFunc, IntPtr lParam);
delegate bool EnumWindowsProc(IntPtr hWnd, IntPtr lParam);
private void ApplyAntiCapture(bool enable)
{
uint currentProcessId = (uint)System.Diagnostics.Process.GetCurrentProcess().Id;
EnumWindows((hWnd, lParam) =>
{
GetWindowThreadProcessId(hWnd, out uint processId);
if (processId == currentProcessId)
{
SetWindowDisplayAffinity(hWnd, enable ? WDA_EXCLUDEFROMCAPTURE : WDA_NONE);
}
return true;
}, IntPtr.Zero);
}
private const uint WDA_NONE = 0x00000000;
private const uint WDA_EXCLUDEFROMCAPTURE = 0x00000011;
private const int SM_CXSCREEN = 0;
private const int SM_CYSCREEN = 1;
//renderer variables
public Vector2 screenSize;
public float[] viewMatrix = new float[16];
//entities copies
public ConcurrentQueue<Entity> entities = new ConcurrentQueue<Entity>();
private Entity localPlayer = new Entity();
private readonly object entityLock = new object();
//GUI elements
private bool enableESP = true;
private bool enableLines = false;
private bool enablePlayerState = false;
private bool enableBombTimer = true;
private bool enableWatermark = true;
private bool enableAntiCapture = false;
private float adminWarningEndTime = 0f;
private bool isAdmin = false;
private bool enableAimbot = false;
private bool showAimTarget = false;
private bool enableTriggerBot = false;
private bool enableAutoStop = false;
private bool enableSoundESP = false;
public bool enableHitSound = true;
public string hitSoundFile = "Default";
private string[] hitSoundFiles = new string[] { "Default" };
private int selectedHitSoundIndex = 0;
private bool enableVisibleCheck = true; // Default to true
private bool showTeammates = false; // Default to not showing teammates
private Vector4 enemyColor = new Vector4(1.0f, 0.6f, 0.75f, 1.0f); // Sakura pink for enemy
private Vector4 teamColor = new Vector4(0.6f, 0.827f, 0.0f, 1.0f); // Lime green for team
private Vector4 bonesColor = new Vector4(0.5f, 0.0f, 0.5f, 1.0f); // Deep purple for bones
private bool enableEspGradient = false;
private Vector4 teamColor2 = new Vector4(0.4f, 0.6f, 0.0f, 1.0f);
private Vector4 enemyColor2 = new Vector4(0.8f, 0.4f, 0.5f, 1.0f);
private Vector4 bonesColor2 = new Vector4(0.3f, 0.0f, 0.3f, 1.0f);
private Vector4 soundESPColor = new Vector4(1.0f, 0.0f, 0.0f, 1.0f); // Red for SoundESP
private bool enableSoundEspGradient = false;
private Vector4 soundESPColor2 = new Vector4(1.0f, 0.5f, 0.0f, 1.0f);
private Vector4 aimbotFovColor = new Vector4(1.0f, 0.6f, 0.75f, 0.6f); // Semi-transparent sakura pink for aimbot FOV
// Tint
private bool enableTint = false;
private Vector4 tintColor = new Vector4(0.0f, 0.0f, 0.0f, 0.5f);
float boneThickness = 2.0f;
private enum Language { English = 0, Chinese = 1 }
private Language currentLanguage = Language.English;
private bool fontLoaded = false;
private enum EspMode { Team = 0, Ffa = 1 }
private EspMode espMode = EspMode.Team;
private enum EspStyle { FullBox = 0, CornerBox = 1, NoBox = 2, Circle3D = 3, Star3D = 4 }
private EspStyle espStyle = EspStyle.FullBox;
private enum SoundEspStyle { ExpandingCircle = 0, ConnectedCircles = 1, Arrows = 2 }
private SoundEspStyle soundEspStyle = SoundEspStyle.ExpandingCircle;
//draw list
ImDrawListPtr drawList;
// UI visibility
private bool showUI = true;
private bool insKeyPressed = false;
private bool styleInitialized = false;
// Watermark caching
private string watermarkName = "";
private int watermarkPing = 0;
private int watermarkVelocity = 0;
private float lastWatermarkUpdate = 0f;
// Config System UI variables
private string newConfigName = "config";
private int selectedConfigIndex = 0;
private bool showSaveConfirm = false;
private float saveConfirmTime = 0f;
private string statusMessage = "";
private float statusMessageTime = 0f;
private void RefreshHitSounds()
{
try
{
string hitSoundPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "FUTAZONE");
if (!Directory.Exists(hitSoundPath))
{
Directory.CreateDirectory(hitSoundPath);
}
var files = Directory.GetFiles(hitSoundPath, "*.wav");
List<string> list = new List<string> { "Default" };
foreach (var file in files)
{
list.Add(Path.GetFileName(file));
}
hitSoundFiles = list.ToArray();
// Restore selection
selectedHitSoundIndex = 0;
if (!string.IsNullOrEmpty(hitSoundFile))
{
for (int i = 0; i < hitSoundFiles.Length; i++)
{
if (hitSoundFiles[i] == hitSoundFile)
{
selectedHitSoundIndex = i;
break;
}
}
}
}
catch {}
}
private void InitializeStyle()
{
ImGuiStylePtr style = ImGui.GetStyle();
style.WindowRounding = 8.0f;
style.FrameRounding = 4.0f;
style.GrabRounding = 4.0f;
// Transparent light pink background
style.Colors[(int)ImGuiCol.WindowBg] = new Vector4(1.0f, 0.85f, 0.9f, 0.85f);
// Popup background (for combos, etc.) - Light pink
style.Colors[(int)ImGuiCol.PopupBg] = new Vector4(1.0f, 0.9f, 0.95f, 0.95f);
// Sakura color for title and headers
style.Colors[(int)ImGuiCol.TitleBg] = new Vector4(1.0f, 0.6f, 0.75f, 0.9f);
style.Colors[(int)ImGuiCol.TitleBgActive] = new Vector4(1.0f, 0.5f, 0.7f, 1.0f);
style.Colors[(int)ImGuiCol.TitleBgCollapsed] = new Vector4(1.0f, 0.6f, 0.75f, 0.7f);
style.Colors[(int)ImGuiCol.Header] = new Vector4(1.0f, 0.65f, 0.8f, 0.8f);
style.Colors[(int)ImGuiCol.HeaderHovered] = new Vector4(1.0f, 0.55f, 0.75f, 0.9f);
style.Colors[(int)ImGuiCol.HeaderActive] = new Vector4(1.0f, 0.45f, 0.7f, 1.0f);
style.Colors[(int)ImGuiCol.FrameBg] = new Vector4(1.0f, 0.95f, 0.95f, 0.7f);
style.Colors[(int)ImGuiCol.FrameBgHovered] = new Vector4(1.0f, 0.85f, 0.9f, 0.8f);
style.Colors[(int)ImGuiCol.FrameBgActive] = new Vector4(1.0f, 0.75f, 0.85f, 0.9f);
style.Colors[(int)ImGuiCol.CheckMark] = new Vector4(0.9f, 0.3f, 0.5f, 1.0f);
style.Colors[(int)ImGuiCol.SliderGrab] = new Vector4(0.9f, 0.4f, 0.6f, 1.0f);
style.Colors[(int)ImGuiCol.SliderGrabActive] = new Vector4(0.9f, 0.3f, 0.5f, 1.0f);
style.Colors[(int)ImGuiCol.Button] = new Vector4(1.0f, 0.65f, 0.8f, 0.8f);
style.Colors[(int)ImGuiCol.ButtonHovered] = new Vector4(1.0f, 0.55f, 0.75f, 0.9f);
style.Colors[(int)ImGuiCol.ButtonActive] = new Vector4(1.0f, 0.45f, 0.7f, 1.0f);
style.Colors[(int)ImGuiCol.Text] = new Vector4(0.3f, 0.1f, 0.2f, 1.0f); // Dark pinkish text
}
private void LoadFontForLanguage(Language lang)
{
if (lang == Language.Chinese && !fontLoaded)
{
try
{
ReplaceFont(@"c:\windows\fonts\msyh.ttc", 18, FontGlyphRangeType.ChineseFull);
fontLoaded = true;
}
catch { /* Handle font loading error if needed */ }
}
}
public Renderer()
{
// Check Admin
using (WindowsIdentity identity = WindowsIdentity.GetCurrent())
{
WindowsPrincipal principal = new WindowsPrincipal(identity);
isAdmin = principal.IsInRole(WindowsBuiltInRole.Administrator);
}
// Enable VSync
VSync = true;
// Auto-detect screen resolution
int screenWidth = GetSystemMetrics(SM_CXSCREEN);
int screenHeight = GetSystemMetrics(SM_CYSCREEN);
screenSize = new Vector2(screenWidth, screenHeight);
// Detect system language
var culture = System.Globalization.CultureInfo.CurrentUICulture;
if (culture.Name.StartsWith("zh", StringComparison.OrdinalIgnoreCase))
{
currentLanguage = Language.Chinese;
}
else
{
currentLanguage = Language.English;
}
// Initial font load if Chinese
LoadFontForLanguage(currentLanguage);
// Initialize Config System
ConfigSystem.Initialize();
// Populate hit sounds
RefreshHitSounds();
}
protected override void Render()
{
if (!styleInitialized)
{
InitializeStyle();
if (enableAntiCapture && !isAdmin)
{
adminWarningEndTime = (float)ImGui.GetTime() + 5.0f;
enableAntiCapture = false; // Revert locally
}
else
{
ApplyAntiCapture(enableAntiCapture); // Apply it once at start
}
styleInitialized = true;
}
// Draw Fullscreen Tint
if (enableTint)
{
ImGui.GetBackgroundDrawList().AddRectFilled(
new Vector2(0, 0),
screenSize,
ImGui.ColorConvertFloat4ToU32(tintColor)
);
}
// Check for INS key to toggle UI
bool vsync = VSync;
bool currentInsState = (Aimbot.GetAsyncKeyState(0x2D) & 0x8000) != 0; // 0x2D is VK_INSERT
if (currentInsState && !insKeyPressed)
{
showUI = !showUI;
}
insKeyPressed = currentInsState;
if (showUI)
{
ImGui.Begin("FutaZone");
// Language Selection
string[] langNames = { "English", "Chinese (中文)" };
int langIndex = (int)currentLanguage;
if (ImGui.Combo("Language (语言)", ref langIndex, langNames, langNames.Length))
{
currentLanguage = (Language)langIndex;
LoadFontForLanguage(currentLanguage);
}
ImGui.Separator();
// Strings based on language
bool isCN = currentLanguage == Language.Chinese;
// ESP feature group
if (ImGui.CollapsingHeader(isCN ? "ESP (透视)" : "ESP Visuals", ImGuiTreeNodeFlags.DefaultOpen))
{
ImGui.Checkbox(isCN ? "Enable ESP (开启透视)" : "Enable ESP", ref enableESP);
ImGui.Checkbox(isCN ? "Enable SoundESP (声音透视)" : "Enable SoundESP", ref enableSoundESP);
if (enableESP || enableSoundESP)
{
if (enableESP)
{
ImGui.Checkbox(isCN ? "Enable Lines (开启射线)" : "Enable Snaplines", ref enableLines);
ImGui.Checkbox(isCN ? "Enable Player State (开启玩家状态)" : "Enable Player State", ref enablePlayerState);
// ESP Style Selection
string[] styleNames = isCN
? new[] { "Full Box (全框)", "Corner Box (四角)", "No Box (无框)", "3D Circle (立体圆环)", "3D Star (立体五角星)" }
: new[] { "Full Box", "Corner Box", "No Box", "3D Circle", "3D Star" };
int styleIndex = (int)espStyle;
if (ImGui.Combo(isCN ? "ESP Style (透视样式)" : "ESP Style", ref styleIndex, styleNames, styleNames.Length))
{
espStyle = (EspStyle)styleIndex;
}
}
if (enableSoundESP)
{
string[] soundStyleNames = isCN
? new[] { "Expanding Circle (扩散圆圈)", "Connected Circles (连接圆圈)", "Arrows (箭头连接)" }
: new[] { "Expanding Circle", "Connected Circles", "Arrows" };
int soundStyleIndex = (int)soundEspStyle;
if (ImGui.Combo(isCN ? "SoundESP Style (声音透视样式)" : "SoundESP Style", ref soundStyleIndex, soundStyleNames, soundStyleNames.Length))
{
soundEspStyle = (SoundEspStyle)soundStyleIndex;
SoundESP.Style = soundStyleIndex;
}
}
ImGui.Checkbox(isCN ? "Show Teammates (显示队友)" : "Show Teammates", ref showTeammates);
// ESP settings shown when feature expanded
ImGui.Text(isCN ? "Mode (模式):" : "Mode:");
ImGui.SameLine();
// Team or FFA mode toggle
bool isTeam = espMode == EspMode.Team;
if (ImGui.RadioButton(isCN ? "Team (团队)" : "Team", isTeam)) espMode = EspMode.Team;
ImGui.SameLine();
bool isFfa = espMode == EspMode.Ffa;
if (ImGui.RadioButton(isCN ? "FFA (死斗)" : "FFA", isFfa)) espMode = EspMode.Ffa;
if (enableESP)
{
// color pickers
ImGui.ColorEdit4(isCN ? "Team Color (队伍颜色)" : "Team Color", ref teamColor);
ImGui.ColorEdit4(isCN ? "Enemy Color (敌人颜色)" : "Enemy Color", ref enemyColor);
ImGui.ColorEdit4(isCN ? "Bones Color (骨骼颜色)" : "Bone Color", ref bonesColor);
ImGui.Checkbox(isCN ? "Enable Gradient (启用渐变)" : "Enable Gradient", ref enableEspGradient);
if (enableEspGradient)
{
ImGui.ColorEdit4(isCN ? "Team Gr. (队伍次要颜色)" : "Team Gradient", ref teamColor2);
ImGui.ColorEdit4(isCN ? "Enemy Gr. (敌人次要颜色)" : "Enemy Gradient", ref enemyColor2);
ImGui.ColorEdit4(isCN ? "Bone Gr. (骨骼次要颜色)" : "Bone Gradient", ref bonesColor2);
}
}
if (enableSoundESP)
{
ImGui.ColorEdit4(isCN ? "SoundESP Color (声音透视颜色)" : "SoundESP Color", ref soundESPColor);
ImGui.Checkbox(isCN ? "Sound Gradient (声音渐变)" : "Sound Gradient", ref enableSoundEspGradient);
if (enableSoundEspGradient)
{
ImGui.ColorEdit4(isCN ? "Sound Gr. (声音次要颜色)" : "Sound Gradient", ref soundESPColor2);
}
}
}
}
// Aimbot feature group
if (ImGui.CollapsingHeader(isCN ? "Aimbot (自瞄)" : "Aimbot", ImGuiTreeNodeFlags.DefaultOpen))
{
ImGui.Checkbox(isCN ? "Enable Aimbot (开启自瞄)" : "Enable Aimbot", ref enableAimbot);
Aimbot.Instance.Enabled = enableAimbot;
if (enableAimbot)
{
// simple aimbot settings
float fov = Aimbot.Instance.FOV;
if (ImGui.SliderFloat(isCN ? "FOV (范围)" : "FOV", ref fov, 32f, 800f)) Aimbot.Instance.FOV = fov;
ImGui.ColorEdit4(isCN ? "FOV Color (范围颜色)" : "FOV Color", ref aimbotFovColor);
float smoothness = Aimbot.Instance.Smoothness;
if (ImGui.SliderFloat(isCN ? "Smoothness (平滑度)" : "Smoothness", ref smoothness, 0.1f, 50.0f)) Aimbot.Instance.Smoothness = smoothness;
bool aimAtTeammates = Aimbot.Instance.AimAtTeammates;
if (ImGui.Checkbox(isCN ? "Aim at Teammates (瞄准队友)" : "Aim at Teammates", ref aimAtTeammates)) Aimbot.Instance.AimAtTeammates = aimAtTeammates;
ImGui.Checkbox(isCN ? "Visible Check (可视检查)" : "Visible Check", ref enableVisibleCheck);
Aimbot.Instance.VisibleCheck = enableVisibleCheck;
bool disableWhenFlashed = Aimbot.Instance.DisableWhenFlashed;
if (ImGui.Checkbox(isCN ? "Disable When Flashed (被闪时关闭)" : "Disable When Flashed", ref disableWhenFlashed)) Aimbot.Instance.DisableWhenFlashed = disableWhenFlashed;
if (disableWhenFlashed)
{
float flashThreshold = Aimbot.Instance.FlashDurationThreshold;
if (ImGui.SliderFloat(isCN ? "Flash Threshold (闪白阈值)" : "Flash Threshold", ref flashThreshold, 0.0f, 5.0f)) Aimbot.Instance.FlashDurationThreshold = flashThreshold;
}
ImGui.Checkbox(isCN ? "Show Aim Target (显示瞄准点)" : "Show Aim Target", ref showAimTarget);
// Aim Mode Selection
Aimbot.AimMode currentMode = Aimbot.Instance.Mode;
string[] modeNames = isCN
? new[] { "Linear (线性)", "Fast->Slow (先快后慢)", "Slow->Fast (先慢后快)", "Overshoot (过顶回拉)", "Random (随机)" }
: new[] { "Linear", "Fast->Slow", "Slow->Fast", "Overshoot", "Random" };
int modeIndex = (int)currentMode;
if (ImGui.Combo(isCN ? "Aim Mode (模式)" : "Aim Mode", ref modeIndex, modeNames, modeNames.Length))
{
Aimbot.Instance.Mode = (Aimbot.AimMode)modeIndex;
}
// Randomness Settings (Duration control)
if (modeIndex != 0) // If not Linear
{
bool randSpeed = Aimbot.Instance.RandomizeSpeed;
if (ImGui.Checkbox(isCN ? "Randomize Duration (随机时长)" : "Randomize Duration", ref randSpeed)) Aimbot.Instance.RandomizeSpeed = randSpeed;
int duration = Aimbot.Instance.SpeedChangeDuration;
if (ImGui.SliderInt(isCN ? "Switch Duration (切换时长 ms)" : "Switch Duration (ms)", ref duration, 100, 2000)) Aimbot.Instance.SpeedChangeDuration = duration;
// Overshoot specific settings
// Show if Overshoot (3) or Random (4) is selected
if (modeIndex == 3 || modeIndex == 4)
{
float overshoot = Aimbot.Instance.OvershootScale;
if (ImGui.SliderFloat(isCN ? "Overshoot Scale (过顶倍率)" : "Overshoot Scale", ref overshoot, 1.0f, 3.0f)) Aimbot.Instance.OvershootScale = overshoot;
}
}
// Keybind selection
int currentKey = Aimbot.Instance.AimKey;
string[] keyNames = isCN
? new[] { "LBUTTON (左键)", "RBUTTON (右键)", "MBUTTON (中键)", "XBUTTON1 (下侧键)", "XBUTTON2 (上侧键)", "SHIFT", "ALT", "CTRL" }
: new[] { "LBUTTON", "RBUTTON", "MBUTTON", "XBUTTON1", "XBUTTON2", "SHIFT", "ALT", "CTRL" };
int[] keyCodes = { 0x01, 0x02, 0x04, 0x05, 0x06, 0x10, 0x12, 0x11 };
int selectedIndex = Array.IndexOf(keyCodes, currentKey);
if (selectedIndex == -1) selectedIndex = 5; // Default to SHIFT
if (ImGui.Combo(isCN ? "Aim Key (自瞄按键)" : "Aim Key", ref selectedIndex, keyNames, keyNames.Length))
{
Aimbot.Instance.AimKey = keyCodes[selectedIndex];
}
// Bone selection
int currentBoneIndex = Aimbot.Instance.TargetBoneIndex;
string[] boneNames = isCN
? new[] { "Waist (腰部)", "Neck (颈部)", "Head (头部)", "ShoulderL (左肩)", "ForeL (左前臂)", "HandL (左手)", "ShoulderR (右肩)", "ForeR (右前臂)", "HandR (右手)", "KneeL (左膝)", "FeetL (左脚)", "KneeR (右膝)", "FeetR (右脚)" }
: new[] { "Waist", "Neck", "Head", "ShoulderL", "ForeL", "HandL", "ShoulderR", "ForeR", "HandR", "KneeL", "FeetL", "KneeR", "FeetR" };
if (ImGui.Combo(isCN ? "Aim Bone (自瞄部位)" : "Aim Bone", ref currentBoneIndex, boneNames, boneNames.Length))
{
Aimbot.Instance.TargetBoneIndex = currentBoneIndex;
}
ImGui.Text($"Hold {keyNames[selectedIndex]} to activate aimbot pulse ({Aimbot.Instance.FOV} px)");
}
}
// TriggerBot feature group
if (ImGui.CollapsingHeader(isCN ? "TriggerBot (自动开火)" : "TriggerBot", ImGuiTreeNodeFlags.DefaultOpen))
{
ImGui.Checkbox(isCN ? "Enable TriggerBot (开启自动开火)" : "Enable TriggerBot", ref enableTriggerBot);
TriggerBot.Instance.Enabled = enableTriggerBot;
if (enableTriggerBot)
{
int delay = TriggerBot.Instance.DelayMs;
if (ImGui.SliderInt(isCN ? "Delay (延迟 ms)" : "Delay (ms)", ref delay, 0, 100)) TriggerBot.Instance.DelayMs = delay;
float maxVelocity = TriggerBot.Instance.MaxVelocityThreshold;
if (ImGui.SliderFloat(isCN ? "Max Velocity Z (最大Z轴速度)" : "Max Velocity Z", ref maxVelocity, 0f, 50f)) TriggerBot.Instance.MaxVelocityThreshold = maxVelocity;
bool triggerOnTeammates = TriggerBot.Instance.TriggerOnTeammates;
if (ImGui.Checkbox(isCN ? "Trigger on Teammates (对队友开火)" : "Trigger on Teammates", ref triggerOnTeammates)) TriggerBot.Instance.TriggerOnTeammates = triggerOnTeammates;
// Keybind selection
int currentKey = TriggerBot.Instance.TriggerKey;
string[] keyNames = isCN
? new[] { "LBUTTON (左键)", "RBUTTON (右键)", "MBUTTON (中键)", "XBUTTON1 (下侧键)", "XBUTTON2 (上侧键)", "SHIFT", "ALT", "CTRL" }
: new[] { "LBUTTON", "RBUTTON", "MBUTTON", "XBUTTON1", "XBUTTON2", "SHIFT", "ALT", "CTRL" };
int[] keyCodes = { 0x01, 0x02, 0x04, 0x05, 0x06, 0x10, 0x12, 0x11 };
int selectedIndex = Array.IndexOf(keyCodes, currentKey);
if (selectedIndex == -1) selectedIndex = 6; // Default to ALT
if (ImGui.Combo(isCN ? "Trigger Key (开火按键)" : "Trigger Key", ref selectedIndex, keyNames, keyNames.Length))
{
TriggerBot.Instance.TriggerKey = keyCodes[selectedIndex];
}
ImGui.Text($"Hold {keyNames[selectedIndex]} to activate triggerbot");
}
}
// AutoStop feature group
if (ImGui.CollapsingHeader(isCN ? "AutoStop (自动急停)" : "AutoStop", ImGuiTreeNodeFlags.DefaultOpen))
{
ImGui.Checkbox(isCN ? "Enable AutoStop (开启自动急停)" : "Enable AutoStop", ref enableAutoStop);
AutoStop.Instance.Enabled = enableAutoStop;
if (enableAutoStop)
{
float trigger = AutoStop.Instance.TriggerThreshold;
float stop = AutoStop.Instance.StopThreshold;
if (ImGui.SliderFloat(isCN ? "Trigger Speed (触发速度)" : "Trigger Speed", ref trigger, 10f, 250f)) AutoStop.Instance.TriggerThreshold = trigger;
if (ImGui.SliderFloat(isCN ? "Stop Speed (停止速度)" : "Stop Speed", ref stop, 0f, 100f)) AutoStop.Instance.StopThreshold = stop;
}
}
ImGui.Separator();
if (ImGui.CollapsingHeader(isCN ? "Configuration (配置)" : "Configuration", ImGuiTreeNodeFlags.DefaultOpen))
{
// Update available configs
var configs = ConfigSystem.AvailableConfigs.ToArray();
// Create new config input
ImGui.InputText(isCN ? "New Name (新配置名)" : "New Name", ref newConfigName, 32);
ImGui.SameLine();
if (ImGui.Button(isCN ? "Save New (保存新配置)" : "Save New"))
{
if (!string.IsNullOrWhiteSpace(newConfigName))
{
SaveConfigFromUI(newConfigName);
statusMessage = isCN ? $"Saved {newConfigName}!" : $"Saved {newConfigName}!";
statusMessageTime = (float)ImGui.GetTime();
ConfigSystem.RefreshConfigs(); // Refresh list to include new file
}
}
if (configs.Length > 0)
{
if (selectedConfigIndex >= configs.Length) selectedConfigIndex = 0;
if (ImGui.Combo(isCN ? "Select Config (选择配置)" : "Select Config", ref selectedConfigIndex, configs, configs.Length))
{
// Optional: Auto-load on select? Or just wait for button. Let's wait for button.
newConfigName = configs[selectedConfigIndex]; // Update name field for easy overwriting
}
ImGui.SameLine();
if (ImGui.Button(isCN ? "Load (加载)" : "Load"))
{
LoadConfigToUI(configs[selectedConfigIndex]);
statusMessage = isCN ? "Loaded!" : "Loaded!";
statusMessageTime = (float)ImGui.GetTime();
}
ImGui.SameLine();
// Check for timeout
if (showSaveConfirm && (float)ImGui.GetTime() - saveConfirmTime > 3.0f)
{
showSaveConfirm = false;
}
if (showSaveConfirm)
{
ImGui.PushStyleColor(ImGuiCol.Button, new Vector4(0.8f, 0.0f, 0.0f, 1.0f));
ImGui.PushStyleColor(ImGuiCol.ButtonHovered, new Vector4(1.0f, 0.0f, 0.0f, 1.0f));
if (ImGui.Button(isCN ? "Confirm? (点击确认)" : "Confirm?"))
{
SaveConfigFromUI(configs[selectedConfigIndex]);
statusMessage = isCN ? "Saved!" : "Saved!";
statusMessageTime = (float)ImGui.GetTime();
showSaveConfirm = false;
}
ImGui.PopStyleColor(2);
}
else
{
if (ImGui.Button(isCN ? "Save (保存)" : "Save"))
{
showSaveConfirm = true;
saveConfirmTime = (float)ImGui.GetTime();
}
}
}
else
{
ImGui.TextDisabled(isCN ? "No configs found (未找到配置)" : "No configs found");
}
// Status Message
if ((float)ImGui.GetTime() - statusMessageTime < 3.0f)
{
ImGui.TextColored(new Vector4(0.0f, 1.0f, 0.0f, 1.0f), statusMessage);
}
}
ImGui.Checkbox(isCN ? "Enable HitSound (击中提示音)" : "Enable HitSound", ref enableHitSound);
if (enableHitSound)
{
ImGui.SameLine();
ImGui.PushItemWidth(150);
if (ImGui.Combo("##HitSoundSelect", ref selectedHitSoundIndex, hitSoundFiles, hitSoundFiles.Length))
{
if (selectedHitSoundIndex >= 0 && selectedHitSoundIndex < hitSoundFiles.Length)
{
hitSoundFile = hitSoundFiles[selectedHitSoundIndex];
}
}
ImGui.PopItemWidth();
ImGui.SameLine();
if (ImGui.Button(isCN ? "Refresh##HitSound" : "Refresh##HitSound"))
{
RefreshHitSounds();
}
}
// Overlay / Visuals feature group
if (ImGui.CollapsingHeader(isCN ? "Overlay & Tint (叠加层与色调)" : "Overlay & Tint", ImGuiTreeNodeFlags.DefaultOpen))
{
ImGui.Checkbox(isCN ? "Enable Screen Tint (开启屏幕色调)" : "Enable Screen Tint", ref enableTint);
if (enableTint)
{
ImGui.ColorEdit4(isCN ? "Tint Color (色调颜色)" : "Tint Color", ref tintColor, ImGuiColorEditFlags.AlphaBar | ImGuiColorEditFlags.AlphaPreviewHalf);
}
}
ImGui.Checkbox(isCN ? "Enable Bomb Timer (C4计时器)" : "Enable Bomb Timer", ref enableBombTimer);
ImGui.Checkbox(isCN ? "Enable Watermark (水印)" : "Enable Watermark", ref enableWatermark);
if (ImGui.Checkbox(isCN ? "Anti-Capture (防截图)" : "Anti-Capture (Stream Proof)", ref enableAntiCapture))
{
if (enableAntiCapture && !isAdmin)
{
adminWarningEndTime = (float)ImGui.GetTime() + 5.0f;
enableAntiCapture = false; // Revert locally
}
else
{
ApplyAntiCapture(enableAntiCapture);
}
}
if (ImGui.Checkbox(isCN ? "Enable VSync (垂直同步)" : "Enable VSync", ref vsync)) VSync = vsync;
ImGui.Text(isCN ? "Press INS to show/hide menu (按INS显示/隐藏菜单)" : "Press INS to show/hide menu");
ImGui.End(); // End "FutaZone ESP"
}
//draw overlay
DrawOverlay(screenSize);
drawList = ImGui.GetWindowDrawList();
// Draw aimbot range circle around the crosshair when aimbot is enabled
if (Aimbot.Instance.Enabled)
{
Vector2 screenCenter = new Vector2(screenSize.X / 2f, screenSize.Y / 2f);
uint circleColor = ImGui.ColorConvertFloat4ToU32(aimbotFovColor);
float visualRadius = Aimbot.Instance.FOV * 0.5f;
drawList.AddCircle(screenCenter, visualRadius, circleColor, 32, 2.0f);
if (showAimTarget && Aimbot.Instance.TargetPosition.HasValue)
{
uint targetColor = ImGui.ColorConvertFloat4ToU32(new Vector4(1.0f, 0.0f, 0.0f, 1.0f)); // Red
drawList.AddCircleFilled(Aimbot.Instance.TargetPosition.Value, 4.0f, targetColor, 16);
}
}
if (enableESP || enableSoundESP)
{
lock (entityLock)
{
foreach (var entity in entities)
{
if (entity.isLocalPlayer) continue;
if (entity.position == Vector3.Zero) continue;
// Skip teammates if showTeammates is false and we are in Team mode
if (!showTeammates && espMode == EspMode.Team && entity.team == localPlayer.team) continue;
// Filter out huge entities (likely non-players or glitched models in casual mode)
// Standard distance waist-head is ~30 units. We allow up to 60 as a generous limit.
if (entity.bones != null && entity.bones.Count > 6)
{
float height3D = Vector3.Distance(entity.bones[0], entity.bones[6]);
if (height3D > 60.0f) continue;
}
if (enableSoundESP)
{
SoundESP.ProcessSound(entity, localPlayer);
}
if (enableESP)
{
if (enableLines && entity.position2D != new Vector2(-99, -99)) DrawLine(entity);
if (EntityOnScreen(entity))
{
// If player is an observer (Team 1), only draw head circle and skip other visuals
if (entity.team == 1 || entity.team == 0)
{
if (entity.bones2d != null && entity.bones2d.Count > 2)
{
uint headColor = ImGui.ColorConvertFloat4ToU32(new Vector4(1.0f, 1.0f, 1.0f, 1.0f)); // White for observer
drawList.AddCircle(entity.bones2d[2], 5.0f, headColor);
}
continue;
}
DrawHealthBar(entity);
DrawBox(entity);
if (enablePlayerState) DrawPlayerState(entity);
DrawBones(entity);
}
}
}
}
if (enableSoundESP)
{
SoundESP.Render(viewMatrix, screenSize, drawList, soundESPColor, enableSoundEspGradient, soundESPColor2);
}
}
if (enableWatermark)
{
DrawWatermark();
}
if (enableBombTimer && BombTimer.IsBombPlanted)
{
DrawBombTimer();
}
if ((float)ImGui.GetTime() < adminWarningEndTime)
{
string warnText = currentLanguage == Language.Chinese
? "防截图需要管理员权限才能生效"
: "Anti-Capture requires Administrator privileges";
ImFontPtr font = ImGui.GetFont();
float fontSize = ImGui.GetFontSize() * 2.0f; // Scale up the text size (simulating bold/larger)
Vector2 textSize = ImGui.CalcTextSize(warnText) * 2.0f; // Approximate size
Vector2 textPos = new Vector2((screenSize.X - textSize.X) / 2.0f, (screenSize.Y - textSize.Y) / 2.0f);
uint colorRed = ImGui.ColorConvertFloat4ToU32(new Vector4(1.0f, 0.0f, 0.0f, 1.0f));
uint colorBlack = ImGui.ColorConvertFloat4ToU32(new Vector4(0.0f, 0.0f, 0.0f, 1.0f));
// Draw shadow/outline
drawList.AddText(font, fontSize, new Vector2(textPos.X + 2, textPos.Y + 2), colorBlack, warnText);
drawList.AddText(font, fontSize, new Vector2(textPos.X - 2, textPos.Y - 2), colorBlack, warnText);
drawList.AddText(font, fontSize, new Vector2(textPos.X + 2, textPos.Y - 2), colorBlack, warnText);
drawList.AddText(font, fontSize, new Vector2(textPos.X - 2, textPos.Y + 2), colorBlack, warnText);
// Draw text
drawList.AddText(font, fontSize, textPos, colorRed, warnText);
}
}
private void DrawBombTimer()
{
// Set default position to top-left
ImGui.SetNextWindowPos(new Vector2(20, 20), ImGuiCond.FirstUseEver);
// Sakura background for the window
ImGui.PushStyleColor(ImGuiCol.WindowBg, new Vector4(1.0f, 0.75f, 0.8f, 0.6f));
ImGui.PushStyleColor(ImGuiCol.Border, new Vector4(1.0f, 0.6f, 0.75f, 1.0f));
ImGui.PushStyleVar(ImGuiStyleVar.WindowRounding, 5.0f);
// Allow dragging from body
ImGui.GetIO().ConfigWindowsMoveFromTitleBarOnly = false;
if (ImGui.Begin("BombTimer", ImGuiWindowFlags.NoTitleBar | ImGuiWindowFlags.AlwaysAutoResize))
{
// C4 Timer Logic
float maxTime = 40.0f;
float timeLeft = BombTimer.TimeLeft;
float progress = Math.Clamp(timeLeft / maxTime, 0.0f, 1.0f);
// Draw Text
string text = BombTimer.BombPlantedText;
if (!string.IsNullOrEmpty(BombTimer.TimerText)) text += $"\n{BombTimer.TimerText}";
if (!string.IsNullOrEmpty(BombTimer.DefuseText)) text += $"\n{BombTimer.DefuseText}";
// Draw text (Dark pink/purple for readability on light pink background)
ImGui.PushStyleColor(ImGuiCol.Text, new Vector4(0.5f, 0.0f, 0.5f, 1.0f));
ImGui.Text(text);
ImGui.PopStyleColor();
// Draw Progress Bar
// Custom drawing for the bar to match previous style (vertical or horizontal?
// Previous was vertical full screen height. Now it's a window. Let's make it a horizontal bar inside the window for better UX in a floating window)
Vector2 barSize = new Vector2(200, 15);
// Get cursor for custom drawing
Vector2 p = ImGui.GetCursorScreenPos();
ImDrawListPtr windowDrawList = ImGui.GetWindowDrawList();
// Background (Darker Pink)
windowDrawList.AddRectFilled(p, new Vector2(p.X + barSize.X, p.Y + barSize.Y), ImGui.ColorConvertFloat4ToU32(new Vector4(0.8f, 0.5f, 0.6f, 0.6f)));
// Foreground (Green)
float currentWidth = barSize.X * progress;
windowDrawList.AddRectFilled(p, new Vector2(p.X + currentWidth, p.Y + barSize.Y), ImGui.ColorConvertFloat4ToU32(new Vector4(0.0f, 1.0f, 0.0f, 1.0f)));
// Advance cursor so window resizes correctly
ImGui.Dummy(barSize);
}
ImGui.End();
ImGui.PopStyleVar();
ImGui.PopStyleColor(2);
}
private void DrawWatermark()
{
// Set default position to top-right
ImGui.SetNextWindowPos(new Vector2(screenSize.X - 300, 20), ImGuiCond.FirstUseEver);
// Set window styling for watermark
ImGui.PushStyleColor(ImGuiCol.WindowBg, new Vector4(1.0f, 0.75f, 0.8f, 0.6f)); // Sakura background
ImGui.PushStyleColor(ImGuiCol.Border, new Vector4(1.0f, 0.6f, 0.75f, 1.0f));
ImGui.PushStyleVar(ImGuiStyleVar.WindowRounding, 5.0f);
// 默认允许拖动无标题栏窗口
ImGui.GetIO().ConfigWindowsMoveFromTitleBarOnly = false;
// Update watermark data every frame (real-time)
watermarkName = string.IsNullOrEmpty(localPlayer.name) ? "" : localPlayer.name;
watermarkPing = localPlayer.ping;
watermarkVelocity = localPlayer.velocity;
if (ImGui.Begin("Watermark", ImGuiWindowFlags.NoTitleBar | ImGuiWindowFlags.AlwaysAutoResize))
{
// Gradient Text for "FUTAZONE"
string title = "FUTAZONE";
float time = (float)ImGui.GetTime();
for (int i = 0; i < title.Length; i++)
{
float r = (float)Math.Sin(time + i * 0.1f) * 0.5f + 0.5f;
float g = (float)Math.Sin(time + i * 0.1f + 2.0f) * 0.5f + 0.5f;
float b = (float)Math.Sin(time + i * 0.1f + 4.0f) * 0.5f + 0.5f;
ImGui.TextColored(new Vector4(r, g, b, 1.0f), title[i].ToString());
ImGui.SameLine(0, 0);
}
ImGui.SameLine();
ImGui.Text(" | ");
ImGui.SameLine();
// Player Name
ImGui.TextColored(new Vector4(1.0f, 1.0f, 1.0f, 1.0f), watermarkName);
ImGui.SameLine();
ImGui.Text(" | ");
ImGui.SameLine();
// Ping
Vector4 pingColor;
if (watermarkPing <= 20)
{
pingColor = new Vector4(0.0f, 1.0f, 0.0f, 1.0f); // Green
}
else if (watermarkPing >= 80)
{
pingColor = new Vector4(1.0f, 0.0f, 0.0f, 1.0f); // Red
}
else
{
// Gradient from Green (0,1,0) to Red (1,0,0)
float t = (watermarkPing - 20.0f) / (80.0f - 20.0f);
pingColor = new Vector4(t, 1.0f - t, 0.0f, 1.0f);
}
ImGui.TextColored(pingColor, $"{watermarkPing} ms");
ImGui.SameLine();
ImGui.Text(" | ");
ImGui.SameLine();
// Velocity
// Gradient based on speed (0-250)
// 0-100: White to Yellow
// 100-250: Yellow to Red
// Or simply keep it white or sakura? Let's use a dynamic color for fun.
// Assuming max running speed with knife is 250.
Vector4 velColor = new Vector4(1.0f, 1.0f, 1.0f, 1.0f); // Default White
if (watermarkVelocity > 0)
{
float t = Math.Clamp(watermarkVelocity / 250.0f, 0.0f, 1.0f);
// White (1,1,1) -> Sakura Pink (1, 0.6, 0.75) -> Deep Purple (0.5, 0, 0.5)
// Let's just do White -> Green for now or similar to ping but inverted?
// User didn't specify color, let's use a nice Cyan to Purple gradient
velColor = new Vector4(1.0f - t * 0.5f, 1.0f - t, 1.0f - t, 1.0f); // White -> RED
}
ImGui.TextColored(velColor, $"{watermarkVelocity} u/s");
}
ImGui.End();
ImGui.PopStyleVar();
ImGui.PopStyleColor(2);
}
bool EntityOnScreen(Entity entity)
{
return entity.position2D.X >= 0 && entity.position2D.X <= screenSize.X && entity.position2D.Y >= 0 && entity.position2D.Y <= screenSize.Y;
}
private Vector4 GetSpatialColor(Vector4 topColor, Vector4 bottomColor, float y, float minY, float maxY, bool enable)
{
if (!enable || maxY <= minY) return topColor;
float t = Math.Clamp((y - minY) / (maxY - minY), 0.0f, 1.0f);
return Vector4.Lerp(topColor, bottomColor, t);
}
private void DrawBox(Entity entity)
{
float entityHight = entity.position2D.Y - entity.viewPosition2D.Y;
Vector2 recTop = new Vector2(entity.viewPosition2D.X - entityHight / 3, entity.viewPosition2D.Y);
Vector2 rectBottom = new Vector2(entity.position2D.X + entityHight / 3, entity.position2D.Y);
Vector4 topColor = espMode == EspMode.Ffa ? enemyColor : (localPlayer.team == entity.team ? teamColor : enemyColor);
Vector4 bottomColor = espMode == EspMode.Ffa ? enemyColor2 : (localPlayer.team == entity.team ? teamColor2 : enemyColor2);
if (!enableEspGradient) bottomColor = topColor;
uint colTop = ImGui.ColorConvertFloat4ToU32(topColor);
uint colBot = ImGui.ColorConvertFloat4ToU32(bottomColor);
if (espStyle == EspStyle.FullBox)
{
// Left
drawList.AddRectFilledMultiColor(new Vector2(recTop.X - 1, recTop.Y - 1), new Vector2(recTop.X, rectBottom.Y + 1), colTop, colTop, colBot, colBot);
// Right
drawList.AddRectFilledMultiColor(new Vector2(rectBottom.X, recTop.Y - 1), new Vector2(rectBottom.X + 1, rectBottom.Y + 1), colTop, colTop, colBot, colBot);
// Top
drawList.AddRectFilledMultiColor(new Vector2(recTop.X, recTop.Y - 1), new Vector2(rectBottom.X, recTop.Y), colTop, colTop, colTop, colTop);
// Bottom
drawList.AddRectFilledMultiColor(new Vector2(recTop.X, rectBottom.Y), new Vector2(rectBottom.X, rectBottom.Y + 1), colBot, colBot, colBot, colBot);
}
else if (espStyle == EspStyle.CornerBox)
{
float lineW = (rectBottom.X - recTop.X) / 4;
float lineH = (rectBottom.Y - recTop.Y) / 4;
uint colMidTop = ImGui.ColorConvertFloat4ToU32(GetSpatialColor(topColor, bottomColor, recTop.Y + lineH, recTop.Y, rectBottom.Y, enableEspGradient));
uint colMidBot = ImGui.ColorConvertFloat4ToU32(GetSpatialColor(topColor, bottomColor, rectBottom.Y - lineH, recTop.Y, rectBottom.Y, enableEspGradient));
// Top left
drawList.AddRectFilledMultiColor(new Vector2(recTop.X, recTop.Y), new Vector2(recTop.X + lineW, recTop.Y + 1), colTop, colTop, colTop, colTop);
drawList.AddRectFilledMultiColor(new Vector2(recTop.X, recTop.Y), new Vector2(recTop.X + 1, recTop.Y + lineH), colTop, colTop, colMidTop, colMidTop);
// Top right
drawList.AddRectFilledMultiColor(new Vector2(rectBottom.X - lineW, recTop.Y), new Vector2(rectBottom.X, recTop.Y + 1), colTop, colTop, colTop, colTop);
drawList.AddRectFilledMultiColor(new Vector2(rectBottom.X - 1, recTop.Y), new Vector2(rectBottom.X, recTop.Y + lineH), colTop, colTop, colMidTop, colMidTop);
// Bottom left
drawList.AddRectFilledMultiColor(new Vector2(recTop.X, rectBottom.Y - 1), new Vector2(recTop.X + lineW, rectBottom.Y), colBot, colBot, colBot, colBot);
drawList.AddRectFilledMultiColor(new Vector2(recTop.X, rectBottom.Y - lineH), new Vector2(recTop.X + 1, rectBottom.Y), colMidBot, colMidBot, colBot, colBot);
// Bottom right
drawList.AddRectFilledMultiColor(new Vector2(rectBottom.X - lineW, rectBottom.Y - 1), new Vector2(rectBottom.X, rectBottom.Y), colBot, colBot, colBot, colBot);
drawList.AddRectFilledMultiColor(new Vector2(rectBottom.X - 1, rectBottom.Y - lineH), new Vector2(rectBottom.X, rectBottom.Y), colMidBot, colMidBot, colBot, colBot);
}
else if (espStyle == EspStyle.Circle3D)
{
int segments = 32;
float radius = 30.0f; // Adjust radius as needed
Vector2[] points = new Vector2[segments];
bool allOnScreen = true;
for (int i = 0; i < segments; i++)
{
float angle = (float)(i * 2 * Math.PI / segments);
Vector3 point3D = new Vector3(
entity.position.X + radius * (float)Math.Cos(angle),
entity.position.Y + radius * (float)Math.Sin(angle),
entity.position.Z
);