Complex sentence: He is popular at school and has a slight ego problem but this doesn't detract from his loyal friendship to Leo and the rest of the Lil Five.
Split into simpler sentences: He is popular at school and has a slight ego problem. But this doesn't detract from his loyal friendship to Leo and the rest of the Lil Five.