how can i check with input if single string is the same as full string?

i guess when the code is in right direction, then it shoud light up 1 by 1, but if lets say half way im guessing the code wrong, then all the light should go red then reset (kind of turning off the light)

i did the delay before get all, but still gets stuck on a few of them. maybe im being confused a bit