From 7c151b664fc5fb5f6a62b6b764f4c9a86f5a18f0 Mon Sep 17 00:00:00 2001 From: Jadis0x <49281043+jadis0x@users.noreply.github.com> Date: Wed, 29 May 2024 21:43:06 +0300 Subject: [PATCH] add: fly and tp to azazel --- user/features/menu.cpp | 6 +++++- user/features/misc/misc.cpp | 37 +++++++++++++++++++++++++++++++++++-- user/features/misc/misc.h | 1 + user/hooks/hooks.cpp | 7 +++++++ user/main.cpp | 13 ++----------- user/settings/settings.cpp | 2 +- 6 files changed, 51 insertions(+), 15 deletions(-) diff --git a/user/features/menu.cpp b/user/features/menu.cpp index d338e7a..686dacf 100644 --- a/user/features/menu.cpp +++ b/user/features/menu.cpp @@ -189,6 +189,10 @@ void DrawMapSpecificTab() { if (ImGui::Button("Instant Win")) { Misc::InstantWin(); } + + if (ImGui::Button("TP To Azazel")) { + Misc::TpToAzazel(); + } } bool inspector = false; @@ -314,7 +318,7 @@ void DrawMiscTab() { */ ImGui::Checkbox("Fly", &settings::fly); - ImGui::SliderFloat("Speed: ", &settings::fly_speed, 1.f, 10.f); + ImGui::SliderFloat("Speed: ", &settings::fly_speed, 5.f, 15.f); /* if (ImGui::Button("Make random noise")) { diff --git a/user/features/misc/misc.cpp b/user/features/misc/misc.cpp index 5f3ee85..738edff 100644 --- a/user/features/misc/misc.cpp +++ b/user/features/misc/misc.cpp @@ -266,8 +266,8 @@ void Misc::FullBright() if (nb != nullptr) { app::Light* _flashlight = nb->fields.flashlightSpot; - app::Light_set_intensity(_flashlight, 0.7f, nullptr); - app::Light_set_range(_flashlight, 400.0f, nullptr); + app::Light_set_intensity(_flashlight, 0.8f, nullptr); + app::Light_set_range(_flashlight, 700.0f, nullptr); app::Light_set_spotAngle(_flashlight, 179.0f, nullptr); app::Light_set_shadows(_flashlight, app::LightShadows__Enum::None, nullptr); @@ -438,3 +438,36 @@ void Misc::Kill(bool self) { } } } + +void Misc::TpToAzazel() +{ + std::string _scene = SceneName(); + + if (_scene == std::string("Menu")) return; + + app::GameObject* go = Player::GetLocalPlayer(); + + if (go) { + app::NolanBehaviour* nb = Player::GetNolan(); + + if (nb == nullptr) return; + + app::Survival* _survival = UnityCore::Object::FindObjectOfType("Survival"); + if (_survival == nullptr) return; + + // get azazel + app::GameObject* azazelGo = GetAzazel(_survival); + if (azazelGo == nullptr) return; + + // get transform of azazel + app::Transform* transform = app::GameObject_get_transform(azazelGo, nullptr); + if (transform == nullptr) return; + + app::Vector3 v3 = app::Transform_get_position(transform, nullptr); + app::Quaternion rotation = app::Quaternion_get_identity(nullptr); + + if (app::NolanBehaviour_TeleportTo != nullptr) { + app::NolanBehaviour_TeleportTo(nb, v3, rotation, false, nullptr); + } + } +} diff --git a/user/features/misc/misc.h b/user/features/misc/misc.h index efec2d2..8f649d9 100644 --- a/user/features/misc/misc.h +++ b/user/features/misc/misc.h @@ -18,4 +18,5 @@ namespace Misc { void Jumpscare(); void Kill(bool self); void RankSpoofer(int value); + void TpToAzazel(); } \ No newline at end of file diff --git a/user/hooks/hooks.cpp b/user/hooks/hooks.cpp index a3c62d1..9e74a36 100644 --- a/user/hooks/hooks.cpp +++ b/user/hooks/hooks.cpp @@ -12,6 +12,7 @@ #include "players/players.h" #include "UnityCore.h" #include "ClientHelper.h" +#include "features/misc/misc.h" #pragma warning(push, 0) //important cuz dx11 throws so much warnings #include @@ -634,6 +635,12 @@ HRESULT __stdcall hookD3D11Present(IDXGISwapChain* pSwapChain, UINT SyncInterval if (settings::player_esp) ESP::RunPlayersESP(); + if (settings::fly) + Misc::Fly(settings::fly_speed); + + if (settings::fullBright) + Misc::FullBright(); + ImGui::GetIO().MouseDrawCursor = open_menu; ImGui::EndFrame(); diff --git a/user/main.cpp b/user/main.cpp index ef26afd..3a603e5 100644 --- a/user/main.cpp +++ b/user/main.cpp @@ -115,20 +115,11 @@ void Run() } while (true) { - if (GetAsyncKeyState(VK_END) & 0x8000 || should_unhook) { + if (GetAsyncKeyState(VK_END) & 0x8000 || should_unhook) break; - } - - if (settings::fullBright) { - Misc::FullBright(); - } - - if (settings::fly) { - //Misc::Fly(settings::fly_speed); - } - std::this_thread::sleep_for(std::chrono::milliseconds(500)); + std::this_thread::sleep_for(std::chrono::milliseconds(1000)); } CreateThread(0, 0, EjectThread, 0, 0, 0); } \ No newline at end of file diff --git a/user/settings/settings.cpp b/user/settings/settings.cpp index e2f2674..8335df8 100644 --- a/user/settings/settings.cpp +++ b/user/settings/settings.cpp @@ -35,7 +35,7 @@ namespace settings { bool server_name_spoof = false; std::string server_name = "Jadis0x"; bool fly = false; - float fly_speed = 1.f; + float fly_speed = 5.f; bool unlock_all = true; bool exp_modifier = false; int new_exp = 2000;