~LAVA~ A Platformer
@Stage\n\nwhen I receive [play game v]\nforever\n    if <not <(Level) = [5]>> then\n        play sound [500_Chunks_A_Minecraft_Parody_of_500_Miles_ v] until done\n    end\nend\n\nwhen [space v] key pressed\n\nwhen I receive [level select v]\nstop [other scripts in sprite v]\nstop all sounds\nplay sound [Kirby Triple Deluxe Music - Masked Dedede.mp3 v] until done\n\nset [mouse v] to (join ((mouse x) + (Scroll x)) (join [,] ((mouse y) + (Scroll y))))\nshow variable [mouse v]\n\nwhen I receive [boss battle v]\nforever\n    play sound [Kirby Triple Deluxe Music - Masked Dedede.mp3 v] until done\nend\n\n@player\n\nwhen flag clicked\nhide\n\nwhen I receive [green flag v]\nclear graphic effects\nhide\ngo to [front v] layer\n\nwhen I receive [play game v]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    Game on\n    repeat until <(Exit) > []>\n        Tick\n        broadcast (Tick v)\n        change [tick v] by (1)\n    end\n    if <(Exit) = [win]> then\n        Game - Win\n    else\n        Game - Die\n    end\nend\n\ndefine Game on\nhide\nset size to (30) %\nset [x v] to [0]\nclear graphic effects\nswitch costume to (hitbox v)\nset [tick v] to [0]\nset [y v] to [0]\nset [sx v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset [scroll x v] to [0]\nset [scroll y v] to [0]\npoint in direction (90)\nshow\n\ndefine Tick\nswitch costume to (hitbox2 v)\nset rotation style [don't rotate v]\nif <<key (left arrow v) pressed?> or <(left key pressed) = [1]>> then\n    change [sx v] by (-1)\nend\nif <<key (right arrow v) pressed?> or <(right key pressed) = [1]>> then\n    change [sx v] by (1)\nend\nif <(sx) > [10]> then\n    set [sx v] to [10]\nend\nif <[-10] > (sx)> then\n    set [sx v] to [-10]\nend\nif <not <(sx) = [0]>> then\n    Change Player x by (sx)\nend\nif <<key (up arrow v) pressed?> or <(up key pressed) = [1]>> then\n    if <(in air) < [4]> then\n        set [sy v] to [16]\n    end\nend\nif <<touching (platforms v)?> and <touching color (#93ff93)?>> then\n    start sound [Drum Boing v]\n    set [sy v] to [30]\nend\nset [sx v] to ((sx) * (0.9))\nchange [sy v] by (-2)\nChange Player y by (sy)\nTest - Die\nchange [scroll x v] by (round (((x) - (Scroll x)) / (10)))\nif <(Scroll x) < [0]> then\n    set [scroll x v] to [0]\nend\nif <(Level) < [3]> then\n    if <[1400] < (Scroll x)> then\n        set [scroll x v] to [1400]\n    end\nelse\n    if <(Level) = [4]> then\n        if <[0] < (Scroll x)> then\n            set [scroll x v] to [0]\n        end\n    else\n        if <[2000] < (Scroll x)> then\n            set [scroll x v] to [2000]\n        end\n    end\nend\nif <(Scroll y) < [0]> then\n    set [scroll y v] to [0]\nend\nif <(Level) = [4]> then\n    if <[2000] < (Scroll y)> then\n        set [scroll y v] to [2000]\n    end\nelse\n    if <[100] < (Scroll y)> then\n        set [scroll y v] to [100]\n    end\nend\nchange [scroll y v] by (round (((y) - (Scroll y)) / (10)))\nif <(Level) = [5]> then\n    set [scroll x v] to [0]\n    set [scroll y v] to [0]\nend\nPosition\nif <(y) < [-180]> then\n    set [exit v] to [die]\nend\nSet Costume\n\ndefine Change Player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <<touching color (#93ff93)?> or <not <touching (platforms v)?>>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\ndefine Position\ngo to x: ((x) - (Scroll x)) y: ((y) - (Scroll y))\n\ndefine Change Player x by (sx)\nchange [x v] by (sx)\nPosition\nif <<touching (platforms v)?> and <not <touching color (#93ff93)?>>> then\n    repeat (8)\n        change [y v] by (1)\n        Position\n        if <not <touching (platforms v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-8)\n    repeat until <not <touching (platforms v)?>>\n        if <(sx) > [0]> then\n            set [sx v] to [0]\n            change [x v] by (-1)\n        else\n            set [sx v] to [0]\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Game - Die\nstart sound [Crunch v]\nrepeat (5)\n    hide\n    wait (0.1) seconds\n    show\n    wait (0.1) seconds\nend\nhide\nset [exit v] to []\nwait (0.5) seconds\n\nbroadcast (Tick v) and wait\n\nwhen I receive [tick v]\ncreate clone of (stamp v)\n\ndefine Test - Die\nif <touching (danger v)?> then\n    set [exit v] to [die]\nend\n\nwhen I receive [turn page v]\nbroadcast (Green Flag v) and wait\nbroadcast (Play Game v) and wait\n\ndefine Game - Win\nstart sound [Teleport2 v]\nrepeat (50)\n    point towards (exit v)\n    turn right (65) degrees\n    move ((distance to [exit v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nhide\nchange [levels unlocked v] by (1)\nbroadcast (level select v)\n\nbroadcast (transition v)\nwait (1) seconds\n\ndefine Set Costume\nset rotation style [left-right v]\nif <not <(in air) = [0]>> then\n    if <(sx) > [0.1]> then\n        point in direction (90)\n    else\n        if <(sx) < [-0.1]> then\n            point in direction (-90)\n        end\n    end\n    if <(sy) > [0]> then\n        switch costume to (hitbox14 v)\n    else\n        switch costume to (hitbox15 v)\n    end\nelse\n    if <(sx) > [0.1]> then\n        point in direction (90)\n        switch costume to ((((timer) * (10)) mod (11)) + (2))\n    else\n        if <(sx) < [-0.1]> then\n            point in direction (-90)\n            switch costume to ((((timer) * (10)) mod (11)) + (2))\n        else\n            switch costume to (hitbox v)\n        end\n    end\nend\n\nset [scroll x v] to (x)\nset [sx v] to [0]\nPosition\n\nwhen I receive [play game v]\n\nwhen I receive [bounce v]\nset [sy v] to [15]\n\nset [sy v] to [0]\n\nwhen I receive [level select v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [bounce v]\nset [sy v] to [15]\n\n@Platforms\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (Scroll x)) ((y) - (Scroll y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(Level) = [1]> then\n    switch costume to (level 1-1 v)\n    Clones at x: [360] y: [0]\n    Clones at x: [360] y: [0]\n    Clones at x: [360] y: [0]\n    Clones at x: [360] y: [0]\n    Clones at x: [360] y: [0]\nelse\n    if <(Level) = [2]> then\n        switch costume to (level 2-1 v)\n        Clones at x: [360] y: [0]\n        Clones at x: [360] y: [0]\n        Clones at x: [360] y: [0]\n        Clones at x: [360] y: [0]\n        Clones at x: [360] y: [0]\n    else\n        if <(Level) = [3]> then\n            switch costume to (level 3-1 v)\n            Clones at x: [360] y: [0]\n            Clones at x: [360] y: [0]\n            Clones at x: [360] y: [0]\n            Clones at x: [360] y: [0]\n            Clones at x: [360] y: [0]\n            Clones at x: [360] y: [0]\n            Clones at x: [360] y: [0]\n        else\n            if <(Level) = [4]> then\n                switch costume to (level 4-1 v)\n                Clones at x: [0] y: [360]\n                Clones at x: [0] y: [360]\n                Clones at x: [0] y: [360]\n                Clones at x: [0] y: [360]\n                Clones at x: [0] y: [360]\n                Clones at x: [0] y: [360]\n                Clones at x: [0] y: [360]\n            else\n                switch costume to (level 5-1 v)\n                Clones at x: [360] y: [0]\n            end\n        end\n    end\nend\nset [x v] to [-99999999]\n\nClones at x: [360] y: [0]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [tick v]\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nhide\n\ndefine Clones at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [level select v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nClones at x: [360] y: [0]\n\n@stamp\n\nwhen I start as a clone\nset size to (30) %\nshow\ngo to (player v)\nset [x v] to ([x v] of [player v])\nset [y v] to ([y v] of [player v])\ngo to [back v] layer\ngo [forward v] (10) layers\nrepeat (10)\n    position ((x) - (Scroll x)) ((y) - (Scroll y))\n    change size by (-1.5)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\nwait (0) seconds\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\n\nchange [x v] by ([sx v] of [player v])\n\nwhen flag clicked\nhide\n\n@Sprite3\n\nwhen flag clicked\nswitch costume to (costume1 v)\nshow\nset [id v] to [main]\nhide\nset [levels unlocked v] to [1]\n\nwhen I start as a clone\nset size to (100) %\nif <(id) = [0]> then\n    go to [front v] layer\n    go [forward v] (5) layers\n    go to x: (240) y: (0)\n    point in direction (180)\n    set rotation style [all around v]\n    change y by (pick random (-240) to (240))\n    switch costume to (5 v)\n    show\n    set [ghost v] effect to (50)\n    set size to (pick random (5) to (100)) %\n    repeat (300)\n        turn right (4) degrees\n        change x by ((([sx v] of [player v]) / (3)) + ((size) * (-0.2)))\n        if <touching (_edge_ v)?> then\n            hide\n        else\n            show\n        end\n    end\n    repeat (20)\n        change [ghost v] effect by (5)\n        turn right (4) degrees\n        change x by ((([sx v] of [player v]) / (3)) + ((size) * (-0.2)))\n    end\n    delete this clone\nelse\n    if <(id) = [1]> then\n        go to [front v] layer\n        set [rotation vel v] to [0]\n        set size to (100) %\n        go to x: (0) y: (240)\n        switch costume to (costume5 v)\n        show\n        glide (0.25) secs to x: (0) y: (0)\n        start sound [do you know da wae v]\n        glide (0.05) secs to x: (0) y: (20)\n        glide (0.1) secs to x: (0) y: (40)\n        glide (0.05) secs to x: (0) y: (50)\n        glide (0.1) secs to x: (0) y: (60)\n        glide (0.05) secs to x: (0) y: (50)\n        glide (0.1) secs to x: (0) y: (40)\n        glide (0.05) secs to x: (0) y: (20)\n        glide (0.2) secs to x: (0) y: (0)\n        forever\n            repeat (10)\n                change size by (1)\n            end\n            repeat (10)\n                change size by (-1)\n            end\n        end\n    else\n        if <(id) = [2]> then\n            go to [front v] layer\n            go to x: (0) y: (0)\n            switch costume to (costume3 v)\n            show\n            forever\n                if <touching (mouse-pointer v)?> then\n                    set [brightness v] effect to (25)\n                    if <mouse down?> then\n                        set [mobile? v] to [0]\n                        stop all sounds\n                        start sound [Collect v]\n                        broadcast (level select v)\n                    end\n                else\n                    clear graphic effects\n                end\n            end\n        else\n            if <(id) = [3]> then\n                go to [front v] layer\n                go to x: (-160) y: (0)\n                switch costume to (costume6 v)\n                show\n                forever\n                    if <touching (mouse-pointer v)?> then\n                        set [brightness v] effect to (25)\n                        if <mouse down?> then\n                            set [mobile? v] to [1]\n                            stop all sounds\n                            start sound [Collect v]\n                            broadcast (level select v)\n                        end\n                    else\n                        clear graphic effects\n                    end\n                end\n            else\n                if <(id) = [4]> then\n                    go to [front v] layer\n                    go to x: (160) y: (0)\n                    switch costume to (costume2 v)\n                    show\n                    forever\n                        if <touching (mouse-pointer v)?> then\n                            set [brightness v] effect to (25)\n                            if <mouse down?> then\n                                set [mobile? v] to [1]\n                                stop all sounds\n                                start sound [Collect v]\n                                broadcast (instructions v)\n                                wait until <not <mouse down?>>\n                            end\n                        else\n                            clear graphic effects\n                        end\n                    end\n                else\n                    if <(id) = [5]> then\n                        hide\n                    else\n                        if <(id) = [6]> then\n                            go to [front v] layer\n                            set [rotation vel v] to [0]\n                            set size to (100) %\n                            go to x: (0) y: (240)\n                            switch costume to (cooltext344999736493236 v)\n                            show\n                            glide (0.25) secs to x: (0) y: (0)\n                            start sound [Drum Boing v]\n                            glide (0.05) secs to x: (0) y: (20)\n                            glide (0.1) secs to x: (0) y: (40)\n                            glide (0.05) secs to x: (0) y: (50)\n                            glide (0.1) secs to x: (0) y: (60)\n                            glide (0.05) secs to x: (0) y: (50)\n                            glide (0.1) secs to x: (0) y: (40)\n                            glide (0.05) secs to x: (0) y: (20)\n                            glide (0.2) secs to x: (0) y: (0)\n                            forever\n                                repeat (10)\n                                    change size by (1)\n                                end\n                                repeat (10)\n                                    change size by (-1)\n                                end\n                            end\n                        else\n                            if <<(id) > [6]> and <(id) < [13]>> then\n                                hide\n                                wait (((id) - (5)) / (6)) seconds\n                                go to [front v] layer\n                                go to x: ((((id) - (7)) * (100)) - (200)) y: (0)\n                                if <(Levels unlocked) > ((id) - (7))> then\n                                    switch costume to ((id) + (2))\n                                else\n                                    switch costume to (costume12 v)\n                                end\n                                show\n                                set size to (10) %\n                                repeat (6)\n                                    change size by (10)\n                                end\n                                set size to (70) %\n                                forever\n                                    if <touching (mouse-pointer v)?> then\n                                        set [brightness v] effect to (25)\n                                        if <<mouse down?> and <(Levels unlocked) > ((id) - (7))>> then\n                                            set [level v] to ((id) - (6))\n                                            stop all sounds\n                                            start sound [Collect v]\n                                            broadcast (turn page v)\n                                        end\n                                    else\n                                        clear graphic effects\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nchange y by (10)\n\nset [ghost v] effect to (50)\n\nforever\n    go to [front v] layer\nend\n\nwhen I receive [turn page v]\nhide\n\nstop [other scripts in sprite v]\n\ndefine Rotate\nrepeat (10)\n    change [rotation vel v] by (0.1)\n    turn right (rotation vel) degrees\nend\nrepeat (10)\n    change [rotation vel v] by (-0.1)\n    turn right (rotation vel) degrees\nend\nrepeat (10)\n    change [rotation vel v] by (-0.1)\n    turn right (rotation vel) degrees\nend\nrepeat (10)\n    change [rotation vel v] by (0.1)\n    turn right (rotation vel) degrees\nend\nrepeat (10)\n    change [rotation vel v] by (-0.1)\n    turn right (rotation vel) degrees\nend\nrepeat (10)\n    change [rotation vel v] by (0.1)\n    turn right (rotation vel) degrees\nend\nrepeat (10)\n    change [rotation vel v] by (0.1)\n    turn right (rotation vel) degrees\nend\nrepeat (10)\n    change [rotation vel v] by (-0.1)\n    turn right (rotation vel) degrees\nend\n\nwhen I start as a clone\nset [rotation vel v] to [0]\nforever\n    if <(id) = [2]> then\n        forever\n            Rotate\n        end\n    end\n    if <(id) = [3]> then\n        forever\n            Rotate\n        end\n    end\n    if <(id) = [4]> then\n        forever\n            Rotate\n        end\n    end\n    if <(id) = [5]> then\n        forever\n            Rotate\n        end\n    end\n    if <<(id) > [6]> and <(id) < [13]>> then\n        forever\n            Rotate\n        end\n    end\nend\n\nwhen I receive [turn page v]\ndelete this clone\n\nwhen I receive [instructions v]\n\nwhen I receive [highscore v]\nif <<(id) > [0]> and <not <(id) = [main]>>> then\n    stop [other scripts in sprite v]\n    repeat (5)\n        change [ghost v] effect by (20)\n    end\n    delete this clone\nend\n\nwhen I receive [instructions v]\nif <<(id) > [0]> and <not <(id) = [main]>>> then\n    stop [other scripts in sprite v]\n    repeat (5)\n        change [ghost v] effect by (50)\n    end\n    delete this clone\nend\n\nwhen I receive [menu v]\nshow\nif <(costume [number v]) = [1]> then\n    start sound [Super Mario Bros. 3 Medley - Super Smash Bros. Wii U.mp3 v]\n    point in direction (90)\n    hide variable [level v]\n    hide variable [mobile? v]\n    go to [front v] layer\n    switch costume to (costume1 v)\n    go to x: (0) y: (0)\n    set [id v] to [0]\n    repeat (5)\n        change [id v] by (1)\n        create clone of (_myself_ v)\n    end\n    forever\n        set [id v] to [0]\n        create clone of (_myself_ v)\n        set [id v] to [main]\n        wait (0) seconds\n    end\nend\n\nwhen flag clicked\nset [id v] to [main]\n\nset [id v] to [main]\n\nwhen I receive [end v]\nshow\nbroadcast (menu v)\n\nRotate\n\ngo to [front v] layer\ngo to x: (100) y: (-105)\nswitch costume to (costume4 v)\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (25)\n        if <mouse down?> then\n            set [mobile? v] to [1]\n            stop all sounds\n            start sound [Collect v]\n            broadcast (highscore v)\n            wait until <not <mouse down?>>\n        end\n    else\n        clear graphic effects\n    end\nend\n\nwhen I receive [level select v]\ndelete this clone\n\nwhen I receive [level select v]\nbroadcast (transition v)\nwait (1) seconds\nset [id v] to [6]\ncreate clone of (_myself_ v)\nset [id v] to [7]\ncreate clone of (_myself_ v)\nset [id v] to [8]\ncreate clone of (_myself_ v)\nset [id v] to [9]\ncreate clone of (_myself_ v)\nset [id v] to [10]\ncreate clone of (_myself_ v)\nset [id v] to [11]\ncreate clone of (_myself_ v)\n\nchange [id v] by (1)\ncreate clone of (_myself_ v)\n\nrepeat (6)\n\ngo to [front v] layer\ngo to x: (0) y: (0)\nswitch costume to (costume3 v)\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (25)\n        if <mouse down?> then\n            set [mobile? v] to [0]\n            stop all sounds\n            start sound [Collect v]\n            broadcast (level select v)\n        end\n    else\n        clear graphic effects\n    end\nend\n\nwhen I receive [level select v]\nshow\n\n@Sprite4\n\nwhen flag clicked\nset volume to (100) %\nstart sound [Jackpot! The fat rat2 v]\nset [velocity v] to [0]\nset size to (100) %\nshow\nswitch costume to (costume4 v)\ngo to x: (0) y: (0)\ngo to [front v] layer\nset rotation style [all around v]\nset [id v] to [0]\ncreate clone of (_myself_ v)\nwait (0) seconds\nset [id v] to [1]\ncreate clone of (_myself_ v)\nwait until <key (space v) pressed?>\nstart sound [Connect v]\nbroadcast (end v)\n\nwhen I start as a clone\nshow\nif <(id) = [0]> then\n    go [forward v] (1) layers\n    go to x: (-240) y: (0)\n    switch costume to (costume2 v)\n    point in direction (90)\n    set [velocity v] to [0]\n    repeat (17)\n        change [velocity v] by (1)\n        change x by (velocity)\n        turn right ((velocity) * (1.37)) degrees\n    end\n    repeat (24)\n        change [velocity v] by (-1)\n        change x by (velocity)\n        turn right ((velocity) * (1.4)) degrees\n    end\n    point in direction (90)\n    go to x: (0) y: (0)\n    switch costume to (costume5 v)\n    set size to (100) %\n    set [velocity v] to [10]\n    repeat (18)\n        change [velocity v] by (-1)\n        change size by (velocity)\n    end\n    set size to (100) %\n    start sound [Siren Whistle v]\n    clones\n    wait (2) seconds\n    set [id v] to [3]\n    create clone of (_myself_ v)\n    set [id v] to [0]\nelse\n    if <(id) = [1]> then\n        go to x: (240) y: (0)\n        switch costume to (costume3 v)\n        go to [front v] layer\n        point in direction (90)\n        repeat (17)\n            change x by ((velocity) * (-1))\n            turn right ((velocity) * (-1.37)) degrees\n        end\n        repeat (24)\n            change x by ((velocity) * (-1))\n            turn right ((velocity) * (-1.4)) degrees\n        end\n        point in direction (90)\n        go to x: (0) y: (0)\n        start sound [Coin v]\n        delete this clone\n    else\n        if <(id) = [2]> then\n            set rotation style [all around v]\n            set size to (100) %\n            switch costume to (costume6 v)\n            repeat (10)\n                move (10) steps\n            end\n            repeat (10)\n                change [ghost v] effect by (10)\n                move (10) steps\n            end\n            delete this clone\n        else\n            if <(id) = [3]> then\n                show\n                go to x: (0) y: (0)\n                switch costume to (costume7 v)\n                set rotation style [all around v]\n                set size to (10) %\n                set [velocity v] to [17]\n                repeat (25)\n                    change [velocity v] by (-1)\n                    change size by (velocity)\n                end\n                repeat (10)\n                    change [velocity v] by (1)\n                    change size by (velocity)\n                end\n                wait (0) seconds\n                set [id v] to [4]\n                create clone of (_myself_ v)\n                hide\n                show\n                wait (1) seconds\n                start sound [Connect v]\n                set [velocity v] to [0]\n                repeat (10)\n                    change size by (-10)\n                    turn right (15) degrees\n                end\n                broadcast (message1 v)\n                delete this clone\n            else\n                if <(id) = [4]> then\n                    show\n                    go to x: (0) y: (900)\n                    switch costume to (costume6 v)\n                    set size to (500) %\n                    set [ghost v] effect to (0)\n                    go to [front v] layer\n                    switch costume to (costume8 v)\n                    set [velocity v] to [0]\n                    repeat (9)\n                        change [velocity v] by (-7)\n                        change [ghost v] effect by (-25)\n                        change size by (velocity)\n                        change y by (-22)\n                    end\n                    set [velocity v] to [-10]\n                    repeat (9)\n                        change [velocity v] by (1)\n                        change [ghost v] effect by (-25)\n                        change y by (velocity)\n                    end\n                    wait (1) seconds\n                    switch costume to (costume8 v)\n                    show\n                    set [velocity v] to [0]\n                    repeat (10)\n                        change [velocity v] by (-2)\n                        turn left (velocity) degrees\n                        change y by (velocity)\n                    end\n                    delete this clone\n                end\n            end\n        end\n    end\nend\n\nchange [velocity v] by (1)\n\ndefine clones\nset rotation style [don't rotate v]\nset [id v] to [2]\nrepeat (30)\n    turn right (12) degrees\n    create clone of (_myself_ v)\nend\n\nturn right (15) degrees\nturn right (15) degrees\n\nwhen I receive [message1 v]\nif <(id) = [0]> then\n    start sound [Teleport2 v]\n    set rotation style [all around v]\n    point in direction (90)\n    switch costume to (costume5 v)\n    show\n    set [velocity v] to [0]\n    repeat (20)\n        change [velocity v] by (-1)\n        turn left (velocity) degrees\n        change y by (velocity)\n    end\n    hide\n    set [vel v] to [0]\n    go to x: (0) y: (0)\n    show\n    set [id v] to [5]\n    create clone of (_myself_ v)\n    set [id v] to [6]\n    create clone of (_myself_ v)\n    go to [front v] layer\n    repeat (100)\n        switch costume to (costume10 v)\n        change [vel v] by (5)\n        change size by (vel)\n        switch costume to (costume11 v)\n    end\n    broadcast (end v)\n    repeat (20)\n        go to [front v] layer\n        change volume by (-5)\n        change [ghost v] effect by (5)\n    end\n    broadcast (menu v)\n    delete this clone\nend\n\ngo to x: (0) y: (0)\n\nchange size by (10)\n\nwhen I receive [end v]\nshow\nrepeat (20)\n    change [ghost v] effect by (5)\n    change volume by (-5)\nend\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n\n\nhide\ndelete this clone\n\nwhen I start as a clone\nif <(id) > [4]> then\n    set [brightness v] effect to (((7) - (id)) * (20))\n    repeat (100)\n        switch costume to (costume10 v)\n        change [vel v] by (((7) - (id)) * (20))\n        change size by (vel)\n        switch costume to (costume11 v)\n    end\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\nend\n\nset [velocity v] to [5]\nrepeat (10)\n    change [velocity v] by (-1)\n    change size by (velocity)\nend\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\nshow\nrepeat (20)\n    change [ghost v] effect by (5)\n    change volume by (-5)\nend\nhide\ndelete this clone\n\n@Coins\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [setup v]\nhide\nset [coins v] to [0]\nset [collected max v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nif <(Level) = [1]> then\n    switch costume to (level 1-1 v)\n    Clones at x: [-124] y: [113]\n    Clones at x: [503] y: [156]\n    Clones at x: [1125] y: [36]\n    Clones at x: [871] y: [163]\n    Clones at x: [1529] y: [-95]\nelse\n    if <(Level) = [2]> then\n        switch costume to (level 1-1 v)\n        Clones at x: [-201] y: [-80]\n        Clones at x: [239] y: [187]\n        Clones at x: [392] y: [257]\n        Clones at x: [903] y: [243]\n        Clones at x: [1589] y: [-84]\n    else\n        if <(Level) = [3]> then\n            switch costume to (level 1-1 v)\n            Clones at x: [189] y: [133]\n            Clones at x: [353] y: [254]\n            Clones at x: [732] y: [125]\n            Clones at x: [1493] y: [-90]\n            Clones at x: [2036] y: [-73]\n        else\n            if <(Level) = [4]> then\n                Clones at x: [214] y: [-83]\n                Clones at x: [1] y: [360]\n                Clones at x: [194] y: [430]\n                Clones at x: [-208] y: [739]\n                Clones at x: [11] y: [1520]\n            end\n        end\n    end\nend\nset [x v] to [-999999]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [tick v]\nposition ((x) - (Scroll x)) ((y) - (Scroll y))\nif <touching (player v)?> then\n    start sound [Coin v]\n    change [coins v] by (1)\n    if <(COINS) = (COLLECTED MAX)> then\n        broadcast (Open Portal v)\n    end\n    delete this clone\nend\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nhide\n\ndefine Clones at x: (x) y: (y)\nset size to (80) %\nset [x v] to (x)\nset [y v] to (y)\nchange [collected max v] by (1)\ncreate clone of (_myself_ v)\n\nwhen I receive [tick v]\nswitch costume to ((((timer) * (15)) mod (6)) + (1))\n\nClones at x: [732] y: [125]\nClones at x: [1493] y: [-90]\nClones at x: [2036] y: [-73]\n\nwhen I receive [level select v]\ndelete this clone\n\n@Danger\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (Scroll x)) ((y) - (Scroll y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(Level) = [1]> then\n    switch costume to (level 1-1 v)\n    Clones at x: [360] y: [0]\n    Clones at x: [360] y: [0]\n    Clones at x: [360] y: [0]\n    Clones at x: [360] y: [0]\n    Clones at x: [360] y: [0]\nelse\n    if <(Level) = [2]> then\n        switch costume to (level 2-1 v)\n        Clones at x: [360] y: [0]\n        Clones at x: [360] y: [0]\n        Clones at x: [360] y: [0]\n        Clones at x: [360] y: [0]\n        Clones at x: [360] y: [0]\n    else\n        if <(Level) = [3]> then\n            switch costume to (level 3-1 v)\n            Clones at x: [360] y: [0]\n            Clones at x: [360] y: [0]\n            Clones at x: [360] y: [0]\n            Clones at x: [360] y: [0]\n            Clones at x: [360] y: [0]\n            Clones at x: [360] y: [0]\n            Clones at x: [360] y: [0]\n        else\n            if <(Level) = [4]> then\n                switch costume to (level 4-1 v)\n                Clones at x: [0] y: [360]\n                Clones at x: [0] y: [360]\n                Clones at x: [0] y: [360]\n                Clones at x: [0] y: [360]\n                Clones at x: [0] y: [360]\n                Clones at x: [0] y: [360]\n                Clones at x: [0] y: [360]\n            end\n        end\n    end\nend\nset [x v] to [99999999999]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [tick v]\nposition ((x) - (Scroll x)) ((y) - (Scroll y))\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nhide\n\ndefine Clones at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [level select v]\nhide\ndelete this clone\n\n@Exit\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [setup v]\nhide\nset [coins v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nif <(Level) = [1]> then\n    switch costume to (closed v)\n    Clones at x: [1582] y: [218]\nelse\n    if <(Level) = [2]> then\n        switch costume to (closed v)\n        Clones at x: [1156] y: [190]\n    else\n        if <(Level) = [3]> then\n            switch costume to (closed v)\n            Clones at x: [2159] y: [-80]\n        else\n            if <(Level) = [4]> then\n                switch costume to (closed v)\n                Clones at x: [-189] y: [1616]\n            else\n                switch costume to (closed v)\n                Clones at x: [9999] y: [-32]\n            end\n        end\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [tick v]\nposition ((x) - (Scroll x)) ((y) - (Scroll y))\nif <<(costume [number v]) = [2]> and <touching (player v)?>> then\n    set [exit v] to [win]\nend\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nhide\n\ndefine Clones at x: (x) y: (y)\nset size to (100) %\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I receive [open portal v]\nswitch costume to (open v)\n\nwhen I receive [level select v]\nhide\ndelete this clone\n\nswitch costume to (closed v)\nClones at x: [99999] y: [-138]\n\n@Sprite17\n\nwhen I receive [end v]\n\nwhen flag clicked\nset [score v] to [0]\nrepeat (10)\n    hide\n    delete this clone\nend\n\nwhen I receive [highscore v]\nhide\nshow\nset size to (100) %\nclear graphic effects\nset [brightness v] effect to (-50)\ngo to [front v] layer\nclear graphic effects\nhide variable [score v]\nshow\ngo to x: (28) y: (-50)\nset [id v] to [1]\ncreate clone of (_myself_ v)\nset [id v] to [2]\ncreate clone of (_myself_ v)\nset [id v] to [3]\ncreate clone of (_myself_ v)\nforever\n    set [id v] to [0]\n    show\n    switch costume to (letter (length of (☁ best time)) of (☁ best time))\nend\n\ngo to [front v] layer\n\ncreate clone of (_myself_ v)\n\nchange [score v] by (50)\n\nwhen I start as a clone\ngo to x: ((28) - ((id) * (28))) y: (-50)\ngo to [front v] layer\nforever\n    show\n    switch costume to (letter ((length of (☁ best time)) - (id)) of (☁ best time))\nend\n\nif <(Score) > [999]> then\n\nset [id v] to [15]\ncreate clone of (_myself_ v)\nset [id v] to [16]\ncreate clone of (_myself_ v)\nset [id v] to [17]\ncreate clone of (_myself_ v)\n\nbroadcast (die v)\n\nwhen I receive [menu v]\nset [score v] to [0]\n\nwhen I receive [pulse v]\nwait ((id) / (10)) seconds\nchange y by (5)\nwait (0.05) seconds\nchange y by (-5)\n\nwhen I receive [play game v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nset [id v] to [4]\ncreate clone of (_myself_ v)\nset [id v] to [5]\ncreate clone of (_myself_ v)\nset [id v] to [6]\ncreate clone of (_myself_ v)\nset [id v] to [7]\ncreate clone of (_myself_ v)\nset [id v] to [8]\ncreate clone of (_myself_ v)\nset [id v] to [9]\ncreate clone of (_myself_ v)\n\nwhen I receive [menu v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@Sprite16\n\nwhen I receive [turn page v]\nforever\n    broadcast (pulse v) and wait\nend\n\nwhen I start as a clone\nswitch costume to (costume1 v)\ngo to x: (-210) y: (150)\n\nwhen I receive [level select v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen flag clicked\nset [coins v] to [0]\nrepeat (10)\n    hide\n    delete this clone\nend\n\nwhen I receive [turn page v]\nhide\nshow\nset [brightness v] effect to (-50)\nclear graphic effects\nset size to (80) %\ngo to [front v] layer\nhide variable [score v]\nshow\ngo to x: (-140) y: (155)\ncreate clone of (_myself_ v)\nforever\n    switch costume to (letter (1) of (COINS))\nend\n\ncreate clone of (_myself_ v)\n\nif <(Score) > [999]> then\n\nset [id v] to [15]\ncreate clone of (_myself_ v)\nset [id v] to [16]\ncreate clone of (_myself_ v)\nset [id v] to [17]\ncreate clone of (_myself_ v)\n\nwhen I receive [pulse v]\nwait ((id) / (10)) seconds\nrepeat (10)\n    change size by (1)\nend\nrepeat (10)\n    change size by (-1)\nend\n\n@Sprite5\n\nwhen flag clicked\npoint in direction (90)\nhide\nforever\n    repeat (5)\n        turn right (5) degrees\n    end\n    repeat (5)\n        turn right (3) degrees\n    end\n    repeat (5)\n        turn right (1) degrees\n    end\n    repeat (5)\n        turn right (-1) degrees\n    end\n    repeat (5)\n        turn right (-3) degrees\n    end\n    repeat (5)\n        turn right (-5) degrees\n    end\n    repeat (5)\n        turn right (-5) degrees\n    end\n    repeat (5)\n        turn right (-3) degrees\n    end\n    repeat (5)\n        turn right (-1) degrees\n    end\n    repeat (5)\n        turn right (1) degrees\n    end\n    repeat (5)\n        turn right (3) degrees\n    end\n    repeat (5)\n        turn right (5) degrees\n    end\nend\n\nwhen I receive [turn page v]\nshow\ngo to x: (200) y: (-144)\ngo to [front v] layer\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [level select v]\nhide\ndelete this clone\n\n@Sprite10\n\nwhen flag clicked\nhide\n\nwhen I receive [turn page v]\ngo to [front v] layer\nshow\ngo to x: (0) y: (0)\nset [transition vel v] to [0]\nset [ghost v] effect to (0)\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\nend\nbroadcast (fade out v)\n\nwhen I receive [fade out v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [transition v]\ngo to [front v] layer\nshow\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nrepeat (5)\n    go to [front v] layer\n    change [ghost v] effect by (-20)\nend\nset [ghost v] effect to (0)\nwait (1) seconds\nbroadcast (fade out v)\n\nwhen I receive [menu v]\ngo to [front v] layer\nshow\ngo to x: (0) y: (0)\nset [transition vel v] to [0]\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nbroadcast (fade out v)\n\n@Sprite2\n\ngo to [front v] layer\n\nchange [score v] by (50)\n\nwhen I start as a clone\ngo to [front v] layer\ngo to x: ((220) - ((id) * (28))) y: (160)\nforever\n    show\n    switch costume to (letter ((length of (Time)) - (id)) of (Time))\nend\n\nbroadcast (die v)\n\nwhen I receive [menu v]\nset [score v] to [0]\n\nwhen I receive [win v]\nset size to (100) %\nstop [other scripts in sprite v]\nif <(☁ Highscore) > (Time)> then\n    set [☁ highscore v] to (Time)\nend\n\nchange y by (5)\nwait (0.05) seconds\nchange y by (-5)\n\nset [id v] to [4]\ncreate clone of (_myself_ v)\nset [id v] to [5]\ncreate clone of (_myself_ v)\nset [id v] to [6]\ncreate clone of (_myself_ v)\nset [id v] to [7]\ncreate clone of (_myself_ v)\nset [id v] to [8]\ncreate clone of (_myself_ v)\nset [id v] to [9]\ncreate clone of (_myself_ v)\n\nwhen I receive [play game v]\nrepeat until <(Level) = [609009090909876060]>\n    change [time v] by (1)\n    wait (1) seconds\nend\nif <(☁ best time) > (Time)> then\n    set [☁ best time v] to (Time)\nend\n\nwhen I receive [play game v]\n\nsay (Time)\n\nwhen I receive [level select v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen flag clicked\nset [time v] to [0]\nhide\ndelete this clone\n\nwhen I receive [play game v]\nhide\nshow\nset [brightness v] effect to (-50)\nclear graphic effects\nset size to (60) %\ngo to [front v] layer\nhide variable [score v]\nshow\ngo to x: (220) y: (160)\nset [id v] to [1]\ncreate clone of (_myself_ v)\nset [id v] to [2]\ncreate clone of (_myself_ v)\nset [id v] to [3]\ncreate clone of (_myself_ v)\nforever\n    set [id v] to [0]\n    show\n    switch costume to (letter (length of (Time)) of (Time))\nend\n\ncreate clone of (_myself_ v)\n\nif <(Score) > [999]> then\n\nset [id v] to [15]\ncreate clone of (_myself_ v)\nset [id v] to [16]\ncreate clone of (_myself_ v)\nset [id v] to [17]\ncreate clone of (_myself_ v)\n\nwhen I receive [pulse v]\nwait ((id) / (10)) seconds\nrepeat (10)\n    change size by (1)\nend\nrepeat (10)\n    change size by (-1)\nend\n\n@Sprite14\n\nwhen I receive [instructions v]\nstop all sounds\nset volume to (100) %\nstart sound [Menu Music v]\nclear graphic effects\nswitch costume to (costume1 v)\nshow\ngo to [front v] layer\nset size to (10) %\ngo to x: (0) y: (0)\nset [size vel v] to [15]\nrepeat (22)\n    change size by (size vel)\n    change [size vel v] by (-1)\nend\nrepeat (8)\n    change size by (size vel)\n    change [size vel v] by (1)\nend\nwait until <mouse down?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nbroadcast (menu v)\n\nwhen I receive [turn page v]\nhide\n\nwhen I receive [highscore v]\nstop all sounds\nset volume to (100) %\nstart sound [Menu Music v]\nclear graphic effects\nswitch costume to (costume1 v)\nswitch costume to (costume2 v)\nshow\ngo to [front v] layer\nset size to (10) %\ngo to x: (0) y: (0)\nset [size vel v] to [15]\nrepeat (22)\n    change size by (size vel)\n    change [size vel v] by (-1)\nend\nrepeat (8)\n    change size by (size vel)\n    change [size vel v] by (1)\nend\nwait until <mouse down?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nbroadcast (menu v)\n\nwhen I receive [menu v]\nset volume to (0) %\n\ngo to [front v] layer\n\nwhen flag clicked\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\ngo to x: (-120) y: (-140)\nshow\nset [ghost v] effect to (25)\ngo to [front v] layer\nif <(Mobile?) = [0]> then\n    hide\nend\n\nwhen I receive [level select v]\nhide\n\n@Sprite6\n\nwhen flag clicked\nhide\nset [left key pressed v] to [0]\nset [right key pressed v] to [0]\nset [down key pressed v] to [0]\nset [down key pressed v] to [0]\n\nif <<(direction) > [44]> and <(direction) < [91]>> then\n\nwhen I receive [play game v]\ngo to x: (-120) y: (0)\nset [left key pressed v] to [0]\nset [right key pressed v] to [0]\nset [down key pressed v] to [0]\nset [down key pressed v] to [0]\nshow\nset [ghost v] effect to (25)\ngo to [front v] layer\nforever\n    go to x: (-120) y: (-140)\n    set [left key pressed v] to [0]\n    set [right key pressed v] to [0]\n    set [up key pressed v] to [0]\n    set [down key pressed v] to [0]\n    if <(Mobile?) = [0]> then\n        hide\n        stop [this script v]\n    end\n    if <mouse down?> then\n        go to x: (-120) y: (-140)\n        point towards (mouse-pointer v)\n        move (28) steps\n        if <<(direction) > [-60]> and <(direction) < [60]>> then\n            set [up key pressed v] to [1]\n        else\n            if <<(direction) < [-120]> or <(direction) > [120]>> then\n                set [down key pressed v] to [1]\n            end\n        end\n        if <<(direction) > [30]> and <(direction) < [150]>> then\n            set [right key pressed v] to [1]\n        else\n            if <<(direction) > [-150]> and <(direction) < [-30]>> then\n                set [left key pressed v] to [1]\n            end\n        end\n    end\nend\n\nwhen I receive [level select v]\nhide\n\n@thumbnail that does not work\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\ngo to [front v] layer\nforever\n    go to [front v] layer\nend\n\n@Background\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - ((Scroll x) / (2))) ((y) - ((Scroll y) / (2)))\n\nwhen I receive [setup v]\ngo to [back v] layer\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(Level) = [1]> then\n    switch costume to (level 1-1 v)\n    repeat (10)\n        Clones at x: [480] y: [0]\n    end\nelse\n    if <(Level) = [2]> then\n        switch costume to (level 4-1 v)\n        repeat (10)\n            Clones at x: [480] y: [0]\n        end\n    else\n        if <(Level) = [3]> then\n            switch costume to (level 4-1 v)\n            repeat (10)\n                Clones at x: [480] y: [0]\n            end\n        else\n            switch costume to (level 4-1 v)\n            repeat (10)\n                Clones at x: [480] y: [0]\n            end\n        end\n    end\nend\nset [x v] to [-99999999]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [tick v]\n\nposition ((x) - (Scroll x)) ((y) - (Scroll y))\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nhide\n\ndefine Clones at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\n@Enemies2\n\ndefine move enemy\nset rotation style [left-right v]\npoint towards (player v)\nclear graphic effects\nswitch costume to (costume1 v)\nset [old x v] to (x)\nif <(type) = [3]> then\n    set size to (100) %\n    set [x v] to (round ((orig x) + ((move x) * ([abs v] of (((((TICK) / (div)) + (offset)) mod (2)) - (1)) ))))\n    set [y v] to (round ((orig y) + ((move y) * ([abs v] of (((((TICK) / (div)) + (offset)) mod (2)) - (1)) ))))\nelse\n    set [x v] to (round ((orig x) + ((move x) * ([abs v] of (((((TICK) / (div)) + (offset)) mod (2)) - (1)) ))))\n    set [y v] to (round ((orig y) + ((move y) * ([abs v] of (((((TICK) / (div)) + (offset)) mod (2)) - (1)) ))))\nend\nif <<touching (player v)?> and <(([y position v] of [player v]) - (((type) * (6)) - (5))) < (y position)>> then\n    start sound [Jab-SoundBible v]\n    broadcast (reset level v)\n    set [exit v] to [die]\n    set [speed y v] to [-10]\n    hide\nend\nif <<touching (player v)?> and <(([y position v] of [player v]) - (((type) * (6)) - (5))) > (y position)>> then\n    broadcast (bounce v)\n    switch costume to (costume14 v)\n    switch costume to (hitbox2 v)\n    start sound [Pop v]\n    hide\n    delete this clone\nend\nPosition\nset [color v] effect to (((type) - (2)) * (140))\nswitch costume to ((((TICK) * ((div) / (100))) mod (12)) + (1))\n\ndefine Position\nposition at ((x) - (Scroll x)) ((y) - (Scroll y))\n\ndefine New Enemy (costume) at x, y: (x) (y)\ncreate clone of (_myself_ v)\nset rotation style [left-right v]\nswitch costume to (costume)\nset [type v] to [1]\nset [x v] to (x)\nset [y v] to (y)\nset [orig x v] to (x)\nset [orig y v] to (y)\nset [old x v] to [0]\n\ndefine then glide (time) secs to x: (x) y: (y)\nset [type v] to [2]\nset [orig x v] to (x)\nset [orig y v] to (y)\nset [move x v] to ((x) - (x))\nset [move y v] to ((y) - (y))\nset [div v] to ((30) * (time))\nset [offset v] to [0]\n\ndefine Follow\nif <(visible) > [0]> then\n    if <(([x position v] of [player v]) + (Scroll x)) < (x)> then\n        change [move x v] by (-1)\n    end\n    if <(x) < (([x position v] of [player v]) + (Scroll x))> then\n        change [move x v] by (1)\n    end\n    if <(move x) > [5]> then\n        set [move x v] to [5]\n    end\n    if <[-5] > (move x)> then\n        set [move x v] to [-5]\n    end\nend\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [setup v]\nhide\nset [type v] to []\nif <(Level) = [1]> then\n    New Enemy [enemy] at x, y: [222] [-61]\n    then glide [2.5] secs to x: [115] y: [-61]\n    New Enemy [enemy] at x, y: [229] [108]\n    then glide [2.5] secs to x: [120] y: [108]\n    New Enemy [enemy] at x, y: [555] [64]\n    then glide [2.5] secs to x: [460] y: [64]\n    New Enemy [enemy] at x, y: [1010] [-61]\n    then glide [2.5] secs to x: [733] y: [-61]\n    New Enemy [enemy] at x, y: [1612] [78]\n    then glide [2.5] secs to x: [1241] y: [78]\n    New Enemy [enemy] at x, y: [1612] [78]\n    then glide [5] secs to x: [1241] y: [78]\n    New Enemy [enemy] at x, y: [99999999] [-61]\n    then glide [2.5] secs to x: [9999999999] y: [-61]\nelse\n    if <(Level) = [2]> then\n        New Enemy [enemy] at x, y: [134] [-26]\n        then glide [5] secs to x: [-145] y: [-26]\n        New Enemy [enemy] at x, y: [-66] [113]\n        then glide [2] secs to x: [-146] y: [113]\n        New Enemy [enemy] at x, y: [201] [174]\n        then glide [2] secs to x: [52] y: [174]\n        New Enemy [enemy] at x, y: [499] [-96]\n        then glide [2] secs to x: [166] y: [-96]\n        New Enemy [enemy] at x, y: [1046] [152]\n        then glide [2] secs to x: [760] y: [152]\n        New Enemy [enemy] at x, y: [979] [-27]\n        then glide [2] secs to x: [893] y: [-27]\n        New Enemy [enemy] at x, y: [9999999] [152]\n        then glide [2] secs to x: [999999999] y: [152]\n    else\n        if <(Level) = [3]> then\n            New Enemy [enemy] at x, y: [29] [112]\n            then glide [2] secs to x: [-57] y: [112]\n            New Enemy [enemy] at x, y: [291] [-98]\n            then glide [2] secs to x: [124] y: [-98]\n            New Enemy [enemy] at x, y: [493] [49]\n            then glide [2] secs to x: [408] y: [49]\n            New Enemy [enemy] at x, y: [583] [114]\n            then glide [2] secs to x: [506] y: [114]\n            New Enemy [enemy] at x, y: [408] [179]\n            then glide [2] secs to x: [493] y: [179]\n            New Enemy [enemy] at x, y: [951] [-8]\n            then glide [2] secs to x: [865] y: [-8]\n            New Enemy [enemy] at x, y: [865] [-164]\n            then glide [2] secs to x: [951] y: [-164]\n            New Enemy [enemy] at x, y: [1308] [22]\n            then chase [2] secs to x: [1231] [22]\n            New Enemy [enemy] at x, y: [1493] [-70]\n            then chase [2] secs to x: [1493] [-70]\n            New Enemy [enemy] at x, y: [1720] [-11]\n            then glide [2] secs to x: [1635] y: [-11]\n            New Enemy [enemy] at x, y: [2064] [-96]\n            then glide [2] secs to x: [1996] y: [-96]\n            New Enemy [enemy] at x, y: [9999999] [152]\n            then glide [2] secs to x: [999999999] y: [152]\n        else\n            if <(Level) = [4]> then\n                New Enemy [enemy] at x, y: [-160] [-65]\n                then chase [4] secs to x: [0] [-65]\n                New Enemy [enemy] at x, y: [160] [-65]\n                then chase [4] secs to x: [0] [-65]\n                New Enemy [enemy] at x, y: [-67] [65]\n                then glide [2] secs to x: [84] y: [65]\n                New Enemy [enemy] at x, y: [-220] [162]\n                then glide [2] secs to x: [175] y: [162]\n                New Enemy [enemy] at x, y: [32] [446]\n                then chase [2] secs to x: [-36] [446]\n                New Enemy [enemy] at x, y: [-32] [581]\n                then glide [2] secs to x: [131] y: [581]\n                New Enemy [enemy] at x, y: [-40] [848]\n                then glide [2] secs to x: [20] y: [781]\n                New Enemy [enemy] at x, y: [-32] [942]\n                then glide [2] secs to x: [-129] y: [942]\n                New Enemy [enemy] at x, y: [9] [942]\n                then glide [2] secs to x: [92] y: [942]\n                New Enemy [enemy] at x, y: [-208] [1115]\n                then chase [2] secs to x: [118] [1115]\n                New Enemy [enemy] at x, y: [47] [1325]\n                then chase [2] secs to x: [-21] [1325]\n                New Enemy [enemy] at x, y: [9999999] [152]\n                then glide [2] secs to x: [999999999] y: [152]\n            end\n        end\n    end\nend\nset [x v] to [9999999999]\n\nwhen I receive [tick v]\nif <(type) > []> then\n    if <(type) = [2]> then\n        move enemy\n    else\n        if <(type) = [3]> then\n            set size to (100) %\n            move enemy\n        else\n            if <(type) = [5]> then\n        end\n    end\n    Position\nend\n\ndefine position at (x) (y)\nset size to (200) %\ngo to x: (x) y: (y)\nset size to (30) %\nif <(type) = [3]> then\n    set size to (100) %\nend\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\n    set [visible v] to [1]\nelse\n    hide\n    set [visible v] to [0]\nend\nif <((old x) - (x)) > [0]> then\n    point in direction (-90)\nelse\n    point in direction (90)\nend\n\nwhen flag clicked\nhide\n\ndefine then rotate (time) secs\nset rotation style [all around v]\nset [type v] to [4]\nset [div v] to ((time) * (30))\n\ndefine then chase (time) secs to x: (x) (y)\nset [type v] to [3]\nset [orig x v] to (x)\nset [orig y v] to (y)\nset [move x v] to ((x) - (x))\nset [move y v] to ((y) - (y))\nset [div v] to ((30) * (time))\nset [offset v] to [0]\n\npoint towards (player v)\n\nforever\n\nwhen I receive [level select v]\nset [time v] to [0]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nif <(([y position v] of [player v]) + (Scroll y)) < (y)> then\n    change [move y v] by (-1)\nend\nif <(y) < (([y position v] of [player v]) + (Scroll y))> then\n    change [move y v] by (1)\nend\n\nif <(move y) > [5]> then\n    set [move y v] to [5]\nend\nif <[-5] > (move y)> then\n    set [move y v] to [-5]\nend\nchange [x v] by (move x)\nchange [y v] by (move y)\n\nFollow\n\npoint in direction ((TICK) * (div))\n\nthen glide [2] secs to x: [118] y: [1118]\n\n@Sprite7\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\nset size to (50) %\nshow\ngo to x: (-201) y: (-88)\nswitch costume to (costume1 v)\ngo to [front v] layer\nswitch costume to (costume1 v)\nshow\nforever\n    set size to (50) %\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (25)\n        if <mouse down?> then\n            stop all sounds\n            start sound [Collect v]\n            broadcast (level select v)\n        end\n    else\n        clear graphic effects\n    end\nend\n\nwhen I receive [level select v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [play game v]\nwait until <(Exit) = []>\nwait until <(Exit) = [win]>\nrepeat (10)\n    change size by (-5)\nend\nstop [other scripts in sprite v]\nhide\n\ngo to [front v] layer\n\n@Sprite12\n\nwhen flag clicked\nhide\n\nwhen I receive [boss battle v]\nstop all sounds\nset [player active v] to [0]\nshow\nset size to (100) %\ngo to [front v] layer\nset rotation style [left-right v]\ngo to x: (0) y: (140)\nswitch costume to (costume1 v)\nset [color v] effect to (0)\npoint in direction (-90)\nwait (1) seconds\nforever\n    Attack 1\n    Attack2\n    Attack3 \n    Attack 1\n    Attack 5\n    Attack 4\n    Attack2\n    Attack 7\n    Attack3 \n    Attack 6\nend\n\nwhen I receive [boss battle v]\nhide\nshow\nclear graphic effects\nset size to (100) %\nset rotation style [left-right v]\nset [level in v] to (Level)\nset [speed y v] to [0]\nset [hp v] to [25]\nswitch costume to (costume1 v)\nforever\n    if <<touching (player v)?> and <(([y position v] of [player v]) - (10)) < (y position)>> then\n        change [score v] by (1)\n        start sound [Fireballhit v]\n        set [exit v] to [die]\n    end\n    if <<touching (player v)?> and <(([y position v] of [player v]) - (10)) > (y position)>> then\n        if <(hp) > [0]> then\n            broadcast (bounce v)\n            change [hp v] by (-1)\n            change [brightness v] effect by (2)\n            start sound [pop2 v]\n            wait (0.2) seconds\n        else\n            broadcast (bounce v)\n            broadcast (boss defeated v)\n            stop [other scripts in sprite v]\n            change [hp v] by (-1)\n            switch costume to (costume1 v)\n            set size to (100) %\n            switch costume to (costume14 v)\n            switch costume to (costume1 v)\n            start sound [pop2 v]\n            start sound [BOOM v]\n            Shake [0]\n            switch costume to (costume1 v)\n            start sound [Teleport v]\n            repeat (100)\n                create clone of (sprite15 v)\n                change size by (-1)\n            end\n            hide\n            start sound [BOOM v]\n            wait (1) seconds\n            start sound [pop2 v]\n            set [exit v] to [win]\n        end\n    end\nend\n\nwait (0.1) seconds\n\nchange size by (-1)\n\ndelete this clone\n\nwait (0.3) seconds\n\ngo to x: (0) y: (140)\n\nswitch costume to (costume14 v)\nswitch costume to (costume2 v)\n\nwait (0.1) seconds\n\nforever\n\nwait (1) seconds\n\ndefine Attack 1\ngo to x: (0) y: (140)\nShake [0]\nstart sound [BOOM v]\nif <(pick random (1) to (2)) = [1]> then\n    point in direction (90)\nelse\n    point in direction (-90)\nend\nrepeat (10)\n    repeat (4)\n        move (3) steps\n    end\n    create clone of (sprite21 v)\nend\nturn right (180) degrees\nrepeat (20)\n    repeat (4)\n        move (3) steps\n    end\n    create clone of (sprite21 v)\nend\nturn right (180) degrees\nrepeat (10)\n    repeat (4)\n        move (3) steps\n    end\n    create clone of (sprite21 v)\nend\ngo to x: (0) y: (140)\nwait (1) seconds\n\ndefine Shake (0/90)\nif <(0/90) = [90]> then\n    repeat (10)\n        change x by (5)\n        wait (0.05) seconds\n        change x by (-5)\n        wait (0.05) seconds\n    end\nelse\n    if <(0/90) = [45]> then\n        repeat (10)\n            change x by (-5)\n            change y by (5)\n            wait (0.05) seconds\n            change x by (5)\n            change y by (-5)\n            wait (0.05) seconds\n        end\n    else\n        repeat (10)\n            change y by (5)\n            wait (0.05) seconds\n            change y by (-5)\n            wait (0.05) seconds\n        end\n    end\nend\n\ndefine Attack2\nShake [0]\nrepeat (3)\n    repeat (10)\n        create clone of (sprite9 v)\n        wait (0.1) seconds\n    end\n    wait (1) seconds\nend\n\ndefine Attack3 \ngo to x: (0) y: (140)\nShake [0]\nglide (0.5) secs to x: (-150) y: (140)\nstart sound [Fireballhit v]\nShake [0]\nglide (0.5) secs to x: (-150) y: (-40)\nstart sound [Fireballhit v]\nShake [90]\nglide (0.5) secs to x: (150) y: (-40)\nShake [0]\nstart sound [Fireballhit v]\nglide (0.5) secs to x: (150) y: (140)\nShake [90]\nstart sound [Fireballhit v]\nglide (0.5) secs to x: (0) y: (140)\nstart sound [Fireballhit v]\nwait (1) seconds\n\ndefine Attack 4\nShake [0]\ngo to x: (0) y: (140)\nglide (0.6) secs to x: (0) y: (-40)\nstart sound [Fireballhit v]\nwait (0.2) seconds\nShake [0]\nglide (0.3) secs to x: (0) y: (140)\nstart sound [Fireballhit v]\nShake [90]\ngo to x: (0) y: (140)\nglide (0.6) secs to x: (-150) y: (-40)\nstart sound [Fireballhit v]\nwait (0.2) seconds\nShake [0]\nglide (0.3) secs to x: (0) y: (140)\nstart sound [Fireballhit v]\nShake [90]\ngo to x: (0) y: (140)\nglide (0.6) secs to x: (150) y: (-40)\nstart sound [Fireballhit v]\nwait (0.2) seconds\nShake [0]\nglide (0.3) secs to x: (0) y: (140)\nstart sound [Fireballhit v]\nwait (1) seconds\n\nwait (1) seconds\npoint in direction (90)\n\nset [player active v] to [1]\n\ndefine Attack 5\nswitch costume to (costume15 v)\ngo to x: (0) y: (140)\nShake [90]\nglide (0.1) secs to x: (-150) y: (140)\nstart sound [Boom Cloud v]\nrepeat (5)\n    create clone of (sprite13 v)\nend\nShake [90]\nglide (0.1) secs to x: (150) y: (140)\nstart sound [Boom Cloud v]\nrepeat (5)\n    create clone of (sprite13 v)\nend\nShake [90]\nglide (0.1) secs to x: (-150) y: (140)\nstart sound [Boom Cloud v]\nrepeat (15)\n    create clone of (sprite13 v)\n    wait (0.2) seconds\nend\nglide (0.5) secs to x: (0) y: (140)\nwait (1) seconds\n\ndefine Attack 8\nShake [0]\nswitch costume to (costume15 v)\ngo to x: (201) y: (-60)\nrepeat (3)\n    switch costume to (costume52 v)\n    wait (0) seconds\n    repeat (3)\n        next costume\n    end\n    wait (0) seconds\n    switch costume to (costume52 v)\n    wait (0.1) seconds\nend\nswitch costume to (costume54 v)\nglide (0.5) secs to x: (201) y: (140)\nswitch costume to (costume56 v)\nstart sound [BOOM v]\nShake [90]\npoint in direction (180)\nrepeat (10)\n    change x by (-40.2)\n    create clone of (sprite21 v)\nend\nrepeat (3)\n    glide (0.5) secs to x: ([x position v] of [improved2 v]) y: (140)\nend\nShake [0]\nglide (0) secs to x: (x position) y: (-60)\nstart sound [BOOM v]\nrepeat (15)\n    create clone of (sprite13 v)\nend\nwait (2) seconds\nswitch costume to (costume15 v)\nglide (1) secs to x: (201) y: (-60)\nwait (1) seconds\npoint in direction (-90)\n\nglide (0.3) secs to x: (280) y: (140)\nhide\n\nwhen I receive [boss battle v]\nwait until <(Exit) = [die]>\nstop [other scripts in sprite v]\nwait until <(Exit) = []>\nbroadcast (boss battle v)\n\nwait (0) seconds\n\ndelete this clone\n\nwait (0.05) seconds\n\nstop [other scripts in sprite v]\n\nwhen I receive [play game v]\nwait until <(Level) = [5]>\nbroadcast (boss battle v)\n\n\n\nhide\n\nAttack 1\n\nAttack 1\nAttack 4\n\nsay [Hello!]\nsay []\n\nswitch costume to (costume44 v)\nShake [0]\nswitch costume to (costume45 v)\nset [speed y v] to [0]\npoint in direction (90)\nrepeat (100)\n    create clone of (sprite21 v)\n    turn left (91) degrees\nend\nswitch costume to (costume44 v)\ngo to x: (0) y: (60)\nglide (2) secs to x: (-100) y: (60)\nswitch costume to (costume44 v)\nrepeat (7)\n    next costume\nend\nglide (2) secs to x: (0) y: (60)\nrepeat (2)\n    wait (0) seconds\n    switch costume to ((costume [number v]) - (1))\nend\nShake [0]\nrepeat (60)\n    create clone of (sprite21 v)\n    change [speed y v] by (1)\n    turn right (speed y) degrees\nend\nswitch costume to (costume49 v)\nrepeat (12)\n    switch costume to ((costume [number v]) - (1))\nend\nShake [0]\nstart sound [Fireballhit v]\nglide (0.1) secs to x: (0) y: (-60)\nstart sound [BOOM v]\nrepeat (5)\n    create clone of (sprite13 v)\n    wait (0.2) seconds\nend\nwait (2) seconds\npoint in direction (90)\nswitch costume to (costume15 v)\nShake [90]\nglide (0.5) secs to x: (201) y: (-60)\nwait (1) seconds\npoint in direction (-90)\n\ndefine Attack 6\npoint in direction (90)\ngo to x: (0) y: (140)\nShake [90]\nstart sound [BOOM v]\nglide (0.3) secs to x: (150) y: (140)\nrepeat (30)\n    create clone of (sprite21 v)\nend\nShake [90]\nstart sound [BOOM v]\nglide (0.3) secs to x: (-150) y: (140)\nrepeat (30)\n    create clone of (sprite21 v)\nend\nrepeat (20)\n    repeat (3)\n        move (5) steps\n    end\n    create clone of (sprite21 v)\nend\nrepeat (20)\n    repeat (3)\n        move (-5) steps\n    end\n    create clone of (sprite21 v)\nend\nrepeat (10)\n    repeat (3)\n        move (5) steps\n    end\n    create clone of (sprite21 v)\nend\nwait (1) seconds\n\nrepeat (4)\n    move (3) steps\nend\n\ndefine Attack 7\nswitch costume to (costume1 v)\npoint in direction (90)\ngo to x: (0) y: (140)\nShake [90]\nrepeat (10)\n    switch costume to (costume2 v)\n    repeat (2)\n        change x by (8)\n        start sound [BOOM v]\n        next costume\n    end\nend\nrepeat (20)\n    switch costume to (costume2 v)\n    repeat (2)\n        change x by (-8)\n        start sound [BOOM v]\n        next costume\n    end\nend\nrepeat (10)\n    switch costume to (costume2 v)\n    repeat (2)\n        change x by (8)\n        start sound [BOOM v]\n        next costume\n    end\nend\nswitch costume to (costume1 v)\nwait (1) seconds\n\nwhen I receive [level select v]\nhide\nstop [other scripts in sprite v]\n\n@Sprite21\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\n\nwhen I start as a clone\nstart sound [pop2 v]\ngo [backward v] (5) layers\nshow\nswitch costume to (costume15 v)\npoint in direction (90)\ngo to (sprite12 v)\nclear graphic effects\nset [brightness v] effect to (0)\nchange y by (0)\npoint in direction (180)\nchange x by (pick random (-40) to (40))\nmove (0) steps\nset size to (10) %\nset size to (60) %\nset [sprite21: yvel v] to [15]\nrepeat until <<touching (_edge_ v)?> or <touching (platforms v)?>>\n    move (10) steps\n    if <touching (player v)?> then\n        broadcast (ouch v)\n        start sound [Fireballhit v]\n        set [exit v] to [die]\n    end\nend\nrepeat (10)\n    change size by (-6)\n    next costume\n    move (0) steps\nend\ndelete this clone\n\ngo to [front v] layer\n\npoint towards (player v)\n\ndelete this clone\n\nwhen I receive [spawn enemies v]\ndelete this clone\n\nwhen I receive [delete clone v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nnext costume\n\nwhen I receive [boss defeated v]\ndelete this clone\n\npoint towards (improved2 v)\n\nwhen I receive [reset v]\nhide\ndelete this clone\n\nwhen I receive [level select v]\nhide\ndelete this clone\n\n@Sprite9\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\n\nwhen I start as a clone\nstart sound [Laser2 v]\ngo [backward v] (5) layers\nshow\nswitch costume to (costume15 v)\npoint in direction (90)\ngo to (sprite12 v)\nclear graphic effects\nset [brightness v] effect to (25)\nchange y by (0)\npoint in direction (90)\npoint towards (player v)\nset size to (10) %\nset size to (60) %\nset [sprite9: yvel v] to [15]\nrepeat until <<touching (_edge_ v)?> or <touching (platforms v)?>>\n    next costume\n    move (5) steps\n    if <touching (player v)?> then\n        broadcast (ouch v)\n        start sound [Fireballhit v]\n        set [exit v] to [die]\n    end\nend\nrepeat (10)\n    change size by (-6)\n    next costume\nend\ndelete this clone\n\ndelete this clone\n\nwhen I receive [spawn enemies v]\ndelete this clone\n\nwhen I receive [delete clone v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nnext costume\n\nwhen I receive [boss defeated v]\ndelete this clone\n\nwhen I receive [reset v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [level select v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@Sprite13\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\n\nwhen I start as a clone\nstart sound [pop2 v]\ngo [backward v] (5) layers\nshow\nswitch costume to (costume15 v)\nset [brightness v] effect to (25)\npoint in direction (90)\ngo to (sprite12 v)\ngo to x: (pick random (-180) to (180)) y: (480)\npoint in direction (180)\nset rotation style [all around v]\nset size to (10) %\nrepeat (9)\n    change size by (10)\n    change y by (-1)\nend\nset size to (100) %\nwait (0.3) seconds\nset [sprite13: yvel v] to [0]\npoint towards (improved2 v)\nrepeat until <touching (platforms v)?>\n    move (7) steps\n    if <touching (player v)?> then\n        broadcast (ouch v)\n        start sound [Fireballhit v]\n        set [exit v] to [die]\n    end\nend\nrepeat (10)\n    change size by (-1)\nend\ndelete this clone\n\nchange [player hp v] by (-1)\ndelete this clone\n\nchange y by (-10)\n\nturn right (15) degrees\n\nchange y by (Sprite13: yvel)\nchange [sprite13: yvel v] by (-1)\n\nwhen I receive [spawn enemies v]\ndelete this clone\n\nwhen I receive [delete clone v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nnext costume\n\nwhen I receive [boss defeated v]\ndelete this clone\n\nwhen I receive [reset v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [level select v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@Sprite15\n\nwhen flag clicked\nhide\nset [clone or main? v] to [main]\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I start as a clone\nhide\nchange y by (-240)\nshow\nclear graphic effects\nset size to (200) %\ngo [backward v] (4) layers\nset [color v] effect to (0)\ngo to (sprite12 v)\nclear graphic effects\nset [yvel v] to [0]\nswitch costume to (costume1 v)\npoint in direction (pick random (180) to (-180))\nrepeat until <(y position) < [-180]>\n    move (10) steps\n    change [yvel v] by (-1)\n    change y by (yvel)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\n\n\nwhen I receive [reset level v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@Sprite8\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\nwait (10) seconds\nshow\n\nwhen this sprite clicked\nclear graphic effects\nswitch costume to (costume2 v)\nwait (0.4) seconds\nswitch costume to (costume1 v)\n\n
Hello, this is my newest, and best project yet. I worked REALLY hard on thhttps://scratch.mit.edu/mystuff/is. I won't say much about this except that it gets pretty hard at level 3. FULL SCREEN  HIGHLY RECOMENDED\n-----------------------------------------------------------------\n~arrow keys to move\n