This is very simple. Just play around with it. The more the speed, the more the gravity reflects it opposite to itself. IRL, if the size was around 500, your gravity would get unbalanced and your gravity would get attracted to the other mass, meaning it is stronger than you. But doesn't happen necessarily, because black holes can be small, but are super strong. Mass DOES NOT equal to size!
Thanks for @arman516 for some of the code. Rest is me. This might seem hard @griffpatch level code, but it's just 19 blocks and 2 sprites. It's that easy!