I spent a lot of time trying to figure this out XD
All code by me You're free to use the code with credit