Light - Platformer
@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [dead v]\nswitch backdrop to (backdrop3 v)\n\nwhen flag clicked\nplay sound [recording1 v] until done\n\nwhen I receive [boss v]\nrepeat until <(backdrop [number v]) = [2]>\n    play sound [boss v] until done\nend\n\nwhen I receive [to be con v]\nswitch backdrop to (backdrop3 v)\n\nwhen I receive [world v]\nswitch backdrop to (backdrop2 v)\n\n@Player\n\nwhen I receive [dead v]\nhide\nstop [other scripts in sprite v]\n\nwhen flag clicked\nhide\ngo to x: (-12) y: (-999)\n\nwhen flag clicked\nforever\n    if <(y position) > [-10]> then\n        if <(level) = [1]> then\n            broadcast (yo v)\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [logo end v]\nset size to (50) %\nwait (0.8) seconds\nshow\ngo to x: (-222) y: (-80)\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <touching (water v)?> then\n        if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n            change [yv v] by (-1)\n        else\n            change [yv v] by (1)\n        end\n    end\n    if <<key (r v) pressed?> and <key (g v) pressed?>> then\n        wait until <not <<key (g v) pressed?> and <key (r v) pressed?>>>\n        go to x: (-231) y: (-135)\n        set [xv v] to [0]\n        set [yv v] to [0]\n        broadcast (Restart v)\n    end\n    go to [front v] layer\n    if <(back) = [1]> then\n        hide\n        stop [this script v]\n    end\n    if <(x position) > [235]> then\n        broadcast (Next v)\n        set x to (-222)\n        set [xv v] to [0]\n        set [yv v] to [0]\n    end\n    if <<(y position) < [-175]> or <<touching (lava v)?> or <touching (spikes v)?>>> then\n        broadcast (:\( v)\n        repeat (13)\n            change [brightness v] effect by (-10)\n            wait (.0000001) seconds\n        end\n        go to x: (-180) y: (-40)\n        clear graphic effects\n        set [xv v] to [0]\n        set [yv v] to [0]\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        point in direction (90)\n        change [xv v] by (-1)\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        point in direction (-90)\n        change [xv v] by (1)\n    end\n    set [xv v] to ((xv) * (0.85))\n    change x by (xv)\n    if <touching (platform v)?> then\n        change y by (-2)\n        if <touching (platform v)?> then\n            change y by (1)\n            if <touching (platform v)?> then\n                change y by (1)\n                if <touching (platform v)?> then\n                    change y by (1)\n                    if <touching (platform v)?> then\n                        change y by (1)\n                        if <touching (platform v)?> then\n                            change y by (1)\n                            if <touching (platform v)?> then\n                                change y by (-5)\n                                change x by ((-1) * (xv))\n                                if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <not <(xv) = [0]>>> then\n                                    set [mode v] to [walljump]\n                                    set [yv v] to [8]\n                                    set [xv v] to (((xv) / ([abs v] of (xv) )) * (-10))\n                                else\n                                    set [mode v] to [wallslide]\n                                    set [xv v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change y by (2)\n    end\n    change y by (-3)\n    if <touching (platform v)?> then\n        if <(yv) = [-3]> then\n            if <<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> then\n                set [mode v] to [run]\n            else\n                if <([abs v] of (xv) ) > [.1]> then\n                    set [mode v] to [skid]\n                else\n                    set [mode v] to [stand]\n                end\n            end\n        end\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [mode v] to [jump]\n            set [yv v] to [9]\n        end\n    end\n    if <<<<(mode) = [jump]> or <(mode) = [walljump]>> and <(yv) < [0]>> or <<<(mode) = [run]> or <(mode) = [skid]>> and <(yv) < [-3]>>> then\n        set [mode v] to [fall]\n    end\n    change y by (3)\n    if <(yv) > [-15]> then\n        change [yv v] by (-0.5)\n    end\n    change y by (-2)\n    if <not <touching (platform v)?>> then\n        change y by (-1)\n        if <not <touching (platform v)?>> then\n            change y by (-1)\n            if <not <touching (platform v)?>> then\n                change y by (-1)\n                if <not <touching (platform v)?>> then\n                    change y by (-1)\n                    if <not <touching (platform v)?>> then\n                        change y by (-1)\n                        if <not <touching (platform v)?>> then\n                            change y by (5)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (2)\n    change y by (yv)\n    if <touching (platform v)?> then\n        change y by (-2)\n        if <touching (platform v)?> then\n            change y by ((-1) * (yv))\n            set [yv v] to [-3]\n        end\n        change y by (2)\n    end\n    if <key (r v) pressed?> then\nend\n\nwhen flag clicked\nhide\nswitch costume to (normal v)\nset [back v] to [0]\n\nwhen I receive [start v]\nhide\n\nwhen flag clicked\nforever\n    if <([costume # v] of [sprite8 v]) = [1]> then\n        switch costume to (1 v)\n    end\n    if <([costume # v] of [sprite8 v]) = [2]> then\n        switch costume to (2 v)\n    end\n    if <([costume # v] of [sprite8 v]) = [3]> then\n        switch costume to (3 v)\n    end\n    if <([costume # v] of [sprite8 v]) = [4]> then\n        switch costume to (4 v)\n    end\nend\n\nwhen I receive [next v]\ngo to x: (-208) y: (135)\nhide\nwait (.6) seconds\nshow\n\nwhen I receive [:\( v]\nif <([costume # v] of [platform v]) = [15]> then\n    go to x: (-180) y: (-40)\nend\n\nwhen I receive [hit v]\nif <touching (dark lord v)?> then\n    broadcast (- v)\n    wait (3) seconds\nend\n\nwhen I receive [boss v]\nshow\n\nwhen I receive [r v]\ngo to x: (-231) y: (-135)\n\n@Light\n\nwhen I start as a clone\nshow\nforever\n\nwhen flag clicked\nhide\nforever\n    go to (player v)\n    go to [back v] layer\nend\n\nwhen I receive [start v]\nwait (1) seconds\nshow\n\nhide\n\nwhen flag clicked\nset size to (178) %\n\nwhen I receive [next v]\nrepeat (10)\n    change size by (-1)\n    wait (.01) seconds\nend\n\nwhen I receive [start over v]\nset size to (30000000000) %\n\nwhen I receive [boss v]\nwait (10) seconds\nforever\n    wait (pick random (5) to (10)) seconds\n    broadcast (* v)\n    repeat (10)\n        change size by (10)\n    end\n    repeat (15)\n        broadcast (hit v)\n        wait (.1) seconds\n    end\n    repeat (10)\n        change size by (-10)\n    end\nend\n\nwhen I receive [dead v]\nhide\nstop [other scripts in sprite v]\n\n@Water\n\nwhen flag clicked\n\nwhen I receive [start over v]\nswitch costume to (costume1 v)\n\nwhen I start as a clone\nshow\nforever\n    set y to ((([sin v] of (((timer) + (me)) * (300)) ) * (8)) - ((me) * (5)))\nend\n\nwhen flag clicked\nforever\n    hide\nend\n\nwhen I receive [start v]\ngo to [back v] layer\ngo to x: (0) y: (0)\nset [me v] to [1]\nrepeat (3)\n    create clone of (_myself_ v)\n    change y by (-5)\n    change [brightness v] effect by (-10)\n    change [me v] by (1)\nend\n\nswitch costume to ((Lvl) + (1))\n\nwhen I receive [next v]\nnext costume\nwait (.2) seconds\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\n@Backround\n\nwhen flag clicked\nforever\n    set [brightness v] effect to ((distance to [light v]) - ((distance to [light v]) * (2)))\nend\n\nwhen I receive [dead v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [next v]\nnext costume\n\nwhen I receive [start v]\nshow\ngo to [back v] layer\ngo [backward v] (100) layers\nswitch costume to (costume1 v)\n\nwhen flag clicked\ngo to x: (0) y: (40)\nhide\n\n@Lava\n\nwhen flag clicked\n\nwhen I receive [start v]\ngo to [back v] layer\ngo to x: (0) y: (0)\nset [me v] to [1]\nrepeat (3)\n    create clone of (_myself_ v)\n    change y by (-5)\n    change [brightness v] effect by (-10)\n    change [me v] by (1)\nend\n\nwhen I receive [next v]\nnext costume\nwait (.2) seconds\n\nwhen I start as a clone\nshow\nforever\n    set y to ((([sin v] of (((timer) + (me)) * (300)) ) * (8)) - ((me) * (5)))\nend\n\nwhen flag clicked\nforever\n    hide\nend\n\nwhen flag clicked\ngo to [back v] layer\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [dyeet v]\nnext costume\n\nwhen I receive [let’s start for realz v]\nshow\n\nwhen I receive [start over v]\nswitch costume to (costume1 v)\n\nwhen I start as a clone\nforever\nend\n\n@start\n\nwhen this sprite clicked\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nset [play1 v] to [10]\n\n    change y by (play1)\n    change [play1 v] by (-2)\n    if <touching (_edge_ v)?> then\n        hide\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (115) %\n    else\n        set size to (100) %\n    end\nend\n\nwhen I receive [play v]\nshow\ngo to x: (-2400) y: (-27)\nset [ghost v] effect to (80)\nrepeat (25)\n    change x by (((0) - (x position)) * (0.2))\n    change [ghost v] effect by (-10)\nend\nwait until <<touching (mouse-pointer v)?> and <mouse down?>>\nwait until <not <mouse down?>>\nif <touching (mouse-pointer v)?> then\n    broadcast (Start v)\n    stop [this script v]\nend\n\nwhen flag clicked\nforever\n    point in direction ((([cos v] of ((tic) * (1.4)) ) * (5)) + (90))\n    change y by (([cos v] of ((tic) * (2.1)) ) * (1.4))\n    change size by (([cos v] of ((tic) * (1.4)) ) * (0.3))\n    change [tic v] by (5)\nend\n\nwhen I receive [story v]\nset [play1 v] to [10]\n\n    change y by (play1)\n    change [play1 v] by (-2)\n    if <touching (_edge_ v)?> then\n        hide\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    if <touching (_edge_ v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\n@Sprite1\n\nwhen I receive [logo end v]\nrepeat (50)\n    change volume by (-2)\nend\nstop all sounds\n\nwhen I receive [logo slide v]\nhide\nswitch costume to (7 v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset size to (100) %\nshow\nif <(costume [number v]) = [2]> then\n    go to x: (0) y: (500)\n    go to [front v] layer\n    repeat (50)\n        change y by (((-1) - (y position)) / (7))\n    end\n    go [backward v] (3) layers\n    hide\n    delete this clone\nend\nif <(costume [number v]) = [3]> then\n    wait (0.2) seconds\n    go to x: (0) y: (500)\n    go to [front v] layer\n    repeat (50)\n        change y by (((-1) - (y position)) / (7))\n    end\n    go [backward v] (2) layers\n    hide\n    delete this clone\nend\nif <(costume [number v]) = [4]> then\n    wait (0.4) seconds\n    go to x: (0) y: (500)\n    go to [front v] layer\n    repeat (50)\n        change y by (((-1) - (y position)) / (7))\n    end\n    go [backward v] (1) layers\n    hide\n    delete this clone\nend\nif <(costume [number v]) = [5]> then\n    wait (0.5) seconds\n    go to x: (0) y: (500)\n    go to [front v] layer\n    repeat (50)\n        change y by (((-1) - (y position)) / (7))\n    end\n    hide\n    delete this clone\nend\nif <(costume [number v]) = [6]> then\n    wait (0.6) seconds\n    go to x: (0) y: (500)\n    go to [front v] layer\n    repeat (50)\n        change y by (((-1) - (y position)) / (7))\n    end\n    broadcast (logo slide v)\n    wait (2) seconds\n    hide\n    delete this clone\nend\nif <(costume [number v]) = [7]> then\n    set [ghost v] effect to (0)\n    go to x: (500) y: (0)\n    go to [front v] layer\n    show\n    repeat (25)\n        change x by (((0) - (x position)) / (4))\n    end\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    broadcast (logo show v)\n    hide\nend\n\nwhen I receive [logo end v]\nrepeat (50)\n    change volume by (-2)\nend\nwait (1) seconds\nstop all sounds\nwait (1) seconds\nset volume to (100) %\n\nwhen I receive [start v]\nset size to (100) %\nswitch costume to (1 v)\ngo to [front v] layer\ngo to x: (0) y: (345)\nshow\nrepeat (50)\n    change y by (((-1) - (y position)) / (7))\nend\nrepeat (5)\n    next costume\n    create clone of (_myself_ v)\nend\nwait (1) seconds\nhide\n\nwhen I receive [start v]\nwait (5) seconds\nbroadcast (logo end v)\n\n@Spikes\n\nwhen I receive [start over v]\nswitch costume to (costume1 v)\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nset [level v] to [1]\ngo to [back v] layer\ngo [backward v] (10000) layers\nswitch costume to (1 v)\ngo [backward v] (1) layers\ngo to x: (0) y: (-180)\nwait (0.8) seconds\nshow\nrepeat (25)\n    change y by (((0) - (y position)) * (0.2))\nend\n\nwhen I receive [back v]\nhide\n\nwhen I receive [start over v]\nswitch costume to (1 v)\nset [level v] to [1]\n\nwhen I receive [next v]\nnext costume\nchange [level v] by (1)\n\nwhen I receive [next v]\nchange [lvl v] by (1)\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [8]> then\nend\n\n@Sprite2\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nset [play1 v] to [10]\n\n    change y by (play1)\n    change [play1 v] by (-2)\n    if <touching (_edge_ v)?> then\n        hide\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (115) %\n    else\n        set size to (100) %\n    end\nend\n\nwhen I receive [play v]\nshow\ngo to x: (2400) y: (-79)\nset [ghost v] effect to (80)\nrepeat (25)\n    change x by (((0) - (x position)) * (0.2))\n    change [ghost v] effect by (-10)\nend\nwait until <<touching (mouse-pointer v)?> and <mouse down?>>\nwait until <not <mouse down?>>\nif <touching (mouse-pointer v)?> then\n    broadcast (Story v)\n    stop [this script v]\nend\n\nwhen flag clicked\nforever\n    point in direction ((([cos v] of ((tic) * (1.4)) ) * (5)) + (90))\n    change y by (([cos v] of ((tic) * (2.1)) ) * (1.4))\n    change size by (([cos v] of ((tic) * (1.4)) ) * (0.3))\n    change [tic v] by (5)\nend\n\nwhen I receive [story v]\nset [play1 v] to [10]\n\n    change y by (play1)\n    change [play1 v] by (-2)\n    if <touching (_edge_ v)?> then\n        hide\n        stop [this script v]\n    end\nend\n\n@Sprite4\n\nwhen flag clicked\nforever\n    point in direction ((([cos v] of ((tic) * (1.4)) ) * (5)) + (90))\n    change y by (([cos v] of ((tic) * (2.1)) ) * (1.4))\n    change size by (([cos v] of ((tic) * (1.4)) ) * (0.3))\n    change [tic v] by (5)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nset [play1 v] to [10]\n\n    change y by (play1)\n    change [play1 v] by (-2)\n    if <touching (_edge_ v)?> then\n        hide\n        stop [this script v]\n    end\nend\n\nwhen I receive [play v]\nshow\ngo to x: (2400) y: (35)\nset [ghost v] effect to (80)\nrepeat (25)\n    change x by (((0) - (x position)) * (0.2))\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [story v]\nset [play1 v] to [10]\n\n    change y by (play1)\n    change [play1 v] by (-2)\n    if <touching (_edge_ v)?> then\n        hide\n        stop [this script v]\n    end\nend\n\nwhen this sprite clicked\nbroadcast (> v)\n\n@Sprite7\n\nwhen flag clicked\nforever\n    point in direction ((([cos v] of ((tic) * (1.4)) ) * (5)) + (90))\n    change y by (([cos v] of ((tic) * (2.1)) ) * (1.4))\n    change size by (([cos v] of ((tic) * (1.4)) ) * (0.3))\n    change [tic v] by (5)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nset [play1 v] to [10]\n\n    change y by (play1)\n    change [play1 v] by (-2)\n    if <touching (_edge_ v)?> then\n        hide\n        stop [this script v]\n    end\nend\n\nwhen I receive [play v]\nshow\ngo to x: (2400) y: (35)\nset [ghost v] effect to (80)\nrepeat (25)\n    change x by (((0) - (x position)) * (0.2))\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [story v]\nset [play1 v] to [10]\n\n    change y by (play1)\n    change [play1 v] by (-2)\n    if <touching (_edge_ v)?> then\n        hide\n        stop [this script v]\n    end\nend\n\nwhen this sprite clicked\nbroadcast (< v)\n\n@Sprite8\n\nwhen flag clicked\nswitch costume to (1 v)\nforever\n    point in direction ((([cos v] of ((tic) * (1.4)) ) * (5)) + (90))\n    change y by (([cos v] of ((tic) * (2.1)) ) * (1.4))\n    change size by (([cos v] of ((tic) * (1.4)) ) * (0.3))\n    change [tic v] by (5)\nend\n\nwhen I receive [< v]\nswitch costume to ((costume [number v]) - (1))\n\nwhen I receive [> v]\nnext costume\n\nwhen flag clicked\ngo to x: (37) y: (32)\nhide\n\nwhen I receive [play v]\nshow\n\nwhen I receive [start v]\nhide\n\nwhen I receive [story v]\nhide\n\n@Platform\n\nwhen I receive [start over v]\nswitch costume to (costume1 v)\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nset [level v] to [1]\ngo to [front v] layer\nswitch costume to (1 v)\ngo [backward v] (1) layers\ngo to x: (0) y: (-180)\nwait (0.8) seconds\nshow\nrepeat (25)\n    change y by (((0) - (y position)) * (0.2))\nend\n\nwhen I receive [back v]\nhide\n\nwhen I receive [start over v]\nswitch costume to (1 v)\nset [level v] to [1]\n\nwhen I receive [next v]\nnext costume\nchange [level v] by (1)\n\nwhen I receive [next v]\nchange [lvl v] by (1)\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [15]> then\n        broadcast (Boss v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [to be con v]\nhide\n\nwhen I receive [boss v]\nswitch costume to (16 v)\n\nwhen I receive [start v]\nrepeat until <(costume [number v]) = [16]>\n    play sound [Alan Walker - Alone v] until done\nend\n\nwhen I receive [world v]\nhide\n\n@Cover\n\nwhen flag clicked\nhide\ngo to x: (-469) y: (0)\n\nwhen I receive [next v]\nshow\nglide (1) secs to x: (469) y: (0)\nhide\ngo to x: (-469) y: (0)\n\nrepeat (10)\n    go to [front v] layer\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@Story1\n\nwhen I receive [story1 v]\nbroadcast (Tenor voice v)\nswitch costume to (costume1 v)\nshow\nset [text v] to ["Once upon a time the world was beautiful"]\nbroadcast (Text v) and wait\nwait (3) seconds\nnext costume\nset [text v] to ["No danger at all, it was very peaceful"]\nbroadcast (Text v) and wait\nwait (3) seconds\nnext costume\nset [text v] to ["Then evil and darkness came from the very depths of the world, and took over everything"]\nbroadcast (Text v) and wait\nwait (3) seconds\nnext costume\nset [text v] to ["Everything the darkness touches gets corrupted"]\nbroadcast (Text v) and wait\nwait (3) seconds\nnext costume\nset [text v] to ["But you are one of a kind, the darkness can not touch you as long as your light is still bright"]\nbroadcast (Text v) and wait\nwait (5) seconds\nnext costume\nset [text v] to ["The only way to restore balance to the world is to defeat the Dark Lord"]\nbroadcast (Text v) and wait\nwait (3) seconds\nnext costume\nset [text v] to ["Now go time is of the essence!"]\nbroadcast (Text v) and wait\nwait (2) seconds\nnext costume\nbroadcast (done v)\nbroadcast (play v)\nhide\n\nwhen I receive [story v]\ngo to x: (0) y: (0)\nhide\nwait (1) seconds\nbroadcast (Story1 v)\n\nwhen I receive [boss v]\nshow\nset [text v] to [I'm the Dark Lord]\nbroadcast (Text v) and wait\nwait (2) seconds\nnext costume\nbroadcast (done v)\nset [text v] to [You are getting weak puny one...]\nbroadcast (Text v) and wait\nwait (5) seconds\nnext costume\nset [text v] to [TIME FOR YOU TO DIE!!!!]\nbroadcast (Text v) and wait\nwait (2) seconds\nnext costume\nhide\nbroadcast (done v)\n\nwhen I receive [- v]\nset [text v] to [Ow]\nbroadcast (Text v) and wait\nwait (.5) seconds\nnext costume\nset [text v] to [You little...]\nbroadcast (Text v) and wait\nwait (.5) seconds\nnext costume\nhide\nbroadcast (done v)\n\nwhen I receive [* v]\nset [text v] to ["Your light is getting brighter"]\nbroadcast (Text v) and wait\nwait (.5) seconds\nnext costume\nhide\nbroadcast (done v)\n\nwhen I receive [dead v]\nset [text v] to [Even d..]\nbroadcast (Text v) and wait\nwait (1) seconds\nnext costume\nset [text v] to [o you have defe...]\nbroadcast (Text v) and wait\nwait (1.3) seconds\nnext costume\nset [text v] to [ated me you will not defeat the...]\nbroadcast (Text v) and wait\nwait (3.4) seconds\nnext costume\nbroadcast (world v)\nset [text v] to ["congratulations!, you have balanced the world!"]\nbroadcast (Text v) and wait\nwait (.5) seconds\nnext costume\n\nhide\n\nbroadcast (done v)\n\nwait (2) seconds\n\nwhen I receive [to be con v]\nbroadcast (done v)\nhide\n\n@(2.1)Text+Speech\n\nwhen I start as a clone\nletter\n\nwhen flag clicked\nhide\n\nwhen I receive [text v]\nwait (0) seconds\nset [# v] to [0]\nrepeat (length of (Text))\n    change [# v] by (1)\n    create clone of (_myself_ v)\nend\nset [# v] to [0]\n\nwhen I receive [text v]\ndelete this clone\n\nwhen I start as a clone\nset volume to (50) %\nplay sound [Typewriter Sound Effects.mp3 v] until done\nclear graphic effects\nset size to (50) %\nrepeat (10)\n    change size by (8)\nend\nrepeat (10)\n    change size by (-4)\nend\nset size to (75) %\n\ndefine letter\ngo to x: (-230) y: (160)\nswitch costume to (letter (#) of (Text))\nrepeat (#)\n    change x by (12)\n    if <(x position) > [230]> then\n        change y by (-20)\n        set x to (-219)\n    end\nend\nshow\n\nwhen I receive [done v]\nhide\ndelete this clone\n\n@Thumbnail\n\nwhen flag clicked\nhide\n\n@Light Shards\n\nwhen I receive [2 v]\ngo to [front v] layer\nset [momentum v] to (pick random (10) to (15))\nset [yv v] to (pick random (2) to (7))\nchange size by (pick random (-150) to (0))\nchange [brightness v] effect by (pick random (0) to (20))\nturn right (pick random (-10) to (10)) degrees\nshow\nrepeat until <touching (_edge_ v)?>\n    go to [front v] layer\n    move (Momentum) steps\n    change y by (Yv)\n    change [yv v] by (-0.4)\n    set [momentum v] to ((Momentum) * (0.95))\nend\nhide\ndelete this clone\n\nwhen I receive [start v]\n\nstop [other scripts in sprite v]\nrepeat (20)\n    go to [front v] layer\n    change [ghost v] effect by (5)\nend\nhide\ndelete this clone\n\ndefine clones ()\nrepeat ()\n    create clone of (_myself_ v)\n    turn left (15) degrees\nend\n\nwhen I receive [:\( v]\nset size to (300) %\ngo to (player v)\npoint in direction (75)\nhide\nclones [50]\nbroadcast (2 v)\n\n@Dark Spike\n\nwhen I receive [dead v]\nhide\nstop [other scripts in sprite v]\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [1]> then\n        if <touching (player v)?> then\n            broadcast (:\( v)\n            hide\n        end\n    end\nend\n\nwhen flag clicked\n\nwhen flag clicked\nhide\n\nwhen I receive [boss v]\nset [speed tentacle v] to [0]\nwait (10) seconds\nforever\n    set y to (-140)\n    set x to ([x position v] of [player v])\n    switch costume to (costume2 v)\n    go to [front v] layer\n    show\n    wait (0.5) seconds\n    set [speed tentacle v] to [25]\n    switch costume to (costume1 v)\n    go to [front v] layer\n    go [backward v] (9999) layers\n    set y to (-166)\n    play sound [Concrete break.mp3 v] until done\n    repeat (51)\n        change y by (speed tentacle)\n        change [speed tentacle v] by (-1)\n    end\n    repeat until <(y position) < [-150]>\n        change y by (speed tentacle)\n        change [speed tentacle v] by (-1)\n    end\n    hide\n    wait (pick random (1) to (3)) seconds\nend\n\n@Dark Ball\n\nwhen I receive [dead v]\nhide\nstop [other scripts in sprite v]\n\nwhen flag clicked\n\nwhen flag clicked\nhide\n\nwhen I receive [boss v]\nwait (10) seconds\nforever\n    set y to (-110)\n    set x to (pick random (-147) to (162))\n    switch costume to (costume2 v)\n    set size to (100) %\n    go to [front v] layer\n    show\n    wait (2) seconds\n    set size to (20) %\n    switch costume to (costume1 v)\n    go to [front v] layer\n    go [backward v] (9999) layers\n    repeat (8)\n        change size by (10)\n        wait (.001) seconds\n    end\n    hide\n    wait (pick random (1) to (7)) seconds\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [1]> then\n        if <touching (player v)?> then\n            broadcast (:\( v)\n            hide\n        end\n    end\nend\n\n@Dark Lord\n\nwhen flag clicked\nforever\n    go [backward v] (99999999999999999999) layers\nend\n\nwhen flag clicked\nhide\nswitch costume to (alive v)\ngo to x: (-44) y: (-119)\n\nwhen I receive [boss v]\nshow\nswitch costume to (alive2 v)\ngo to x: (-33) y: (134)\nglide (1) secs to x: (-33) y: (-74)\nrepeat (8)\n    next costume\n    wait (.1) seconds\n    go to x: (-33) y: (-122)\nend\n\nwhen I receive [dead v]\nswitch costume to (dead v)\n\nwhen I receive [to be con v]\nhide\n\nwhen I receive [world v]\nhide\n\n@Pen\n\nwhen flag clicked\nset [health v] to [100]\nerase all\n\nwhen I receive [call v]\nHealth Bar\n\ndefine Health Bar\nerase all\npen up\nset pen color to (#7f7f7f)\nset pen size to (15)\ngo to x: (-100) y: (160)\npen down\ngo to x: (100) y: (160)\nif <not <(health) < [1]>> then\n    go to x: (-100) y: (160)\n    set pen color to (#cc0000)\n    pen up\n    set pen size to (10)\n    pen down\n    change x by ((health) * (2))\n    pen up\nend\n\nwhen I receive [boss v]\nforever\n    broadcast (Call v)\nend\n\nwhen I receive [- v]\nwait (.5) seconds\nchange [health v] by (-5)\n\nwhen flag clicked\nforever\n    if <(health) = [0]> then\n        broadcast (dead v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [dead v]\nerase all\n\nwhen I receive [:\( v]\nset [health v] to [100]\n\nwhen I receive [- v]\n\n@Sprite3\n\nwhen flag clicked\nhide\ngo to x: (36) y: (28)\nset size to (100) %\n\nwhen I receive [to be con v]\nshow\nforever\n    go to [front v] layer\n    point in direction ((([cos v] of ((tic) * (1.4)) ) * (5)) + (90))\n    change y by (([cos v] of ((tic) * (2.1)) ) * (1.4))\n    change size by (([cos v] of ((tic) * (1.4)) ) * (0.3))\n    change [tic v] by (.2)\nend\n\n@Flying objects\n\nwhen I start as a clone\nset [yvelocity v] to [0]\nif <(yvelocity) = [0]> then\n    set [yvelocity v] to [25]\nend\nrepeat (50)\n    change y by (yvelocity)\n    change [yvelocity v] by (-1)\n    turn right (turn) degrees\nend\ndelete this clone\n\nwhen I start as a clone\nset [turn v] to (pick random (-3) to (5))\ngo to x: (pick random (-235) to (235)) y: (-195)\nset size to (pick random (75) to (115)) %\nswitch costume to (pick random (1) to (3))\nshow\n\nwhen flag clicked\nhide\ngo to x: (0) y: (-195)\n\nwhen I receive [to be con v]\nforever\n    create clone of (_myself_ v)\n    wait (0.5) seconds\nend\n\n@Sprite5\n\nwhen flag clicked\nhide\n\nwhen I receive [world v]\ngo [backward v] (9999999999999999) layers\n\nwhen I receive [to be con v]\nhide\n\n@World\n\nwhen flag clicked\nforever\n    repeat (40)\n        change y by (0.1)\n        turn right (1) degrees\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [world v]\nset [brightness v] effect to (-100)\nshow\ngo to x: (5) y: (-252)\n\nwhen I receive [world v]\nrepeat (100)\n    change [brightness v] effect by (1)\n    wait (.01) seconds\nend\nhide\nswitch backdrop to (backdrop3 v)\nbroadcast (to be con v)\n\n@Sprite9\n\nwhen flag clicked\ngo to x: (373) y: (310)\nhide\n\nwhen I receive [boss v]\ngo to [front v] layer\nshow\n\nwhen I receive [dead v]\nhide\n\nwhen this sprite clicked\nbroadcast (dead v)\n\n@Sprite6\n\nwhen flag clicked\nhide\nforever\n    go [backward v] (99999999999999999999999999999999999999) layers\nend\n\nwhen I receive [dead v]\nshow\nswitch costume to (costume1 v)\n\nwhen I receive [world v]\nshow\nswitch costume to (costume2 v)\n\nwhen I receive [to be con v]\nshow\nswitch costume to (costume1 v)\n\n@Sprite10\n\nwhen flag clicked\nhide\nforever\n    go to x: (36) y: (28)\n    go to [front v] layer\nend\n\nwhen I receive [dead v]\nhide\n\nwhen this sprite clicked\nbroadcast (r v)\n\nwhen I receive [start v]\nshow\n\n@Sprite11\n\nwhen I receive [play v]\nhide\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen flag clicked\npoint in direction (-120)\nclear graphic effects\nset size to (100) %\n\nwhen I receive [fade v]\nforever\n    turn right (10) degrees\nend\n\nwhen I receive [fade v]\nforever\n    change size by (-1)\nend\n\nwhen I receive [fade v]\nforever\n    change [ghost v] effect by (1)\nend\n\nwhen I receive [turn v]\npoint in direction (90)\nset [direction2 v] to [10]\nrepeat (1)\n    repeat until <(direction2) = [-10]>\n        turn right (direction2) degrees\n        change [direction2 v] by (-0.25)\n    end\n    repeat until <(direction2) = [10]>\n        turn right (direction2) degrees\n        change [direction2 v] by (0.25)\n    end\nend\nbroadcast (fade v)\n\nwhen flag clicked\nshow\n\n@Sprite12\n\nwhen I receive [fade v]\nforever\n    turn left (10) degrees\nend\n\nwhen I receive [fade v]\nforever\n    change size by (-1)\nend\n\nwhen I receive [fade v]\nforever\n    change [ghost v] effect by (1)\nend\n\nwhen flag clicked\nshow\nclear graphic effects\n\nwhen flag clicked\ngo to (sprite1 v)\n\nwhen flag clicked\nset size to (3000) %\nrepeat (17)\n    change size by (-20)\nend\nbroadcast (Turn v)\nplay sound [boom v] until done\n\nwhen flag clicked\npoint in direction (60)\n\nwhen I receive [fade v]\nwait (5) seconds\nbroadcast (play v)\n\nwhen I receive [play v]\nhide\n\n@Sprite13\n\nwhen I receive [turn v]\ngo to (sprite1 v)\ncreate clone of (_myself_ v)\nwait (.4) seconds\ncreate clone of (_myself_ v)\nwait (.2) seconds\ncreate clone of (_myself_ v)\nwait (.4) seconds\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nforever\n    hide\n    clear graphic effects\nend\n\nwhen I start as a clone\nclear graphic effects\nset [brightness v] effect to (pick random (-20) to (20))\nshow\nset size to (10) %\npoint towards (sprite1 v)\nrepeat (10000000)\n    change size by (1)\n    change [ghost v] effect by (2)\nend\ndelete this clone\n\nif <touching (_edge_ v)?> then\n    wait (5) seconds\nend\n\nforever\n\n@Sprite14\n\nwhen flag clicked\nclear graphic effects\n\nwhen flag clicked\ngo to (sprite12 v)\n\nwhen flag clicked\n\nwhen flag clicked\npoint in direction (60)\n\nwhen I receive [turn v]\nhide\nwait (1.7999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999) seconds\nset size to (100) %\nset [brightness v] effect to (0)\nshow\nwait (1) seconds\nset [brightness v] effect to (100)\nwait (.2) seconds\nset [brightness v] effect to (0)\nwait (.2) seconds\nset [brightness v] effect to (100)\nwait (.8) seconds\nset [brightness v] effect to (100)\nwait (1) seconds\nset [brightness v] effect to (100)\nwait (.2) seconds\nset [brightness v] effect to (0)\nwait (.2) seconds\nset [brightness v] effect to (100)\nwait (.8) seconds\nset [brightness v] effect to (100)\nset [brightness v] effect to (0)\nwait (1) seconds\nset [brightness v] effect to (100)\nwait (.2) seconds\nset [brightness v] effect to (0)\nwait (.2) seconds\nset [brightness v] effect to (100)\nwait (.8) seconds\nset [brightness v] effect to (100)\nwait (1) seconds\nset [brightness v] effect to (100)\nwait (.2) seconds\nset [brightness v] effect to (0)\nwait (.2) seconds\nset [brightness v] effect to (100)\nwait (.8) seconds\nset [brightness v] effect to (100)\n\nwhen flag clicked\nhide\n\nwait (4) seconds\nset [brightness v] effect to (100)\nwait (1.5) seconds\nset [brightness v] effect to (0)\n\nwhen I receive [fade v]\nforever\n    change [ghost v] effect by (1)\nend\n\nwhen flag clicked\n\nwhen I receive [turn v]\nwait (2) seconds\nplay sound [flickering v] until done\nplay sound [flickering v] until done\nwait (2) seconds\nplay sound [flickering v] until done\nwait (.3) seconds\nplay sound [flickering v] until done\nplay sound [flickering v] until done\nwait (.3) seconds\nplay sound [flickering v] until done\nwait (.5) seconds\n\n
---------------------------------------------------------------\n                               Please Read\n---------------------------------------------------------------▲◀︎▶︎▼or WASD to move\nAvoid Lava and spikes \nYou can swim in the water\nThe way to defeat the dark lord is when the screen says your light is getting brighter that is when you can attack the boss.