The Grassland ◈ Multiplayer Cloud Platformer v5.1

Instructions: Play Miner 1 first!! https://scratch.mit.edu/projects/486252650/\nPart 3 out now! https://scratch.mit.edu/projects/490894133/\nInstructions\nWAD/Arrow Keys to Move/Jump\nFurther instructions in instructions page.\nIn main menu, choose an option.\nTo show support leave a love and fave!\nstory is in game (instructions page), but i'll put it here too: In the last adventure, you explored into\na cave in search of the giant crystal.\nYou found it, but then, there was an \nearthquake, blocking the way we came.\nThe only way is to head deeper.\n------------------------------------------------------------------\ntop loved!\n#2 trending games! and #6 trending all :D\ncredits:\n@thecactusmaster and @KilluaXlikesGon for some coding and art\n@glizzygobbler765 for the lava\n@coltroc for the helmet and pickaxe\nmusic: unlimited\ncooltext.com for the logo\n#stories

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nplay sound [703408_Spaze---Believe v] until done\n\nwhen I receive [menu v]\nswitch backdrop to (backdrop2 v)\n\nwhen I receive [begin game v]\nwait (1.5) seconds\nset [game on/off v] to [1]\n\nwhen I receive [begin game v]\nwait (1) seconds\nplay sound [657416_Domyeah---End-the-Reign-Re v] until done\nif <not <(Level) > [8]>> then\n    play sound [657416_Domyeah---End-the-Reign-Re v] until done\nend\nif <not <(Level) > [8]>> then\n    play sound [657416_Domyeah---End-the-Reign-Re v] until done\nend\n\nwhen I receive [next v]\nwait (1) seconds\nstart sound [865364_Teminite-amp-MDK---Space-I v]\n\nwhen I receive [next 2 v]\nwait (1) seconds\nstart sound [718171_cYsmix---Classic-Pursuit v]\nif <not <(Level) > [20]>> then\n    play sound [718171_cYsmix---Classic-Pursuit v] until done\nend\nif <not <(Level) > [20]>> then\n    play sound [718171_cYsmix---Classic-Pursuit v] until done\nend\n\nwhen I receive [next3 v]\nwait (1) seconds\nstart sound [703408_Spaze---Believe2 v]\n\n@Sprite1\n\nwhen flag clicked\nswitch costume to (costume1 v)\nrepeat (12)\n    next costume\n    wait (0.08) seconds\nend\n\nwhen flag clicked\nshow\nset [ghost v] effect to (0)\nset size to (0) %\nrepeat (7)\n    change size by (10)\nend\nrepeat (30)\n    change size by (0.5)\nend\nrepeat (30)\n    change size by (0.5)\n    change [ghost v] effect by (3)\nend\nhide\n\n@Sprite2\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset [level v] to [0]\ngo to [front v] layer\nhide\nset [ghost v] effect to (100)\nwait (2) seconds\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (0.5) seconds\nbroadcast (Menu v)\nhide\n\nwhen I receive [begin game v]\nhide\nset [ghost v] effect to (100)\nwait (1) seconds\nshow\nrepeat (25)\n    change [ghost v] effect by (-4)\nend\nwait (9.8) seconds\nbroadcast (Start Dream I v)\nhide\n\nwhen I receive [start dream i v]\nforever\n    if <(Level) = [9]> then\n        stop all sounds\n        broadcast (Next v)\n        set [ghost v] effect to (100)\n        show\n        repeat (25)\n            change [ghost v] effect by (-4)\n        end\n        wait (2) seconds\n        change [level v] by (1)\n        broadcast (Start Dream II v)\n        hide\n        stop [this script v]\n    end\nend\n\nwhen I receive [start dream ii v]\nforever\n    if <(Level) = [16]> then\n        stop all sounds\n        broadcast (next 2 v)\n        set [ghost v] effect to (100)\n        show\n        repeat (25)\n            change [ghost v] effect by (-4)\n        end\n        wait (2) seconds\n        change [level v] by (1)\n        broadcast (start dream III v)\n        hide\n        stop [this script v]\n    end\nend\n\nwhen I receive [start dream iii v]\nforever\n    if <(Level) = [21]> then\n        stop all sounds\n        broadcast (next3 v)\n        set [ghost v] effect to (100)\n        show\n        repeat (25)\n            change [ghost v] effect by (-4)\n        end\n        wait (4) seconds\n        next costume\n        wait (0.2) seconds\n        next costume\n        wait (0.1) seconds\n        next costume\n        wait (3) seconds\n        set [level v] to [23]\n        broadcast (start bossfight sequence v)\n        hide\n        stop [this script v]\n    end\nend\n\n@Sprite5\n\nwhen I receive [menu v]\nshow\nforever\n    point in direction ((([sin v] of (rfvdcsx) ) * (3)) + (90))\n    change y by (([sin v] of (rfvdcsx) ) * (2))\n    change size by ([sin v] of (rfvdcsx) )\n    change [rfvdcsx v] by (10)\nend\n\nwhen flag clicked\ngo to x: (0) y: (100)\nhide\n\nwhen I receive [start dream i v]\nhide\nstop [other scripts in sprite v]\n\n@Sprite3\n\nwhen flag clicked\nset size to (100) %\nrepeat (5)\n    change size by (-19)\nend\nhide\n\nwhen I receive [menu v]\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset [color v] effect to (pick random (0) to (999))\ngo to x: (0) y: (0)\npoint in direction (pick random (-180) to (180))\nshow\nset size to (1) %\nrepeat until <touching (_edge_ v)?>\n    move ((size) / (12)) steps\n    change size by ((([abs v] of (x position) ) + ([abs v] of (y position) )) / (9))\n    if <(game on/off) = [1]> then\n        delete this clone\n    end\nend\nrepeat (2)\n    move ((size) / (10)) steps\n    change size by ((([abs v] of (x position) ) + ([abs v] of (y position) )) / (10))\n    if <(game on/off) = [1]> then\n        delete this clone\n    end\nend\ndelete this clone\n\nwhen I receive [begin game v]\nwait (1.5) seconds\nstop [other scripts in sprite v]\n\n@Sprite4\n\nwhen flag clicked\nset [game on/off v] to [0]\nset size to (100) %\nhide\n\nwhen I receive [menu v]\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        repeat (5)\n            change size by (3)\n            if <mouse down?> then\n                stop all sounds\n                broadcast (Begin Game v)\n            end\n        end\n        repeat (3)\n            change size by (2)\n            if <mouse down?> then\n                stop all sounds\n                broadcast (Begin Game v)\n            end\n        end\n        repeat (2)\n            change size by (1)\n            if <mouse down?> then\n                stop all sounds\n                broadcast (Begin Game v)\n            end\n        end\n        repeat until <not <touching (mouse-pointer v)?>>\n            if <mouse down?> then\n                stop all sounds\n                broadcast (Begin Game v)\n            end\n        end\n        repeat (5)\n            change size by (-3)\n        end\n        repeat (3)\n            change size by (-2)\n        end\n        repeat (2)\n            change size by (-1)\n        end\n    end\nend\n\nwhen I receive [begin game v]\nset size to (100) %\nstop [other scripts in sprite v]\n\nwhen I receive [start dream i v]\nhide\n\n@Sprite6\n\nwhen I receive [begin game v]\nwait (6) seconds\nswitch costume to (costume2 v)\ngo to [front v] layer\nshow\nset [ghost v] effect to (0)\nset size to (0) %\nrepeat (7)\n    change size by (10)\nend\nrepeat (80)\n    change size by (0.5)\nend\nrepeat (50)\n    change size by (0.5)\n    change [ghost v] effect by (2)\nend\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [next v]\nwait (1.2) seconds\ngo to [front v] layer\nshow\nswitch costume to (costume3 v)\nset [ghost v] effect to (0)\nset size to (0) %\nrepeat (7)\n    change size by (10)\nend\nrepeat (10)\n    change size by (0.5)\nend\nrepeat (40)\n    change size by (0.5)\n    change [ghost v] effect by (2)\nend\nhide\n\nwhen I receive [start dream ii v]\nwait until <(Level) = [15]>\ngo to [front v] layer\nshow\nswitch costume to (costume4 v)\nset [ghost v] effect to (0)\nset size to (0) %\nrepeat (7)\n    change size by (10)\nend\nrepeat (50)\n    change size by (0.5)\n    change [ghost v] effect by (2)\nend\nhide\n\nwhen I receive [next 2 v]\nwait (1.2) seconds\ngo to [front v] layer\nshow\nswitch costume to (costume5 v)\nset [ghost v] effect to (0)\nset size to (0) %\nrepeat (7)\n    change size by (10)\nend\nrepeat (5)\n    change size by (0.5)\nend\nrepeat (35)\n    change size by (0.5)\n    change [ghost v] effect by (2)\nend\nhide\n\nwhen I receive [next3 v]\nwait (1.8) seconds\ngo to [front v] layer\nshow\nswitch costume to (costume6 v)\nset [ghost v] effect to (0)\nset size to (0) %\nrepeat (7)\n    change size by (10)\nend\nrepeat (180)\n    change size by (0.5)\nend\nrepeat (45)\n    change size by (0.5)\n    change [ghost v] effect by (2)\nend\nhide\n\nwhen I receive [next3 v]\nwait (4.5) seconds\nnext costume\nrepeat (12)\n    next costume\n    wait (0.1) seconds\nend\nwait (0.8) seconds\nhide\n\n@Sprite7\n\nwhen flag clicked\nforever\n    if <touching color (#00ffff)?> then\n        play sound [bubbles v] until done\n    end\nend\n\nwhen I receive [start dream i v]\nforever\n    if <touching color (#ff0000)?> then\n        broadcast (oof v)\n        start sound [med-rifle v]\n        go to x: (-210) y: (0)\n        set [y vel v] to [0]\n    end\n    if <(x position) > [235]> then\n        broadcast (next level v)\n        start sound [Laser Sound Effect-2 v]\n        go to x: (-202) y: (0)\n        change [level v] by (1)\n    end\nend\n\nwhen I receive [start dream i v]\nset volume to (100) %\nset size to (50) %\nswitch costume to (costume1 v)\nset [x vel v] to [0]\nset [y vel v] to [0]\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        switch costume to (costume2 v)\n        change [x vel v] by (1)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        switch costume to (costume3 v)\n        change [x vel v] by (-1)\n    end\n    set [x vel v] to ((x vel) * (0.9))\n    change x by (x vel)\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (1)\n                        if <touching color (#000000)?> then\n                            change x by ((x vel) * (-1))\n                            change y by (-5)\n                            if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n                                if <(x vel) = [0]> then\n                                    set [x vel v] to [-5]\n                                else\n                                    set [x vel v] to [5]\n                                end\n                                set [y vel v] to [10]\n                            else\n                                set [x vel v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y vel v] by (-1)\n    change y by (y vel)\n    if <touching color (#000000)?> then\n        change y by ((y vel) * (-1))\n        set [y vel v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#000000)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [y vel v] to [13]\n            start sound [Whoosh sound effects \(from the tutorial\) v]\n        end\n    end\n    if <touching color (#38fff5)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [y vel v] to [8]\n        else\n            set [y vel v] to [-1.5]\n        end\n    end\n    \n        start sound [quick dash v]\n        set [y vel v] to [24]\n    end\n    if <touching color (#de59af)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [y vel v] to [13]\n            start sound [quick dash v]\n        end\n    end\n    change y by (1)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [start dream i v]\nrepeat (5)\n    go to x: (-202) y: (0)\nend\nshow\n\nwhen I receive [start dream i v]\nforever\n    if <(Level) = [9]> then\n        hide\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\nwhen I receive [start dream i v]\nforever\n    if <key (r v) pressed?> then\n        go to x: (-202) y: (0)\n    end\nend\n\n@BG\n\nwhen flag clicked\nset [brightness v] effect to (0)\ngo to x: (0) y: (0)\ngo to [back v] layer\nhide\n\nwhen I receive [start dream i v]\nshow\n\nwhen I receive [next level v]\nchange x by (-4)\n\nwhen I receive [next v]\nwait (1.5) seconds\nhide\n\n@platforms\n\nwhen flag clicked\nhide\n\nwhen I receive [start dream i v]\nswitch costume to (costume1 v)\nset [level v] to [1]\nshow\n\nwhen I receive [next level v]\nnext costume\nwait (0.001) seconds\nif <(Level) = [9]> then\n    switch costume to (costume8 v)\nend\n\nwhen I receive [next v]\nwait (1.5) seconds\nhide\n\n@Sprite8\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\ngo to [back v] layer\ngo [forward v] (4) layers\nswitch costume to (pick random (1) to (3))\nset size to (pick random (20) to (90)) %\ngo to x: (-270) y: (pick random (-20) to (80))\nshow\nrepeat (15)\n    change x by ((size) / (5))\nend\nrepeat until <touching (_edge_ v)?>\n    change x by ((size) / (5))\nend\nrepeat (3)\n    change x by ((size) / (5))\nend\ndelete this clone\n\nwhen I receive [start dream i v]\nrepeat until <(Level) = [9]>\n    create clone of (_myself_ v)\n    wait (0.18) seconds\nend\n\n@Sprite9\n\nwhen I receive [start dream i v]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(Level) = [1]> then\n    go to [front v] layer\n    switch costume to (costume2 v)\n    set size to (125) %\n    show\n    go to x: (170) y: (137)\n    repeat until <not <(Level) = [1]>>\n        turn left (5) degrees\n    end\n    delete this clone\nend\nif <(Level) = [2]> then\n    switch costume to (costume3 v)\n    set size to (100) %\n    show\n    go to x: (0) y: (-40)\n    repeat until <not <(Level) = [2]>>\n        turn right (4) degrees\n    end\n    delete this clone\nend\nif <(Level) = [3]> then\n    point in direction (90)\n    switch costume to (costume4 v)\n    set size to (75) %\n    show\n    go to x: (-150) y: (80)\n    repeat until <not <(Level) = [3]>>\n        repeat (15)\n            change y by (2)\n            if <not <(Level) = [3]>> then\n                delete this clone\n            end\n        end\n        repeat (5)\n            change y by (1)\n            if <not <(Level) = [3]>> then\n                delete this clone\n            end\n        end\n        wait (0.2) seconds\n        repeat (15)\n            change y by (-2)\n            if <not <(Level) = [3]>> then\n                delete this clone\n            end\n        end\n        repeat (5)\n            change y by (-1)\n            if <not <(Level) = [3]>> then\n                delete this clone\n            end\n        end\n        wait (0.2) seconds\n    end\n    delete this clone\nend\nif <(Level) = [4]> then\n    point in direction (90)\n    switch costume to (costume5 v)\n    set size to (50) %\n    show\n    go to x: (100) y: (-40)\n    repeat until <not <(Level) = [4]>>\n        repeat (30)\n            change x by (-3.5)\n            if <not <(Level) = [4]>> then\n                delete this clone\n            end\n        end\n        repeat (10)\n            change x by (-1.5)\n            if <not <(Level) = [4]>> then\n                delete this clone\n            end\n        end\n        wait (0.1) seconds\n        repeat (30)\n            change x by (3.5)\n            if <not <(Level) = [4]>> then\n                delete this clone\n            end\n        end\n        repeat (10)\n            change x by (1.5)\n            if <not <(Level) = [4]>> then\n                delete this clone\n            end\n        end\n        wait (0.1) seconds\n    end\n    delete this clone\nend\nif <(Level) = [5]> then\n    point in direction (90)\n    switch costume to (costume1 v)\n    set size to (85) %\n    show\n    go to x: (105) y: (-36)\n    repeat until <not <(Level) = [5]>>\n        repeat (10)\n            change y by (4)\n            if <not <(Level) = [5]>> then\n                delete this clone\n            end\n        end\n        repeat (4)\n            change y by (2)\n            if <not <(Level) = [5]>> then\n                delete this clone\n            end\n        end\n        wait (0.1) seconds\n        repeat (10)\n            change y by (-4)\n            if <not <(Level) = [5]>> then\n                delete this clone\n            end\n        end\n        repeat (4)\n            change y by (-2)\n            if <not <(Level) = [5]>> then\n                delete this clone\n            end\n        end\n        wait (0.1) seconds\n    end\n    delete this clone\nend\nif <(Level) = [6]> then\n    point in direction (90)\n    switch costume to (costume1 v)\n    set size to (135) %\n    show\n    go to x: (260) y: (pick random (-60) to (-90))\n    repeat (15)\n        change x by (-7)\n        if <not <(Level) = [6]>> then\n            delete this clone\n        end\n    end\n    repeat until <touching (_edge_ v)?>\n        change x by (-7)\n        if <not <(Level) = [6]>> then\n            delete this clone\n        end\n    end\n    repeat (7)\n        change x by (-7)\n        if <not <(Level) = [6]>> then\n            delete this clone\n        end\n    end\n    delete this clone\nend\nif <(Level) = [10]> then\n    point in direction (90)\n    switch costume to (costume6 v)\n    set size to (110) %\n    show\n    go to x: (166) y: (142)\n    repeat until <not <(Level) = [10]>>\n        turn left (3) degrees\n    end\n    delete this clone\nend\nif <(Level) = [13]> then\n    go to [front v] layer\n    switch costume to (costume2 v)\n    set size to (90) %\n    show\n    go to x: (106) y: (-2)\n    repeat until <not <(Level) = [13]>>\n        turn left (5) degrees\n    end\n    delete this clone\nend\n\nwhen I receive [next level v]\nif <(Level) = [2]> then\n    create clone of (_myself_ v)\nend\nif <(Level) = [3]> then\n    create clone of (_myself_ v)\nend\nif <(Level) = [4]> then\n    create clone of (_myself_ v)\nend\nif <(Level) = [5]> then\n    create clone of (_myself_ v)\nend\nif <(Level) = [6]> then\n    repeat until <not <(Level) = [6]>>\n        create clone of (_myself_ v)\n        wait (0.85) seconds\n    end\nend\nif <(Level) = [13]> then\n    create clone of (_myself_ v)\nend\n\nwhen I receive [start dream ii v]\ncreate clone of (_myself_ v)\n\n@BG2\n\nwhen flag clicked\nset [brightness v] effect to (0)\ngo to x: (0) y: (0)\ngo to [back v] layer\nhide\n\nwhen I receive [start dream ii v]\nshow\n\nwhen I receive [next v]\nwait (1.5) seconds\nhide\n\nwhen I receive [next 2 v]\nwait (1.5) seconds\nhide\n\n@platforms2\n\nwhen flag clicked\nhide\n\nwhen I receive [start dream ii v]\nswitch costume to (costume1 v)\nset [level v] to [10]\nshow\n\nwhen I receive [next v]\nwait (1.5) seconds\nhide\n\nwhen I receive [next level v]\nnext costume\n\nwhen I receive [next 2 v]\nwait (1.5) seconds\nhide\n\n@Sprite11\n\nwhen flag clicked\nhide\n\nwhen I receive [start dream ii v]\nwait until <(Level) = [14]>\ngo to x: (176) y: (118)\nshow\nswitch costume to (costume1 v)\ngo to [front v] layer\nset size to (90) %\nrepeat until <not <(Level) = [14]>>\n    repeat (8)\n        repeat (6)\n            change x by (-8)\n        end\n        create clone of (_myself_ v)\n    end\n    repeat (8)\n        repeat (6)\n            change x by (8)\n        end\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo to [front v] layer\ngo [backward v] (2) layers\nswitch costume to (costume2 v)\nset size to (60) %\nrepeat until <<touching color (#000000)?> or <touching (_edge_ v)?>>\n    change y by (-15)\nend\ndelete this clone\n\nwhen I receive [start dream ii v]\nwait until <(Level) = [15]>\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [start dream ii v]\nwait until <(Level) = [14]>\nrepeat until <not <(Level) = [14]>>\n    repeat (10)\n        change y by (-2)\n    end\n    repeat (10)\n        change y by (2)\n    end\nend\n\n@Sprite12\n\nwhen flag clicked\nhide\n\nwhen I receive [start dream ii v]\nwait until <(Level) = [15]>\nshow\nrepeat until <not <(Level) = [15]>>\n    point towards (sprite15 v)\nend\n\nwhen I receive [start dream ii v]\nwait until <(Level) = [16]>\nhide\nstop [other scripts in sprite v]\n\n@Sprite13\n\nwhen flag clicked\nhide\n\nwhen I receive [start dream ii v]\nwait until <(Level) = [15]>\nswitch costume to (costume1 v)\nshow\ngo to [front v] layer\nrepeat until <not <(Level) = [15]>>\n    wait (2) seconds\n    repeat (4)\n        broadcast (FIREEE! v)\n        repeat (2)\n            move (-10) steps\n        end\n        repeat (5)\n            move (4) steps\n        end\n    end\nend\n\nwhen I receive [start dream ii v]\nwait until <(Level) = [15]>\nrepeat until <not <(Level) = [15]>>\n    point towards (sprite15 v)\nend\n\nwhen I receive [start dream ii v]\nwait until <(Level) = [16]>\nhide\nstop [other scripts in sprite v]\n\n@Sprite14\n\nwhen flag clicked\nhide\n\nwhen I receive [fireee! v]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\ngo to (sprite13 v)\ngo to [front v] layer\ngo [backward v] (4) layers\npoint towards (sprite15 v)\nshow\nrepeat (8)\n    move (17) steps\nend\nrepeat until <touching (_edge_ v)?>\n    move (17) steps\nend\ndelete this clone\n\n@Sprite15\n\nwhen flag clicked\nforever\n    if <touching color (#00ffff)?> then\n        play sound [bubbles v] until done\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [start dream ii v]\nforever\n    if <touching color (#ff0000)?> then\n        broadcast (oof v)\n        start sound [med-rifle v]\n        go to x: (-202) y: (-30)\n        set [y vel v] to [0]\n    end\n    if <(x position) > [235]> then\n        broadcast (next level v)\n        start sound [Laser Sound Effect-2 v]\n        go to x: (-202) y: (-30)\n        change [level v] by (1)\n    end\nend\n\nwhen I receive [start dream ii v]\nrepeat (5)\n    go to x: (-202) y: (-30)\nend\nshow\n\nwhen I receive [start dream ii v]\nset volume to (100) %\nset size to (65) %\nswitch costume to (costume1 v)\nset [x vel v] to [0]\nset [y vel v] to [0]\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [x vel v] by (1.2)\n    end\n    if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n        change [x vel v] by (-1.2)\n    end\n    set [x vel v] to ((x vel) * (0.8))\n    change x by (x vel)\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (1)\n                        if <touching color (#000000)?> then\n                            change x by ((x vel) * (-1))\n                            change y by (-5)\n                            if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n                                if <(x vel) = [0]> then\n                                    set [x vel v] to [-5]\n                                else\n                                    set [x vel v] to [5]\n                                end\n                                set [y vel v] to [10]\n                            else\n                                set [x vel v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y vel v] by (-1)\n    change y by (y vel)\n    if <touching color (#000000)?> then\n        change y by ((y vel) * (-1))\n        set [y vel v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#000000)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [y vel v] to [10]\n            start sound [Whoosh sound effects \(from the tutorial\) v]\n        end\n    end\n    if <touching color (#38fff5)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [y vel v] to [8]\n        else\n            set [y vel v] to [-1.5]\n        end\n    end\n    if <touching color (#ff8d00)?> then\n        start sound [quick dash v]\n        set [y vel v] to [16]\n    end\n    if <touching color (#de59af)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [y vel v] to [10]\n            start sound [quick dash v]\n        end\n    end\n    change y by (1)\nend\n\nwhen I receive [start dream ii v]\nforever\n    if <(Level) = [16]> then\n        hide\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\nwhen I receive [start dream ii v]\nforever\n    if <key (r v) pressed?> then\n        go to x: (-202) y: (-30)\n    end\nend\n\n@BG3\n\nwhen flag clicked\nset [brightness v] effect to (0)\ngo to x: (0) y: (0)\ngo to [back v] layer\nhide\n\nwhen I receive [start dream iii v]\ngo to [back v] layer\nshow\n\nwhen I receive [next3 v]\nwait (1.5) seconds\nhide\n\n@platforms3\n\nwhen flag clicked\nhide\n\nwhen I receive [start dream iii v]\nswitch costume to (costume7 v)\nset [level v] to [16]\nshow\n\nwhen I receive [next level v]\nnext costume\n\nwhen I receive [next3 v]\nwait (1.5) seconds\nhide\n\n@Sprite16\n\nwhen flag clicked\nforever\n    if <touching color (#00ffff)?> then\n        play sound [bubbles v] until done\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [start dream iii v]\nforever\n    if <touching color (#ff0000)?> then\n        broadcast (oof v)\n        start sound [med-rifle v]\n        go to x: (-202) y: (-30)\n        set [y vel v] to [0]\n    end\n    if <(x position) > [235]> then\n        broadcast (next level v)\n        start sound [Laser Sound Effect-2 v]\n        go to x: (-202) y: (-30)\n        change [level v] by (1)\n    end\nend\n\nwhen I receive [start dream iii v]\nrepeat (5)\n    go to x: (-202) y: (-30)\nend\nshow\n\nwhen I receive [start dream iii v]\nset volume to (100) %\nset size to (75) %\nswitch costume to (costume1 v)\nset [x vel v] to [0]\nset [y vel v] to [0]\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [x vel v] by (1.2)\n    end\n    if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n        change [x vel v] by (-1.2)\n    end\n    set [x vel v] to ((x vel) * (0.85))\n    change x by (x vel)\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (1)\n                        if <touching color (#000000)?> then\n                            change x by ((x vel) * (-1))\n                            change y by (-5)\n                            if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n                                if <(x vel) = [0]> then\n                                    set [x vel v] to [-5]\n                                else\n                                    set [x vel v] to [5]\n                                end\n                                set [y vel v] to [10]\n                            else\n                                set [x vel v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y vel v] by (-1)\n    change y by (y vel)\n    if <touching color (#000000)?> then\n        change y by ((y vel) * (-1))\n        set [y vel v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#000000)?> then\n        if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n            set [y vel v] to [11.5]\n            start sound [Whoosh sound effects \(from the tutorial\) v]\n        end\n    end\n    if <touching color (#38fff5)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [y vel v] to [8]\n        else\n            set [y vel v] to [-1.5]\n        end\n    end\n    if <touching color (#ff8d00)?> then\n        start sound [quick dash v]\n        set [y vel v] to [17]\n    end\n    if <touching color (#de59af)?> then\n        if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n            set [y vel v] to [11.5]\n            start sound [quick dash v]\n        end\n    end\n    change y by (1)\nend\n\nwhen I receive [start dream iii v]\nforever\n    if <(Level) = [21]> then\n        hide\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\nwhen I receive [start dream iii v]\nforever\n    if <key (r v) pressed?> then\n        go to x: (-202) y: (-30)\n    end\nend\n\n@Sprite10\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\ngo to [back v] layer\ngo [forward v] (4) layers\nswitch costume to (pick random (1) to (2))\nset size to (pick random (10) to (100)) %\ngo to x: (pick random (250) to (280)) y: (pick random (170) to (190))\npoint in direction (pick random (-90) to (-120))\nshow\nrepeat (15)\n    move ((size) / (3)) steps\nend\nrepeat until <touching (_edge_ v)?>\n    move ((size) / (3)) steps\nend\nrepeat (3)\n    move ((size) / (3)) steps\nend\ndelete this clone\n\nwhen I receive [start dream iii v]\nrepeat until <(Level) = [21]>\n    create clone of (_myself_ v)\n    wait (0.1) seconds\nend\n\n@Sprite17\n\nwhen I receive [fight bacc? v]\nstop [other scripts in sprite v]\nstop all sounds\nplay sound [865364_Teminite-amp-MDK---Space-I4 v] until done\n\nwhen flag clicked\nhide\n\nwhen I receive [start bossfight sequence v]\nplay sound [865364_Teminite-amp-MDK---Space-I2 v] until done\nforever\n    play sound [865364_Teminite-amp-MDK---Space-I3 v] until done\nend\n\nwhen I receive [arm boss v]\nwait (6) seconds\nbroadcast (show boss v)\n\n@Sprite30\n\nwhen flag clicked\nset [brightness v] effect to (0)\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [start bossfight sequence v]\nset [brightness v] effect to (-100)\ngo to [back v] layer\nshow\nwait (14.3) seconds\nrepeat (5)\n    change [brightness v] effect by (40)\nend\nwait (0.5) seconds\nswitch costume to (costume2 v)\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\n\nwhen I receive [arm boss v]\n\nwhen I receive [the king is dedededed!! v]\nwait (5.7) seconds\nhide\nstop [other scripts in sprite v]\n\n@Sprite31\n\nwhen I receive [start bossfight sequence v]\ngo to x: (-320) y: (0)\nswitch costume to (costume1 v)\nshow\nrepeat (3)\n    repeat (9)\n        change x by (30)\n    end\n    repeat (60)\n        change x by (1)\n    end\n    repeat (12)\n        change x by (30)\n    end\n    hide\n    wait (1.1) seconds\n    go to x: (-320) y: (0)\n    next costume\n    show\nend\nrepeat (9)\n    change x by (30)\nend\nrepeat (60)\n    change x by (1)\nend\nrepeat (12)\n    change x by (30)\nend\nhide\n\nwhen flag clicked\nhide\n\n@Sprite32\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset [brightness v] effect to (0)\nhide\n\nwhen I receive [start bossfight sequence v]\ngo to [front v] layer\nwait (19) seconds\nshow\nset [brightness v] effect to (100)\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\n\nwhen I receive [show boss v]\nwait (1.2) seconds\nswitch costume to (costume2 v)\n\nwhen I receive [next level v]\nif <(Level) > [22]> then\n    next costume\n    if <(costume [number v]) = [4]> then\n        broadcast (fight bacc? v)\n    end\nend\n\nwhen I receive [fighhet bbebgamck! v]\nswitch costume to (costume5 v)\n\nwhen I receive [the king is dedededed!! v]\nwait (5.7) seconds\nhide\nstop [other scripts in sprite v]\n\n@Sprite33\n\nforever\n    if <(Level) = [21]> then\n        hide\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\nwhen I receive [start bossfight sequence v]\nwait (23) seconds\nbroadcast (Arm Boss v)\n\nwhen I receive [begin attack sequence v]\ngo to [front v] layer\n\nwhen I receive [fighhet bbebgamck! v]\nset [y vel v] to [0]\nswitch costume to (costume2 v)\nrepeat (10)\n    go to x: (0) y: (-83)\nend\n\nwhen I receive [the king is dedededed!! v]\nwait (5.7) seconds\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [start bossfight sequence v]\nwait (22) seconds\nforever\n    if <key (r v) pressed?> then\n        go to x: (-202) y: (-30)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#00ffff)?> then\n        play sound [bubbles v] until done\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [start bossfight sequence v]\nwait (22) seconds\nforever\n    if <touching color (#ff0000)?> then\n        broadcast (oof v)\n        start sound [med-rifle v]\n        go to x: (-202) y: (-30)\n        set [y vel v] to [0]\n    end\n    if <(x position) > [235]> then\n        broadcast (next level v)\n        start sound [Laser Sound Effect-2 v]\n        go to x: (-202) y: (-30)\n        change [level v] by (1)\n    end\nend\n\nwhen I receive [start bossfight sequence v]\nwait (22) seconds\nrepeat (5)\n    go to x: (-131) y: (-75)\nend\nshow\n\nwhen I receive [start bossfight sequence v]\nwait (22) seconds\nset volume to (100) %\nset size to (75) %\nswitch costume to (costume1 v)\nset [x vel v] to [0]\nset [y vel v] to [0]\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [x vel v] by (1.2)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [x vel v] by (-1.2)\n    end\n    set [x vel v] to ((x vel) * (0.85))\n    change x by (x vel)\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (1)\n                        if <touching color (#000000)?> then\n                            change x by ((x vel) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                if <(x vel) = [0]> then\n                                    set [x vel v] to [-5]\n                                else\n                                    set [x vel v] to [5]\n                                end\n                                set [y vel v] to [10]\n                            else\n                                set [x vel v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y vel v] by (-1)\n    change y by (y vel)\n    if <touching color (#000000)?> then\n        change y by ((y vel) * (-1))\n        set [y vel v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#000000)?> then\n        if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n            set [y vel v] to [11.5]\n            start sound [Whoosh sound effects \(from the tutorial\) v]\n        end\n    end\n    if <touching color (#38fff5)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [y vel v] to [8]\n        else\n            set [y vel v] to [-1.5]\n        end\n    end\n    if <touching color (#ff8d00)?> then\n        start sound [quick dash v]\n        set [y vel v] to [17]\n    end\n    if <touching color (#de59af)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [y vel v] to [11.5]\n            start sound [quick dash v]\n        end\n    end\n    change y by (1)\nend\n\nwhen I receive [start bossfight sequence v]\nwait (22) seconds\n\n@Sprite34\n\nwhen flag clicked\nchange [brightness v] effect by (10)\nhide\n\nwhen I receive [arm boss v]\ngo to [front v] layer\nswitch costume to (costume1 v)\ngo to x: (0) y: (300)\nshow\nrepeat (10)\n    change y by (-4)\nend\nrepeat (5)\n    change y by (-3)\nend\nrepeat (3)\n    change y by (-2)\nend\nrepeat (2)\n    change y by (-1)\nend\nset [boss hp v] to [80]\nrepeat (8)\n    next costume\n    wait (0.05) seconds\nend\n\nwhen I receive [fighhet bbebgamck! v]\nforever\n    if <(BOSS HP) > [70]> then\n        switch costume to (costume8 v)\n    end\n    if <<(BOSS HP) > [60]> and <(BOSS HP) < [70]>> then\n        switch costume to (costume7 v)\n    end\n    if <<(BOSS HP) > [50]> and <(BOSS HP) < [60]>> then\n        switch costume to (costume6 v)\n    end\n    if <<(BOSS HP) > [40]> and <(BOSS HP) < [50]>> then\n        switch costume to (costume5 v)\n    end\n    if <<(BOSS HP) > [30]> and <(BOSS HP) < [40]>> then\n        switch costume to (costume4 v)\n    end\n    if <<(BOSS HP) > [20]> and <(BOSS HP) < [30]>> then\n        switch costume to (costume3 v)\n    end\n    if <<(BOSS HP) > [10]> and <(BOSS HP) < [20]>> then\n        switch costume to (costume2 v)\n    end\n    if <<(BOSS HP) > [0]> and <(BOSS HP) < [10]>> then\n        switch costume to (costume9 v)\n    end\n    if <(BOSS HP) = [0]> then\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [the king is dedededed!! v]\nwait (1) seconds\nhide\nstop [other scripts in sprite v]\n\n@Sprite35\n\nwhen flag clicked\nset size to (60) %\nhide\n\nwhen I receive [show boss v]\nshow\nset size to (60) %\nforever\n    turn right (5) degrees\nend\n\nwhen I receive [show boss v]\ngo to x: (0) y: (300)\nrepeat (7)\n    change y by (-20)\nend\nrepeat (5)\n    change y by (-10)\nend\nrepeat (4)\n    change y by (-5)\nend\nrepeat (3)\n    change y by (-3)\nend\nrepeat (4)\n    change y by (-1)\nend\nwait (0.2) seconds\nbroadcast (begin attack sequence v)\n\nwhen I receive [begin attack sequence v]\nforever\n    glide (0.5) secs to x: (pick random (-200) to (200)) y: (pick random (-80) to (140))\n    broadcast (SHOOT SHOOT v)\n    wait (1.3) seconds\nend\n\nwhen I receive [fighhet bbebgamck! v]\ngo to x: (167) y: (69)\nset [boss hp v] to [80]\nrepeat until <(BOSS HP) < [1]>\n    repeat (60)\n        change x by (-6)\n    end\n    repeat (60)\n        change x by (6)\n    end\nend\n\nwhen I receive [fighhet bbebgamck! v]\nrepeat until <(BOSS HP) < [1]>\n    repeat (10)\n        change y by (3)\n    end\n    repeat (5)\n        change y by (2)\n    end\n    repeat (3)\n        change y by (1)\n    end\n    repeat (3)\n        change y by (-1)\n    end\n    repeat (5)\n        change y by (-2)\n    end\n    repeat (10)\n        change y by (-3)\n    end\n    repeat (10)\n        change y by (-3)\n    end\n    repeat (5)\n        change y by (-2)\n    end\n    repeat (3)\n        change y by (-1)\n    end\n    repeat (3)\n        change y by (1)\n    end\n    repeat (5)\n        change y by (2)\n    end\n    repeat (10)\n        change y by (3)\n    end\nend\n\nwhen I receive [fighhet bbebgamck! v]\nrepeat until <(BOSS HP) < [1]>\n    if <touching (sprite44 v)?> then\n        change [boss hp v] by (-1)\n    end\n    wait (0.04) seconds\nend\nbroadcast (THE KING IS DEDEDEDED!! v)\nstop all sounds\n\nwhen I receive [fight bacc? v]\nstop [other scripts in sprite v]\n\nwhen I receive [the king is dedededed!! v]\nstart sound [Boom Cloud v]\nrepeat (25)\n    change size by (2)\n    change [brightness v] effect by (4)\n    change [ghost v] effect by (4)\nend\nhide\nwait (1) seconds\nstop [other scripts in sprite v]\n\n@Sprite36\n\nwhen flag clicked\nset size to (55) %\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nset size to (55) %\nhide\n\nwhen I receive [show boss v]\nshow\nforever\n    go to (sprite35 v)\nend\n\nwhen I receive [the king is dedededed!! v]\nrepeat (25)\n    change size by (2)\n    change [brightness v] effect by (4)\n    change [ghost v] effect by (4)\nend\nhide\nwait (1) seconds\nstop [other scripts in sprite v]\n\n@Sprite37\n\nwhen flag clicked\nswitch costume to (costume1 v)\npoint in direction (90)\nhide\n\nwhen I receive [show boss v]\nshow\nforever\n    go to (sprite35 v)\nend\n\nwhen I receive [show boss v]\nshow\nforever\n    turn left (3) degrees\nend\n\nwhen I receive [show boss v]\nforever\n    set [direction1 v] to (direction)\nend\n\nwhen I receive [the king is dedededed!! v]\nhide\n\n@Sprite38\n\nwhen flag clicked\nhide\n\nwhen I receive [show boss v]\nshow\nforever\n    go to (sprite35 v)\nend\n\nwhen I receive [show boss v]\npoint in direction (-90)\nforever\n    turn right (3) degrees\nend\n\nwhen I receive [show boss v]\nforever\n    set [direction2 v] to (direction)\nend\n\nwhen I receive [the king is dedededed!! v]\nhide\n\n@Sprite39\n\nwhen flag clicked\npoint in direction (180)\nhide\n\nwhen I receive [show boss v]\nforever\n    go to (sprite35 v)\nend\n\nwhen I receive [show boss v]\nshow\nforever\n    turn left (1) degrees\nend\n\nwhen I receive [show boss v]\nforever\n    set [direction3 v] to (direction)\nend\n\nwhen I receive [the king is dedededed!! v]\nhide\n\n@Sprite40\n\nwhen I receive [shoot shoot v]\nrepeat (3)\n    create clone of (_myself_ v)\n    repeat (2)\n        move (-5) steps\n    end\n    repeat (10)\n        move (1) steps\n    end\nend\n\nwhen I start as a clone\ngo to (sprite37 v)\npoint in direction (direction1)\nswitch costume to (costume2 v)\ngo to [front v] layer\ngo [backward v] (8) layers\nshow\nrepeat until <touching (_edge_ v)?>\n    move (15) steps\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [arm boss v]\n\n@Sprite41\n\nwhen I receive [shoot shoot v]\nrepeat (3)\n    create clone of (_myself_ v)\n    repeat (2)\n        move (-5) steps\n    end\n    repeat (10)\n        move (1) steps\n    end\nend\n\nwhen I start as a clone\ngo to (sprite38 v)\npoint in direction (direction2)\nswitch costume to (costume2 v)\ngo to [front v] layer\ngo [backward v] (8) layers\nshow\nrepeat until <touching (_edge_ v)?>\n    move (15) steps\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\n@Sprite42\n\nwhen I receive [shoot shoot v]\nrepeat (3)\n    create clone of (_myself_ v)\n    repeat (2)\n        move (-5) steps\n    end\n    repeat (10)\n        move (1) steps\n    end\nend\n\nwhen I start as a clone\ngo to (sprite38 v)\npoint in direction (direction3)\nswitch costume to (costume2 v)\ngo to [front v] layer\ngo [backward v] (8) layers\nshow\nrepeat until <touching (_edge_ v)?>\n    move (7) steps\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\n@Sprite43\n\nwhen flag clicked\nhide\n\nwhen I receive [fight bacc? v]\nset [brightness v] effect to (0)\nswitch costume to (costume1 v)\ngo to [front v] layer\nshow\nwait (0.7) seconds\nrepeat (8)\n    next costume\n    wait (0.05) seconds\nend\nwait (1) seconds\nrepeat (25)\n    change [brightness v] effect by (4)\nend\nwait (0.7) seconds\nbroadcast (FIGHHET BBEBGAMCK! v)\nhide\n\nwhen I receive [the king is dedededed!! v]\nwait (4) seconds\nset [ghost v] effect to (100)\nswitch costume to (costume10 v)\nshow\nrepeat (25)\n    change [ghost v] effect by (-4)\nend\nwait (1) seconds\nset [brightness v] effect to (0)\nstart sound [703408_Spaze---Believe v]\nswitch costume to (costume11 v)\n\n@Sprite44\n\nwhen I receive [fighhet bbebgamck! v]\nwait (0.1) seconds\nrepeat until <(BOSS HP) = [0]>\n    create clone of (_myself_ v)\n    wait (0.1) seconds\nend\n\nwhen I start as a clone\ngo to (sprite33 v)\npoint in direction (90)\nswitch costume to (costume1 v)\ngo to [front v] layer\ngo [backward v] (9) layers\nshow\nrepeat until <touching (_edge_ v)?>\n    change y by (10)\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\n@Sprite18\n\nwhen flag clicked\nhide\n\n