I had the same problem, I would do magic for people and some kid would say, I know how you did that or open your hand or whatever he can think of. People like that only want attention, so instead of beating the life outa him, do what I did. Simply just say, Ok! You do it then, come on, lets see it! and he attempted, but failed and never bothered me after that but you have to make sure you have a big crowed with people he finds "cool" or "popular" to embaris him, then what you do is the next time your doing magic, when he walkes by, stop your performance , take attention to the kid and say " would you like to attempt that trick again?" and that will get a laugh, and the person will usualy keep walking in embarisment or will just try again and fail witch will get an even bigger laugh . If that doesnt work, he will most probobly say " oh , i know how you did that" and you then do somthing totaly amazing to them, somthing new that he wouldnt know if he does buy magic, then just say " oh, so you know that one too? " and he will feel embarist and walk away.
hope this helps, and remeber,If he spoils your tricks, hes no magician hes nothing but a magician reject that needs to be the center of attention.