This may not work because you change layout. It is possible (i'm not sure) that the "once while true" doesn't work between layouts. In this case, functions is the way to go. Keep updating "currentLayout" like you do, but after substracting/adding one to currentLayout, call a function "changeLayout" in witch you put all the other events. Remove the "once while true" if you do so.
This way, those events won't be evaluated every tick, but only when the user clicks on sprLeft or sprRight.