VOID | an endless platformer

Instructions:                                 [!] Warning [!]\n~*=~*=~*=~*=~*=~*=~*=~*=~*=~*=~*=~*=~*=~*=~*=~\nMake sure that you play in full screen, otherwise the graphics won't be so good, and gameplay would be harder...\n~*=~*=~*=~*=~*=~*=~*=~*=~*=~*=~*=~*=~*=~*=~*=~\n                       ...You have been warned...\n                                          ;p

@Stage\n\nwhen flag clicked\nbroadcast (boot v)\nset [start v] to [0]\nset [score v] to [0]\nswitch backdrop to (start v)\nset [brightness v] effect to (-50)\n\nwhen I receive [new danger v]\nif <not <(start) = [0]>> then\n    wait (pick random (0.5) to (1)) seconds\n    if <(pick random (1) to (2)) = [2]> then\n        broadcast (spike v)\n    else\n        broadcast (spear v)\n    end\n    stop [this script v]\nelse\n    stop [this script v]\nend\n\nwhen I receive [shake v]\nif <not <(start) = [0]>> then\n    switch backdrop to (backdrop1 v)\n    repeat (15)\n        if <not <(start) = [0]>> then\n            switch backdrop to (backdrop2 v)\n            wait () seconds\n            switch backdrop to (backdrop3 v)\n            wait () seconds\n            switch backdrop to (backdrop4 v)\n            wait () seconds\n            switch backdrop to (backdrop5 v)\n        else\n            switch backdrop to (title background2 v)\n            stop [this script v]\n        end\n    end\n    switch backdrop to (backdrop1 v)\nend\n\nwhen I receive [boot v]\nstop [other scripts in sprite v]\nbroadcast (boot=over v)\nstop [this script v]\n\nwhen I receive [start v]\nwait (0.6) seconds\nswitch backdrop to (backdrop1 v)\nwait (0.9) seconds\nbroadcast (new danger v)\nbroadcast (New danger#2 v)\n\nwhen I receive [new danger#2 v]\nforever\n    wait (pick random (2) to (5)) seconds\n    create clone of (rockets v)\n    wait () seconds\nend\n\nwhen I receive [new danger#2 v]\nforever\n    wait (pick random (2) to (3)) seconds\n    create clone of (bombs v)\n    wait () seconds\nend\n\nwhen I receive [new danger#2 v]\nforever\n    wait (pick random (15) to (30)) seconds\n    create clone of (healing item v)\n    wait () seconds\nend\n\nwhen I receive [new danger#2 v]\nforever\n    wait (pick random (5) to (12)) seconds\n    create clone of (lasers v)\n    wait () seconds\nend\n\nwhen I receive [start v]\nwait (1) seconds\nset [score v] to [0]\nforever\n    wait (0.08) seconds\n    change [score v] by (1)\nend\n\nwhen I receive [start v]\nset [score v] to [0]\n\nwhen I receive [shake#2 v]\nif <not <(start) = [0]>> then\n    switch backdrop to (backdrop1 v)\n    repeat (2)\n        if <not <(start) = [0]>> then\n            switch backdrop to (backdrop1 v)\n            wait () seconds\n            switch backdrop to (backdrop2 v)\n            wait () seconds\n            switch backdrop to (backdrop3 v)\n            wait () seconds\n            switch backdrop to (backdrop4 v)\n            wait () seconds\n            switch backdrop to (backdrop5 v)\n        else\n            switch backdrop to (title background2 v)\n            stop [this script v]\n        end\n    end\n    switch backdrop to (backdrop1 v)\nend\n\nwhen I receive [hurt v]\nif <not <(start) = [0]>> then\n    switch backdrop to (backdrop1 v)\n    repeat (2)\n        if <not <(start) = [0]>> then\n            switch backdrop to (backdrop2 v)\n            wait () seconds\n            switch backdrop to (backdrop3 v)\n            wait () seconds\n            switch backdrop to (backdrop4 v)\n            wait () seconds\n            switch backdrop to (backdrop5 v)\n        else\n            switch backdrop to (title background2 v)\n            stop [this script v]\n        end\n    end\n    switch backdrop to (backdrop1 v)\nend\n\nwhen I receive [end v]\nbroadcast (d v)\nbroadcast (d2 v)\nbroadcast (d3 v)\nstop [other scripts in sprite v]\nwait (0.8) seconds\nrepeat (10)\n    switch backdrop to (title background2 v)\nend\nstop [this script v]\n\nwhen I receive [show v]\nwait (0.2) seconds\nswitch backdrop to (title background2 v)\nclear graphic effects\n\n@Blank\n\n@Intro\n\nwhen flag clicked\nset [game start v] to [0]\nIntro\nbroadcast (show v)\nset [game start v] to [1]\n\ndefine Particles\nswitch costume to (particle v)\nrepeat (10)\n    create clone of (_myself_ v)\nend\n\ndefine Intro\nstart sound [DJVI - Supercharge v]\nhide\nset size to (100) %\ngo to x: (0) y: (0)\npoint in direction (90)\nset [ghost v] effect to (0)\nset [brightness v] effect to (0)\nset [@introbroad v] to [1]\nswitch costume to (logo v)\ncreate clone of (_myself_ v)\nswitch costume to (filler v)\nset [brightness v] effect to (30)\nrepeat (5)\n    create clone of (_myself_ v)\n    change [brightness v] effect by (-10)\n    wait (0.05) seconds\nend\nset [brightness v] effect to (0)\nwait (.7) seconds\nset [@introbroad v] to [2]\nwait until <(@IntroBroad) = [3]>\nParticles\nswitch costume to (name v)\ncreate clone of (_myself_ v)\nwait (2.7) seconds\nset [@introbroad v] to [4]\n\nwhen I start as a clone\nif <(costume [name v]) = [Logo]> then\n    wait (.3) seconds\n    show\n    set size to (0) %\n    set [i v] to [-179]\n    point in direction (i)\n    set [i v] to [0]\n    repeat until <(@IntroBroad) = [2]>\n        go to [front v] layer\n        set [i v] to (((i) * (.8)) + (((150) - (size)) / (15)))\n        change size by (i)\n        turn right (((90) - (direction)) / (5)) degrees\n    end\n    repeat (20)\n        switch costume to (blank v)\n        set size to (i) %\n        change size by (((250) - (size)) / (3))\n        set [i v] to (size)\n        switch costume to (logo v)\n    end\n    set [@introbroad v] to [3]\n    delete this clone\nelse\n    if <(costume [name v]) = [Filler]> then\n        show\n        go to x: (0) y: (5000)\n        repeat until <(round (y position)) = [0]>\n            change y by (((0) - (y position)) / (3))\n        end\n        wait until <(@IntroBroad) = [3]>\n        delete this clone\n    else\n        if <(costume [name v]) = [Name]> then\n            wait (.1) seconds\n            show\n            set [i v] to [0]\n            set size to (i) %\n            repeat until <(@IntroBroad) = [4]>\n                go to [front v] layer\n                set [i v] to (((i) * (.8)) + (((100) - (size)) / (5)))\n                change size by (i)\n                point in direction ((90) + ((3) * ([cos v] of ((timer) * (180)) )))\n                set y to ((10) * ([cos v] of (((timer) - (1)) * (200)) ))\n            end\n            set [i v] to [0]\n            repeat (20)\n                change [ghost v] effect by (5)\n                change size by ([tan v] of (i) )\n                change [i v] by (5)\n                point in direction ((90) + ((3) * ([cos v] of ((timer) * (180)) )))\n                set y to ((10) * ([cos v] of (((timer) - (1)) * (200)) ))\n            end\n            set [@introbroad v] to [0]\n            delete this clone\n        else\n            if <(costume [name v]) = [Particle]> then\n                show\n                set size to (pick random (80) to (250)) %\n                set [i v] to (pick random (-5) to (5))\n                set [i2 v] to (pick random (10) to (20))\n                set [ghost v] effect to (pick random (20) to (50))\n                set [brightness v] effect to (pick random (-70) to (20))\n                repeat until <touching (_edge_ v)?>\n                    change [ghost v] effect by (1)\n                    change x by (i)\n                    change y by (i2)\n                    change [i2 v] by (-2)\n                end\n                delete this clone\n            else\n                if <(costume [name v]) = [Borders]> then\n                    if <(@IntroBroad) = [5]> then\n                        set [i v] to [1]\n                    else\n                        wait (0.05) seconds\n                        set [i v] to [2]\n                    end\n                    show\n                    go to [front v] layer\n                    set size to (100) %\n                    set [ghost v] effect to (0)\n                    if <(i) = [1]> then\n                        go to x: (-500) y: (90)\n                    else\n                        go to x: (500) y: (-90)\n                    end\n                    repeat (20)\n                        change x by (((0) - (x position)) / (4))\n                    end\n                    set x to (0)\n                    if <(i) = [1]> then\n                        repeat (20)\n                            change [ghost v] effect by (5)\n                            change size by (((0) - (size)) / (4))\n                            change y by (((240) - (y position)) / (6))\n                        end\n                    else\n                        repeat (20)\n                            change [ghost v] effect by (5)\n                            change size by (((0) - (size)) / (4))\n                            change y by (((-240) - (y position)) / (6))\n                        end\n                    end\n                    delete this clone\n                end\n            end\n        end\n    end\nend\n\nwait (0.05) seconds\nswitch costume to (borders v)\ncreate clone of (_myself_ v)\nwait (0.05) seconds\nset [@introbroad v] to [5]\ncreate clone of (_myself_ v)\n\n@shading\n\nwhen flag clicked\nshow\nrepeat (2)\n    go to [front v] layer\nend\nswitch costume to (dot v)\nset size to (450) %\nswitch costume to (darkenss v)\n\nwhen I receive [position v]\ngo to (player sprite v)\n\nwhen I receive [die v]\nglide (0.1) secs to x: (0) y: (0)\n\nwhen I receive [die v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nset [ghost v] effect to (100)\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\nwhen [timer v] > (redstop_timer)\nforever\n    go to [back v] layer\n    hide\nend\n\nwhen flag clicked\nforever\n    if <(die?) = [0]> then\n        if <(Health) > [2]> then\n            set [ghost v] effect to (100)\n        else\n            if <(Health) > [1]> then\n                set [ghost v] effect to (70)\n            else\n                if <(Health) > [0]> then\n                    set [ghost v] effect to (35)\n                else\n                    set [ghost v] effect to (0)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [boot v]\nforever\n    go to [back v] layer\n    hide\n    if <(start) = [1]> then\n        repeat (5)\n            go to [front v] layer\n        end\n        show\n        stop [this script v]\n    end\nend\n\n@Player sprite\n\ndefine Physics (friction) (stiffness)\nset [yv v] to [0]\nset [xv v] to [0]\nset [direction v] to [0]\nif <not <touching (ground v)?>> then\n    change [yv v] by (-1.15)\nend\nchange y by (YV)\nif <touching (ground v)?> then\n    repeat ([abs v] of ([ceiling v] of (YV) ) )\n        change y by ((([abs v] of (YV) ) / (YV)) * (-1))\n    end\n    set [yv v] to [1]\nend\nchange x by (XV)\nif <touching (ground v)?> then\n    set [slope v] to [0]\n    repeat until <<(Slope) = [-8]> or <not <touching (ground v)?>>>\n        change [slope v] by (-1)\n        change y by (1)\n    end\n    if <(Slope) = [-8]> then\n        change y by (Slope)\n        repeat ([abs v] of ([ceiling v] of (XV) ) )\n            change x by ((([abs v] of (XV) ) / (XV)) * (-1))\n        end\n        set [xv v] to [0]\n    end\nend\nturn right (Direction) degrees\nset [direction v] to ((Direction) * (stiffness))\nset [xv v] to ((XV) * (friction))\n\nwhen I receive [die v]\nshow\nclear graphic effects\nset [move v] to [0]\nset [yv v] to [0]\nset [xv v] to [0]\nset [direction v] to [0]\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [lock v] to [0]\nswitch costume to (death particles v)\nrepeat (2)\n    clone\nend\nset rotation style [all around v]\nrepeat (10)\n    go to x: ((x position) + (pick random (-2) to (2))) y: ((y position) + (pick random (-2) to (2)))\n    if <(direction) > [1]> then\n        switch costume to (die2 v)\n        turn left (1) degrees\n    else\n        switch costume to (die v)\n        turn right (1) degrees\n    end\n    go to [front v] layer\n    change size by (25)\n    change [ghost v] effect by (9)\nend\nset rotation style [left-right v]\nhide\n\ndefine clone\nrepeat (2)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\nif <(costume [number v]) = [4]> then\n    set [brightness v] effect to (pick random (-20) to (50))\n    set [ghost v] effect to (pick random (-15) to (30))\n    set [color v] effect to (pick random (-10) to (10))\n    set size to (pick random (200) to (500)) %\n    go to x: ((x position) + (pick random (-4) to (4))) y: ((y position) + (pick random (-4) to (4)))\n    point in direction (pick random (-60) to (60))\n    repeat (7)\n        move (pick random (0) to (20)) steps\n    end\n    wait () seconds\n    move (1) steps\n    forever\n        Physics [0.35] [0.8]\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [4]> then\n    wait (pick random (0.3) to (0.8)) seconds\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\ndefine turn (turn amount)\nif <(pick random (1) to (2)) = [1]> then\n    repeat (3)\n        turn right (turn amount) degrees\n    end\nelse\n    repeat (3)\n        turn left (turn amount) degrees\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [4]> then\n    wait (0.12) seconds\n    repeat (2)\n        turn (pick random (1) to (15))\n    end\nend\n\nwhen I receive [die v]\nset [pitch v] effect to (pick random (80) to (-50))\nstart sound [die v]\nwait (0.8) seconds\npoint in direction (90)\ngo to x: (0) y: (0)\nswitch costume to (player v)\nset size to (300) %\nshow\nrepeat (5)\n    set [ghost v] effect to (50)\n    wait (0.1) seconds\n    set [ghost v] effect to (0)\n    wait (0.1) seconds\nend\nset [move v] to [1]\nset [yv v] to [0]\nset [xv v] to [0]\nset [direction v] to [0]\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [lock v] to [0]\n\nwhen I receive [die v]\nset [die? v] to [1]\nwait (1) seconds\nset [die? v] to [0]\n\nwhen I receive [hurt v]\nchange [health v] by (-1)\nset [pitch v] effect to (pick random (10) to (-110))\nstart sound [damage v]\nrepeat (3)\n    set [ghost v] effect to (50)\n    wait (0.1) seconds\n    set [ghost v] effect to (0)\n    wait (0.1) seconds\nend\n\nwhen [r v] key pressed\nif <(move) = [1]> then\n    broadcast (die v)\nend\n\nwhen I receive [heal v]\nrepeat (5)\n    set [ghost v] effect to (50)\n    wait (0.1) seconds\n    set [ghost v] effect to (0)\n    wait (0.1) seconds\nend\n\nwhen [timer v] > (redstop_timer)\nhide\n\nwhen I receive [boot v]\nhide\n\nwhen I receive [start v]\nset [health v] to [3]\nwait (1.35) seconds\nset [move v] to [1]\nshow\ndelete this clone\n\nwhen I receive [end v]\nset [die? v] to [0]\nset [lock v] to [0]\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [sound v] to [0]\nset [health v] to [3]\nstop [other scripts in sprite v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nwait (0.45) seconds\ndelete this clone\n\nwhen I receive [start v]\nwait (1.3) seconds\nset rotation style [left-right v]\npoint in direction (90)\ngo to x: (0) y: (0)\nset [die? v] to [0]\nset [lock v] to [0]\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [sound v] to [0]\nset [health v] to [3]\nset size to (300) %\ngo to [front v] layer\nclear graphic effects\nforever\n    go to [front v] layer\n    if <(start) = [1]> then\n        if <(move) = [1]> then\n            if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n                point in direction (90)\n                change [speed x v] by (1)\n            end\n            if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n                point in direction (-90)\n                change [speed x v] by (-1)\n            end\n            change x by (speed X)\n            if <<touching (ground v)?> or <touching (walls v)?>> then\n                change x by ((speed X) * (-1))\n                set [speed x v] to [0]\n            else\n                set [speed x v] to ((speed X) * (0.9))\n            end\n            change y by (speed Y)\n            if <<touching (ground v)?> or <touching (walls v)?>> then\n                change y by ((speed Y) * (-1))\n                set [speed y v] to [0]\n                if <(Lock) = [0]> then\n                    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                        set [pitch v] effect to (pick random (-30) to (30))\n                        if <(touching bottom) = [0]> then\n                            start sound [Jump v]\n                        end\n                        set [speed y v] to [14]\n                        set [lock v] to [1]\n                    end\n                end\n            else\n                change [speed y v] by (-1)\n                set [lock v] to [0]\n            end\n        end\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(move) = [1]> then\n        if <(y position) < [-175]> then\n            broadcast (die v)\n            wait (1) seconds\n        end\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Healing) = [0]> then\n        if <(move) = [1]> then\n            if <(Laser can hurt) = [1]> then\n                if <touching (lasers v)?> then\n                    if <not <(Health) = [0]>> then\n                        broadcast (Hurt v)\n                    else\n                        broadcast (die v)\n                    end\n                    wait (1) seconds\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(move) = [1]> then\n        if <<<touching (upper / lower dangers v)?> or <touching (rockets v)?>> or <touching (bombs v)?>> then\n            if <not <(Health) = [0]>> then\n                broadcast (Hurt v)\n            else\n                broadcast (die v)\n            end\n            wait (1) seconds\n        end\n    end\nend\n\nwhen I receive [start v]\nforever\n    broadcast (position v)\nend\n\nwhen I receive [start v]\npoint in direction (90)\nset [yv v] to [0]\nset [xv v] to [0]\nset [direction v] to [0]\nswitch costume to (player v)\n\nwhen I receive [boot v]\ngo to x: (0) y: (0)\n\n@Health\n\nwhen I receive [start v]\nwait (0.6) seconds\nshow\n\nwhen flag clicked\nclear graphic effects\nswitch costume to (full v)\npoint in direction (90)\ngo to x: ([x position v] of [player sprite v]) y: (([y position v] of [player sprite v]) + (30))\n\nwhen flag clicked\nforever\n    if <(die?) = [0]> then\n        if <<<touching (mouse-pointer v)?> or <touching (ground v)?>> or <touching (walls v)?>> then\n            repeat (10)\n                if <not <<<touching (mouse-pointer v)?> or <touching (ground v)?>> or <touching (walls v)?>>> then\n                    clear graphic effects\n                end\n                change [ghost v] effect by (6)\n            end\n            wait until <not <<<touching (mouse-pointer v)?> or <touching (ground v)?>> or <touching (walls v)?>>>\n        else\n            repeat (10)\n                change [ghost v] effect by (-10)\n            end\n            wait until <<<touching (mouse-pointer v)?> or <touching (ground v)?>> or <touching (walls v)?>>\n        end\n    end\nend\n\nwhen I receive [die v]\nset [y speed v] to [15]\npoint in direction (pick random (-45) to (45))\nrepeat (30)\n    change [ghost v] effect by (5)\n    turn right (9) degrees\n    change [y speed v] by (-1.5)\n    change y by (Y speed)\nend\nswitch costume to (full v)\nset [health v] to [3]\nwait (0.5) seconds\nset [ghost v] effect to (0)\npoint in direction (90)\ngo to x: ([x position v] of [player sprite v]) y: (([y position v] of [player sprite v]) + (30))\nset [y speed v] to [15]\n\nwhen I receive [heal v]\nif <(Health) < [3]> then\n    change [health v] by (pick random (2) to (3))\nend\nif <(Health) > [3]> then\n    set [health v] to [3]\nend\n\nwhen flag clicked\nshow\nforever\n    switch costume to ((Health) + (2))\nend\n\nwhen [timer v] > (redstop_timer)\nhide\n\nwhen I receive [boot v]\nhide\n\nwhen I receive [end v]\nhide\n\nwhen I receive [hurt v]\nset [hurt v] to [1]\nwait (0.6) seconds\nset [hurt v] to [0]\n\nwhen I receive [position v]\nif <(die?) = [0]> then\n    point in direction (90)\n    go to x: ([x position v] of [player sprite v]) y: (([y position v] of [player sprite v]) + (30))\nend\n\n@Ground\n\nwhen flag clicked\nshow\ngo to [front v] layer\nforever\n    set size to (250) %\n    go to x: (0) y: (-110)\nend\n\nwhen [timer v] > (redstop_timer)\nhide\n\nwhen I receive [boot v]\nhide\n\nwhen I receive [start v]\nwait (0.6) seconds\nshow\n\nwhen I receive [end v]\nwait (0.6) seconds\nhide\n\n@Walls\n\nwhen I receive [end v]\nwait (0.6) seconds\nhide\n\nwhen I receive [start v]\nwait (0.6) seconds\nshow\n\nwhen flag clicked\nshow\ngo to [front v] layer\nforever\n    set size to (250) %\n    go to x: (0) y: (-100)\nend\n\nwhen [timer v] > (redstop_timer)\nhide\n\nwhen I receive [boot v]\nhide\n\n@Level detection\n\nwhen I receive [start v]\nshow\n\nwhen flag clicked\nshow\nforever\n    set size to (250) %\n    go to x: (0) y: (-110)\n    set [ghost v] effect to (100)\n    if <touching (player sprite v)?> then\n        set [touching bottom v] to [1]\n    else\n        set [touching bottom v] to [0]\n    end\nend\n\nwhen [timer v] > (redstop_timer)\nhide\n\n@effects\n\nwhen flag clicked\nhide\ngo to x: (0) y: (-130)\nswitch costume to (costume2 v)\nset [ghost v] effect to (20)\nrepeat (5)\n    go to [front v] layer\nend\nforever\n    change y by ([cos v] of ((timer) * (120)) )\nend\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nswitch costume to (costume1 v)\ngo to x: (pick random (-250) to (250)) y: (-180)\nset [brightness v] effect to (pick random (-60) to (20))\nset [ghost v] effect to (pick random (0) to (10))\nset size to (pick random (10) to (300)) %\nrepeat (30)\n    change [ghost v] effect by (4)\n    change y by (4)\n    turn right (7) degrees\nend\ndelete this clone\n\nwhen I receive [start v]\nwait (0.6) seconds\ngo to [back v] layer\n\nwhen I receive [show v]\nwait (0.2) seconds\nshow\n\n@Upper / lower Dangers\n\nwhen I receive [spear v]\nswitch costume to (spear v)\nhide\npoint towards (player sprite v)\ngo to x: (pick random (-225) to (225)) y: (180)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(costume [number v]) = [4]> then\n    point towards (player sprite v)\n    repeat until <(y position) < [-179]>\n        move (14) steps\n    end\n    repeat (2)\n        move (14) steps\n    end\n    broadcast (new danger v)\n    delete this clone\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [spike v]\nif <(pick random (1) to (2)) = [2]> then\n    point in direction (180)\n    go to x: (pick random (-172) to (172)) y: (180)\n    set [up/down v] to [90]\n    set [set_x v] to (x position)\nelse\n    point in direction (0)\n    go to x: (pick random (-172) to (172)) y: (-180)\n    set [up/down v] to [-90]\n    set [set_x v] to (x position)\nend\ncreate clone of (warning v)\nswitch costume to (pick random (1) to (3))\nhide\nwait (0.8) seconds\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <<<(costume [number v]) = [1]> or <(costume [number v]) = [2]>> or <(costume [number v]) = [3]>> then\n    repeat (23)\n        move (16) steps\n    end\n    move (16) steps\n    broadcast (new danger v)\n    delete this clone\nend\n\nwhen I start as a clone\nshow\n\nwhen I receive [end v]\nwait (0.4) seconds\nhide\nstop [other scripts in sprite v]\nbroadcast (d v)\ndelete this clone\n\nwhen I receive [d v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@bombs\n\nwhen I start as a clone\nshow\nset size to (250) %\npoint in direction (pick random (0) to (360))\ngo to x: (pick random (-200) to (200)) y: (180)\nfall\n\nwhen flag clicked\nset [bomb fall v] to [-0.5]\nswitch costume to (bomb v)\nhide\n\ndefine fall\nrepeat until <<<<<touching (ground v)?> or <touching (upper / lower dangers v)?>> or <touching (rockets v)?>> or <touching (player sprite v)?>> or <(y position) < [-175]>>\n    change y by (bomb fall)\n    change [bomb fall v] by (-0.5)\nend\nif <(y position) < [-175]> then\n    boom\nend\nchange y by (5)\nboom\n\ndefine boom\nbroadcast (shake#2 v)\nset [bomb fall v] to [-0.5]\nset [pitch v] effect to (pick random (-20) to (60))\nstart sound [Bombexplosion v]\nswitch costume to (bomb v)\nrepeat (9)\n    point in direction (90)\n    next costume\nend\ndelete this clone\n\nwhen I receive [end v]\nwait (0.4) seconds\nstop [other scripts in sprite v]\nbroadcast (d2 v)\ndelete this clone\n\nwhen I receive [d2 v]\nhide\ndelete this clone\n\n@warning\n\nwhen flag clicked\nhide\nset size to (600) %\ngo to [back v] layer\n\nwhen I start as a clone\nset [ghost v] effect to (50)\nset [brightness v] effect to (15)\nset x to (set_X)\nshow\nwait (0.8) seconds\ndelete this clone\n\nwhen I receive [end v]\nwait (0.4) seconds\nstop [other scripts in sprite v]\ndelete this clone\n\n@rockets\n\nwhen flag clicked\nswitch costume to (rocket v)\nhide\n\nwhen I start as a clone\nshow\nif <(pick random (1) to (2)) = [2]> then\n    go to x: (235) y: (pick random (180) to (-180))\nelse\n    go to x: (-235) y: (pick random (180) to (-180))\nend\nrepeat (6)\n    point towards (player sprite v)\n    move (10) steps\nend\nrepeat until <<<<touching (player sprite v)?> or <touching (ground v)?>> or <touching (bombs v)?>> or <touching (upper / lower dangers v)?>>\n    point towards (player sprite v)\n    move (2) steps\nend\nBoom\n\nwhen I start as a clone\nrepeat (8)\n    wait (0.4) seconds\n    set [brightness v] effect to (45)\n    wait (0.4) seconds\n    set [brightness v] effect to (0)\nend\nBoom\n\ndefine Boom\nbroadcast (shake#2 v)\nset [pitch v] effect to (pick random (20) to (-60))\nstart sound [rocketexplode v]\nswitch costume to (rocket v)\nwait () seconds\nrepeat (7)\n    point in direction (90)\n    next costume\nend\ndelete this clone\n\nwhen I receive [end v]\nwait (0.4) seconds\nstop [other scripts in sprite v]\nbroadcast (d3 v)\ndelete this clone\n\nwhen I receive [d3 v]\nhide\ndelete this clone\n\n@Thumbnail\n\nwhen flag clicked\nhide\nswitch costume to (costume9 v)\nrepeat (3)\n    hide\n    go to [front v] layer\nend\nforever\n    go to [front v] layer\n    go to x: (0) y: (0)\n    set [redstop_timer v] to ((timer) + (0.0001))\nend\n\nwhen [timer v] > (redstop_timer)\ngo to [front v] layer\nshow\nstop [this script v]\n\n@assets\n\nwhen flag clicked\nforever\n    set size to (300) %\n    go to x: (0) y: (0)\n    go to [back v] layer\nend\n\n@lasers\n\nwhen flag clicked\nset [laser can hurt v] to [0]\nswitch costume to (dot v)\nset size to (300) %\nhide\n\nwhen I start as a clone\nshow\nset [pitch v] effect to (80)\nstart sound [laser#2 v]\nbroadcast (lasers v)\ngo to [back v] layer\nset [ghost v] effect to (90)\nset [brightness v] effect to (80)\npoint in direction (pick random (0) to (360))\ngo to x: (0) y: (pick random (-150) to (120))\nshow\n\ndefine show\nswitch costume to (laser v)\nbroadcast (shake v)\nrepeat (50)\n    switch costume to (dot v)\n    change size by (6)\n    switch costume to (laser v)\n    change [ghost v] effect by (-0.8)\n    change [brightness v] effect by (-1.4)\nend\nstart sound [laser v]\nswitch costume to (dot v)\nset size to (700) %\nswitch costume to (laser v)\nset [ghost v] effect to (0)\nset [brightness v] effect to (15)\nset [laser can hurt v] to [1]\nwait (0.7) seconds\nrepeat (10)\n    switch costume to (dot v)\n    change size by (-20)\n    switch costume to (laser v)\n    change [ghost v] effect by (10)\nend\nset [laser can hurt v] to [0]\ndelete this clone\n\nwhen I start as a clone\nrepeat (25)\n    change [brightness v] effect by (20)\n    wait (0.05) seconds\n    change [brightness v] effect by (-20)\n    wait (0.05) seconds\nend\n\nwhen I receive [end v]\nset volume to (0) %\ndelete this clone\n\nwhen I receive [start v]\nset volume to (100) %\n\n@Healing item\n\nwhen flag clicked\nhide\ngo to [back v] layer\nforever\n    set size to (250) %\nend\n\nwhen I start as a clone\nswitch costume to (pick random (1) to (2))\nshow\ngo to x: (pick random (-200) to (200)) y: (180)\nfall\n\ndefine fall\nrepeat until <<touching (ground v)?> or <(y position) < [-175]>>\n    change y by (-1)\nend\nif <(y position) < [-175]> then\n    wait () seconds\n    repeat (7)\n        change y by (-1)\n    end\n    wait () seconds\n    delete this clone\nend\nchange y by (0.5)\n\nwhen I start as a clone\nforever\n    if <touching (player sprite v)?> then\n        broadcast (Heal v)\n        set [pitch v] effect to (pick random (60) to (-60))\n        start sound (pick random (1) to (5))\n        wait (0.05) seconds\n        delete this clone\n    end\nend\n\nwhen I receive [heal v]\nset [healing v] to [1]\nwait (1) seconds\nset [healing v] to [0]\n\nwhen [timer v] > (redstop_timer)\nhide\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@Title screen\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\nset size to (110) %\npoint in direction (90)\nswitch costume to (play? v)\ncreate clone of (_myself_ v)\nswitch costume to (title v)\nset size to (130) %\nforever\n    go to [front v] layer\n    go to x: (0) y: (95)\n    change size by ([cos v] of ((timer) * (200)) )\nend\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [2]> then\n        go to [front v] layer\n        go to x: (0) y: (-40)\n    end\nend\n\nwhen [timer v] > (redstop_timer)\nhide\n\nwhen I start as a clone\nforever\n    if <(game start) = [1]> then\n        if <(start) = [0]> then\n            if <(costume [number v]) = [2]> then\n                if <touching (mouse-pointer v)?> then\n                    change size by (((135) - (size)) / (7))\n                    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                        broadcast (start v)\n                        wait until <not <mouse down?>>\n                    end\n                else\n                    change size by (((110) - (size)) / (7))\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [start v]\nshow\nstart sound [start#2 v]\nrepeat (5)\n    change [ghost v] effect by (20)\n    change [pixelate v] effect by (20)\nend\nhide\n\nwhen I receive [start v]\nset [start v] to [1]\n\nwhen I receive [end v]\nwait (1.3) seconds\nset [start v] to [0]\n\nwhen I receive [show v]\nwait (0.2) seconds\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\n\nwhen I receive [end v]\nwait (1.3) seconds\nshow\nrepeat (5)\n    change [ghost v] effect by (-20)\n    change [pixelate v] effect by (-20)\nend\nclear graphic effects\n\nwhen flag clicked\nrepeat (10)\n    show\nend\n\nwhen I start as a clone\nrepeat (10)\n    show\nend\n\n@title background\n\nwhen I receive [start v]\nwait (0.1) seconds\nrepeat (5)\n    change [ghost v] effect by (-4)\nend\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [start v]\nrepeat (3)\n    go to [front v] layer\nend\n\nwhen I receive [boot v]\nhide\nset [ghost v] effect to (15)\ngo to [back v] layer\n\nwhen I receive [end v]\nwait (0.1) seconds\nrepeat (10)\n    change [ghost v] effect by (-10)\n    go to [front v] layer\nend\nwait (1) seconds\nrepeat (5)\n    change [ghost v] effect by (4)\nend\n\nwhen I receive [show v]\nwait (0.2) seconds\nshow\n\n@Music\n\nwhen I receive [end v]\nrepeat (25)\n    change [pitch v] effect by (-4)\n    change volume by (-3)\nend\nwait () seconds\nrepeat (10)\n    change [pitch v] effect by (10)\n    change volume by (10)\nend\nclear sound effects\n\nwhen I receive [show v]\nwait (0.6) seconds\nrepeat (100)\n    change volume by (1)\nend\nwait () seconds\nclear sound effects\n\nwhen flag clicked\nset volume to (0) %\nforever\n    play sound [Portal 2 Soundtrack - Wheatley Battle \( BOSS \) v] until done\nend\n\n@Life UI\n\nwhen I receive [die v]\nrepeat (7)\n    go to x: (pick random (-204) to (-202)) y: (pick random (156) to (154))\n    wait () seconds\n    go to x: (-203) y: (155)\nend\nnext costume\n\nwhen I receive [boot v]\nswitch costume to (costume1 v)\nset size to (250) %\nset [ghost v] effect to (100)\nhide\n\nshow\n\nwhen I receive [start v]\nwait (1.35) seconds\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [start v]\nforever\n    go to [front v] layer\n    go to [front v] layer\n    hide\nend\n\nwhen I receive [start v]\nswitch costume to (costume1 v)\nwait () seconds\nforever\nend\n\nif <(costume [number v]) = [5]> then\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    broadcast (end v)\n    stop [this script v]\nend\n\nwhen I receive [die v]\nwait (0.5) seconds\nbroadcast (end v)\nstop [this script v]\n\n@Points\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    front\nend\n\nwhen flag clicked\nset size to (250) %\nset [brightness v] effect to (80)\nhide\nset [x position of numbers v] to [-220]\nset [the number v] to [0]\nset [maximum length v] to [15]\nset [width between numbers v] to [20]\ngo to x: (x position of numbers) y: (160)\nrepeat (maximum length)\n    set [the number v] to (score)\n    create clone of (_myself_ v)\n    change x by (width between numbers)\nend\n\nwhen I start as a clone\nswitch costume to (0 v)\ngo to [front v] layer\nforever\n    switch costume to (letter ((((x position) - (x position of numbers)) / (width between numbers)) + (1)) of (score))\n    if <(letter ((((x position) - (x position of numbers)) / (width between numbers)) + (1)) of (score)) = []> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I start as a clone\nrepeat (7)\n    front\n    go to [front v] layer\nend\nforever\n    go to [front v] layer\nend\n\nwhen I receive [start v]\nforever\n    go to [front v] layer\n    front\nend\n\ndefine front\ngo to [front v] layer\nrepeat (10)\n    go to [front v] layer\nend\n\n