This aimbot is for educational purposes only. I purposely left out class implementations for Vector3 and Quaternion. You can write those yourself. There's also implementation for Quaternion::LookRotation online. I included the dump for reference. Enjoy!
See it in action: https://www.youtube.com/watch?v=TO2CKiUsHDI