Here's how it works:
* Uncharged: When an electroscope is uncharged, its leaves hang straight down.
* Charged: When a charged object is brought near the electroscope, the charges within the electroscope will redistribute.
* If the object is positively charged, the electrons in the electroscope will be attracted to the object, leaving the leaves with a positive charge, causing them to repel each other and spread apart.
* If the object is negatively charged, the electrons in the object will repel the electrons in the electroscope, causing them to move away from the object and toward the leaves, making the leaves negatively charged and causing them to repel each other and spread apart.
In short, an electroscope detects the presence of an electrical charge regardless of its polarity.