I'm going to tell my friend his mustache makes him look like a sex offender
Why would you tell him that he looks like a sex offender?
I think it would be a funny joke
While it is all in fun, it is not good to make fun of your friends appearance. It might be something that he feels self-conscious about and damage his self-esteem.
Meh, he'll be fine. It's hilarious that the mustache makes him look like a pedophile and I want to hear his reaction.
Well calling your friend a pedophile is one way to lose any friend you ever had. Please for the love of God do not say that to him. Even as a joke I would expect this to end in physical violence.