1 dispenser 4 detector rails 8 powered rails 4 normal rails (for corners) redstone 1 minecart 7 redstone torches 1 lever Fireworks to fill up dispenser.

If necessary, push the minecart to begin, or put an unpowered rail on a slope and put minecart on top of it, so when it is powered, it’s already going one way.