There is no undetectable cheat unless you are the developer who can keep updating the anti-cheat measures in a timely manner. It’s not about image-based cheats being stable; fundamentally, those who manipulate memory are even more knowledgeable about anti-cheat mechanisms. This is a game of cat and mouse—cheating and anti-cheating will always continue. So if you want to use a cheat, just find a more reputable one to buy. It requires continuous maintenance. The only truly foolproof solution would be a DMA hardware-level cheat, but that would need a market to be viable. Otherwise, no one would bother creating it.
If you want to learn in this direction, you can go to this forum.
I can offer you a solution. There's a project called **auto_maple** or **maple_auto** that you can refer to for image recognition. As for keyboard input, you can use the MCU (Microcontroller Unit) of a composite device to simulate keyboard input and output. This is a stable approach.