orange--a platformer
@Stage\n\nwhen flag clicked\nforever\n    play sound [Xylo2 v] until done\nend\n\n@Hit Box\n\ndefine Platform (jump height) (gravity) (friction) (runing speed)\nif <key (d v) pressed?> then\n    change [x velocity v] by (runing speed)\nend\nif <key (a v) pressed?> then\n    change [x velocity v] by ((runing speed) * (-1))\nend\nset [x velocity v] to ((X Velocity) * (friction))\nchange x by ((X Velocity) * (1))\nif  then\n    set [slope v] to [0]\n    repeat until <<(Slope) = [8]> or <not >>\n        change [slope v] by (1)\n        change y by (1)\n    end\n    if <touching color (#ce6f24)?> then\n        change y by ((Slope) * (-1))\n        repeat ([ceiling v] of ([abs v] of (X Velocity) ) )\n            if <touching color (#ce6f24)?> then\n                change x by ((([abs v] of (X Velocity) ) / (X Velocity)) * (-1))\n            end\n        end\n        set [x velocity v] to [0]\n    end\nend\nchange y by (Y Velocity)\nif <touching color (#ce6f24)?> then\n    repeat ([ceiling v] of ([abs v] of (Y Velocity) ) )\n        if <touching color (#ce6f24)?> then\n            change y by ((([abs v] of (Y Velocity) ) / (Y Velocity)) * (-1))\n        end\n    end\n    if <<(([abs v] of (Y Velocity) ) / (Y Velocity)) = [-1]> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        set [y velocity v] to (jump height)\n    else\n        set [y velocity v] to [0]\n    end\nelse\n    change [y velocity v] by (-1)\nend\n\nwhen flag clicked\nforever\n    if <touching color (#ff7b4c)?> then\n        go to x: (-181) y: (-96)\n        next backdrop\n        play sound [Coin v] until done\n        set [xv v] to [0]\n        set [yv v] to [0]\n        set [slope v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#ce5124)?> then\n        go to x: (-181) y: (-96)\n        start sound [Alien Creak2 v]\n        set [xv v] to [0]\n        set [yv v] to [0]\n        set [slope v] to [0]\n    end\nend\n\nwhen I receive [message1 v]\nswitch backdrop to (backdrop1 v)\ngo to x: (-181) y: (-96)\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nset [slope v] to [0]\nforever\n    Platform [12] [-1] [0.7] [2]\nend\n\n@Sprite1\n\n@thumnail\n\nwhen flag clicked\nhide\nbroadcast (message1 v)\n\ngo to x: (-6) y: (23)\ngo to [front v] layer\nshow\n\n@Sprite2\n\n
use arrow keys to move\navoid dark orange\n\nfor some, this doesn't work\n