Once you return the Generator Part to Bill on Route 27, he will reward you with TM28 (Shadow Ball). You can then teach Shadow Ball to one of your Pokémon and continue your journey.