The Egg Scarab is the boss of Mirage Road Zone, piloted by Eggman Nega. This boss is a large, mechanical scarab that burrows through the sand and attacks from below. It has a few distinct attack patterns that you'll need to learn to exploit its weakness.

Phase 1: Burrowing Attacks
The Egg Scarab will frequently burrow into the sand and then emerge from below, attempting to hit you. It will also sometimes jump out of the sand and try to land on you. Your main goal here is to dodge these attacks. When it emerges, it will often leave its head exposed for a brief moment. This is your opportunity to attack. As Sonic, use a Homing Attack on its head. As Blaze, use a Burst Dash. After a few hits, it will retreat back into the sand.
Phase 2: Projectile Barrage
Occasionally, the Egg Scarab will emerge and fire a volley of projectiles at you. These can be dodged by moving or jumping. After firing, its head will again be vulnerable. Continue to hit its head. Sometimes, it will also summon smaller scarab robots; defeat these to fill your Boost Gauge and avoid taking damage. The key is to be patient, dodge its attacks, and strike its head whenever it's exposed. Use your Boost to quickly close the distance for an attack or to escape a tight spot. After enough hits, the Egg Scarab will be defeated.