Stop Script in Unity Editor

I have a script that I want to be able to completely stop and not just pause inside Unity editor.
Currently when I unclock the play button it doesn’t exactly stop the script, it does not update it.

Is there a way to kill the script or at least have a way to detect in the script it needs to stop?

will this do?