how to disable a script after it runs in unity code example
Example: disable script in unity
GameObject.Find("Cube").GetComponent<MoveObject>().enabled = false;
GameObject.Find("Cube").GetComponent<MoveObject>().enabled = false;