Crouching Attack

I am a beginner at unity and am trying to make a 2D sword fighting game.I have ran into difficulties trying to make my character do an attack. My character plays a crouching or dodging animation when I click Z. I would like him to also do an attack while he is crouching when i click S. This is what I tried so far, but it is not working:

using UnityEngine;
using System.Collections;

public class CharacterController : MonoBehaviour {

bool pressS = false;
bool down = false;

void Update ()
	{
if (Input.GetKeyDown (KeyCode.Z)) {
			anim.Play ("DownDodge 2");
		}
if (Input.GetKey (KeyCode.Z)) {
			down = true;
		}
if (Input.GetKeyUp (KeyCode.Z)) {
			down = false;
		}
if (Input.GetKey (KeyCode.S)) {
			pressS = true;
		}

if (Input.GetKeyUp (KeyCode.S)) {
			pressS = false;
		}
if (down = false && (pressS = true)) {
			anim.Play ("DownSlash");
		}
	}

if i understand this corrrect you want to do the “DownSlash” animation if the Z key is being hold down and the S key is beign pressed a way to do this is by simple makeing an if statement that checks for that Something like this

// if the use ris holding down S and pressing Z Player "DownSlash" anim 
if (Input.GetKeyDown(KeyCode.S) && (Input.GetKey(KeyCode.Z))) 
{ 
anim.Play ("DownSlash"); 
} 

hope this helps