DARK || A platformer

Instructions: D ᗩ R K ▼ ᗩ  P L ᗩ T F O ᖇ ᗰ E ᖇ\n____________________________\n~PLAY IN FULL SCREEN~\n★Use ← → to move \n★ᗩnd ↑ to jump\n★ᗩvoid spikes\n★There is one easter egg\n★Play and enjoy!)

@Stage\n\nwhen I receive [tla v]\nswitch backdrop to (tla v)\n\n@Button\n\ndefine Animation\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (button v)\n    else\n        switch costume to (button2 v)\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nshow\nswitch backdrop to (light v)\nAnimation\n\nwhen flag clicked\nset size to (240) %\nforever\n    repeat (20)\n        turn left (0.5) degrees\n    end\n    repeat (40)\n        turn right (0.5) degrees\n    end\n    repeat (20)\n        turn left (0.5) degrees\n    end\nend\n\nwhen this sprite clicked\nswitch backdrop to (background v)\nhide\n\n@Planet\n\nwhen flag clicked\nset size to (110) %\npoint in direction (90)\nshow\n\nwhen flag clicked\nforever\n    repeat (20)\n        turn right (0.5) degrees\n    end\n    repeat (40)\n        turn left (0.5) degrees\n    end\n    repeat (20)\n        turn right (0.5) degrees\n    end\nend\n\nwhen backdrop switches to [background v]\nhide\n\n@Player\n\nwhen flag clicked\nif on edge, bounce\nset [fall rate v] to [0]\nset [falling? v] to [0]\nhide\ngo to x: (-210) y: (-60)\nforever\n    go to [front v] layer\nend\n\nwhen backdrop switches to [background v]\ngo to x: (-210) y: (-60)\nshow\nforever\n    Gravitation(and rebound)\n    Touching the ground\n    Control\n    Rules\nend\n\ndefine Touching the ground\nchange [falling? v] by (1)\nrepeat until <not <<touching (ground v)?> or <touching (levels v)?>>>\n    change y by (1)\n    set [fall rate v] to [0]\n    set [falling? v] to [0]\nend\n\ndefine Gravitation(and rebound)\nchange [fall rate v] by (-1)\nchange y by (fall rate)\n\ndefine Control\nif <key (right arrow v) pressed?> then\n    point in direction (90)\n    move (8) steps\n    if <touching (levels v)?> then\n        change x by (-9)\n    end\nend\nif <key (left arrow v) pressed?> then\n    point in direction (-90)\n    move (8) steps\n    if <touching (levels v)?> then\n        change x by (9)\n    end\nend\nif <<key (up arrow v) pressed?> and <(falling?) < [3]>> then\n    set [fall rate v] to [10]\nend\n\ndefine Rules\nif <<touching (spike v)?> or <touching (3spike v)?>> then\n    go to x: (-210) y: (-60)\n    start sound [Crunch v]\nend\nif <([costume # v] of [levels v]) = [1]> then\n    if <<touching (_edge_ v)?> and <<(x position) > [0]> and <[160] > (y position)>>> then\n        broadcast (LVL2 v)\n        go to x: (-210) y: (-60)\n    end\nend\nif <([costume # v] of [levels v]) = [2]> then\n    if <<touching (_edge_ v)?> and <<(x position) > [0]> and <[160] > (y position)>>> then\n        broadcast (LVL3 v)\n        go to x: (-210) y: (-60)\n    end\nend\nif <([costume # v] of [levels v]) = [3]> then\n    if <<touching (_edge_ v)?> and <<(x position) > [0]> and <[160] > (y position)>>> then\n        broadcast ( LVL4 v)\n        go to x: (-210) y: (-60)\n    end\nend\nif <([costume # v] of [levels v]) = [4]> then\n    if <<touching (_edge_ v)?> and <<[0] > (x position)> and <[160] > (y position)>>> then\n        broadcast (LVL5 v)\n        go to x: (-210) y: (-60)\n    end\nend\nif <([costume # v] of [levels v]) = [4]> then\n    if <<key (space v) pressed?> and <(falling?) < [3]>> then\n        set [fall rate v] to [15]\n    end\n    if <<touching (_edge_ v)?> and <<[0] > (x position)> and <[160] > (y position)>>> then\n        broadcast (LVL5 v)\n        go to x: (-210) y: (-60)\n    end\n    if <<touching (_edge_ v)?> and <<(x position) > [0]> and <[160] > (y position)>>> then\n        broadcast (Easter Egg! v)\n        go to x: (-210) y: (-60)\n    end\nend\nif <([costume # v] of [levels v]) = [5]> then\n    if <<touching (_edge_ v)?> and <<(x position) > [0]> and <[160] > (y position)>>> then\n        broadcast (LVL6 v)\n        go to x: (-210) y: (-60)\n    end\nend\nif <([costume # v] of [levels v]) = [6]> then\n    if <(x position) > [140]> then\n        broadcast (LVL6.2 v)\n        start sound [Crunch v]\n        if <[-110] > (x position)> then\n            broadcast (LVL6.4 v)\n            start sound [Crunch v]\n        end\n    end\nend\nif <([costume # v] of [levels v]) = [8]> then\n    if <[-110] > (x position)> then\n        broadcast (LVL6.4 v)\n        start sound [Crunch v]\n    end\nend\nif <([costume # v] of [levels v]) = [10]> then\n    if <<touching (_edge_ v)?> and <<(x position) > [0]> and <[160] > (y position)>>> then\n        broadcast (LVL7 v)\n        go to x: (-130) y: (-60)\n    end\nend\nif <([costume # v] of [levels v]) = [11]> then\n    if <<touching (_edge_ v)?> and <<(x position) > [0]> and <[160] > (y position)>>> then\n        broadcast (LVL8 v)\n        go to x: (-210) y: (-60)\n    end\nend\nif <([costume # v] of [levels v]) = [12]> then\n    if <<touching (_edge_ v)?> and <<(x position) > [0]> and <[160] > (y position)>>> then\n        broadcast (TLA v)\n        hide\n    end\nend\nif <([costume # v] of [levels v]) = [13]> then\n    if <<touching (_edge_ v)?> and <<(x position) > [0]> and <[160] > (y position)>>> then\n        broadcast (LVL5 v)\n        go to x: (-210) y: (-60)\n    end\nend\n\nwhen I receive [earthquake v]\nrepeat (55)\n    go to x: (30) y: (96)\n    wait (0.1) seconds\nend\ngo to x: (-210) y: (-60)\n\n@Effect\n\nwhen flag clicked\ngo to [back v] layer\nhide\nforever\n    go to (player v)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nrepeat (10)\n    change [ghost v] effect by (15)\n    change size by (-5)\nend\ndelete this clone\n\nwhen backdrop switches to [background v]\nshow\n\nwhen I receive [earthquake v]\nforever\n    go to [front v] layer\nend\n\nwhen I receive [tla v]\nhide\n\n@Ground\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\nwhen backdrop switches to [background v]\nshow\nrepeat until <([costume name v] of [levels v]) = [TLA]>\n    go to [front v] layer\nend\ngo [backward v] (2) layers\n\nwhen I receive [tla v]\nhide\n\n@Levels\n\nwhen flag clicked\ngo to x: (56) y: (28)\nswitch costume to (lvl1 v)\nhide\n\nwhen backdrop switches to [background v]\nshow\nswitch costume to (lvl1 v)\ngo to [front v] layer\n\nwhen I receive [lvl2 v]\nswitch costume to (lvl2 v)\n\nwhen I receive [lvl3 v]\nswitch costume to (lvl3 v)\n\nwhen I receive [ lvl4 v]\nswitch costume to (lvl4 v)\n\nwhen I receive [lvl5 v]\nshow\nswitch costume to (lvl5 v)\n\nwhen I receive [lvl6 v]\nswitch costume to (lvl6.1 v)\n\nwhen I receive [lvl6.2 v]\nswitch costume to (lvl6.2 v)\nwait (2) seconds\nswitch costume to (lvl6.3 v)\nbroadcast (LVL6.3 v)\n\nwhen I receive [lvl6.4 v]\nswitch costume to (lvl6.4 v)\nwait (3) seconds\nbroadcast (Earthquake v)\nstart sound [Boom Cloud v]\nrepeat (30)\n    change x by (20)\n    wait (0.1) seconds\n    change x by (-20)\n    wait (0.1) seconds\nend\nswitch costume to (lvl6.5 v)\nbroadcast (LVL6.5 v)\nforever\n    go to [front v] layer\n    go [backward v] (4) layers\nend\n\nwhen I receive [lvl7 v]\nswitch costume to (lvl7 v)\n\nwhen I receive [lvl8 v]\nswitch costume to (lvl8 v)\n\nwhen I receive [easter egg! v]\nswitch costume to (easter egg! v)\n\nwhen I receive [tla v]\nswitch costume to (tla v)\nhide\n\n@Spike\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [background v]\nforever\n    if <([costume # v] of [levels v]) = [3]> then\n        show\n        go to x: (-219) y: (83)\n    end\n    if <([costume # v] of [levels v]) = [4]> then\n        hide\n    end\n    if <([costume # v] of [levels v]) = [5]> then\n        show\n        go to x: (125) y: (125)\n    end\n    if <([costume # v] of [levels v]) = [6]> then\n        hide\n    end\nend\n\n@3Spike\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [background v]\ngo to [front v] layer\nforever\n    if <([costume # v] of [levels v]) = [2]> then\n        show\n        go to x: (-30) y: (-109)\n    end\n    if <([costume # v] of [levels v]) = [3]> then\n        go to x: (87) y: (-108)\n    end\n    if <([costume # v] of [levels v]) = [4]> then\n        hide\n    end\n    if <([costume # v] of [levels v]) = [5]> then\n        show\n        go to x: (-194) y: (13)\n    end\n    if <([costume # v] of [levels v]) = [6]> then\n        hide\n    end\nend\n\n@Light\n\nwhen flag clicked\nhide\ngo to x: (58) y: (53)\n\nwhen backdrop switches to [background v]\nshow\nchange [ghost v] effect by (80)\ngo to [front v] layer\ngo [backward v] (2) layers\n\nwhen I receive [earthquake v]\nhide\n\nwhen backdrop switches to [background v]\nforever\n    start sound [That Level Again 2 Game Soundtrack v]\n    wait (47.84) seconds\nend\n\n@Dark\n\nwhen flag clicked\nhide\n\nwhen I receive [earthquake v]\ngo to [front v] layer\nshow\ngo to x: (-35) y: (390)\nglide (10) secs to x: (-21) y: (21)\n\nwhen I receive [lvl6.5 v]\ngo [backward v] (1) layers\n\nwhen I receive [tla v]\nhide\n\n@Light2\n\nwhen flag clicked\nhide\n\nwhen I receive [earthquake v]\nwait (9) seconds\nset size to (100) %\ngo to [front v] layer\ngo [backward v] (10) layers\nshow\ngo to x: (-210) y: (-110)\nforever\n    go to (player v)\nend\n\nwhen I receive [earthquake v]\nwait (9) seconds\nset [ghost v] effect to (100)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\n\nwhen I receive [earthquake v]\nwait (9) seconds\nforever\n    repeat (20)\n        change size by (2)\n    end\n    wait (0.1) seconds\n    repeat (20)\n        change size by (-2)\n    end\nend\n\nwhen I receive [tla v]\nhide\n\n@Text\n\nwhen flag clicked\nhide\nswitch costume to (костюм 1 v)\nforever\n    if <([costume # v] of [levels v]) = [13]> then\n        hide\n    end\nend\n\nwhen backdrop switches to [background v]\nshow\n\nwhen I receive [lvl2 v]\nswitch costume to (костюм 2 v)\n\nwhen I receive [lvl3 v]\nswitch costume to (костюм 3 v)\n\nwhen I receive [ lvl4 v]\nswitch costume to (костюм 4 v)\n\nwhen I receive [lvl5 v]\nshow\nswitch costume to (костюм 5 v)\n\nwhen I receive [lvl6 v]\nswitch costume to (костюм 6 v)\n\nwhen I receive [lvl6.2 v]\nswitch costume to (костюм 7 v)\n\nwhen I receive [lvl6.3 v]\nswitch costume to (костюм 8 v)\n\nwhen I receive [lvl6.4 v]\nswitch costume to (костюм 9 v)\n\nwhen I receive [lvl6.5 v]\nswitch costume to (костюм 11 v)\n\nwhen I receive [lvl7 v]\nswitch costume to (костюм 12 v)\n\nwhen I receive [lvl8 v]\nswitch costume to (костюм 13 v)\n\nwhen I receive [earthquake v]\nswitch costume to (костюм 10 v)\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nwhen I receive [tla v]\nhide\n\n@Music\n\nwhen flag clicked\nset size to (100) %\nhide\ngo to x: (208) y: (155)\nchange size by (-20)\nforever\n    go to [front v] layer\nend\n\nwhen backdrop switches to [background v]\nshow\nswitch costume to (костюм 1 v)\nforever\n    if <[6.2] > ([costume # v] of [levels v])> then\n        if <(volume) = [100]> then\n            if <touching (mouse-pointer v)?> then\n                switch costume to (костюм 2 v)\n            else\n                switch costume to (костюм 1 v)\n            end\n        end\n        if <(volume) = [0]> then\n            if <touching (mouse-pointer v)?> then\n                switch costume to (костюм 4 v)\n            else\n                switch costume to (костюм 3 v)\n            end\n        end\n    end\n    if <([costume # v] of [levels v]) > [6.1]> then\n        if <(volume) = [100]> then\n            if <touching (mouse-pointer v)?> then\n                switch costume to (костюм 6 v)\n            else\n                switch costume to (костюм 5 v)\n            end\n        end\n        if <(volume) = [0]> then\n            if <touching (mouse-pointer v)?> then\n                switch costume to (костюм 8 v)\n            else\n                switch costume to (костюм 7 v)\n            end\n        end\n    end\nend\n\nwhen this sprite clicked\nif <(volume) = [100]> then\n    set volume to (0) %\n    switch costume to (костюм 3 v)\nelse\n    set volume to (100) %\n    switch costume to (костюм 1 v)\nend\n\nwhen backdrop switches to [background v]\nset volume to (100) %\nforever\n    start sound [That Level Again 2 Game Soundtrack v]\n    wait (47) seconds\nend\n\nwhen I receive [tla v]\nhide\n\n@GamePicture\n\nwhen flag clicked\nhide\ngo to [front v] layer\n\n@Exit Effect\n\nwhen flag clicked\nhide\n\nwhen I receive [tla v]\ngo to [front v] layer\nshow\ngo to x: (36) y: (8)\nset [ghost v] effect to (100)\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@Fin\n\nwhen flag clicked\nhide\n\nwhen I receive [tla v]\nwait (4) seconds\nshow\nset [ghost v] effect to (100)\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\n\nwhen I receive [tla v]\nforever\n    go to [front v] layer\nend\n\nwhen I receive [tla v]\nforever\n    next costume\n    wait (0.15) seconds\nend\n\n