Toxic // A Platformer

Instructions: arrow keys, was, or mobile to move\n14 levels\nbe wary of spikes and toxic water along your journey \n100% possible (without skip XD)\nstory---------------------------------------------------------\n our human knowledge has kept expanding, ever growing by the second. some put it to good use while others take advantage of it. our gift has lead us through many challenges and benefits us greatly. however, many many centuries ago, human kind conducted an experiment that changed the lives of people forever. animals, humans, plants dying by the minute. Because of this, the world has ended in a toxic wasteland. you must get to the end of this polluted land to bring back life in the world.\n

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop3 v)\nwait (10) seconds\nswitch backdrop to (backdrop2 v)\n\n@spikes\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\nwhen flag clicked\nhide\nwait (10) seconds\nshow\n\nwhen flag clicked\nhide\nwait (10) seconds\nshow\n\n@player\n\nwait (10) seconds\nshow\nswitch costume to (costume1 v)\ngo to x: (-219) y: (2)\nforever\n    change [movement y v] by (-0.5)\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [movement x v] by (-.7)\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>> then\n        change [movement x v] by (.7)\n    end\n    set [movement x v] to ((Movement X) * (0.9))\n    change x by (Movement X)\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change y by (1)\n                            if <touching (level v)?> then\n                                change y by (-6)\n                                change x by ((Movement X) * (-1))\n                                if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>> then\n                                    set [movement y v] to [8]\n                                    if <(Movement X) > [0]> then\n                                        set [movement x v] to [-8]\n                                    else\n                                        set [movement x v] to [8]\n                                    end\n                                else\n                                    set [movement x v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (Movement Y)\n    if <touching (level v)?> then\n        change y by ((Movement Y) * (-1))\n        set [movement y v] to [0]\n    end\n    change y by (-0.5)\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>> and <touching (level v)?>> then\n        set [movement y v] to [8]\n    end\n    change y by (0.5)\n    if <<touching (spikes v)?> or <touching (toxic liquid v)?>> then\n        broadcast (death v) and wait\n    end\nend\n\nwhen flag clicked\nforever\n    if <(x position) > [235]> then\n        broadcast (next level v)\n        set [movement x v] to [0]\n        set [movement y v] to [0]\n        go to x: (-189) y: (-111)\n    end\nend\n\nwhen I receive [death v]\nrepeat (15)\n    change [ghost v] effect by (7)\nend\ngo to x: (-185) y: (-111)\nswitch costume to (costume1 v)\nrepeat (15)\n    change [ghost v] effect by (-7)\nend\nclear graphic effects\n\nwhen flag clicked\nclear graphic effects\n\nwhen flag clicked\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to x: (-219) y: (2)\nforever\n    change [movement y v] by (-0.5)\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [movement x v] by (-.7)\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>> then\n        change [movement x v] by (.7)\n    end\n    set [movement x v] to ((Movement X) * (0.9))\n    change x by (Movement X)\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change y by (1)\n                            if <touching (level v)?> then\n                                change y by (-6)\n                                change x by ((Movement X) * (-1))\n                                if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>> then\n                                    set [movement y v] to [8]\n                                    if <(Movement X) > [0]> then\n                                        set [movement x v] to [-8]\n                                    else\n                                        set [movement x v] to [8]\n                                    end\n                                else\n                                    set [movement x v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (Movement Y)\n    if <touching (level v)?> then\n        change y by ((Movement Y) * (-1))\n        set [movement y v] to [0]\n    end\n    change y by (-0.5)\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>> and <touching (level v)?>> then\n        set [movement y v] to [8]\n    end\n    change y by (0.5)\n    if <<touching (spikes v)?> or <touching (toxic liquid v)?>> then\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        go to x: (-209) y: (33)\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n    end\n    if <touching (bouncy stuff v)?> then\n        set [movement y v] to [17]\n    end\nend\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\n\nwhen flag clicked\nhide\nwait (10) seconds\nshow\n\nwhen I receive [next level v]\ngo to x: (-172) y: (-112)\n\nwhen flag clicked\nforever\n    if <key (left arrow v) pressed?> then\n        switch costume to (costume3 v)\n    else\n        switch costume to (costume1 v)\n    end\n    if <key (right arrow v) pressed?> then\n        switch costume to (costume2 v)\n    end\n    if <key (up arrow v) pressed?> then\n        switch costume to (costume4 v)\n    end\n    if <<key (up arrow v) pressed?> and <key (right arrow v) pressed?>> then\n        switch costume to (costume6 v)\n    end\n    if <<key (up arrow v) pressed?> and <key (left arrow v) pressed?>> then\n        switch costume to (costume7 v)\n    end\nend\n\nwhen I receive [restart v]\ngo to x: (-206) y: (-111)\n\n@Intro #3\n\nwhen flag clicked\nhide\ngo to x: (322) y: (0)\nset [down speed v] to [1]\npoint in direction (90)\nset size to (100) %\nset [ghost v] effect to (0)\n\nwhen I receive [2 v]\nshow\nglide (0.3) secs to x: (0) y: (0)\n\nwhen I receive [2 v]\ngo to [front v] layer\nrepeat (12)\n    turn right (30) degrees\nend\nwait (2.5) seconds\nforever\n    change y by ((0) - (Down Speed))\n    change [down speed v] by (1)\n    change size by (-5)\n    change [ghost v] effect by (-5)\nend\n\n@Intro #1\n\nwhen flag clicked\nshow\npoint in direction (90)\nset size to (100) %\ngo to x: (0) y: (-268)\nglide (0.3) secs to x: (0) y: (0)\nset [count v] to [0]\nwait (0.8) seconds\nforever\n    go to x: (0) y: (0)\n    point in direction ((([cos v] of ((Blehbleh) * (1.8)) ) * (10)) + (90))\n    change [blehbleh v] by (5)\n    change [count v] by (1)\n    create clone of (_myself_ v)\n    if <(Count) = [100]> then\n        broadcast (2 v)\n        point in direction (90)\n        stop [this script v]\n    end\nend\n\nwhen I start as a clone\nrepeat (10)\n    change [ghost v] effect by (10)\n    change [pixelate v] effect by (6)\n    change size by (-5)\nend\ndelete this clone\n\nwhen flag clicked\nplay sound [Intro v] until done\n\nwhen flag clicked\nrepeat (12)\n    turn right (30) degrees\nend\n\nwhen I receive [2 v]\nwait (3) seconds\nrepeat (30)\n    change y by ((0) - (Down Speed))\n    change [down speed v] by (1)\n    change size by (-3)\n    change [ghost v] effect by (-5)\nend\nhide\n\nwhen flag clicked\nwait (1) seconds\nrepeat until <(Count) = [100]>\n    create clone of (_myself_ v)\nend\n\n@Intro #2\n\nwhen flag clicked\nset size to (300) %\ngo to x: (0) y: (0)\npoint in direction (75)\nhide\nrepeat (20)\n    create clone of (_myself_ v)\n    turn left (15) degrees\nend\n\nwhen I receive [2 v]\nset [momentum v] to (pick random (10) to (15))\nset [yv v] to (pick random (2) to (3))\nchange size by (pick random (-150) to (0))\nchange [brightness v] effect by (pick random (-20) to (20))\nturn right (pick random (-10) to (10)) degrees\nshow\nrepeat until <touching (_edge_ v)?>\n    go to [back v] layer\n    move (Momentum) steps\n    change y by (Yv)\n    change [yv v] by (-0.4)\n    set [momentum v] to ((Momentum) * (0.95))\nend\nhide\ndelete this clone\n\nwhen I receive [start v]\nstop [other scripts in sprite v]\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\ndelete this clone\n\n@toxic liquid\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to [back v] layer\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nhide\nwait (10) seconds\nshow\n\nwhen flag clicked\nhide\nwait (10) seconds\nshow\n\nwhen flag clicked\nforever\n    set y to ((([sin v] of (((timer) + (me)) * (300)) ) * (8)) - ((me) * (10)))\nend\n\n@skip\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen flag clicked\nhide\nwait (10) seconds\nset size to (50) %\ngo [forward v] (1000000000000000) layers\nshow\n\nwhen this sprite clicked\nbroadcast (next level v)\n\n@level\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nwait (10) seconds\nforever\n    play sound [Alan Walker - Nebula  v] until done\nend\n\nwhen flag clicked\nforever\n    if <key (p v) pressed?> then\n        repeat until <key (u v) pressed?>\n            stop all sounds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (u v) pressed?> then\n        start sound [Alan Walker - Nebula  v]\n    end\nend\n\nwhen flag clicked\nhide\nwait (10) seconds\nshow\n\n@redo\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume3 v)\n    else\n        switch costume to (costume2 v)\n    end\nend\n\nwhen flag clicked\nhide\nwait (10) seconds\nset size to (50) %\ngo to x: (-43) y: (-189)\ngo [forward v] (10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) layers\nshow\n\nwhen this sprite clicked\nbroadcast (restart v)\n\n@Sprite1\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nforever\n    show\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    go to x: (0) y: (0)\nend\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nforever\n    go to x: (0) y: (0)\nend\n\n