You may use this for your x y scrolling projects. Please understand how this works before using it as i don't want a lot of people asking me how this works. Check out PullJosh's smooth transition in How To Pen on more. I used his tiny script. Use key arrows to move up and down.
Credit to PullJosh for teaching the great big scratch world his transition engine.