# Karaoke Templater Reference: Code execution environment

The Lua code in code blocks and on code lines is run in a separate global environment such that it won't accidentally disturb the main script function.

You can store your own data in this environment for use later, for example pre-compute some values on code-lines and later insert them using code blocks, but it also contains several pre-defined variables and functions designed to make it easier writing effect templates.