Disabling Input keys while attacking

Good evening, would like to know if there is a simple way to disable the Input.GetKey for like running or walking while the character attacks? being the input be possible while a bool isAttacking = false ?

Note: Using Legacy Animations character with character controller/motor/fps input controller

if (Input.GetKey(...)  !isAttacking)
{

}

Or

if (!isAttacking)
{
    if (Input.GetKey(...)) { }
}

My issue is i cant access the script that has the isAttacking since its C# and the fpsinput is js

Ok i was able to get my hands on a C# version of the FPSInput and was able to do that but not related to the key so ill have to make the changes directly to FPSInput, my issue now is that how can i make the character stop on its tracks to perform the attack? if im running and i press the attack he attacks and keeps sliding…

Any ideias of how to do this? sicne i need to stop the character on where the isAttacking turns true

You just answered your own question… Make a reference to the script that holds isAttacking in the FPSInput script. Then, in FPSInput, where the logic is for actually moving the player:

if(otherScript.isAttacking)
return;

yeah once again forgot to post that i had found a solution already xD sorry about that