How to make sneak unsneak which resets to unsneak when the button for sneak is pressed after sneak

using UnityEngine;

public class Sneak : MonoBehaviour
{
    public Transform player;

    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.LeftShift))
        {
            player.localScale = new Vector3(1,0.5f,1);
        }
        if (Input.GetKeyDown(KeyCode.LeftShift))
        {
            player.position = new Vector3(player.position.x, player.position.y -0.25f, player.position.z);
        }
        if (Input.GetKeyDown(KeyCode.LeftShift))
        {
            player.localScale = new Vector3(1, 1, 1);
        }
    }
}

So i want the player to become sneaked when u press Left Shift, and then still be sneaked when its not pressed anymore, but for him to unsneak hed need to press left shift after already pressing it to become sneaked, How would u do this? Because with this code he just sneaks and unsneaks quickly when i pressed left shift. (sorry if this is dumb question im new to C# and Unity)

This is a perfect job for a boolean variable!

public Transform player;
private boolean isSneaking = false;

void Update() {
  if (Input.GetKeyDown(KeyCode.LeftShift)) {
    if (isSneaking) {
      player.localScale = Vector3.one;
      isSneaking = false;
    }
    else {
      player.localScale = new Vector3(1, 0.5f, 1);
      player.position += Vector3.down * 0.25f;
      isSneaking = true;
    }
  }
}