Remixable Platformer Engine V0.4

Instructions: To move use WASD or arrow keys. This is a remixable Platformer Engine and please give me credit if you use the script. \n\nKinda old, hand to take it down because of 'problems'.\n

@Stage\n\n@objects\n\nwhen flag clicked\ngo to [front v] layer\nswitch costume to (costume1 v)\nshow\ngo to x: (0) y: (0)\n\nwhen I receive [next v]\nnext costume\n\n@special objects\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next v]\nnext costume\n\n@player\n\nwhen flag clicked\npoint in direction (90)\nset [y spawn v] to [-129]\nset [x spawn v] to [-218]\ngo to x: (X Spawn) y: (Y Spawn)\nshow\nset size to (50) %\nset [movement x v] to [0]\nset [movement y v] to [0]\nforever\n    player movement\nend\n\ndefine player movement\nif on edge, bounce\nchange [movement y v] by (-0.5)\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [movement x v] by (-1)\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [movement x v] by (1)\nend\nset [movement x v] to ((Movement X) * (0.9))\nchange x by (Movement X)\nif <touching (objects v)?> then\n    change y by (1)\n    if <touching (objects v)?> then\n        change y by (1)\n        if <touching (objects v)?> then\n            change y by (1)\n            if <touching (objects v)?> then\n                change y by (1)\n                if <touching (objects v)?> then\n                    change y by (1)\n                    if <touching (objects v)?> then\n                        change y by (1)\n                        if <touching (objects v)?> then\n                            change y by (-6)\n                            change x by ((Movement X) * (-1))\n                            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                set [movement y v] to [10]\n                                if <(Movement X) > [0]> then\n                                    set [movement x v] to [-10]\n                                else\n                                    set [movement x v] to [10]\n                                end\n                            else\n                                set [movement x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange y by (Movement Y)\nif <touching (objects v)?> then\n    change y by ((Movement Y) * (-1))\n    set [movement y v] to [0]\nend\nchange y by (-0.5)\nif <<touching (objects v)?> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n    set [movement y v] to [10]\nend\nchange y by (0.5)\nif <touching color (#ff0000)?> then\n    go to x: (X Spawn) y: (Y Spawn)\nend\nif <touching color (#00ff1a)?> then\n    set [movement y v] to [16]\nend\nif <touching color (#f000ff)?> then\n    set [movement x v] to [16]\nend\n\nwhen flag clicked\npoint in direction (90)\nset size to (100) %\nswitch costume to (square v)\nforever\n    point in direction (90)\n    if <<(x position) = [229]> or <(x position) > [229]>> then\n        go to x: (X Spawn) y: (Y Spawn)\n        broadcast (next v)\n    end\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@Sprite1\n\nwhen flag clicked\nswitch costume to (title picture2 v)\nset [ghost v] effect to (100)\nshow\n\n@platform\n\nwhen flag clicked\ngo to [front v] layer\nshow\nswitch costume to (costume2 v)\n\n