 ☀ D̾e̾s̾e̾r̾t̾ ̾l̾a̾n̾d̾ ☀   [Platformer Game]
@Stage\n\nwhen flag clicked\nswitch backdrop to (sky v)\n\nwhen flag clicked\nwait (1) seconds\nforever\n    play sound [Itro & Tobu - Cloud 9 \[NCS Release\] v] until done\nend\n\n@Player\n\nwhen I receive [next level v]\nbroadcast (Reset v)\n\nwhen flag clicked\nset [_level v] to [1]\nbroadcast (Next Level v)\nforever\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [_xvelocity v] by (-1.5)\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [_xvelocity v] by (1.5)\n    end\n    set [_xvelocity v] to ((_XVelocity) * (0.85))\n    change x by (_XVelocity)\n    if <<touching (ground v)?> or <touching (moving ground v)?>> then\n        change y by (1)\n    end\n    if <<touching (ground v)?> or <touching (moving ground v)?>> then\n        change y by (1)\n    end\n    if <<touching (ground v)?> or <touching (moving ground v)?>> then\n        change y by (1)\n    end\n    if <<touching (ground v)?> or <touching (moving ground v)?>> then\n        change y by (1)\n    end\n    if <<touching (ground v)?> or <touching (moving ground v)?>> then\n        change y by (-4)\n        change x by ((_XVelocity) * (-1))\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            if <(_XVelocity) > [0]> then\n                set [_xvelocity v] to [-10]\n            else\n                set [_xvelocity v] to [10]\n            end\n            set [_yvelocity v] to [15]\n        else\n            set [_xvelocity v] to [0]\n        end\n    end\n    change [_yvelocity v] by (-1)\n    change y by (_YVelocity)\n    if <<touching (ground v)?> or <touching (moving ground v)?>> then\n        change y by ((_YVelocity) - ((_YVelocity) * (2)))\n        set [_yvelocity v] to [0]\n        if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n            switch costume to (crouch v)\n        else\n            switch costume to (player v)\n        end\n    end\n    change y by (-1)\n    if <<<touching (ground v)?> or <touching (moving ground v)?>> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        set [_yvelocity v] to [15]\n    end\n    change y by (1)\n    if <(x position) > [239]> then\n        broadcast (Next Level v) and wait\n        change [_level v] by (1)\n    end\n    if <touching (spikes v)?> then\n        broadcast (Reset v)\n        create clone of (_myself_ v)\n    end\n    if <touching (trampoline v)?> then\n        set [_yvelocity v] to [20]\n    end\nend\n\nwhen I start as a clone\nclear graphic effects\nrepeat (10)\n    change [ghost v] effect by (10)\n    change y by (5)\n    turn right (5) degrees\nend\ndelete this clone\n\nwhen I receive [reset v]\nset [_xvelocity v] to [0]\nset [_yvelocity v] to [0]\ngo to x: (-216) y: (40)\n\nwhen [r v] key pressed\nbroadcast (Reset v)\n\n@Player Trail\n\nwhen flag clicked\nshow\nforever\n    point in direction ([direction v] of [player v])\n    switch costume to ([costume name v] of [player v])\n    go to x: ([x position v] of [player v]) y: ([y position v] of [player v])\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\nrepeat (10)\n    change [ghost v] effect by (15)\n    change size by (-2)\nend\ndelete this clone\n\nwhen I receive [scroll v]\nhide\ndelete this clone\n\n@Ground\n\nwhen flag clicked\nforever\n    switch costume to (_level)\nend\n\n@Clouds\n\nwhen flag clicked\nhide\nforever\n    go to [back v] layer\n    set size to (pick random (50) to (75)) %\n    switch costume to (pick random (1) to (6))\n    point in direction (pick random (180) to (-180))\n    if <(pick random (1) to (2)) = [1]> then\n        go to x: (400) y: (pick random (180) to (0))\n    else\n        go to x: (-400) y: (pick random (180) to (0))\n    end\n    create clone of (_myself_ v)\n    wait (pick random (3) to (5)) seconds\nend\n\nwhen I start as a clone\nshow\ngo to [back v] layer\nset [ghost v] effect to (pick random (50) to (70))\ngo [backward v] (9999999999) layers\nif <(x position) < [0]> then\n    go to [back v] layer\n    repeat until <(x position) = (_XPosition)>\n        go to [back v] layer\n        set [_xposition v] to (x position)\n        change x by ((2) * ((size) / (100)))\n    end\nelse\n    repeat until <(x position) = (_XPosition)>\n        go to [back v] layer\n        set [_xposition v] to (x position)\n        change x by ((-2) * ((size) / (100)))\n    end\nend\ndelete this clone\n\n@Tree\n\nwhen flag clicked\nforever\n    switch costume to (tree v)\n    go to [back v] layer\nend\n\n@Thumbnail\n\nwhen flag clicked\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\n    wait (0.01) seconds\nend\ngo to [back v] layer\nhide\n\nshow\n\n@Text\n\nwhen flag clicked\nforever\n    switch costume to (_level)\nend\n\n@Spikes\n\nwhen flag clicked\nforever\n    go to [back v] layer\n    switch costume to (_level)\nend\n\n@trampoline\n\ndefine clone (x) (y)\ngo to x: (x) y: (y)\ngo to [back v] layer\nshow\n\nwhen flag clicked\nhide\nwait (7) seconds\nshow\nforever\n    if <(_level) = [7]> then\n        point in direction (90)\n        go to [back v] layer\n        clone [25] [-70]\n    else\n        hide\n    end\nend\n\n@Love fave\n\nwhen flag clicked\nset [costume v] to [0]\nhide\nforever\n    if <not <<(Love) = [1]> and <(Favorite) = [1]>>> then\n        wait (pick random (30) to (40)) seconds\n        switch costume to (costume1 v)\n        go to x: (0) y: (50)\n        show\n        go to [front v] layer\n        start sound [pop v]\n        repeat (9)\n            change y by (-6)\n        end\n        repeat (5)\n            change y by (3)\n        end\n        repeat (5)\n            change y by (-1)\n        end\n        wait (2) seconds\n        repeat (15)\n            change y by (7)\n        end\n        hide\n    end\n    if <(Costume) > [0]> then\n        hide\n        stop [this script v]\n    end\nend\n\n@Moving Ground\n\nwhen flag clicked\nhide\nforever\n    if <(_level) = [8]> then\n        switch costume to (costume1 v)\n        show\n        go to x: (36) y: (28)\n        repeat until <(_level) = [9]>\n            glide (1) secs to x: (120) y: (28)\n            glide (1) secs to x: (0) y: (28)\n        end\n    else\n        if <(_level) = [9]> then\n            show\n            switch costume to (costume2 v)\n            go to x: (145) y: (87)\n            repeat until <(_level) = [10]>\n                glide (1) secs to x: (185) y: (87)\n                glide (1) secs to x: (100) y: (87)\n            end\n        else\n            hide\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <<(_level) = [8]> or <(_level) = [9]>>> then\n        hide\n    end\nend\n\n@Sun\n\nwhen flag clicked\nreset timer\nshow\nforever\n    set [ghost v] effect to (20)\n    set size to ((100) - ((([sin v] of ((timer) * (50)) ) * (200)) / (10))) %\nend\n\n