You bought the correct transistor. Here is its pinout:
Here is how the circuit works:
1. The transistor is closed (not conducting any current).
2. When the pendulum swings by the coil, it induces a voltage pulse in the first coil.
3. The voltage opens the transistor.
4. The battery current flows through the second coil and pushes the pendulum.
6. The transistor closes.
7. GOTO 1.