how to disable a button after pressing it and enable again after pressing another button

i have a code for a QandA game where in when you pressed attack a gui box with question will appear and if you choose an answer, animation will play, my problem is when the animation play i can still click the attack button and gui will pop up, what i want is when i press the attack button and choose an answer then the animation plays i wont be able to press it again until my animation ends

here’s my code

void DrawInfo() {
            Rect rect = new Rect(500, 100, 400, 200);
            Rect close = new Rect(600, 500, 200, 100);
            if(GUI.Button(close, "ATTACK"))


if(!animation.isPlaying()) {
    if(GUI.Button(close, "ATTACK"))

That way your attack button is only displayed if the animation is NOT playing.