Is it possible to destroy a script then start another one?

Hello guys,

I am quite newcomer about C# scripting and I am working on an application. It is a simple “click and let some event happen” type app. I have a button and that button has animations on it. And also it includes a script that tells the button what to do. I want to deactivate that script after using the button and I want to use another button and another script in the same scene. I tried “Destroy(this);” but this time all the scene is not working. I want to start another script after destroying the current and destroyed script. I would be appreciated for helps. My sample code is below. As you see I need to start another script after destroying this one.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayAnimTrigger : MonoBehaviour
{

    public GameObject MainSwitch;
    public GameObject UpperLamps;
    private Animator SwitchUp;
    private Animator SwitchDown;
    public GameObject UpperDigits;
    public GameObject UpperLights;
    public GameObject UpperEightDigits;
    public GameObject BottomEightDigits;
    public GameObject BottomLights;
    public GameObject CkptEndLights;
    public GameObject BottomDigits;
    bool clickedOnce;
    bool switchDownStarted;


    void Start()
    {
        SwitchUp = MainSwitch.GetComponent<Animator>();
        switchDownStarted = false;
    }

    void Update()
    {
        if (Input.GetMouseButtonDown(0))
        {
            if (!clickedOnce)
            {
                SwitchUp.GetComponent<Animation>().Play("SwitchUp");
                SwitchUp.GetComponent<AudioSource>().Play(0);
                UpperLamps.GetComponent<Animation>().Play("UpperLampsOn");
                UpperDigits.SetActive(true);
                UpperLights.SetActive(true);
                clickedOnce = true;
            }

            else
            {
                switchDownStarted = true;
                SwitchUp.GetComponent<Animation>().Play("SwitchDown");
                UpperEightDigits.SetActive(true);
                UpperDigits.SetActive(false);
                BottomEightDigits.SetActive(true);
                CkptEndLights.SetActive(true);
                BottomLights.GetComponent<Animation>().Play("BottomLamps");
                UpperLamps.GetComponent<Animation>().Play("UpperLampsOn");

            }
        }

        if (switchDownStarted)
        {
            if (!SwitchUp.GetComponent<Animation>().IsPlaying("SwitchDown"))
            {
                switchDownStarted = false;
                UpperDigits.SetActive(true);
                UpperEightDigits.SetActive(false);
                BottomEightDigits.SetActive(false);
                CkptEndLights.SetActive(false);
                BottomDigits.SetActive(true);
                Destroy(this);
            }
        }
    }

}

`

You can create a manager script {scroptM} which will have references to others {script0, script1 for example}.
public class ScriptM : MonoBehaviour
{

    [SerializeField] private Script0 _script0;
    [SerializeField] private Script1 _script1;



    private void Start()
    {
        // add listener to a button clicked action
        _script0.buttonClicked += OnButton0Clicked;
    }


    private void OnButton0Clicked()
    {
        _script0.buttonClicked -= OnButton0Clicked;

        // or u can destroy it, but dissable cheaper
        _script0.enabled = false;
        _script1.enabled = true;
    }
}

So, something like this. U can add the functionality to your button script directly, if u want