Platformer Engine
@Stage\n\n@Sprite1\n\nwhen I receive [loop v]\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (0)\n    change x by (speedx)\n    change y by (speedy)\n    change [speedx v] by ((-4) * (<key (left arrow v) pressed?> - <key (right arrow v) pressed?>))\n    set [speedx v] to ((speedx) * (0.6))\n    if <touching (level v)?> then\n        change y by ((0) - (speedy))\n        set [speedy v] to [0]\n        if <touching (level v)?> then\n            change y by (1)\n            switch costume to (costume1 v)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change y by (1)\n                            if <touching (level v)?> then\n                                change y by (-2)\n                                set [speedx v] to ((0) - (speedx))\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [speedy v] by (-0.8)\n    change y by (-1)\n    if <touching (level v)?> then\n        change [speedy v] by (<key (up arrow v) pressed?> * (12))\n    end\n    change y by (1)\n    if <[240] < (x position)> then\n        set x to (-210)\n        broadcast (next v)\n    end\n    if <(cost) = [1]> then\n        go to x: (-240) y: (0)\n        set [cost v] to [0]\n    end\nend\n\n@Level\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next v]\nnext costume\n\n
\n\n thumbs up!\nspace to stop the cray z ness