I don't think scripts can destroy buildings. They can give it 100% damage but it can still be repaired.

Still, that'd be kinda cool, and make the player have to repair it if they want the bonuses back.