The lottery number generator is a modification of the LED dice. The clock is generated with some NAND-gates and the binary counters are connected to BCD-7segment-decoders. The first counter is resetting from 5 to 0 (effective range 0..4) and the other is resetting from 10 to 0 (effective range 0..9) thus making the numbers 0..49.
The 7-segment displays are connected via resistor packages with ribbon cable.
Not really rocket science, so here is the schematic
And here some pictures