Converted AbstractScript to PollingScript