griffpatch platformer
@Stage\n\n@livelli\n\nset [background v] to [0]\n\nwhen I receive [setup v]\nshow\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\nswitch costume to (costume6 v)\nset [livellox v] to [0]\ncreate clone of (_myself_ v)\nnext costume\nchange [livellox v] by (480)\ncreate clone of (_myself_ v)\nnext costume\nchange [livellox v] by (480)\ncreate clone of (_myself_ v)\nnext costume\nchange [livellox v] by (480)\ncreate clone of (_myself_ v)\nnext costume\nchange [livellox v] by (480)\ncreate clone of (_myself_ v)\nnext costume\nchange [livellox v] by (480)\ncreate clone of (_myself_ v)\nnext costume\nchange [livellox v] by (480)\ncreate clone of (_myself_ v)\nnext costume\nchange [livellox v] by (480)\ncreate clone of (_myself_ v)\nnext costume\nchange [livellox v] by (480)\ncreate clone of (_myself_ v)\nnext costume\nchange [livellox v] by (480)\ncreate clone of (_myself_ v)\nnext costume\nchange [livellox v] by (480)\ncreate clone of (_myself_ v)\nnext costume\nchange [livellox v] by (480)\ncreate clone of (_myself_ v)\nnext costume\nchange [livellox v] by (480)\ncreate clone of (_myself_ v)\nnext costume\nchange [livellox v] by (480)\ncreate clone of (_myself_ v)\nnext costume\nchange [livellox v] by (480)\ncreate clone of (_myself_ v)\nnext costume\nchange [livellox v] by (480)\ncreate clone of (_myself_ v)\nnext costume\nchange [livellox v] by (480)\ncreate clone of (_myself_ v)\nnext costume\nchange [livellox v] by (480)\ncreate clone of (_myself_ v)\nnext costume\nchange [livellox v] by (480)\ncreate clone of (_myself_ v)\nnext costume\nchange [livellox v] by (480)\ncreate clone of (_myself_ v)\nnext costume\nchange [livellox v] by (480)\ncreate clone of (_myself_ v)\n\nwhen I receive [backround loop v]\nforever\n    set x to ((livellox) - (scroll x))\nend\n\nwhen flag clicked\nhide\n\nwait (1) seconds\n\n@ninja\n\ndefine tocca terra <su?>\nrepeat until <not <<touching (livelli v)?> or <touching color (#809351)?>>>\n    if <su?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [caduta v] to [0]\n    end\n    set [velocità_y v] to [0]\nend\n\ndefine cammina (direzione) (velocità)\npoint in direction (direzione)\nchange x by (velocità)\nset [pendenza v] to [0]\nrepeat until <<(pendenza) = [8]> or <not <<touching (livelli v)?> or <touching color (#809351)?>>>>\n    change y by (1)\n    change [pendenza v] by (1)\nend\n\nif <(pendenza) = [8]> then\n    change x by ((-1) * (velocità))\n    change y by ((-1) * (pendenza))\nend\nif <(velocità) < [0]> then\n    change [frame v] by ((velocità) / (-8))\nelse\n    change [frame v] by ((velocità) / (8))\nend\n\nwhen flag clicked\nstop all sounds\nhide\nwait (4) seconds\nbroadcast (setup v) and wait\nset [scroll x v] to [0]\nbroadcast (camera loop v)\nbroadcast (backround loop v)\nbroadcast (coinloop v)\ngo to x: (0) y: (200)\nshow\nset [scroll x v] to [0]\nset [background v] to [1]\ngo to x: (-205) y: (-56)\nshow\ngo to [front v] layer\nset rotation style [left-right v]\nset size to (48) %\nset [frame v] to [0]\nset [velocità_y v] to [0]\nforever\n    switch costume to ( v)\n    if <<(velocità_y) < [4]> or <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n        change [velocità_y v] by (-1.2)\n    else\n        change [velocità_y v] by (-2)\n    end\n    change y by (velocità_y)\n    tocca terra <(velocità_y) > [0]>\n    set [velocità x v] to ((velocità x) * (0.7))\n    if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <mouse down?>> then\n        if <<(pulsante salto) = [0]> and <(caduta) = [0]>> then\n            set [velocità_y v] to [15]\n            set [pulsante salto v] to [1]\n            set [caduta v] to [6]\n        end\n    else\n        set [pulsante salto v] to [0]\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [velocità x v] by (1.5)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [velocità x v] by (-1.5)\n    end\n    if <(velocità x) > [0.5]> then\n        cammina [90] (velocità x)\n    else\n        if <(velocità x) < [-0.5]> then\n            cammina [-90] (velocità x)\n        else\n            set [frame v] to [0]\n        end\n    end\n    if <touching (_edge_ v)?> then\n        set x to (-240)\n        set [scroll x v] to [0]\n        broadcast (ricomincia v)\n    end\n    create clone of (_myself_ v)\nend\n\nswitch costume to (stand_1 v)\n\nset [caduta v] to [0]\n\nif <(background) < [3]> then\n\nwhen I start as a clone\nrepeat (10)\n    go to [front v] layer\n    change size by (-1)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\n\n\nwait until <[] > (☁ high score)>\n\nwhen flag clicked\nwait (3) seconds\nforever\n\nwhen I receive [camera loop v]\nforever\n    change [scroll x v] by (x position)\n    set x to (0)\nend\n\nset x to (-240)\n\npoint towards (livelli v)\nset rotation style [left-right v]\n\npoint in direction (90)\n\nturn right (15) degrees\n\ngo to (mouse-pointer v)\n\nbroadcast (ricomincia v)\n\nwhen flag clicked\nwait (3) seconds\nforever\n    start sound [AwEsOmEfAcE2 v]\n    play sound [13 v] until done\n    start sound [His World \(Remix\) v]\n    play sound [Digital Insanity \(Kenet & Rez\) - Unreal Superhero v] until done\n    set volume to (90) %\nend\n\nforever\n\n@moneta\n\nwhen I receive [setup v]\nset y to (5)\nset [coinx v] to [380]\ncreate clone of (_myself_ v)\nset [coinx v] to [420]\ncreate clone of (_myself_ v)\nset [coinx v] to [480]\ncreate clone of (_myself_ v)\nset [coinx v] to [300]\ncreate clone of (_myself_ v)\nset [coinx v] to [100]\ncreate clone of (_myself_ v)\nset [coinx v] to [140]\ncreate clone of (_myself_ v)\nset [coinx v] to [520]\ncreate clone of (_myself_ v)\nset [coinx v] to [600]\ncreate clone of (_myself_ v)\nset [coinx v] to [689]\ncreate clone of (_myself_ v)\nset [coinx v] to [999]\nset y to (300)\nhide\nset [coinx v] to [-1000]\nset [ghost v] effect to (100)\n\nwhen flag clicked\nset [coins v] to [0]\nhide\nwait (4) seconds\nshow\nset size to (30) %\nset [coins v] to [0]\n\nwhen I receive [coinloop v]\nforever\n    set x to ((coinx) - (scroll x))\n    if <(x position) = [240]> then\n        hide\n    else\n        show\n        if <(x position) = [-240]> then\n            hide\n        else\n            show\n        end\n        if <touching (ninja v)?> then\n            hide\n            change [coins v] by (1)\n            play sound [Coin v] until done\n            delete this clone\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    wait (0.1) seconds\n    next costume\nend\n\ncreate clone of (_myself_ v)\n\n