I want to be able to perform different actions on my turret depending on it's material

I have created a turret system in which the player chooses one of 4 turrets by clicking the one they wish to use. Then the material is stored and a boolean set.

if (hit.collider.gameObject.name == "TurretChoiceFire")
            {

    turretFire=true;
    fireTexture=hit.collider.gameObject.renderer.material.mainTexture;

In this example the player has chosen the flame turret and so the variable fireTexture stores the material to be applied to the turret they choose to become active and turretFire variable is to indicate which turret has been chosen.

When the player clicks on the turret they wish to activate with the material the following happens

if (hit.collider.gameObject.name == "TurretBase2")
                {
                    turret2.active = true;
        if (turretFire==true)
        {
        turret2.renderer.material.mainTexture=fireTexture;
            }

What I want to be able to do is give my turretScript (attached to the turret) different options depending on which turret has been chosen e.g The arrow it instantiates on an enemy trigger will do more damage if the turret is a flame one. I realise that this could have been done a much easier way but it is too late for me to change this now :(

void OnTriggerStay(Collider other)
{

    if (other.gameObject.tag == "Enemy")
        {
            Target = other.gameObject;
            if (Time.time>lastFireTime + delayTime)
                {
                    Instantiate(arrowPrefab,
                    transform.position,transform.rotation);
                        lastFireTime=Time.time; 
                }       
        }
}

}

I would do it the long but definate way. Don't waste your time if you think your way is better.

Make different prefabs of the turret with different scripts depending on what you want them to do, when you select a turret have the game instantiate that particular turret. This way you can set material and shader etc plus program how you want each to act individually. Treat them as though they were different weapons just with the same model/mesh.

In your turret script, simply declare a public global variable called _activeTurret.

Set this _activeTurret variable on the turret script whenever the turret material changes.

Then in your turret code, when hitting an enemy, just check the value of _activeTurret.