The 5 Worlds - A Platformer

Instructions:             And finally, after weeks of hard work,\n                           I present to you...\n\n___________The 5 Worlds - A Platformer____________\nYou were bored during Quarantine, so you decided to go on an Adventure! You must travel through grassy hills, dark caves, sandy deserts, magma filled volcanos, and climb up the clouds in order to reach your goal, a cure to COVID-19!\n\n_______________INSTRUCTIONS________________\nArrow Keys, WASD, or Mobile to move.\nUse your mouse or tap to aim your flashlight in the cave.\n\n______________COOL FEATURES________________\n- Mobile-Friendly!\n- Sun/Moon/Time is realistic to your time (maybe slightly off but is generally pretty accurate, please tell me if it is not accurate)\n- The Player's eye moves around to look in the direction he is moving, the player also blinks every few seconds. The player also has a cool trail!\n- The Sandstorm blows you back\n- In the Cave you have a flashlight\n- Water + Lava Rises and Falls.\n- Cool detail/lines for the volcano ground, it literally took me over an hour just to draw all those red lines... xD\n- 1800+ Blocks!!!\n_____________________________________________\n⛔️Rude/Negative Comments\n⛔️Advertising (will be reported)\n✅Feedback\n✅❤️️, ⭐, and Follow!\n☹Lag (I actually discovered that it runs very smoothly but almost exactly every 8 seconds it freezes for a second, otherwise it is very smooth, I have no idea why). Sometimes the first level is super laggy, a way to fix this is to go to the second level then don't click anything and just wait 5 seconds, and it should be TONS better (if it doesn't work click the green flag a few times and try again, if it still doesn't work, try going to the 3rd level and waiting) otherwise, I don't really know, but when I followed those instructions they worked for me, maybe tell me if they work for you. That was long xD\n_____________________________________________\nThanks for 100+ Followers! You are the BEST!!!\n_____________________________________________\nSpecial Thank You's:\n@luna_lovegood9999 For being my 100th Follower!\n@codingcindy_0712 for being an AWESOME friend!\n@babsandbubba for being my 1st follow (previous profile)\n\nAnd a Thank You to everyone else who has supported me and helped me have a GREAT time here on Scratch!\n_____________________________________________\nAnd yes, this is 100% possible for both mobile and computer, I have tried on both and have completed it, but if you get stuck on a level you can click on the Portal or click the S key to skip.\n\n❤️️150+!!!\n⭐130+!!!\nVIEWS: 1300+!!!\n\n\nTags:\n#games#platformer#5worlds#fun#game#creative#classic#cave#desert#volcano#clouds#combined#5#inventive\n#platform#C369J#amazing#awesome#game

@Stage\n\nwhen [s v] key pressed\nbroadcast (Next Level v)\n\nwhen [r v] key pressed\nbroadcast (Reset Level v)\n\nwhen I receive [next level v]\nset [level v] to ((PREVIOUS LEVEL) + (1))\nset [previous level v] to (LEVEL)\n\nwhen flag clicked\nset [level v] to [1]\nset [previous level v] to [1]\n\nwhen I receive [start game v]\nforever\n    play sound [The Journey v] until done\n    play sound [imagine-dragons-thunder-lyrics v] until done\nend\n\n@Thumbnail\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\n    go to x: (0) y: (0)\nend\n\n@Player\n\ndefine RESET\nset x to (-205)\nset y to (0)\nset [y v] to [0]\nset [x v] to [0]\nclear graphic effects\nset size to (100) %\nswitch costume to (stand v)\nshow\n\nwhen I receive [next level v]\nRESET\n\nwhen I receive [reset level v]\nRESET\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nset size to (100) %\nclear graphic effects\nswitch costume to (clone v)\ngo to [back v] layer\ngo [forward v] (1) layers\nrepeat (12)\n    change size by (-5.5)\n    change [ghost v] effect by (0.6)\n    change [color v] effect by (1)\nend\ndelete this clone\n\ndefine X MOVEMENT\nif <<<key (right arrow v) pressed?> or <<(x position) < (mouse x)> and <mouse down?>>> or <key (d v) pressed?>> then\n    change [x v] by (1)\nend\nif <<<key (left arrow v) pressed?> or <<(mouse x) < (x position)> and <mouse down?>>> or <key (a v) pressed?>> then\n    change [x v] by (-1)\nend\nchange x by (X)\nset [x v] to ((X) * (0.9))\nif <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 (1)\n                            if <touching (level v)?> then\n                                change y by (1)\n                                if <touching (level v)?> then\n                                    change y by (-8)\n                                    change x by ((X) * (-1.3))\n                                    if <<<((y position) + (10)) < (mouse y)> and <mouse down?>> or <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n                                        if <not <touching (water v)?>> then\n                                            set [y v] to [9]\n                                            if <[0] < (X)> then\n                                                set [x v] to [-6]\n                                            else\n                                                set [x v] to [6]\n                                            end\n                                        end\n                                    else\n                                        set [x v] to (((X) * (-1)) / (5))\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Y MOVEMENT\nchange y by (-1)\nif <touching (level v)?> then\n    set [y v] to [0]\n    change y by (1)\n    if <<<((y position) + (10)) < (mouse y)> and <mouse down?>> or <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n        set [y v] to [10]\n        change y by (Y)\n    end\nelse\n    change y by (1)\n    change [y v] by (-0.9)\n    change y by (Y)\n    if <touching (level v)?> then\n        change y by ((Y) * (-1))\n        set [y v] to [0]\n    end\nend\n\ndefine COSTUMES\nif <<not <(X) = [0]>> or <not <(Y) = [0]>>> then\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\nend\nif <<(Y) < [1]> and <[-1] < (Y)>> then\n    if <<<<key (right arrow v) pressed?> or <<(x position) < (mouse x)> and <mouse down?>>> or <key (d v) pressed?>> or <<<key (left arrow v) pressed?> or <<(mouse x) < (x position)> and <mouse down?>>> or <key (a v) pressed?>>> then\n        if <<<key (right arrow v) pressed?> or <<(x position) < (mouse x)> and <mouse down?>>> or <key (d v) pressed?>> then\n            switch costume to (right v)\n            create clone of (_myself_ v)\n        else\n            switch costume to (left v)\n            create clone of (_myself_ v)\n        end\n    else\n        switch costume to (stand v)\n    end\nelse\n    if <[0] < (Y)> then\n        if <<<key (left arrow v) pressed?> or <<(mouse x) < (x position)> and <mouse down?>>> or <key (a v) pressed?>> then\n            switch costume to (up left v)\n            create clone of (_myself_ v)\n        else\n            if <<<key (right arrow v) pressed?> or <<(x position) < (mouse x)> and <mouse down?>>> or <key (d v) pressed?>> then\n                switch costume to (up right v)\n                create clone of (_myself_ v)\n            else\n                switch costume to (up v)\n                create clone of (_myself_ v)\n            end\n        end\n    else\n        if <<<key (left arrow v) pressed?> or <<(mouse x) < (x position)> and <mouse down?>>> or <key (a v) pressed?>> then\n            switch costume to (down left v)\n            create clone of (_myself_ v)\n        else\n            if <<<key (right arrow v) pressed?> or <<(x position) < (mouse x)> and <mouse down?>>> or <key (d v) pressed?>> then\n                switch costume to (down right v)\n                create clone of (_myself_ v)\n            else\n                switch costume to (down v)\n                create clone of (_myself_ v)\n            end\n        end\n    end\nend\n\ndefine Water\nif <touching (water v)?> then\n    if <[7] < (Y)> then\n        set [y v] to [7]\n    end\n    if <(Y) < [-5]> then\n        set [y v] to [-5]\n    end\n    if <<<((y position) + (10)) < (mouse y)> and <mouse down?>> or <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n        change [y v] by (2)\n    end\n    if <touching (level v)?> then\n        change y by ((Y) * (-2))\n    end\nend\n\ndefine GAME ON\nif <(CONTROLS TOGGLE) = [ON]> then\n    X MOVEMENT\n    Y MOVEMENT\nend\nCOSTUMES\nWater\nPORTAL CHECK\nDEAD\nCLOUDS\n\nwhen I receive [hide v]\nhide\n\nwhen I receive [show v]\nshow\n\ndefine PORTAL CHECK\nif <touching (portal 1 v)?> then\n    set [controls toggle v] to [OFF]\n    broadcast (Next Level v)\nend\n\ndefine DEAD\nif <<<(y position) < [-195]> or <<touching (lava v)?> or <touching (danger v)?>>> or > then\n    broadcast (Reset Level v)\nend\n\nwhen I receive [start game v]\nset [show/hide settings v] to [SHOW]\nset [controls toggle v] to [ON]\nRESET\nforever\n    GAME ON\nend\n\ndefine CLOUDS\nif <touching (clouds v)?> then\n    set [y v] to [0]\n    if <<<((y position) + (10)) < (mouse y)> and <mouse down?>> or <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n        set [y v] to [10]\n    end\nend\n\nwhen I receive [outro v]\nhide\n\n@Blink\n\nwhen I receive [go to player v]\nwait until <not <(costume [number v]) = [1]>>\nrepeat until <(costume [number v]) = [1]>\n    go to (player v)\n    if <(CONTROLS TOGGLE) = [ON]> then\n        go to [front v] layer\n    end\n    if <touching (water v)?> then\n        go to [back v] layer\n    end\nend\n\nwhen I receive [start game v]\nshow\nforever\n    go to (player v)\n    switch costume to (none v)\n    wait (pick random (1) to (4)) seconds\n    broadcast (GO TO PLAYER v)\n    repeat (5)\n        go to (player v)\n        next costume\n        go to (player v)\n    end\n    go to (player v)\n    wait (0.0002) seconds\n    go to (player v)\n    repeat (5)\n        switch costume to ((costume [number v]) - (1))\n        go to (player v)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [outro v]\nhide\n\n@Level\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [start game v]\nshow\n\nwhen I receive [next level v]\nnext costume\n\nwhen I receive [outro v]\nhide\n\n@Clouds\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [start game v]\nshow\n\nwhen I receive [next level v]\nnext costume\n\nwhen I receive [outro v]\nhide\n\n@Danger\n\nwhen flag clicked\nswitch costume to (costume2 v)\nhide\n\nwhen I receive [next level v]\nnext costume\n\nwhen I receive [start game v]\nshow\n\n@Water\n\nwhen flag clicked\ngo to [back v] layer\nswitch costume to (1 v)\nhide\nset [level v] to [1]\ndelete this clone\n\nwhen I receive [start game v]\nset [ghost v] effect to (20)\ngo to [front v] layer\ngo to x: (0) y: (0)\nset [y speed v] to [0]\nshow\nforever\n    repeat (8)\n        change y by (Y SPEED)\n        change [y speed v] by (0.4)\n    end\n    repeat (16)\n        change y by (Y SPEED)\n        change [y speed v] by (-0.4)\n    end\n    repeat (8)\n        change y by (Y SPEED)\n        change [y speed v] by (0.4)\n    end\n    if <(CONTROLS TOGGLE) = [ON]> then\n        go to [front v] layer\n    else\n        go to [back v] layer\n    end\nend\n\nwhen I receive [next level v]\nnext costume\nshow\ngo to [front v] layer\n\n@Lava\n\nwhen flag clicked\ngo to [back v] layer\nswitch costume to (1 v)\nhide\nset [level v] to [1]\ndelete this clone\n\nwhen I receive [start game v]\nset [ghost v] effect to (20)\ngo to [front v] layer\ngo to x: (0) y: (0)\nset [y speed v] to [0]\nshow\nforever\n    repeat (8)\n        change y by (Y SPEED)\n        change [y speed v] by (0.4)\n    end\n    repeat (16)\n        change y by (Y SPEED)\n        change [y speed v] by (-0.4)\n    end\n    repeat (8)\n        change y by (Y SPEED)\n        change [y speed v] by (0.4)\n    end\n    if <(CONTROLS TOGGLE) = [ON]> then\n        go to [front v] layer\n    else\n        go to [back v] layer\n    end\nend\n\nwhen I receive [next level v]\nchange [level v] by (1)\nnext costume\nshow\ngo to [front v] layer\n\n@Sandstorm\n\nwhen flag clicked\nhide\n\nwhen I receive [start game v]\nforever\n    CHECK IF CORRECT (LEVEL)\nend\n\ndefine DUST STORM\ncreate clone of (_myself_ v)\nchange [x v] by (-0.2)\n\ndefine CHECK IF CORRECT (level)\nif <<[20] < (level)> and <[31] > (level)>> then\n    DUST STORM\nelse\n    hide\n    delete this clone\nend\n\nwhen I start as a clone\nshow\ngo to x: (220) y: (pick random (-200) to (200))\nset [ghost v] effect to (pick random (0) to (50))\nswitch costume to (pick random (1) to (3))\nset size to (pick random (20) to (60)) %\ngo to [back v] layer\npoint in direction (-90)\nrepeat until <touching (_edge_ v)?>\n    move (12) steps\n    if <(pick random (1) to (3)) = [1]> then\n        turn right (pick random (1) to (4)) degrees\n    else\n        if <(pick random (1) to (2)) = [1]> then\n            turn left (pick random (1) to (4)) degrees\n        end\n    end\nend\ndelete this clone\n\n@Sun/Moon\n\nwhen I receive [start game v]\nshow\nforever\n    CHECK IF IN CAVE (LEVEL)\n    go [forward v] (1) layers\nend\n\ndefine REAL TIME\ngo to [back v] layer\nif <<[6] < (current [hour v])> and <[10] > (current [hour v])>> then\n    hide\n    switch backdrop to (sunrise v)\n    set [hide show sun/moon v] to [HIDE]\nend\ngo to [back v] layer\nif <<[9] < (current [hour v])> and <[19] > (current [hour v])>> then\n    show\n    switch costume to (sun v)\n    go to [back v] layer\n    switch backdrop to (day v)\n    point in direction (((current [hour v]) * (20)) + (90))\n    set [hide show sun/moon v] to [SHOW]\nend\ngo to [back v] layer\nif <<[18] < (current [hour v])> and <[20] > (current [hour v])>> then\n    hide\n    switch backdrop to (sunset v)\n    set [hide show sun/moon v] to [HIDE]\nend\ngo to [back v] layer\nif <<<[19] < (current [hour v])> and <[24] > (current [hour v])>> or <<[0] < (current [hour v])> and <[7] > (current [hour v])>>> then\n    go to [back v] layer\n    show\n    switch costume to (moon v)\n    switch backdrop to (night v)\n    if <<[19] < (current [hour v])> and <[24] > (current [hour v])>> then\n        point in direction ((current [hour v]) * (20))\n    end\n    if <<[0] < (current [hour v])> and <[6] > (current [hour v])>> then\n        point in direction (((current [hour v]) * (20)) + (90))\n    end\n    set [hide show sun/moon v] to [SHOW]\nend\n\ndefine CHECK IF IN CAVE (level)\nif <<[10] < (level)> and <(level) < [21]>> then\n    switch backdrop to (cave v)\n    hide\n    set [hide show sun/moon v] to [HIDE]\nelse\n    REAL TIME\nend\n\nwhen flag clicked\nhide\nswitch backdrop to (intro v)\n\nwhen I receive [outro v]\nstop [other scripts in sprite v]\nswitch backdrop to (intro v)\nhide\n\n@Sun/Moon Shine\n\nwhen flag clicked\nhide\n\nwhen I receive [start game v]\nshow\nforever\n    SWITCH COSTUME TO ([costume # v] of [sun/moon v]) POINT IN DIRECTION ([direction v] of [sun/moon v]) GO TO ([x position v] of [sun/moon v]) ([y position v] of [sun/moon v])\nend\n\ndefine SWITCH COSTUME TO (sun/moon costume) POINT IN DIRECTION (sun/moon direction) GO TO (sun/moon x) (sun/moon y)\nswitch costume to (sun/moon costume)\ngo to x: (sun/moon x) y: (sun/moon y)\npoint in direction (sun/moon direction)\ngo to [back v] layer\nif <(HIDE SHOW SUN/MOON) = [SHOW]> then\n    show\nelse\n    hide\nend\n\n@Next Level 1\n\nwhen flag clicked\nhide\ngo to x: (-220) y: (0)\npoint in direction (90)\n\nwhen I receive [next level v]\ngo to [front v] layer\nshow\ngo to x: (-220) y: (0)\npoint in direction (90)\ngo to [front v] layer\nwait (0.1) seconds\ngo to [front v] layer\nglide (0.5) secs to x: (0) y: (0)\ngo to [front v] layer\nrepeat (10)\n    go to [front v] layer\n    turn right (9) degrees\nend\nglide (0.5) secs to x: (0) y: (190)\nhide\n\n@Next Level 2\n\nwhen flag clicked\nhide\ngo to x: (220) y: (0)\npoint in direction (90)\n\nwhen I receive [next level v]\nshow\ngo to x: (220) y: (0)\npoint in direction (90)\ngo to [front v] layer\nwait (0.1) seconds\ngo to [front v] layer\nglide (0.5) secs to x: (0) y: (0)\ngo to [front v] layer\nrepeat (10)\n    go to [front v] layer\n    turn right (9) degrees\nend\nglide (0.5) secs to x: (0) y: (-190)\nhide\n\n@NEXT LEVEL\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\nset [controls toggle v] to [OFF]\nclear graphic effects\ngo to [front v] layer\nshow\nwait (2) seconds\ngo to [front v] layer\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (10)\nend\nhide\nset [controls toggle v] to [ON]\nbroadcast (SHOW v)\n\n@Love\n\nwhen flag clicked\nforever\n    if <not < (☁ LOVED LIST) contains (username)?>> then\n        if <touching (mouse-pointer v)?> then\n            wait (0.2) seconds\n            if <touching (mouse-pointer v)?> then\n                broadcast (LOVE v)\n                set [☁ loved list v] to (join (☁ LOVED LIST) (join [, ] (username)))\n            end\n        end\n    end\nend\n\n@Fave\n\nwhen flag clicked\nforever\n    if <not < (☁ FAVED LIST) contains (username)?>> then\n        if <touching (mouse-pointer v)?> then\n            wait (0.2) seconds\n            if <touching (mouse-pointer v)?> then\n                broadcast (FAV v)\n                set [☁ faved list v] to (join (☁ FAVED LIST) (join [, ] (username)))\n            end\n        end\n    end\nend\n\n@Thanks!\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\n\nwhen I receive [love v]\ngo to x: (0) y: (0)\nswitch costume to (love v)\ncreate clone of (_myself_ v)\n\nwhen I receive [fav v]\ngo to x: (0) y: (0)\nswitch costume to (fave v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\ngo to [front v] layer\ngo to x: (0) y: (0)\nshow\nglide (1) secs to x: (0) y: (-130)\nwait (0.8) seconds\nhide\n\n@Portal 1\n\nwhen flag clicked\nclear graphic effects\nhide\n\nwhen I receive [start game v]\ngo to x: (200) y: (-20)\npoint in direction (90)\nclear graphic effects\nshow\ngo to [back v] layer\nforever\n    PORTAL ANIMATIONS\nend\n\ndefine PORTAL ANIMATIONS\nchange [color v] effect by (1)\nturn right (4) degrees\n\nwhen I receive [next level v]\nwait (0.1) seconds\nPLACING DEPENDING ON WHICH (LEVEL) IT IS\n\ndefine PLACING DEPENDING ON WHICH (level) IT IS\nif <(level) = [2]> then\n    go to x: (201) y: (120)\nelse\n    if <(level) = [3]> then\n        go to x: (200) y: (8)\n    else\n        if <(level) = [4]> then\n            go to x: (190) y: (70)\n        else\n            if <(level) = [5]> then\n                go to x: (175) y: (-100)\n            else\n                if <(level) = [6]> then\n                    go to x: (170) y: (35)\n                else\n                    if <(level) = [7]> then\n                        go to x: (100) y: (-130)\n                    else\n                        if <(level) = [8]> then\n                            go to x: (175) y: (70)\n                        else\n                            if <(level) = [9]> then\n                                go to x: (180) y: (20)\n                            else\n                                if <(level) = [10]> then\n                                    go to x: (105) y: (-145)\n                                else\n                                    if <(level) = [11]> then\n                                        go to x: (200) y: (-40)\n                                    else\n                                        if <(level) = [12]> then\n                                            go to x: (200) y: (100)\n                                        else\n                                            if <(level) = [13]> then\n                                                go to x: (200) y: (-70)\n                                            else\n                                                if <(level) = [14]> then\n                                                    go to x: (200) y: (15)\n                                                else\n                                                    if <(level) = [15]> then\n                                                        go to x: (200) y: (50)\n                                                    else\n                                                        if <(level) = [16]> then\n                                                            go to x: (205) y: (50)\n                                                        else\n                                                            if <(level) = [17]> then\n                                                                go to x: (192) y: (16)\n                                                            else\n                                                                if <(level) = [18]> then\n                                                                    go to x: (205) y: (20)\n                                                                else\n                                                                    if <(level) = [19]> then\n                                                                        go to x: (185) y: (-120)\n                                                                    else\n                                                                        if <(level) = [20]> then\n                                                                            go to x: (200) y: (30)\n                                                                        else\n                                                                            if <(level) = [21]> then\n                                                                                go to x: (200) y: (-15)\n                                                                            else\n                                                                                if <(level) = [22]> then\n                                                                                    go to x: (200) y: (135)\n                                                                                else\n                                                                                    if <(level) = [23]> then\n                                                                                        go to x: (200) y: (15)\n                                                                                    else\n                                                                                        if <(level) = [24]> then\n                                                                                            go to x: (200) y: (130)\n                                                                                        else\n                                                                                            if <(level) = [25]> then\n                                                                                                go to x: (200) y: (137)\n                                                                                            else\n                                                                                                if <(level) = [26]> then\n                                                                                                    go to x: (200) y: (137)\n                                                                                                else\n                                                                                                    if <(level) = [27]> then\n                                                                                                        go to x: (205) y: (135)\n                                                                                                    else\n                                                                                                        if <(level) = [28]> then\n                                                                                                            go to x: (205) y: (155)\n                                                                                                        else\n                                                                                                            if <(level) = [29]> then\n                                                                                                                go to x: (205) y: (155)\n                                                                                                            else\n                                                                                                                if <(level) = [30]> then\n                                                                                                                    go to x: (205) y: (165)\n                                                                                                                else\n                                                                                                                    if <(level) = [31]> then\n                                                                                                                        go to x: (205) y: (0)\n                                                                                                                    else\n                                                                                                                        if <(level) = [32]> then\n                                                                                                                            go to x: (205) y: (50)\n                                                                                                                        else\n                                                                                                                            if <(level) = [33]> then\n                                                                                                                                go to x: (205) y: (50)\n                                                                                                                            else\n                                                                                                                                if <(level) = [34]> then\n                                                                                                                                    go to x: (205) y: (100)\n                                                                                                                                else\n                                                                                                                                    if <(level) = [35]> then\n                                                                                                                                        go to x: (210) y: (40)\n                                                                                                                                    else\n                                                                                                                                        if <(level) = [36]> then\n                                                                                                                                            go to x: (205) y: (140)\n                                                                                                                                        else\n                                                                                                                                            if <(level) = [37]> then\n                                                                                                                                                go to x: (210) y: (155)\n                                                                                                                                            else\n                                                                                                                                                if <(level) = [38]> then\n                                                                                                                                                    go to x: (210) y: (5)\n                                                                                                                                                else\n                                                                                                                                                    if <(level) = [39]> then\n                                                                                                                                                        go to x: (210) y: (160)\n                                                                                                                                                    else\n                                                                                                                                                        if <(level) = [40]> then\n                                                                                                                                                            go to x: (210) y: (50)\n                                                                                                                                                        else\n                                                                                                                                                            if <(level) = [41]> then\n                                                                                                                                                                go to x: (210) y: (45)\n                                                                                                                                                            else\n                                                                                                                                                                if <(level) = [42]> then\n                                                                                                                                                                    go to x: (200) y: (120)\n                                                                                                                                                                else\n                                                                                                                                                                    if <(level) = [43]> then\n                                                                                                                                                                        go to x: (205) y: (75)\n                                                                                                                                                                    else\n                                                                                                                                                                        if <(level) = [44]> then\n                                                                                                                                                                            go to x: (210) y: (100)\n                                                                                                                                                                        else\n                                                                                                                                                                            if <(level) = [45]> then\n                                                                                                                                                                                go to x: (205) y: (110)\n                                                                                                                                                                            else\n                                                                                                                                                                                if <(level) = [46]> then\n                                                                                                                                                                                    go to x: (210) y: (100)\n                                                                                                                                                                                else\n                                                                                                                                                                                    if <(level) = [47]> then\n                                                                                                                                                                                        go to x: (190) y: (-50)\n                                                                                                                                                                                    else\n                                                                                                                                                                                        if <(level) = [48]> then\n                                                                                                                                                                                            go to x: (210) y: (-110)\n                                                                                                                                                                                        else\n                                                                                                                                                                                            if <(level) = [49]> then\n                                                                                                                                                                                                go to x: (210) y: (140)\n                                                                                                                                                                                            else\n                                                                                                                                                                                                if <(level) = [50]> then\n                                                                                                                                                                                                    broadcast (HIDE PORTALS 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\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\n                end\n            end\n        end\n    end\nend\n\nwhen this sprite clicked\nbroadcast (Next Level v)\n\nwhen I receive [hide portals v]\nhide\n\n@Portal 2\n\nwhen flag clicked\nclear graphic effects\nhide\n\nwhen I receive [start game v]\ngo to x: (200) y: (-20)\npoint in direction (90)\nclear graphic effects\nshow\ngo to [back v] layer\nforever\n    PORTAL ANIMATIONS\nend\n\ndefine PORTAL ANIMATIONS\nchange [color v] effect by (1)\nturn left (4) degrees\n\nwhen I receive [next level v]\nwait (0.2) seconds\ngo to (portal 1 v)\n\nwhen this sprite clicked\nbroadcast (Next Level v)\n\nwhen I receive [hide portals v]\nhide\n\n@Flashlight\n\nwhen flag clicked\nerase all\nset pen size to (30)\nclear graphic effects\nhide\n\ndefine LEVEL TEST (level)\nif <<[10] < (level)> and <(level) < [21]>> then\n    FLASHLIGHT\nelse\n    hide\nend\n\ndefine FLASHLIGHT\nshow\ngo to (player v)\npoint towards (mouse-pointer v)\ngo to [back v] layer\n\nwhen I receive [start game v]\nforever\n    LEVEL TEST (LEVEL)\nend\n\n@INTRO\n\nwhen flag clicked\nhide\nset size to (100) %\nswitch costume to (costume11 v)\ngo to x: (0) y: (500000)\nset [y v] to [-180]\nstart sound [DJVI - Supercharge v]\nrepeat (8)\n    create clone of (_myself_ v)\n    change [y v] by (50)\n    wait (0.2) seconds\n    change [brightness v] effect by (4)\nend\nclear graphic effects\ngo to x: (-38) y: (-180)\nswitch costume to (costume1 v)\nset [count v] to [0]\nrepeat (5)\n    create clone of (_myself_ v)\n    next costume\n    change x by (20)\n    wait (0.2) seconds\nend\nwait (1) seconds\ngo to x: (0) y: (20)\nswitch costume to (costume9 v)\ncreate clone of (_myself_ v)\nwait (1) seconds\nbroadcast (Start Game v)\n\nwhen I start as a clone\nshow\nif <(costume [number v]) < [6]> then\n    set [brightness v] effect to (100)\n    set size to (50) %\n    repeat until <(round (y position)) = [0]>\n        change y by (((-80) - (y position)) * (0.2))\n    end\n    change [count v] by (1)\nend\nif <(costume [number v]) = [6]> then\n    repeat until <(round (size)) = [100]>\n        change size by ((100) - ((size) * (0.3)))\n    end\n    change [count v] by (1)\n    repeat (6)\n        change size by (((300) - (size)) * (0.5))\n    end\n    repeat (10)\n        change size by (((100) - (size)) * (0.5))\n    end\n    wait (1) seconds\n    broadcast (end v)\nend\nif <(costume [number v]) = [7]> then\n    set [cy v] to (y)\n    repeat until <(round (y position)) = (cy)>\n        change y by (((cy) - (y position)) * (0.2))\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) < [9]> then\n    wait (1) seconds\n    wait until <(count) = [8]>\n    repeat (10)\n        change size by (-10)\n    end\nend\n\nwhen I receive [end v]\nif <(costume [number v]) < [9]> then\n    repeat (10)\n        change size by (-10)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [10]> then\n    repeat until <(round (y position)) = [180]>\n        change y by (((180) - (y position)) * (0.4))\n    end\n    delete this clone\nend\nif <(costume [number v]) = [9]> then\n    repeat (10)\n        change size by (-10)\n    end\n    delete this clone\nend\n\n@OUTRO\n\nwhen flag clicked\nhide\nrepeat (10)\n    delete this clone\nend\n\nwhen I receive [outro v]\ngo to [front v] layer\nhide\nset [id v] to [1]\nclear graphic effects\nrepeat (4)\n    wait (0.5) seconds\n    switch costume to (1 v)\n    create clone of (_myself_ v)\n    change [id v] by (1)\n    change [color v] effect by (5)\nend\nclear graphic effects\nwait (0.5) seconds\nswitch costume to (3 v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nif <(costume [name v]) = [1]> then\n    if <(id) = [1]> then\n        go to x: (500) y: (0)\n        repeat (25)\n            change x by (((0) - (x position)) * (0.2))\n        end\n    end\n    if <(id) = [2]> then\n        go to x: (0) y: (500)\n        repeat (25)\n            change y by (((0) - (y position)) * (0.2))\n        end\n    end\n    if <(id) = [3]> then\n        go to x: (-500) y: (0)\n        repeat (25)\n            change x by (((0) - (x position)) * (0.2))\n        end\n    end\n    if <(id) = [4]> then\n        set size to (100) %\n        go to x: (0) y: (-500)\n        repeat (25)\n            change y by (((0) - (y position)) * (0.2))\n        end\n        clear graphic effects\n        switch costume to (2 v)\n        forever\n            repeat (20)\n                change size by (0.2)\n            end\n            repeat (20)\n                change size by (-0.2)\n            end\n        end\n    end\nend\nif <(costume [name v]) = [3]> then\n    go to x: (0) y: (100)\n    forever\n        point in direction ((([sin v] of ((timer) * (200)) ) * (5)) + (90))\n        set size to ((([sin v] of ((timer) * (100)) ) * (5)) + (100)) %\n        switch costume to (effect v)\n        create clone of (_myself_ v)\n        switch costume to (3 v)\n    end\nend\nif <(costume [name v]) = [effect]> then\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\n@BLANK\n\n@Antidote\n\nwhen flag clicked\nhide\nset size to (100) %\n\nwhen I receive [next level v]\nclear graphic effects\nset size to (120) %\nwait (0.1) seconds\nif <(LEVEL) = [50]> then\n    go to x: (150) y: (100)\n    point in direction (90)\n    show\n    repeat until <touching (player v)?>\n        repeat (10)\n            change size by (2)\n            change [brightness v] effect by (2)\n            if <touching (player v)?> then\n                broadcast (outro v)\n            end\n        end\n        repeat (10)\n            change size by (-2)\n            change [brightness v] effect by (-2)\n            if <touching (player v)?> then\n                broadcast (outro v)\n            end\n        end\n    end\n    broadcast (outro v)\nend\n\n@ SHINE1\n\nwhen flag clicked\nhide\nset size to (100) %\n\nwhen I receive [next level v]\nclear graphic effects\nset size to (100) %\nwait (0.1) seconds\nif <(LEVEL) = [50]> then\n    go to x: (150) y: (80)\n    point in direction (90)\n    show\n    forever\n        turn right (3) degrees\n    end\nend\n\nwhen I receive [outro v]\nhide\nstop [other scripts in sprite v]\n\n@ SHINE2\n\nwhen flag clicked\nhide\nset size to (100) %\n\nwhen I receive [next level v]\nclear graphic effects\nset size to (100) %\nwait (0.1) seconds\nif <(LEVEL) = [50]> then\n    go to x: (150) y: (80)\n    point in direction (90)\n    show\n    forever\n        turn left (3) degrees\n    end\nend\n\nwhen I receive [outro v]\nhide\nstop [other scripts in sprite v]\n\n