Designing a Moore Machine
Your state diagram has a number of errors so you need to fix those before you try to actually implement the machine. For example, from S0 you have two transitions labeled 0,0 and from S1 you have two transitions labeled 1,0. Carefully check all of the states and all of their transitions. There's no point in going any further until you have a correct specification for the machine.