Yo dude, try this out.
I did it with your rival's house, not the Pokemart, but it's basically the same. If you don't understand anything, tell me and I'll comment the code. I'd like you to be able to understand it so you can write similar scripts in the future.
EDIT: Re-download this new stdmove.rbh too.
-Raycrow