R5-P8 and Drawing a Match

By Caboose2900, in X-Wing Rules Questions

If the ship the pain bot is on dies, does it get its effect before it is killed?

Only if it is kept in play via the Simultaneous Attack rule. When a ship is destroyed any ability or upgrades are no longer active.