The Hand of Armok, which sits in the entrance hall of one of my forts. Invaders have to cross it to enter the fortress proper. It consists of a set of hatches in a checkerboard pattern, each color being linked to a separate pressure plate in a repeater. When operational, the hatches open and close at different times, so that when one set is closed it always looks like there is a safe path across it.
Anyone who happens to be standing on one of the hatches when it opens falls 14 or so floors straight down onto solid stone, landing (and exploding) in the processing department, which has chambers for body-part disposal, craftsdwarves workshops for processing bones and skulls, and a short distance away (far enough that parts can't fly into it) a channel over lava marked as a dump zone for dumping cloth and leather crap to get rid of it, and magma smelters for melting down the metal equipment into bars.
When goblins arrive, dwarves are ordered to stay inside, and they entrance-dance far away from the Hand of Armok, because the hall leading outside has an open ceiling (with a bridge over it, IIRC?) to make it "outside", and the Hand is turned on by flipping a switch to activate the repeater which powers it. (The repeater is a small construction which sits on a murky pool, a reservoir, or other stable body of water. It just repeatedly toggles the pressure plates on and off.)
The goblins think there is still a path leading inside because of the checkerboard pattern, and so they try to charge across it... and end up falling to their deaths. It exterminates invasion forces with terrifying efficiency while removing the corpses from the entrance at the same time (and delivering their metal equipment to our magma work area many levels down).