Storm- A Fortnite Platformer

Instructions: DOUBLE CLICK THE GREEN FLAG OR ELSE IT WON'T WORK!!!\nFirst version: Zone- A Platformer-\nhttps://scratch.mit.edu/projects/362952547\n1, 2, or 3 to change skins.\nClick to shoot. W, space, or up arrow to jump and AD or arrow keys to move. \nAll levels are possible. \nRUN from the Storm!!!\nGet the meds!\nAvoid incoming fire!

@Stage\n\nwhen flag clicked\nshow variable [health v]\nforever\n    play sound [Music v] until done\nend\n\nwhen flag clicked\nforever\n    if <(LVL) = [13]> then\n    end\nend\n\nwhen flag clicked\nforever\n    if <[] = [0]> then\n        hide variable [stormtime v]\n        broadcast (Win v)\n        stop [all v]\n    end\nend\n\nwhen flag clicked\nset [botlive v] to [0]\nhide variable [stormtime v]\nset [health v] to [150]\n\n@Player\n\nwhen flag clicked\nset [goplayer v] to [1]\ngo to [front v] layer\ngo to x: (-100) y: (-45)\nset size to (60) %\nhide variable [yvelocity v]\nhide variable [xvelocity v]\nset rotation style [left-right v]\nforever\n    if <(GoPlayer) = [1]> then\n        if <(LVL) < [8]> then\n            if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n                change [xvelocity v] by (0.6)\n            end\n            if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n                change [xvelocity v] by (-0.6)\n            end\n            set [xvelocity v] to ((Xvelocity) * (0.9))\n            change x by (Xvelocity)\n            if <<touching (platforms v)?> or <touching (breakableplatforms v)?>> then\n                change y by (1)\n                if <<touching (platforms v)?> or <touching (breakableplatforms v)?>> then\n                    change y by (1)\n                    if <<touching (platforms v)?> or <touching (breakableplatforms v)?>> then\n                        change y by (1)\n                        if <<touching (platforms v)?> or <touching (breakableplatforms v)?>> then\n                            change y by (1)\n                            if <<touching (platforms v)?> or <touching (breakableplatforms v)?>> then\n                                change y by (1)\n                                if <<touching (platforms v)?> or <touching (breakableplatforms v)?>> then\n                                    change x by ((Xvelocity) * (-1))\n                                    change y by (-5)\n                                    if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <key (space v) pressed?>> then\n                                        if <(Xvelocity) > [0]> then\n                                            set [xvelocity v] to [-5]\n                                        else\n                                            set [xvelocity v] to [5]\n                                        end\n                                        set [yvelocity v] to [10]\n                                    else\n                                        set [xvelocity v] to [0]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n            change [yvelocity v] by (-1)\n            change y by (Yvelocity)\n            if <<touching (platforms v)?> or <touching (breakableplatforms v)?>> then\n                change y by ((Yvelocity) * (-1))\n                set [yvelocity v] to [0]\n            end\n            change y by (-1)\n            if <<touching (platforms v)?> or <touching (breakableplatforms v)?>> then\n                if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <key (space v) pressed?>> then\n                    set [yvelocity v] to [10]\n                end\n            end\n            change y by (1)\n        end\n    end\nend\n\nwhen I receive [nextlvl v]\ngo to x: (-200) y: (-45)\n\nwhen flag clicked\nforever\n    if <touching (bossprojectiles v)?> then\n        wait (0.1) seconds\n        go to x: (-200) y: (-45)\n    end\nend\n\nwhen flag clicked\nshow\nforever\n    if <touching (boss v)?> then\n        go to x: (-200) y: (-45)\n        change [boss lives v] by (-1)\n        wait (1) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (power v)?> then\n        go to x: (-200) y: (-45)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GoPlayer) = [1]> then\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            point in direction (90)\n        end\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            point in direction (-90)\n        end\n    end\nend\n\nwhen flag clicked\nswitch costume to (ravenstand v)\nforever\n    if <(GoPlayer) = [1]> then\n        if <<<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> or <<key (a v) pressed?> or <key (d v) pressed?>>> then\n            if <(costume [name v]) = [MarshStand]> then\n                wait (0.05) seconds\n                switch costume to (marshrun v)\n            end\n        end\n        if <not <<<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> or <<key (a v) pressed?> or <key (d v) pressed?>>>> then\n            if <(costume [name v]) = [MarshRun]> then\n                switch costume to (marshstand v)\n            end\n        end\n        if <<<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> or <<key (a v) pressed?> or <key (d v) pressed?>>> then\n            if <(costume [name v]) = [WildCardStand]> then\n                wait (0.05) seconds\n                switch costume to (wildcardrun v)\n            end\n        end\n        if <not <<<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> or <<key (a v) pressed?> or <key (d v) pressed?>>>> then\n            if <(costume [name v]) = [WildCardRun]> then\n                switch costume to (wildcardstand v)\n            end\n        end\n        if <<<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> or <<key (a v) pressed?> or <key (d v) pressed?>>> then\n            if <(costume [name v]) = [RavenStand]> then\n                wait (0.05) seconds\n                switch costume to (ravenrun v)\n            end\n        end\n        if <not <<<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> or <<key (a v) pressed?> or <key (d v) pressed?>>>> then\n            if <(costume [name v]) = [RavenRun]> then\n                switch costume to (ravenstand v)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (1 v) pressed?> then\n        switch costume to (marshstand v)\n    end\n    if <key (2 v) pressed?> then\n        switch costume to (wildcardstand v)\n    end\n    if <key (3 v) pressed?> then\n        switch costume to (ravenstand v)\n    end\nend\n\nwhen flag clicked\nshow\nforever\n    if <touching (spiketraps v)?> then\n        change [health v] by (-100)\n        wait (2) seconds\n    end\nend\n\nwhen I receive [nextlvl v]\nif <(LVL) = [8]> then\n    hide\nend\n\nwhen I receive [animationdone v]\nshow\nset [goplayer v] to [1]\ngo to [front v] layer\ngo to x: (-200) y: (-45)\nforever\n    if <(GoPlayer) = [1]> then\n        if <(LVL) = [8]> then\n            if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n                change [xvelocity v] by (0.6)\n            end\n            if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n                change [xvelocity v] by (-0.6)\n            end\n            set [xvelocity v] to ((Xvelocity) * (0.9))\n            change x by (Xvelocity)\n            if <<touching (platforms v)?> or <touching (bossplatforms v)?>> then\n                change y by (1)\n                if <<touching (platforms v)?> or <touching (bossplatforms v)?>> then\n                    change y by (1)\n                    if <<touching (platforms v)?> or <touching (bossplatforms v)?>> then\n                        change y by (1)\n                        if <<touching (platforms v)?> or <touching (bossplatforms v)?>> then\n                            change y by (1)\n                            if <<touching (platforms v)?> or <touching (bossplatforms v)?>> then\n                                change y by (1)\n                                if <<touching (platforms v)?> or <touching (bossplatforms v)?>> then\n                                    change x by ((Xvelocity) * (-1))\n                                    change y by (-5)\n                                    if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <key (space v) pressed?>> then\n                                        if <(Xvelocity) > [0]> then\n                                            set [xvelocity v] to [-5]\n                                        else\n                                            set [xvelocity v] to [5]\n                                        end\n                                        set [yvelocity v] to [10]\n                                    else\n                                        set [xvelocity v] to [0]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n            change [yvelocity v] by (-1)\n            change y by (Yvelocity)\n            if <<touching (platforms v)?> or <touching (bossplatforms v)?>> then\n                change y by ((Yvelocity) * (-1))\n                set [yvelocity v] to [0]\n            end\n            change y by (-1)\n            if <<touching (platforms v)?> or <touching (bossplatforms v)?>> then\n                if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <key (space v) pressed?>> then\n                    set [yvelocity v] to [10]\n                end\n            end\n            change y by (1)\n        end\n    end\nend\n\n@BreakablePlatforms\n\nwhen flag clicked\ngo to [back v] layer\ngo [backward v] (1) layers\nhide\nwait (0.1) seconds\nhide\nforever\n    if <(LVL) = [3]> then\n        go to x: (133) y: (80)\n        show\n        if <touching (playerbullets v)?> then\n            wait (0.2) seconds\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [nextlvl v]\nif <(LVL) = [4]> then\n    hide\nend\n\nwhen I receive [nextlvl v]\nif <(LVL) = [5]> then\n    hide\n    wait (.3) seconds\n    go to x: (-21) y: (-117)\n    show\nend\n\nwhen flag clicked\nforever\n    if <(LVL) = [5]> then\n        if <touching (playerbullets v)?> then\n            wait (0.2) seconds\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [nextlvl v]\nif <(LVL) = [6]> then\n    go to x: (-21) y: (-117)\n    show\nend\n\nwhen flag clicked\nforever\n    if <(LVL) = [6]> then\n        if <touching (playerbullets v)?> then\n            wait (0.2) seconds\n            hide\n            stop [this script v]\n        end\n    end\nend\n\n@Bots\n\nwhen flag clicked\nhide\nwait (0.1) seconds\nhide\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\nforever\n    if <touching (playerbullets v)?> then\n        wait (0.1) seconds\n        hide\n        set [botlive v] to [0]\n    end\nend\n\nwhen flag clicked\nset rotation style [left-right v]\npoint in direction (90)\nforever\n    if <(BotLive) = [1]> then\n        show\n    end\nend\n\nwhen I receive [nextlvl v]\nif <(LVL) = [2]> then\n    set [botlive v] to [1]\nend\nif <(LVL) = [3]> then\n    set [botlive v] to [1]\nend\nif <(LVL) = [4]> then\n    set [botlive v] to [1]\nend\nif <(LVL) = [5]> then\n    set [botlive v] to [1]\n    wait (.5) seconds\n    change x by (20)\n    point in direction (-90)\n    glide (1.5) secs to x: (248) y: (-115)\n    hide\nend\nif <(LVL) = [6]> then\n    set [botlive v] to [1]\nend\nif <(LVL) = [7]> then\n    set [botlive v] to [1]\n    forever\n        if <touching (playerbullets v)?> then\n            wait (0.1) seconds\n            hide\n            set [botlive v] to [0]\n        end\n    end\nend\n\nwhen I receive [nextlvl v]\nif <(LVL) = [2]> then\n    switch costume to (wildcardbot v)\n    go to x: (134) y: (-56)\nend\nif <(LVL) = [3]> then\n    switch costume to (ravenbot v)\n    go to x: (120) y: (142)\nend\nif <(LVL) = [4]> then\n    switch costume to (marshmellowbot v)\n    go to x: (155) y: (-115)\nend\nif <(LVL) = [5]> then\n    show\n    switch costume to (marshmellowbotrun v)\n    go to x: (-26) y: (-115)\nend\nif <(LVL) = [6]> then\n    create clone of (_myself_ v)\n    point in direction (90)\n    show\n    switch costume to (wildcardbot v)\n    go to x: (120) y: (142)\nend\nif <(LVL) = [7]> then\n    create clone of (_myself_ v)\n    point in direction (90)\n    go to x: (82) y: (83)\n    show\n    switch costume to (ravenbot v)\nend\n\nwhen I start as a clone\nshow\ngo to x: (-26) y: (-115)\nswitch costume to (marshmellowbotrun v)\nchange x by (20)\npoint in direction (-90)\nrepeat until <touching (_edge_ v)?>\n    show\n    move (-6) steps\n    if <touching (playerbullets v)?> then\n        show\n    end\nend\nforever\n    if <touching (_edge_ v)?> then\n        hide\n    end\nend\n\nwhen I start as a clone\nforever\n    repeat until <touching (_edge_ v)?>\n        if <touching (_edge_ v)?> then\n            hide\n        end\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    if <(BotLive) = [0]> then\n        hide\n        wait (0.1) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (_edge_ v)?> then\n        broadcast (MarshBotDie v)\n    end\nend\n\n@PlayerGun&Arms\n\nwhen flag clicked\ngo to [front v] layer\ngo [forward v] (1) layers\nforever\n    go [forward v] (1) layers\n    go to (player v)\n    point towards (mouse-pointer v)\nend\n\nwhen flag clicked\nshow\nforever\n    if <color (#353535) is touching <not <touching (player v)?>>?> then\n        go to (player v)\n    end\nend\n\nwhen I receive [nextlvl v]\nif <(LVL) = [8]> then\n    hide\nend\n\nwhen I receive [animationdone v]\nshow\n\nwhen I receive [gameover v]\nhide\n\nwhen I receive [win v]\nhide\n\n@Boss\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [animationdone v]\nshow\ngo to x: (161) y: (-127)\nglide (1.8) secs to x: (161) y: (108)\nwait (1) seconds\nbroadcast (BossShoot v)\nwait (2) seconds\nbroadcast (BossShoot v)\nwait (2) seconds\nglide (1) secs to x: (30) y: (145)\nglide (1) secs to x: (-22) y: (-1)\nwait (0.3) seconds\nbroadcast (BossShoot v)\nwait (2) seconds\nbroadcast (BossShoot v)\nwait (2) seconds\n\nwhen flag clicked\nhide\nforever\n    if <touching (playerbullets v)?> then\n        hide\n        broadcast (Win v)\n        stop [all v]\n    end\nend\n\n@BotBullets\n\nwhen flag clicked\nhide\nwait (0.1) seconds\nhide\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(LVL) = [2]> then\n        if <(BotLive) = [1]> then\n            wait (1.5) seconds\n            create clone of (_myself_ v)\n        end\n    end\n    if <(LVL) = [3]> then\n        if <(BotLive) = [1]> then\n            wait (1.5) seconds\n            create clone of (_myself_ v)\n        end\n    end\n    if <(LVL) = [4]> then\n        if <(BotLive) = [1]> then\n            wait (1.5) seconds\n            create clone of (_myself_ v)\n        end\n    end\n    if <(LVL) = [6]> then\n        if <(BotLive) = [1]> then\n            wait (1.5) seconds\n            create clone of (_myself_ v)\n        end\n    end\n    if <(LVL) = [7]> then\n        if <(BotLive) = [1]> then\n            wait (1.5) seconds\n            create clone of (_myself_ v)\n        end\n    end\nend\n\nwhen I start as a clone\nif <(BotLive) = [1]> then\n    go to (bots v)\n    switch costume to (bullet v)\n    show\n    point towards (player v)\n    turn right (pick random (-8) to (8)) degrees\n    point towards (player v)\n    repeat until <<<touching (_edge_ v)?> or <touching (platforms v)?>> or <touching (player v)?>>\n        move (20) steps\n        if <touching (player v)?> then\n            change [health v] by (pick random (-50) to (-80))\n        end\n    end\n    wait (0.001) seconds\n    delete this clone\nelse\n    if <(BotLive) = [0]> then\n        wait until <touching (player v)?>\n    end\n    delete this clone\nend\n\nwhen I receive [bossshoot v]\nshow\ngo to (boss v)\nswitch costume to (bullet v)\npoint towards (player v)\nrepeat until <<<touching (_edge_ v)?> or <touching (platforms v)?>> or <touching (player v)?>>\n    move (20) steps\n    if <touching (player v)?> then\n        change [health v] by (pick random (-65) to (-100))\n        hide\n        delete this clone\n    end\nend\nwait (0.001) seconds\nhide\ndelete this clone\n\n@Thumbnail\n\nwhen flag clicked\nhide\n\ngo to [front v] layer\ngo to x: (0) y: (0)\nhide variable [health v]\ngo [forward v] (5) layers\nshow\n\n@GameOver\n\nwhen flag clicked\ngo to [front v] layer\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [gameover v]\ngo to [front v] layer\ngo [forward v] (4) layers\nhide variable [stormtime v]\nswitch costume to (gameover v)\nshow\nstop [all v]\n\nwhen I receive [win v]\ngo to [front v] layer\ngo [forward v] (4) layers\nhide variable [stormtime v]\nswitch costume to (victory v)\nshow\nstop [all v]\n\nwhen flag clicked\nforever\n    if <(Health) < [1]> then\n        broadcast (GameOver v)\n        stop [all v]\n    end\nend\n\nwhen flag clicked\nhide\n\n@BossPlatforms\n\nwhen flag clicked\ngo to x: (127) y: (-150)\nswitch costume to (slurp juice v)\nshow\n\nwhen I receive [nextlvl v]\nhide\n\nwhen flag clicked\nforever\n    if <(LVL) = [1]> then\n        if <touching (player v)?> then\n            hide\n            forever\n                if <(Health) < [200]> then\n                    wait (1) seconds\n                    change [health v] by (1)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [nextlvl v]\nif <(LVL) = [5]> then\n    go to x: (127) y: (-150)\n    switch costume to (chug jug v)\n    show\n    forever\n        if <touching (player v)?> then\n            hide\n            set [health v] to [199]\n        end\n    end\nend\n\nwhen I receive [animationdone v]\nshow\ngo to x: (-27) y: (-27)\nswitch costume to (90ingup v)\nchange y by (-300)\nglide (1.5) secs to x: (-27) y: (-27)\nwait (2) seconds\nswitch costume to (placefloor v)\nwait (0.4) seconds\nswitch costume to (editfloor v)\nwait (0.8) seconds\nswitch costume to (breakfloor v)\nwait (2) seconds\nswitch costume to (placefloorwaterfall v)\nwait (1) seconds\nswitch costume to (waterfall v)\n\n@Platforms\n\nwhen flag clicked\ngo to [back v] layer\nswitch costume to (lvl1 v)\ngo [backward v] (1) layers\n\nwhen I receive [nextlvl v]\nif <(LVL) = [8]> then\n    switch costume to (lvl1 v)\n    stop [this script v]\nend\nnext costume\n\n@PlayerBullets\n\nwhen flag clicked\nhide\nforever\n    if <(GoPlayer) = [1]> then\n        if <mouse down?> then\n            wait until <not <mouse down?>>\n            create clone of (_myself_ v)\n            wait (2) seconds\n        end\n    end\nend\n\nwhen I start as a clone\nswitch costume to (bullet v)\nset size to (100) %\nshow\ngo to (playergun&arms v)\npoint in direction ([direction v] of [playergun&arms v])\nrepeat until <<<<<touching (_edge_ v)?> or <touching (breakableplatforms v)?>> or <touching (platforms v)?>> or <touching (bossplatforms v)?>> or <touching (bots v)?>>\n    move (25) steps\nend\nwait (.0001) seconds\ndelete this clone\n\nwhen flag clicked\nforever\n    if <touching (bots v)?> then\n        set [botlive v] to [0]\n    end\nend\n\nwhen I receive [marshbotdie v]\nswitch costume to (marshbullet v)\ngo to (bots v)\nchange y by (-50)\nmove (10) steps\nshow\nwait (0.1) seconds\nhide\nstop [this script v]\n\nwhen I receive [marshbotdie v]\n\nhide\n\n@SpikeTraps\n\nwhen I receive [nextlvl v]\nwait (0.1) seconds\nif <(LVL) = [6]> then\n    show\n    switch costume to (lvl6neutral v)\n    repeat until <touching (player v)?>\n        if <touching (player v)?> then\n            switch costume to (lvl6attack v)\n            change [health v] by (-100)\n        end\n        wait (1) seconds\n        switch costume to (lvl6neutral v)\n    end\nend\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\nwhen flag clicked\nforever\n    if <not <touching (breakableplatforms v)?>> then\n        hide\n    end\n    if <touching (player v)?> then\n        switch costume to (lvl6attack v)\n        wait (2) seconds\n        switch costume to (lvl6neutral v)\n    end\n    if <not <touching (player v)?>> then\n        switch costume to (lvl6neutral v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (playerbullets v)?> then\n        hide\n    end\nend\n\n@Animation\n\nwhen flag clicked\nhide\nforever\n    if <(LVL) = [8]> then\n        go to x: (0) y: (0)\n        switch costume to (animation1 v)\n        show\n        repeat until <(costume [number v]) = [8]>\n            wait (1) seconds\n            next costume\n            if <(costume [number v]) = [8]> then\n                hide\n                broadcast (AnimationDone v)\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\n@Words\n\nwhen flag clicked\nswitch costume to (lvl1 v)\ngo to x: (100) y: (160)\n\nwhen I receive [nextlvl v]\nhide\nwait (0.1) seconds\nif <(costume [number v]) = [2]> then\n    go to x: (20) y: (160)\n    stop [this script v]\nend\n\nwhen I receive [nextlvl v]\ngo to x: (100) y: (160)\nnext costume\n\nwhen I receive [nextlvl v]\nwait (0.1) seconds\nif <(costume [number v]) = [12]> then\n    go to x: (20) y: (160)\n    stop [this script v]\nend\n\nwhen I receive [nextlvl v]\nwait (0.1) seconds\nif <(LVL) = [13]> then\n    hide\nend\n\nshow\n\nwhen flag clicked\nhide\n\n@Storm\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nmove (-500) steps\nshow\nrepeat until <touching (nextlvl v)?>\n    move (2) steps\n    if <<[11] < (StormTime)> and <(LVL) = [1]>> then\n        hide\n        stop [this script v]\n    end\n    if <[11] < (StormTime)> then\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nshow\nset [stormtime v] to [0]\nforever\n    wait (1) seconds\n    change [stormtime v] by (1)\nend\n\nwhen I receive [nextlvl v]\nforever\n    if <[15] < (StormTime)> then\n        if <(LVL) = [2]> then\n            go to x: (-460) y: (0)\n            show\n            repeat until <touching (nextlvl v)?>\n                move (1.1) steps\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [nextlvl v]\nforever\n    if <[30] < (StormTime)> then\n        if <(LVL) = [3]> then\n            go to x: (-460) y: (0)\n            show\n            repeat until <touching (nextlvl v)?>\n                move (1.1) steps\n            end\n        end\n    end\nend\n\nwhen I receive [nextlvl v]\nhide\n\nwhen I receive [nextlvl v]\nforever\n    if <[45] < (StormTime)> then\n        if <(LVL) = [4]> then\n            go to x: (-460) y: (0)\n            show\n            repeat until <touching (nextlvl v)?>\n                move (1.1) steps\n            end\n        end\n    end\nend\n\nwhen I receive [nextlvl v]\nforever\n    if <[60] < (StormTime)> then\n        if <(LVL) = [5]> then\n            go to x: (-460) y: (0)\n            show\n            repeat until <touching (nextlvl v)?>\n                move (1.1) steps\n            end\n        end\n    end\nend\n\nwhen I receive [nextlvl v]\nforever\n    if <[75] < (StormTime)> then\n        if <(LVL) = [6]> then\n            go to x: (-460) y: (0)\n            show\n            repeat until <touching (nextlvl v)?>\n                move (1.1) steps\n            end\n        end\n    end\nend\n\nwhen I receive [nextlvl v]\nforever\n    if <[90] < (StormTime)> then\n        if <(LVL) = [7]> then\n            go to x: (-460) y: (0)\n            show\n            repeat until <touching (nextlvl v)?>\n                move (1.1) steps\n            end\n        end\n    end\nend\n\nwhen I receive [nextlvl v]\nforever\n    if <[105] < (StormTime)> then\n        if <(LVL) = [8]> then\n            go to x: (-460) y: (0)\n            show\n            repeat until <touching (nextlvl v)?>\n                move (1.1) steps\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        broadcast (GameOver v)\n        stop [all v]\n    end\nend\n\nwhen I receive [gameover v]\nhide\n\nwhen I receive [win v]\nhide\n\nwhen flag clicked\nshow\n\n@NextLVL\n\nwhen flag clicked\nshow\nset [lvl v] to [1]\ngo to x: (238) y: (10)\nforever\n    if <touching (player v)?> then\n        broadcast (NextLVL v)\n        change [lvl v] by (1)\n        wait (0.5) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(LVL) = [8]> then\n        hide\n        stop [other scripts in sprite v]\n    end\nend\n\n