I used the base code but made the gravity differ depending on distance. That was the reason it fell so quickly in my friend's version. This is how the moon would orbit earth if the earth wasnt orbiting the sun.
I just fixed a small mistake (the gravity was a fixed value) everything else was made by my friend, credits to them.