-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathmain.cpp
More file actions
1616 lines (1387 loc) · 50.7 KB
/
main.cpp
File metadata and controls
1616 lines (1387 loc) · 50.7 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
//Basic includes
#include <iostream>
#include <Windows.h>
#include <thread>
#include <string>
#include <tlhelp32.h>
#include <fstream>
#include <filesystem>
#include <vector>
#include <math.h>
#include <TlHelp32.h>
#include <Psapi.h>
#include <tchar.h>
#include <winioctl.h>
#include <Uxtheme.h>
#include <dwmapi.h>
#include <WinInet.h>
#include "shit/skCrypt.h"
#include <Mmsystem.h>
#include <mciapi.h>
#include <shobjidl_core.h>
#include <direct.h>
#include <urlmon.h>
#include <random>
//Other includes
#include "cheat/comm.hpp"
#include "cheat/utils.hpp"
#include "shit/xorstr.hpp"
#include "cheat/ImGui/imgui.h"
#include "cheat/ImGui/imgui_impl_dx9.h"
#include "cheat/ImGui/imgui_impl_win32.h"
//random
namespace Util
{
RECT rc;
std::string random_string(const int len) { /* For Cool Responses */
const std::string alpha_numeric("ABCDEFGHIJKLMNOPRSTUVZabcdefghijklmnoprstuvz");
std::default_random_engine generator{ std::random_device{}() };
const std::uniform_int_distribution< std::string::size_type > distribution{ 0, alpha_numeric.size() - 1 };
std::string str(len, 0);
for (auto& it : str) {
it = alpha_numeric[distribution(generator)];
}
return str;
}
}
//Lib includes
#pragma comment(lib, "wininet.lib")
#pragma comment(lib, "ntdll.lib")
#pragma comment(lib, "urlmon.lib")
#pragma comment(lib, "Winmm.lib")
//Setup
HWND MyWnd = NULL;
HWND GameWnd = NULL;
RECT GameRect = { NULL };
MSG Message = { NULL };
IDirect3D9Ex* p_Object = NULL;
IDirect3DDevice9Ex* p_Device = NULL;
D3DPRESENT_PARAMETERS p_Params = { NULL };
#define ReadPointer(base, offset) (*(PVOID *)(((PBYTE)base + offset)))
#define ReadUint64(base, offset) (*(uintptr_t**)(((PBYTE)base + offset)))
#define ReadBool(base, offset) (*(bool *)(((PBYTE)base + offset)))
#define ReadVector2D(base, offset) (*(FVector2D *)(((PBYTE)base + offset)))
#define ReadFVector(base, offset) (*(FVector *)(((PBYTE)base + offset)))
#define ReadInt(base, offset) (*(int *)(((PBYTE)base + offset)))
#define ReadFloat(base, offset) (*(float *)(((PBYTE)base + offset)))
#define ReadDWORD(base, offset) (*(PDWORD)(((PBYTE)base + offset)))
#define ReadBYTE(base, offset) (*(((PBYTE)base + offset)))
//Check if object is in rectangle
boolean isInRectangle(double centerX, double centerY, double radius, double x, double y)
{
return x >= centerX - radius && x <= centerX + radius &&
y >= centerY - radius && y <= centerY + radius;
}
//string to wstring converter
std::wstring s2ws(const std::string& s) {
std::string curLocale = setlocale(LC_ALL, "");
const char* _Source = s.c_str();
size_t _Dsize = mbstowcs(NULL, _Source, 0) + 1;
wchar_t* _Dest = new wchar_t[_Dsize];
wmemset(_Dest, 0, _Dsize);
mbstowcs(_Dest, _Source, _Dsize);
std::wstring result = _Dest;
delete[]_Dest;
setlocale(LC_ALL, curLocale.c_str());
return result;
}
//String to char converter
char* StringToChar(std::string string)
{
return _strdup(string.c_str());
}
//Message logger
template <class T>
void msg(T msg)
{
std::cout << msg << std::endl;
}
//Check if a file exists
bool FileExists(const std::string& fileName)
{
struct stat buffer;
return (stat(fileName.c_str(), &buffer) == 0);
}
//Write data to .ini file
void WriteStringToIni(std::string string, std::string file, std::string app, std::string key)
{
WritePrivateProfileStringA(app.c_str(), key.c_str(), string.c_str(), file.c_str());
}
//Read data from .ini file
std::string ReadStringFromIni(std::string file, std::string app, std::string key)
{
char buf[100];
GetPrivateProfileStringA(app.c_str(), key.c_str(), XorStr("NULL").c_str(), buf, 100, file.c_str());
return (std::string)buf;
}
double return_float_value(float val69)
{
return (float)val69;
}
//values
float new_crosshairx = 1;
float new_crosshairy = 1;
float new_crosshairt = 1;
float new_aimfov = 1;
float new_aimsmooth = 1;
float new_aimdistance = 1;
std::string ReadStringFromIni_Float(std::string file, std::string app, std::string key, int float_code)
{
char buf[100];
GetPrivateProfileStringA(app.c_str(), key.c_str(), XorStr("NULL").c_str(), buf, 100, file.c_str());
if (float_code == 0)
{
system(XorStr("cls").c_str());
std::cout << XorStr("\n loading error 14 - contact support.").c_str();
Sleep(5000);
exit(0);
}
else if (float_code == 1) //crosshairx
{
new_crosshairx = std::stof(buf);
}
else if (float_code == 2) //crosshairy
{
new_crosshairy = std::stof(buf);
}
else if (float_code == 3) //crosshairthinkness
{
new_crosshairt = std::stof(buf);
}
else if (float_code == 4) //aimfov
{
new_aimfov = std::stof(buf);
}
else if (float_code == 5) //aimsmooth
{
new_aimsmooth = std::stof(buf);
}
else if (float_code == 6) //aimdistance
{
new_aimdistance = std::stof(buf);
}
//std::string str = "123.4567"; //key
// convert string to float
//float num_float = std::stof(str); //key
// convert string to double
//double num_double = std::stod(str);
//output = num_float;
//output = (float)88;
//std::string::size_type sz;
//output = std::stof(buf, &sz);
return (std::string)buf;
}
//WinProc (required for ImGui menu)
extern LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); LRESULT CALLBACK WinProc(HWND hWnd, UINT Message, WPARAM wParam, LPARAM lParam);
LRESULT CALLBACK WinProc(HWND hWnd, UINT Message, WPARAM wParam, LPARAM lParam)
{
if (ImGui_ImplWin32_WndProcHandler(hWnd, Message, wParam, lParam)) {
return true;
}
switch (Message)
{
case WM_DESTROY:
PostQuitMessage(0);
exit(4);
break;
case WM_SIZE:
if (p_Device != NULL && wParam != SIZE_MINIMIZED)
{
ImGui_ImplDX9_InvalidateDeviceObjects();
p_Params.BackBufferWidth = LOWORD(lParam);
p_Params.BackBufferHeight = HIWORD(lParam);
HRESULT hr = p_Device->Reset(&p_Params);
if (hr == D3DERR_INVALIDCALL) {
IM_ASSERT(0);
}
ImGui_ImplDX9_CreateDeviceObjects();
}
break;
default:
return DefWindowProc(hWnd, Message, wParam, lParam);
break;
}
return 0;
}
//Initialize Window, DirectX and ImGui style
HRESULT DirectXInit(HWND hWnd) {
if (FAILED(Direct3DCreate9Ex(D3D_SDK_VERSION, &p_Object))) {
exit(3);
}
ZeroMemory(&p_Params, sizeof(p_Params));
p_Params.Windowed = TRUE;
p_Params.SwapEffect = D3DSWAPEFFECT_DISCARD;
p_Params.hDeviceWindow = hWnd;
p_Params.MultiSampleQuality = D3DMULTISAMPLE_NONE;
p_Params.BackBufferFormat = D3DFMT_A8R8G8B8;
p_Params.BackBufferWidth = Settings::MajorValues::Width;
p_Params.BackBufferHeight = Settings::MajorValues::Height;
p_Params.EnableAutoDepthStencil = TRUE;
p_Params.AutoDepthStencilFormat = D3DFMT_D16;
p_Params.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
if (FAILED(p_Object->CreateDeviceEx(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_HARDWARE_VERTEXPROCESSING, &p_Params, 0, &p_Device)))
{
p_Object->Release();
exit(4);
}
IMGUI_CHECKVERSION();
ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO();
ImFontConfig font_config;
font_config.OversampleH = 1;
font_config.OversampleV = 1;
font_config.PixelSnapH = true;
static const ImWchar ranges[] =
{
0x0020, 0x00FF,
0x0400, 0x044F,
0,
};
ImGui_ImplWin32_Init(hWnd);
ImGui_ImplDX9_Init(p_Device);
//ImGui::StyleColorsClassic();
ImGuiStyle& style = ImGui::GetStyle();
style.WindowBorderSize = 1.0f;
style.WindowRounding = 12.0f;
style.ItemSpacing = ImVec2(4, 4);
style.ItemInnerSpacing = ImVec2(4, 4);
style.IndentSpacing = 25.0f;
style.ScrollbarSize = 15.0f;
style.ScrollbarRounding = 0.0f;
style.GrabMinSize = 10.0f;
style.GrabRounding = 0.0f;
style.ChildRounding = 0.0f;
style.FrameRounding = 0.0f;
//imgui colors
ImGui::StyleColorsClassic();
//ImGuiStyle* style = &ImGui::GetStyle();
ImVec4* colorz = ImGui::GetStyle().Colors;
style.Colors[ImGuiCol_Text] = ImVec4(1.0f, 1.0f, 1.0f, 1.0f);
style.Colors[ImGuiCol_TextDisabled] = ImVec4(1.0f, 1.0f, 1.0f, 1.0f);
style.Colors[ImGuiCol_WindowBg] = ImColor(84, 89, 222, 255);
style.Colors[ImGuiCol_ChildWindowBg] = ImVec4(0.15f, 0.15f, 0.20f, 1.0f);
style.Colors[ImGuiCol_TitleBg] = ImVec4(0.2f, 0.2f, 0.4f, 1.0f);
style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.2f, 0.2f, 0.4f, 1.0f);
style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.2f, 0.2f, 0.4f, 1.0f);
style.Colors[ImGuiCol_Border] = ImVec4(0.0f, 0.0f, 0.0f, 1.0f);
style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.0f, 0.0f, 0.0f, 1.0f);
style.Colors[ImGuiCol_Button] = ImVec4(0.9f, 0.9f, 0.9f, 0.9f);
style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.9f, 0.9f, 0.9f, 0.75f);
style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.9f, 0.9f, 0.9f, 0.75f);
style.Colors[ImGuiCol_CheckMark] = ImVec4(0.9f, 0.9f, 0.9f, 0.9f);
style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.9f, 0.9f, 0.9f, 1.0f);
style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.9f, 0.9f, 0.9f, 1.0f);
style.Colors[ImGuiCol_FrameBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.54f);
style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.41f, 1.00f, 0.00f, 0.19f);
style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.000f, 1.000f, 0.917f, 1.000f);
ImGui::GetIO().Fonts->AddFontDefault();
p_Object->Release();
return S_OK;
}
//Create Window
void SetupWindow()
{
GameWnd = FindWindowW(NULL, TEXT("Fortnite "));
if (GameWnd)
{
GetClientRect(GameWnd, &GameRect);
POINT xy = { 0 };
ClientToScreen(GameWnd, &xy);
GameRect.left = xy.x;
GameRect.top = xy.y;
Settings::MajorValues::Width = GameRect.right;
Settings::MajorValues::Height = GameRect.bottom;
}
else {
exit(2);
}
WNDCLASSEX overlayWindowClass;
ZeroMemory(&overlayWindowClass, sizeof(WNDCLASSEX));
overlayWindowClass.cbClsExtra = NULL;
overlayWindowClass.cbWndExtra = NULL;
overlayWindowClass.cbSize = sizeof(WNDCLASSEX);
overlayWindowClass.style = CS_HREDRAW | CS_VREDRAW;
overlayWindowClass.lpfnWndProc = WinProc;
overlayWindowClass.hInstance = NULL;
overlayWindowClass.hCursor = LoadCursor(NULL, IDC_ARROW);
overlayWindowClass.hIcon = LoadIcon(0, IDI_APPLICATION);
overlayWindowClass.hIconSm = LoadIcon(0, IDI_APPLICATION);
overlayWindowClass.hbrBackground = (HBRUSH)RGB(0, 0, 0);
overlayWindowClass.lpszClassName = L"mnfgdnjsah4678zvsdgtzuiztnehtzui5ezu5e4bjdfbjnfgb4frc76e48be4utdhubtdug4w7b7e4b74wbw48bw48w48bw4b8w7b8g6rubetzubet78hb4wehvs87w95eg6vnmshfenmzgi8";
overlayWindowClass.lpszMenuName = L"mnfgdnjsah4678zvsdgtzuiztnehtzui5ezu5e4bjdfbjnfgb4frc76e48be4utdhubtdug4w7b7e4b74wbw48bw48w48bw4b8w7b8g6rubetzubet78hb4wehvs87w95eg6vnmshfenmzgi8";
RegisterClassEx(&overlayWindowClass);
MyWnd = CreateWindowEx(NULL, L"mnfgdnjsah4678zvsdgtzuiztnehtzui5ezu5e4bjdfbjnfgb4frc76e48be4utdhubtdug4w7b7e4b74wbw48bw48w48bw4b8w7b8g6rubetzubet78hb4wehvs87w95eg6vnmshfenmzgi8", L"mnfgdnjsah4678zvsdgtzuiztnehtzui5ezu5e4bjdfbjnfgb4frc76e48be4utdhubtdug4w7b7e4b74wbw48bw48w48bw4b8w7b8g6rubetzubet78hb4wehvs87w95eg6vnmshfenmzgi8", WS_POPUP | WS_VISIBLE, GameRect.left, GameRect.top, Settings::MajorValues::Width, Settings::MajorValues::Height, NULL, NULL, NULL, NULL);
MARGINS margin = { GameRect.left, GameRect.top, Settings::MajorValues::Width, Settings::MajorValues::Height };
DwmExtendFrameIntoClientArea(MyWnd, &margin);
SetWindowLong(MyWnd, GWL_EXSTYLE, WS_EX_LAYERED | WS_EX_TRANSPARENT);
ShowWindow(MyWnd, SW_SHOW);
ITaskbarList* pTaskList = NULL;
HRESULT initRet = CoInitialize(NULL);
HRESULT createRet = CoCreateInstance(CLSID_TaskbarList,
NULL,
CLSCTX_INPROC_SERVER,
IID_ITaskbarList,
(LPVOID*)&pTaskList);
if (createRet == S_OK)
{
pTaskList->DeleteTab(FindWindowA(NULL, XorStr("mnfgdnjsah4678zvsdgtzuiztnehtzui5ezu5e4bjdfbjnfgb4frc76e48be4utdhubtdug4w7b7e4b74wbw48bw48w48bw4b8w7b8g6rubetzubet78hb4wehvs87w95eg6vnmshfenmzgi8").c_str()));
pTaskList->Release();
}
CoUninitialize();
//::ShowWindow(::GetConsoleWindow(), SW_HIDE);
UpdateWindow(MyWnd);
}
//KeyAuth setup
//Options, Settings
struct
{
bool ShowMenu = false;
bool FirstUse = true;
int MenuTab = 0;
float Width;
float Height;
struct
{
bool Enable = true;
bool DrawFOV = true;
bool autofiretrigger = false;
bool ClosestByCrosshair = true;
bool ClosestByDistance = false;
bool AimPos_Head = true;
bool AimPos_Body = false;
float AimbotFOV = 50.0f;
float AimbotSmooth = 2.0f;
float AimbotMaximalDistance = 100.0f;
bool AimKey_RMB = true;
bool AimKey_SHIFT = false;
bool AimKey_DOWN = false;
int AimKey;
} Aimbot;
struct {
bool Boxes = true;
bool filledboxes = false;
bool Skeletons = false;
bool Snaplines = true;
bool Distance = true;
bool HeadDot= false;
bool Nickname;
bool ActiveItemOrWeapon;
bool esppreview = true;
bool PlayerESP = true;
bool enabled = true;
} Visuals;
struct
{
bool FakeKeyboardSounds = false;
bool Crosshair = false;
bool WhiteCross = false;
float CrosshairX = 10.0f;
float CrosshairY = 10.0f;
float CrosshairThickness = 1.0f;
} Misc;
} Options;
//Find closest 3D Object to 2D point
using namespace std;
int getClosest(int val1, int val2,
int target)
{
if (target - val1 >= val2 - target)
return val2;
else
return val1;
}
int findClosest(int arr[], int n, int target)
{
if (target <= arr[0])
return arr[0];
if (target >= arr[n - 1])
return arr[n - 1];
int i = 0, j = n, mid = 0;
while (i < j) {
mid = (i + j) / 2;
if (arr[mid] == target)
return arr[mid];
if (target < arr[mid]) {
if (mid > 0 && target > arr[mid - 1])
return getClosest(arr[mid - 1],
arr[mid], target);
j = mid;
}
else {
if (mid < n - 1 && target < arr[mid + 1])
return getClosest(arr[mid],
arr[mid + 1], target);
i = mid + 1;
}
}
return arr[mid];
}
//Definition of game addresses
DWORD_PTR Uworld;
DWORD_PTR LocalPawn;
DWORD_PTR Localplayer;
DWORD_PTR Rootcomp;
DWORD_PTR PlayerController;
DWORD_PTR Ulevel;
DWORD_PTR entityx;
int localplayerID;
extern Vector3 CameraEXT(0, 0, 0);
float FovAngle;
Vector3 localactorpos;
Vector3 Localcam;
bool isaimbotting = false;
//WorldToScreen - Convert a 3D Object to 2D Screen x, y position
Vector3 ProjectWorldToScreen69(Vector3 WorldLocation, Vector3 camrot)
{
Vector3 Screenlocation = Vector3(0, 0, 0);
Vector3 Camera;
auto chain69 = read<uintptr_t>(Localplayer + 0xa8);
uint64_t chain699 = read<uintptr_t>(chain69 + 8);
Camera.x = read<float>(chain699 + 0x7F8); //camera pitch watch out for x and y swapped 4u
Camera.y = read<float>(Rootcomp + 0x12C); //camera yaw
float test = asin(Camera.x);
float degrees = test * (180.0 / M_PI);
Camera.x = degrees;
if (Camera.y < 0)
Camera.y = 360 + Camera.y;
D3DMATRIX tempMatrix = Matrix(Camera);
Vector3 vAxisX, vAxisY, vAxisZ;
vAxisX = Vector3(tempMatrix.m[0][0], tempMatrix.m[0][1], tempMatrix.m[0][2]);
vAxisY = Vector3(tempMatrix.m[1][0], tempMatrix.m[1][1], tempMatrix.m[1][2]);
vAxisZ = Vector3(tempMatrix.m[2][0], tempMatrix.m[2][1], tempMatrix.m[2][2]);
uint64_t chain = read<uint64_t>(Localplayer + 0x70);
uint64_t chain1 = read<uint64_t>(chain + 0x98);
uint64_t chain2 = read<uint64_t>(chain1 + 0x140);
Vector3 vDelta = WorldLocation - read<Vector3>(chain2 + 0x10); //camera location credits for Object9999
Vector3 vTransformed = Vector3(vDelta.Dot(vAxisY), vDelta.Dot(vAxisZ), vDelta.Dot(vAxisX));
if (vTransformed.z < 1.f)
vTransformed.z = 1.f;
float zoom = read<float>(chain699 + 0x590);
FovAngle = 80.0f / (zoom / 1.19f);
float ScreenCenterX = Settings::MajorValues::ScreenCenterX;
float ScreenCenterY = Settings::MajorValues::ScreenCenterY;
Screenlocation.x = ScreenCenterX + vTransformed.x * (ScreenCenterX / tanf(FovAngle * (float)M_PI / 360.f)) / vTransformed.z;
Screenlocation.y = ScreenCenterY - vTransformed.y * (ScreenCenterX / tanf(FovAngle * (float)M_PI / 360.f)) / vTransformed.z;
CameraEXT = Camera;
return Screenlocation;
}
double GetCrossDistance(double x1, double y1, double x2, double y2)
{
return sqrt(pow((x2 - x1), 2) + pow((y2 - y1), 2));
}
bool GetClosestPlayerToCrossHair(Vector3 Pos, float& max, float aimfov, DWORD_PTR entity)
{
if (entity)
{
float Dist = GetCrossDistance(Pos.x, Pos.y, Settings::MajorValues::ScreenCenterX, Settings::MajorValues::ScreenCenterY);
if (Dist < max)
{
max = Dist;
entityx = entity;
Options.Aimbot.AimbotFOV = aimfov;
}
}
return false;
}
void AIms(DWORD_PTR entity, Vector3 Localcam)
{
float max = 100.f;
uint64_t currentactormesh = read<uint64_t>(entity + 0x280); // changed often
Vector3 rootHead = GetBoneWithRotation(currentactormesh, 66);
Vector3 rootHeadOut = ProjectWorldToScreen69(rootHead, Vector3(Localcam.y, Localcam.x, Localcam.z));
if (GetClosestPlayerToCrossHair(rootHeadOut, max, Options.Aimbot.AimbotFOV, entity))
entityx = entity;
}
void aimbot(float x, float y)
{
float ScreenCenterX = Settings::MajorValues::ScreenCenterX;
float ScreenCenterY = Settings::MajorValues::ScreenCenterY;
int AimSpeed = Options.Aimbot.AimbotSmooth;
float TargetX = 0;
float TargetY = 0;
if (x != 0)
{
if (x > ScreenCenterX)
{
TargetX = -(ScreenCenterX - x);
TargetX /= AimSpeed;
if (TargetX + ScreenCenterX > ScreenCenterX * 2) TargetX = 0;
}
if (x < ScreenCenterX)
{
TargetX = x - ScreenCenterX;
TargetX /= AimSpeed;
if (TargetX + ScreenCenterX < 0) TargetX = 0;
}
}
if (y != 0)
{
if (y > ScreenCenterY)
{
TargetY = -(ScreenCenterY - y);
TargetY /= AimSpeed;
if (TargetY + ScreenCenterY > ScreenCenterY * 2) TargetY = 0;
}
if (y < ScreenCenterY)
{
TargetY = y - ScreenCenterY;
TargetY /= AimSpeed;
if (TargetY + ScreenCenterY < 0) TargetY = 0;
}
}
mouse_event(MOUSEEVENTF_MOVE, static_cast<DWORD>(TargetX), static_cast<DWORD>(TargetY), NULL, NULL);
if (Options.Aimbot.autofiretrigger) {
mouse_event(MOUSEEVENTF_LEFTDOWN, DWORD(NULL), DWORD(NULL), DWORD(0x0002), ULONG_PTR(NULL));
mouse_event(MOUSEEVENTF_LEFTUP, DWORD(NULL), DWORD(NULL), DWORD(0x0004), ULONG_PTR(NULL));
}
return;
}
#include <Xinput.h>
void AimAt(DWORD_PTR entity, Vector3 Localcam)
{
{
uint64_t currentactormesh = read<uint64_t>(entity + 0x280);
auto rootHead = GetBoneWithRotation(currentactormesh, 66);
Vector3 rootHeadOut = ProjectWorldToScreen69(rootHead, Vector3(Localcam.y, Localcam.x, Localcam.z));
Vector3 Headpos = GetBoneWithRotation(currentactormesh, 66);
Vector3 HeadposW2s = ProjectWorldToScreen69(Headpos, Vector3(Localcam.y, Localcam.x, Localcam.z));
if (rootHeadOut.x != 0 || rootHeadOut.y != 0)
{
if ((GetCrossDistance(rootHeadOut.x, rootHeadOut.y, Settings::MajorValues::ScreenCenterX, Settings::MajorValues::ScreenCenterY) <= Options.Aimbot.AimbotFOV * 8) || isaimbotting)
{
aimbot(rootHeadOut.x, rootHeadOut.y);
//DrawString(_xor_("TRACKED").c_str(), 13, rootHeadOut.x, rootHeadOut.y - 0, 255, 255, 1);
//DrawLine(width / 2, height / 2, rootHeadOut.x, rootHeadOut.y, 1.f, 255.f, 0.f, 0.f, 1.0f);;;
}
}
}
}
void aimbot2(Vector3 Localcam)
{
if (entityx != 0)
{
if (GetAsyncKeyState(hotkeys::aimkey))
{
AimAt(entityx, Localcam);
}
else
{
isaimbotting = false;
}
}
}
int NewPlayerLocationX;
int NewPlayerLocationY;
Vector3 Headposw2s;
bool aimbottestnigga = false;
bool aimbottestnigga2 = false;
//Offsets
#define offset_uworld 0x9c9f3b0
#define offset_gameinstance 0x188
#define offset_localplayers 0x38
#define offset_playercontroller 0x30
#define offset_localpawn 0x2A0
#define offset_rootcomp 0x130
#define offset_playerid 0x18
#define offset_plevel 0x30
#define offset_playerstate 0x240
#define offset_actorcount 0xA0
#define offset_aactors 0x98
//ActorLoop
void ActorLoop()
{
Uworld = read<DWORD_PTR>(m_base + offset_uworld);
DWORD_PTR Gameinstance = read<DWORD_PTR>(Uworld + offset_gameinstance);
if (Gameinstance == (DWORD_PTR)nullptr)
return;
DWORD_PTR LocalPlayers = read<DWORD_PTR>(Gameinstance + offset_localplayers);
if (LocalPlayers == (DWORD_PTR)nullptr)
return;
Localplayer = read<DWORD_PTR>(LocalPlayers);
if (Localplayer == (DWORD_PTR)nullptr)
return;
PlayerController = read<DWORD_PTR>(Localplayer + offset_playercontroller);
if (PlayerController == (DWORD_PTR)nullptr)
return;
LocalPawn = read<uint64_t>(PlayerController + offset_localpawn);
if (LocalPawn == (DWORD_PTR)nullptr)
return;
Rootcomp = read<uint64_t>(LocalPawn + offset_rootcomp);
if (Rootcomp == (DWORD_PTR)nullptr)
return;
if (LocalPawn != 0) {
localplayerID = read<int>(LocalPawn + offset_playerid);
}
Ulevel = read<DWORD_PTR>(Uworld + offset_plevel);
if (Ulevel == (DWORD_PTR)nullptr)
return;
DWORD64 PlayerState = read<DWORD64>(LocalPawn + offset_playerstate);
if (PlayerState == (DWORD_PTR)nullptr)
return;
DWORD ActorCount = read<DWORD>(Ulevel + offset_actorcount);
DWORD_PTR AActors = read<DWORD_PTR>(Ulevel + offset_aactors);
if (AActors == (DWORD_PTR)nullptr)
return;
for (int i = 0; i < ActorCount; i++)
{
uint64_t CurrentActor = read<uint64_t>(AActors + i * 0x8);
int niggaid = read<int>(CurrentActor + offset_playerid);
if (niggaid == localplayerID)
{
uint64_t CurrentActorRootComponent = read<uint64_t>(CurrentActor + 0x130);
uint64_t currentactormesh = read<uint64_t>(CurrentActor + 0x280);
int MyTeamId = read<int>(PlayerState + 0xED8);
DWORD64 otherPlayerState = read<uint64_t>(CurrentActor + 0x240);
int ActorTeamId = read<int>(otherPlayerState + 0xED8);
Vector3 Headpos = GetBoneWithRotation(currentactormesh, 66);
Localcam = CameraEXT;
localactorpos = read<Vector3>(Rootcomp + 0x11C);
float distance = localactorpos.Distance(Headpos) / 100.f;
Vector3 CirclePOS = GetBoneWithRotation(currentactormesh, 2);
Vector3 bone0 = GetBoneWithRotation(currentactormesh, 0);
Vector3 bottom = ProjectWorldToScreen69(bone0, Vector3(Localcam.y, Localcam.x, Localcam.z));
Headposw2s = ProjectWorldToScreen69(Headpos, Vector3(Localcam.y, Localcam.x, Localcam.z));
aimbottestnigga = true;
Vector3 rootOut = GetBoneWithRotation(currentactormesh, 0);
Vector3 Out = ProjectWorldToScreen69(rootOut, Vector3(Localcam.y, Localcam.x, Localcam.z));
if (MyTeamId != ActorTeamId)
{
if (Options.Visuals.Distance)
{
char name[64];
sprintf_s(name, "Player | %2.fm", distance);
DrawString(14, Headposw2s.x, Headposw2s.y - 15, &Col.white_, true, true, name);
}
if (Options.Visuals.Snaplines && isInRectangle(960, 540, 800, bottom.x, bottom.y))
{
ImGui::GetOverlayDrawList()->AddLine(ImVec2(960, 1060), ImVec2(bottom.x, bottom.y), ImColor(255, 255, 255, 255), 1.0f);
}
if (Options.Visuals.Boxes)
{
float boxsize = (float)(Out.y - Headposw2s.y);
float boxwidth = boxsize / 3.0f;
float BoxHeight = (float)(Out.y - Headposw2s.y);
float BoxWidth = BoxHeight * 0.230f;
float dwpleftx = (float)Out.x - (BoxWidth / 1);
float dwplefty = (float)Out.y;
float CornerHeight = abs(Out.y - Headposw2s.y);
float CornerWidth = CornerHeight * 0.5; //0.5
ImGui::GetOverlayDrawList()->AddRect(ImVec2(dwpleftx, dwplefty), ImVec2(Headposw2s.x + boxwidth, Headposw2s.y + 5.0f), IM_COL32(255, 255, 255, 255));
}
if (Options.Aimbot.Enable && (GetAsyncKeyState(VK_SHIFT) || GetAsyncKeyState(0x02)) && isInRectangle(Settings::MajorValues::ScreenCenterX, Settings::MajorValues::ScreenCenterY, Options.Aimbot.AimbotFOV, Headposw2s.x, Headposw2s.y) && distance < Options.Aimbot.AimbotMaximalDistance)
if (Options.Aimbot.Enable && (GetAsyncKeyState(VK_DOWN) || GetAsyncKeyState(0x02)) && isInRectangle(Settings::MajorValues::ScreenCenterX, Settings::MajorValues::ScreenCenterY, Options.Aimbot.AimbotFOV, Headposw2s.x, Headposw2s.y) && distance < Options.Aimbot.AimbotMaximalDistance)
{
aimbottestnigga2 = true;
float AimbotLocationX; float AimbotLocationY; int AllPlayerLocationX = Headposw2s.x; int AllPlayerLocationY = Headposw2s.y; int array69_x[] = { AllPlayerLocationX }; int n_x = sizeof(array69_x) / sizeof(array69_x[0]); int array69_y[] = { AllPlayerLocationY }; int n_y = sizeof(array69_y) / sizeof(array69_y[0]); int targetX = Settings::MajorValues::ScreenCenterX; int targetY = Settings::MajorValues::ScreenCenterY; NewPlayerLocationX = findClosest(array69_x, n_x, targetX); NewPlayerLocationY = findClosest(array69_y, n_y, targetY); AimbotLocationX = NewPlayerLocationX; AimbotLocationY = NewPlayerLocationY;
}
if (Options.Visuals.filledboxes) {
float boxsize = (float)(Out.y - Headposw2s.y);
float boxwidth = boxsize / 3.0f;
float BoxHeight = (float)(Out.y - Headposw2s.y);
float BoxWidth = BoxHeight * 0.224f;
float dwpleftx = (float)Out.x - (BoxWidth / 1);
float dwplefty = (float)Out.y;
float CornerHeight = abs(Out.y - Headposw2s.y);
float CornerWidth = CornerHeight * 0.5; //0.5
ImGui::GetOverlayDrawList()->AddRectFilled(ImVec2(dwpleftx, dwplefty), ImVec2(Headposw2s.x + boxwidth, Headposw2s.y + 5.0f), IM_COL32(40, 40, 40, 180));
}
}
}
}
}
//Aimbot loop
void AimbotLoop()
{
while (1)
{
if (Options.Aimbot.Enable && aimbottestnigga && aimbottestnigga2)
{
if (Options.Aimbot.AimKey_RMB && GetAsyncKeyState(0x02))
{
aimbot(NewPlayerLocationX, NewPlayerLocationY);
}
else if (Options.Aimbot.AimKey_SHIFT && GetAsyncKeyState(VK_SHIFT))
{
aimbot(NewPlayerLocationX, NewPlayerLocationY);
}
else if (Options.Aimbot.AimKey_DOWN && GetAsyncKeyState(VK_DOWN))
{
aimbot(NewPlayerLocationX, NewPlayerLocationY);
}
}
aimbottestnigga = false;
aimbottestnigga2 = false;
break;
}
}
//Reset menu settings
void resetmenu()
{
Options.Aimbot.Enable = true;
Options.Aimbot.DrawFOV = true;
Options.Aimbot.ClosestByCrosshair = true;
Options.Aimbot.ClosestByDistance = false;
Options.Aimbot.AimPos_Head = true;
Options.Aimbot.AimPos_Body = false;
Options.Aimbot.AimbotFOV = 50.0f;
Options.Aimbot.AimbotSmooth = 2.0f;
Options.Aimbot.AimbotMaximalDistance = 100.0f;
Options.Aimbot.AimKey;
Options.Visuals.Boxes = true;
Options.Visuals.filledboxes = false;
Options.Visuals.Skeletons;
Options.Visuals.Snaplines = true;
Options.Visuals.Distance = true;
Options.Visuals.HeadDot;
Options.Visuals.Nickname;
Options.Visuals.ActiveItemOrWeapon;
Options.Misc.FakeKeyboardSounds = false;
Options.Misc.Crosshair = false;
Options.Misc.WhiteCross = false;
Options.Misc.CrosshairX = 10.0f;
Options.Misc.CrosshairY = 10.0f;
Options.Misc.CrosshairThickness = 1.0f;
Sleep(200);
Options.ShowMenu = true;
Options.MenuTab = 0;
}
//Menu colors
void rendercolors()
{
//if (auth_check_nigga_shit != XorStr("true").c_str())
//{
// std::cout << XorStr("\n Loading error 4 - contact support").c_str();
// Sleep(-1);
// exit(0);
//}
}
//Render cheat addons
void RenderAddons()
{
//Aimbot FOV circle
if (Options.Aimbot.DrawFOV) { ImGui::GetOverlayDrawList()->AddCircle(ImVec2(Settings::MajorValues::ScreenCenterX, Settings::MajorValues::ScreenCenterY), Options.Aimbot.AimbotFOV, ImGui::GetColorU32({ 0.8f, 0.8f, 0.8f, 0.9f }), 32, 1.0f);}
//Crosshair
if (Options.Misc.Crosshair){ImGui::GetOverlayDrawList()->AddLine(ImVec2(Settings::MajorValues::ScreenCenterX - Options.Misc.CrosshairX, Settings::MajorValues::ScreenCenterY), ImVec2(Settings::MajorValues::ScreenCenterX + Options.Misc.CrosshairX, Settings::MajorValues::ScreenCenterY), ImGui::GetColorU32({ 0.8f, 0.0f, 0.0f, 0.9f }), Options.Misc.CrosshairThickness);ImGui::GetOverlayDrawList()->AddLine(ImVec2(Settings::MajorValues::ScreenCenterX, Settings::MajorValues::ScreenCenterY - Options.Misc.CrosshairY), ImVec2(Settings::MajorValues::ScreenCenterX, Settings::MajorValues::ScreenCenterY + Options.Misc.CrosshairY), ImGui::GetColorU32({ 0.8f, 0.0f, 0.0f, 0.9f }), Options.Misc.CrosshairThickness);}
}
//Save config
void SaveConfig()
{
//Aimbot
if (Options.Aimbot.Enable)
WriteStringToIni(XorStr("1").c_str(), XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("aimbot").c_str());
else
WriteStringToIni(XorStr("0").c_str(), XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("aimbot").c_str());
//Draw FOV
if (Options.Aimbot.DrawFOV)
WriteStringToIni(XorStr("1").c_str(), XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("drawfov").c_str());
else
WriteStringToIni(XorStr("0").c_str(), XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("drawfov").c_str());
//Snaplines
if (Options.Visuals.Snaplines)
WriteStringToIni(XorStr("1").c_str(), XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("snaplines").c_str());
else
WriteStringToIni(XorStr("0").c_str(), XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("snaplines").c_str());
//Distance
if (Options.Visuals.Distance)
WriteStringToIni(XorStr("1").c_str(), XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("distance").c_str());
else
WriteStringToIni(XorStr("0").c_str(), XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("distance").c_str());
//Boxes
if (Options.Visuals.Boxes)
WriteStringToIni(XorStr("1").c_str(), XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("boxes").c_str());
else
WriteStringToIni(XorStr("0").c_str(), XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("boxes").c_str());
//filledboxes
if (Options.Visuals.filledboxes)
WriteStringToIni(XorStr("1").c_str(), XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("fillboxes").c_str());
else
WriteStringToIni(XorStr("0").c_str(), XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("fillboxes").c_str());
//Crosshair
if (Options.Visuals.Boxes)
WriteStringToIni(XorStr("1").c_str(), XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("crosshair").c_str());
else
WriteStringToIni(XorStr("0").c_str(), XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("crosshair").c_str());
//AimFOV
WriteStringToIni(std::to_string(Options.Aimbot.AimbotFOV), XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("aimfov").c_str());
//Smooth
WriteStringToIni(std::to_string(Options.Aimbot.AimbotSmooth), XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("smooth").c_str());
//Distance
WriteStringToIni(std::to_string(Options.Aimbot.AimbotMaximalDistance), XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("distanceslider").c_str());
//CrosshairX
WriteStringToIni(std::to_string(Options.Misc.CrosshairX), XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("crosshairx").c_str());
//CrosshairX
WriteStringToIni(std::to_string(Options.Misc.CrosshairY), XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("crosshairy").c_str());
//CrosshairThickness
WriteStringToIni(std::to_string(Options.Misc.CrosshairThickness), XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("crosshairt").c_str());
}
//Load config
void LoadConfig()
{
//Aimbot
if (ReadStringFromIni(XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("aimbot").c_str()) == XorStr("1").c_str())
Options.Aimbot.Enable = true;
else
Options.Aimbot.Enable = false;
//Draw FOV
if (ReadStringFromIni(XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("drawfov").c_str()) == XorStr("1").c_str())
Options.Aimbot.DrawFOV = true;
else
Options.Aimbot.DrawFOV = false;
//Snaplines
if (ReadStringFromIni(XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("snaplines").c_str()) == XorStr("1").c_str())
Options.Visuals.Snaplines = true;
else
Options.Visuals.Snaplines = false;
//Distance
if (ReadStringFromIni(XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("distance").c_str()) == XorStr("1").c_str())
Options.Visuals.Distance = true;
else
Options.Visuals.Distance = false;
//Boxes
if (ReadStringFromIni(XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("boxes").c_str()) == XorStr("1").c_str())
Options.Visuals.Boxes = true;
else
Options.Visuals.Boxes = false;
//Crosshair
if (ReadStringFromIni(XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("crosshair").c_str()) == XorStr("1").c_str())
Options.Misc.Crosshair = true;
else
Options.Misc.Crosshair = false;
//CrosshairX
ReadStringFromIni_Float(XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("crosshairx").c_str(), 1);
Options.Misc.CrosshairX = new_crosshairx;
//CrosshairY
ReadStringFromIni_Float(XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("crosshairy").c_str(), 2);
Options.Misc.CrosshairY = new_crosshairy;
//CrosshairThickness
ReadStringFromIni_Float(XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("crosshairt").c_str(), 3);
Options.Misc.CrosshairThickness = new_crosshairt;
//AimFOV
ReadStringFromIni_Float(XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("aimfov").c_str(), 4);
Options.Aimbot.AimbotFOV = new_aimfov;
//AimSmooth
ReadStringFromIni_Float(XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("smooth").c_str(), 5);
Options.Aimbot.AimbotSmooth = new_aimsmooth;
//AimDistance
ReadStringFromIni_Float(XorStr("C:\\Insanity\\config.ini").c_str(), XorStr("options").c_str(), XorStr("distanceslider").c_str(), 6);
Options.Aimbot.AimbotMaximalDistance = new_aimdistance;
}
//Renderer
void renderLoopCall() {
//Render setup
ImGui_ImplDX9_NewFrame(); ImGui_ImplWin32_NewFrame(); ImGui::NewFrame();
RECT rect = { 0 }; if (GetWindowRect(GameWnd, &rect)) { Settings::MajorValues::Width = rect.right - rect.left; Settings::MajorValues::Height = rect.bottom - rect.top; } Settings::MajorValues::ScreenCenterX = (Settings::MajorValues::Width / 2.0f), Settings::MajorValues::ScreenCenterY = (Settings::MajorValues::Height / 2.0f);
//Render cheat addons
RenderAddons();
//Start the ActorLoop (ESP, etc.)
ActorLoop();