Disabled Script Enables Itself

Hey guys. The script below is something I made real quick. I disabled the script in the inspector, and made it so it turns itself on when an OnMouseDown function is executed. Basically what I want is so the script can’t activate until called by another script. Is there any way I can make it so I can press my mouse button down and the script can’t enabled itself?

OnMouseDown will be called even on disabled scripts, just like OnCollision or OnTrigger events. To prevent execution the function when the script is disabled, it’s possible to check if the script is enabled at the beginning of the function, and return immediately if not:

void OnMouseDown() {
    if (!enabled)
        return;

    // execute real stuff here
}