Adventure 2 || A Platformer
@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nwait (9) seconds\nswitch backdrop to (backdrop2 v)\n\n@level\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen flag clicked\nhide\nwait (10) seconds\nshow\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@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 #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]\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@bouncy stuff\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        start sound [Cartoon Sound Effect - Bounce v]\n        repeat (3)\n            next costume\n        end\n        repeat (3)\n            switch costume to ((costume [number v]) - (1))\n        end\n    end\nend\n\nwhen I receive [next level v]\n\nwhen flag clicked\nhide\nswitch costume to (costume3 v)\n\nwhen I receive [play v]\nshow\n\nnext costume\n\nwhen I receive [play v]\n\nwhen I receive [play v]\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        start sound [Cartoon Sound Effect - Bounce v]\n        repeat (3)\n            next costume\n        end\n        repeat (3)\n            switch costume to ((costume [number v]) - (1))\n        end\n    end\nend\n\nwhen flag clicked\nhide\nwait (10) seconds\nshow\nforever\n    if <([costume # v] of [level v]) = [1]> then\n        hide\n    else\n        if <([costume # v] of [level v]) = [2]> then\n            hide\n        else\n            if <([costume # v] of [level v]) = [3]> then\n                hide\n            else\n                if <([costume # v] of [level v]) = [4]> then\n                    show\n                    go to x: (-8) y: (-23)\n                else\n                    if <([costume # v] of [level v]) = [5]> then\n                        hide\n                    else\n                        if <([costume # v] of [level v]) = [6]> then\n                            show\n                            go to [back v] layer\n                            go to x: (-160) y: (-50)\n                        else\n                            if <([costume # v] of [level v]) = [7]> then\n                                hide\n                            else\n                                if <([costume # v] of [level v]) = [8]> then\n                                    hide\n                                else\n                                    if <([costume # v] of [level v]) = [9]> then\n                                        show\n                                        go to x: (42) y: (-14)\n                                    else\n                                        if <([costume # v] of [level v]) = [10]> then\n                                            hide\n                                        else\n                                            if <([costume # v] of [level v]) = [11]> then\n                                                show\n                                            else\n                                                if <([costume # v] of [level v]) = [12]> then\n                                                    hide\n                                                    delete this clone\n                                                else\n                                                    if <([costume # v] of [level v]) = [13]> then\n                                                        hide\n                                                    else\n                                                        if <([costume # v] of [level v]) = [14]> then\n                                                            hide\n                                                        else\n                                                            if <([costume # v] of [level v]) = [15]> then\n                                                                hide\n                                                            else\n                                                                if <([costume # v] of [level v]) = [16]> then\n                                                                    show\n                                                                    go to x: (-151) y: (-18)\n                                                                else\n                                                                    if <([costume # v] of [level v]) = [17]> then\n                                                                        hide\n                                                                    else\n                                                                        if <([costume # v] of [level v]) = [18]> then\n                                                                            hide\n                                                                        else\n                                                                            if <([costume # v] of [level v]) = [19]> then\n                                                                                hide\n                                                                            else\n                                                                                if <([costume # v] of [level v]) = [20]> then\n                                                                                    hide\n                                                                                end\n                                                                            end\n                                                                        end\n                                                                    end\n                                                                end\n                                                            end\n                                                        end\n                                                    end\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        start sound [Cartoon Sound Effect - Bounce v]\n        repeat (3)\n            next costume\n        end\n        repeat (3)\n            switch costume to ((costume [number v]) - (1))\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\nwhen flag clicked\nforever\n    if <([costume # v] of [level v]) = [11]> then\n        hide\n    end\nend\n\nwhen I start as a clone\nforever\n    if <([costume # v] of [level v]) = [11]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        start sound [Cartoon Sound Effect - Bounce v]\n        repeat (3)\n            next costume\n        end\n        repeat (3)\n            switch costume to ((costume [number v]) - (1))\n        end\n    end\nend\n\n@Sprite3\n\nwhen flag clicked\nset size to (100) %\nhide\nwait (10) seconds\ngo to [front v] layer\nshow\n\nwhen flag clicked\nhide\nwait (10) seconds\nset size to (30) %\ngo to x: (256) y: (142)\ngo [forward v] (1000000000000000) layers\nshow\n\nwhen this sprite clicked\nbroadcast (next level v)\n\nwhen flag clicked\nforever\n    if <([costume # v] of [level v]) = [20]> then\n        hide\n    end\nend\n\n@Sprite4\n\nwhen flag clicked\nset size to (100) %\nhide\nwait (10) seconds\ngo to [front v] layer\nshow\n\nwhen flag clicked\nhide\nwait (10) seconds\nshow\ngo to x: (266) y: (121)\nset size to (30) %\ngo [forward v] (10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) layers\n\nwhen this sprite clicked\nbroadcast (restart v)\n\nwhen flag clicked\nforever\n    go to x: (266) y: (121)\n    if <([costume # v] of [level v]) = [20]> then\n        hide\n    end\nend\n\n@Sprite1\n\nwhen [timer v] > (0.01)\nshow\nbroadcast (stop button v)\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nforever\n    go to x: (0) y: (0)\n    reset timer\n    hide\nend\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\n@clouds\n\nwhen flag clicked\ngo to [back v] layer\nwait (5.8) seconds\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\n    wait (pick random (0) to (1)) seconds\nend\n\nwhen I start as a clone\nhide\nwait (10) seconds\nshow\ngo to [back v] layer\nshow\nswitch costume to (pick random (1) to (2))\nset [x cloud v] to (pick random (-2) to (-2))\nset [ghost v] effect to (pick random (25) to (50))\nset size to (pick random (20) to (99)) %\nset y to (13)\nset x to (345)\nrepeat until <<(x position) = [-98]> or <<(x position) = [-99]> or <(x position) = [-100]>>>\n    change x by (x cloud)\nend\ndelete this clone\n\nwhen flag clicked\nhide\nwait (10) seconds\nshow\n\nwhen flag clicked\nforever\n    if <<([costume # v] of [level v]) = [13]> or <([costume # v] of [level v]) > [13]>> then\n        hide\n    end\nend\n\nwhen I start as a clone\nforever\n    if <<([costume # v] of [level v]) = [13]> or <([costume # v] of [level v]) > [13]>> then\n        hide\n    end\nend\n\nwhen I start as a clone\nforever\n    if <<([costume # v] of [level v]) = [19]> or <([costume # v] of [level v]) > [19]>> then\n        show\n    end\nend\n\n@spikes and lava\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume3 v)\nforever\n    go to [back v] layer\nend\n\nwhen I receive [start v]\nshow\n\nwhen flag clicked\nhide\nwait (10) seconds\nshow\n\n@Player\n\nwhen flag clicked\nforever\n    forever\n        if <key (u v) pressed?> then\n            play sound [Vexento - Happy Robot v] until done\n        end\n    end\nend\n\nwhen flag clicked\nwait (10) seconds\nplay sound [Vexento - Where We Belong v] until done\nplay sound [Vexento - Where We Belong v] until done\nforever\n    forever\n        if <key (p v) pressed?> then\n            \n                repeat until <key (u v) pressed?>\n                    play sound [Vexento - Where We Belong v] until done\n                    forever\n                        forever\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    forever\n        if <key (p v) pressed?> then\n            stop all sounds\n        end\n    end\nend\n\nwhen flag clicked\ngo to x: (-224) y: (-32)\nhide\nwait (10) seconds\nshow\ngo to x: (-224) y: (-32)\nbroadcast (end intro v)\n\nwhen I receive [end intro v]\nforever\n    go to [front v] layer\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nforever\n    forever\n        if <key (p v) pressed?> then\n            stop all sounds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    forever\n        if <key (u v) pressed?> then\n            play sound [Vexento - Where We Belong v] until done\n        end\n    end\nend\n\nwhen I receive [restart v]\ngo to x: (-207) y: (-32)\n\nwhen I receive [stop button v]\nhide\n\nwhen I start as a clone\nset size to (25) %\nset [ghost v] effect to (20)\nrepeat (10)\n    change [ghost v] effect by (5)\n    change size by (-2)\n    switch costume to (costume5 v)\n    change [brightness v] effect by (5)\nend\ndelete this clone\n\nwhen I receive [end intro v]\nset [level v] to [1]\npoint in direction (90)\nswitch costume to (costume1 v)\nset [y spawn v] to [33]\nset [x spawn v] to [-205]\ngo to x: (X Spawn) y: (Y Spawn)\nshow\nset size to (20) %\nset [movement x v] to [0]\nset [movement y v] to [0]\nforever\n    player movement\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\ngo to x: (-209) y: (33)\n\ndefine player movement\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        set rotation style [left-right v]\n        point in direction (-90)\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        point in direction (90)\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 and lava v)?> or <touching (wheels of death 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\n    if <<(x position) = [235]> or <(x position) > [235]>> then\n        broadcast (next level v)\n        go to x: (-206) y: (33)\n    end\n    if <touching (jump boost v)?> then\n        change [movement y v] by (15)\n    end\nend\n\nwhen flag clicked\n\nwhen flag clicked\nswitch costume to (player4 v)\n\nwhen flag clicked\nwait (10) seconds\nforever\n    play sound [Vexento - Happy Robot v] until done\n    play sound [Vexento - Happy Robot v] until done\n    play sound [Vexento - Happy Robot v] until done\n    play sound [Vexento - Happy Robot v] until done\n    play sound [Vexento - Happy Robot v] until done\nend\n\nwhen I receive [restart v]\ngo to x: (-205) y: (11)\n\nwhen I start as a clone\nswitch costume to (player2 v)\n\nwhen flag clicked\nforever\n    if <<<key (down arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>> then\n        switch costume to (player3 v)\n    else\n        switch costume to (player4 v)\n    end\nend\n\nwhen I start as a clone\nforever\n    if <<<key (down arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>> then\n        switch costume to (player3 v)\n    else\n        switch costume to (player2 v)\n    end\nend\n\nwhen flag clicked\nif <<<mouse down?> and <(mouse y) < (y position)>> or <<key (down arrow v) pressed?> or <key (s v) pressed?>>> then\n    switch costume to (player3 v)\nelse\n    switch costume to (player4 v)\nend\n\nwhen I start as a clone\nif <<<mouse down?> and <(mouse y) < (y position)>> or <<key (down arrow v) pressed?> or <key (s v) pressed?>>> then\n    switch costume to (player3 v)\nelse\n    switch costume to (player4 v)\nend\n\n
~~~~~~~~~~~~~~~Controls~~~~~~~~~~~~~~~~~~~~~\nuse arrow keys, wasd or mobile to move \n~~~~~~~~~~~~~~~~Obstacles~~~~~~~~~~~~~~~~~~\nwatch out for spikes and holes\n\nuse trampolines for a jump boost \n~~~~~~~~~~~~~~Extra notes~~~~~~~~~~~~~~~~~~~~\n100% possible \n\np to pause music press for like 3 secs cuz there is a bug\n \nu to unpause\n\n20 levels\n\nPress the buttons to either skip or restart