How to program input switch??

wow man,where did u learn that stuff man, is there a tutorial for this because if love to learn it,

it looks very complex at first but anything is learnable right

but with this code it would do what i want right n id just have to put in the light patter that id want correct

thanks alot man for ur help