Bug firing thingy

Hi!
i was wondering how i could make some other bugs coming from other side, random and when they are hit with max 3 bullets they explode? :stuck_out_tongue:

could you help me with that?