How to cancel a if statement once touching a collider

I created a walk script where it starts off on an original speed which is 10. I created a couple of if statements where if the player walks into Trigger number one, his speed becomes faster. I tried testing it but once the player enters the first trigger, he keeps his original speed. Is there any way to cancel the previous if statements?

Move Script:
{

public float speed = 10.0F;
    public float speed1 = 10.0F;
    public float speed2 = 20.0F;
    public float speed3 = 30.0F;
    public float speed4 = 40.0F;
    public float speed5 = 50.0F;

    void Start()
{
}
// Update is called once per frame

public void Update()
{
        float translation = Input.GetAxis("Vertical") * speed;
        float straffe = Input.GetAxis("Horizontal") * speed;
        translation *= Time.deltaTime;
        straffe *= Time.deltaTime;

        transform.Translate(straffe, 0, translation);
    }
    public void OnTriggerEnter(Collider col)
    {
        if(col.name == "Change Speed Trigger 0")
        {
            float translation = Input.GetAxis("Vertical") * speed1;
            float straffe = Input.GetAxis("Horizontal") * speed1;
            translation *= Time.deltaTime;
            straffe *= Time.deltaTime;
            Debug.Log("Speed 1");
        }
        if (col.name == "Change Speed Trigger")
        {
            float translation = Input.GetAxis("Vertical") * speed2;
            float straffe = Input.GetAxis("Horizontal") * speed2;
            translation *= Time.deltaTime;
            straffe *= Time.deltaTime;
            Debug.Log("Speed 2");
        }
        if (col.name == "Change Speed Trigger 2")
        {
            float translation = Input.GetAxis("Vertical") * speed3;
            float straffe = Input.GetAxis("Horizontal") * speed3;
            translation *= Time.deltaTime;
            straffe *= Time.deltaTime;
            Debug.Log("Speed 3");
        }
        if (col.name == "Change Speed Trigger 3")
        {
            float translation = Input.GetAxis("Vertical") * speed4;
            float straffe = Input.GetAxis("Horizontal") * speed4;
            translation *= Time.deltaTime;
            straffe *= Time.deltaTime;
            Debug.Log("Speed 4");
        }
        if (col.name == "Change Speed Trigger 4")
        {
            float translation = Input.GetAxis("Vertical") * speed5;
            float straffe = Input.GetAxis("Horizontal") * speed5;
            translation *= Time.deltaTime;
            straffe *= Time.deltaTime;
            Debug.Log("Speed 5");
        }

    }
}

I think the issue is that you are changing the speed in update which is every frame but OnTriggerEnter is a called once event, so you will be moving your player faster but then it will return to speed the very next frame…

this is what you should do

public float speed = 10.0F;
public float speed1 = 10.0F;
public float speed2 = 20.0F;
public float speed3 = 30.0F;
public float speed4 = 40.0F;
public float speed5 = 50.0F;

public void Update()
{
	MovePlayer(speed);         	
}
	 	 
public void OnTriggerEnter(Collider col)
{
	if(col.name == "Change Speed Trigger 0")        
		speed = speed1;	
	else if (col.name == "Change Speed Trigger 1")
		speed = speed2;	
	else if (col.name == "Change Speed Trigger 2")
		speed = speed3;	
	else if (col.name == "Change Speed Trigger 3")
		speed = speed4;	
	else if (col.name == "Change Speed Trigger 4")
		speed = speed5;
}

void MovePlayer(float speed)
{
	float translation = Input.GetAxis("Vertical") * speed;
	float straffe = Input.GetAxis("Horizontal") * speed;
	translation *= Time.deltaTime;
	straffe *= Time.deltaTime;
	Debug.Log("Speed = " + speed);
    transform.Translate(straffe, 0, translation);
}

hope this helps