How to run a coroutine if in a trigger but run a different one if outside it?

It should be pretty obvious from the code below what I’m trying to do. I had accomplished something similar in JS but haven’t got it quite figured out in C#

Essentially I am trying to start one coroutine if the object is in the trigger, but if it is not in the trigger it should start the other one.

Any help on this would be appreciated as I’ve been stuck on this one.

using UnityEngine;
using System;
using System.Collections;

public class TriggerWwiseEvent_WepHit : MonoBehaviour {
	private float coolDown = 2.4f;
	private bool isPlaying = false;
	private bool isInTarget = false;

	
	//This coroutine should run if NOT in the trigger//
	void Update() {
		if (!isPlaying && Input.GetButtonUp("BasicAttack")){
			StartCoroutine("PlayPSNO");
		}
	}



	//This coroutine should run it IS in the trigger//
	void OnTriggerStay (Collider in_other) {
		if (in_other.tag == "Morde_Waist" && !isPlaying && Input.GetButtonUp("BasicAttack")){
			StartCoroutine("PlayPS");
		}
	}





	IEnumerator PlayPS() {
		isPlaying = true;
		yield return new WaitForSeconds(0.6f);
		GetComponent<AkTriggerEnterWeapon>().Keypress2();
		yield return new WaitForSeconds(coolDown);
		isPlaying = false;
	}





	IEnumerator PlayPSNO() {
		isPlaying = true;
		yield return new WaitForSeconds(0.6f);
		yield return new WaitForSeconds(coolDown);
		isPlaying = false;
	}



	
}

I would recommend something like that (untested example):

private bool itIsInTrigger = false;

void Update()
{

    if (!isPlaying && Input.GetButtonUp("BasicAttack"))
    {
        if (itIsInTrigger)
        {
            //call routine 1
            
        }
        else
        {
            //call routine 2
        }
    }
}
void OnTriggerEnter(Collider in_other)
{
    if (in_other.tag == "Morde_Attack1")
    {
        itIsInTrigger = true;
    }
}

void OnTriggerLeave(Collider in_other)
{
    if (in_other.tag == "Morde_Attack1")
    {
        itIsInTrigger = false;
    }
}

Not sure if you should call coroutines in such a high frequency. There is maybe room for optimization.