You have lots of events that run on every tick. Not only this is bad for the performance, but also makes the code very fragmented and difficult to follow.
You should use triggered events, functions and custom actions more.
For example, there's no point to compare the health of every ship on every tick. You should do it in the same event where the ship receives damage. And if health<=0, spawn the explosion, destroy the associated bullet in the same event. You could also get rid of isDead variable.
Ship custom action Damage
... Ship subtract damageAmount from health
... If health<=0 : Spawn explosion, spawn Gear, destroy Ship, pick and destroy bullet etc.