You can use the these editor scripts in your own project by adding this project as a Defold library dependency. Open your game.project file and in the dependencies field under project add:
https://github.com/Jerakin/editor-script-monarch/archive/master.zip
This script adds a menu option to the context menu on a gui scene. When used it creates a collection and a gui_script (which adds the "require monarch" and "acquire_input_focus" automatically). It also adds the gui_script to the selected gui scene and adds the gui scene to the newly created collection.