How to make my button to be functional on left click only?

here is my code:

if(GUI.Button(Rect (screenW-250,screenH/2-350,100,50),"instruction",ins)) && Input.GetKeyDown(KeyCode.mouse0)){
    if(showIns == true){
        showIns = false;
    }

but this doesnt work… do you know some other way of doing this?

        else if(showIns == false){
            showIns =true;
        }
}

When dealing with GUI, you musn’t use the Input class, but the Event class. Plus, an easier way to toggle a bool is with the ! instruction. In your case, it gives :

if(GUI.Button(...) && Event.current.button == 0 ) // If clic && left mouse button
    showIns = !showIns; // Toggle. true => false, false => true