Grassly - A Classic Platformer

Instructions: WASD Space and arrow keys to move.\nTouch controlls for mobile.\n\nGet to the spinny thing to win the level.\n\nThere are 8 levels currently.

@Stage\n\nwhen flag clicked\nset [music v] to []\nset [level v] to [1]\nset [time v] to [0]\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [play v]\nwait until <<(Mobile mode y/n) = [y]> or <(Mobile mode y/n) = [n]>>\nbroadcast (Play 2 v)\n\nwhen flag clicked\nforever\n    set [your time v] to (join [You finished the game in ] (join (Time) [ seconds]))\n    if <(Level) = [11]> then\n        show variable [your time v]\n        stop [other scripts in sprite v]\n        if <(Time) < (☁ Cloud)> then\n            set [☁ cloud v] to (Time)\n        end\n    end\nend\n\nwhen I receive [play 2 v]\nforever\n    if <(Paused? y/n) = [n]> then\n        if <(Trans.) = [0]> then\n            wait (1) seconds\n            change [time v] by (1)\n        else\n            wait until <(Trans.) = [0]>\n        end\n    else\n        wait until <(Paused? y/n) = [n]>\n    end\nend\n\n@Music selection\n\nwhen flag clicked\nwait (0.001) seconds\ngo to x: (-109) y: (-50)\nhide\n\nwhen I receive [animation finished v]\nshow\nforever\n    point in direction ((90) + (([cos v] of (((timer) - (0)) * (100)) ) * (10)))\n    set [brightness v] effect to (0)\n    if <touching (mouse-pointer v)?> then\n        change [brightness v] effect by (-10)\n    end\nend\n\nwhen this sprite clicked\nbroadcast (Music v)\n\nwhen I receive [music v]\nhide\n\nwhen I receive [back v]\nshow\n\nwhen I receive [instructions v]\nhide\n\nwhen I receive [cloud v]\nhide\n\nwhen I receive [costumes v]\nhide\n\nwhen I receive [play v]\nhide\n\nwhen I receive [play 2 v]\nset volume to (100) %\nset [volume v] to [100]\nif <(MUSIC) = []> then\n    forever\n        play sound (pick random (1) to (12)) until done\n    end\nelse\n    if <(MUSIC) = [1]> then\n        forever\n            play sound [thefatrat-xenogenesis-youtubemp3free v] until done\n        end\n    else\n        if <(MUSIC) = [2]> then\n            forever\n                play sound [Revenge v] until done\n            end\n        else\n            if <(MUSIC) = [3]> then\n                forever\n                    play sound [Vexento - We Are One v] until done\n                end\n            else\n                if <(MUSIC) = [4]> then\n                    forever\n                        play sound [TheFatRat - Time Lapse v] until done\n                    end\n                else\n                    if <(MUSIC) = [5]> then\n                        forever\n                            play sound [Hello v] until done\n                        end\n                    else\n                        if <(MUSIC) = [6]> then\n                            forever\n                                play sound [Avicii - Levels 2 v] until done\n                            end\n                        else\n                            if <(MUSIC) = [7]> then\n                                forever\n                                    play sound [??? v] until done\n                                end\n                            else\n                                if <(MUSIC) = [8]> then\n                                    forever\n                                        play sound [Never gonna give you up v] until done\n                                    end\n                                else\n                                    if <(MUSIC) = [9]> then\n                                        forever\n                                            play sound [Vexento - Pegasus v] until done\n                                        end\n                                    else\n                                        if <(MUSIC) = [10]> then\n                                            forever\n                                                play sound [Lights \[Dream Trance\] v] until done\n                                            end\n                                        else\n                                            if <(MUSIC) = [11]> then\n                                                forever\n                                                    play sound [Vexento - Empty v] until done\n                                                end\n                                            else\n                                                forever\n                                                    play sound [Modulation - On The Move v] until done\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 [u v] key pressed\nset volume to (100) %\nset [volume v] to [100]\n\nwhen [m v] key pressed\nset volume to (0) %\nset [volume v] to [0]\n\nwhen I receive [paused v]\nset volume to (0) %\n\nwhen I receive [unpased v]\nset volume to (Volume) %\n\n@Play\n\nwhen flag clicked\nwait (0.001) seconds\ngo to x: (0) y: (-50)\nhide\n\nwhen I receive [animation finished v]\nshow\nforever\n    point in direction ((90) + (([cos v] of (((timer) - (0)) * (100)) ) * (10)))\n    set [brightness v] effect to (0)\n    if <touching (mouse-pointer v)?> then\n        change [brightness v] effect by (-10)\n    end\nend\n\nwhen I receive [music v]\nhide\n\nwhen I receive [back v]\nshow\n\nwhen I receive [cloud v]\nhide\n\nwhen I receive [costumes v]\nhide\n\nwhen I receive [instructions v]\nhide\n\nwhen I receive [play v]\nhide\n\nwhen this sprite clicked\nbroadcast (Play v)\n\n@Back button\n\nwhen I receive [animation finished v]\nforever\n    set [brightness v] effect to (0)\n    if <touching (mouse-pointer v)?> then\n        change [brightness v] effect by (-10)\n    end\nend\n\nwhen flag clicked\nwait (0.001) seconds\ngo to x: (200) y: (140)\nhide\n\nwhen I receive [cloud v]\nshow\n\nwhen I receive [back v]\nhide\n\nwhen this sprite clicked\nbroadcast (Back v)\n\nwhen I receive [music v]\nshow\n\nwhen I receive [costumes v]\nshow\n\nwhen I receive [instructions v]\nshow\n\n@Cloud\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset size to (250) %\nforever\n    point in direction ((90) + (([cos v] of (((timer) - (0)) * (100)) ) * (10)))\n    set [brightness v] effect to (0)\n    if <touching (mouse-pointer v)?> then\n        change [brightness v] effect by (-10)\n    end\nend\n\nwhen flag clicked\nwait (0.001) seconds\ngo to x: (50) y: (-144)\nhide\n\nwhen I receive [animation finished v]\nshow\n\nwhen this sprite clicked\nbroadcast (Cloud v)\n\nwhen I receive [instructions v]\nhide\n\nwhen I receive [cloud v]\nset [random variable1 v] to [1]\nhide\ncreate clone of (_myself_ v)\n\nwhen I receive [costumes v]\nhide\n\nwhen I receive [play v]\nhide\n\nwhen I receive [music v]\nhide\n\nwhen I start as a clone\nshow\nswitch costume to (costume2 v)\ngo to x: (0) y: (0)\nforever\n    set size to (190) %\n    point in direction (90)\nend\n\nwhen I receive [back v]\ndelete this clone\n\nwhen I receive [back v]\nset size to (250) %\nset [random variable1 v] to [0]\nswitch costume to (costume1 v)\nshow\n\n@Costume selection\n\nwhen I receive [animation finished v]\nshow\n\nwhen flag clicked\nforever\n    point in direction ((90) + (([cos v] of (((timer) - (0)) * (100)) ) * (10)))\n    set [brightness v] effect to (0)\n    if <touching (mouse-pointer v)?> then\n        change [brightness v] effect by (-10)\n    end\nend\n\nwhen flag clicked\nwait (0.001) seconds\ngo to x: (109) y: (-56)\nhide\n\nwhen I receive [music v]\nhide\n\nwhen I receive [play v]\nhide\n\nwhen this sprite clicked\nbroadcast (Costumes v)\n\nwhen I receive [costumes v]\nhide\n\nwhen I receive [back v]\nshow\n\nwhen I receive [instructions v]\nhide\n\nwhen I receive [cloud v]\nhide\n\n@detector\n\nwhen flag clicked\nhide\nset [clone id v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone id v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(LOVED__) = [1]> and <(FAVED___) = [1]>>\nwait (1) seconds\nshow\ngo to x: (0) y: (-100)\nset [timer v] to [0]\nswitch costume to (pick random (1) to (4))\nset [ghost v] effect to (100)\nrepeat until <(Timer) > [3.5]>\n    change y by ((y position) / (-15))\n    change [ghost v] effect by (-3)\nend\nset [timer v] to [0]\nrepeat until <(Timer) > [3.5]>\n    change y by (((y position) - (-100)) / (-15))\n    change [ghost v] effect by (10)\nend\n\nwhen I start as a clone\nif <(clone id) = [0]> then\n    go to x: (-15) y: (0)\n    set [loved__ v] to [0]\n    switch costume to (love v)\n    forever\n        set [love? v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [loved__ v] to [1]\n        end\n    end\nend\nif <(clone id) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (fave v)\n    set [faved___ v] to [0]\n    forever\n        set [fav v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [faved___ v] to [1]\n        end\n    end\nend\n\nwhen flag clicked\nset [timer v] to [0]\nforever\n    change [timer v] by (.097)\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@Instructions\n\nwhen flag clicked\nset [random variable2 v] to [0]\nset size to (250) %\nswitch costume to (costume1 v)\nforever\n    point in direction ((90) + (([cos v] of (((timer) - (0)) * (100)) ) * (10)))\n    set [brightness v] effect to (0)\n    if <touching (mouse-pointer v)?> then\n        change [brightness v] effect by (-10)\n    end\nend\n\nwhen flag clicked\nwait (0.001) seconds\ngo to x: (-58) y: (-144)\nhide\n\nwhen I receive [animation finished v]\nshow\n\nwhen I receive [music v]\nhide\n\nwhen I receive [play v]\nhide\n\nwhen I receive [costumes v]\nhide\n\nwhen this sprite clicked\nbroadcast (Instructions v)\n\nwhen I receive [instructions v]\nset [random variable2 v] to [1]\nhide\ncreate clone of (_myself_ v)\n\nwhen I receive [back v]\nset size to (250) %\nset [random variable2 v] to [0]\nswitch costume to (costume1 v)\nshow\n\nwhen I start as a clone\nshow\nswitch costume to (costume3 v)\n\nwhen I receive [back v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    point in direction (90)\nend\n\nwhen I start as a clone\nforever\n    set size to (100) %\n    point in direction (90)\n    go to x: (-50) y: (0)\nend\n\nwhen I receive [cloud v]\nhide\n\n@TheFatRat - Xenogenesis\n\nwhen flag clicked\nwait (0.001) seconds\ngo to x: (-190) y: (80)\nhide\n\nwhen I receive [music v]\nshow\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    if <touching (mouse-pointer v)?> then\n        change [brightness v] effect by (-10)\n    end\nend\n\nwhen I receive [back v]\nhide\n\nwhen this sprite clicked\nstart sound [menu001 v]\nbroadcast (Back v)\nset [music v] to [1]\n\n@Revenge\n\nwhen flag clicked\nwait (0.001) seconds\ngo to x: (-60) y: (80)\nhide\n\nwhen I receive [music v]\nshow\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    if <touching (mouse-pointer v)?> then\n        change [brightness v] effect by (-10)\n    end\nend\n\nwhen I receive [back v]\nhide\n\nwhen this sprite clicked\nstart sound [menu001 v]\nbroadcast (Back v)\nset [music v] to [2]\n\n@Vexento - We Are One\n\nwhen flag clicked\nwait (0.001) seconds\ngo to x: (70) y: (80)\nhide\n\nwhen I receive [music v]\nshow\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    if <touching (mouse-pointer v)?> then\n        change [brightness v] effect by (-10)\n    end\nend\n\nwhen I receive [back v]\nhide\n\nwhen this sprite clicked\nstart sound [menu001 v]\nbroadcast (Back v)\nset [music v] to [3]\n\n@TheFatRat - Time Lapse\n\nwhen flag clicked\nwait (0.001) seconds\ngo to x: (200) y: (80)\nhide\n\nwhen I receive [music v]\nshow\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    if <touching (mouse-pointer v)?> then\n        change [brightness v] effect by (-10)\n    end\nend\n\nwhen I receive [back v]\nhide\n\nwhen this sprite clicked\nstart sound [menu001 v]\nbroadcast (Back v)\nset [music v] to [4]\n\n@Hello\n\nwhen flag clicked\nwait (0.001) seconds\ngo to x: (-190) y: (0)\nhide\n\nwhen I receive [music v]\nshow\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    if <touching (mouse-pointer v)?> then\n        change [brightness v] effect by (-10)\n    end\nend\n\nwhen I receive [back v]\nhide\n\nwhen this sprite clicked\nstart sound [menu001 v]\nbroadcast (Back v)\nset [music v] to [5]\n\n@Avicci - Levels\n\nwhen flag clicked\nwait (0.001) seconds\ngo to x: (-60) y: (0)\nhide\n\nwhen I receive [music v]\nshow\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    if <touching (mouse-pointer v)?> then\n        change [brightness v] effect by (-10)\n    end\nend\n\nwhen I receive [back v]\nhide\n\nwhen this sprite clicked\nstart sound [menu001 v]\nbroadcast (Back v)\nset [music v] to [6]\n\n@???\n\nwhen flag clicked\nwait (0.001) seconds\ngo to x: (70) y: (0)\nhide\n\nwhen I receive [music v]\nshow\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    if <touching (mouse-pointer v)?> then\n        change [brightness v] effect by (-10)\n    end\nend\n\nwhen I receive [back v]\nhide\n\nwhen this sprite clicked\nstart sound [menu001 v]\nbroadcast (Back v)\nset [music v] to [7]\n\n@Never gonna give you up\n\nwhen flag clicked\nwait (0.001) seconds\ngo to x: (200) y: (0)\nhide\n\nwhen I receive [music v]\nshow\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    if <touching (mouse-pointer v)?> then\n        change [brightness v] effect by (-10)\n    end\nend\n\nwhen I receive [back v]\nhide\n\nwhen this sprite clicked\nstart sound [menu001 v]\nbroadcast (Back v)\nset [music v] to [8]\n\n@Vexento - Pegasus\n\nwhen flag clicked\nwait (0.001) seconds\ngo to x: (-190) y: (-80)\nhide\n\nwhen I receive [music v]\nshow\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    if <touching (mouse-pointer v)?> then\n        change [brightness v] effect by (-10)\n    end\nend\n\nwhen I receive [back v]\nhide\n\nwhen this sprite clicked\nstart sound [menu001 v]\nbroadcast (Back v)\nset [music v] to [9]\n\n@Gui\n\nwhen flag clicked\nforever\n    go to (mouse-pointer v)\n    Sense\nend\n\ndefine Sense\nswitch costume to (sense v)\nshow\nset [ghost v] effect to (30)\ngo to [front v] layer\nif <touching (skip v)?> then\n    switch costume to (skip v)\nelse\n    if <touching (retry v)?> then\n        switch costume to (retry v)\n    else\n        if <<touching (instructions v)?> and <(Random variable2) = [0]>> then\n            switch costume to (instructions v)\n        else\n            if <<touching (cloud v)?> and <(Random variable1) = [0]>> then\n                switch costume to (cloud v)\n            else\n                if <touching (play v)?> then\n                    switch costume to (play v)\n                else\n                    if <touching (costume selection v)?> then\n                        switch costume to (costumes selection v)\n                    else\n                        if <touching (music selection v)?> then\n                            switch costume to (music selection v)\n                        else\n                            if <touching (thefatrat - xenogenesis v)?> then\n                                switch costume to (xenogenesis - thefatrat v)\n                            else\n                                if <touching (revenge v)?> then\n                                    switch costume to (revenge v)\n                                else\n                                    if <touching (vexento - we are one v)?> then\n                                        switch costume to (vexento - we are one v)\n                                    else\n                                        if <touching (back button v)?> then\n                                            switch costume to (back v)\n                                        else\n                                            if <touching (thefatrat - time lapse v)?> then\n                                                switch costume to (thefatrat - time lapse v)\n                                            else\n                                                if <touching (hello v)?> then\n                                                    switch costume to (hello v)\n                                                else\n                                                    if <touching (avicci - levels v)?> then\n                                                        switch costume to (avicii - levels v)\n                                                    else\n                                                        if <touching (??? v)?> then\n                                                            switch costume to (??? v)\n                                                        else\n                                                            if <touching (never gonna give you up v)?> then\n                                                                switch costume to (never gonna give you up v)\n                                                            else\n                                                                if <touching (vexento - pegasus v)?> then\n                                                                    switch costume to (vexento - pegasus v)\n                                                                else\n                                                                    if <touching (lights \[tream trance\] v)?> then\n                                                                        switch costume to (lights \[tream trance\] v)\n                                                                    else\n                                                                        if <touching (vexento - empty v)?> then\n                                                                            switch costume to (vexento - empty v)\n                                                                        else\n                                                                            if <touching (random v)?> then\n                                                                                switch costume to (random v)\n                                                                            else\n                                                                                if <<<touching (pause/play button v)?> and <([costume # v] of [pause/play button v]) = [1]>> and <(Random variable ¯\_\(ツ\)_/¯) = [0]>> then\n                                                                                    switch costume to (pause v)\n                                                                                else\n                                                                                    if <(LOL variable) = [1]> then\n                                                                                        switch costume to (resume v)\n                                                                                        go to [front v] layer\n                                                                                    else\n                                                                                        if <touching (modulation - on the move v)?> then\n                                                                                            switch costume to (modulation - on the move v)\n                                                                                        else\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\n        end\n    end\nend\n\nwhen I receive [paused v]\nrepeat until <(Paused? y/n) = [n]>\n    go [forward v] (1) layers\n    go to [front v] layer\nend\n\n@Lights [Tream Trance]\n\nwhen flag clicked\nwait (0.001) seconds\ngo to x: (-60) y: (-80)\nhide\n\nwhen I receive [music v]\nshow\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    if <touching (mouse-pointer v)?> then\n        change [brightness v] effect by (-10)\n    end\nend\n\nwhen I receive [back v]\nhide\n\nwhen this sprite clicked\nstart sound [menu001 v]\nbroadcast (Back v)\nset [music v] to [10]\n\n@Vexento - Empty\n\nwhen flag clicked\nwait (0.001) seconds\ngo to x: (70) y: (-80)\nhide\n\nwhen I receive [music v]\nshow\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    if <touching (mouse-pointer v)?> then\n        change [brightness v] effect by (-10)\n    end\nend\n\nwhen I receive [back v]\nhide\n\nwhen this sprite clicked\nstart sound [menu001 v]\nbroadcast (Back v)\nset [music v] to [11]\n\n@Random\n\nwhen flag clicked\nwait (0.001) seconds\ngo to x: (200) y: (-80)\nhide\n\nwhen I receive [music v]\nshow\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    if <touching (mouse-pointer v)?> then\n        change [brightness v] effect by (-10)\n    end\nend\n\nwhen I receive [back v]\nhide\n\nwhen this sprite clicked\nstart sound [menu001 v]\nbroadcast (Back v)\nset [music v] to []\n\n@Text engine\n\nwhen flag clicked\nwait (.001) seconds\nhide\n\nwhen I receive [cloud v]\nwait (.3) seconds\nset [digits v] to [1]\nrepeat (30)\n    create clone of (_myself_ v)\n    change [digits v] by (1)\nend\nhide\n\nwhen I start as a clone\nshow\nforever\n    go to [front v] layer\n    set size to (250) %\n    go to x: (((digits) * (30)) - (55)) y: (-12)\n    if <(length of (☁ Cloud)) < (digits)> then\n        hide\n    else\n        show\n        switch costume to (letter (digits) of (☁ Cloud))\n    end\nend\n\nwhen I receive [back v]\nhide\ndelete this clone\n\n@Title\n\nwhen flag clicked\nwait (0.001) seconds\nset [fisheye v] effect to (100)\nset size to (100) %\nhide\n\nwhen I receive [animation finished v]\nshow\nwait (.1) seconds\nrepeat (20)\n    change [fisheye v] effect by (-5)\nend\nforever\n    set size to ((95) + (([cos v] of (((timer) - (0)) * (100)) ) * (10))) %\nend\n\nwhen I receive [back v]\nshow\n\nwhen I receive [music v]\nhide\n\nwhen I receive [play v]\nhide\n\nwhen I receive [costumes v]\nhide\n\nwhen I receive [cloud v]\nhide\n\nwhen I receive [instructions v]\nhide\n\n@Costumes selection\n\nwhen flag clicked\nwait (0.001) seconds\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [back v]\nhide\n\nwhen I receive [costumes v]\nshow\n\nwhen I receive [change costume -1 v]\nswitch costume to ((costume [number v]) - (1))\n\nwhen I receive [change costume +1 v]\nnext costume\n\n@Arrow\n\nwhen flag clicked\nwait (0.001) seconds\ngo to x: (-62) y: (0)\nhide\n\nwhen I receive [costumes v]\nshow\n\nwhen I receive [back v]\nhide\n\nwhen this sprite clicked\nif <(My variable) = [0]> then\n    broadcast (Change costume -1 v)\nend\n\nwhen flag clicked\nforever\n    if <([costume # v] of [costumes selection v]) = [1]> then\n        set [my variable v] to [1]\n        set [ghost v] effect to (80)\n    else\n        set [my variable v] to [0]\n        clear graphic effects\n    end\nend\n\nwhen I receive [play v]\nstop [other scripts in sprite v]\nhide\n\n@Arrow2\n\nwhen flag clicked\nwait (0.001) seconds\ngo to x: (62) y: (0)\nhide\n\nwhen I receive [costumes v]\nshow\n\nwhen I receive [back v]\nhide\n\nwhen this sprite clicked\nif <(My variable 2) = [0]> then\n    broadcast (Change costume +1 v)\nend\n\nwhen flag clicked\nforever\n    if <([costume # v] of [costumes selection v]) = [6]> then\n        set [my variable 2 v] to [1]\n        set [ghost v] effect to (80)\n    else\n        set [my variable 2 v] to [0]\n        clear graphic effects\n    end\nend\n\nwhen I receive [play v]\nstop [other scripts in sprite v]\nhide\n\n@Mobile mode y/n\n\nwhen flag clicked\nwait (0.001) seconds\ngo to x: (0) y: (0)\nset [cloneid v] to [0]\nset [mobile mode y/n v] to []\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [play v]\nwait (.1) seconds\nshow\nrepeat (2)\n    change [cloneid v] by (1)\n    create clone of (_myself_ v)\nend\nset [mobile mode y/n v] to []\n\nwhen I start as a clone\nshow\nif <(CloneID) = [1]> then\n    switch costume to (costume2 v)\n    go to x: (50) y: (-65)\nelse\n    switch costume to (costume3 v)\n    go to x: (-50) y: (-65)\nend\n\nwhen I receive [play 2 v]\nhide\n\nwhen I receive [play 2 v]\ndelete this clone\n\nwhen I start as a clone\nif <(CloneID) = [1]> then\n    wait until <<mouse down?> and <touching (mouse-pointer v)?>>\n    set [mobile mode y/n v] to [y]\nelse\n    wait until <<mouse down?> and <touching (mouse-pointer v)?>>\n    set [mobile mode y/n v] to [n]\nend\n\n@Player\n\nwhen I start as a clone\nrepeat (11)\n    if <(Paused? y/n) = [n]> then\n        change [ghost v] effect by (5)\n        change size by (-5)\n    else\n        wait until <(Paused? y/n) = [n]>\n    end\nend\ndelete this clone\n\nwhen flag clicked\nwait (0.001) seconds\nclear graphic effects\nset [dead? v] to [0]\nhide\n\nwhen I receive [play 2 v]\nshow\nswitch costume to ([costume # v] of [costumes selection v])\nReset\nforever\n    if <(Paused? y/n) = [n]> then\n        if <(Trans.) = [0]> then\n            if <(Dead?) = [0]> then\n                if <(Mobile mode y/n) = [n]> then\n                    set rotation style [left-right v]\n                    create clone of (_myself_ v)\n                    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n                        point in direction (-90)\n                        change [x v] by (-1)\n                    end\n                    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n                        point in direction (90)\n                        change [x v] by (1)\n                    end\n                    set [x v] to ((x) * (.9))\n                    change x by (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 x by ((x) * (-1))\n                                            change y by (5)\n                                            if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n                                                if <(x) > [0]> then\n                                                    set [x v] to [-5]\n                                                else\n                                                    set [x v] to [5]\n                                                end\n                                                set [y v] to [10]\n                                            else\n                                                set [x v] to [0]\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                    change [y v] by (-1)\n                    change y by ((y) * (-1))\n                    if <touching (level v)?> then\n                        change y by (y)\n                        set [y v] to [0]\n                    end\n                    change y by (1)\n                    if <touching (level v)?> then\n                        if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n                            change [y v] by (15)\n                        end\n                    end\n                    change y by (-1)\n                else\n                    set rotation style [left-right v]\n                    create clone of (_myself_ v)\n                    if <<mouse down?> and <(mouse x) > (x position)>> then\n                        point in direction (-90)\n                        change [x v] by (-1)\n                    end\n                    if <<mouse down?> and <(mouse x) < (x position)>> then\n                        point in direction (90)\n                        change [x v] by (1)\n                    end\n                    set [x v] to ((x) * (.9))\n                    change x by (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 x by ((x) * (-1))\n                                            change y by (5)\n                                            if <<mouse down?> and <(mouse y) < (y position)>> then\n                                                if <(x) > [0]> then\n                                                    set [x v] to [-5]\n                                                else\n                                                    set [x v] to [5]\n                                                end\n                                                set [y v] to [10]\n                                            else\n                                                set [x v] to [0]\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                    change [y v] by (-1)\n                    change y by ((y) * (-1))\n                    if <touching (level v)?> then\n                        change y by (y)\n                        set [y v] to [0]\n                    end\n                    change y by (1)\n                    if <touching (level v)?> then\n                        if <<mouse down?> and <(mouse y) < (y position)>> then\n                            change [y v] by (15)\n                        end\n                    end\n                    change y by (-1)\n                end\n            end\n        end\n    else\n        wait until <(Paused? y/n) = [n]>\n    end\nend\n\ndefine Reset\nset [y v] to [0]\nset [x v] to [0]\ngo to x: (214) y: (90)\npoint in direction (-90)\nif <(costume [number v]) = [7]> then\n    switch costume to (costume1 v)\nelse\n    if <(costume [number v]) = [8]> then\n        switch costume to (costume2 v)\n    else\n        if <(costume [number v]) = [9]> then\n            switch costume to (costume3 v)\n        else\n            if <(costume [number v]) = [10]> then\n                switch costume to (costume4 v)\n            else\n                if <(costume [number v]) = [11]> then\n                    switch costume to (costume5 v)\n                else\n                    if <(costume [number v]) = [12]> then\n                        switch costume to (costume6 v)\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [play 2 v]\nforever\n    if <(Paused? y/n) = [n]> then\n        if <(Trans.) = [0]> then\n            if <(Dead?) = [0]> then\n                if <(Mobile mode y/n) = [n]> then\n                    if <(costume [number v]) = [1]> then\n                        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                            switch costume to (crunch1 v)\n                        end\n                    end\n                    if <(costume [number v]) = [2]> then\n                        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                            switch costume to (crunch2 v)\n                        end\n                    end\n                    if <(costume [number v]) = [3]> then\n                        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                            switch costume to (crunch3 v)\n                        end\n                    end\n                    if <(costume [number v]) = [4]> then\n                        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                            switch costume to (crunch4 v)\n                        end\n                    end\n                    if <(costume [number v]) = [5]> then\n                        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                            switch costume to (crunch5 v)\n                        end\n                    end\n                    if <(costume [number v]) = [6]> then\n                        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                            switch costume to (crunch6 v)\n                        end\n                    end\n                    if <(costume [number v]) = [7]> then\n                        if <not <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n                            switch costume to (costume1 v)\n                        end\n                    end\n                    if <(costume [number v]) = [8]> then\n                        if <not <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n                            switch costume to (costume2 v)\n                        end\n                    end\n                    if <(costume [number v]) = [9]> then\n                        if <not <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n                            switch costume to (costume3 v)\n                        end\n                    end\n                    if <(costume [number v]) = [10]> then\n                        if <not <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n                            switch costume to (costume4 v)\n                        end\n                    end\n                    if <(costume [number v]) = [11]> then\n                        if <not <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n                            switch costume to (costume5 v)\n                        end\n                    end\n                    if <(costume [number v]) = [12]> then\n                        if <not <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n                            switch costume to (costume6 v)\n                        end\n                    end\n                else\n                    if <(costume [number v]) = [1]> then\n                        if <<mouse down?> and <(mouse y) > (y position)>> then\n                            switch costume to (crunch1 v)\n                        end\n                    end\n                    if <(costume [number v]) = [2]> then\n                        if <<mouse down?> and <(mouse y) > (y position)>> then\n                            switch costume to (crunch2 v)\n                        end\n                    end\n                    if <(costume [number v]) = [3]> then\n                        if <<mouse down?> and <(mouse y) > (y position)>> then\n                            switch costume to (crunch3 v)\n                        end\n                    end\n                    if <(costume [number v]) = [4]> then\n                        if <<mouse down?> and <(mouse y) > (y position)>> then\n                            switch costume to (crunch4 v)\n                        end\n                    end\n                    if <(costume [number v]) = [5]> then\n                        if <<mouse down?> and <(mouse y) > (y position)>> then\n                            switch costume to (crunch5 v)\n                        end\n                    end\n                    if <(costume [number v]) = [6]> then\n                        if <<mouse down?> and <(mouse y) > (y position)>> then\n                            switch costume to (crunch6 v)\n                        end\n                    end\n                    if <(costume [number v]) = [7]> then\n                        if <not <<mouse down?> and <(mouse y) > (y position)>>> then\n                            switch costume to (costume1 v)\n                        end\n                    end\n                    if <(costume [number v]) = [8]> then\n                        if <not <<mouse down?> and <(mouse y) > (y position)>>> then\n                            switch costume to (costume2 v)\n                        end\n                    end\n                    if <(costume [number v]) = [9]> then\n                        if <not <<mouse down?> and <(mouse y) > (y position)>>> then\n                            switch costume to (costume3 v)\n                        end\n                    end\n                    if <(costume [number v]) = [10]> then\n                        if <not <<mouse down?> and <(mouse y) > (y position)>>> then\n                            switch costume to (costume4 v)\n                        end\n                    end\n                    if <(costume [number v]) = [11]> then\n                        if <not <<mouse down?> and <(mouse y) > (y position)>>> then\n                            switch costume to (costume5 v)\n                        end\n                    end\n                    if <(costume [number v]) = [12]> then\n                        if <not <<mouse down?> and <(mouse y) > (y position)>>> then\n                            switch costume to (costume6 v)\n                        end\n                    end\n                end\n            end\n        end\n    else\n        wait until <(Paused? y/n) = [n]>\n    end\nend\n\nwhen I receive [play 2 v]\nforever\n    if <<touching (spikes v)?> or <touching (trampoline v)?>> then\n        if <(Paused? y/n) = [n]> then\n            Death animation1\n            Reset\n            Death animation2\n        else\n            wait until <(Paused? y/n) = [n]>\n        end\n    end\n    if <(x position) < [-220]> then\n        if <not <(Level) = [11]>> then\n            broadcast (Next? v) and wait\n        end\n    end\n    if <(y position) > [160]> then\n        set [y v] to [25]\n    end\n    if <touching (portal2 v)?> then\n        go to (portal1 v)\n        start sound [Teleport2 v]\n    end\nend\n\ndefine Death animation1\nset [dead? v] to [1]\nrepeat (20)\n    if <(Paused? y/n) = [n]> then\n        change [pixelate v] effect by (5)\n        change [ghost v] effect by (5)\n    else\n        wait until <(Paused? y/n) = [n]>\n    end\nend\nif <(costume [number v]) = [7]> then\n    switch costume to (costume1 v)\nelse\n    if <(costume [number v]) = [8]> then\n        switch costume to (costume2 v)\n    else\n        if <(costume [number v]) = [9]> then\n            switch costume to (costume3 v)\n        else\n            if <(costume [number v]) = [10]> then\n                switch costume to (costume4 v)\n            else\n                if <(costume [number v]) = [11]> then\n                    switch costume to (costume5 v)\n                else\n                    if <(costume [number v]) = [12]> then\n                        switch costume to (costume6 v)\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Death animation2\nrepeat (20)\n    if <(Paused? y/n) = [n]> then\n        change [ghost v] effect by (-5)\n        change [pixelate v] effect by (-5)\n    else\n        wait until <(Paused? y/n) = [n]>\n    end\nend\nset [dead? v] to [0]\n\nwhen I receive [paused v]\nset [brightness v] effect to (-50)\n\nwhen I receive [unpased v]\nset [brightness v] effect to (0)\n\nwhen I receive [next v]\nchange [level v] by (1)\nReset\n\n@Level\n\nwhen flag clicked\nwait (0.001) seconds\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [play 2 v]\nforever\n    show\n    switch costume to (Level)\n    go to x: (0) y: (0)\nend\n\nwhen I receive [unpased v]\nrepeat until <(Paused? y/n) = [y]>\n    go to [front v] layer\n    set [brightness v] effect to (0)\n    if <(Trans.) = [1]> then\n        stop [this script v]\n    end\nend\n\nwhen I receive [paused v]\nrepeat until <(Paused? y/n) = [n]>\n    set [brightness v] effect to (-30)\nend\n\nwhen flag clicked\nforever\n    if <(Trans.) = [0]> then\n        go to [front v] layer\n    else\n        go to [back v] layer\n    end\nend\n\n@trampoline\n\nwhen flag clicked\nwait (0.001) seconds\nswitch costume to (costume1 v)\nhide\nforever\n    go to [back v] layer\n    hide\n    if <(Level) = [6]> then\n        go to x: (-22) y: (168)\n        Trampoline\n    end\nend\n\ndefine Trampoline\nshow\nif <touching (player v)?> then\n    switch costume to (costume1 v)\n    repeat (3)\n        if <(Paused? y/n) = [n]> then\n            next costume\n            wait (0.001) seconds\n        else\n            wait until <(Paused? y/n) = [n]>\n        end\n    end\n    repeat (3)\n        if <(Paused? y/n) = [n]> then\n            switch costume to ((costume [number v]) - (1))\n            wait (0.001) seconds\n        else\n            wait until <(Paused? y/n) = [n]>\n        end\n    end\n    wait until <([dead? v] of [player v]) = [0]>\nend\n\nwhen I start as a clone\nrepeat until <not <(Level) = (LeVeL)>>\n    Trampoline\nend\ndelete this clone\n\n@intro\n\nwhen flag clicked\nstart sound [Vicetone - United We Dance3 v]\nswitch costume to (j v)\nhide\nset size to (75) %\nset size to (2) %\npoint in direction (90)\ngo to x: (0) y: (0)\nwait (2.3) seconds\nshow\nrepeat until <(size) > [84]>\n    change size by (10)\nend\nset size to (90) %\nwait (1) seconds\nglide (1) secs to x: (-110) y: (0)\nchange [cloneid v] by (1)\ncreate clone of (_myself_ v)\nwait (5) seconds\nrepeat (22)\n    turn right (12) degrees\n    change x by (10)\nend\nbroadcast (Intro1 v)\nrepeat (10)\n    change [ghost v] effect by (10)\n    change volume by (-10)\nend\nswitch backdrop to (backdrop2 v)\nstop [other scripts in sprite v]\nbroadcast (Animation finished v)\n\nwhen I start as a clone\nif <(CloneID) = [1]> then\n    set size to (100) %\n    set [ghost v] effect to (100)\n    switch costume to (j2 v)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    repeat (6)\n        change y by (5)\n    end\n    wait (.7) seconds\n    change [cloneid v] by (1)\n    create clone of (_myself_ v)\nelse\n    switch costume to (j3 v)\n    go to x: (-110) y: (-55)\n    go to [back v] layer\n    glide (.7) secs to x: (115) y: (-55)\nend\n\nwhen flag clicked\nset [cloneid v] to [0]\nset volume to (100) %\ngo to [front v] layer\nclear graphic effects\nwait (1) seconds\nforever\n    repeat (5)\n        change size by (-2.5)\n    end\n    repeat (5)\n        change size by (2.5)\n    end\nend\n\nwhen I receive [intro1 v]\ndelete this clone\n\nwhen I receive [intro1 v]\nforever\n    turn right (12) degrees\n    change x by (10)\nend\n\n@Spikes\n\nwhen flag clicked\nwait (0.001) seconds\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [play 2 v]\nshow\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\n    go to [back v] layer\nend\n\n@Pause/Play button\n\nwhen flag clicked\nforever\n    if <<(costume [number v]) = [1]> or <(costume [number v]) = [2]>> then\n        set [brightness v] effect to (0)\n        if <touching (mouse-pointer v)?> then\n            change [brightness v] effect by (-10)\n        end\n    end\nend\n\nwhen flag clicked\nwait (0.001) seconds\ngo to x: (-208) y: (-153)\nswitch costume to (costume1 v)\nset [lol variable v] to [0]\nset [cloneid v] to [0]\nset [paused? y/n v] to [n]\nset size to (175) %\nhide\n\nwhen I receive [play 2 v]\nshow\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    go to x: (0) y: (-65)\n    switch costume to (costume2 v)\n    set size to (350) %\n    go to [front v] layer\n    set [paused? y/n v] to [y]\n    broadcast (Paused v)\n    repeat until <(Paused? y/n) = [n]>\n        go to [front v] layer\n        if <touching (mouse-pointer v)?> then\n            set [lol variable v] to [1]\n        else\n            set [lol variable v] to [0]\n        end\n    end\nelse\n    if <(costume [number v]) = [2]> then\n        set [lol variable v] to [0]\n        go to x: (-208) y: (-153)\n        switch costume to (costume1 v)\n        set size to (175) %\n        set [paused? y/n v] to [n]\n        clear graphic effects\n        broadcast (Unpased v)\n    end\nend\n\nwhen I start as a clone\nif <(ClOnEID) = [1]> then\n    set size to (100) %\n    go to x: (0) y: (0)\n    switch costume to (costume3 v)\n    set [ghost v] effect to (50)\n    go to [back v] layer\nelse\n    set size to (100) %\n    go to x: (0) y: (0)\n    switch costume to (costume4 v)\n    clear graphic effects\nend\n\nwhen I receive [unpased v]\ndelete this clone\n\nwhen I receive [paused v]\nset [cloneid v] to [0]\nrepeat (2)\n    change [cloneid v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(ClOnEID) = [2]> then\n    repeat until <(Paused? y/n) = [n]>\n        go to [front v] layer\n    end\nend\n\n@Trans.\n\nwhen flag clicked\nwait (0.001) seconds\ngo to x: (500) y: (0)\nset [brightness effect v] to [0]\nset [trans. v] to [0]\nset [random variable ¯\_\(ツ\)_/¯ v] to [0]\nclear graphic effects\nhide\n\nwhen I start as a clone\ngo to [front v] layer\ngo to x: (500) y: (0)\nset [brightness v] effect to (brightness effect)\nrepeat (12)\n    change x by (-40)\nend\nwait (.6) seconds\nif <(brightness effect) = [45]> then\n    delete this clone\nelse\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\nend\n\nwhen I receive [next? v]\ngo to [front v] layer\nset [trans. v] to [1]\nset [random variable ¯\_\(ツ\)_/¯ v] to [1]\ngo to x: (500) y: (0)\nset [brightness effect v] to [0]\nclear graphic effects\nshow\nrepeat (12)\n    if <(Paused? y/n) = [n]> then\n        change x by (-40)\n    else\n        wait until <(Paused? y/n) = [n]>\n    end\nend\nchange [brightness effect v] by (45)\ncreate clone of (_myself_ v)\nwait (.4) seconds\nchange [brightness effect v] by (45)\ncreate clone of (_myself_ v)\nhide\nset [next? v] to [1]\nwait (1.5) seconds\nset [trans. v] to [0]\nset [random variable ¯\_\(ツ\)_/¯ v] to [0]\n\nwhen flag clicked\nforever\n    if <(Next?) = [1]> then\n        broadcast (Next v)\n        set [next? v] to [0]\n    end\nend\n\nwhen I receive [paused v]\nset [brightness v] effect to (-50)\n\nwhen I receive [unpased v]\nset [brightness v] effect to (0)\n\n@Portal1\n\nwhen flag clicked\ngo to x: (-107) y: (-130)\nset [whirl v] effect to (500)\nhide\nforever\n    if <(Paused? y/n) = [n]> then\n        turn right (10) degrees\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [8]> then\n        go to x: (-75) y: (23)\n        show\n    else\n        if <(Level) = [10]> then\n            go to x: (190) y: (-10)\n            show\n        else\n            if <(Level) = [11]> then\n                go to x: (190) y: (-10)\n                show\n            else\n                hide\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Paused? y/n) = [n]> then\n        if <(Trans.) = [0]> then\n            go to [front v] layer\n        end\n    else\n        go to [back v] layer\n    end\nend\n\n@Portal2\n\nwhen flag clicked\ngo to x: (11) y: (-54)\nset [whirl v] effect to (500)\nhide\nforever\n    if <(Paused? y/n) = [n]> then\n        turn right (10) degrees\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [8]> then\n        go to x: (75) y: (23)\n        show\n    else\n        if <(Level) = [10]> then\n            go to x: (-221) y: (121)\n            show\n        else\n            if <(Level) = [11]> then\n                go to x: (-221) y: (121)\n                show\n            else\n                hide\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Paused? y/n) = [n]> then\n        if <(Trans.) = [0]> then\n            go to [front v] layer\n        end\n    else\n        go to [back v] layer\n    end\nend\n\n@Modulation - On the move\n\nwhen flag clicked\nwait (0.001) seconds\ngo to x: (-190) y: (-150)\nhide\n\nwhen I receive [music v]\nshow\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    if <touching (mouse-pointer v)?> then\n        change [brightness v] effect by (-10)\n    end\nend\n\nwhen I receive [back v]\nhide\n\nwhen this sprite clicked\nstart sound [menu001 v]\nbroadcast (Back v)\nset [music v] to [12]\n\n@thx\n\nwhen flag clicked\nwait (0.001) seconds\ngo to x: (0) y: (10)\nset [ghost v] effect to (100)\nset [pixelate v] effect to (100)\nhide variable [your time v]\nhide\n\nwhen flag clicked\nwait (1) seconds\nforever\n    if <(Level) = [11]> then\n        wait (1) seconds\n        show\n        repeat (10)\n            if <(Paused? y/n) = [n]> then\n                change [ghost v] effect by (-10)\n                change [pixelate v] effect by (-10)\n            else\n                wait until <(Paused? y/n) = [n]>\n            end\n        end\n        stop [this script v]\n    end\nend\n\n@TB\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (100)\n    go to x: (0) y: (0)\n    show\n    go to [front v] layer\nend\n\n