This circuit simply turns the Leds one by one, when the power is off they turn off one by one
The capacitors act as a powerbank and a delay at the sametime, the diodes prevent the capacitor to charge the previous Led, and the resistor at the start changes the charging speed of the capacitors while the resistors in sereis with the Leds prevent them from burning up.
Link to gif demo since github doesnt want to load it correctly
https://cdn.hackclub.com/019cf101-afce-755f-a8b1-9e1f08700b77/cpt2603151115-860x482.gif