Why does this script not work?

I made an empty gameobject named gameController then attached a box collider set as trigger onto it, when the player enters the collider, it will log “has entered” but no “win.” Additionally, my lose does not work, where a zombie with a collider set to attack if the player enters which sets the death bool value to true, the game logs that the zombie has attacked, but no lose state. pausedObjects, loseObjects, and winObjects are all arrays with ui dragged into their slot in the inspector.
The following is the gameController script,
using UnityEngine;
using UnityEngine.SceneManagement;
using System.Collections.Generic;

public class GameController : MonoBehaviour
{
    public GameObject[] pausedObjects;
    public GameObject[] winObjects;
    public GameObject[] loseObjects;
    private bool win;
    private bool pause;
    ZombieController zombieController;
    private bool dead;

    // Start is called before the first frame update
    void Start()
    {
        GameObject zombie = GameObject.Find("Zombie");
        zombieController = zombie.GetComponent<ZombieController>();
        pause = true;
        Time.timeScale = 0f;
        // pausedObjects = GameObject.FindGameObjectsWithTag("ShowOnPause");
        // loseObjects = GameObject.FindGameObjectsWithTag("ShowOnLose");
        // winObjects = GameObject.FindGameObjectsWithTag("ShowOnWin");
        win = false;
    }
    void Update() {
        
        if(pause == true){
            if(Input.GetKeyDown(KeyCode.F)){
                pause = false;
                return;
            }
        }
        if(pause == false){
            Time.timeScale = 1f;
            for(var i = 0; i < pausedObjects.Length; i++ ){
                pausedObjects*.SetActive(false);*

}
return;

}

if(win == true){
Debug.Log(“won”);
Time.timeScale = 0f;
for(var i = 0; i < winObjects.Length; i++ ){
winObjects*.SetActive(true);*

}
return;
}
if(zombieController.death == true){
Debug.Log(“player died on gamecontroller script”);
Time.timeScale = 0f;
for(var i = 0; i < loseObjects.Length; i++ ){
loseObjects*.SetActive(true);*

}
if(Input.GetKeyDown(KeyCode.F)){
// for(var i = 0; i < loseObjects.Length; i++ ){
// loseObjects*.SetActive(false);*
// }
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
}
return;
}
}
// Update is called once per frame
void OnTriggerEnter(Collider other) {
if(other.gameObject.name == “Player”){
win = true;
Debug.Log(“has entered”);
}
}
}

void OnTriggerEnter(Collider other) {
if(other.gameObject.tag == “Player”){
win = true;
Debug.Log(“has entered”);
}
}
}
`
This is the zombie script,
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;

public class ZombieController : MonoBehaviour
{
Animator z_Animator;
private Rigidbody rb;
public GameObject player;
public float speed;
public Transform[] patrol;
private int randomSpot;
private float waitTime;
public float startWaitTime;
private bool chase;
private NavMeshAgent nav;
public Collider attack;
public bool death;
//public Rigidbody target;
// Start is called before the first frame update
void Start()
{
death = false;
rb = GetComponent();
z_Animator = gameObject.GetComponent();
waitTime = startWaitTime;
randomSpot = Random.Range(0, patrol.Length);
chase = false;
nav = GetComponent();
nav.speed = 2;
}

// Update is called once per frame
void Update()
{
if(chase == false){
//transform.position = Vector3.MoveTowards(transform.position,patrol[randomSpot].position,speed*Time.deltaTime);
nav.destination = patrol[randomSpot].position;
//transform.LookAt(patrol[randomSpot]);
// if(Vector3.Distance(transform.position,patrol[randomSpot].position)<0.2f){
// if(waitTime<=0){
// randomSpot = Random.Range(0, patrol.Length);
// waitTime = startWaitTime;

// }else{
// //z_Animator.SetTrigger(“look”);
// waitTime -= Time.deltaTime;
// }
// }
if(Vector3.Distance(patrol[randomSpot].position,transform.position)<0.2f){
//z_Animator.SetTrigger(“look”);
if(waitTime <=0){
z_Animator.SetTrigger(“look”);
//randomSpot = Random.Range(0, patrol.Length);
waitTime = startWaitTime;
//nav.speed = 2;
}else{
z_Animator.SetTrigger(“look”);
//nav.speed = 0;
waitTime -= Time.deltaTime;
}
//z_Animator.SetTrigger(“look”);
randomSpot = Random.Range(0, patrol.Length);
//yield return new WaitForSeconds(2.2);
}
}
if(chase == true){
//transform.position = Vector3.MoveTowards(transform.position,player.transform.position,speed*Time.deltaTime);
nav.destination = player.transform.position;
//transform.LookAt(player);
if(Vector3.Distance(player.transform.position, transform.position) < 1.75f){
z_Animator.SetTrigger(“attack”);

death = true;
Debug.Log(“died”);
return;
}
if(Vector3.Distance(player.transform.position, transform.position) > 8f){
chase = false;
nav.speed = 2;
}
}
}
void OnTriggerEnter(Collider other) {
if(other.gameObject.tag == “Player”){
//transform.position = Vector3.MoveTowards(transform.position,player.transform.position,speed*Time.deltaTime);
chase = true;
nav.speed = 5;
}
}
// void OnTriggerExit(Collider other) {
// if(other.gameObject.tag == “Player”){
// chase = false;
// nav.speed = 2;
// }
// }
}

GameController:

For your GameController, you have return statments in your Update Loop. One runs if pause is true, the other is pause is false. When a function reaches a return statement, no further code is run. So basically your update loop is being cut off before ever reaching the if statement for win==true. You need to remove the return statements from the update loop in order to fix the issue.

Enemy:

The above may also solve this issue. Since the code is returning before reaching the if statements. After removing the return statements please check to see if the problem persists.

Note:

At no point is it required for the update loop to have a return statement, perhaps this is something you learnt from a different code base and implemented when you started using Unity?