An electroscope measures electric fields or their change. This design
is a fairly simple circuit: three cascaded amplifiers formed by simple
bipolar transistors. Each transistor stage has a gain of (I'm
guessing) about a hundred, so the cascaded combination should have a
gain somewhere around a million. So this is easily sensitive enough to
detect the changing electric fields of someone walking by.

Here's an example: you can charge up a glass rod by rubbing it with
fabric: this literally rubs electrons off the fabric and leaves the
rod with an excess of electrons for a negative charge. Because glass
is an good insulator, it will maintain the charge for a while. The
ability of friction to give materials a charge is called the
triboelectric
effect and it's
been known since antiquity. (In fact the word "electricity" derives
from the Greek word for amber, _ lektron_, which has a high
triboelectric effect.)

Here I've rubbed some electrons off my cat (cat fur is high on the positive side of the triboelectric series). As I bring the electroscope towards her, the orange positive led lights.

Here's a demonstration with a glass rod: I've stolen some electrons
from my cat, so the rod is negatively charged. As I bring it towards
the electroscope the green negative LED lights as the electric field
becomes more negative; as I withdraw it it the orange positive LED
lights as the field becomes more positive.

Oh, and pretty soon I had to abort the experiment, as the cat wanted to bite the shiny antennae: