Script functions

Added script and user functions