Modular Scripting in FileMaker adapts the inheritance property of object-oriented programming to the particular grain of how FileMaker works. Modular Scripting aspires to be as copy-and-pastable as possible by recognizing that FileMaker is not an object-oriented platform, but a context-oriented platform.
Modular Scripts may control themselves by value-based parameters passed to them by the calling context or by identifying the operating context for themselves. Modular Scripts may depend on certain patterned structures in a FileMaker system, but may not depend on any particular schema or context beyond what the script is told via parameters or can infer (such as via Get() and Design functions).
For example, a modular "Print Report" script may need to be told what layout to print, and may even require that the found set be sorted by an OnLayoutLoad or OnModeEnter trigger, but a modular Print Report script would rather not require a specific layout named "Print Report Layout" or a specific "Table::SortThis" field unless these are common to multiple distinct applications of the script in a given solution.
So a single Modular Script can be called to perform the same task as appropriate for many different contexts.