Nature Platformer

Instructions: ~山と旅に出よう！~\n~ Let's go on a trip with the mountains! ~\n<日本語>\n~使い方~\n矢印キー、WASDキー、タップで操作。\n針に当たるか、下に落ちるとゲームオーバーです。\n世界記録目指して頑張ろう！\n<English>\n~ How to use ~\nOperate with arrow keys, WASD keys, and taps.\nThe game is over when you hit the needle or fall down.\nLet's do our best to aim for the world record!

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen flag clicked\nforever\n    play sound [TheFatRat - MAYDAY feat v] until done\nend\n\n@P.L.A.Y.E.R\n\nwhen flag clicked\nset [y-velocity v] to [0]\nset [x-velocity v] to [0]\nforever\n    Platform [11.5] [-2] [0.7] [3]\nend\n\ndefine Platform (jump height) (gravity) (friction) (running speed)\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>> then\n    point in direction (90)\n    change [x-velocity v] by (running speed)\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    point in direction (90)\n    change [x-velocity v] by ((running speed) * (-1))\nend\nset [x-velocity v] to ((X-velocity) * (friction))\nchange x by (X-velocity)\nif <touching (ground v)?> then\n    set [sprite2: slope v] to [0]\n    repeat until <<(Sprite2: Slope) = [8]> or <not <touching (ground v)?>>>\n        change [sprite2: slope v] by (1)\n        change y by (1)\n    end\nend\nif <touching (ground v)?> then\n    change y by ((Sprite2: Slope) * (-1))\n    repeat ([ceiling v] of ([abs v] of (X-velocity) ) )\n        if <touching (ground v)?> then\n            change x by ((([abs v] of (X-velocity) ) / (X-velocity)) * (-1))\n        end\n    end\n    set [x-velocity v] to [0]\nend\nchange y by (Y-velocity)\nif <touching (ground v)?> then\n    repeat ([ceiling v] of ([abs v] of (Y-velocity) ) )\n        if <touching (ground v)?> then\n            change y by ((([abs v] of (Y-velocity) ) / (Y-velocity)) * (-1))\n        end\n    end\n    if <<(([abs v] of (Y-velocity) ) / (Y-velocity)) = [-1]> and <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n        set [y-velocity v] to (jump height)\n    else\n        set [y-velocity v] to [0]\n    end\nelse\n    if <touching (trampoline v)?> then\n        set [y-velocity v] to [20]\n    end\n    change [y-velocity v] by (-1)\nend\n\nwhen flag clicked\nforever\n    wait (0.005) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nrepeat (15)\n    change size by (-1)\n    change [ghost v] effect by (8)\nend\ndelete this clone\n\nwhen flag clicked\ngo to x: (-200) y: (-131)\nswitch costume to (player v)\nshow\n\nwhen flag clicked\nforever\n    if <touching (d a n g e r v)?> then\n        go to x: (-200) y: (-131)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (goal v)?> then\n        go to x: (-200) y: (-131)\n        broadcast (Fineshed v)\n    end\nend\n\nwhen [space v] key pressed\nswitch costume to (red v)\nforever\n    wait (0.5) seconds\n    change [color v] effect by (25)\nend\n\nwhen [r v] key pressed\ngo to x: (-200) y: (-131)\n\nwhen I receive [fineshed v]\nset [x-velocity v] to [0]\nset [y-velocity v] to [0]\n\n@Ground\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\n\nwhen I receive [fineshed v]\nnext costume\n\nwhen flag clicked\nshow\ngo to x: (2) y: (-31)\n\n@Neon Platformer\n\nwhen flag clicked\nhide\n\n@Trampoline\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [fineshed v]\nnext costume\n\nwhen flag clicked\nshow\n\n@D A N G E R\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [fineshed v]\nnext costume\n\nwhen flag clicked\nshow\n\n@Goal\n\nwhen flag clicked\nforever\n    go to x: (55) y: (15)\n    if <touching (player v)?> then\n        broadcast (Fineshed v)\n        wait (0.5) seconds\n    end\nend\n\nwhen flag clicked\nshow\n\n@Neon Light\n\nwhen flag clicked\ngo to x: (36) y: (28)\nshow\ngo to [front v] layer\n\nwhen I receive [fineshed v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\n@Skip\n\nwhen this sprite clicked\nbroadcast (Fineshed v)\n\nwhen flag clicked\ngo to x: (36) y: (28)\nshow\n\n@Player Light\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\nforever\n    go to [back v] layer\n    go to (p.l.a.y.e.r v)\nend\n\nwhen [space v] key pressed\nswitch costume to (costume2 v)\nforever\n    wait (0.5) seconds\n    change [color v] effect by (25)\nend\n\n