Add support for updating variables through custom Lua functions