The OP original pictures can't be seen but the reuploaded pictures are visible, and none of Star's attachment are visible. And that looks like the Kohler Courage single which the green wire would go to a oil pressure switch if it has one.
That's what I was thinking.It would be good if you at leas told us the make & model number of the engine
If that wire goes to the magneto coil then it goes on a tab behind the throttle control plate so the engine shuts off from the throttle lever