red - a scrolling online multiplayer platformer
@Stage\n\nwhen flag clicked\nset [the level v] to [1]\nforever\n    switch backdrop to (The Level)\nend\n\nwhen flag clicked\nforever\n    play sound [bensound-clearday v] until done\nend\n\nwhen I receive [ha ha ha! v]\nstop [other scripts in sprite v]\n\n@Player\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nclear graphic effects\nrepeat (10)\n    change [ghost v] effect by (10)\n    change y by (5)\n    turn right (5) degrees\nend\ndelete this clone\n\nwhen I receive [next level v]\nbroadcast (Reset v)\n\nwhen I receive [reset v]\nset [x velocity v] to [0]\nset [y velocity v] to [0]\ngo to x: (-100) y: (40)\n\nwhen I receive [start game v]\nshow\ngo to x: (-100) y: (40)\nbroadcast (Next Level v)\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [x velocity v] by (-1.5)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [x velocity v] by (1.5)\n    end\n    set [x velocity v] to ((X Velocity) * (0.85))\n    change x by (X Velocity)\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((X Velocity) * (-1))\n        if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n            if <(X Velocity) > [0]> then\n                set [x velocity v] to [-10]\n            else\n                set [x velocity v] to [10]\n            end\n            set [y velocity v] to [15]\n        else\n            set [x velocity v] to [0]\n        end\n    end\n    change [y velocity v] by (-1)\n    change y by (Y Velocity)\n    if <touching (ground v)?> then\n        change y by ((Y Velocity) - ((Y Velocity) * (2)))\n        set [y velocity v] to [0]\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            switch costume to (crouch v)\n        else\n            switch costume to (player v)\n        end\n    end\n    change y by (-1)\n    if <<touching (ground v)?> and <<key (down arrow v) pressed?> or <key (s v) pressed?>>> then\n        set [y velocity v] to [15]\n    end\n    change y by (1)\n    if <(x position) > [239]> then\n        broadcast (ha ha ha! v)\n        hide\n        set [end v] to [1]\n        stop [this script v]\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\nshow\nrepeat (100)\n    change [ghost v] effect by (10)\nend\ngo to x: (0) y: (0)\nhide\ngo to [front v] layer\nclear graphic effects\n\n@Player Trail\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nrepeat (10)\n    change [ghost v] effect by (21)\n    change [brightness v] effect by (-5)\nend\ndelete this clone\n\nwhen I receive [scroll v]\nhide\ndelete this clone\n\nwhen I receive [start game v]\nset size to (100) %\nshow\nforever\n    point in direction ([direction v] of [player v])\n    switch costume to ([costume name v] of [player v])\n    go to x: ([x position v] of [player v]) y: ([y position v] of [player v])\n    create clone of (_myself_ v)\nend\n\nwhen I receive [ha ha ha! v]\nhide\nstop [other scripts in sprite v]\n\n@multiplayer\n\nwhen flag clicked\nshow\nset [end v] to [0]\nswitch costume to (multiplayer v)\nwait (3) seconds\nswitch costume to (multiplayer2 v)\nwait (2) seconds\nhide\nbroadcast (start game v)\n\n@Ground\n\nwhen flag clicked\nhide\n\nwhen I receive [start game v]\nshow\n\nwhen I receive [ha ha ha! v]\nhide\n\n@ha ha ha\n\nwhen flag clicked\nhide\n\nwhen I receive [ha ha ha! v]\nshow\ngo to x: (0) y: (0)\nstart sound [Rick Astley - Never Gonna Give You Up v]\nswitch costume to (20037 v)\nforever\n    next costume\nend\n\n@text\n\nwhen flag clicked\nhide\n\nwhen I receive [ha ha ha! v]\nshow\n\n