Remoderation update (29/07/2020): Reworked the code to use the vanilla side exit routine (this also fixes the Overworld music cutout bug), and added SA-1 compatibility. I also tweaked the input detection to use newly pressed instead of holding, as this more closely resembles door functionality.
Added a screenshot.
Note: Since Lunar Magic 3.00, this effect is achievable with vanilla doors and secondary exits inside LM without the need for a custom block. This block is being updated for those who still use versions earlier than 3.00.