You mean the Orichalcos Pendant worn by Yugi Mutou. In the anime, this pendant—imbued with Orichalcos power—spins wildly when evil spirits or strong forces are near, warning Yugi.
Important: This is a fictional device. No real-world objects detect spirits this way. It's creative storytelling, not based on actual spiritual practices.