Can anyone make this so that yo can't just fly infently

if (Input.GetKey(“w”))
{
RB.AddForce(0, 50, 0);
}

if (Input.GetKey(“w”) && transform.position.y<=0) { RB.AddForce(0, 50, 0); }