Looks ok as best I can tell by just looking at the events. I may be missing something though.
The action to set the speed of the object when it leaves orbit is incorrect. It should be:
LinearSpeed = angularSpeed*radius*pi/180
And I’m pretty sure the orbit speed is an angular speed.
The angle of motion looks ok. It works for cw rotation. It would be -90 for ccw, and you’d probably want to put the speed calc in an abs().
As far as the bounce calculation itself, it bounces whenever the objects collide. You can modify it so it only bounces when the objects are moving toward each other.
Set vrel to (obst.vx - player.vx) * cos(a) + (obst.vy - player.vy) * sin(a)
If Vrel <0
Set j to -(1+e) * vrel / (1/player.mass + 1 / obst.mass)
...and do rest of bounce stuff.
Other than that the bounce may not be exactly what was expected since it’s treating the two objects as circles with the collision point directly between them. Boxes usually can have the collision point all over the place which will change up how it will bounce.
That and the bounce won’t change the angular velocity as is which adds to making the bounce not look right.
Both can be solved with more logic to calculate the collision point, as well as modifying the equations to take angular velocity into consideration.