Drag and Drop the Button object into the flowscript canvas.
From the menu select “Button/Event/onClick (Auto Subscribe).
Then use the node that will be created to call nodes or send events as normal in flowcanvas, like in your example use the SendEvent(bool” node (or simply directly do what you have to using the OnClick event node output) 🙂