While the author made this "pixel bot" to pair their Super Hexagon with ambitions to learn OpenCV, pixel bots are almost always inferior to memory-based bots. As mentioned elsewhere in these comments, code injection should use caves and jumps, not overwrite existing code.
With a memory-based bot you often do not even need to write to the game's memory. You can use the ReadProcessMemory API call for data gathering and perform inputs with SendInput (emulate keyboard input with LLKHF_INJECTED set) or PostMessage (no LLKHF_INJECTED, also works in backgrounded windows).
The disadvantage to memory bots is that they're often more complicated at scale (beyond the point where a pixel bot would likely fail entirely), particularly with games which are updated. In cases where a game client is updated, signatures similar to virus definitions can be provided to find the particular memory address of a sought value regardless of version. By scanning the application's source code for a unique bytecode pattern known to contain the target address, you can then extract the address and read the value. This is commonly known as signature or pattern scanning.
There is another variant of bots for client/server programs where a "headless" (no display) client can interact with the server via network communication alone. Not as much fun to watch but also a very effective way of interacting with games, though it does not apply to standalone clients like this one.