Platformer Creator!


@Stage\n\n@Player\n\ndefine fast\nrepeat (6)\n    if <<touching (levels v)?> or <touching (movin platforms v)?>> then\n        change y by (1)\n    end\nend\n\ndefine ycoll\nrepeat until <not <<touching (levels v)?> or <touching (movin platforms v)?>>>\n    if <(y) > [0]> then\n        change y by (-1)\n    else\n        change y by (1)\n    end\nend\n\ndefine xcoll\nrepeat until <not <<touching (levels v)?> or <touching (movin platforms v)?>>>\n    if <(x) > [0]> then\n        change x by (-1)\n    else\n        change x by (1)\n    end\nend\n\ndefine spawn\ngo to x: (-190) y: (-60)\nset [x v] to [0]\nset [y v] to [0]\n\nwhen flag clicked\nspawn\nset [level v] to [1]\nforever\n    if <(x position) > [240]> then\n        change [level v] by (1)\n        broadcast (Next Level v)\n        wait (0.35) seconds\n        spawn\n    end\nend\n\nwhen I receive [end intro v]\n\nwhen I receive [next level v]\nwait (0.35) seconds\nspawn\n\nwhen flag clicked\nset [ghost v] effect to (0)\nspawn\nset [x v] to [0]\nset [y v] to [0]\nforever\n    change [y v] by (-1)\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > [0]>>> then\n        change [x v] by (1)\n    end\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < [0]>>> then\n        change [x v] by (-1)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <<touching (levels v)?> or <touching (movin platforms v)?>> then\n        fast\n        if <<touching (levels v)?> or <touching (movin platforms v)?>> then\n            change y by (-6)\n            xcoll\n            if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > [0]>>> then\n                set [y v] to [11]\n                if <([abs v] of (x) ) = (x)> then\n                    set [x v] to [-8]\n                else\n                    set [x v] to [8]\n                end\n            else\n                set [x v] to [0]\n            end\n        end\n    end\n    change y by (y)\n    if <<touching (levels v)?> or <touching (movin platforms v)?>> then\n        ycoll\n        if <<<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > [0]>>> and <(y) < [0]>> then\n            set [y v] to [13]\n        else\n            set [y v] to [0]\n        end\n    end\n    if <touching (bouncepads v)?> then\n        set [y v] to [20]\n    end\n    if <<touching (danger v)?> or <touching (danger2 v)?>> then\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        spawn\n        set [ghost v] effect to (0)\n    end\nend\n\n@Levels\n\nwhen flag clicked\nswitch costume to (1 v)\n\nwhen I receive [next level v]\nwait (0.5) seconds\nnext costume\n\n@Danger\n\nwhen flag clicked\nswitch costume to (1 v)\n\nwhen I receive [next level v]\nwait (0.5) seconds\nnext costume\n\n@Bouncepads\n\nwhen flag clicked\nswitch costume to (1 v)\n\nwhen I receive [next level v]\nwait (0.5) seconds\nnext costume\n\n@Text\n\nwhen flag clicked\ngo to [back v] layer\nswitch costume to (1 v)\n\nwhen I receive [next level v]\nwait (0.5) seconds\nnext costume\n\n@Movin platforms\n\nwhen flag clicked\ngo to x: (-110) y: (0)\nforever\n    repeat (70)\n        change x by (3)\n    end\n    wait (1) seconds\n    repeat (70)\n        change x by (-3)\n    end\n    wait (1) seconds\nend\n\nwhen I receive [next level v]\nwait (0.5) seconds\nnext costume\n\nwhen flag clicked\nforever\n    hide\n    wait until <(level) = [9]>\n    wait (0.5) seconds\n    show\n    wait until <(level) = [10]>\n    wait (0.5) seconds\nend\n\n@Danger2\n\nwhen flag clicked\nshow\nset [ghost v] effect to (0)\nswitch costume to (1 v)\nforever\n    wait (2) seconds\n    repeat (4)\n        change [ghost v] effect by (25)\n    end\n    hide\n    wait (2) seconds\n    repeat (4)\n        change [ghost v] effect by (-25)\n    end\n    show\nend\n\nwhen I receive [next level v]\nwait (0.5) seconds\nnext costume\n\n@Stuff\n\n@Trail\n\nwhen flag clicked\nhide\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\ngo to (player v)\nshow\nset size to (50) %\nset [ghost v] effect to (0)\nrepeat (10)\n    change [ghost v] effect by (3)\n    change size by (-2)\nend\ndelete this clone\n\n@Next Level\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\nshow\ngo to x: (530) y: (0)\nrepeat until <(x position) < [-530]>\n    change x by (-40)\nend\nhide\n\n@Thumbnail\n\nwhen flag clicked\nshow\ngo to [front v] layer\nset [ghost v] effect to (100)\n\n@Skip Button\n\nwhen flag clicked\nshow\nset [brightness v] effect to (0)\ngo to x: (0) y: (-140)\ngo to [back v] layer\nwait (1) seconds\ngo to [front v] layer\nforever\n    wait until <touching (mouse-pointer v)?>\n    set [brightness v] effect to (10)\n    wait until <not <touching (mouse-pointer v)?>>\n    set [brightness v] effect to (0)\nend\n\nwhen I receive [next level v]\nhide\nwait (1) seconds\nshow\n\nwhen this sprite clicked\nif <(level) = [10]> then\n    broadcast (Next Level v)\n    set [level v] to [1]\nelse\n    broadcast (Next Level v)\n    change [level v] by (1)\nend\n\n