-
Автор темы
- #1
вот код
C++:
#include "includes.h"
#ifdef _WIN64
#define GWL_WNDPROC GWLP_WNDPROC
#endif
extern LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
EndScene oEndScene = NULL;
WNDPROC oWndProc;
static HWND window = NULL;
void InitImGui(LPDIRECT3DDEVICE9 pDevice)
{
ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO();
io.ConfigFlags = ImGuiConfigFlags_NoMouseCursorChange;
ImGui_ImplWin32_Init(window);
ImGui_ImplDX9_Init(pDevice);
}
bool bunnyhop = false;
bool autofire = false;
bool glow = false;
static int fov = 90;
bool init = false;
bool menu = false;
static int tabb = 3;
long __stdcall hkEndScene(LPDIRECT3DDEVICE9 pDevice)
{
if (!init)
{
InitImGui(pDevice);
init = true;
}
if (GetAsyncKeyState(VK_END))
{
kiero::shutdown();
return 0;
}
if (GetAsyncKeyState(VK_INSERT) & 1)
{
menu = !menu;
}
if (menu)
{
ImGui_ImplDX9_NewFrame();
ImGui_ImplWin32_NewFrame();
ImGui::NewFrame();
ImGui::Begin("DarkWare");
if (ImGui::Button("Misc", ImVec2(100.f, 0.f)))
{
tabb = 0;
}
ImGui::SameLine(0.f, 2.f);
if (ImGui::Button("Visual", ImVec2(100.f, 0.f)))
{
tabb = 1;
}
ImGui::SameLine(0.f, 2.f);
if (ImGui::Button("AntiAim", ImVec2(100.f, 0.f)))
{
tabb = 2;
}
ImGui::SameLine(0.f, 2.f);
if (ImGui::Button("RageBot", ImVec2(100.f, 0.f)))
{
tabb = 3;
}
ImGui::SameLine(0.f, 2.f);
if (tabb == 0)
{
ImGui::Checkbox("Bunnyhop", &bunnyhop);
if (bunnyhop)
{
struct Information
{
int health, m_flags;
bool checked;
}*VALUE;
DWORD WINAPI BunnyHop(LPVOID lpParam);
{
VALUE = new Information;
DWORD BASE = (DWORD)GetModuleHandleA("hl.exe"), STAMINA, FOCE_JUMP;
STAMINA = *(DWORD*)(BASE + 0x010F9ED8);
FOCE_JUMP = STAMINA + 0xA0;
STAMINA += 0x2D0;
float valor = 300;
while (1)
{
VALUE->health = *(DWORD*)(0x00179814);
VALUE->m_flags = *(DWORD*)(BASE + 0x1B70A54);
if (VALUE->health <= 100 && VALUE->health > 0)
{
if (GetAsyncKeyState(VK_F1))
{
VALUE->checked = !VALUE->checked;
}
if (VALUE->checked)
{
if (VALUE->m_flags == 1)
{
*(float*)(FOCE_JUMP) = valor;
*(int*)(STAMINA) = 0;
}
}
}
}
return 0;
}
BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwAttached, LPVOID lpvReserved);
{
if (dwAttached == DLL_PROCESS_ATTACH)
{
CreateThread(NULL, 0, &BunnyHop, NULL, 0, NULL);
MessageBoxA(0, "WORKING RIGHT", "BUNNYHOP", 0);
}
return 1;
}
}
}
else if (tabb == 1)
{
ImGui::Checkbox("Glow", &glow);
ImGui::SliderInt("Fov Changer", &fov, -180, 180);
}
else if (tabb == 2)
{
}
else if (tabb == 3)
{
ImGui::Checkbox("AutoFire", &autofire);
}
ImGui::End();
ImGui::EndFrame();
ImGui::Render();
ImGui_ImplDX9_RenderDrawData(ImGui::GetDrawData());
return oEndScene(pDevice);
}
}
LRESULT __stdcall WndProc(const HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
if (true && ImGui_ImplWin32_WndProcHandler(hWnd, uMsg, wParam, lParam))
return true;
return CallWindowProc(oWndProc, hWnd, uMsg, wParam, lParam);
}
BOOL CALLBACK EnumWindowsCallback(HWND handle, LPARAM lParam)
{
DWORD wndProcId;
GetWindowThreadProcessId(handle, &wndProcId);
if (GetCurrentProcessId() != wndProcId)
return TRUE; // skip to next window
window = handle;
return FALSE; // window found abort search
}
HWND GetProcessWindow()
{
window = NULL;
EnumWindows(EnumWindowsCallback, NULL);
return window;
}
DWORD WINAPI MainThread(LPVOID lpReserved)
{
bool attached = false;
do
{
if (kiero::init(kiero::RenderType::D3D9) == kiero::Status::Success)
{
kiero::bind(42, (void**)& oEndScene, hkEndScene);
do
window = GetProcessWindow();
while (window == NULL);
oWndProc = (WNDPROC)SetWindowLongPtr(window, GWL_WNDPROC, (LONG_PTR)WndProc);
attached = true;
}
} while (!attached);
return TRUE;
}
BOOL WINAPI DllMain(HMODULE hMod, DWORD dwReason, LPVOID lpReserved)
{
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hMod);
CreateThread(nullptr, 0, MainThread, hMod, 0, nullptr);
break;
case DLL_PROCESS_DETACH:
kiero::shutdown();
break;
}
return TRUE;
}