Black and White (Platformer)

Instructions: PLAY MY NEWEST GAME HERE: https://scratch.mit.edu/projects/292961276/\n1000 VIEWS! \n>>>SORRY FOR GLITCHES/LAG CAUSED BY 3.0<<<\nWASD to move White\nArrows to move Black\nR to restart\nWhite can only touch black\nBlack can only touch white\nthere are 14 levels currently\nclick the mute button in the top right to mute or unmute sound\nQ to hide time and E to show time\n>>> 50 VIEWS!<<< 11/8/18\n>>> 10 LOVES!<<< 11/8/18\n>>> 10 FAVORITES!<<< 11/8/18\n>>> 100 VIEWS!<<< 11/8/18\n>>> 150 VIEWS!<<< 11/8/18\n>>> 200 VIEWS!<<< 11/9/18\n>>> 20 LOVES!<<< 11/9/18\n>>> 20 FAVORITES!<<< 11/9/18\n>>> 250 VIEWS!<<< 11/10/18\n>>> 300 VIEWS!<<<11/12/18\n>>> 30 LOVES!<<<11/13/18\n>>> 400 VIEWS!<<<11/13/18\n>>> 30 FAVORITES!<<<11/13/18\n>>> 500 VIEWS!<<<11/15/18\n>>> 40 LOVES!<<< 11/17/18\n>>> 600 VIEWS!<<<11/18/28\n>>> 40 FAVORITES!<<< 11/19/18\n>>> 700 VIEWS!<<< 11/20/18\n>>> 50 LOVES!<<< 11/26/18\n>>> 800 VIEWS!<<< 11/30/18\n>>> 50 FAVORITES!<<< 12/6/18\n>>> 60 LOVES!<<< 12/6/18\n>>> 900 VIEWS!<<< 12/13/18\n>>> *1000* VIEWS!!!!!!!!!!!!!!!!<<< 12/18/18\n>>> *1000* MORE VIEWS IN ONE DAY!!!!!<<<\nSTOPPED KEEPING TRACK OF V F & L

@Stage\n\nwhen I receive [message1 v]\nnext backdrop\nchange [level v] by (1)\n\nwhen flag clicked\nset [level v] to [1]\nswitch backdrop to (backdrop13 v)\n\nwhen I receive [start v]\nswitch backdrop to (backdrop1 v)\n\nstart sound [Theme_regular.mp3 v]\n\nstop all sounds\n\nplay sound [Theme_regular.mp3 v] until done\n\nforever\n    if <key (m v) pressed?> then\n        set volume to (0) %\n    end\n    if <key (p v) pressed?> then\n        set volume to (100) %\n    end\nend\n\nwhen I receive [sound on v]\n\nif <(Mute) = [on]> then\n    repeat until <(Mute) = [off]>\n        play sound [Theme_regular.mp3 v] until done\n    end\nend\n\nset [mute v] to [on]\n\nwhen [e v] key pressed\nshow variable [time v]\n\nwhen [q v] key pressed\nhide variable [time v]\n\nhide variable [time v]\n\nwhen flag clicked\nshow variable [time v]\nset [time v] to [0]\nrepeat until <(level) = [15]>\n    change [time v] by (1)\n    wait (1) seconds\nend\n\n@Sprite1\n\nwhen [left arrow v] key pressed\nswitch costume to (costume1 v)\n\nwhen I receive [message1 v]\ngo to x: (218) y: (-67)\n\nwhen flag clicked\nforever\n    if <<(y position) = [-165]> or <(y position) < [-165]>> then\n        go to x: (218) y: (-67)\n    end\nend\n\nwhen [right arrow v] key pressed\nswitch costume to (costume2 v)\n\nwhen flag clicked\nshow\nswitch costume to (コスチューム3 v)\ngo to [front v] layer\npoint in direction (-90)\ngo to x: (160) y: (-40)\nrepeat (10)\n    set size to (110) %\n    change size by (-1)\n    change [ghost v] effect by (-10)\nend\nforever\n    change [y v] by (-1)\n    if <key (left arrow v) pressed?> then\n        point in direction (-90)\n        change [x v] by (-1)\n    end\n    if <key (right arrow v) pressed?> then\n        point in direction (90)\n        change [x v] by (1)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching color (#ffffff)?> then\n        change y by (1)\n        if <touching color (#ffffff)?> then\n            change y by (1)\n            if <touching color (#ffffff)?> then\n                change y by (2)\n                if <touching color (#ffffff)?> then\n                    change y by (2)\n                    if <touching color (#ffffff)?> then\n                        change y by (-4)\n                        change x by ((x) * (-1.1))\n                        if <key (up arrow v) pressed?> then\n                            set [y v] to [15]\n                            if <([abs v] of (x) ) = (x)> then\n                                set [x v] to [-10]\n                            else\n                                set [x v] to [10]\n                            end\n                        else\n                            set [x v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (y)\n    if <touching color (#ffffff)?> then\n        change y by ((y) - ((y) * (2)))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<key (up arrow v) pressed?> and <touching color (#ffffff)?>> then\n        set [y v] to [15]\n    end\n    change y by (1)\n    if <touching color (#ff0000)?> then\n        go to x: (160) y: (-40)\n    end\n    if <key (r v) pressed?> then\n        broadcast (reset v)\n    end\n    if <touching color (#009933)?> then\n        broadcast (next v)\n        wait until <not <touching color (#009933)?>>\n    end\nend\n\nwhen flag clicked\nset [deaths v] to [0]\nforever\n    if <touching color (#00ff55)?> then\n        go to x: (218) y: (-67)\n        wait (0.01) seconds\n        broadcast (message1 v)\n    end\n    if <touching color (#ff0000)?> then\n        change [deaths v] by (1)\n        wait (0.2) seconds\n    end\n    if on edge, bounce\nend\n\nwhen [r v] key pressed\ngo to x: (160) y: (-40)\n\n@Sprite2\n\nwhen flag clicked\n\nwhen [d v] key pressed\nswitch costume to (costume1 v)\n\nwhen [a v] key pressed\nswitch costume to (costume2 v)\n\nwhen flag clicked\ngo to x: (-217) y: (-67)\ngo to x: (-217) y: (-67)\n\nwhen flag clicked\ngo to x: (-217) y: (-67)\nforever\n    if <(y position) = [-180]> then\n        go to x: (-217) y: (-67)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#00ff55)?> then\n        go to x: (-217) y: (-67)\n        wait (0.01) seconds\n        broadcast (message1 v)\n    end\n    if <touching color (#ff0000)?> then\n        change [deaths v] by (1)\n        wait (0.2) seconds\n    end\nend\n\nwhen I receive [message1 v]\ngo to x: (-217) y: (-67)\n\nwhen flag clicked\nforever\n    if <<<(y position) = [-154]> or <(y position) < [-154]>> and <touching (_edge_ v)?>> then\n        go to x: (-217) y: (-67)\n    else\n        if on edge, bounce\n    end\nend\n\nwhen flag clicked\nswitch costume to (コスチューム1 v)\nshow\ngo to [front v] layer\ngo to x: (-160) y: (-40)\npoint in direction (90)\nrepeat (10)\n    set size to (110) %\n    change size by (-1)\n    change [ghost v] effect by (-10)\nend\nforever\n    change [y v] by (-1)\n    if <key (a v) pressed?> then\n        point in direction (-90)\n        change [x v] by (-1)\n    end\n    if <key (d v) pressed?> then\n        point in direction (90)\n        change [x v] by (1)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching color (#000008)?> then\n        change y by (1)\n        if <touching color (#000008)?> then\n            change y by (1)\n            if <touching color (#000008)?> then\n                change y by (1)\n                if <touching color (#000008)?> then\n                    change y by (1)\n                    if <touching color (#000008)?> then\n                        change y by (-4)\n                        change x by ((x) * (-1.1))\n                        if <key (w v) pressed?> then\n                            set [y v] to [15]\n                            if <([abs v] of (x) ) = (x)> then\n                                set [x v] to [-10]\n                            else\n                                set [x v] to [10]\n                            end\n                        else\n                            set [x v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (y)\n    if <touching color (#000008)?> then\n        change y by ((y) - ((y) * (2)))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<key (w v) pressed?> and <touching color (#000008)?>> then\n        set [y v] to [15]\n    end\n    change y by (1)\n    if <touching color (#009933)?> then\n        broadcast (next v)\n        wait until <not <touching color (#009933)?>>\n    end\n    if <touching color (#ff0000)?> then\n        go to x: (-160) y: (-40)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(y position) = [-177]> then\n        go to x: (-217) y: (-67)\n    end\nend\n\nif on edge, bounce\ngo to x: (-175) y: (-64)\n\nwhen [r v] key pressed\ngo to x: (-160) y: (-40)\n\n@Sprite3\n\nif  then\nelse\nend\n\ngo to x: (45) y: (93)\n\nwhen flag clicked\nforever\nend\n\nswitch costume to (costume1 v)\n\nwhen flag clicked\nforever\n    if <<touching (sprite2 v)?> and <touching (sprite1 v)?>> then\n        broadcast (message1 v)\n    end\n    if <<(level) = [10]> or <<(level) = [11]> or <(level) = [12]>>> then\n        show\n    else\n        hide\n    end\n    if <(level) = [10]> then\n        switch costume to (costume1 v)\n        go to x: (48) y: (-78)\n    end\n    if <(level) = [11]> then\n        switch costume to (costume1 v)\n        go to x: (50) y: (79)\n    end\n    if <(level) = [12]> then\n        switch costume to (costume2 v)\n    end\nend\n\nif  then\nelse\n    switch costume to (costume1 v)\nend\n\n@costume1\n\nwhen this sprite clicked\nhide\nbroadcast (start v)\n\nif  then\nend\n\nwhen flag clicked\nshow\ngo to x: (-4) y: (-7)\nset size to (40) %\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (45) %\n    else\n        set size to (40) %\n    end\nend\n\n@Sprite4\n\nset volume to (100) %\n\nset volume to (0) %\n\nforever\nend\n\nbroadcast (sound on v)\n\nbroadcast (sound off v)\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nset [mute v] to [on]\n\nswitch costume to (costume1 v)\n\nswitch costume to (costume2 v)\n\nwhen flag clicked\n\nwhen this sprite clicked\n\nwhen this sprite clicked\nif <(volume) = [100]> then\n    set [mute v] to [Yes]\n    set volume to (0) %\n    switch costume to (costume2 v)\n    stop all sounds\nelse\n    set [mute v] to [No]\n    switch costume to (costume1 v)\n    set volume to (100) %\nend\n\nnext costume\nforever\n    if <(costume [number v]) = [1]> then\n        set [mute v] to [on]\n    end\n    if <(costume [number v]) = [1]> then\n        set [mute v] to [off]\n    end\nend\n\nwhen flag clicked\nset [mute v] to [No]\nswitch costume to (costume1 v)\nforever\n    if <(Mute) = [No]> then\n        play sound [Theme_regular.mp3 v] until done\n    else\n    end\nend\n\n@Switch\n\nswitch backdrop to (level 14 v)\n\nshow\n\nclear graphic effects\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    if <touching (sprite1 v)?> then\n        switch costume to (costume1 v)\n        broadcast (black door open  v)\n        hide\n    end\nend\n\nwhen flag clicked\nhide\ngo to x: (74) y: (-8)\nforever\n    if <<(level) = [13]> or <(level) = [14]>> then\n        show\n    else\n    end\n    if <(level) = [14]> then\n        show\n        switch costume to (costume1 v)\n        go to x: (-211) y: (110)\n    end\n    if <(level) = [15]> then\n        hide\n    end\nend\n\ngo to x: (-80) y: (-28)\n\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwait until \n\n@White Passage\n\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen flag clicked\ngo to x: (-80) y: (-28)\nswitch costume to (costume1 v)\nforever\n    if <<(level) = [13]> or <(level) = [14]>> then\n        show\n    else\n        hide\n    end\n    if <(level) = [14]> then\n        switch costume to (costume1 v)\n        go to x: (13) y: (-28)\n    end\nend\n\nhide\n\nwhen I receive [black door open  v]\nswitch costume to (costume2 v)\n\ngo to x: (-80) y: (-28)\n\n@Switch2\n\nwhen flag clicked\n\nwhen flag clicked\n\nforever\n    if <(level) = [13]> then\n        show\n    else\n        hide\n    end\nend\n\nswitch costume to (costume1 v)\nwait until <touching (sprite1 v)?>\nswitch costume to (costume2 v)\nbroadcast (black door open  v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@black Passage2\n\nif  then\nend\nhide\n\nwhen flag clicked\n\nwhen I receive [white door open v]\n\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nswitch costume to (costume1 v)\nforever\n    if <(level) = [13]> then\n        show\n    else\n        hide\n    end\nend\n\nswitch costume to (costume2 v)\n\n@Sprite6\n\nwhen flag clicked\nforever\n    go to x: (0) y: (1)\nend\n\n