*(PIXILATE A PLATFORMER)*
@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [play v]\nswitch backdrop to (backdrop2 v)\n\nwhen flag clicked\nforever\n    play sound [d v] until done\nend\n\n@player\n\ndefine platformer\nswitch costume to (costume9 v)\nset rotation style [don't rotate v]\nchange [on ground v] by (-1)\nchange [-y- v] by (-1)\nchange y by (-y-)\nif <touching (level v)?> then\n    repeat until <not <touching (level v)?>>\n        change y by ((-y-) * (-1))\n    end\n    if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <(-y-) < [7]>> then\n        start sound [Jump3 v]\n        set [-y- v] to [14]\n    else\n        set [-y- v] to [0]\n        set [on ground v] to [2]\n    end\nend\nset [-x- v] to ((-x-) * (0.5))\nchange x by (-x-)\nset [slop v] to [0]\nrepeat until <<(slop) = [-8]> or <not <touching (level v)?>>>\n    change y by (1)\n    change [slop v] by (-1)\nend\nif <touching (level v)?> then\n    change y by (slop)\n    repeat until <not <touching (level v)?>>\n        change x by ((([abs v] of (-x-) ) / (-x-)) * (-1))\n    end\n    set [-x- v] to [0]\nend\nif <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n    change [-x- v] by (-7)\n    point in direction (-90)\nend\nif <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n    change [-x- v] by (7)\n    point in direction (90)\nend\nevent\nset rotation style [left-right v]\nswitch costume to (costume2 v)\nif <<<key (a v) pressed?> or <key (d v) pressed?>> or <<key (right arrow v) pressed?> or <key (left arrow v) pressed?>>> then\n    switch costume to ((5) + ([floor v] of (((timer) * (40)) mod (13)) ))\nend\nif <(on ground) < [1]> then\n    if <(-y-) < [0]> then\n        switch costume to (costume18 v)\n    else\n        switch costume to (costume17 v)\n    end\nend\n\nif <(LOVE) < [2]> then\n\nif <touching (level v)?> then\n    repeat until <not <touching (level v)?>>\n        change x by ((([abs v] of (-x-) ) / (-x-)) * (-1))\n    end\nend\n\nwhen I receive [play v]\nset up []\n\ndefine set up (number or text)\npoint in direction (90)\nif <not <(level) = [8]>> then\n    go to x: (-156) y: (-132)\nelse\n    go to x: (0) y: (-132)\nend\nset size to (150) %\nshow\nset [on ground v] to [0]\nset [-y- v] to [0]\nset [-x- v] to [0]\nforever\n    platformer\nend\n\nif <touching (spikes v)?> then\n    wait (0.1) seconds\nend\n\ndefine event\nif <touching (door v)?> then\n    start sound [1up4 v]\n    broadcast (win v)\n    go to x: (-156) y: (-132)\nend\nif <touching (spikes v)?> then\n    start sound [Hit4 v]\n    repeat (10)\n        change [ghost v] effect by (10)\n        change size by (10)\n    end\n    go to x: (-156) y: (-132)\n    set size to (150) %\n    clear graphic effects\nend\nif <touching (jumping pad v)?> then\n    start sound [Jump2 v]\n    set [-y- v] to [23]\nend\n\nwhen I receive [play v]\nforever\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nset [costumes v] to [1]\n\nif <(gameplay) = [1]> then\n\n@level\n\nwhen I receive [next level v]\nchange [costumes v] by (1)\n\nbroadcast (play v)\n\nwhen I receive [play v]\nshow\ngo to x: (0) y: (0)\nset [level v] to [1]\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\nhide\n\n@loading scene\n\nwhen I receive [win v]\nshow\ngo to [front v] layer\npoint in direction (90)\nswitch costume to (costume1 v)\nrepeat (30)\n    next costume\nend\nbroadcast (next level v)\nchange [level v] by (1)\nwait (2) seconds\nbroadcast (win 2 v)\n\nwhen flag clicked\nbroadcast (menu v)\nhide\n\nwhen I receive [win 2 v]\nset [gameplay v] to [1]\nshow\ngo to [front v] layer\npoint in direction (-90)\nrepeat (30)\n    switch costume to ((costume [number v]) - (1))\nend\n\nwhen I receive [menu v]\nset [gameplay v] to [1]\nshow\ngo to [front v] layer\npoint in direction (-90)\nswitch costume to (costume31 v)\nwait (2) seconds\nset [gameplay v] to [0]\nrepeat (30)\n    switch costume to ((costume [number v]) - (1))\nend\n\nwhen I receive [play 2 v]\nshow\ngo to [front v] layer\npoint in direction (90)\nswitch costume to (costume1 v)\nrepeat (30)\n    next costume\nend\nset [level v] to [1]\nbroadcast (next level v)\nwait (2) seconds\nbroadcast (timer v)\nbroadcast (win 2 v)\n\n@door\n\nwhen I receive [play v]\nshow\ngo to x: (0) y: (0)\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\nhide\n\n@spikes\n\nwhen flag clicked\n\nwhen I receive [play v]\nshow\ngo to x: (0) y: (0)\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\nhide\n\n@jumping pad\n\nwhen I receive [play v]\nshow\ngo to x: (0) y: (0)\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\nhide\n\n@Sprite1\n\nwhen flag clicked\nhide\nset size to (1000) %\n\nwhen I receive [next level v]\ngo to [front v] layer\nshow\nswitch costume to (level)\nset size to (100) %\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nset [ghost v] effect to (0)\nwait (0.7) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (100)\nhide\n\nwhen flag clicked\nhide\nset size to (1000) %\n\nwhen I receive [menu v]\nset size to (1000) %\nset size to (1000) %\ngo to [front v] layer\nset size to (1000) %\nshow\nset size to (1000) %\nswitch costume to (costume9 v)\nset size to (1000) %\nset [ghost v] effect to (100)\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\n    set size to (1000) %\nend\nset size to (1000) %\nset [ghost v] effect to (0)\nwait (0.7) seconds\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (10)\n    set size to (1000) %\nend\nset [ghost v] effect to (100)\nset size to (1000) %\nhide\n\nset size to (1000) %\n\nset size to (1000) %\n\n@Sprite2\n\nwhen I receive [play v]\nshow\ngo to [back v] layer\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\nhide\n\n@Sprite3\n\nwhen flag clicked\nforever\n    if <(gameplay) = [0]> then\n        show\n        if <touching (mouse-pointer v)?> then\n            change size by (((120) - (size)) / (4))\n            if <mouse down?> then\n                wait until <not <mouse down?>>\n                start sound [Siren Whistle v]\n                broadcast (play 2 v) and wait\n                broadcast (play v)\n            end\n        else\n            change size by (((100) - (size)) / (4))\n        end\n    else\n        hide\n    end\nend\n\nstart sound [Crank v]\n\nwhen flag clicked\nforever\n    change [play button dir v] by (1)\n    point in direction ((([sin v] of ((play button dir) * (4)) ) * (6)) + (90))\nend\n\n@Sprite4\n\nwhen flag clicked\nforever\n    wait (0.01) seconds\n    go to [front v] layer\n    go to [front v] layer\n    go to [front v] layer\n    go to [front v] layer\nend\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\n\n@Sprite9\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\nset [love v] to [0]\nset [touching? v] to []\nforever\n    set [touching? v] to []\n    lf [l] [-201] [-220]\n    lf [f] [-201] [-220]\nend\n\ndefine lf (c) (x) (y)\nswitch costume to (costume1 v)\nset size to (100000000) %\ngo to x: (x) y: (y)\nset size to (100) %\nswitch costume to (c)\nif <touching (mouse-pointer v)?> then\n    set [touching? v] to (c)\nend\n\nwhen flag clicked\nforever\n    wait until <(touching?) = [f]>\n    wait (0.2) seconds\n    if <(touching?) = [f]> then\n        change [love v] by (1)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    wait until <(touching?) = [l]>\n    wait (0.2) seconds\n    if <(touching?) = [l]> then\n        change [love v] by (1)\n        stop [this script v]\n    end\nend\n\n@Glow-0\n\nwhen flag clicked\nset [min v] to [0]\nset [msec v] to [0]\nset [sec v] to [0]\n\nwhen I start as a clone\nshow\nforever\n    change costume to (join [Glow-] (letter (index) of (my variable)))\n    set x to ((((index) - (0.5)) - ((length of (my variable)) / (2))) * ((size) / (10)))\n    change x by (-180)\n    change size by ((0.2) * ((100) - (size)))\nend\n\ndefine setup\nhide\nnext costume\nset size to (100) %\ngo to x: (0) y: (-165)\nset [index v] to [1]\nrepeat (20)\n    switch costume to (join [Glow-] (letter (1) of (my variable)))\n    create clone of (_myself_ v)\n    change x by ((size) / (2))\n    change [index v] by (1)\nend\n\ndefine change costume to (costume)\nif <not <(costume) = (costume [name v])>> then\n    switch costume to (costume)\n    set size to (120) %\nend\n\nwhen flag clicked\nforever\n\nwhen I receive [play v]\nsetup\nforever\n    set drag mode [not draggable v]\nend\n\nwhen I receive [timer v]\nrepeat until <(level) = [9]>\n    repeat (60)\n        repeat (60)\n            if <not <(level) = [9]>> then\n                change [msec v] by (1)\n            end\n        end\n        if <(msec) > [59]> then\n            set [msec v] to [0]\n            change [sec v] by (1)\n        end\n    end\n    if <(sec) > [59]> then\n        set [sec v] to [0]\n        change [min v] by (1)\n    end\nend\n\nwhen flag clicked\nforever\n    set [my variable v] to (join (min) (join [:] (join (sec) (join [,] (msec)))))\nend\n\n\n\n