Decorate -a platformer 
@Stage\n\nwhen flag clicked\nchange [☁ veiwers v] by (1)\nhide variable [☁ veiwers v]\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    switch backdrop to (level)\nend\n\n@welcome\n\n@Marshmallo\n\nwhen flag clicked\nchange [veiwers v] by (1)\nhide variable [veiwers v]\n\nwhen flag clicked\nshow\n\ndefine Platformer engine\nchange [y v] by (-0.5)\nif <key (left arrow v) pressed?> then\n    change [x v] by (-0.8)\nend\nif <key (right arrow v) pressed?> then\n    change [x v] by (0.8)\nend\nset [x v] to ((X) * (0.9))\nchange x by (X)\nif <touching (platforms v)?> then\n    change y by (1)\n    if <touching (platforms v)?> then\n        change y by (1)\n        if <touching (platforms v)?> then\n            change y by (1)\n            if <touching (platforms v)?> then\n                change y by (1)\n                if <touching (platforms v)?> then\n                    change y by (1)\n                    if <touching (platforms v)?> then\n                        change y by (-6)\n                        change x by ((X) * (-1))\n                        if <key (up arrow v) pressed?> then\n                            set [y v] to [10]\n                            if <(X) > [0]> then\n                                set [x v] to [-10]\n                            else\n                                set [x v] to [10]\n                            end\n                        else\n                            set [x v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange y by (Y)\nif <touching (platforms v)?> then\n    change y by ((Y) * (-1))\n    set [y v] to [0]\nend\nchange y by (-0.5)\nif <<touching (platforms v)?> and <key (up arrow v) pressed?>> then\n    set [y v] to [10]\nend\nchange y by (0.5)\nif <(x position) > [200]> then\n    change [level v] by (1)\n    go to x: (X spawn) y: (Y spawn)\nend\nif <touching (trampoline v)?> then\n    set [y v] to [15]\nend\nif <[-195] > (y position)> then\n    go to x: (X spawn) y: (Y spawn)\nend\nif <touching (obstacles v)?> then\n    go to x: (X spawn) y: (Y spawn)\nend\n\nwhen flag clicked\npoint in direction (90)\nset [x spawn v] to [-164]\nset [y spawn v] to [-82]\ngo to x: (X spawn) y: (Y spawn)\nshow\nset size to (50) %\nset [x v] to [0]\nset [y v] to [0]\nforever\n    Platformer engine\nend\n\nwhen flag clicked\n\n    play sound [5 Minute Lo-Fi Hiphop Beats Study Timer \(2\) v] until done\nend\n\n@platforms\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nset [level v] to [1]\nforever\n    switch costume to (level)\nend\n\n@obstacles\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [level v] to [1]\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\nshow\n\n@Sprite1\n\nwhen flag clicked\nforever\n    show\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    go to x: (0) y: (0)\nend\n\n