You need 2 dispensers,a bucket of lava and water,2 levers,a wall and a seperate block or just 2 blocks
First set down the dispensers facing each other with 1 block between them.then place water in one and lava in the other.then on the floor next to them place the levers.then place 1 block between the levers and another on the other side.then you are done!(note:you can turn it off too)