The Impossible Platformer 2 v1.0 - #games
@Stage\n\nwhen flag clicked\nset volume to (100) %\nforever\n    play sound [weird music v] until done\nend\n\nwhen I receive [stop all v]\nset volume to (30) %\n\n@player\n\nwhen flag clicked\nset [game level v] to [1]\nbroadcast (reset level v)\nset rotation style [left-right v]\nerase all\nset size to (35) %\nshow\nforever\n    switch costume to (hitbox1 v)\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        point in direction (90)\n        if <(in air) < [1]> then\n            change [xv v] by (1.3)\n        else\n            change [xv v] by (2)\n        end\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        point in direction (-90)\n        if <(in air) < [1]> then\n            change [xv v] by (-1.3)\n        else\n            change [xv v] by (-2)\n        end\n    end\n    if <(in air) < [1]> then\n        set [xv v] to ((xv) * (0.91))\n    else\n        set [xv v] to ((xv) * (0.75))\n    end\n    change x by (xv)\n    sense wall\n    change [yv v] by (-1.3)\n    change y by (yv)\n    rise\n    if <<(in air) < [5]> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        set [yv v] to [11]\n    end\n    switch costume to (player3 v)\n    if <<<touching (spikes v)?> or <(y position) < [-170]>> or <touching (spinning blades!!! v)?>> then\n        switch costume to (player v)\n        wait (0.2) seconds\n        set [yv v] to [0]\n        broadcast (restart game v)\n    end\n    switch costume to (hitbox1 v)\n    if <(x position) > [235]> then\n        if <<(pick random (1) to (12)) = [1]> and <not <(GAME LEVEL) = [1]>>> then\n            set [game level v] to ((GAME LEVEL) - (1))\n            broadcast (reset level v)\n        else\n            change [game level v] by (1)\n            broadcast (reset level v)\n        end\n    end\n    create clone of (_myself_ v)\n    switch costume to (player v)\nend\n\ndefine rise\nchange [in air v] by (1)\nif <(yv) > [0]> then\n    repeat until <not <touching (level v)?>>\n        if <(yv) > [0]> then\n            change y by ((-1) * (yv))\n        else\n            set [in air v] to [0]\n            change y by (1)\n        end\n        set [yv v] to [0]\n    end\nelse\n    repeat until <<not <touching (level v)?>> and <not <touching (jump thru v)?>>>\n        switch costume to (hitbox2 v)\n        if <(yv) > [0]> then\n            change y by ((-1) * (yv))\n        else\n            set [in air v] to [0]\n            change y by (1)\n        end\n        set [yv v] to [0]\n    end\n    switch costume to (hitbox1 v)\nend\n\ndefine sense wall\nrepeat (3)\n    if <touching (level v)?> then\n        change y by (1)\n    end\nend\nif <touching (level v)?> then\n    change y by (-3)\n    change x by ((-1) * (xv))\n    set [xv v] to [0]\nend\n\nwhen I receive [reset level v]\nif <(GAME LEVEL) = [1]> then\n    go to x: (-210) y: (-114)\nend\nif <(GAME LEVEL) = [2]> then\n    go to x: (-210) y: (-24)\nend\nif <(GAME LEVEL) = [3]> then\n    go to x: (-210) y: (-24)\nend\nif <(GAME LEVEL) = [4]> then\n    go to x: (-210) y: (47)\nend\nif <(GAME LEVEL) = [5]> then\n    go to x: (-217) y: (-31)\nend\nif <(GAME LEVEL) = [6]> then\n    go to x: (-217) y: (-31)\nend\nif <(GAME LEVEL) = [7]> then\n    go to x: (-210) y: (130)\nend\nif <(GAME LEVEL) = [8]> then\n    go to x: (-210) y: (56)\nend\nif <(GAME LEVEL) = [9]> then\n    go to x: (-210) y: (56)\nend\nif <(GAME LEVEL) = [10]> then\n    go to x: (-210) y: (158)\nend\nif <(GAME LEVEL) = [11]> then\n    change [☁ beat the game v] by (1)\n    broadcast (win v)\n    broadcast (stop all v)\nend\n\nwhen I receive [restart game v]\nset [game level v] to [1]\nbroadcast (reset level v)\nif <(username) = [chipm0nk-tutorials]> then\n    set [game level v] to [11]\n    broadcast (reset level v)\nend\n\nwhen I start as a clone\nswitch costume to (player2 v)\nset size to (35) %\nclear graphic effects\nrepeat (20)\n    change size by (-1.6)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\nwhen I receive [stop all v]\nhide\nstop [other scripts in sprite v]\n\nset [game level v] to [9]\nbroadcast (reset level v)\n\n@level\n\nwhen flag clicked\nshow\nforever\n    switch costume to (GAME LEVEL)\n    set [ghost v] effect to (0)\n    go to x: (0) y: (0)\n    go to [front v] layer\nend\n\nwhen I receive [stop all v]\nhide\n\n@clouds\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\ncreate clone of (_myself_ v)\ngo to x: (-615) y: (0)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nforever\n    set [brightness v] effect to (-50)\n    switch costume to (costume1 v)\n    set size to (100) %\n    set [ghost v] effect to (80)\n    switch costume to (costume5 v)\n    set y to (0)\n    change x by (0.7)\n    if <(x position) > [615]> then\n        set x to (-600)\n    end\n    go to [back v] layer\nend\n\nwhen I receive [stop all v]\nhide\n\n@unused\n\nwhen I start as a clone\nforever\n    if <(clone #) = [0]> then\n        go to (player v)\n        switch costume to (costume2 v)\n        set size to (Size?) %\n        switch costume to (costume1 v)\n        set [ghost v] effect to (50)\n        show\n    else\n        go to (player v)\n        switch costume to (costume2 v)\n        set size to (Size?) %\n        switch costume to (costume1 v)\n        set [ghost v] effect to (40)\n        show\n    end\nend\n\nwhen I start as a clone\nif <(clone #) = [0]> then\n    set [size? v] to [450]\nelse\n    set [size? v] to [600]\nend\nforever\n    if <(clone #) = [0]> then\n        set [size? v] to [450]\n        repeat (15)\n            change [size? v] by (1)\n        end\n        repeat (5)\n            change [size? v] by (2)\n        end\n        repeat (5)\n            change [size? v] by (-2)\n        end\n        repeat (15)\n            change [size? v] by (-1)\n        end\n    else\n        set [size? v] to [600]\n        repeat (15)\n            change [size? v] by (2)\n        end\n        repeat (5)\n            change [size? v] by (3)\n        end\n        repeat (5)\n            change [size? v] by (-3)\n        end\n        repeat (15)\n            change [size? v] by (-2)\n        end\n    end\nend\n\nwhen flag clicked\nset [brightness v] to [-10]\nhide\n\nset [clone # v] to [0]\ncreate clone of (_myself_ v)\nset [clone # v] to [1]\ncreate clone of (_myself_ v)\nset [size? v] to [750]\nforever\n    go to (player v)\n    switch costume to (costume2 v)\n    set size to (Size?) %\n    switch costume to (costume1 v)\n    set [ghost v] effect to (10)\n    show\nend\n\nwhen flag clicked\nforever\n    set [size? v] to [750]\n    repeat (5)\n        change [size? v] by (1)\n    end\n    repeat (15)\n        change [size? v] by (2)\n    end\n    repeat (15)\n        change [size? v] by (-2)\n    end\n    repeat (5)\n        change [size? v] by (-1)\n    end\nend\n\n@spikes\n\nwhen flag clicked\nshow\nforever\n    set [ghost v] effect to (0)\n    go to x: (0) y: (-32)\n    wait (1) seconds\n    repeat (4)\n        change y by (8)\n    end\n    wait (1.3) seconds\n    repeat (4)\n        change y by (-8)\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (GAME LEVEL)\nend\n\nwhen I receive [stop all v]\nhide\nstop [other scripts in sprite v]\n\n@particles\n\nwhen flag clicked\nforever\n    hide\n    go to x: (pick random (-240) to (240)) y: (180)\n    wait (pick random (0) to (0.3)) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\ngo to [back v] layer\nshow\nrepeat until <(y position) < [-175]>\n    set [ghost v] effect to (70)\n    change y by (-2)\nend\ndelete this clone\n\nwhen I receive [stop all v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@text\n\nwhen flag clicked\nset [slide v] to [1]\nswitch costume to (slide)\nset [ghost v] effect to (100)\n\nwhen I receive [restart game v]\nshow\nswitch costume to (slide)\nchange [slide v] by (1)\nset [ghost v] effect to (0)\nwait (2) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nset [ghost v] effect to (100)\n\nwhen I receive [stop all v]\nhide\nstop [other scripts in sprite v]\n\n@SPINNING BLADES!!!\n\nwhen I receive [reset level v]\nhide\nrepeat (1)\n    delete this clone\nend\nif <(GAME LEVEL) = [6]> then\n    saw at X [0] Y [0] [100] [1] [1]\n    saw at X [81] Y [135] [40] [2] [1]\nend\nif <(GAME LEVEL) = [7]> then\n    saw at X [-74] Y [-15] [40] [1] [2]\n    saw at X [74] Y [-15] [40] [1] [2]\n    saw at X [-74] Y [72] [40] [1] [2]\n    saw at X [74] Y [72] [40] [1] [2]\nend\nif <(GAME LEVEL) = [9]> then\n    saw at X [89] Y [27] [40] [2] [2]\n    saw at X [241] Y [92] [40] [1] [2]\nend\nif <(GAME LEVEL) = [10]> then\n    saw at X [-233] Y [-92] [100] [2] [2]\nend\n\nwhen I start as a clone\nshow\nforever\n    if <(direction) = [1]> then\n        turn left (2) degrees\n    else\n        turn right (2) degrees\n    end\nend\n\ndefine saw at X (x) Y (y) (size) (direction) (costume)\npoint in direction (0)\nswitch costume to (costume)\nset [direction v] to (direction)\ngo to x: (x) y: (y)\nset size to (size) %\ncreate clone of (_myself_ v)\nhide\n\nwhen I receive [stop all v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@end\n\nwhen I receive [win v]\nset voice to (tenor v)::tts\nswitch costume to (costume1 v)\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nspeak (item (costume [number v]) of [speech v])::tts\nrepeat (4)\n    wait until <mouse down?>\n    repeat (5)\n        change [ghost v] effect by (20)\n    end\n    hide variable [☁ beat the game v]\n    next costume\n    repeat (5)\n        change [ghost v] effect by (-20)\n    end\n    if <(costume [number v]) = [4]> then\n        show variable [☁ beat the game v]\n        speak (join [This game has only been beaten] (join (☁ beat the game) [times.]))::tts\n    else\n        speak (item (costume [number v]) of [speech v])::tts\n    end\nend\n\nwhen flag clicked\nhide\nhide variable [☁ beat the game v]\n\n@Sprite1\n\nwhen flag clicked\nhide\nforever\n    reset timer\nend\n\nwhen [timer v] > (0)\ngo to [front v] layer\nshow\n\n