GrassLand | A Platformer 

Instructions: GrassLand\nUse the Arrow Keys, WASD or mobile touch\nSequel of Infection\nThanks for all the Nice comments\nThis was proposed to be featured :O

@Stage\n\nwhen flag clicked\nforever\n    play sound [Oriel Window v] until done\nend\n\n@player\n\nwhen flag clicked\nbroadcast (Start v) and wait\nhide\n\ndefine Tick\nset rotation style [left-right v]\nif <(x position) > [233]> then\n    change [level v] by (1)\n    Reset\n    broadcast (Transition v) and wait\nend\nif <<touching (danger v)?> or <(y position) < [-179]>> then\n    broadcast (Death v)\n    hide\n    wait (.4) seconds\n    Reset\n    broadcast (Death Transition v) and wait\nend\nif <touching (bounce v)?> then\n    set y to (y position)\n    set [y vel v] to [25]\nend\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\nswitch costume to (costume3 v)\n\nwhen flag clicked\nforever\n    broadcast (Tick v) and wait\nend\n\ndefine Reset\ngo to x: (-183) y: (-30)\nshow\n\nwhen I receive [redo v]\nReset\n\nwhen I receive [skip v]\nchange [level v] by (1)\nReset\n\nwhen I receive [start v]\nhide\nReset\nforever\n    platform physics (12) (-1) (.8) (1) (10) (6)\nend\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    Tick\nend\n\ndefine platform physics (jump height) (gravity) (friction) (movement speed) (wall jump vm) (wall jump hm)\nchange y by (y vel)\nif <touching (ground v)?> then\n    repeat ([abs v] of (y vel) )\n        if <touching (ground v)?> then\n            change y by ((-1) * (([abs v] of (y vel) ) / (y vel)))\n        end\n    end\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>> and <not <(y vel) > [0]>>> then\n        set [y vel v] to (jump height)\n    else\n        set [y vel v] to [0]\n    end\nelse\n    change [y vel v] by (gravity)\nend\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 vel v] by (movement 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 vel v] by ((-1) * (movement speed))\nend\nchange x by (x vel)\nif <touching (ground v)?> then\n    set [old y v] to (y position)\n    repeat (([abs v] of (x vel) ) + (1))\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n    end\n    if <touching (ground v)?> then\n        set y to (old y)\n        repeat ([ceiling v] of ([abs v] of (x vel) ) )\n            if <touching (ground v)?> then\n                change x by ((-1) * (([abs v] of (x vel) ) / (x vel)))\n            end\n        end\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>> then\n            if <(x vel) < [0]> then\n                set [x vel v] to [0]\n                if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n                    set [x vel v] to (wall jump hm)\n                    set [y vel v] to (wall jump vm)\n                end\n            else\n                set [x vel v] to [0]\n                if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>> then\n                    set [x vel v] to ((-1) * (wall jump hm))\n                    set [y vel v] to (wall jump vm)\n                end\n            end\n        end\n    end\nend\nset [x vel v] to ((x vel) * (friction))\n\nwhen I start as a clone\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\n@ground\n\nwhen I receive [tick v]\nswitch costume to (LEVEL)\n\n@Bubbles\n\nwhen flag clicked\nclear graphic effects\nhide\nwait (.2) seconds\nforever\n    go [backward v] (200) layers\n    create clone of (_myself_ v)\n    wait (0.15) seconds\nend\n\nwhen I start as a clone\npoint in direction (pick random (0) to (360))\ngo to (random position v)\nswitch costume to (pick random (1) to (3))\nset size to (pick random (300) to (500)) %\nset [ghost v] effect to (100)\nshow\nrepeat (17)\n    change [ghost v] effect by (-1)\nend\nwait (0.1) seconds\nrepeat (7)\n    change [ghost v] effect by (1)\nend\ndelete this clone\n\nwhen I receive [end v]\ndelete this clone\n\n@Beam\n\nwhen flag clicked\nhide\nwait (.2) seconds\nclear graphic effects\nforever\n    go [backward v] (75) layers\n    create clone of (_myself_ v)\n    wait (pick random (3) to (5)) seconds\nend\n\nwhen I start as a clone\nclear graphic effects\nswitch costume to (pick random (1) to (3))\ngo to x: (pick random (-200) to (240)) y: (0)\nset size to (pick random (150) to (300)) %\nset [ghost v] effect to (100)\nshow\nrepeat (20)\n    change [ghost v] effect by (-1)\n    if <(costume [number v]) = [1]> then\n        move (-0.5) steps\n    end\n    if <(costume [number v]) = [2]> then\n        move (-1) steps\n    end\n    if <(costume [number v]) = [3]> then\n        move (-2) steps\n    end\nend\nrepeat until <(x position) < [-240]>\n    if <(costume [number v]) = [1]> then\n        move (-0.5) steps\n    end\n    if <(costume [number v]) = [2]> then\n        move (-1) steps\n    end\n    if <(costume [number v]) = [3]> then\n        move (-2) steps\n    end\nend\nrepeat (20)\n    change [ghost v] effect by (2)\n    if <(costume [number v]) = [1]> then\n        move (-0.5) steps\n    end\n    if <(costume [number v]) = [2]> then\n        move (-1) steps\n    end\n    if <(costume [number v]) = [3]> then\n        move (-2) steps\n    end\nend\ndelete this clone\n\nwhen I receive [end v]\ndelete this clone\n\n@Sprite1\n\nwhen I start as a clone\nclear graphic effects\nswitch costume to (pick random (1) to (3))\ngo to x: (10) y: (pick random (100) to (240))\nset size to (pick random (150) to (300)) %\nset [ghost v] effect to (100)\nshow\nrepeat (20)\n    change [ghost v] effect by (-1)\n    change x by (-3)\nend\nrepeat until <(x position) < [-240]>\n    change x by (-3)\nend\nrepeat (20)\n    change [ghost v] effect by (2)\n    change x by (-3)\nend\ndelete this clone\n\nwhen flag clicked\nhide\nwait (.2) seconds\nclear graphic effects\nforever\n    go [backward v] (75) layers\n    create clone of (_myself_ v)\n    wait (pick random (3) to (5)) seconds\nend\n\n@Sprite2\n\ngo to [back v] layer\n\n@Danger\n\nwhen I receive [tick v]\nswitch costume to (LEVEL)\n\n@grunge_surface_dark_scratches_18460_3840x2400\n\nwhen flag clicked\nswitch costume to (528b2df1-ec39-495d-abb7-636d5882ad5f v)\ncreate clone of (_myself_ v)\nnext costume\ngo to x: (0) y: (0)\ngo [forward v] (50) layers\nshow\nforever\n    set [ghost v] effect to (90)\n    go to [front v] layer\nend\n\nwhen I start as a clone\nforever\n    set [ghost v] effect to (90)\n    go to [front v] layer\nend\n\n@Particle Engine\n\ndefine Create Clone (starting x) (starting y) (xvel) (yvel)\nhide\nset size to (pick random (80) to (100)) %\nswitch costume to (costume1 v)\ngo to x: (starting x) y: (starting y)\nset [xvel v] to (xvel)\nset [yvel v] to (yvel)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nrepeat until <touching (_edge_ v)?>\n    change [yvel v] by (-1)\n    change x by (Xvel)\n    change y by (Yvel)\nend\ndelete this clone\n\nwhen I receive [death v]\nInt\n\ndefine Int\nrepeat (25)\n    Create Clone ([x position v] of [player v]) ([y position v] of [player v]) (pick random (-10) to (10)) (pick random (10) to (-10))\nend\n\n@Menu\n\nwhen flag clicked\nbroadcast (reset clones v)\ngo to x: (-218) y: (155)\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (10)\n        if <mouse down?> then\n            wait until <not <mouse down?>>\n            if <(open) = [0]> then\n                broadcast (reset clones v)\n                set [clone id v] to [0]\n                set [open v] to [1]\n                repeat (2)\n                    change [clone id v] by (1)\n                    create clone of (_myself_ v)\n                end\n                set [clone id v] to [0]\n            else\n                broadcast (reset menu v) and wait\n            end\n        end\n    else\n        clear graphic effects\n    end\n    switch costume to (costume1 v)\nend\n\nwhen I receive [reset clones v]\ndelete this clone\n\nwhen I start as a clone\nif <(clone id) = [2]> then\n    go [backward v] (1) layers\n    switch costume to (costume3 v)\n    glide (.5) secs to x: (-156) y: (155)\nelse\n    switch costume to (costume2 v)\n    glide (.5) secs to x: (-188) y: (155)\nend\n\nwhen I receive [reset menu v]\nset [open v] to [0]\nif <[0] < (clone id)> then\n    glide (1) secs to x: (-218) y: (155)\nend\n\nwhen I start as a clone\nif <(clone id) = [1]> then\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (10)\n            if <mouse down?> then\n                wait until <not <mouse down?>>\n                broadcast (skip v) and wait\n            end\n        else\n            clear graphic effects\n        end\n    end\nelse\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (10)\n            if <mouse down?> then\n                wait until <not <mouse down?>>\n                broadcast (redo v) and wait\n            end\n        else\n            clear graphic effects\n        end\n    end\nend\n\n@detector\n\nwhen flag clicked\nhide\nset [faved___ v] to [0]\nset [loved__ v] to [0]\nset [clone id2 v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone id2 v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(LOVED__) = [1]> and <(FAVED___) = [1]>>\nwait (1) seconds\nshow\ngo to x: (0) y: (50)\nreset timer\nswitch costume to (pick random (1) to (4))\nset [ghost v] effect to (100)\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 id2) = [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            set [loved__ v] to [1]\n        end\n    end\nend\nif <(clone id2) = [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            set [faved___ v] to [1]\n        end\n    end\nend\n\n@Sprite3\n\nwhen flag clicked\nhide\n\n@Transition by @noodlebot743 (Backpack This)\n\nwhen I receive [transition v]\nswitch costume to (dark gray v)\ncreate clone of (_myself_ v)\nswitch costume to (gray v)\ncreate clone of (_myself_ v)\nstart sound [Level Completed v]\nhide\n\nwhen I start as a clone\nset [color v] effect to ((1) / (0))\nif <(costume [number v]) = [1]> then\n    clear graphic effects\n    set [trans. v] to [1]\n    go to [front v] layer\n    point in direction (90)\n    show\n    set x to (0)\n    set y to (400)\n    go to [front v] layer\n    repeat (30)\n        change y by (((0) - (y position)) / (4))\n    end\n    erase all\n    go to [front v] layer\n    repeat (30)\n        turn right (((180) - (direction)) / (4)) degrees\n    end\n    repeat (20)\n        change x by (((400) - (x position)) * (0.1))\n        change [ghost v] effect by (8)\n        if <(x position) > [225]> then\n            show\n        end\n    end\n    set [trans. v] to [0]\n    delete this clone\nend\nif <(costume [number v]) = [2]> then\n    clear graphic effects\n    go to [front v] layer\n    point in direction (90)\n    show\n    set x to (0)\n    set y to (-400)\n    go to [front v] layer\n    repeat (30)\n        change y by (((0) - (y position)) / (4))\n    end\n    go to [front v] layer\n    repeat (30)\n        turn right (((180) - (direction)) / (4)) degrees\n    end\n    repeat (20)\n        change x by (((-400) - (x position)) * (0.1))\n        change [ghost v] effect by (8)\n        if <(x position) < [-225]> then\n            show\n        end\n    end\n    delete this clone\nend\n\nwhen flag clicked\nset [trans. v] to [0]\n\n