Platformer Engine
@Stage\n\nwhen flag clicked\nforever\n    play sound [music v] until done\n    wait (1) seconds\nend\n\n@Level\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@player\n\nwhen flag clicked\nbroadcast (Restart v)\nset [level v] to [1]\nforever\n    if <key (left arrow v) pressed?> then\n        change [x vel v] by (-1)\n    end\n    if <key (right arrow v) pressed?> then\n        change [x vel v] by (1)\n    end\n    set [x vel v] to ((X Vel) * (0.9))\n    change x by (X Vel)\n    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (-4)\n        change x by ((X Vel) * (-1))\n        if <key (up arrow v) pressed?> then\n            if <(X Vel) > [0]> then\n                set [x vel v] to [-10]\n            else\n                set [x vel v] to [10]\n            end\n            set [y vel v] to [15]\n        else\n            set [x vel v] to [0]\n        end\n    end\n    if <touching (water v)?> then\n        change [y vel v] by (-0.5)\n    else\n        change [y vel v] by (-1)\n    end\n    change y by (Y Vel)\n    if <touching (level v)?> then\n        change y by ((Y Vel) - ((Y Vel) * (2)))\n        set [y vel v] to [0]\n    end\n    change y by (-1)\n    if <touching (water v)?> then\n        if <key (up arrow v) pressed?> then\n            set [y vel v] to [5]\n        end\n    else\n        if <<touching (level v)?> and <key (up arrow v) pressed?>> then\n            set [y vel v] to [15]\n        end\n    end\n    change y by (1)\n    create clone of (_myself_ v)\n    if <(x position) > [239]> then\n        broadcast (Next Level v) and wait\n        change [level v] by (1)\n    end\n    if <touching (danger v)?> then\n        broadcast (Restart v)\n    end\nend\n\nwhen I start as a clone\nclear graphic effects\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I receive [next level v]\nbroadcast (Restart v)\n\nwhen I receive [restart v]\nset [x vel v] to [0]\nset [y vel v] to [0]\ngo to x: (-164) y: (-114)\n\n@tiles\n\n@Danger\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@water\n\nwhen flag clicked\nforever\n    set [tide v] to [0]\n    repeat (10)\n        change [tide v] by (1)\n    end\n    repeat (20)\n        change [tide v] by (-1)\n    end\n    repeat (10)\n        change [tide v] by (1)\n    end\nend\n\nwhen flag clicked\nforever\n    set y to (Tide)\n    switch costume to (Level)\nend\n\n@Thumbnail\n\nwhen flag clicked\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\n\n
REMIXING INSTRUCTIONS\n\nOnce you remixed, delete the thumbnail sprite.\nAll you have to do then is add more level costumes IMPORTANT: If you add a new level, add a new costume to danger and water. If the level does not have any spikes or water, just leave the costume blank.\n\nHOW TO USE\nArrow keys to move.