Color - a platformer           :3
@Stage\n\n@Player\n\nwhen flag clicked\nshow\nswitch costume to (player right v)\ngo to [front v] layer\ngo to x: (-216) y: (-150)\nforever\n    if <(y position) = [-180]> then\n        switch costume to (player v)\n        broadcast (Respawn v)\n        go to x: (-216) y: (-150)\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        switch costume to (player right v)\n        change [x v] by (1)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        switch costume to (player left v)\n        change [x v] by (-1)\n    end\n    set [x v] to ((X) * (0.9))\n    change x by (X)\n    if <touching (levels v)?> then\n        change y by (1)\n        if <touching (levels v)?> then\n            change y by (1)\n            if <touching (levels v)?> then\n                change y by (1)\n                if <touching (levels v)?> then\n                    change y by (1)\n                    if <touching (levels v)?> then\n                        change y by (1)\n                        if <touching (levels v)?> then\n                            change x by ((X) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                if <(X) > [0]> then\n                                    set [x v] to [-5]\n                                else\n                                    set [x v] to [5]\n                                end\n                                set [y v] to [10]\n                            else\n                                set [x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y v] by (-1)\n    change y by (Y)\n    if <touching (levels v)?> then\n        change y by ((Y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <touching (levels v)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [y v] to [15]\n            start sound [Jump v]\n        end\n    end\n    change y by (1)\n    if <touching (death v)?> then\n        broadcast (Respawn v)\n        go to x: (-210) y: (-110)\n        switch costume to (player v)\n        start sound [Death v]\n    end\n    if <(x position) > [227]> then\n        go to x: (-216) y: (-148)\n        change [level v] by (1)\n        switch costume to (player right v)\n        start sound [Next level v]\n    end\n    if <touching (trampoline v)?> then\n        set [y v] to [20]\n        start sound [trampoline v]\n    end\nend\n\nwhen flag clicked\nset [color v] effect to (0)\nforever\n    create clone of (_myself_ v)\n    point towards (mouse-pointer v)\nend\n\nwhen I start as a clone\nrepeat (3)\n    wait (0.05) seconds\n    change size by (10)\n    change [ghost v] effect by (25)\nend\ndelete this clone\n\nwhen [space v] key pressed\nchange [color v] effect by (10)\n\nwhen [s v] key pressed\ngo to x: (-216) y: (-145)\n\n@Levels\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [level v] to [1]\nshow\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\nwhen [s v] key pressed\nbroadcast (Respawn v)\nchange [level v] by (1)\n\n@Background\n\nwhen flag clicked\ngo to [back v] layer\ngo to x: (0) y: (0)\nswitch costume to (sky v)\nshow\n\nwhen flag clicked\nforever\n    wait (0.1) seconds\n    change [color v] effect by (-1)\nend\n\n@Text\n\nwhen flag clicked\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\nwhen [space v] key pressed\nnext costume\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        set [ghost v] effect to (50)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\n@DEATH\n\nwhen flag clicked\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\nwhen [space v] key pressed\nnext costume\n\n@Trampoline\n\nwhen flag clicked\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\nwhen [space v] key pressed\nnext costume\n\n@clouds\n\nwhen flag clicked\nhide\nforever\n    create clone of (_myself_ v)\n    wait (pick random (2.5) to (3.5)) seconds\nend\n\nwhen I start as a clone\nshow\ngo [backward v] (1) layers\nset size to (pick random (50) to (70)) %\nswitch costume to (pick random (1) to (3))\nset [ghost v] effect to (pick random (30) to (45))\nset [cloud side v] to (pick random (1) to (2))\nif <(Cloud side) = [1]> then\n    go to x: (246) y: (pick random (140) to (80))\n    repeat until <(x position) < [-243]>\n        change x by ((0) - (pick random (0.5) to (2)))\n    end\nelse\n    go to x: (-246) y: (pick random (140) to (80))\n    repeat until <(x position) > [243]>\n        change x by (pick random (0.5) to (2))\n    end\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\n@Thumbdedum\n\nwhen flag clicked\nhide\n\nshow\ngo to [front v] layer\ngo [backward v] (2) layers\n\n@Grass\n\nwhen flag clicked\nshow\ngo [backward v] (100) layers\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\nwhen [space v] key pressed\nnext costume\n\n@Trees\n\nwhen flag clicked\nshow\ngo [backward v] (200) layers\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\nwhen [space v] key pressed\nnext costume\n\n@Sound\n\nwhen this sprite clicked\nswitch costume to (costume2 v)\nset volume to (0) %\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset volume to (100) %\nforever\n    play sound [Unlimited by -Xaf- v] until done\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@Introooo\n\nwhen flag clicked\nshow\nstart sound [pop v]\nglide (0) secs to x: (0) y: (-453)\nglide (2) secs to x: (0) y: (0)\nwait (0.5) seconds\nglide (2) secs to x: (0) y: (438)\nhide\n\nwhen [space v] key pressed\nhide\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n