97% Generic Platformer

Instructions: SCROLL DOWN FOR HINTS!\n\nI mean it is kind of self explanatory, arrows to move,       r key to restart.         ALL 34 LEVELS ARE POSSIBLE\n\nCAN ANYONE BEAT A TIME OF 170???\nLevel 13: use the text!\nLevel 14: respawn point, try dying!\nLevel 15: run!\n\nDON'T FORGET TO HEART AND STAR!

@Stage\n\nwhen flag clicked\nforever\n    wait until <(backdrop [name v]) = [WIN]>\n    if <(TIME) < (☁ High score)> then\n        set [☁ high score v] to (TIME)\n    end\nend\n\nwhen flag clicked\nswitch backdrop to (default v)\nSetup\n\nwhen I receive [start v]\nswitch backdrop to (chose caracter v)\n\nwhen I receive [next level v]\nnext backdrop\n\nwhen backdrop switches to [win v]\nshow variable [☁ high score v]\nstop all sounds\nplay sound [Triumph v] until done\n\nwhen I receive [tick v]\nwait until <(backdrop [name v]) = [Level 1]>\nrepeat until <(backdrop [name v]) = [WIN]>\n    change [time v] by (.1)\n    wait (.01) seconds\nend\n\ndefine Setup\nhide variable [time v]\nhide variable [☁ high score v]\nset [time v] to [0]\nbroadcast (Tick v)\nrepeat until <(backdrop [name v]) = [WIN]>\n    play sound [Techno v] until done\nend\n\nwhen I receive [reset v]\nstop all sounds\nswitch backdrop to (level 1 v)\nSetup\n\nwhen backdrop switches to [level 1 v]\nshow variable [time v]\n\nset [☁ high score v] to [400]\n\n@Player\n\nwhen flag clicked\nhide variable [deaths v]\nset [color v] effect to (0)\nSetup\ngo to x: (0) y: (0)\nhide\n\nwhen [r v] key pressed\nset [xv v] to [0]\nset [yv v] to [0]\ngo to x: (-180) y: (100)\n\ndefine movement\nset size to (80) %\ngo to x: (-180) y: (-54)\nwait (.2) seconds\nforever\n    Detection\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [xv v] by (1)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((XV) * (0.9))\n    change x by (XV)\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (1)\n                        if <touching color (#000000)?> then\n                            change x by ((XV) * (-1))\n                            change y by (-5)\n                            if <<<key (up arrow v) pressed?> or <key (space v) pressed?>> or <key (w v) pressed?>> then\n                                if <(XV) > [0]> then\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\n                                end\n                                set [yv v] to [10]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (YV)\n    if <touching color (#000000)?> then\n        change y by ((YV) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <<touching color (#000000)?> and <<<key (up arrow v) pressed?> or <key (space v) pressed?>> or <key (w v) pressed?>>> then\n        set [yv v] to [15]\n    end\n    change y by (1)\nend\n\nwhen I receive [next level v]\nhide\nstop [other scripts in sprite v]\nset [xv v] to [0]\nset [yv v] to [0]\ngo to x: (-180) y: (-54)\nshow\nmovement\n\nwhen backdrop switches to [chose caracter v]\nwait (.75) seconds\nset size to (300) %\nshow\nrepeat until <key (1 v) pressed?>\n    if <key (space v) pressed?> then\n        change [color v] effect by (10)\n    end\nend\nbroadcast (NEXT LEVEL v)\nmovement\n\ndefine Detection\nif <touching color (#ff0000)?> then\n    broadcast (DIE v)\nend\n\nwhen I receive [die v]\nset [xv v] to [0]\nset [yv v] to [0]\ngo to x: (-180) y: (100)\nchange [deaths v] by (1)\n\ndefine Setup\nset [deaths v] to [0]\nset [xv v] to [0]\nset [yv v] to [0]\n\nwhen I receive [reset v]\nSetup\ngo to x: (-180) y: (100)\n\nwhen backdrop switches to [level 1 v]\nshow variable [deaths v]\n\n@Start\n\nwhen flag clicked\npoint in direction (90)\nset size to (200) %\ngo to x: (0) y: (-70)\nswitch costume to (start v)\nset [ghost v] effect to (0)\nset [brightness v] effect to (100)\nset [pixelate v] effect to (-100)\npixelate in\nrepeat until <not <(backdrop [name v]) = [DEFAULT]>>\n    if <(costume [name v]) = [Start]> then\n        if <touching (mouse-pointer v)?> then\n            set [ghost v] effect to (20)\n            change size by (((220) - (size)) / (3))\n            point in direction (([sin v] of ((timer) * (1000)) ) + (90))\n        else\n            point in direction (90)\n            set [ghost v] effect to (-10)\n            change size by (((200) - (size)) / (3))\n        end\n    end\n    if <(costume [name v]) = [Restart]> then\n        if <touching (mouse-pointer v)?> then\n            set [ghost v] effect to (20)\n            change size by (((100) - (size)) / (3))\n            point in direction (([sin v] of ((timer) * (1000)) ) + (90))\n        else\n            point in direction (90)\n            set [ghost v] effect to (-10)\n            change size by (((80) - (size)) / (3))\n        end\n    end\nend\n\nwhen this sprite clicked\nif <(costume [name v]) = [Start]> then\n    start sound [Connect v]\nend\nif <(backdrop [name v]) = [DEFAULT]> then\n    broadcast (start v)\n    pixelate out\nelse\n    if <(backdrop [name v]) = [WIN]> then\n        broadcast (RESET v)\n        hide\n    end\nend\n\ndefine pixelate out\nrepeat (10)\n    change [brightness v] effect by (10)\n    change [pixelate v] effect by (-10)\n    wait (.03) seconds\nend\nhide\n\ndefine pixelate in\nshow\nrepeat (10)\n    change [brightness v] effect by (-10)\n    change [pixelate v] effect by (10)\n    wait (.03) seconds\nend\n\nwhen backdrop switches to [win v]\nset [brightness v] effect to (0)\nset [pixelate v] effect to (0)\nset size to (90) %\ngo to x: (-175) y: (85)\nswitch costume to (restart v)\nshow\nrepeat until <not <(backdrop [name v]) = [WIN]>>\n    if <(costume [name v]) = [Start]> then\n        if <touching (mouse-pointer v)?> then\n            set [ghost v] effect to (20)\n            change size by (((220) - (size)) / (3))\n            point in direction (([sin v] of ((timer) * (1000)) ) + (90))\n        else\n            point in direction (90)\n            set [ghost v] effect to (-10)\n            change size by (((200) - (size)) / (3))\n        end\n    end\n    if <(costume [name v]) = [Restart]> then\n        if <touching (mouse-pointer v)?> then\n            set [ghost v] effect to (20)\n            change size by (((100) - (size)) / (3))\n            point in direction (([sin v] of ((timer) * (1000)) ) + (90))\n        else\n            point in direction (90)\n            set [ghost v] effect to (-10)\n            change size by (((80) - (size)) / (3))\n        end\n    end\nend\n\n@Load Screen\n\ndefine pixelate in\nshow\nrepeat (10)\n    change [brightness v] effect by (-10)\n    change [pixelate v] effect by (10)\n    wait (.03) seconds\nend\n\ndefine pixelate out\nrepeat (10)\n    change [brightness v] effect by (10)\n    change [pixelate v] effect by (-10)\n    wait (.03) seconds\nend\nhide\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nswitch costume to (dot v)\nset size to (150) %\nswitch costume to (tree v)\nset [brightness v] effect to (100)\nset [pixelate v] effect to (-100)\npixelate in\n\n    Mini Scroll\nend\n\ndefine Mini Scroll\nif <(mouse y) < [-50]> then\n    change y by (-1)\n    if <(y position) < [-32]> then\n        change y by (1)\n    end\nend\nif <(mouse y) > [50]> then\n    change y by (1)\n    if <(y position) > [32]> then\n        change y by (-1)\n    end\nend\nif <(mouse x) < [-65]> then\n    change x by (-1)\n    if <(x position) < [-50]> then\n        change x by (1)\n    end\nend\nif <(mouse x) > [65]> then\n    change x by (1)\n    if <(x position) > [50]> then\n        change x by (-1)\n    end\nend\n\nwhen I receive [start v]\npixelate out\n\n@Title\n\ndefine pixelate in\nshow\nrepeat (10)\n    change [brightness v] effect by (-10)\n    change [pixelate v] effect by (10)\n    wait (.03) seconds\nend\n\ndefine pixelate out\nrepeat (10)\n    change [brightness v] effect by (10)\n    change [pixelate v] effect by (-10)\n    wait (.03) seconds\nend\nhide\n\nwhen flag clicked\nset [brightness v] effect to (100)\nset [pixelate v] effect to (-100)\npixelate in\n\nwhen I receive [start v]\npixelate out\n\n@End Portal\n\nwhen flag clicked\nhide\n\ndefine pixelate in\nset [brightness v] effect to (100)\nset [pixelate v] effect to (-100)\nshow\nrepeat (10)\n    change [brightness v] effect by (-10)\n    change [pixelate v] effect by (10)\n    wait (.03) seconds\nend\n\nwhen I receive [next level v]\nSensing\n\nwhen backdrop switches to [level 1 v]\npixelate in\n\ndefine Sensing\nshow\nrepeat until <(backdrop [name v]) = [WIN]>\n    if <touching (player v)?> then\n        hide\n        broadcast (NEXT LEVEL v)\n    end\nend\nhide\n\nwhen I receive [reset v]\nshow\nwait (.1) seconds\nSensing\n\n