Colours 2 -- a platformer #games#all

Instructions: WELCOME BACK introducting...Colours 2!\nwasd or arrow keys to move\npart 1: scratch.mit.edu/projects/621850284/\npart 3: https://scratch.mit.edu/projects/670341231/

@Stage\n\nwhen flag clicked\nforever\n    play sound [Alan Walker, AuRa, Tomine Harket - Darkside v] until done\nend\n\n@scratch tb\n\nwhen flag clicked\nforever\n    hide\nend\n\ngo to [front v] layer\nshow\n\n@dude\n\nwhen flag clicked\nset [scene# v] to [1]\nset [acceleration v] to [8]\nset [gravity v] to [-1.15]\nset [jumpforce v] to [15]\nset [spdy v] to [0]\nswitch costume to (costume1 v)\nset [ghost v] effect to (0)\ngo to x: (-202) y: (-29)\nforever\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        if <(falling) < [3]> then\n            set [spdy v] to (jumpforce)\n        end\n    end\n    if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n        set [spdx v] to [8]\n    end\n    if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n        set [spdx v] to [-8]\n    end\n    set [spdx v] to ((spdx) * (0.8))\n    change [spdy v] by (gravity)\n    move in steps (([abs v] of (spdx) ) + ([abs v] of (spdy) ))\nend\n\ndefine move in steps (steps)\nchange [falling v] by (1)\nrepeat (steps)\n    set [last val v] to (x position)\n    change x by ((spdx) / (steps))\n    if <touching (lvl v)?> then\n        set x to (last val)\n        set [spdx v] to [0]\n    end\n    set [last val v] to (y position)\n    change y by ((spdy) / (steps))\n    if <touching (lvl v)?> then\n        set y to (last val)\n        if <(spdy) < [0]> then\n            set [falling v] to [0]\n        end\n        set [spdy v] to [0]\n    end\nend\n\nwhen flag clicked\nbroadcast (lets go bros v)\n\nwhen I receive [lets go bros v]\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nswitch costume to (costume2 v)\nrepeat (10)\n    change [ghost v] effect by (5)\n    change size by (-5)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    if <(x position) > [240]> then\n        broadcast (change scene v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(y position) = [-184]> then\n        repeat (4)\n            change [ghost v] effect by (25)\n        end\n        go to x: (-202) y: (-29)\n        wait (0.3) seconds\n        set [ghost v] effect to (0)\n    end\n    if <touching (danger v)?> then\n        repeat (4)\n            change [ghost v] effect by (25)\n        end\n        go to x: (-202) y: (-29)\n        wait (0.3) seconds\n        set [ghost v] effect to (0)\n    end\n    if <touching (sprite2 v)?> then\n        repeat (4)\n            change [ghost v] effect by (25)\n        end\n        go to x: (-202) y: (-29)\n        wait (0.3) seconds\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen I receive [change scene v]\ngo to x: (-202) y: (-29)\n\n@lvl\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [change scene v]\nnext costume\nbroadcast (goto v)\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [5]> then\n        broadcast (finally colours v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [6]> then\n        broadcast (new guy v)\n    end\nend\n\n@txt\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [change scene v]\nnext costume\n\n@danger\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [change scene v]\nnext costume\n\n@mission\n\nwhen flag clicked\nhide\n\nwhen I receive [finally colours v]\nshow\nforever\n    if <touching (dude v)?> then\n        broadcast (note out v)\n    end\nend\n\nwhen I receive [note out v]\nforever\n    hide\nend\n\n@Sprite1\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\n\nwhen I receive [note out v]\nshow\nswitch costume to (costume2 v)\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        hide\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\nhide\n\nwhen I receive [new guy v]\nshow\n\n