Just use the left and right arrows to move from side to side to get to the door.
I got the code from my other game, Scratch Cat: a platformer. Here's the link: https://scratch.mit.edu/projects/135582503/ . (I hope it works!)