Grassland "A platformer" 

Instructions: Story: ...You've escaped the Dungeon, but its still a long way home...\n\nPart1: https://scratch.mit.edu/projects/378473895\nPart2 of my platformer series\nPart3: https://scratch.mit.edu/projects/382880543\n----------------------------Grassland-------------------------\ninstructions:\nRefresh the page then:\nSpam the flag \n∆  arrow keys or touchscreen to move \n∆  don't touch spikes or the bottom of the screen \n∆ get to the end of the level\n--------------------------------∆-------------------------------

@Stage\n\n@Player\n\nwhen flag clicked\nforever\n    set [ply v] to (y position)\n    set [plx v] to (x position)\nend\n\nwait (0.05) seconds\nnext costume\n\nwhen [space v] key pressed\n\nhide\n\nwhen flag clicked\ngo to x: (-175) y: (0)\ngo to [back v] layer\ngo [forward v] (5) layers\nset size to (20) %\nshow\nset [brightness v] effect to (-5)\nset [level v] to [1]\nset [yv v] to [0]\nset [xv v] to [0]\nset rotation style [left-right v]\nforever\n    if <touching (water v)?> then\n        change [playery v] by (-0.05)\n    else\n        change [playery v] by (-0.5)\n    end\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [playerx v] by (0.7)\n        point in direction (-90)\n    else\n        if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n            change [playerx v] by (-0.7)\n            point in direction (90)\n        end\n    end\n    set [playerx v] to ((PlayerX) * (0.9))\n    change x by (PlayerX)\n    if <<<touching (levelhit v)?> or <touching (sprite1 v)?>> or <touching (sprite2 v)?>> then\n        change y by (1)\n        if <<<touching (levelhit v)?> or <touching (sprite1 v)?>> or <touching (sprite2 v)?>> then\n            change y by (1)\n            if <<<touching (levelhit v)?> or <touching (sprite1 v)?>> or <touching (sprite2 v)?>> then\n                change y by (1)\n                if <<<touching (levelhit v)?> or <touching (sprite1 v)?>> or <touching (sprite2 v)?>> then\n                    change y by (1)\n                    if <<<touching (levelhit v)?> or <touching (sprite1 v)?>> or <touching (sprite2 v)?>> then\n                        change y by (1)\n                        if <<<touching (levelhit v)?> or <touching (sprite1 v)?>> or <touching (sprite2 v)?>> then\n                            change x by ((PlayerX) * (-1))\n                            change x by (-1)\n                            change y by (-5)\n                            if <touching (null v)?> then\n                                change x by (Change)\n                            end\n                            change x by (1)\n                            if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n                                if <not <touching color (#00ff55)?>> then\n                                    if <(PlayerX) > [0]> then\n                                        set [playerx v] to [0]\n                                    else\n                                        set [playerx v] to [0]\n                                    end\n                                    if <touching (water v)?> then\n                                        change [playery v] by (2)\n                                    else\n                                        set [playery v] to [8]\n                                    end\n                                end\n                            else\n                                set [playerx v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (PlayerY)\n    if <<<touching (levelhit v)?> or <touching (sprite1 v)?>> or <touching (sprite2 v)?>> then\n        change y by ((PlayerY) * (-1))\n        set [playery v] to [0]\n    end\n    change y by (-1)\n    if <<<touching (levelhit v)?> or <touching (sprite1 v)?>> or <touching (sprite2 v)?>> then\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            set [playery v] to [10]\n        end\n    end\n    if <<(PlayerX) > [2]> or <(PlayerX) < [-2]>> then\n        if <not <<(PlayerY) > [0.7]> or <(PlayerY) < [-0.7]>>> then\n            switch costume to ((Costume) + (3))\n            if <not <(Costume) > [7]>> then\n                change [costume v] by (1)\n            else\n                set [costume v] to [0]\n            end\n        else\n            if <(PlayerY) > [0.5]> then\n                switch costume to (jump v)\n            else\n                if <(PlayerY) < [-0.5]> then\n                    switch costume to (fall v)\n                end\n            end\n        end\n    else\n        switch costume to (stand v)\n    end\n    if <<touching (obstacles v)?> or <<(y position) < [-175]> and <touching (_edge_ v)?>>> then\n        broadcast (pl has died lol v)\n        start sound [oooooff! v]\n        go to x: (-188) y: (-146)\n        go to x: (-175) y: (0)\n        set [playerx v] to [0]\n        set [playery v] to [0]\n        point in direction (90)\n    end\n    if <<touching (trampolines v)?> or <<touching (trampolines2 v)?> or <touching (trampolines3 v)?>>> then\n        set [playery v] to [15]\n    end\n    if <touching (boss v)?> then\n        set [playery v] to [7]\n    end\n    if <<touching (_edge_ v)?> and <(x position) > [180]>> then\n        go to x: (-188) y: (-146)\n        go to x: (-232) y: (-37)\n        set [playerx v] to [0]\n        set [playery v] to [0]\n        point in direction (90)\n        broadcast (next level v)\n    end\n    change y by (1)\nend\n\nif <touching color (#00cc44)?> then\n    change y by (100)\nend\n\nswitch costume to (hitbox v)\n\nset [playery v] to [8]\n\n\n\n\nnext costume\n\n    switch costume to ((Costume) - (1))\nend\n\n\n\nchange [playery v] by (0.7)\n\nnext costume\n\n\n\nwhen I start as a clone\ndelete this clone\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\nplay sound [oooooff! v] until done\n\nset size to (20) %\nset [ghost v] effect to (0)\nrepeat (15)\n    turn right (3) degrees\n    change [ghost v] effect by ((100) / (15))\n    change size by (((20) / (15)) * (-1))\nend\ndelete this clone\n\nwhen I receive [player die v]\nstart sound [oooooff! v]\ngo to x: (-188) y: (-146)\ngo to x: (-175) y: (0)\nset [playerx v] to [0]\nset [playery v] to [0]\npoint in direction (90)\n\nwhen flag clicked\nforever\n    play sound [Happy and Fun Pop Background Music For Videos v] until done\nend\n\n@LevelHIT\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\n\nwhen I receive [next level v]\nnext costume\n\n@FrontART\n\nwhen flag clicked\ngo to [front v] layer\ngo to x: (0) y: (0)\n\nwhen flag clicked\nswitch costume to (1 v)\ngo to x: (0) y: (0)\n\nwhen I receive [next level v]\nnext costume\n\n@BackART\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\ngo [forward v] (1) layers\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\n\nwhen I receive [next level v]\nnext costume\n\n@Obstacles\n\nwhen flag clicked\ngo to [front v] layer\ngo [backward v] (1) layers\ngo to x: (0) y: (0)\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\n\nwhen I receive [next level v]\nnext costume\n\n@Clouds2\n\nwhen flag clicked\nrepeat (4)\n    create clone of (_myself_ v)\n    wait (2) seconds\n    hide\nend\n\nwhen I start as a clone\nshow\ngo to [back v] layer\ngo [forward v] (3) layers\nforever\n    if <not <(level) = [14]>> then\n        switch costume to (pick random (1) to (5))\n        go to x: (300) y: (pick random (0) to (110))\n        set [ghost v] effect to (70)\n        show\n        glide (10) secs to x: (-300) y: (y position)\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    if <(level) = [8]> then\n        show\n    else\n        if <(level) = [9]> then\n            show\n        else\n            hide\n        end\n    end\nend\n\nhide\n\nwhen I receive [next level v]\nrepeat (10)\n    if <(level) = [8]> then\n        show\n        go to x: (-120) y: (-130)\n    else\n        if <(level) = [9]> then\n            show\n            go to x: (-120) y: (-130)\n        else\n            hide\n        end\n    end\nend\n\ndefine Moving Platform physics\nforever\n    repeat until <touching (levelhit v)?>\n        change x by (3)\n    end\n    change x by (-3)\n    repeat until <touching (levelhit v)?>\n        change x by (-3)\n    end\n    change x by (3)\nend\n\nwhen flag clicked\nMoving Platform physics\nhide\n\n@Sprite2\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    if <(level) = [9]> then\n        show\n    else\n        if <(level) = [12]> then\n            show\n        else\n            hide\n        end\n    end\nend\n\nhide\n\nwhen I receive [next level v]\nrepeat (10)\n    if <(level) = [9]> then\n        show\n        go to x: (0) y: (-50)\n    else\n        if <(level) = [12]> then\n            show\n            go to x: (0) y: (-133)\n        else\n            hide\n        end\n    end\nend\n\ndefine Moving Platform physics\nforever\n    repeat until <touching (levelhit v)?>\n        change x by (3)\n    end\n    change x by (-3)\n    repeat until <touching (levelhit v)?>\n        change x by (-3)\n    end\n    change x by (3)\nend\n\nwhen flag clicked\nMoving Platform physics\n\nwhen I receive [next level v]\nchange [level v] by (1)\n\ngo to x: (0) y: (-100)\n\n@Sprite3\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (100)\n    set size to (100) %\n    go to [front v] layer\n    go to x: (0) y: (0)\n    show\n    reset timer\nend\n\nwhen [timer v] > (0.3)\nset [ghost v] effect to (0)\nset size to (100) %\ngo to [front v] layer\ngo to x: (0) y: (0)\nshow\n\n@Trampolines\n\nwhen flag clicked\nforever\n    if <(level) = [11]> then\n        show\n        go to x: (-160) y: (-112)\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nset [level v] to [1]\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        switch costume to (costume1 v)\n        repeat (3)\n            next costume\n        end\n        repeat (3)\n            switch costume to ((costume [number v]) - (1))\n        end\n        switch costume to (costume1 v)\n    end\nend\n\nnext costume\n\ngo to x: (-120) y: (-93)\n\nif <(level) = [6]> then\n    show\n    go to x: (-120) y: (-93)\nelse\n    if <(level) = [8]> then\n        show\n        go to x: (0) y: (-93)\n    end\nend\n\n@Sprite4\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [win v]\nshow\ngo to [front v] layer\nbroadcast (ghostmessage v)\nswitch costume to (costume1 v)\nforever\n    show\n    go to [front v] layer\n    go [backward v] (1) layers\nend\n\nforever\n\nwhen I receive [win v]\n\n@Sprite5\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nset [ghost v] effect to (100)\n\nwhen I receive [ghostmessage v]\nstop all sounds\nclear sound effects\nshow\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\nend\nwait (4.2) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nwait (1) seconds\nstop [all v]\n\nwhen I receive [ghostmessage v]\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nwait (1) seconds\nforever\n    if <(level) = [15]> then\n        broadcast (win v)\n        stop [this script v]\n    end\nend\n\nset volume to (0) %\n\n