First, I would like to mention that if an event has no outgoing routes (normally, it is the case for the last event), EventIDE just stays in that event forever after reaching it.
Second, there is always the global 'exit' key (Escape, by default) that aborts a running task at any moment. So, you can simply add an on-screen text in the last event, saying "Press ESC to exit the task". The exit key can be changed in the experiment properties available in the 'Experiment' ribbon tab
Third, you can use a runtime command to abort the task in code. To do it, create a proxy variable for the 'Abort Run Now' property of the Experiment object (via 'Experiment' ribbon tab). Then write this code in any snippet, e.g. in Triggered snippet of the Button element:
AbortRunNow=true; // invokes the runtime command of the experiment object
Thus, as participant presses a button, this command will be invoked by in the snippet of the Button element and the running task will exit to the designer.