Complex sentence: At the castle, Johan and Peewit give the flutes back to the smurfs and after the smurfs leave, Peewit starts playing the flute, only to realize it was the fake flute he made.
Split into simpler sentences: At the castle, Johan and Peewit give the flutes back to the smurfs and after the smurfs leave. Only to realize it was the fake flute he made.