Electroscope

Electroscope is a detector that detects whether an object is charged by using electrostatic induction.
Electroscope can also determine the polarity of a charged object.

The method to check the charging of the object using the electroscope is as follows.

When you bring the positive electrode closer to the metal plate of the electroscope, free electrons in the metal foil are attracted to the metal plate. As a result, the two metal foils induce the same positive charge, so the two metal foils push against each other.
Conversely, if you bring the negative electrode closer to the metal plate of the electroscope, the free electrons of the metal plate are pushed into the metal foil. As a result, the two metal foils induce the same negative charge, so the two metal foils push against each other.
In this way, you can check whether the object is charged.

Check the type of charge using an electroscope

You can also check the type of charged charge using an electroscope. For example, bringing a positive electrode closer to a negatively charged electroscope causes metal foil to retract. Conversely, if you bring the negative electrode closer, the metal foil will be more open.
In this way, the type of charge on the electrode can be checked from the spreading or retraction of the metal foil.