If a script defines some functions like so
-- myfuns.lua
function answer()
return 42
end
then we can load it into another script:
dofile('myfuns.lua')
print(answer())
or (better) use require:
require('myfuns')
print(answer())
Then (a) it will not constantly reload the file each time it is required and (b) myfuns.lua can be put on your Lua module path