I want to make a jail for my SMP that is impossible to escape in survival and not being made in creative mode. Something using pistons and obsidian so you cant break it.
The other answer is incorrect because you could still break it from the outside using a haste 2 beacon and a netherite efficiency 5 pickaxe.
Every time a player gets damaged, their block resets from being broken. so you just need an obsidian prison with something to deal them damage every so often (like a dispenser with poison potions) which would reset their block breaking timer. You just need to make sure they always have this poson effect and that they cannot reach the dispenser....
A piston feed tape of shifting blocks is unbreakable in survival. Make the floor out of slabs with fences below to avoid glitching through the floor, and the walls out for end stone. A feedtape is a set of pistons pushing blocks in a circle, constantly cycling around, as so each block moves around quite often. Keep in mind that a player with pretty good gear can break this, however if you make it out of end brick or ancient debris, it should be completely unbreakable. This does not prevent outside help. I also suggest adding resistance and regeneration beacons to prevent them dying from hunger.