This trap is an anti everyone trap.It's also very irritating.
Build a 3 by 3 square with pressure plated on the outer blocks.Leave a space in the middle.
Place a piston next to each of the planks.
Place 3 blocks in the centre going up.Then place slabs all around those.
Destroy the 3 blocks and replace the top one with a slab.
Now when you walk in, there's no way out.Congratulations!