It's very simple: One ball will behave like it's attracted by gravity to the other ball. You can drag the stationary ball around if you want. Hitting the space bar will allow you to reset the moving ball's position and velocity. Note: If the balls get really close to one another, the moving one gets launched out at incredible velocity, necessitating a reset of it. Use "space" to do so. Further note: the physics don't appear to be quite perfect (some issue with positive oscillation feedback or something causing some orbits to go out further)
OH MAN! It's been so long since I've set foot in Scratch. Unfortunately, I don't expect to be around much, but it's great to see that it's still going strong. So this was an idea I had one day. My minimal skill in Java and C++ weren't enough to produce graphics, but I remembered this. I was planning on expanding this to have multiple entities in future, but I can't promise anything.