Survive! (A Platformer)
@Stage\n\n@Player\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nhide\nwait (15) seconds\nshow\nswitch backdrop to (backdrop2 v)\ngo to x: (-184) y: (-51)\nclear graphic effects\nset [x v] to [0]\nset [y v] to [0]\nset [level v] to [1]\nforever\n    change [y v] by (-1)\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [x v] by (-1)\n    end\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x v] by (1)\n    end\n    set [x v] to ((x) * (0.85))\n    change x by (x)\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (1)\n                        if <touching color (#000000)?> then\n                            change y by (1)\n                            if <touching color (#000000)?> then\n                                change y by (-6)\n                                change x by ((x) * (-1))\n                                set [x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (y)\n    if <touching color (#000000)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<touching color (#000000)?> and <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n        set [y v] to [13]\n    end\n    change y by (1)\n    if <<touching color (#ff0000)?> and <not <<touching (love & fave v)?> or <(y position) < [-175]>>>> then\n        Death\n        go to x: (-184) y: (-51)\n        play sound [Bonk v] until done\n        set [x v] to [0]\n        set [y v] to [0]\n    end\n    if <(x position) > [240]> then\n        change [level v] by (1)\n        set [x v] to [0]\n        set [y v] to [0]\n        go to x: (-184) y: (-51)\n    end\n    if <touching color (#0008ff)?> then\n        wait (.2) seconds\n        switch backdrop to (next backdrop v)\n        go to x: (-84) y: (-49)\n    end\nend\n\ndefine Death\n\nset [x v] to [0]\nset [y v] to [0]\n\nwhen flag clicked\nwait (15) seconds\nforever\n    play sound [Dance Funky v] until done\n    play sound [Dance Magic v] until done\n    play sound [Bossa Nova v] until done\n    play sound [Chill v] until done\nend\n\n@TB\n\nwhen flag clicked\ngo to [front v] layer\nhide\nforever\n    reset timer\nend\n\nwhen [timer v] > (0.1)\nshow\n\n@Clouds\n\nwhen flag clicked\nhide\nclear graphic effects\ngo to [front v] layer\ngo to x: (-190) y: (142)\nforever\n    create clone of (_myself_ v)\n    wait (pick random (7) to (10)) seconds\nend\n\nwhen I start as a clone\nwait (.1) seconds\nforever\n    set size to ((size) + (5)) %\nend\n\nwhen I start as a clone\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-5)\nend\nswitch costume to (pick random (1) to (6))\nset size to (pick random (100) to (120)) %\ngo to x: (28) y: (pick random (160) to (70))\nshow\nforever\n    change x by (-0.5)\n    if <(x position) < [-260]> then\n        repeat (10)\n            change [ghost v] effect by (5)\n        end\n        delete this clone\n    end\nend\n\n@F6DD3234-0567-465D-AAB0-720874EC3F71\n\nwhen flag clicked\nstart sound [Undertale - Megalovania \(Sim Gretina Remix\).mp3 v]\npoint in direction (90)\nset size to (3) %\nset [ghost v] effect to (100)\nwait (1) seconds\nrepeat (10)\n    change size by (10)\n    change [ghost v] effect by (-10)\nend\nrepeat (100)\n    point in direction (90)\n    change [sine v] by (-11)\n    change size by (([sin v] of (sine) ) * (4))\n    turn right (([sin v] of (sine) ) * (5.2)) degrees\nend\nrepeat (10)\n    change size by (-10)\n    change [ghost v] effect by (10)\nend\nbroadcast (Hide text v)\n\n@Sprite2\n\nwhen flag clicked\nset size to (3) %\nset [ghost v] effect to (100)\n\nwhen I receive [enjoy text v]\nrepeat (10)\n    change size by (10)\n    change [ghost v] effect by (-10)\nend\nrepeat (100)\n    point in direction (90)\n    change [sine v] by (-11)\n    change size by (([sin v] of (sine) ) * (4))\n    turn right (([sin v] of (sine) ) * (5.2)) degrees\nend\nbroadcast (Fade text v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nwait (1) seconds\nstop all sounds\n\n@Sprite1\n\nwhen I receive [hide text v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\npoint in direction (90)\nset size to (3) %\nrepeat (10)\n    change size by (10)\n    change [ghost v] effect by (-10)\nend\nrepeat (100)\n    point in direction (90)\n    change [sine v] by (-11)\n    change size by (([sin v] of (sine) ) * (4))\n    turn right (([sin v] of (sine) ) * (5.2)) degrees\nend\nbroadcast (Enjoy text v)\n\nwhen flag clicked\nshow\n\nwhen I receive [fade text v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\n@Sprite3\n\nwhen flag clicked\nhide\nwait (15) seconds\ngo to x: (-155) y: (-169)\nshow\n\nwhen this sprite clicked\nswitch backdrop to (next backdrop v)\n\n
Click the Green flag. MOBILE FRIENDLY!\nArrow keys to move.\n