I want to create a trap with an iron trapdoor hidden by a carpet.
When a player stands on a carpet, the carpet disappears for five seconds and the trapdoor beneath it opens, and the player falls into a lava pit.
I have managed to activate iron trapdoors by creating an always active command block that detects standing on the trapdoor and creatres redstone torches under the iron doors (each set of trapdoors forms a 2x2 square that should open simultaneously).
Could you give me some hints how I could achieve it?
UPDATE 1: Minecraft version 1.13.2
UPDATE 2: I've managed to create trapdoor trap by creating a set of command blocks beneath the trap, so I just need to detect carpets.