A node-based finite state machine based on GDQuest's implementation.
Download the latest release of this plugin, which comes in a ZIP archive. Extract it into your project's "addons/" folder, then go to Project → Project Settings → Plugins and enable "NBFSM".
The player scene section on GDQuest's webpage demonstrates how to use this state machine implementation.