Repeating Actions Examples

END-REP is used to enclose the block of repeating actions, telling Rule Machine where they end. It does not stop an in-progress repeat. Your example would be doable with a simple conditional, but there is an example with multiple conditions in the post I linked to above ("Stop Repeating Actions" inside a conditional inside the repeat is what you're looking for).