Trying to find the highest number than add it to itself.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[System.Serializable]
public class HumanRacial : MonoBehaviour
{
public float agility;
public float strength;
public float intellect;
public float highestStat;
public float coolDown = 120;
public float coolDownTimer;
public float duration;
public float durationTimer;

public void Start()
{
    
}

public void Update()
{          
    Active();
    Cooldown();
}

public void RacialBonus()
{
    float maxValue = Mathf.Max(agility, strength, intellect);

    if ((agility == maxValue && (agility == strength || agility == intellect)) || (strength == maxValue && strength == intellect))
    {
        //Two or more of our attributes are equally maxValue
        //Decide how to deal with this situation

    }
    else if (agility == maxValue)
    {
        agility *= 2f;
    }
    else if (strength == maxValue)
    {
        strength *= 2f;
    }
    else if (intellect == maxValue)
    {
        intellect *= 2f;
    }
}

private void Cooldown()
{

    if (duration > 0)
    {
        durationTimer -= Time.deltaTime;
    }
    if (durationTimer < 0)
    {
        durationTimer = 0;
    }

    if (coolDownTimer > 0)
    {
        coolDownTimer -= Time.deltaTime;
    }
    if (coolDownTimer < 0)
    {
        coolDownTimer = 0;
    }
}

private void Active()
{
    if (Input.GetKeyDown(KeyCode.D) && coolDownTimer == 0 && durationTimer == 0)
    {
        coolDownTimer = coolDown;
        durationTimer = duration;
        RacialBonus();
    }
}

}

You’re overwriting the value. Just store it in a temporary variable.

And try to use lower case for variables.

 float myHighestStat= Mathf.Max(Agility, Strength, Intellect);
 HighestStat += myHighestStat;

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[System.Serializable]
public class HumanRacial : MonoBehaviour
{
public float agility;
public float strength;
public float intellect;
public float highestStat;
public float coolDown = 120;
public float coolDownTimer;
public float duration;
public float durationTimer;

public void Start()
{
    
}

public void Update()
{          
    Active();

    if (duration > 0)
    {
        durationTimer -= Time.deltaTime;
    }
    if (durationTimer < 0)
    {
        durationTimer = 0;
    }

    if(coolDownTimer > 0)
    {
        coolDownTimer -= Time.deltaTime;
    }
    if(coolDownTimer < 0)
    {
        coolDownTimer = 0;
    }
}

public void RacialBonus()
{
    highestStat = Mathf.Max(agility, strength, intellect);
    float myHighestStat = Mathf.Max(agility, strength, intellect);
    highestStat += myHighestStat;

    if((agility > intellect) && (agility > strength))
    {
        agility += highestStat;
    }
    if ((strength > intellect) && (agility > strength))
    {
        strength += highestStat;
    }
    if ((intellect > agility) && (intellect > strength))
    {
        intellect += highestStat;
    }
}

private void Active()
{
    if (Input.GetKeyDown(KeyCode.D) && coolDownTimer == 0 && durationTimer == 0)
    {
        coolDownTimer = coolDown;
        durationTimer = duration;
        RacialBonus();
    }
}

}

I tried your changes but the only way I know hot to fix this is with if statements.

Okay, so if I got you right, you want to double whatever the highest attribute is. There really isn’t much room for efficiency improvement from what you have already done in your last code. Another way to put it would be:

float maxValue=Mathf.Max(agility, strength, intellect);
        
        if ( (agility==maxValue && (agility==strength || agility==intellect)) || (strength==maxValue && strength==intellect)) {
            //Two or more of our attributes are equally maxValue
            //Decide how to deal with this situation

        }
        else if (agility==maxValue) {
            agility*=2f;
        }
        else if (strength==maxValue) {
            strength*=2f;
        }
        else if (intellect==maxValue) {
            intellect*=2f;
        }

You might find this clearer to work with… or not… that’s entirely your preference.

EDIT: But all in all, @calpolican 's answer should be the valid answer to the original question. Again, if I got all this right.