XojoScript is the scripting engine provided by Xojo and is heavily used in Xojo for IDE scripting. You can use it in your projects, compile code at runtime with a reduced Xojo language and the run it. With context object you can provide your own methods and properties and use them in the scripts. While you can precompile and then run several times, there is no way to store the compiled code anyhow. There is only one source piece containing all the code, so you can't just predefine some routines outside source.
If you have questions, please don't hesitate to contact us. See also New in the MBS Xojo Plugins 20.0