You can make a timer to avoid player to push the button. Then once the player presses the button it must wait, let’s say 5 seconds before pressing the button again.
You can simply create a timer inside your script and add a condition to your if statement.
Here is an example:
// This is very simple pseudo code to illustrate what I mean
var timer : float = 0.0f; // This is the timer
var delay : float = 5.0f; // This is the delay in seconds
function Update() // or FixedUpdate()
{
if (Input.GetKeyDown("e") && timer >= delay)
{
ThirdPersonController.gravity = 20 * (-1);
timer = 0.0f
}
timer += Time.deltaTime;
}