The Mountains - A Generic Platformer (mobile friendly) 

Instructions: arrow keys or tap the screen to move

@Stage\n\nwhen flag clicked\nswitch backdrop to (sky v)\nforever\n    play sound [Mabeha - Mind Travel v] until done\nend\n\nwhen flag clicked\nset volume to (100) %\nset [muted? v] to [0]\nforever\n    if <key (m v) pressed?> then\n        if <(muted?) = [0]> then\n            set [muted? v] to [1]\n            set volume to (0) %\n        else\n            set [muted? v] to [0]\n            set volume to (100) %\n        end\n        wait until <not <key (m v) pressed?>>\n    end\nend\n\n@plr\n\ndefine Smooth Glide x position: (x) Y position: (y) Smoothness: (speed) Direction: (direction) Size: (size)\nrepeat until <<(round (x position)) = (round (x))> and <<(round (y position)) = (round (y))> and <<(round (size)) = (round (size))> and <(round (direction)) = (round (direction))>>>>\n    change x by (((round (x)) - (round (x position))) / (speed))\n    change y by (((round (y)) - (round (y position))) / (speed))\n    turn right (((round (direction)) - (round (direction))) / (speed)) degrees\n    change size by (((round (size)) - (round (size))) / (speed))\nend\n\nwhen flag clicked\nshow\nswitch costume to (front v)\ngo to x: (-200) y: (0)\nset [x v] to [0]\nset [y v] to [0]\nset [level v] to [1]\nforever\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x v] by (.9)\n    end\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [x v] by (-.9)\n    end\n    set [x v] to ((x) * (.9))\n    change x by (x)\n    if <touching (lvl v)?> then\n        change y by (1)\n        if <touching (lvl v)?> then\n            change y by (1)\n            if <touching (lvl v)?> then\n                change y by (1)\n                if <touching (lvl v)?> then\n                    change y by (1)\n                    if <touching (lvl v)?> then\n                        change y by (1)\n                        if <touching (lvl v)?> then\n                            change y by (-5)\n                            change x by ((x) * (-1))\n                            if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (10))>>> then\n                                if <(x) > [0]> then\n                                    set [x v] to [-5]\n                                else\n                                    set [x v] to [5]\n                                end\n                                set [y v] to [15]\n                            else\n                                set [x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y v] by (-1)\n    change y by (y)\n    if <touching (lvl v)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <touching (lvl v)?> then\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (10))>>> then\n            change [y v] by (15)\n        end\n    end\n    change y by (1)\n    if <<(x position) < [-240]> and <(level) = [1]>> then\n        set x to (-240)\n    end\n    if <<touching (spk v)?> or <touching (saw v)?>> then\n        Smooth Glide x position: [-220] Y position: [-24] Smoothness: [5] Direction: [0] Size: (size)\n        set [x v] to [0]\n        set [y v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <<<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> or <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>>> or <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (10))>>>>> then\n        switch costume to (front v)\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        switch costume to (right v)\n    end\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        switch costume to (left v)\n    end\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (10))>>> then\n        switch costume to (up v)\n    end\n    if <<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> and <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (10))>>>> then\n        switch costume to (up right v)\n    end\n    if <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> and <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (10))>>>> then\n        switch costume to (up left v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(x position) > [240]> then\n        go to x: (-240) y: (y position)\n        change [level v] by (1)\n    end\n    if <<(x position) < [-240]> and <not <(level) = [1]>>> then\n        go to x: (240) y: (y position)\n        change [level v] by (-1)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (wtr v)?> then\n        change [y v] by (-0.3)\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (10))>>> then\n            change [y v] by (2)\n        end\n        set [y v] to ((y) * (.9))\n    end\nend\n\n@lvl\n\nwhen flag clicked\ngo to [front v] layer\ngo [backward v] (2) layers\nforever\n    switch costume to (level)\nend\n\n@spk\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    switch costume to (level)\nend\n\n@txt\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    switch costume to (level)\nend\n\n@wtr\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    switch costume to (level)\nend\n\n@saw\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    turn right (saw vel) degrees\n    if <(level) = [4]> then\n        show\n        go to x: (50) y: (-20)\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nset [saw vel v] to [0]\nforever\n    repeat (20)\n        change [saw vel v] by (1)\n    end\n    repeat (40)\n        change [saw vel v] by (-1)\n    end\nend\n\n@thm\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\nend\n\n