Evaluate function

Function evaluates (executes) the groovy script and returns the result.