Darkness -A Platformer- (collab)
@Stage\n\nwhen flag clicked\nforever\n    if <(Level) = [21]> then\n        switch backdrop to (backdrop2 v)\n    else\n        switch backdrop to (backdrop3 v)\n    end\nend\n\nwhen flag clicked\nswitch backdrop to (backdrop3 v)\nforever\n    play sound [Xaf - Nebula v] until done\nend\n\n@Player\n\nwhen I start as a clone\ngo [backward v] (6) layers\nswitch costume to (light v)\nset size to (60) %\nset [ghost v] effect to (0)\nforever\n    repeat (30)\n        go to (player v)\n        change size by (0.5)\n        change [ghost v] effect by (1)\n        turn right (12) degrees\n        move (0.5) steps\n    end\n    repeat (30)\n        go to (player v)\n        change size by (-0.5)\n        change [ghost v] effect by (-1)\n        turn right (12) degrees\n        move (0.5) steps\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (ground v)?> then\n        change y by (1)\n        if <touching (ground v)?> then\n            change y by (1)\n            if <touching (ground v)?> then\n                change y by (1)\n                if <touching (ground v)?> then\n                    change y by (1)\n                    if <touching (ground v)?> then\n                        change y by (1)\n                        if <touching (ground v)?> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                            if <key (up arrow v) pressed?> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-8]\n                                else\n                                    set [xv v] to [8]\n                                end\n                                set [yv v] to [14]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    set [color v] effect to (((Level) - (1)) * (10))\nend\n\nwhen flag clicked\nset [level up v] to [0]\ngo to [front v] layer\nswitch costume to (player2 v)\ncreate clone of (_myself_ v)\npoint in direction (90)\nset rotation style [left-right v]\nset [fail v] to [0]\nset [level v] to [1]\ngo to x: (-170) y: (-40)\nforever\n    set [color v] effect to (((Level) - (1)) * (10))\n    if <key (right arrow v) pressed?> then\n        switch costume to (player v)\n        change [xv v] by (1)\n        point in direction (90)\n    end\n    if <key (left arrow v) pressed?> then\n        switch costume to (player v)\n        change [xv v] by (-1)\n        point in direction (-90)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <(x position) > [230]> then\n        go to x: (-170) y: (-40)\n        change [level v] by (1)\n        set [xv v] to [0]\n    end\n    if <<touching (spikes v)?> or <<touching color (#000000)?> and <(Level) = [16]>>> then\n        start sound [Fail v]\n        set [fail v] to [1]\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        go to x: (-170) y: (-40)\n        set [xv v] to [0]\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n    end\n    if <not <<key (left arrow v) pressed?> or <key (right arrow v) pressed?>>> then\n        switch costume to (player2 v)\n    end\nend\n\nwhen flag clicked\nset [yv v] to [0]\nforever\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <touching (ground v)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching (ground v)?> then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [15]\n        end\n    end\n    change y by (1)\nend\n\nwhen I start as a clone\nforever\n    wait until <(Fail) = [1]>\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    set [fail v] to [0]\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nend\n\n@Ground\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nrepeat (100000)\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\n@Sprite2\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\nwait (0.2) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\n\n@1\n\nwhen flag clicked\nset size to (50) %\ngo to [front v] layer\nforever\n    switch costume to (Level)\nend\n\n@Sprite1\n\nwhen I start as a clone\nshow\ngo to [front v] layer\nset size to (25) %\nswitch costume to (costume2 v)\ngo to x: (pick random (-45) to (45)) y: (250)\npoint in direction (90)\nrepeat until <touching (ground v)?>\n    turn right (5) degrees\n    change y by (-5)\nend\ndelete this clone\n\nwhen flag clicked\nhide\nset [level v] to [1]\nwait until <(Level) = [16]>\nshow\nswitch costume to (costume1 v)\nrepeat until <(Level) = [17]>\n    create clone of (_myself_ v)\n    wait (0.5) seconds\nend\n\nwhen I start as a clone\nwait until <(Level) = [17]>\ndelete this clone\n\nwhen flag clicked\nwait until <(Level) = [17]>\nrepeat (2)\n    hide\nend\n\n@Spikes\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n
Arrow keys to move.\nAvoid spikes.\nYou have limited eyesight\nSTORY: You are a color-changing cube and you live in a totally normal, generic world, but suddenly, darkness covered the planet, and you need to escape the world of spikes and obstacles. Fortunately, you have a light source.\nCan you escape?\n\nThere are 20 levels.