Is there a way to make a variable correspond to multiple different scripts?

I have a game I’m making in unity and in that game when the player attacks it gets the enemy’s script and executes Die(). However, I have multiple scripts for the different types of enemies (EX: jumpers, chargers) but, they all have Die(). Is there anyway to declare a variable that can be set to any script or am I going to have to use if(){}? I want something kind of like a var except it doesn’t have to work for anything except scripts. Thank YOU! (I understand if there is nothing like this, it was a longshot)

I ended up using a base class and then overriding it.