☀ Desert Platformer ☀

Instructions:                                  _Instructions_\n\nUse Key Up To Jump - ▲\nUse Key Right To go Right - ▶\nUse Key Left To go Left - ◀

@Stage\n\n@Player\n\nwhen I receive [finished bro v]\ngo to x: (-213) y: (-127)\nset [x velocity v] to [0]\nset [y velocity v] to [0]\n\nwhen flag clicked\nshow\ngo to x: (-220) y: (-127)\nswitch costume to (right v)\nhide variable [x velocity v]\nhide variable [y velocity v]\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nforever\n    change [y velocity v] by (-1)\n    if <key (right arrow v) pressed?> then\n        change [x velocity v] by (0.9)\n        switch costume to (right v)\n    end\n    if <key (left arrow v) pressed?> then\n        change [x velocity v] by (-0.9)\n        switch costume to (left v)\n    end\n    set [x velocity v] to ((X Velocity) * (0.9))\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 (up arrow v) pressed?> then\n            set [y velocity v] to [12]\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        else\n            set [x velocity v] to [0]\n        end\n    end\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    end\n    change y by (-1)\n    if <<key (up arrow v) pressed?> and <touching (ground v)?>> then\n        set [y velocity v] to [12]\n    end\n    change y by (1)\n    if <touching (spikes v)?> then\n        go to x: (-213) y: (-127)\n        set [x velocity v] to [0]\n        set [y velocity v] to [0]\n    end\n    if <touching color (#f0ff00)?> then\n        broadcast (finished bro v)\n    end\nend\n\nwhen [s v] key pressed\nbroadcast (finished bro v)\n\n@Ground\n\nwhen flag clicked\nshow\ngo to [front v] layer\nswitch costume to (costume0 v)\n\nwhen I receive [finished bro v]\nnext costume\n\n@Spikes\n\nwhen I receive [finished bro v]\nnext costume\n\nwhen flag clicked\nshow\ngo to [back v] layer\nswitch costume to (spike v)\n\n@Goal\n\nwhen flag clicked\nshow\ngo to [back v] layer\ngo to x: (219) y: (-110)\n\n@Dust\n\nwhen I start as a clone\nset size to (pick random (30) to (100)) %\ngo to [front v] layer\nshow\ngo to x: (230) y: (pick random (-200) to (200))\npoint in direction (pick random (-105) to (-75))\nset [ghost v] effect to (100)\nrepeat (5)\n    change [ghost v] effect by (pick random (-3) to (-10))\nend\nrepeat until <(x position) < [-230]>\n    move (10) steps\nend\nrepeat (5)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen flag clicked\nshow\nforever\n    create clone of (_myself_ v)\n    wait (0.1) seconds\nend\n\n@Sun\n\nwhen flag clicked\nshow\ngo to x: (24) y: (15)\nset [ghost v] effect to (50)\ngo to [back v] layer\n\n@Tm\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\ngo to [front v] layer\n\n