Script: unified values and times into a single function.

With this, it is possible to randomize also times
ScriptEditor: hooked up function stopped signal