Wait for script

Wait until until a script returns true.