Black and white : A platformer #Games #All #Music #Art

Instructions: Space to change color\nBlack can only go on black and white only on white\nCheck this project out - https://scratch.mit.edu/projects/460100109/

@Stage\n\n@Player\n\nwhen flag clicked\nset size to (50) %\nforever\n    if <<<color (#ffffff) is touching (#000000)?> or <color (#000000) is touching (#ffffff)?>> or <[-170] > (y position)>> then\n        go to x: (-180) y: (-50)\n        broadcast (dead v)\n    end\nend\n\nwhen I receive [dead v]\nswitch costume to (1 v)\n\nwhen I receive [respawn v]\ngo to x: (-180) y: (-50)\n\nwhen I receive [respawn v]\nswitch costume to (1 v)\n\nwhen I receive [levelup v]\nswitch costume to (1 v)\ngo to x: (-180) y: (-50)\n\nwhen [space v] key pressed\nif <(costume [number v]) = [1]> then\n    set [costume v] to [2]\nelse\n    set [costume v] to [1]\nend\nswitch costume to (Costume)\nwait (0.1) seconds\n\nwhen I receive [play v]\nset [costume v] to [1]\ngo to [front v] layer\nswitch costume to (1 v)\ngo [backward v] (4) layers\nset [ghost v] effect to (0)\nshow\ngo to x: (-180) y: (-50)\nset [level v] to [1]\nset [xvel v] to [0]\nset [yvel v] to [0]\npoint in direction (90)\nforever\n    change [yvel v] by (-1)\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [xvel v] by (-0.8)\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [xvel v] by (0.8)\n    end\n    set [xvel v] to ((Xvel) * (0.9))\n    change x by (Xvel)\n    if <<color (#ffffff) is touching (#ffffff)?> or <color (#000000) is touching (#000000)?>> then\n        change y by (1)\n    end\n    if <<color (#ffffff) is touching (#ffffff)?> or <color (#000000) is touching (#000000)?>> then\n        change y by (1)\n    end\n    if <<color (#ffffff) is touching (#ffffff)?> or <color (#000000) is touching (#000000)?>> then\n        change y by (1)\n    end\n    if <<color (#ffffff) is touching (#ffffff)?> or <color (#000000) is touching (#000000)?>> then\n        change y by (1)\n    end\n    if <<color (#ffffff) is touching (#ffffff)?> or <color (#000000) is touching (#000000)?>> then\n        change y by (-4)\n        change x by ((Xvel) * (-1))\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [yvel v] to [10]\n            if <([abs v] of (Xvel) ) = (Xvel)> then\n                set [xvel v] to [-5.9]\n            else\n                set [xvel v] to [5.9]\n            end\n        else\n            set [xvel v] to [0]\n        end\n    end\n    change y by (Yvel)\n    if <<color (#ffffff) is touching (#ffffff)?> or <color (#000000) is touching (#000000)?>> then\n        change y by ((0) - (Yvel))\n        set [yvel v] to [1]\n    end\n    change y by (-1)\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <<color (#ffffff) is touching (#ffffff)?> or <color (#000000) is touching (#000000)?>>> then\n        set [yvel v] to [15]\n    end\n    change y by (1)\n    if <(y position) > [180]> then\n        set [yvel v] to [0]\n    end\nend\n\nwhen flag clicked\nhide\nbroadcast (play v)\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    if <(x position) > [220]> then\n        go to x: (-180) y: (-50)\n        broadcast (levelup v)\n        change [level v] by (1)\n    end\n    if <(Level) = [15]> then\n        broadcast (End v)\n        stop [other scripts in sprite v]\n    end\nend\n\n@Ground\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nforever\n    go to [front v] layer\n    go [backward v] (10) layers\nend\n\nwhen I receive [levelup v]\nnext costume\nif <(costume [number v]) = [11]> then\n    broadcast (End v) and wait\nend\n\n@Sprite1\n\nwhen flag clicked\nforever\n    go to [back v] layer\n    go to x: (0) y: (0)\nend\n\n@skip\n\nwhen flag clicked\ngo to x: (150) y: (-150)\nset [canweskipornotscratchperson v] to [yes]\n\nwhen this sprite clicked\nif <[yes] = (Canweskipornotscratchperson)> then\n    broadcast (levelup v) and wait\nend\n\nwhen flag clicked\nset [canweskipornotscratchperson v] to [yes]\nswitch costume to (1 v)\npoint in direction (90)\nset size to (50) %\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((110) - (size)) / (5))\n        set [brightness v] effect to (10)\n    else\n        change size by (((100) - (size)) / (5))\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\nset [canweskipornotscratchperson v] to [yes]\nforever\n    go to [front v] layer\n    go [backward v] (5) layers\nend\n\nwhen I receive [end v]\nset [canweskipornotscratchperson v] to [no]\n\nwhen I receive [green flag v]\nset [canweskipornotscratchperson v] to [yes]\n\n@restart\n\nwhen this sprite clicked\nbroadcast (respawn v)\n\nwhen flag clicked\nswitch costume to (1 v)\npoint in direction (90)\nset size to (50) %\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((110) - (size)) / (5))\n        set [brightness v] effect to (10)\n    else\n        change size by (((100) - (size)) / (5))\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    go [backward v] (5) layers\n    show\nend\n\n@Sound\n\nwhen this sprite clicked\nif <(Munsic on) = [0]> then\n    broadcast (Munsic v)\n    switch costume to (1 v)\nelse\n    set [munsic on v] to [0]\n    repeat (5)\n        change size by (1)\n    end\n    switch costume to (2 v)\nend\n\nwhen I receive [munsic v]\nset [munsic on v] to [1]\n\nwhen flag clicked\nswitch costume to (1 v)\npoint in direction (90)\nset size to (50) %\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((110) - (size)) / (5))\n        set [brightness v] effect to (10)\n    else\n        change size by (((100) - (size)) / (5))\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Munsic on) = [0]> then\n        set volume to (0) %\n    else\n        set volume to (70) %\n    end\nend\n\nwhen flag clicked\nforever\n    play sound [Xaf - Unlimited v] until done\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    go [backward v] (5) layers\nend\n\n@Thumb\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (100)\n\n@Words\n\nwhen flag clicked\nswitch costume to (untitled drawing - 2020-12-27t164936 v)\nforever\n    go to [front v] layer\n    go [backward v] (7) layers\n    set [brightness v] effect to (20)\nend\n\nwhen I receive [levelup v]\nnext costume\n\n@Sprite3\n\nwhen flag clicked\nhide\n\nwhen I receive [end v]\nforever\n    create clone of (_myself_ v)\n    wait (0.0001) seconds\nend\n\nwhen I start as a clone\nshow\nset size to (40) %\nswitch costume to (pick random (1) to (4))\ngo to x: (pick random (-200) to (200)) y: (150)\nforever\n    change y by (-10)\n    turn right (10) degrees\n    if <touching (_edge_ v)?> then\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        delete this clone\n    end\nend\n\n