MR. STICK MAN PLATFORMER

Instructions:  YOU MAY NOT WANT TO PLAY YOU MIGHT RAGE QUIT \n***The instructions are in the game\n

@Stage\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 ((([abs v] of (-y-) ) / (-y-)) * (-1))\n    end\n    if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <(-y-) < [4]>> then\n        start sound [Jump2 v]\n        set [-y- v] to [14]\n    else\n        set [on ground v] to [2]\n        set [-y- v] to [0]\n    end\nend\nset [-x- v] to ((-x-) * (0.7))\nchange x by (-x-)\nif <touching (level v)?> then\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 (-3)\n    point in direction (-90)\nend\nif <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n    change [-x- v] by (3)\n    point in direction (90)\nend\nset rotation style [left-right v]\nif <(LOVE) < [2]> then\n    switch costume to (costume2 v)\n    if <<<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)) ))\n    end\n    if <(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\n    end\nelse\n    switch costume to (k1 v)\n    if <<<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 ((21) + ([floor v] of (((timer) * (40)) mod (25)) ))\n    end\n    if <(on ground) < [1]> then\n        if <(-y-) < [0]> then\n            switch costume to (costume20 v)\n        else\n            switch costume to (costume19 v)\n        end\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\n    if <touching (spikes v)?> then\n        wait (0.1) seconds\n    end\nend\n\ndefine event\nif <touching (door v)?> then\n    start sound [1up4 v]\n    broadcast (win v) and wait\n    go to x: (-156) y: (-132)\nend\nif <touching (spikes v)?> then\n    start sound [Hit4 v]\n    wait (0.1) seconds\n    go to x: (-156) y: (-132)\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    event\nend\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 (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\n\nwhen I receive [next level v]\ngo to [front v] layer\nshow\nswitch costume to (level)\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\n\nwhen I receive [menu v]\ngo to [front v] layer\nshow\nswitch costume to (costume9 v)\nset [ghost v] effect to (100)\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\nend\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)\nend\nset [ghost v] effect to (100)\nhide\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            start sound [Crank v]\n            change size by (((100) - (size)) / (4))\n        end\n    else\n        hide\n    end\nend\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\nwhen this sprite clicked\nswitch backdrop to (download \(4\) v)\n\nnext backdrop\n\nwhen flag clicked\nswitch backdrop to (download \(3\) v)\n\nwhen flag clicked\nforever\n    play sound [Video Game 2 v] until done\nend\n\nstart sound [Drum Funky v]\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@Sprite5\n\nwhen flag clicked\nhide\n\nwhen I receive [play v]\nhide\nhide\nwait (3) seconds\ngo to x: (0) y: (-100)\nshow\nrepeat (3)\n    change y by (10)\nend\nchange y by (4)\nwait (3) seconds\nrepeat (3)\n    change y by (-10)\nend\nchange y by (-4)\nhide\nwait (40) seconds\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.4) 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.4) seconds\n    if <(touching?) = [l]> then\n        change [love v] by (1)\n        stop [this script v]\n    end\nend\n\n