Nature || a platformer game

Instructions: \nWelcome to my new platform !!\n- Welcome to Nature !!!\n--Instructions--\n-Use the arrow keys to move the player.\n-Avoid spikes and lava.\n-Don't fall\n-Use the trampoline to jump higher.\n- You can walljumping\n-All levels are possible\n--Credits--\n-Code: me\n- Art: sprites- me\nBackground- @TheCactusMaster\nMusic: @amazingQ\n\nLove, fave and comment.\nHave fun!\nIf you like my projects follow me !! 

@Stage\n\n@player\n\ndefine Platformer Physics (speed) (friction) (jump height)\nchange [y vel v] by (-1)\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [x vel v] by (speed)\n    switch costume to (costume1 v)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [x vel v] by ((speed) * (-1))\n    switch costume to (costume2 v)\nend\nset [x vel v] to ((X vel) * (friction))\nchange x by (X vel)\nset [slope v] to [0]\nif <touching (level v)?> then\n    repeat until <<not <touching (level v)?>> or <(slope) = [-8]>>\n        change [slope v] by (-1)\n        change y by (1)\n    end\nend\nif <touching (level v)?> then\n    change y by (slope)\n    repeat until <not <touching (level v)?>>\n        change x by ((([abs v] of (X vel) ) / (X vel)) * (-1))\n    end\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        if <(X vel) > [0]> then\n            set [x vel v] to [-12]\n        else\n            set [x vel v] to [12]\n        end\n        set [y vel v] to [12]\n    else\n        set [x vel v] to [0]\n    end\nend\nchange y by (Y vel)\nif <touching (level v)?> then\n    repeat until <not <touching (level v)?>>\n        change y by ((([abs v] of (Y vel) ) / (Y vel)) * (-1))\n    end\n    set [y vel v] to [0]\nend\nchange y by (-1)\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <touching (level v)?>> then\n    set [y vel v] to (jump height)\nend\nchange y by (1)\n\nwhen flag clicked\n\nwhen I receive [end v]\nchange [level v] by (1)\ngo to x: (-198) y: (-10)\n\nwhen flag clicked\nset [level v] to [1]\nhide\nforever\n    play sound [AmadeusLegendaryEDM Release v] until done\nend\n\nwhen I receive [hurt v]\ngo to x: (-198) y: (-10)\n\nwhen flag clicked\nshow\ngo to [front v] layer\nset [level v] to [1]\nset [x vel v] to [0]\nset [y vel v] to [0]\nswitch costume to (costume1 v)\ngo to x: (-198) y: (-10)\npoint in direction (90)\nforever\n    Platformer Physics [1] [0.9] [13]\n    if <touching (danger v)?> then\n        go to x: (-198) y: (-10)\n    end\n    if <touching ( trampoline v)?> then\n        set [y vel v] to [20]\n    end\n    if <touching (sprite1 v)?> then\n        broadcast (end v)\n    end\n    if <(y position) < [-150]> then\n        go to x: (-198) y: (-10)\n    end\nend\n\n@level\n\nwhen flag clicked\nshow\ngo to x: (-2) y: (6)\nswitch costume to (costume1 v)\n\nwhen I receive [end v]\nnext costume\n\n@danger\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\n\nwhen I receive [end v]\nnext costume\n\nwhen flag clicked\ngo to x: (36) y: (28)\n\n@Sprite1\n\n@ trampoline\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to [back v] layer\nhide\nforever\n    if <<not <(level) = [9]>> or > then\n        hide\n    end\n    if <(level) = [9]> then\n        show\n        go to x: (-163) y: (-16)\n    end\nend\n\n@TB\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n