Well, this is just my movement code way, but:
For the Overworld Script:
//Define Variables
var d, u, l, r;
d = keyboard_check(vk_down)
u = keyboard_check(vk_up)
l = keyboard_check(vk_left)
r = keyboard_check(vk_right)
if (d or u or l or r) && moveable{
moving=1
}
else{
moving=0
}
if d{
facing="D"
if place_free(x,y+2){
y+=2
}
else{
move_contact_solid(270,6)
}
}
else if u{
facing="U"
if place_free(x,y-2){
y-=2
}
else{
move_contact_solid(90,6)
}
}
if l{
facing="L"
if place_free(x-2,y){
x-=2
}
else{
move_contact_solid(180,6)
}
}
else if r{
facing="R"
if place_free(x+2,y){
x+=2
}
else{
move_contact_solid(360,6)
}
}
if moving{
image_speed=0.35
}
else{
image_speed=0
image_index=0
}
if moveable{
execute_string('sprite_index=sprPlayer'+facing)
}
For the Sidescrolling Script
//Define Variables
var d, u, l, r;
d = keyboard_check(vk_down)
u = keyboard_check(vk_up)
l = keyboard_check(vk_left)
r = keyboard_check(vk_right)
if place_free(x,y+1){
gravity=0.5
gravity_direction=270
}
else{
gravity=0
gravity_direction=270
}
if vspeed>5{
vspeed=5
}
if (l or r) && moveable{
moving=1
}
else{
moving=0
}
if l{
facing="L"
if place_free(x-2,y){
x-=2
}
else{
move_contact_solid(180,6)
}
}
else if r{
facing="R"
if place_free(x+2,y){
x+=2
}
else{
move_contact_solid(360,6)
}
}
if moving{
image_speed=0.35
}
else{
image_speed=0
image_index=0
}
if moveable{
execute_string('sprite_index=sprPlayer'+facing)
}
if keyboard_check_pressed(ord('Z')){
sound_play(Jump)
vspeed=-3
}
At least thats the way I'd do it, I hope this helps you.