I'm assuming that you're talking about bolt scripting for Unity here; you don't actually provide a lot of details here. If you are, theoretically, you could assign a C# script to an empty object. Then all you would need to do is to set this as the active object from a flow machine.
To reference this object inside bolt, you add this to your scene variables as a game object and drag and drop it into the flow graph.
I assume you are looking at a reset script that looks a bit like this.
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
Don't forget, if you are, that you would need to reset any static variables manually.