how do you make a script that needs to destroy multiple objects to open a door?

How do you make this? Literally can find all types of crap but none of this.