You could do it with simple counters. Think of each swing as a "tick" and evaluate accordinginly:
tick tick tick tick tick tick
AI+ AI+ LS+ AI+ AI+ LS+
That's a fully successful series. You'd have 2 counters, one AI and one for LS (+ and - indicate success/failure)
Here's the thought process:
On tick #1, AI=0 and LS=0
On tick #2, AI=1 and LS=0
(if you were to fail, AI=0, LS=0 and it's as if you started over)
On tick #3, AI=2 and LS=0
(if you were to fail, AI=0, LS=0 and it's as if you started over)
On tick #4, if AI=2, then you LS, if not, you're back to AI
Think of each "tick" as a time to do an if (or case-style) statement. At each tick stage, decide whether to continue the pattern (due to success) or drop back to the beginning (or perhaps to a specific part in the sequence).
It's a little difficult to explain this on a fourm, but perhaps we could chat in vent or I can sketch up a diagram!