I am making a hack in c++ for a roblox game(Counter Blox Roblox Offensive) and my program just changes the in-game money but when I restart my the game and run it again and start my hack it won't work because the addres has changed. Is there a way that my program could automatically find the right address because I always have to find it manually and change it in the code.
I tried looking it up but couldn't find anything.
#include "stdafx.h"
#include <Windows.h>
int main() {
int moneyAdress = 0xF4OAE;
int customMoneyValue = 10000;
DWORD money = (DWORD)moneyAdres;
HWND wind = FindWindowA(NULL, "Roblox");
DWORD procID;
GetWindowThreadProcessId(wind, &procID);
HANDLE handle = OpenProcess(PROCESS_ALL_ACCES, FALSE, procID);
WriteProcessMemory(handle, (PBYTE*)money, &customMoneyValue, sizeoff(customMoneyValue), 0);
return 0;
}
So does anyone know how I could make it find the addresses on its own. Or is that impossible?