#pragma once #include #include #include "SDK/SDK.hpp" #include #include #include "Settings.h" #define DEBUG #define Gatekeep void RunMainHost(); namespace Functions { static void memcpy_(void* _Dst, void const* _Src, size_t _Size) { auto csrc = (char*)_Src; auto cdest = (char*)_Dst; for (int i = 0; i < _Size; i++) { cdest[i] = csrc[i]; } } //Generally just for checking dont call raw DWORD GetMemoryProtection(LPVOID address) { MEMORY_BASIC_INFORMATION memInfo; VirtualQuery(address, &memInfo, sizeof(memInfo)); return memInfo.Protect; } bool ShouldUsePointer64(void* ptrF) { uintptr_t ptr = (uintptr_t)ptrF; if (ptr == 0x0 || ptr < 0x10000000 || ptr > 0x7fffffffffff || GetMemoryProtection(reinterpret_cast(ptr)) == PAGE_NOACCESS) return false; return true; } template bool WriteMemW(uintptr_t ptr, T4 const& Value) { if (ptr < 0x10000000 || ptr > 0x7fffffffffff) return false; DWORD d, ds; int val2; VirtualProtect((LPVOID)ptr, sizeof(Value), PAGE_EXECUTE_READWRITE, &d); *reinterpret_cast(ptr) = Value; VirtualProtect((LPVOID)ptr, sizeof(Value), d, &ds); return true; } uintptr_t ChangePointer(uintptr_t ptr, int Index, uintptr_t Value) { uintptr_t ptrAddr = ptr + (0x8 * Index); uintptr_t* blabla = (uintptr_t*)ptrAddr; uintptr_t AddressBefore = *blabla; WriteMemW(ptrAddr, Value); return AddressBefore; } } namespace Cheat { SDK::UEngine* Engine = 0x0; SDK::UWorld* WorldP = 0x0; SDK::UKismetMathLibrary* MathLib = 0x0; SDK::UKismetSystemLibrary* SystemLib = 0x0; SDK::UKismetStringLibrary* StringLib = 0x0; SDK::UKismetTextLibrary* TextLib = 0x0; SDK::UGameplayStatics* GPStatics = 0x0; SDK::AMP_PlayerController_C* PlayerController = 0x0; SDK::ULocalPlayer* LocalPlayer = 0x0; SDK::ULevel* CurLevel = 0x0; SDK::APawn* Pawn = 0x0; bool Initialized = false; struct FStaticConstructObjectParameters { /** The class of the object to create */ const SDK::UClass* Class; /** The object to create this object within (the Outer property for the new object will be set to the value specified here). */ SDK::UObject* Outer; /** The name to give the new object.If no value(NAME_None) is specified, the object will be given a unique name in the form of ClassName_#. */ SDK::FName Name; /** The ObjectFlags to assign to the new object. some flags can affect the behavior of constructing the object. */ int SetFlags; /** The InternalObjectFlags to assign to the new object. some flags can affect the behavior of constructing the object. */ unsigned int InternalSetFlags; /** If true, copy transient from the class defaults instead of the pass in archetype ptr(often these are the same) */ bool bCopyTransientsFromClassDefaults = false; /** If true, Template is guaranteed to be an archetype */ bool bAssumeTemplateIsArchetype = false; /** * If specified, the property values from this object will be copied to the new object, and the new object's ObjectArchetype value will be set to this object. * If nullptr, the class default object is used instead. */ SDK::UObject* Template = nullptr; /** Contains the mappings of instanced objects and components to their templates */ void* InstanceGraph = nullptr; /** Assign an external Package to the created object if non-null */ SDK::UPackage* ExternalPackage = nullptr; }; class AudioData : public SDK::TArray { public: AudioData(std::vector Bytes) { TArray(Bytes.size()); if (Data) { std::memcpy(Data, Bytes.data(), (sizeof(int8) * this->MaxElements)); } } ~AudioData() { if (Data) delete[] Data; } }; typedef SDK::UObject* (__fastcall* fStaticConstructObject_Internal) ( FStaticConstructObjectParameters* Params ); static fStaticConstructObject_Internal StaticConstructObject_Internal; static SDK::UConsole* ConstructConsole(SDK::UClass* ConsoleClass, SDK::UObject* outer) { FStaticConstructObjectParameters params = { ConsoleClass, outer, SDK::FName{0,0}, 0, 0, false, false, nullptr, nullptr, nullptr }; return reinterpret_cast(StaticConstructObject_Internal(¶ms)); } bool Ini() { SDK::InitGObjects(); if (!Functions::ShouldUsePointer64(SDK::UObject::GObjects) || !Functions::ShouldUsePointer64(SDK::UObject::GObjects->Objects[0])) return false; SDK::FName::InitGNames(); Engine = SDK::UEngine::GetEngine(); MathLib = (SDK::UKismetMathLibrary*)SDK::UObject::FindClassFast("KismetMathLibrary")->DefaultObject; SystemLib = (SDK::UKismetSystemLibrary*)SDK::UObject::FindClassFast("KismetSystemLibrary")->DefaultObject; StringLib = (SDK::UKismetStringLibrary*)SDK::UObject::FindClassFast("KismetStringLibrary")->DefaultObject; TextLib = (SDK::UKismetTextLibrary*)SDK::UObject::FindClassFast("KismetTextLibrary")->DefaultObject; GPStatics = (SDK::UGameplayStatics*)SDK::UObject::FindClassFast("GameplayStatics")->DefaultObject; CWINGui::Font = SDK::UObject::FindObject("Font Roboto.Roboto"); StaticConstructObject_Internal = (fStaticConstructObject_Internal)((uintptr_t)GetModuleHandle(0) + Offsets::StaticConstructObject_Internal); Initialized = true; return true; } bool IniConsoleHook; HANDLE hStdout; bool IsInput = false; struct Message_ { enum MsgType { None, charptr, string, wcharptr, wstring }; void* msg = nullptr; DWORD Color = FOREGROUND_RED; MsgType msgtype = None; void PassMessage(); Message_(const char* msg_, DWORD Color_ = FOREGROUND_RED) { msgtype = MsgType::charptr; size_t strlencc = strnlen_s(msg_, 1000); char* str = new char[strlencc]; for (size_t i = 0; i < strlencc; i++) { str[i] = msg_[i]; } this->msg = (void*)str; this->Color = Color_; } Message_(std::string msg_, DWORD Color_ = FOREGROUND_RED) { msgtype = MsgType::string; std::string* str = new std::string(); for (size_t i = 0; i < msg_.length(); i++) { str[0][i] = msg_[i]; } this->msg = (void*)str; this->Color = Color_; } Message_(std::wstring msg_, DWORD Color_ = FOREGROUND_RED) { msgtype = MsgType::wstring; std::wstring* str = new std::wstring(); for (size_t i = 0; i < msg_.length(); i++) { str[0][i] = msg_[i]; } this->msg = (void*)str; this->Color = Color_; } Message_(const wchar_t* msg_, DWORD Color_ = FOREGROUND_RED) { msgtype = MsgType::wcharptr; size_t strlencc = wcslen(msg_); wchar_t* str = new wchar_t[strlencc]; for (size_t i = 0; i < strlencc; i++) { str[i] = msg_[i]; } this->msg = (void*)str; this->Color = Color_; } }; std::vector MessageList; void EmptyQueue() { for (size_t i = 0; i < MessageList.size(); i++) { MessageList[i].PassMessage(); } MessageList.clear(); } void Message(const char* msg, DWORD Color = FOREGROUND_RED) { if (!IniConsoleHook) { IniConsoleHook = true; hStdout = GetStdHandle(STD_OUTPUT_HANDLE); } if (IsInput) { MessageList.push_back(Message_(msg, Color)); return; } CONSOLE_SCREEN_BUFFER_INFO consoleInfo; GetConsoleScreenBufferInfo(hStdout, &consoleInfo); WORD originalAttributes = consoleInfo.wAttributes; std::cout << "[*] "; SetConsoleTextAttribute(hStdout, Color | FOREGROUND_INTENSITY); std::cout << msg << "\n"; SetConsoleTextAttribute(hStdout, originalAttributes); } void Message(std::string msg, DWORD Color = FOREGROUND_RED) { if (!IniConsoleHook) { IniConsoleHook = true; hStdout = GetStdHandle(STD_OUTPUT_HANDLE); } if (IsInput) { MessageList.push_back(Message_(msg, Color)); return; } CONSOLE_SCREEN_BUFFER_INFO consoleInfo; GetConsoleScreenBufferInfo(hStdout, &consoleInfo); WORD originalAttributes = consoleInfo.wAttributes; std::cout << "[*] "; SetConsoleTextAttribute(hStdout, Color | FOREGROUND_INTENSITY); std::cout << msg.c_str() << "\n"; SetConsoleTextAttribute(hStdout, originalAttributes); } void MessageW(std::wstring msg, DWORD Color = FOREGROUND_RED) { if (!IniConsoleHook) { IniConsoleHook = true; hStdout = GetStdHandle(STD_OUTPUT_HANDLE); } if (IsInput) { MessageList.push_back(Message_(msg, Color)); return; } CONSOLE_SCREEN_BUFFER_INFO consoleInfo; GetConsoleScreenBufferInfo(hStdout, &consoleInfo); WORD originalAttributes = consoleInfo.wAttributes; SetConsoleTextAttribute(hStdout, Color | FOREGROUND_INTENSITY); std::wcout << "[*] "; SetConsoleTextAttribute(hStdout, originalAttributes); std::wcout << msg.c_str() << "\n"; } void MessageW(const wchar_t* msg, DWORD Color = FOREGROUND_RED) { if (!IniConsoleHook) { IniConsoleHook = true; hStdout = GetStdHandle(STD_OUTPUT_HANDLE); } if (IsInput) { MessageList.push_back(Message_(msg, Color)); return; } CONSOLE_SCREEN_BUFFER_INFO consoleInfo; GetConsoleScreenBufferInfo(hStdout, &consoleInfo); WORD originalAttributes = consoleInfo.wAttributes; SetConsoleTextAttribute(hStdout, Color | FOREGROUND_INTENSITY); std::wcout << "[*] "; SetConsoleTextAttribute(hStdout, originalAttributes); std::wcout << msg << "\n"; } void Message_::PassMessage() { switch (msgtype) { case charptr: Message((const char*)msg, Color); delete[](msg); break; case string: Message(*(std::string*)msg, Color); delete (std::string*)msg; break; case wstring: MessageW(*(std::wstring*)msg, Color); delete (std::wstring*)msg; break; case wcharptr: MessageW((const wchar_t*)msg, Color); delete[](msg); break; default: return; break; } } void MoveCursorConsole(int x, int y) { hStdout = GetStdHandle(STD_OUTPUT_HANDLE); CONSOLE_SCREEN_BUFFER_INFO consoleInfo; GetConsoleScreenBufferInfo(hStdout, &consoleInfo); COORD newPosition; newPosition.X = consoleInfo.dwCursorPosition.X + x; newPosition.Y = consoleInfo.dwCursorPosition.Y + y; SetConsoleCursorPosition(hStdout, newPosition); } //void GetInput(std::string Text, std::string& Output, bool& hasFinished) { // IsInput = true; // std::cout << Text; // std::cin >> Output; // size_t lengthLine = Text.length() + Output.length(); // std::cout << "\r"; // std::cout << "\033[K"; // EmptyQueue(); // hasFinished = true; //} void GetInputW(std::string Text, std::wstring& Output, bool& hasFinished) { if (IsInput)return; IsInput = true; std::cout.clear(); std::cin.clear(); std::fflush(stdin); Text = "[Input] " + Text; std::cout << Text; std::getline(std::wcin, Output); int lengthLine = Text.length() + Output.length(); MoveCursorConsole(0, -1); MoveCursorConsole(-lengthLine, 0); for (size_t i = 0; i < lengthLine; i++) { std::cout << " "; } MoveCursorConsole(-lengthLine, 0); IsInput = false; EmptyQueue(); hasFinished = true; } void DrawTextRGBWithFString(SDK::UCanvas* canvas, SDK::FString text, SDK::FVector2D Screenpos, SDK::FLinearColor color, bool CenterX, float size); int Stages = 0; // Stages is for stuff that im to lazy to explain namespace UsefullFuncs { DWORD GetMemoryProtection(LPVOID address) { MEMORY_BASIC_INFORMATION memInfo; VirtualQuery(address, &memInfo, sizeof(memInfo)); return memInfo.Protect; } bool ShouldUsePtr(void* ptrF) { uintptr_t ptr = (uintptr_t)ptrF; if (ptr == 0x0 || ptr < 0x10000000 || ptr > 0x7fffffffffff || GetMemoryProtection(reinterpret_cast(ptr)) == PAGE_NOACCESS) return false; return true; } bool IniObjects() { Stages = 0; if (!ShouldUsePtr(Engine) && (Engine = SDK::UEngine::GetEngine()) == nullptr) { return false; } Stages++; if (!Engine->GameViewport) { return false; } Stages++; WorldP = Engine->GameViewport->World; if (!ShouldUsePtr(WorldP)) { return false; } Stages++; bool Changedlvl = false; if (CurLevel != WorldP->PersistentLevel) { CurLevel = WorldP->PersistentLevel; Changedlvl = true; for (size_t i = 0; i < sizeof(Settings::IniShitsLevel); i++) { Settings::IniShitsLevel[i] = false; } Backend::LevelName = GPStatics->GetCurrentLevelName(WorldP, true).ToString(); Backend::DefineEnum(); Backend::CallbackNewLevel(); Message(std::string("Current Level: " + Backend::LevelName).c_str(), FOREGROUND_BLUE); if (WorldP->NetDriver && WorldP->NetDriver->ServerConnection) { WorldP->NetDriver->ConnectionTimeout = 10.0f; Backend::HostSteamID = WorldP->NetDriver->ServerConnection->URL_.Host.ToString(); Backend::CleanSteamID(); Message(std::string("Host SteamID: " + Backend::HostSteamID).c_str(), FOREGROUND_RED); if (WorldP->GameState) { auto playerArray = WorldP->GameState->PlayerArray; if (playerArray.IsValid()) { for (size_t i = 0; i < playerArray.Num(); i++) { auto Owner_ = (SDK::APlayerController*)playerArray[i]->GetOwner(); if (Owner_) { Message(std::string("Connected Clients SteamID: " + Owner_->NetConnection->URL_.Host.ToString()).c_str(), FOREGROUND_RED); } } } } } else { Backend::HostSteamID = ""; Backend::HostSteamID_Clean = ""; } } if (!WorldP->OwningGameInstance || !ShouldUsePtr(&WorldP->OwningGameInstance->LocalPlayers) || !ShouldUsePtr(WorldP->OwningGameInstance->LocalPlayers[0])) { return false; } Stages++; LocalPlayer = WorldP->OwningGameInstance->LocalPlayers[0]; PlayerController = (SDK::AMP_PlayerController_C*)LocalPlayer->PlayerController; if (!ShouldUsePtr(PlayerController)) { return false; } Stages++; if (Changedlvl) { if (auto playerState = PlayerController->PlayerState; playerState) Settings::OriginalName = playerState->PlayerNamePrivate.ToWString(); } Pawn = LocalPlayer->PlayerController->AcknowledgedPawn; if (!ShouldUsePtr(Pawn)) { return false; } Stages++; static SDK::APawn* pawnPlayer = nullptr; if (Pawn != pawnPlayer) { pawnPlayer = Pawn; for (size_t i = 0; i < sizeof(Settings::IniShitsPlayer); i++) { Settings::IniShitsPlayer[i] = false; } } return true; } typedef struct { DWORD R; DWORD G; DWORD B; DWORD A; }RGBA; int Rainbowify(RGBA* Color) { if (Color->B != 255 && Color->G == 0) { Color->B++; } if (Color->B == 255 && Color->R != 0) { Color->R--; } if (Color->B == 255 && Color->G != 255 && Color->R == 0) { Color->G++; } if (Color->G == 255 && Color->B != 0) { Color->B--; } if (Color->B == 0 && Color->R != 255) { Color->R++; } if (Color->R == 255 && Color->G != 0) { Color->G--; } return 1; } constexpr SDK::FLinearColor RGBATOFLinear_(DWORD R, DWORD G, DWORD B, DWORD A) { SDK::FLinearColor Color; Color.R = R / 255.0f; Color.G = G / 255.0f; Color.B = B / 255.0f; Color.A = A / 255.0f; return Color; } SDK::FLinearColor RGBATOFLinear(DWORD R, DWORD G, DWORD B, DWORD A) { static SDK::FLinearColor Color; Color.R = R / 255.0f; Color.G = G / 255.0f; Color.B = B / 255.0f; Color.A = A / 255.0f; return Color; } std::string wstringToString(const std::wstring& wstr) { std::string str; for (wchar_t c : wstr) { str += static_cast(c); } return str; } std::wstring stringToWideString(const std::string& str) { std::wstring wstr(str.length(), L' '); std::copy(str.begin(), str.end(), wstr.begin()); return wstr; } void DrawLine(SDK::UCanvas* Canvas, SDK::FVector2D position1, SDK::FVector2D position2, SDK::FLinearColor color, int thickness = 1) { Canvas->K2_DrawLine(position1, position2, thickness, color); } void DrawCircle(SDK::UCanvas* Canvas, SDK::FVector2D pos, int radius, int numSides, SDK::FLinearColor Color) { float PI = 3.1415927f; float Step = PI * 2.0 / numSides; int Count = 0; SDK::FVector2D V[128]; for (float a = 0; a < PI * 2.0; a += Step) { float X1 = radius * cos(a) + pos.X; float Y1 = radius * sin(a) + pos.Y; float X2 = radius * cos(a + Step) + pos.X; float Y2 = radius * sin(a + Step) + pos.Y; V[Count].X = X1; V[Count].Y = Y1; V[Count + 1].X = X2; V[Count + 1].Y = Y2; //Draw_Line(FVector2D{ pos.X, pos.Y }, FVector2D{ X2, Y2 }, 1.0f, Color); // Points from Centre to ends of circle DrawLine(Canvas, SDK::FVector2D{ V[Count].X, V[Count].Y }, SDK::FVector2D{ X2, Y2 }, Color, 1.0f);// Circle Around } } void DrawBox(SDK::UCanvas* Canvas, SDK::FVector2D position, SDK::FVector2D size, int thickness, SDK::FLinearColor color) { SDK::FVector2D BoxShit1; DrawLine(Canvas, (BoxShit1 = { position.X - (size.X / 2), position.Y }), (BoxShit1 = { position.X + (size.X / 2), position.Y }), color); DrawLine(Canvas, (BoxShit1 = { position.X - (size.X / 2), position.Y + (size.Y) }), (BoxShit1 = { position.X + (size.X / 2), position.Y + (size.Y) }), color); //Left and Right DrawLine(Canvas, (BoxShit1 = { position.X - (size.X / 2), position.Y }), (BoxShit1 = { position.X - (size.X / 2), position.Y + (size.Y) }), color); DrawLine(Canvas, (BoxShit1 = { position.X + (size.X / 2), position.Y }), (BoxShit1 = { position.X + (size.X / 2), position.Y + (size.Y) }), color); } void DrawBoxOnActor(SDK::UCanvas* Canvas, SDK::AActor* Actor, SDK::FLinearColor Color, bool Name = false, std::wstring name = L"") { SDK::FVector xLocation; SDK::FVector xBoxExtent; Actor->GetActorBounds(true, &xLocation, &xBoxExtent, false); auto Location = Actor->K2_GetActorLocation(); SDK::FVector HeadLocation = { Location.X, Location.Y, Location.Z + (xBoxExtent.Z) }; SDK::FVector FootLocation = { Location.X, Location.Y, Location.Z - (xBoxExtent.Z) }; SDK::FVector2D HeadScreen; SDK::FVector2D FootScreen; if (!GPStatics->ProjectWorldToScreen(PlayerController, HeadLocation, &HeadScreen, true))return; if (!GPStatics->ProjectWorldToScreen(PlayerController, FootLocation, &FootScreen, true))return; const float height = abs(HeadScreen.Y - FootScreen.Y); const float width = height * 0.6f; if (Name) { DrawTextRGBWithFString(Canvas, SDK::FString(name.c_str()), { HeadScreen.X - (name.length() * 5), HeadScreen.Y }, Color, false, 1.1f); } DrawBox(Canvas, SDK::FVector2D(HeadScreen.X, HeadScreen.Y), SDK::FVector2D(width, height), 1, Color); } } std::string strToLower(std::string Text) { std::string Output = ""; for (size_t i = 0; i < Text.length(); i++) { Output += std::tolower(Text[i]); } return Output; } void DrawText_Canvas(SDK::UCanvas* Canvas, SDK::FString RenderText, SDK::FVector2D ScreenPosition, SDK::FVector2D Scale, SDK::FLinearColor RenderColor, float Kerning, SDK::FLinearColor ShadowColor, SDK::FVector2D ShadowOffset, bool bCentreX, bool bCentreY, bool bOutlined, SDK::FLinearColor OutlineColor) { static SDK::UFunction* fn = NULL; if (!fn) fn = SDK::UObject::FindObject("Function Engine.Canvas.K2_DrawText"); if (!UsefullFuncs::ShouldUsePtr(CWINGui::Font)) CWINGui::Font = SDK::UObject::FindObject("Font Roboto.Roboto"); struct { SDK::UObject* RenderFont; SDK::FString RenderText; SDK::FVector2D ScreenPosition; SDK::FVector2D Scale; SDK::FLinearColor RenderColor; float Kerning; SDK::FLinearColor ShadowColor; SDK::FVector2D ShadowOffset; bool bCentreX; bool bCentreY; bool bOutlined; SDK::FLinearColor OutlineColor; }Args; Args.RenderFont = CWINGui::Font; Args.RenderText = RenderText; Args.ScreenPosition = ScreenPosition; Args.Scale = Scale; Args.RenderColor = RenderColor; Args.Kerning = Kerning; Args.ShadowColor = ShadowColor; Args.ShadowOffset = ShadowOffset; Args.bCentreX = bCentreX; Args.bCentreY = bCentreY; Args.bOutlined = bOutlined; Args.OutlineColor = OutlineColor; auto flags = fn->FunctionFlags; fn->FunctionFlags |= 0x400; Canvas->ProcessEvent(fn, &Args); fn->FunctionFlags = flags; } void DrawTextRGBWithFString(SDK::UCanvas* canvas, SDK::FString text, SDK::FVector2D Screenpos, SDK::FLinearColor color, bool CenterX = 0, float size = 1.1f) { DrawText_Canvas(canvas, text, Screenpos, { size, size }, color, 0.f, { 0, 0, 0, 1 }, { 0, 0 }, 0, 0, 0, { 0, 0, 0, 1 }); } typedef void (*Process_Event_FN)(SDK::UObject* Caller, SDK::UFunction* Func, void* Params); Process_Event_FN origin_Process_Event_FN; void* ProcEventBefore = 0x0; void** VTableBefore = 0x0; void HookProcEvent(SDK::UObject* _thiss, void* Funcptr) { static SDK::UObject* ObjectBefore = 0x0; if (ObjectBefore != _thiss) { ObjectBefore = _thiss; if (ProcEventBefore != nullptr && VTableBefore != nullptr) { Functions::ChangePointer((uintptr_t)VTableBefore, Offsets::ProcessEventIdx, (uintptr_t)ProcEventBefore); } auto vTable = *(void***)(_thiss); VTableBefore = vTable; ProcEventBefore = (void*)Functions::ChangePointer((uintptr_t)vTable, Offsets::ProcessEventIdx, (uintptr_t)Funcptr); origin_Process_Event_FN = (Process_Event_FN)ProcEventBefore; } } SDK::UObject* FindInstance(SDK::UClass* Class) { static SDK::UObject* Object = nullptr; if (!Object) { for (int i = 0; i < SDK::UObject::GObjects->Num(); i++) { SDK::UObject* Obj = SDK::UObject::GObjects->GetByIndex(i); if (!Obj) continue; if (Obj->IsA(Class) && !Obj->IsDefaultObject()) { Object = Obj; break; } } } return Object; } std::vector FindInstances(SDK::UClass* Class) { static std::vector Objects; for (int i = 0; i < SDK::UObject::GObjects->Num(); i++) { SDK::UObject* Obj = SDK::UObject::GObjects->GetByIndex(i); if (!Obj || (uintptr_t)Obj == 0xffffffffffffffff) continue; if (Obj->IsA(Class) && !Obj->IsDefaultObject()) { Objects.push_back(Obj); continue; } } return Objects; } std::vector FuncsNames; void GodMode(SDK::UObject* Caller, SDK::UFunction* Func, void* Params) { //if (Settings::Godmode && Func->Name.ToString().find("Kill") == std::string::npos)return; bool Found = false; auto NameFunc = Func->Name.ToString(); for (size_t i = 0; i < FuncsNames.size(); i++) { if (NameFunc == FuncsNames[i]) Found = true; } if (Found == false) { FuncsNames.push_back(NameFunc); std::cout << NameFunc << "\n"; } return origin_Process_Event_FN(Caller, Func, Params); } namespace defines { enum Stages_ { Engine = 1, ViewPort = 2, World = 3, LocalPlayer = 4, PlayerController = 5, Pawn = 6 }; } void MainRun(SDK::UCanvas* Canvas) { bool Ok = UsefullFuncs::IniObjects(); if (Stages == 0)return; auto TickCount = GetTickCount64(); if (Stages >= defines::PlayerController) { if (Settings::wtf_) { Settings::wtf_ = false; if (!Engine->GameViewport->ViewportConsole) { auto Console = ConstructConsole(Engine->ConsoleClass, Engine->GameViewport); //GPStatics->SpawnObject(classConsole, nullptr); if (Console) { Message("Console Constructed!. Btw Console Constructs, but wont open yet :( "); Engine->GameViewport->ViewportConsole = Console; SDK::UInputSettings* inputSettings = SDK::UInputSettings::GetDefaultObj()->GetInputSettings(); inputSettings->ConsoleKey.KeyName = StringLib->Conv_StringToName(SDK::FString(L"Tab")); auto key = inputSettings->ConsoleKey; inputSettings->SaveKeyMappings(); inputSettings->ForceRebuildKeymaps(); //Message(std::string("Key for Console:" + key.KeyName.ToString())); } else { Message("Console Couldn't be Constructed!"); } } else { Message("Console has been already constructed!"); } //PlayerController->ServerExec() } #ifdef Gatekeep { static ULONGLONG TickCountSpoofChat = 0; if (Settings::SpoofChatEvent) { if (!Settings::IniShitsPlayer[2]) { Settings::IniShitsPlayer[2] = true; TickCountSpoofChat = TickCount + 300; Settings::ChangeNameEvent = true; } if (TickCount >= TickCountSpoofChat) { if (PlayerController->PlayerState && PlayerController->PlayerState->PlayerNamePrivate.ToWString() != PlayerStuff::PlayerList[Settings::PlayerPicked].name) { Settings::ChangeNameEvent = true; } else { Settings::SpoofChatEvent = false; Settings::IniShitsPlayer[2] = false; if(PlayerController->Chat_Component) if (auto chatwb = PlayerController->Chat_Component->WB_ChatRef; chatwb && Settings::PlayerPicked != -1) { SDK::FBPUniqueNetId netid; SDK::FS_ChatMessage msgOut; chatwb->Send_Global_Message(SDK::FString(Settings::MessageSpoof.c_str()), PlayerController, PlayerController, netid, SDK::FString(L"Niggichan"), msgOut); Settings::PlayerPicked = -1; Settings::ChangeNameEvent = true; } } } } } if (Settings::ChangeNameEvent) { Settings::ChangeNameEvent = false; PlayerController->ServerChangeName(SDK::FString(Settings::PlayerPicked != -1 ? PlayerStuff::PlayerList[Settings::PlayerPicked].name.c_str() : Settings::OriginalName.c_str())); Settings::NameOfVictim = L""; } if (Settings::NameChanger) { static void* AddrPlayerController = 0x0; if (AddrPlayerController != PlayerController || !Settings::IniShitsLevel[3]) { Settings::ChangeNameEvent = false; Settings::IniShitsLevel[3] = true; Settings::OriginalName = Settings::NameTo_set; PlayerController->ServerChangeName(SDK::FString(Settings::NameTo_set.c_str())); AddrPlayerController = PlayerController; } } #endif if (Settings::ProtectCamServer && !Settings::IniShitsPlayer[0]) { Settings::IniShitsPlayer[0] = true; PlayerController->PlayerCameraManager->SetReplicates(false); } //static ULONGLONG TickCountGameModeCurrent = 0; //if (TickCount >= TickCountGameModeCurrent) { // TickCountGameModeCurrent = TickCount + 1000; // auto OBJ_List = FindInstances(SDK::AMP_::StaticClass()); // if (OBJ_List.size() != 0) { // std::cout << "Found GameMode!\n"; // } //} if (Settings::LoadLevel_) { static ULONGLONG TickCount_Server = 0; if (TickCount >= TickCount_Server) { TickCount_Server = TickCount + 800; SDK::FName nameptrLevel = StringLib->Conv_StringToName(SDK::FString(Settings::LevelToLoad.c_str())); std::string levelName = nameptrLevel.ToString(); if (levelName != "None") { if (auto GameMode = (SDK::ABase_GM_C*)WorldP->AuthorityGameMode; GameMode) { //Keep lobby open by Loading level from Lobby (Exploit 5) if (GameMode->IsA(SDK::ABase_GM_C::StaticClass())) { SDK::FString blabla1, blabla2; GameMode->ServerTravel_ToGameplayMap(nameptrLevel, blabla1, blabla2); Cheat::Message(std::string("Server Loaded Level: " + levelName)); } else if (GameMode->IsA(SDK::AMP_GameMode_C::StaticClass())) { auto GameModeC = (SDK::AMP_GameMode_C*)GameMode; GameModeC->LoadLevel(nameptrLevel, false, false); } else { Cheat::Message(std::string("Client Loaded Level: " + levelName)); GPStatics->OpenLevel(WorldP, nameptrLevel, true, SDK::FString(L"")); } } else { Cheat::Message(std::string("Client Loaded Level: " + levelName)); GPStatics->OpenLevel(WorldP, nameptrLevel, true, SDK::FString(L"")); } } } Settings::LoadLevel_ = false; } if (Settings::FovChanger) { PlayerController->FOV(Settings::Fov); } static bool cleared = false; if (true) { PlayerStuff::PlayerList.clear(); SDK::TArray Players; //SDK::TArray Characters; GPStatics->GetAllActorsOfClass(WorldP, SDK::APlayerState::StaticClass(), &Players); //GPStatics->GetAllActorsOfClass(WorldP, SDK::ABPCharacter_Demo_C::StaticClass(), &Characters); if (Players.IsValid()) { cleared = false; auto bpClass = SDK::ABPCharacter_Demo_C::StaticClass(); auto AMPGamemodeClass = SDK::AMP_GameMode_C::StaticClass(); auto SpectatorPawnClass = SDK::ASpectatorPawn::StaticClass(); for (size_t i = 0; i < Players.Num(); i++) { auto State = (SDK::APlayerState*)Players[i]; auto contr = (SDK::AMP_PlayerController_C*)State->GetOwner(); auto StatePR = (SDK::AFancyPlayerState*)nullptr; if (State->IsA(SDK::AFancyPlayerState::StaticClass())) { StatePR = (SDK::AFancyPlayerState*)State; } auto Owner_ = State->PawnPrivate; if (Owner_ && !contr)contr = (SDK::AMP_PlayerController_C*)Owner_->Controller; auto Character_ = (SDK::ABPCharacter_Demo_C*)(Owner_ ? (Owner_->IsA(bpClass) ? (SDK::ABPCharacter_Demo_C*)Owner_ : nullptr) : nullptr); bool isAlive = false; bool isSpectating = false; SDK::FVector pos; if (contr) { if (!isAlive) { if (auto GameMode = (SDK::AMP_GameMode_C*)WorldP->AuthorityGameMode; GameMode) { if (GameMode->IsA(AMPGamemodeClass)) { auto GameModeC = (SDK::AMP_GameMode_C*)GameMode; if (Settings::EventRespawnPlayer && State->PlayerId == Settings::Event_PlayerID) { Settings::Event_PlayerID = -1; Settings::EventRespawnPlayer = false; GameModeC->RestartPlayer(contr); auto Pawn_ = GameModeC->SpawnDefaultPawnFor(contr, GameModeC->PlayerStarts[0]); contr->AcknowledgedPawn = Pawn_; State->PawnPrivate = Pawn_; GameModeC->HandleStartingNewPlayer(contr); GameModeC->RestartPlayer(contr); } } } } } if (Owner_) { contr = (SDK::AMP_PlayerController_C*)Owner_->GetController(); if (!contr) contr = (SDK::AMP_PlayerController_C*)Owner_->GetOwner(); pos = Owner_->K2_GetActorLocation(); isAlive = (Character_); auto chara = (SDK::ABPCharacter_Demo_C*)nullptr; //Only for Events if (State->PlayerId == Settings::Event_PlayerID) { if (Settings::TeleportToEventPlayer && PlayerController->Character) { Settings::Event_PlayerID = -1; Settings::TeleportToEventPlayer = false; #ifdef Gatekeep auto charc = (SDK::ABPCharacter_Demo_C*)PlayerController->Character; if (charc && charc->Class->GetFunction("BPCharacter_Demo_C", "StartPushingActor_SERVER")) { charc->StartPushingActor_SERVER((SDK::ABP_Pushable_C*)PlayerController->AcknowledgedPawn, pos, PlayerController->ControlRotation); charc->StopPushingActor_SERVER((SDK::ABP_Pushable_C*)PlayerController->AcknowledgedPawn); } else { PlayerController->Pawn->K2_SetActorLocation(pos, false, 0, true); } #else PlayerController->Pawn->K2_SetActorLocation(pos, false, 0, true); #endif } if (Settings::UseItemEventPlayer) { Settings::Event_PlayerID = -1; Settings::UseItemEventPlayer = false; if (Character_) { auto char_ = (SDK::ABPCharacter_Demo_C*)(PlayerController->Character ? (PlayerController->Character->IsA(bpClass) ? PlayerController->Character : nullptr) : nullptr); if (Character_->CurrentItem_Rep) { if(char_) char_->UseItem_SERVER((SDK::ABP_Item_C*)Character_->CurrentItem_Rep); else Message("LocalPlayer Character is nullptr"); } else Message("Slot is Empty"); } else { Message("Character is nullptr"); } } //if (Settings::EventCollectDataPlayer) { // Settings::EventCollectDataPlayer = false; // if (contr) { // if (contr->NetConnection) { // Cheat::Message("[Player Info:] SteamID:" + contr->NetConnection->RemoteAddr.ObjectPointing->ToString(false).ToString()); // } // else // { // Cheat::Message("[Player Info:] Connection was nullptr!"); // } // } // else // { // Cheat::Message("[Player Info:] PlayerController was nullptr"); // } //} if (Settings::TeleportEventPlayer) { Settings::Event_PlayerID = -1; Settings::TeleportEventPlayer = false; { Owner_->K2_SetActorLocation(PlayerController->Pawn->K2_GetActorLocation(), false, 0, true); } } } } if (State != PlayerController->PlayerState) PlayerStuff::PlayerList.push_back(PlayerStuff::Player(State->PlayerNamePrivate.ToWString(), (contr ? (contr->NetConnection ? contr->NetConnection->URL_.Host.ToWString() : UsefullFuncs::stringToWideString(Backend::HostSteamID) ) : UsefullFuncs::stringToWideString( Backend::HostSteamID) ), (Character_ ? (Character_->CurrentItem_Rep ? Cheat::UsefullFuncs::stringToWideString(Character_->CurrentItem_Rep->GetName()) : L"Empty") : L"Player Dead"), State->PlayerId, contr, Owner_, isAlive, contr, pos, StatePR ? StatePR->InventoryComponent : nullptr)); } std::sort(PlayerStuff::PlayerList.begin(), PlayerStuff::PlayerList.end(), [](const PlayerStuff::Player& a, const PlayerStuff::Player& b) { return a.PlayerID < b.PlayerID; }); } } else { if (!cleared) { cleared = true; PlayerStuff::PlayerList.clear(); } } } if (!Canvas)return; //Esp shit, World needed obviously else crashes if (Ok || Stages >= 6) { if (PlayerController->SpectatorPawn) { } RunMainHost(); static bool WasCollide = false; static SDK::ABoatPawn* LastBoat = 0x0; if (Settings::BoatFly || Settings::BoatSpeedhack || Settings::BoatEsp) { auto BoatClass = SDK::ABoatPawn::StaticClass(); if (BoatClass) { SDK::TArray BoatPawns; GPStatics->GetAllActorsOfClass(WorldP, BoatClass, &BoatPawns); if (BoatPawns.IsValid()) { for (size_t i = 0; i < BoatPawns.Num(); i++) { auto BoatPawn = (SDK::ABP_RowBoat_C*)BoatPawns[i]; if (Settings::BoatEsp) { auto Color = UsefullFuncs::RGBATOFLinear(255, 0, 0, 255); auto location = BoatPawn->K2_GetActorLocation(); SDK::FVector2D ScreenPos; if (GPStatics->ProjectWorldToScreen(PlayerController, location, &ScreenPos, true)) UsefullFuncs::DrawCircle(Canvas, ScreenPos, 10.0f, 12, Color); } if (BoatPawn->Controller == PlayerController) { LastBoat = BoatPawn; //BoatPawn->LaunchPawn(SDK::FVector(0, 0, 200.5f), false, false); if (Settings::BoatFly) { BoatPawn->RootComponent->ComponentVelocity = { 0.0f, 0.0f, 0.0f }; BoatPawn->SceneComponent->ComponentVelocity = { 0.0f, 0.0f, 0.0f }; BoatPawn->bActorEnableCollision = false; WasCollide = true; if (GetAsyncKeyState(VK_LEFT)) { SDK::FRotator rotation = BoatPawn->K2_GetActorRotation(); if (rotation.Yaw - 5.0f < -360.0f) { rotation.Yaw = 0.0f; } else { rotation.Yaw -= 5.0f; } BoatPawn->K2_SetActorRotation(rotation, false); } if (GetAsyncKeyState(VK_RIGHT)) { SDK::FRotator rotation = BoatPawn->K2_GetActorRotation(); if (rotation.Yaw + 5.0f > 360.0f) { rotation.Yaw = 0.0f; } else { rotation.Yaw += 5.0f; } BoatPawn->K2_SetActorRotation(rotation, false); } if (GetAsyncKeyState(VK_SPACE)) { auto BoatLoc = BoatPawn->K2_GetActorLocation(); auto Cam = PlayerController->PlayerCameraManager; SDK::FVector ForwardCam = Cam->GetActorUpVector() * Settings::PlayerFlySpeedY; SDK::FVector PositionOut = { BoatLoc.X + ForwardCam.X, BoatLoc.Y + ForwardCam.Y, BoatLoc.Z }; BoatPawn->GetXShipComponent()->WaterWorldZ += Settings::PlayerFlySpeedY; BoatPawn->K2_SetActorLocation(PositionOut, false, 0, true); } if (GetAsyncKeyState(VK_SHIFT)) { auto BoatLoc = BoatPawn->K2_GetActorLocation(); auto Cam = PlayerController->PlayerCameraManager; SDK::FVector ForwardCam = Cam->GetActorUpVector() * Settings::PlayerFlySpeedY; SDK::FVector PositionOut = { BoatLoc.X + ForwardCam.X, BoatLoc.Y + ForwardCam.Y, BoatLoc.Z}; BoatPawn->GetXShipComponent()->WaterWorldZ -= Settings::PlayerFlySpeedY; BoatPawn->K2_SetActorLocation(PositionOut, false, 0, true); } if (GetAsyncKeyState('W')) { auto BoatLoc = BoatPawn->K2_GetActorLocation(); auto Cam = PlayerController->PlayerCameraManager; SDK::FVector ForwardCam = Cam->GetActorForwardVector() * Settings::PlayerFlySpeedY; SDK::FVector PositionOut = { BoatLoc.X + ForwardCam.X, BoatLoc.Y + ForwardCam.Y, BoatLoc.Z }; BoatPawn->K2_SetActorLocation(PositionOut, false, 0, true); } if (GetAsyncKeyState('S')) { auto BoatLoc = BoatPawn->K2_GetActorLocation(); auto Cam = PlayerController->PlayerCameraManager; SDK::FVector ForwardCam = Cam->GetActorForwardVector() * Settings::PlayerFlySpeedY; SDK::FVector PositionOut = { BoatLoc.X - ForwardCam.X, BoatLoc.Y - ForwardCam.Y, BoatLoc.Z}; BoatPawn->K2_SetActorLocation(PositionOut, false, 0, true); } if (GetAsyncKeyState('A')) { auto BoatLoc = BoatPawn->K2_GetActorLocation(); auto Cam = PlayerController->PlayerCameraManager; SDK::FVector ForwardCam = Cam->GetActorRightVector() * Settings::PlayerFlySpeedY; SDK::FVector PositionOut = { BoatLoc.X - ForwardCam.X, BoatLoc.Y - ForwardCam.Y, BoatLoc.Z}; BoatPawn->K2_SetActorLocation(PositionOut, false, 0, true); } if (GetAsyncKeyState('D')) { auto BoatLoc = BoatPawn->K2_GetActorLocation(); auto Cam = PlayerController->PlayerCameraManager; SDK::FVector ForwardCam = Cam->GetActorRightVector() * Settings::PlayerFlySpeedY; SDK::FVector PositionOut = { BoatLoc.X + ForwardCam.X, BoatLoc.Y + ForwardCam.Y, BoatLoc.Z}; BoatPawn->K2_SetActorLocation(PositionOut, false, 0, true); } } if (Settings::BoatSpeedhack) { auto ShipComponent = BoatPawn->GetXShipComponent(); for (size_t i1 = 0; i1 < ShipComponent->XShipEngines.Num(); i1++) { ShipComponent->XShipEngines[i1].EngineForwardForce = Settings::BoatSpeed; } } break; } } } } } else { if (WasCollide) { if (UsefullFuncs::ShouldUsePtr(LastBoat)) LastBoat->SetActorEnableCollision(true); WasCollide = false; } } auto BPCharacter = (SDK::ABPCharacter_Demo_C*)PlayerController->Character; if (BPCharacter) { if (Settings::OwnSelf) { Settings::OwnSelf = false; PlayerController->ServerAcknowledgePossession(BPCharacter); } //HookProcEvent(BPCharacter, GodMode); //BPCharacter->SRV_OrientMovement(); if (Settings::InfiniteStamina) { BPCharacter->ShouldUseStamina = false; } else { BPCharacter->ShouldUseStamina = true; } static bool WasNocliped = false; if (Settings::Noclip) { BPCharacter->CanCollide = false; WasNocliped = true; } else { if (WasNocliped && !BPCharacter->CanCollide) { BPCharacter->CanCollide = true; } } #ifdef Gatekeep //Spawn stuff inside your hand, that wasnt supposed to even Spawn in there (Exploit 1, Dangerous Exploit) if (Settings::Spawner) { if (GetAsyncKeyState('T') & 1) { SDK::UClass* SpawningThing = SDK::ABacteria_BP_C::StaticClass(); if (SpawningThing) BPCharacter->SpawnEquipItem_SERVER(SpawningThing); } static ULONGLONG TickFindBoat = 0; if (GetAsyncKeyState('U') & 1) { SDK::UClass* SpawningThing = nullptr; SpawningThing = SDK::ABP_RowBoat_C::StaticClass(); if (SpawningThing) BPCharacter->SpawnEquipItem_SERVER(SpawningThing); Settings::IniShitsPlayer[5] = true; TickFindBoat = TickCount + 100; } if (Settings::IniShitsPlayer[5] && TickCount >= TickFindBoat) { TickFindBoat = TickCount + 100; SDK::TArray Boats_2; GPStatics->GetAllActorsOfClass(WorldP, SDK::ABoatPawn::StaticClass(), &Boats_2); int Numb = Boats_2.Num(); for (size_t i = 0; i < Numb; i++) { auto Parent = Boats_2[i]->Instigator; if ( Parent == BPCharacter) { auto boat = (SDK::ABoatPawn*)Boats_2[i]; Settings::IniShitsPlayer[5] = false; BPCharacter->K2_SetActorLocation(boat->K2_GetActorLocation(), false, 0, true); BPCharacter->CurrentInteractingPawn = boat; BPCharacter->Interact(boat); } } } //if (GetAsyncKeyState('O') & 1) //{ // //BPCharacter->CrouchAmount = -1000.0f; // //BPCharacter->Crouch(false); // SDK::UClass* SpawningThing = SDK::::StaticClass(); // // if (SpawningThing) { // auto Object = (SDK::ABP_DroppedItem_Glowstick_C*)SpawningThing->DefaultObject; // if (!Object) { // Message("Default Object is null!"); // } // BPCharacter->SpawnEquipItem_SERVER(SpawningThing); // } // else // { // Message("Class is null!"); // } // //BPCharacter->CustomTimeDilation = 0.001f; //} //Send people into the MainMenu by spawning an DefaultExitZone with no Parameters. No fallback from host, host has to restart game (Exploit 2, very severe, any level can be loaded with the right class) if (GetAsyncKeyState('R') & 1) { //BPCharacter->CrouchAmount = -1000.0f; //BPCharacter->Crouch(false); SDK::UClass* SpawningThing = SDK::ABP_ExitZone_C::StaticClass(); if (Functions::ShouldUsePointer64(SpawningThing)) { BPCharacter->SpawnEquipItem_SERVER(SpawningThing); } else { Message("Couldnt Spawn ExitZone. Class Not Found"); } //BPCharacter->CustomTimeDilation = 0.001f; } if (GetAsyncKeyState('7') & 1) { //BPCharacter->CrouchAmount = -1000.0f; //BPCharacter->Crouch(false); SDK::UClass* SpawningThing = SDK::ABP_Rope_C::StaticClass(); if (Functions::ShouldUsePointer64(SpawningThing)) { BPCharacter->SpawnEquipItem_SERVER(SpawningThing); } else { Message("Couldnt Spawn Rope. Class Not Found"); } //BPCharacter->CustomTimeDilation = 0.001f; } if (GetAsyncKeyState('8') & 1) { //BPCharacter->CrouchAmount = -1000.0f; //BPCharacter->Crouch(false); SDK::UClass* SpawningThing = SDK::ABP_FireworkProjectile_C::StaticClass(); if (Functions::ShouldUsePointer64(SpawningThing)) { BPCharacter->SpawnEquipItem_SERVER(SpawningThing); Settings::IniShitsPlayer[3] = true; Settings::IniShitsPlayer[4] = true; } else { Message("Couldnt Spawn Rope. Class Not Found"); } //BPCharacter->CustomTimeDilation = 0.001f; } if (Settings::IniShitsPlayer[3] && BPCharacter->CurrentItem_Rep) { Settings::IniShitsPlayer[3] = false; BPCharacter->CurrentItem_Rep->K2_DetachFromActor(SDK::EDetachmentRule::KeepRelative, SDK::EDetachmentRule::KeepRelative, SDK::EDetachmentRule::KeepRelative); } if (Settings::IniShitsPlayer[4] && BPCharacter->CurrentItem_Rep) { static LONGLONG UpdateFireWorkTick = 0; if (TickCount >= UpdateFireWorkTick) { UpdateFireWorkTick = TickCount + 100; if (BPCharacter->CurrentItem_Rep->Class != SDK::ABP_FireworkProjectile_C::StaticClass()) { Settings::IniShitsPlayer[4] = false; } } if(Settings::IniShitsPlayer[4]) BPCharacter->CurrentItem_Rep->K2_SetActorLocation(PlayerController->PlayerCameraManager->GetCameraLocation() + (PlayerController->PlayerCameraManager->GetActorForwardVector() * 2), false, 0, true); } } else { static LONGLONG UpdateStatesTick = 0; if (TickCount >= UpdateStatesTick) { UpdateStatesTick = TickCount + 10; GetAsyncKeyState('T'); GetAsyncKeyState('U'); GetAsyncKeyState('O'); GetAsyncKeyState('R'); GetAsyncKeyState('7'); GetAsyncKeyState('8'); GetAsyncKeyState('9'); } } #endif static SDK::FVector LastPos; if (Settings::IniShitsPlayer[1]) { SDK::FVector2D Pos2d; if (GPStatics->ProjectWorldToScreen(PlayerController, LastPos, &Pos2d, true)) { auto color = SDK::FLinearColor(0.0f, 0.0f, 1.0f, 1.0f); DrawTextRGBWithFString(Canvas, SDK::FString(L"LocalPlayer_LastServerPos"), Pos2d, color, false, 1.1f); UsefullFuncs::DrawCircle(Canvas, Pos2d, 1.0f, 12, color); } } //FreeCam kinda if (GetAsyncKeyState('J') & 1) { //PlayerController->ServerPause(); //PlayerController->ClientReset(); //PlayerController->ServerRestartPlayer(); static bool replicate = true; LastPos = BPCharacter->K2_GetActorLocation(); PlayerController->SetReplicateMovement(replicate); BPCharacter->SetReplicateMovement(replicate); if (!replicate) { Settings::PlayerFly = true; Settings::VelocityFly = false; Settings::IniShitsPlayer[1] = true; } else { Settings::PlayerFly = false; Settings::VelocityFly = true; Settings::IniShitsPlayer[1] = false; } replicate = !replicate; } //SDK::UWB_Chat_C //Become an Omega ultra sigma and live inside your own edit, while floating elegantly through the air if (GetAsyncKeyState(VK_RSHIFT)) { BPCharacter->CustomTimeDilation = 0.02f; } else { static bool GetDilation = false; static float DilationCopy = 0.0f; if (!GetDilation) { DilationCopy = BPCharacter->CustomTimeDilation; GetDilation = true; } BPCharacter->CustomTimeDilation = DilationCopy; } //if (GetAsyncKeyState('P')) { // BPCharacter->PickUp_SERVER((SDK::ADroppedItem*)BPCharacter); // //Settings::ForceAdmin = true //} if (GetAsyncKeyState('Z')) { Settings::TpEveryone = true; } { // Only works as Host BPCharacter->CanJumpscare = false; BPCharacter->CanKill = false; if (BPCharacter->Climb) { BPCharacter->Climb->TheTimeline.Length = 0.0f; } if (BPCharacter->FallTimeline) BPCharacter->FallTimeline->TheTimeline.Length = 0.0f; } //if (BPCharacter->LeanLeft) { // BPCharacter->LeanLeft->TheTimeline.Length = 500.01f; // BPCharacter->LeanLeft_Offset_17DE22D544C8BED35C8F5881C0002D9E = 1000000.0f; // BPCharacter->LeanRight_Offset_C47E33074D47E917512F4F8517EDDA78 = 1000000.0f; // BPCharacter->LeanRight->TheTimeline.Length = 500.01f; //} //BPCharacter->SetCanCollide(false); auto playerState = (SDK::AMP_PS_C*)BPCharacter->PlayerState; if (playerState) { static bool RGBWasOn = false; static SDK::FColor NormalRGB = { 208, 255, 255, 255 }; if (Settings::RGBFlashlight) { if (BPCharacter->CurrentItem_Rep) { RGBWasOn = true; { static SDK::FColor ColorRGB = NormalRGB; auto Flashlight = (SDK::ABP_Item_Flashlight_C*)BPCharacter->CurrentItem_Rep; if (Flashlight) { if (Flashlight->IsFlashlightOn) { UsefullFuncs::RGBA RedGreenBlueAAAAAAAAAAA = { ColorRGB.R, ColorRGB.G, ColorRGB.B, ColorRGB.A }; Rainbowify(&RedGreenBlueAAAAAAAAAAA); ColorRGB.R = RedGreenBlueAAAAAAAAAAA.R; ColorRGB.G = RedGreenBlueAAAAAAAAAAA.G; ColorRGB.B = RedGreenBlueAAAAAAAAAAA.B; if (Flashlight->Flashlight != nullptr) { Flashlight->Flashlight->SetLightColor(UsefullFuncs::RGBATOFLinear(ColorRGB.R, ColorRGB.G, ColorRGB.B, ColorRGB.A), true); } if (Flashlight->PointLight != nullptr) { Flashlight->PointLight->SetLightColor(UsefullFuncs::RGBATOFLinear(ColorRGB.R, ColorRGB.G, ColorRGB.B, ColorRGB.A), true); } } } } } } else { if (RGBWasOn && BPCharacter->CurrentItem_Rep) { if (BPCharacter->CurrentItem_Rep->Class->Name == SDK::ABP_Item_Flashlight_C::StaticClass()->Name) { auto Flashlight = (SDK::ABP_Item_Flashlight_C*)BPCharacter->CurrentItem_Rep; if (Flashlight) { if (Flashlight->Flashlight) { Flashlight->Flashlight->LightColor = NormalRGB; Flashlight->Flashlight->SetLightColor(UsefullFuncs::RGBATOFLinear(NormalRGB.R, NormalRGB.G, NormalRGB.B, NormalRGB.A), true); } if (Flashlight->PointLight) { Flashlight->PointLight->SetLightColor(UsefullFuncs::RGBATOFLinear(NormalRGB.R, NormalRGB.G, NormalRGB.B, NormalRGB.A), true); } } RGBWasOn = false; } } } if (Settings::Rapidfire) { // only works as Host if (BPCharacter->CurrentItem_Rep) { auto Flaregun = (SDK::ABP_FlareGun_C*)SDK::ABP_FlareGun_C::GetDefaultObj(); if (BPCharacter->CurrentItem_Rep->ID == Flaregun->ID) { Flaregun = (SDK::ABP_FlareGun_C*)BPCharacter->CurrentItem_Rep; Flaregun->CanUse = true; } } if (BPCharacter->CurrentItem_Rep) { auto Flaregun = (SDK::ABP_Item_Firework_C*)SDK::ABP_Item_Firework_C::GetDefaultObj(); if (BPCharacter->CurrentItem_Rep->ID == Flaregun->ID) { Flaregun = (SDK::ABP_Item_Firework_C*)BPCharacter->CurrentItem_Rep; Flaregun->ThrowTime = 0.0f; Flaregun->ExplodeTimer->TheTimeline.Length = 0.0f; } } } #ifdef Gatekeep //Spawn ropes anywhere you want, how often you want also. (Exploit 3, severe) if (GetAsyncKeyState(VK_F2)& 1 && BPCharacter->CurrentItem_Rep) { auto rope = (SDK::ABP_Rope_C*)SDK::ABP_Rope_C::GetDefaultObj(); if (BPCharacter->CurrentItem_Rep->ID == rope->ID) { rope = (SDK::ABP_Rope_C*)BPCharacter->CurrentItem_Rep; rope->SRV_TossRope((SDK::ABP_Rope_Floor_C*)Pawn, Pawn->K2_GetActorLocation()); rope->SRV_ShowRope(Pawn, Pawn->K2_GetActorLocation()); } } #endif // Gatekeep if (GetAsyncKeyState(VK_F3) & 1) { Settings::IniShitsPlayer[6] = !Settings::IniShitsPlayer[6]; } if(Settings::IniShitsPlayer[6]) { auto cam = (SDK::ABP_FlareGun_C*)BPCharacter->CurrentItem_Rep; BPCharacter->SpawnEquipItem_SERVER(SDK::ABP_FlareGun_C::StaticClass()); if (cam) { BPCharacter->UseItem_SERVER(cam); BPCharacter->DestroyEquipItem_SERVER(); } } //if (GetAsyncKeyState(VK_F3) & 1 && BPCharacter->CurrentItem_Rep) { // actual safe item // auto rope = (SDK::ABP_Scanner_C*)SDK::ABP_Scanner_C::GetDefaultObj(); // if (BPCharacter->CurrentItem_Rep->ID == rope->ID) { // rope = (SDK::ABP_Scanner_C*)BPCharacter->CurrentItem_Rep; // auto CamManager = PlayerController->PlayerCameraManager; // SDK::TArray actorsToignore; // SDK::FHitResult raycasthit; // bool hit = SystemLib->LineTraceSingle(WorldP, CamManager->K2_GetActorLocation(), CamManager->GetActorForwardVector() * 10, SDK::ETraceTypeQuery::TraceTypeQuery1, true, actorsToignore, SDK::EDrawDebugTrace::None, &raycasthit, true, { 255, 0, 0, 255 }, { 255, 255, 0, 255 }, 5.0f); // if (hit) { // Message("hit something"); // rope->SRV_Lidar(raycasthit, { 255, 0, 0, 255 }); // } // /*rope->SRV_Lidar()*/ // // } //} if (Settings::SpawnItem) { Settings::SpawnItem = false; SDK::FName ItemName; SDK::ABP_Item_C* Item; SDK::ABP_DroppedItem_C* ItemDropped; switch (Settings::ItemToSpawn) { case Settings::Flashlight: Item = (SDK::ABP_Item_C*)SDK::ABP_Item_Flashlight_C::GetDefaultObj(); ItemName = Item->ID; break; case Settings::Flaregun: Item = (SDK::ABP_Item_C*)SDK::ABP_FlareGun_C::GetDefaultObj(); ItemName = Item->ID; break; case Settings::Crowbar: Item = (SDK::ABP_Item_C*)SDK::ABP_Item_Crowbar_C::GetDefaultObj(); ItemName = Item->ID; break; case Settings::Chainsaw: Item = (SDK::ABP_Item_C*)SDK::ABP_Item_Chainsaw_C::GetDefaultObj(); ItemName = Item->ID; break; case Settings::Almondwater: Item = (SDK::ABP_Item_C*)SDK::ABP_Item_AlmondWater_C::GetDefaultObj(); ItemName = Item->ID; break; case Settings::Bugspray: Item = (SDK::ABP_Item_C*)SDK::ABP_Item_BugSpray_C::GetDefaultObj(); ItemName = Item->ID; break; case Settings::Lidar: ItemDropped = (SDK::ABP_DroppedItem_C*)SDK::ABP_DroppedItem_LiDAR_C::GetDefaultObj(); ItemName = ItemDropped->ID; break; case Settings::Jelly: Item = (SDK::ABP_Item_C*)SDK::ABP_MothJelly_C::GetDefaultObj(); ItemName = Item->ID; break; case Settings::Speedwateridk: Item = (SDK::ABP_Item_C*)SDK::ABP_Juice_C::GetDefaultObj(); ItemName = Item->ID; break; case Settings::Pain: Item = (SDK::ABP_Item_C*)SDK::ABP_Liquid_Pain_C::GetDefaultObj(); ItemName = Item->ID; break; case Settings::Rope: Item = (SDK::ABP_Item_C*)SDK::ABP_Rope_C::GetDefaultObj(); ItemName = Item->ID; break; case Settings::AlmondExtract: Item = (SDK::ABP_Item_C*)SDK::ABP_Item_AlmondBottle_C::GetDefaultObj(); ItemName = Item->ID; break; case Settings::Firework: Item = (SDK::ABP_Item_C*)SDK::ABP_Item_Firework_C::GetDefaultObj(); ItemName = Item->ID; break; case Settings::Ticket: Item = (SDK::ABP_Item_C*)SDK::ABP_Item_Ticket_C::GetDefaultObj(); ItemName = Item->ID; break; case Settings::DivingHelmet: Item = (SDK::ABP_Item_C*)SDK::ABP_Diving_Helmet_C::GetDefaultObj(); ItemName = Item->ID; break; case Settings::Camera: Item = (SDK::ABP_Item_C*)SDK::ABP_Item_Camera_C::GetDefaultObj(); ItemName = Item->ID; break; case Settings::Glowstick: Item = (SDK::ABP_Item_C*)SDK::ABP_Item_Glowstick_Red_C::GetDefaultObj(); ItemName = Item->ID; break; case Settings::Thermometer: Item = (SDK::ABP_Item_C*)SDK::ABP_Thermometer_C::GetDefaultObj(); ItemName = Item->ID; break; case Settings::WalkiTalkie: Item = (SDK::ABP_Item_C*)SDK::ABP_WalkieTalkie_C::GetDefaultObj(); ItemName = Item->ID; break; case Settings::Test: ItemName = SDK::ADefaultPawn::StaticClass()->Name; break; default: break; } if (Settings::SilentItemSpawner) { auto Inventory = playerState->Items_Rep; bool Full = true; for (size_t i = 0; i < Inventory.Num(); i++) { if (Inventory[i].ComparisonIndex == 0) { Full = false; Inventory[i] = ItemName; break; } } if (Full)Inventory[Inventory.Num() - 1] = ItemName; //BPCharacter-> } else { Message(std::string("Item dropped: " + ItemName.ToString())); BPCharacter->DropItem_SERVER(ItemName); } } //BPCharacter->OrientMovement(); if (Settings::LagGame) { auto ItemClass = (SDK::ABP_DroppedItem_C*)SDK::ABP_DroppedItem_LiDAR_C::GetDefaultObj(); if (ItemClass) { Settings::LagGame = false; for (size_t i = 0; i < 300; i++) { BPCharacter->DropItem_SERVER(ItemClass->ID); auto DeleteAbleClass = (SDK::ABP_DroppedItem_C*)GPStatics->GetActorOfClass(WorldP, SDK::ABP_DroppedItem_C::StaticClass()); if (DeleteAbleClass) { DeleteAbleClass->K2_DestroyActor(); } } } } if (Settings::ClearItems) { SDK::TArray Items; GPStatics->GetAllActorsOfClass(WorldP, SDK::ABP_DroppedItem_C::StaticClass(), &Items); if (Items.IsValid()) { Settings::ClearItems = false; for (size_t i = 0; i < Items.Num(); i++) { if (!Items[i])continue; auto Item = (SDK::ABP_DroppedItem_C*)Items[i]; BPCharacter->PickUp_SERVER(Item); } } } #ifdef Gatekeep if (Settings::UnpossePawns) { Settings::UnpossePawns = false; SDK::TArray Pawns; GPStatics->GetAllActorsOfClass(WorldP, SDK::AActor::StaticClass(), &Pawns); if (Pawns.IsValid()) { for (size_t i = 0; i < Pawns.Num(); i++) { auto pawn = Pawns[i]; //BPCharacter->PickUp_SERVER((SDK::ADroppedItem*)Pawns[i]); //BPCharacter->StartPushingActor_SERVER((SDK::ABP_Pushable_C*)Pawns[i], Pawns[i]->K2_GetActorLocation(), PlayerController->ControlRotation); //BPCharacter->StopPushingActor_SERVER((SDK::ABP_Pushable_C*)Pawns[i]); } } } #endif if (Settings::Kys) { Settings::Kys = false; BPCharacter->KillServer(); BPCharacter->KillClient(); } if (Settings::InfiniteSanity) { static ULONGLONG TickCountSanity = 0; static ULONGLONG TickCountSanitybefore = 0; TickCountSanity = GetTickCount64(); if (TickCountSanity >= TickCountSanitybefore) { TickCountSanitybefore = TickCountSanity + 1000; playerState->SRV_AddSanity(100.0f); playerState->AddSanity(100.0f); //PlayerController->ServerRestartPlayer(); } } } if (Settings::NoStumble) { BPCharacter->BalanceFallTimeline->TheTimeline.Length = 0; BPCharacter->BalanceTimeline->TheTimeline.Length = 200000000; } if (Settings::SpeedHack) { static ULONGLONG TickCountSpeed = 0; static ULONGLONG TickCountSpeedbefore = 0; TickCountSpeed = GetTickCount64(); if (TickCountSpeed >= TickCountSpeedbefore) { TickCountSpeedbefore = TickCountSpeed + 500; BPCharacter->SetWalkSpeedServer(Settings::Speed); BPCharacter->SetSprintSpeedServer(Settings::Speed); BPCharacter->CharacterMovement->MaxWalkSpeed = Settings::Speed; BPCharacter->CharacterMovement->MaxAcceleration = Settings::Speed; } } static bool WasFlying = false; static int State = 0; if (Settings::PlayerFly) { if (Settings::VelocityFly) { if (GetAsyncKeyState(VK_SPACE)) { BPCharacter->SRV_Launch(Settings::PlayerFlySpeedY); BPCharacter->LaunchPawn(SDK::FVector(0, 0, Settings::PlayerFlySpeedY), false, true); } } else { WasFlying = true; BPCharacter->CharacterMovement->MovementMode = SDK::EMovementMode::MOVE_None; if (GetAsyncKeyState('W')) { auto Cam = PlayerController->PlayerCameraManager; SDK::FVector ForwardCam = Cam->GetActorForwardVector() * Settings::PlayerFlySpeedY; auto PlayerPos = PlayerController->AcknowledgedPawn->K2_GetActorLocation(); PlayerController->AcknowledgedPawn->K2_SetActorLocation(SDK::FVector(PlayerPos.X + ForwardCam.X, PlayerPos.Y + ForwardCam.Y, PlayerPos.Z + ForwardCam.Z), false, 0, true); } if (GetAsyncKeyState('S')) { auto Cam = PlayerController->PlayerCameraManager; SDK::FVector ForwardCam = Cam->GetActorForwardVector() * Settings::PlayerFlySpeedY; auto PlayerPos = PlayerController->AcknowledgedPawn->K2_GetActorLocation(); PlayerController->AcknowledgedPawn->K2_SetActorLocation(SDK::FVector(PlayerPos.X - ForwardCam.X, PlayerPos.Y - ForwardCam.Y, PlayerPos.Z - ForwardCam.Z), false, 0, true); } if (GetAsyncKeyState('A')) { auto Cam = PlayerController->PlayerCameraManager; SDK::FVector RightVector = Cam->GetActorRightVector() * Settings::PlayerFlySpeedY; auto PlayerPos = PlayerController->AcknowledgedPawn->K2_GetActorLocation(); PlayerController->AcknowledgedPawn->K2_SetActorLocation(SDK::FVector(PlayerPos.X - RightVector.X, PlayerPos.Y - RightVector.Y, PlayerPos.Z - RightVector.Z), false, 0, true); } if (GetAsyncKeyState('D')) { auto Cam = PlayerController->PlayerCameraManager; SDK::FVector RightVector = Cam->GetActorRightVector() * Settings::PlayerFlySpeedY; auto PlayerPos = PlayerController->AcknowledgedPawn->K2_GetActorLocation(); PlayerController->AcknowledgedPawn->K2_SetActorLocation(SDK::FVector(PlayerPos.X + RightVector.X, PlayerPos.Y + RightVector.Y, PlayerPos.Z + RightVector.Z), false, 0, true); } if (GetAsyncKeyState(VK_SPACE)) { auto Cam = PlayerController->PlayerCameraManager; SDK::FVector UPVector = Cam->GetActorUpVector() * Settings::PlayerFlySpeedY; auto PlayerPos = PlayerController->AcknowledgedPawn->K2_GetActorLocation(); PlayerController->AcknowledgedPawn->K2_SetActorLocation(SDK::FVector(PlayerPos.X + UPVector.X, PlayerPos.Y + UPVector.Y, PlayerPos.Z + UPVector.Z), false, 0, true); } if (GetAsyncKeyState(VK_SHIFT)) { auto Cam = PlayerController->PlayerCameraManager; SDK::FVector UPVector = Cam->GetActorUpVector() * Settings::PlayerFlySpeedY; auto PlayerPos = PlayerController->AcknowledgedPawn->K2_GetActorLocation(); PlayerController->AcknowledgedPawn->K2_SetActorLocation(SDK::FVector(PlayerPos.X - UPVector.X, PlayerPos.Y - UPVector.Y, PlayerPos.Z - UPVector.Z), false, 0, true); } #ifdef Gatekeep if (GetAsyncKeyState(VK_F1)) { BPCharacter->StartPushingActor_SERVER((SDK::ABP_Pushable_C*)PlayerController->AcknowledgedPawn, PlayerController->AcknowledgedPawn->K2_GetActorLocation(), PlayerController->ControlRotation); BPCharacter->StopPushingActor_SERVER((SDK::ABP_Pushable_C*)PlayerController->AcknowledgedPawn); } #endif } } else { if (WasFlying) { WasFlying = false; BPCharacter->CharacterMovement->MovementMode = SDK::EMovementMode::MOVE_Walking; } } } else { if (Settings::UnlockPlayers) { static ULONGLONG TickCount_CreateServer = 0; if (TickCount >= TickCount_CreateServer) { TickCount_CreateServer = TickCount + 800; auto OBJ_List = FindInstances(SDK::UW_CreateServer_C::StaticClass()); for (size_t i = 0; i < OBJ_List.size(); i++) { auto OBJ = (SDK::UW_CreateServer_C*)OBJ_List[i]; if (Functions::ShouldUsePointer64(OBJ)) { OBJ->MaximumPlayers = 100; //OBJ->ServerName.Set_String(L"None"); if (Functions::ShouldUsePointer64(OBJ->Slider_MaxPlayers)) OBJ->Slider_MaxPlayers->MaxValue = 100; /*if (Functions::ShouldUsePointer64(OBJ->ServerName.Data)) { auto textConv = TextLib->Conv_StringToText(SDK::FString(L"AsianBaddie69's game")); OBJ->ServerName = textConv; }*/ } } /*auto OBJ_Listf = FindInstances(SDK::ALobby_GS_C::StaticClass()); for (size_t i = 0; i < OBJ_Listf.size(); i++) { auto OBJ = (SDK::ALobby_GS_C*)OBJ_List[i]; if (Functions::ShouldUsePointer64(OBJ)) { OBJ->Update_ServerName(OBJ->ServerName.Set_String(L""), ); } }*/ } } } //if (true) { //Esp Start SDK::TArray EnemyArray; if (Settings::InteractablesEsp || Settings::InteractAll || Settings::InteractEvent || Settings::BringAllItems) { GPStatics->GetAllActorsOfClass(Engine->GameViewport->World, SDK::AInteractableActor::StaticClass(), &EnemyArray); if (EnemyArray.IsValid()) for (size_t i = 0; i < EnemyArray.Num(); i++) { if (!EnemyArray.IsValidIndex(i) || !EnemyArray[i])continue; auto CurrentInteractable = (SDK::AInteractableActor*)EnemyArray[i]; /*if (CurrentInteractable->Name.ToString().find("Tape") != std::string::npos) { CurrentInteractable->K2_SetActorLocation(PlayerController->K2_GetPawn()->K2_GetActorLocation(), false, 0, true); }*/ if (Settings::InteractAll) { CurrentInteractable->ResetUsage(); CurrentInteractable->IsUsable = true; if (!Settings::InteractablesEsp)continue; } if (Settings::InteractEvent) { CurrentInteractable->ResetUsage(); CurrentInteractable->IsUsable = true; CurrentInteractable->WasUsed = false; CurrentInteractable->OnUsedServer(); CurrentInteractable->OnRep_WasUsed(); CurrentInteractable->OnUsedAll(); CurrentInteractable->OnUsedMulticast(); CurrentInteractable->OnUsedNotify(); } if (CurrentInteractable->IsUsable && !CurrentInteractable->WasUsed) { SDK::FVector2D ScreenPos; auto Location = CurrentInteractable->K2_GetActorLocation(); if (!GPStatics->ProjectWorldToScreen(PlayerController, Location, &ScreenPos, true))continue; auto Color = UsefullFuncs::RGBATOFLinear(0, 255, 0, 255); UsefullFuncs::DrawCircle(Canvas, ScreenPos, 10.0f, 12, Color); std::wstring TextMsg = UsefullFuncs::stringToWideString(CurrentInteractable->Class->Name.ToString()); ScreenPos.X -= TextMsg.size() * 5.0f / 2; ScreenPos.Y -= 30.0f; DrawTextRGBWithFString(Canvas, SDK::FString(TextMsg.c_str()), ScreenPos, Color, false, 1.1f); } } GPStatics->GetAllActorsOfClass(Engine->GameViewport->World, SDK::AInteractablePawn::StaticClass(), &EnemyArray); if (EnemyArray.IsValid()) { for (size_t i = 0; i < EnemyArray.Num(); i++) { if (!EnemyArray.IsValidIndex(i) || !EnemyArray[i])continue; auto CurrentInteractable = (SDK::AInteractablePawn*)EnemyArray[i]; if (Settings::InteractAll) { CurrentInteractable->ResetUsage(); CurrentInteractable->IsUsable = true; if (!Settings::InteractablesEsp)continue; } if (CurrentInteractable->IsUsable && !CurrentInteractable->WasUsed) { SDK::FVector2D ScreenPos; auto Location = CurrentInteractable->K2_GetActorLocation(); if (!GPStatics->ProjectWorldToScreen(PlayerController, Location, &ScreenPos, true))continue; auto Color = UsefullFuncs::RGBATOFLinear(0, 255, 0, 255); UsefullFuncs::DrawCircle(Canvas, ScreenPos, 10.0f, 12, Color); std::wstring TextMsg = UsefullFuncs::stringToWideString(CurrentInteractable->Class->Name.ToString()); ScreenPos.X -= TextMsg.size() * 5.0f / 2; ScreenPos.Y -= 30.0f; DrawTextRGBWithFString(Canvas, SDK::FString(TextMsg.c_str()), ScreenPos, Color, false, 1.1f); } } } if (Settings::InteractEvent)Settings::InteractEvent = false; if (Settings::BringAllItems)Settings::BringAllItems = false; } if (EnemyArray.IsValid() && Settings::PeacefullMode || Settings::PlayerEsp || Settings::RandomName || Settings::Godmode || Settings::EnemyEsp || Settings::ForceAdmin || Settings::TpEveryone) { GPStatics->GetAllActorsOfClass(Engine->GameViewport->World, SDK::ACharacter::StaticClass(), &EnemyArray); SDK::UClass* StaticSkinMf = nullptr; SDK::UClass* StaticBacteriaMf = nullptr; SDK::UClass* StaticHowlerMf = nullptr; static bool HideActors = false; if (Settings::PeacefullMode) { HideActors = true; StaticSkinMf = SDK::ABP_SkinStealer_C::StaticClass(); StaticBacteriaMf = SDK::ABacteria_BP_C::StaticClass(); StaticHowlerMf = SDK::AHowler_BP_C::StaticClass(); } if (Settings::RandomName) srand(time(NULL)); for (size_t i = 0; i < EnemyArray.Num(); i++) { if (!EnemyArray.IsValidIndex(i) || !EnemyArray[i] || EnemyArray[i] == PlayerController->Character)continue; auto CurrentEnemy = (SDK::ACharacter*)EnemyArray[i]; auto Name = CurrentEnemy->Name.ToString(); if (Name.find("BPCharacter_Demo_C") != std::string::npos) { auto CharacterBP = (SDK::ABPCharacter_Demo_C*)CurrentEnemy; auto StateBP = (SDK::AMP_PS_C*)CharacterBP->PlayerState; if (CharacterBP) { #ifdef Gatekeep if (Settings::ForceAdmin) { //BPCharacter->PickUp_SERVER((SDK::ADroppedItem*)CharacterBP); //StateBP->SRV_AddSanity(-100.0f); //CharacterBP->ShockedServer(); if (BPCharacter->GetOwner() == StateBP) PlayerController->ServerAcknowledgePossession(CharacterBP); //CharacterBP->ShockedClient(); } /*if (Settings::RandomName && StateBP) { auto numb = rand() % 50 + 1; if (numb == 25) { PlayerController->ServerChangeName(StateBP->PlayerNamePrivate); } }*/ #endif if (Settings::TpEveryone) { CharacterBP->Mesh->SetCollisionResponseToChannel(SDK::ECollisionChannel::ECC_Pawn, SDK::ECollisionResponse::ECR_Ignore); CharacterBP->CapsuleComponent->SetCollisionResponseToChannel(SDK::ECollisionChannel::ECC_Pawn, SDK::ECollisionResponse::ECR_Ignore); //CharacterBP->CharacterMovement->MaxWalkSpeed = 20000.0f; //CharacterBP->CharacterMovement->MaxAcceleration = 20000.0f; CharacterBP->CharacterMovement->GravityScale = 0.5f; CharacterBP->K2_SetActorLocation(BPCharacter->K2_GetActorLocation(), false, 0, true); } if (Settings::PlayerEsp) { if (StateBP) { //auto Controller = CharacterBP->Controller; int isOwner = StateBP->PlayerId == PlayerStuff::PlayerList[0].PlayerID && StateBP->PlayerId < PlayerController->PlayerState->PlayerId; std::wstring Role = isOwner ? L" (Owner)" : L""; UsefullFuncs::DrawBoxOnActor(Canvas, CurrentEnemy, isOwner ? UsefullFuncs::RGBATOFLinear(0, 255, 255, 255) : UsefullFuncs::RGBATOFLinear(0, 255, 0, 255), true, std::wstring(PlayerStuff::Player::SanitizeWString(StateBP->PlayerNamePrivate.ToWString()) + Role).c_str()); } } } } else { if (Settings::PeacefullMode) { CurrentEnemy->SetActorHiddenInGame(true); CurrentEnemy->SetActorEnableCollision(false); continue; } else { if (HideActors == true) { CurrentEnemy->SetActorHiddenInGame(false); CurrentEnemy->SetActorEnableCollision(true); } } if (Settings::Godmode) { auto Name = CurrentEnemy->Class->Name; if (StaticSkinMf && Name == StaticSkinMf->Name) { auto SkinSteala = (SDK::ABP_SkinStealer_C*)CurrentEnemy; if (Settings::Godmode) SkinSteala->CanAttack = false; } else if (StaticBacteriaMf && Name == StaticBacteriaMf->Name) { auto Bacteriadude = (SDK::ABacteria_BP_C*)CurrentEnemy; if (Settings::Godmode) Bacteriadude->CanAttack = false; } else if (StaticHowlerMf && Name == StaticHowlerMf->Name) { auto Howlerdude = (SDK::AHowler_BP_C*)CurrentEnemy; //if (Settings::Godmode) // Howlerdude->CanAttack = false; } } if (Settings::EnemyEsp) { UsefullFuncs::DrawBoxOnActor(Canvas, CurrentEnemy, UsefullFuncs::RGBATOFLinear(255, 0, 0, 255)); } } } if (HideActors)HideActors = false; if (Settings::ForceAdmin)Settings::ForceAdmin = false; if (Settings::TpEveryone)Settings::TpEveryone = false; } if (Settings::ItemEsp) { GPStatics->GetAllActorsOfClass(Engine->GameViewport->World, SDK::ABP_DroppedItem_C::StaticClass(), &EnemyArray); if (EnemyArray.IsValid()) { for (size_t i = 0; i < EnemyArray.Num(); i++) { if (!EnemyArray.IsValidIndex(i) || !EnemyArray[i])continue; auto CurrentThing = (SDK::ABP_DroppedItem_C*)EnemyArray[i]; //UsefullFuncs::DrawBoxOnActor(Canvas, CurrentEnemy, UsefullFuncs::RGBATOFLinear(255, 0, 0, 255)); SDK::FVector2D ScreenPos; auto Location = CurrentThing->K2_GetActorLocation(); if (!GPStatics->ProjectWorldToScreen(PlayerController, Location, &ScreenPos, true))continue; auto Color = UsefullFuncs::RGBATOFLinear(0, 255, 255, 255); UsefullFuncs::DrawCircle(Canvas, ScreenPos, 10.0f, 12, Color); std::wstring TextMsg = L"Item_" + UsefullFuncs::stringToWideString(CurrentThing->ID.ToString()); ScreenPos.X -= TextMsg.size() * 5.0f / 2; ScreenPos.Y -= 30.0f; DrawTextRGBWithFString(Canvas, SDK::FString(TextMsg.c_str()), ScreenPos, Color, false, 1.1f); } } } static bool CamsOff = false; static ULONGLONG CamsTickCurrent = 0; static ULONGLONG CamsTickBefore = 0; if (Settings::NoCams) { CamsTickCurrent = GetTickCount64(); if (CamsTickCurrent >= CamsTickBefore) { CamsTickBefore = CamsTickCurrent + 2000; CamsOff = true; } else CamsOff = false; } if (Settings::TpToExit) { Settings::TpToExit = false; if (SDK::ABP_ExitZone_C::StaticClass()) { auto ExitZone = GPStatics->GetActorOfClass(Engine->GameViewport->World, SDK::ABP_ExitZone_C::StaticClass()); if (ExitZone && PlayerController->Pawn) { PlayerController->Pawn->K2_SetActorLocation(ExitZone->K2_GetActorLocation(), false, 0, true); } else { if (!ExitZone)Message("Found the ExitZone Class but no Actor"); if (!PlayerController->Pawn)Message("Player Pawn is Invalid cant Teleport ya"); } } else { Message("Cant find an ExitZone!, probly some cutscene level shit."); } } if (Settings::ActorEsp || Settings::ActorEvent || CamsOff) { GPStatics->GetAllActorsOfClass(Engine->GameViewport->World, SDK::AActor::StaticClass(), &EnemyArray); if (EnemyArray.IsValid()) { static bool WallsHidden = false; for (size_t i = 0; i < EnemyArray.Num(); i++) { if (!EnemyArray.IsValidIndex(i) || !UsefullFuncs::ShouldUsePtr(EnemyArray[i]))continue; auto CurrentEnemy = EnemyArray[i]; if (CamsOff) { if (strToLower(CurrentEnemy->Name.ToString()).find("securitycam") != std::string::npos) { CurrentEnemy->SetActorHiddenInGame(true); CurrentEnemy->SetActorEnableCollision(false); } if (!Settings::ActorEsp)continue; } if (Settings::ActorEvent) { if (Settings::HideWalls) { if (WallsHidden) { if (strToLower(CurrentEnemy->Name.ToString()).find("door") != std::string::npos) { CurrentEnemy->SetActorHiddenInGame(false); CurrentEnemy->SetActorEnableCollision(true); } } else { if (strToLower(CurrentEnemy->Name.ToString()).find("door") != std::string::npos) { CurrentEnemy->SetActorHiddenInGame(true); CurrentEnemy->SetActorEnableCollision(false); } } } if (!Settings::ActorEsp)continue; } if (CurrentEnemy->Name.ToString().find(Settings::ActorFilter) == std::string::npos)continue; SDK::FVector2D ScreenPos; auto Location = CurrentEnemy->K2_GetActorLocation(); if (!GPStatics->ProjectWorldToScreen(PlayerController, Location, &ScreenPos, true))continue; auto Color = UsefullFuncs::RGBATOFLinear(255, 0, 0, 255); UsefullFuncs::DrawCircle(Canvas, ScreenPos, 10.0f, 12, Color); std::wstring TextMsg = UsefullFuncs::stringToWideString(CurrentEnemy->Class->GetName()); ScreenPos.X -= TextMsg.size() * 5.0f / 2; ScreenPos.Y -= 30.0f; DrawTextRGBWithFString(Canvas, SDK::FString(TextMsg.c_str()), ScreenPos, Color, false, 1.1f); } if (Settings::ActorEvent) { Settings::ActorEvent = false; if (Settings::HideWalls) WallsHidden = !WallsHidden; } } } // }//Esp End } } } #include "HostModifiers.h" void RunMainHost() { HostOptions::Mainrun_Host(); }