pf2e.fyi
From Pathfinder Adventure Path: Gatewalkers, which isn't enabled.

Scholar's Bane

COMPLEX HAZARD 4
Stealth +14 (trained) to notice magical sensors hidden within four of the carvings' eyes
Description Illusions overwhelm the minds of particularly intelligent creatures, forcing them to relive every intellectual failure and shame they've ever suffered.

Disable DC 22 Thievery (trained) to carve out one eye sensor, DC 22 Arcana or DC 22 Occultism (trained) to blank out one's mind (disables trap for self only), or Dispel Magic (2nd rank; counteract DC 20) to counteract one eye sensor

AC 20; Fort +12, Ref +8
Hardness 6, HP 20 (BT 10)

Reveal Failure
Trigger A creature with an Intelligence score of 10 or greater enters the room

Effect The trap fills the triggering creature's mind with shameful memories. The creature must succeed at a DC 22 Will save or take 2d8+2 mental. The trap then rolls initiative.
Routine (4 actions) The trap uses each action to target a creature in the room with an Intelligence score of 10 or greater. A target must succeed at a DC 22 Will save or take 2d8+2 mental damage. On a critical failure, the creature takes a –10-foot status penalty to Speed for 1 minute as they stagger under the weight of their failures. The trap loses 1 action for each eye sensor disabled or destroyed.
Reset The trap can function for 10 rounds, which don't need to be consecutive, before it must recharge for 24 hours.
Pathfinder Adventure Path: GatewalkersORC