Grassland || A platformer

Instructions: use arrow keys or WASD\nyou can remix it if you like\nYou can only advertise if you follow me\nPLEASE LIKE AND FAVORITE \nhttps://scratch.mit.edu/users/cs3004013/\nPlease follow too!\n

@Stage\n\nwhen flag clicked\nset volume to (100) %\nforever\n    play sound [Plugged by -Xaf- v] until done\nend\n\nwhen I receive [1 v]\nset volume to (0) %\n\n@Thumbnail3\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    show\n    go to [front v] layer\n    change [ghost v] effect by (500)\nend\n\n@Levels\n\nwhen flag clicked\nhide\n\nwhen I receive [start level v]\nshow\nif <(Level) = [1]> then\n    switch costume to (level1 v)\nend\nif <(Level) = [2]> then\n    switch costume to (level2 v)\nend\nif <(Level) = [3]> then\n    switch costume to (level3 v)\nend\nif <(Level) = [4]> then\n    switch costume to (level4 v)\nend\nif <(Level) = [5]> then\n    switch costume to (level5 v)\nend\nif <(Level) = [6]> then\n    switch costume to (level6 v)\nend\nif <(Level) = [7]> then\n    switch costume to (level7 v)\nend\nif <(Level) = [8]> then\n    switch costume to (level8 v)\nend\nif <(Level) = [9]> then\n    switch costume to (level9 v)\nend\nif <(Level) = [10]> then\n    switch costume to (level10 v)\nend\n\n@Sprite1\n\nwhen I receive [start level v]\nshow\ngo to [front v] layer\nswitch costume to (1 v)\nset [jumping v] to [false]\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nforever\n    change [y velocity v] by (-1)\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        if <(x velocity) > [-10]> then\n            change [x velocity v] by (-2)\n        end\n        if <(costume [number v]) = [1]> then\n            switch costume to (2 v)\n        else\n            switch costume to (1 v)\n        end\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        if <(x velocity) < [10]> then\n            change [x velocity v] by (2)\n        end\n        if <(costume [number v]) = [3]> then\n            switch costume to (4 v)\n        else\n            switch costume to (3 v)\n        end\n    end\n    if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n        switch costume to (5 v)\n    end\n    if <(x velocity) > [0]> then\n        change [x velocity v] by (-1)\n    end\n    if <(x velocity) < [0]> then\n        change [x velocity v] by (1)\n    end\n    change x by (x velocity)\n    move vertical\n    move horicontal\n    if <touching color (#00ffb5)?> then\n        broadcast (next level v)\n    end\n    if <<<(y position) < [-179]> or <touching color (#ff0000)?>> or <touching color (#ff4e2e)?>> then\n        start sound [oof v]\n        broadcast (start level v)\n    end\nend\n\nwhen [w v] key pressed\nif <(jumping) = [false]> then\n    set [y velocity v] to [15]\n    set [jumping v] to [true]\nend\n\nwhen I receive [start level v]\nif <(Level) = [1]> then\n    go to x: (-173) y: (-80)\nend\nif <(Level) = [2]> then\n    go to x: (-210) y: (-80)\nend\nif <(Level) = [3]> then\n    go to x: (-188) y: (-81)\nend\nif <(Level) = [4]> then\n    go to x: (-210) y: (-80)\nend\nif <(Level) = [5]> then\n    go to x: (-188) y: (-81)\nend\nif <(Level) = [6]> then\n    go to x: (-206) y: (-87)\nend\nif <(Level) = [7]> then\n    go to x: (-206) y: (-87)\nend\nif <(Level) = [8]> then\n    go to x: (-206) y: (-87)\nend\nif <(Level) = [9]> then\n    go to x: (-206) y: (-87)\nend\nif <(Level) = [10]> then\n    go to x: (-206) y: (-87)\nend\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nhide\n\nwhen I receive [next level v]\nchange [level v] by (1)\nstop [other scripts in sprite v]\nbroadcast (start level v)\n\ndefine move vertical\nchange y by (y velocity)\nif <<touching color (#00ff22)?> or <<touching color (#9c6900)?> or <touching color (#000000)?>>> then\n    if <(y velocity) > [0]> then\n        repeat until <not <<touching color (#00ff22)?> or <<touching color (#9c6900)?> or <touching color (#000000)?>>>>\n            change y by (-1)\n        end\n    else\n        repeat until <not <<touching color (#00ff22)?> or <<touching color (#9c6900)?> or <touching color (#000000)?>>>>\n            change y by (1)\n        end\n        set [jumping v] to [false]\n    end\n    set [y velocity v] to [0]\nend\n\nwhen [up arrow v] key pressed\nif <(jumping) = [false]> then\n    set [y velocity v] to [15]\n    set [jumping v] to [true]\nend\n\ndefine move horicontal\nif <<touching color (#00ff22)?> or <<touching color (#9c6900)?> or <touching color (#000000)?>>> then\n    if <(x velocity) > [0]> then\n        repeat until <not <<touching color (#00ff22)?> or <<touching color (#9c6900)?> or <touching color (#000000)?>>>>\n            change x by (-2)\n        end\n    else\n        repeat until <not <<touching color (#00ff22)?> or <<touching color (#9c6900)?> or <touching color (#000000)?>>>>\n            change x by (2)\n        end\n    end\n    set [x velocity v] to [0]\nend\n\n@Confetti3\n\nwhen I start as a clone\nshow\nforever\n    next costume\nend\n\nwhen flag clicked\nshow\nset [color v] effect to (120)\ngo to x: (-999) y: (-999)\nrepeat (5)\n    set [brightness v] effect to (0)\n    create clone of (_myself_ v)\n    change [color v] effect by (0)\n    create clone of (_myself_ v)\n    change [color v] effect by (0)\n    create clone of (_myself_ v)\n    change [color v] effect by (0)\n    create clone of (_myself_ v)\n    change [color v] effect by (0)\n    create clone of (_myself_ v)\n    set [brightness v] effect to (100)\n    change [color v] effect by (0)\n    create clone of (_myself_ v)\n    change [color v] effect by (0)\n    create clone of (_myself_ v)\n    change [color v] effect by (0)\n    create clone of (_myself_ v)\n    change [color v] effect by (0)\nend\nwait (2) seconds\n\nwhen I start as a clone\npoint in direction (pick random (0) to (70))\nwait (0.2) seconds\nrepeat until <[-178] > (y position)>\n    change y by (-5)\nend\ndelete this clone\n\nwhen I start as a clone\nrepeat (pick random (1) to (10))\n    move (25) steps\nend\nrepeat (pick random (1) to (10))\n    move (20) steps\nend\nrepeat (pick random (1) to (10))\n    move (10) steps\nend\nrepeat (pick random (1) to (10))\n    move (5) steps\nend\nrepeat (pick random (1) to (10))\n    move (3) steps\nend\nrepeat (pick random (1) to (10))\n    move (2) steps\nend\nrepeat (pick random (1) to (10))\n    move (1) steps\nend\nforever\n    turn right (5) degrees\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [10]> then\n        show\n        set [color v] effect to (120)\n        go to x: (-999) y: (-999)\n        repeat (5)\n            set [brightness v] effect to (0)\n            create clone of (_myself_ v)\n            change [color v] effect by (0)\n            create clone of (_myself_ v)\n            change [color v] effect by (0)\n            create clone of (_myself_ v)\n            change [color v] effect by (0)\n            create clone of (_myself_ v)\n            change [color v] effect by (0)\n            create clone of (_myself_ v)\n            set [brightness v] effect to (100)\n            change [color v] effect by (0)\n            create clone of (_myself_ v)\n            change [color v] effect by (0)\n            create clone of (_myself_ v)\n            change [color v] effect by (0)\n            create clone of (_myself_ v)\n            change [color v] effect by (0)\n        end\n        wait (2) seconds\n    end\nend\n\n@Confetti2\n\nwhen I start as a clone\nshow\nforever\n    next costume\nend\n\nwhen flag clicked\nshow\nset [color v] effect to (120)\ngo to x: (999) y: (-999)\nrepeat (5)\n    set [brightness v] effect to (0)\n    create clone of (_myself_ v)\n    change [color v] effect by (0)\n    create clone of (_myself_ v)\n    change [color v] effect by (0)\n    create clone of (_myself_ v)\n    change [color v] effect by (0)\n    create clone of (_myself_ v)\n    change [color v] effect by (0)\n    create clone of (_myself_ v)\n    set [brightness v] effect to (100)\n    change [color v] effect by (0)\n    create clone of (_myself_ v)\n    change [color v] effect by (0)\n    create clone of (_myself_ v)\n    change [color v] effect by (0)\n    create clone of (_myself_ v)\n    change [color v] effect by (0)\nend\nwait (2) seconds\n\nwhen I start as a clone\npoint in direction (pick random (0) to (-70))\nwait (0.2) seconds\nrepeat until <[-178] > (y position)>\n    change y by (-5)\nend\ndelete this clone\n\nwhen I start as a clone\nrepeat (pick random (1) to (10))\n    move (25) steps\nend\nrepeat (pick random (1) to (10))\n    move (20) steps\nend\nrepeat (pick random (1) to (10))\n    move (10) steps\nend\nrepeat (pick random (1) to (10))\n    move (5) steps\nend\nrepeat (pick random (1) to (10))\n    move (3) steps\nend\nrepeat (pick random (1) to (10))\n    move (2) steps\nend\nrepeat (pick random (1) to (10))\n    move (1) steps\nend\nforever\n    turn right (5) degrees\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [10]> then\n        show\n        set [color v] effect to (120)\n        go to x: (999) y: (-999)\n        repeat (5)\n            set [brightness v] effect to (0)\n            create clone of (_myself_ v)\n            change [color v] effect by (0)\n            create clone of (_myself_ v)\n            change [color v] effect by (0)\n            create clone of (_myself_ v)\n            change [color v] effect by (0)\n            create clone of (_myself_ v)\n            change [color v] effect by (0)\n            create clone of (_myself_ v)\n            set [brightness v] effect to (100)\n            change [color v] effect by (0)\n            create clone of (_myself_ v)\n            change [color v] effect by (0)\n            create clone of (_myself_ v)\n            change [color v] effect by (0)\n            create clone of (_myself_ v)\n            change [color v] effect by (0)\n        end\n        wait (2) seconds\n    end\nend\n\n@detector\n\nwhen flag clicked\npoint in direction (90)\nhide\nset [clone id v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone id v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(LOVED__) = [1]> and <(FAVED___) = [1]>>\nwait (0.5) seconds\nshow\ngo to x: (0) y: (-100)\nreset timer\nswitch costume to (pick random (1) to (4))\nset [ghost v] effect to (100)\ngo [forward v] (2000) layers\nrepeat until <(timer) > [3.5]>\n    change y by ((y position) / (-15))\n    change [ghost v] effect by (-3)\nend\nreset timer\nrepeat until <(timer) > [3.5]>\n    change y by (((y position) - (-100)) / (-15))\n    change [ghost v] effect by (10)\nend\n\nwhen I start as a clone\nif <(clone id) = [0]> then\n    go to x: (-15) y: (0)\n    set [loved__ v] to [0]\n    switch costume to (love v)\n    forever\n        set [love? v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            wait (0.2) seconds\n            if <touching (mouse-pointer v)?> then\n                set [loved__ v] to [1]\n            end\n        end\n    end\nend\nif <(clone id) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (fave v)\n    set [faved___ v] to [0]\n    forever\n        set [fav v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            wait (0.2) seconds\n            if <touching (mouse-pointer v)?> then\n                set [faved___ v] to [1]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [10]> then\n        hide\n    end\nend\n\n@Play button\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nset [level v] to [1]\nshow\ngo to [front v] layer\nforever\n    next costume\n    wait (0.5) seconds\nend\n\nwhen backdrop switches to [backdrop2 v]\nhide\n\nwhen this sprite clicked\nhide\nswitch backdrop to (blue sky 2  v)\nbroadcast (start level v)\n\n@Skip\n\nwhen I receive [start level v]\nshow\ngo to [front v] layer\nforever\n    next costume\n    wait (0.5) seconds\nend\n\nwhen this sprite clicked\nbroadcast (next level v)\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [10]> then\n        hide\n    end\nend\n\n@Skip2\n\nwhen I receive [start level v]\nshow\ngo to [front v] layer\nswitch costume to (costume2 v)\n\nwhen this sprite clicked\nswitch costume to (costume3 v)\nbroadcast (1 v)\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [10]> then\n        hide\n    end\nend\n\n