[DisallowMultipleComponent] //only one of these scripts allowed on a gameObjectpublicclassPickUp : MonoBehaviour {//Unity manages creation of components so no constructorspublicint Value; //different for every game object instance - set in inspectorprivatevoidStart() //this will cause pickups to self-destruct after random range of seconds {Invoke("DestroyMe",Random.Range(3,7)); }publicvoidDestroyMe() {Destroy(gameObject); }}