Destiny Wars a pixel scrolling platformer                    
@Stage\n\nwhen flag clicked\nset [music v] to [80]\nforever\n    set volume to (music) %\nend\n\nwhen flag clicked\nhide variable [music v]\n\nwhen flag clicked\nforever\n    play sound [Uncharted 4 Soundtrack - Nate's Theme 4 v] until done\nend\n\nwhen flag clicked\nswitch backdrop to (sfondo3 v)\n\nwhen flag clicked\n\nwhen I receive [gamee v]\nswitch backdrop to (sfondo1 v)\n\n@player\n\nwhen flag clicked\nhide\n\nwhen I receive [game v]\nforever\n    if <(pause) = [false]> then\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            point in direction (90)\n        end\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            point in direction (-90)\n        end\n    end\nend\n\nwhen I receive [game v]\ngo to [front v] layer\nclear graphic effects\nshow\nset rotation style [left-right v]\npoint in direction (90)\nforever\n    if <(pause) = [false]> then\n        animation [0.08]\n    end\nend\n\ndefine animation (frame)\nswitch costume to (stand2 v)\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    wait (frame) seconds\n    next costume\n    wait (frame) seconds\n    next costume\n    wait (frame) seconds\n    next costume\n    wait (frame) seconds\n    switch costume to (stand2 v)\n    wait (frame) seconds\nelse\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        wait (frame) seconds\n        next costume\n        wait (frame) seconds\n        next costume\n        wait (frame) seconds\n        next costume\n        wait (frame) seconds\n        switch costume to (stand2 v)\n        wait (frame) seconds\n    end\nend\nif <<key (space v) pressed?> or <<mouse down?> and <(mouse y) > [-100]>>> then\n    wait (0.1) seconds\n    switch costume to (costume1 v)\n    wait (0.1) seconds\n    broadcast (bullet v)\n    next costume\n    wait (0.1) seconds\n    next costume\n    wait (0.1) seconds\n    switch costume to (stand2 v)\nend\n\nwhen I receive [camera📽 v]\ngo to (main camera 📽 v)\nshow\nset size to (170) %\nset [ghost v] effect to (0)\n\nwait (0.1) seconds\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen I receive [up v]\nswitch costume to (stand2 v)\n\nwhen I receive [left v]\npoint in direction (-90)\nwait (frame) seconds\nnext costume\nwait (frame) seconds\nnext costume\nwait (frame) seconds\nnext costume\nwait (frame) seconds\nswitch costume to (stand2 v)\nwait (frame) seconds\n\nwhen I receive [right v]\npoint in direction (90)\nwait (frame) seconds\nnext costume\nwait (frame) seconds\nnext costume\nwait (frame) seconds\nnext costume\nwait (frame) seconds\nswitch costume to (stand2 v)\nwait (frame) seconds\n\nwhen flag clicked\n\nwhen I receive [win v]\nstop [other scripts in sprite v]\n\nwhen flag clicked\n\nwait (1) seconds\n\n@MAIN CAMERA 📽\n\nwhen I receive [green flag v]\nhide\ngo to [back v] layer\n\nwhen I receive [play game v]\nRESET [0] [170]\nforever\n    scrolling engine\nend\n\ndefine RESET (reset variable) (reset size)\nset drag mode [not draggable v]\nset [camera y v] to (reset variable)\nset [scroll y v] to (reset variable)\nset [scroll x v] to (reset variable)\nset [camera x v] to (reset variable)\nset [camera speed _y v] to (reset variable)\nset [gravity v] to (reset variable)\nset [exit v] to (reset variable)\nset size to (reset size) %\nshow\n\ndefine player controller <up arrow> <right arrow> <left arrow> <in air>\nterrain collider\nswitch costume to (join [box] [collider])\nif <right arrow> then\n    camera x [-11]\nend\nif <left arrow> then\n    camera x [11]\nend\nif <up arrow> then\n    if <in air> then\n        set [camera speed _y v] to [31]\n        terrain collider\n    end\n    terrain collider\nend\nchange [camera speed _y v] by (-4)\nterrain collider\ncamera y (camera speed _y) [2]\nterrain collider\nCAMERA POSITION (CAMERA X) (CAMERA Y) (SCROLL Y) (SCROLL X)\ndie <(CAMERA Y) < [-700]>\nset [scroll x v] to (CAMERA X)\nterrain collider\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nterrain collider\nset [camera y v] to (CAMERA Y)\nchange [scroll y v] by (round (((CAMERA Y) - (SCROLL Y)) / (4)))\nterrain collider\n\ndefine camera y (sy) (in air)\nchange [camera y v] by (sy)\nchange [gravity v] by (in air)\nterrain collider\nrepeat until <not <<touching (platform v)?> or <touching (movingplatform v)?>>>\n    if <(sy) > ([abs v] of (0) )> then\n        change [camera y v] by (-1)\n    else\n        change [camera y v] by (1)\n        set [gravity v] to [0]\n    end\n    set [camera speed _y v] to [0]\n    terrain collider\n    CAMERA POSITION (CAMERA X) (CAMERA Y) (SCROLL Y) (SCROLL X)\n    terrain collider\nend\n\ndefine CAMERA POSITION (x) (y) (scroll y) (scroll x)\nset y to ((y) - (scroll y))\nset x to ((x) - (scroll x))\nstop [this script v]\n\ndefine camera x (sx)\nterrain collider\nchange [camera x v] by (sx)\nCAMERA POSITION (CAMERA X) (CAMERA Y) (SCROLL Y) (SCROLL X)\nterrain collider\nif <<touching (platform v)?> or <touching (movingplatform v)?>> then\n    repeat (13)\n        if <not <<touching (platform v)?> or <touching (movingplatform v)?>>> then\n            stop [this script v]\n        end\n        terrain collider\n        change [camera y v] by (1)\n        CAMERA POSITION (CAMERA X) (CAMERA Y) (SCROLL Y) (SCROLL X)\n    end\n    change [camera y v] by (-13)\n    terrain collider\nend\nrepeat until <not <<touching (platform v)?> or <touching (movingplatform v)?>>>\n    if <(sx) > [0]> then\n        change [camera x v] by (-1)\n    else\n        change [camera x v] by (1)\n    end\n    terrain collider\n    CAMERA POSITION (CAMERA X) (CAMERA Y) (SCROLL Y) (SCROLL X)\nend\n\ndefine die <danger>\nif <danger> then\n    RESET [0] [170]\nend\n\ndefine scrolling engine\nbroadcast (TICK v)\nforever\n    if <(pause) = [false]> then\n        terrain collider\n        broadcast (camera📽 v)\n    end\nend\n\nwhen I receive [tick v]\nterrain collider\nCAMERA POSITION (CAMERA X) (CAMERA Y) (SCROLL Y) (SCROLL X)\n\ndefine terrain collider\nCAMERA POSITION (CAMERA X) (CAMERA Y) (SCROLL Y) (SCROLL X)\n\nwhen flag clicked\nforever\n    terrain collider\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [game v]\nset [ghost v] effect to (100)\nbroadcast (level v) and wait\nbroadcast (PLAY GAME v) and wait\nbroadcast (GREEN FLAG v) and wait\nbroadcast (RESET v) and wait\nbroadcast (SETUP v) and wait\n\nwhen I receive [controller v]\nforever\n    if <(pause) = [false]> then\n        set [ghost v] effect to (100)\n        player controller <<key (up arrow v) pressed?> or <key (w v) pressed?>> <<key (left arrow v) pressed?> or <key (a v) pressed?>> <<key (right arrow v) pressed?> or <key (d v) pressed?>> <(gravity) < [4]>\n        broadcast (TICK v) and wait\n    end\nend\n\nwhen I receive [play game v]\nbroadcast (controller v)\n\nwhen I receive [play game v]\nbroadcast (controller v)\n\nwhen I receive [restart v]\nRESET [0] [170]\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen flag clicked\nset [healt v] to [4]\n\nwhen I receive [right v]\ncamera x [10]\nterrain collider\ncamera y (camera speed _y) [2]\nterrain collider\nCAMERA POSITION (CAMERA X) (CAMERA Y) (SCROLL Y) (SCROLL X)\ndie <(CAMERA Y) < [-700]>\nset [scroll x v] to (CAMERA X)\nterrain collider\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nterrain collider\nset [camera y v] to (CAMERA Y)\nchange [scroll y v] by (round (((CAMERA Y) - (SCROLL Y)) / (4)))\nterrain collider\n\nwhen I receive [left v]\ncamera x [-10]\nterrain collider\ncamera y (camera speed _y) [2]\nterrain collider\nCAMERA POSITION (CAMERA X) (CAMERA Y) (SCROLL Y) (SCROLL X)\ndie <(CAMERA Y) < [-700]>\nset [scroll x v] to (CAMERA X)\nterrain collider\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nterrain collider\nset [camera y v] to (CAMERA Y)\nchange [scroll y v] by (round (((CAMERA Y) - (SCROLL Y)) / (4)))\nterrain collider\n\nwhen I receive [up v]\nif <(gravity) < [4]> then\n    set [camera speed _y v] to [31]\n    terrain collider\nend\n\nwhen I receive [win v]\nstop [other scripts in sprite v]\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen I receive [game v]\nforever\n    if <<touching (enemy v)?> or <touching (spikes v)?>> then\n        change [healt v] by (-0.5)\n        broadcast (healt v)\n        wait (2) seconds\n    end\nend\n\nwhen I receive [game v]\nforever\n    if <touching color (#a05b53)?> then\n        broadcast (win v)\n    end\nend\n\nwhen I receive [reset v]\n\n@bullet\n\nwhen I start as a clone\nshow\ngo to (player v)\npoint in direction ([direction v] of [player v])\nif <(direction) = [-90]> then\n    switch costume to (-90 v)\nend\nif <(direction) = [90]> then\n    switch costume to (90 v)\nend\nrepeat until <<touching (_edge_ v)?> or <<touching (platform v)?> or <touching (enemy v)?>>>\n    move (20) steps\nend\ndelete this clone\n\nwhen I receive [bullet v]\ncreate clone of (_myself_ v)\nstart sound [12-Gauge-Pump-Action-Shotgun-Close-Gunshot-A-www v]\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\n@platform\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [tick v]\nchange position ((CAMERA X) - (SCROLL X)) ((CAMERA Y) - (SCROLL Y))\ngo to [back v] layer\n\ndefine change position (scroll x) (scroll y)\nset x to (scroll x)\nset y to (scroll y)\nif <not <<(x position) = (scroll x)> and <(y position) = (scroll y)>>> then\n    hide\nelse\n    show\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine create clone at x (x pos) y (y pos)\ncreate clone of (_myself_ v)\nchange [camera x v] by (round (x pos))\nchange [camera y v] by (round (y pos))\nswitch costume to ((costume [number v]) + (1))\n\nwhen I receive [level v]\nswitch costume to (level 11 v)\nset [camera y v] to [-10]\nset [camera x v] to [0]\ngo to x: (CAMERA X) y: (CAMERA Y)\npoint in direction (90)\nset size to (round (100)) %\nswitch costume to (level 1 v)\ncreate clone at x [650] y [90]\ncreate clone at x [500] y [-10]\ncreate clone at x [500] y [-10]\ncreate clone at x [300] y [-10]\ncreate clone at x [0] y [-390]\ncreate clone at x [650] y [-390]\ncreate clone at x [0] y [290]\ncreate clone at x [500] y [300]\ncreate clone at x [1100] y [400]\ncreate clone at x [1000] y [-300]\ncreate clone at x [1000] y [0]\ncreate clone at x [800] y [300]\ncreate clone at x [800] y [300]\ncreate clone at x [1000] y [500]\n\ncreate clone at x [1000] y [500]\n\ncreate clone at x [0] y [450]\n\nwhen I start as a clone\nshow\n\nwait (1) seconds\n\nhide\nset [ghost v] effect to (0)\n\ncreate clone at x [0] y [-400]\ncreate clone at x [650] y [-400]\ncreate clone at x [0] y [300]\ncreate clone at x [0] y [500]\n\ncreate clone at x [500] y [0]\n\ncreate clone at x [800] y [300]\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen flag clicked\nforever\n    go to [back v] layer\n    set [ghost v] effect to (100)\nend\n\n@decor\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [tick v]\nset [ghost v] effect to (0)\nchange position ((CAMERA X) - (SCROLL X)) ((CAMERA Y) - (SCROLL Y))\n\ndefine change position (scroll x) (scroll y)\nset x to (scroll x)\nset y to (scroll y)\nif <not <<(x position) = (scroll x)> and <(y position) = (scroll y)>>> then\n    hide\nelse\n    show\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine create clone at x (x pos) y (y pos)\ncreate clone of (_myself_ v)\nchange [camera x v] by (round (x pos))\nchange [camera y v] by (round (y pos))\nswitch costume to ((costume [number v]) + (1))\n\nwhen I receive [level v]\nset [ghost v] effect to (0)\nswitch costume to (assets v)\nset size to (100) %\ngo to [front v] layer\nset [camera y v] to [0]\nset [camera x v] to [0]\ngo to x: (CAMERA X) y: (CAMERA Y)\npoint in direction (90)\nset size to (round (100)) %\nswitch costume to (level 1 v)\nhide\ncreate clone at x [650] y [90]\ngo to [back v] layer\ncreate clone at x [500] y [-10]\ncreate clone at x [500] y [-10]\ncreate clone at x [300] y [-10]\ncreate clone at x [0] y [-390]\ncreate clone at x [650] y [-390]\ncreate clone at x [0] y [290]\ncreate clone at x [500] y [300]\ncreate clone at x [1100] y [400]\ncreate clone at x [1000] y [-300]\ncreate clone at x [1000] y [0]\ncreate clone at x [800] y [300]\ncreate clone at x [800] y [300]\ncreate clone at x [1000] y [500]\n\nwhen I start as a clone\nshow\n\ngo to [front v] layer\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\nwhen I start as a clone\nforever\n    go to [back v] layer\nend\n\n@buttons\n\nwhen flag clicked\n\nwhen I start as a clone\nforever\n    if <(menù) = [true]> then\n        show\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (5)\n            repeat until <(size) > [80]>\n                change size by (3)\n            end\n        else\n            set [pixelate v] effect to (0)\n            set [brightness v] effect to (5)\n            repeat until <(size) < [75]>\n                change size by (-3)\n            end\n        end\n    else\n        hide\n    end\n    if <(page) = [1]> then\n        show\n    else\n        wait (0.4) seconds\n        hide\n        wait until <(page) = [1]>\n    end\nend\n\ngo to [front v] layer\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (game v)\n    set [page v] to [0]\nend\nif <(costume [number v]) = [2]> then\n    broadcast (option v)\nend\nif <(costume [number v]) = [3]> then\n    broadcast (credits v)\nend\n\nwhen this sprite clicked\nset [menù v] to [false]\n\nwhen I start as a clone\nset size to (0) %\nset [d v] to [0]\nforever\n    if <not <(page) = [1]>> then\n        set [d v] to [0]\n        repeat (20)\n            change [d v] by (-1)\n            change size by (d)\n        end\n        repeat (10)\n            change [d v] by (1)\n            change size by (d)\n        end\n        wait until <(page) = [1]>\n        hide\n    else\n        set [d v] to [0]\n        show\n        repeat (9)\n            change [d v] by (1)\n            change size by (d)\n        end\n        repeat (5)\n            change [d v] by (-1)\n            change size by (d)\n        end\n        wait until <not <(page) = [1]>>\n    end\nend\n\nwhen flag clicked\n\nshow\n\nwhen this sprite clicked\nhide\n\nwhen I receive [show v]\n\nhide\n\nshow\nset size to (100) %\n\nset [page v] to [0]\n\nwhen flag clicked\nset [menù v] to [true]\n\nwhen I receive [gamee v]\nhide\nswitch costume to (costume1 v)\nset [color v] effect to (80)\ngo to x: (0) y: (15)\ncreate clone of (_myself_ v)\nnext costume\nset [color v] effect to (90)\ngo to x: (0) y: (-60)\ncreate clone of (_myself_ v)\nnext costume\nset [color v] effect to (100)\ngo to x: (0) y: (-135)\ncreate clone of (_myself_ v)\n\n@healt\n\nwhen flag clicked\nswitch costume to (hiclipart v)\n\nwhen I receive [healt v]\nnext costume\nwait (0.1) seconds\n\nwhen flag clicked\nhide\n\nwhen I receive [game v]\nshow\n\nwhen flag clicked\n\ngo to [front v] layer\n\n@pause\n\nwhen flag clicked\nset [pause v] to [false]\nswitch costume to (costume1 v)\nset size to (80) %\nforever\n    go to [front v] layer\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (25)\n        repeat until <(size) > [80]>\n            change size by (3)\n        end\n    else\n        set [pixelate v] effect to (0)\n        set [brightness v] effect to (15)\n        repeat until <(size) < [75]>\n            change size by (-3)\n        end\n    end\nend\n\ndefine pause (true) (false)\nif <(pause) = (false)> then\n    set [pause v] to (true)\n    switch costume to (costume2 v)\n    go to x: (0) y: (0)\n    set [music v] to [0]\n    set volume to (0) %\nelse\n    set [pause v] to (false)\n    set [music v] to [100]\n    switch costume to (costume1 v)\n    go to x: (200) y: (155)\n    set volume to (100) %\nend\n\nwhen this sprite clicked\nset [pause# v] to [1]\npause [true] [false]\n\nwhen flag clicked\nset [pause v] to [false]\nhide\nset [pause# v] to [0]\nswitch costume to (costume1 v)\ngo to x: (200) y: (155)\n\nwhen I receive [game v]\nshow\n\n@credits/option\n\nwhen I receive [option v]\nbroadcast (no mobile controls v)\nshow variable [music v]\nshow variable [mobile controls🎮 v]\ngo to [front v] layer\nset [pixelate v] effect to (100)\nshow\nswitch costume to (costume1 v)\nrepeat (20)\n    change [pixelate v] effect by (-5)\nend\n\nwhen I receive [credits v]\nbroadcast (no mobile controls v)\ngo to [front v] layer\nset [pixelate v] effect to (100)\nshow\nswitch costume to (costume2 v)\nrepeat (20)\n    change [pixelate v] effect by (-5)\nend\n\nwhen this sprite clicked\nhide\nset [menù v] to [true]\nhide variable [music v]\nhide variable [mobile controls🎮 v]\nbroadcast (show v)\n\nwhen flag clicked\nhide variable [mobile controls🎮 v]\nhide variable [music v]\nhide\n\nset [mobile controls🎮 v] to [0]\n\n@enemy\n\nwhen I receive [level v]\nset [ghost v] effect to (0)\nswitch costume to (costume1 v)\nset [camera y v] to [155]\nset [camera x v] to [300]\ngo to x: (CAMERA X) y: (CAMERA Y)\npoint in direction (90)\nset size to (round (200)) %\ncreate clone at x [450] y [-70]\ncreate clone at x [1110] y [-260]\ncreate clone at x [-80] y [0]\ncreate clone at x [60] y [-140]\ncreate clone at x [-100] y [0]\ncreate clone at x [120] y [-165]\ncreate clone at x [80] y [0]\ncreate clone at x [730] y [280]\ncreate clone at x [90] y [0]\ncreate clone at x [280] y [90]\ncreate clone at x [90] y [0]\ncreate clone at x [350] y [125]\ncreate clone at x [90] y [0]\ncreate clone at x [1900] y [-280]\ncreate clone at x [120] y [8]\ncreate clone at x [120] y [0]\ncreate clone at x [120] y [0]\ncreate clone at x [120] y [0]\ncreate clone at x [120] y [0]\ncreate clone at x [120] y [0]\ncreate clone at x [450] y [470]\ncreate clone at x [100] y [0]\ncreate clone at x [650] y [285]\ncreate clone at x [80] y [0]\ncreate clone at x [550] y [250]\ncreate clone at x [0] y [200]\nset [camera x v] to [-1000]\n\ndefine create clone at x (x pos) y (y pos)\ncreate clone of (_myself_ v)\nchange [camera x v] by (round (x pos))\nchange [camera y v] by (round (y pos))\nswitch costume to ((costume [number v]) + (1))\n\ndefine change position (scroll x) (scroll y)\nset x to (scroll x)\nset y to (scroll y)\nif <not <<(x position) = (scroll x)> and <(y position) = (scroll y)>>> then\n    hide\nelse\n    show\nend\n\nwhen I receive [tick v]\nchange position ((CAMERA X) - (SCROLL X)) ((CAMERA Y) - (SCROLL Y))\n\nwhen I receive [green flag v]\nshow\n\nwhen I start as a clone\ngo to [back v] layer\nset rotation style [left-right v]\nforever\n    if <not <touching (main camera 📽 v)?>> then\n        repeat (80)\n            point in direction (90)\n            change [camera x v] by (2.5)\n            if <touching (bullet v)?> then\n                stop [this script v]\n            end\n        end\n        repeat (80)\n            point in direction (-90)\n            change [camera x v] by (-2.5)\n            if <touching (bullet v)?> then\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(enemy die) = [0]> then\n        if <(pause) = [false]> then\n            if <not <touching (main camera 📽 v)?>> then\n                switch costume to (costume1 v)\n                repeat (4)\n                    wait (0.1) seconds\n                    next costume\n                end\n            else\n                switch costume to (a v)\n                repeat (8)\n                    wait (0.1) seconds\n                    next costume\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [tick v]\n\nwhen I start as a clone\nforever\n\nstop [this script v]\n\n\n\nswitch costume to (d v)\n\nwhen I start as a clone\nforever\n    if <<touching (bullet v)?> and <(pause) = [false]>> then\n        change [kill v] by (1)\n        set [enemy die v] to [1]\n        switch costume to (d v)\n        repeat (5)\n            wait (0.1) seconds\n            next costume\n            change [camera y v] by (-3)\n            change [ghost v] effect by (5)\n        end\n        set [enemy die v] to [0]\n        delete this clone\n    end\nend\n\nwhen flag clicked\nhide\n\n@movingplatform\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [tick v]\nchange position ((CAMERA X) - (SCROLL X)) ((CAMERA Y) - (SCROLL Y))\n\ndefine change position (scroll x) (scroll y)\nset y to (scroll y)\nset x to (scroll x)\nif <<(x position) = (scroll x)> and <(y position) = (scroll y)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine create clone at x (x pos) y (y pos)\ncreate clone of (_myself_ v)\nchange [camera x v] by (round (x pos))\nchange [camera y v] by (round (y pos))\nswitch costume to ((costume [number v]) + (1))\n\nwhen I receive [level v]\nswitch costume to (level 1 v)\nset [camera y v] to [-545]\nset [camera x v] to [1100]\ngo to x: (CAMERA X) y: (CAMERA Y)\npoint in direction (90)\nset size to (round (100)) %\nswitch costume to (level 1 v)\nhide\n\nwhen I start as a clone\nshow\n\nset [ghost v] effect to (100)\nset [ghost v] effect to (0)\n\nwhen flag clicked\nforever\n    set [camera y v] to [-550]\n    set [camera x v] to [1400]\n    repeat (300)\n        change [camera x v] by (2)\n    end\n    repeat (300)\n        change [camera x v] by (-2)\n    end\nend\n\ngo to [back v] layer\n\nshow\n\ngo to x: (116) y: (328)\n\nrepeat (300)\n    change [camera x v] by (-2)\nend\nrepeat (300)\n    change [camera x v] by (2)\nend\n\n@arrow\n\nwhen this sprite clicked\nwait (1) seconds\n\nwhen I start as a clone\ngo to x: (-210) y: (17)\nswitch costume to (costume2 v)\nset [pixelate v] effect to (20)\nset size to (100) %\nforever\n    go to [back v] layer\n    if <touching (mouse-pointer v)?> then\n        repeat until <(size) > [110]>\n            change size by (3)\n        end\n    else\n        repeat until <(size) < [85]>\n            change size by (-3)\n        end\n    end\n    if <(page) = [1]> then\n        hide\n    else\n        if <not <(page) = [0]>> then\n            show\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        change [page v] by (-1)\n        wait (0.4) seconds\n    end\nend\n\nwhen I receive [game v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\n\nwhen I receive [gamee v]\nshow\ngo to x: (210) y: (-30)\nswitch costume to (costume1 v)\ncreate clone of (_myself_ v)\nset [page v] to [1]\nset [pixelate v] effect to (20)\nset size to (100) %\nforever\n    if <touching (mouse-pointer v)?> then\n        repeat until <(size) > [110]>\n            change size by (3)\n        end\n    else\n        repeat until <(size) < [85]>\n            change size by (-3)\n        end\n    end\n    if <(page) = [2]> then\n        hide\n    else\n        if <not <(menù) = [false]>> then\n            show\n        end\n    end\nend\n\nwhen I receive [gamee v]\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        change [page v] by (1)\n        wait (0.4) seconds\n    end\nend\n\n@world\n\nwhen flag clicked\n\nwhen I start as a clone\n\nshow\n\nwhen I start as a clone\n\nwhen flag clicked\nhide\nswitch costume to (costume3 v)\nset [color v] effect to (0)\ngo to x: (0) y: (0)\ncreate clone of (_myself_ v)\nforever\n    if <touching (mouse-pointer v)?> then\n        set [touch? v] to [yes]\n    else\n        set [touch? v] to [no]\n    end\nend\n\nchange [page v] by (-1)\n\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    if <not <(page) = [2]>> then\n        set [d v] to [0]\n        repeat (20)\n            change [d v] by (-1)\n            change size by (d)\n        end\n        repeat (10)\n            change [d v] by (1)\n            change size by (d)\n        end\n        wait until <(page) = [2]>\n        hide\n    else\n        set [d v] to [0]\n        show\n        repeat (10)\n            change [d v] by (1)\n            change size by (d)\n        end\n        repeat (5)\n            change [d v] by (-1)\n            change size by (d)\n        end\n        wait until <not <(page) = [2]>>\n    end\nend\n\nwhen flag clicked\nforever\n    turn right (0.5) degrees\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (5)\n        repeat until <(size) > [80]>\n            change size by (3)\n        end\n    else\n        set [pixelate v] effect to (0)\n        set [brightness v] effect to (5)\n        repeat until <(size) < [75]>\n            change size by (-3)\n        end\n    end\n    if <(page) = [2]> then\n        show\n    else\n        wait (0.4) seconds\n        hide\n        wait until <(page) = [2]>\n    end\nend\n\nwhen I start as a clone\nset size to (100) %\npoint in direction (90)\nswitch costume to (costume2 v)\nforever\n    go to [front v] layer\n    go to (mouse-pointer v)\n    if <(touch?) = [yes]> then\n        show\n    else\n        hide\n    end\nend\n\n\n\n\nwhen flag clicked\n\n@Sprite5\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\nwhen flag clicked\n\n@spikes\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [tick v]\nchange position ((CAMERA X) - (SCROLL X)) ((CAMERA Y) - (SCROLL Y))\n\ndefine change position (scroll x) (scroll y)\nset x to (scroll x)\nset y to (scroll y)\nif <not <<(x position) = (scroll x)> and <(y position) = (scroll y)>>> then\n    hide\nelse\n    show\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine create clone at x (x pos) y (y pos)\ncreate clone of (_myself_ v)\nchange [camera x v] by (round (x pos))\nchange [camera y v] by (round (y pos))\nswitch costume to ((costume [number v]) + (1))\n\nwhen I receive [level v]\nset [ghost v] effect to (0)\nswitch costume to (level 11 v)\nset [camera y v] to [-10]\nset [camera x v] to [0]\ngo to x: (CAMERA X) y: (CAMERA Y)\npoint in direction (90)\nset size to (round (100)) %\nswitch costume to (level 1 v)\ncreate clone at x [650] y [90]\ncreate clone at x [500] y [-10]\ncreate clone at x [500] y [-10]\ncreate clone at x [300] y [-10]\ncreate clone at x [0] y [-390]\ncreate clone at x [650] y [-390]\ncreate clone at x [0] y [290]\ncreate clone at x [500] y [300]\ncreate clone at x [1100] y [400]\ncreate clone at x [1000] y [-300]\ncreate clone at x [1000] y [0]\ncreate clone at x [800] y [300]\ncreate clone at x [800] y [300]\ncreate clone at x [1000] y [500]\n\ncreate clone at x [0] y [450]\n\nwhen I start as a clone\nshow\n\ncreate clone at x [0] y [-400]\ncreate clone at x [650] y [-400]\ncreate clone at x [0] y [300]\ncreate clone at x [0] y [500]\n\ncreate clone at x [500] y [0]\n\ncreate clone at x [800] y [300]\n\nwhen I start as a clone\nforever\n    wait (1) seconds\n    repeat (10)\n        change [camera y v] by (5)\n    end\n    wait (1) seconds\n    repeat (10)\n        change [camera y v] by (-5)\n    end\nend\n\nwhen I start as a clone\nforever\n    go to [back v] layer\nend\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\n@text\n\nwhen flag clicked\n\nwhen I start as a clone\n\nshow\n\nwhen I start as a clone\n\ngo to [front v] layer\n\nwhen flag clicked\n\nwhen flag clicked\n\nset size to (80) %\n\nturn right (0.5) degrees\n\nwhen I receive [gamee v]\npoint in direction (90)\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (5)\n        repeat until <(size) > [80]>\n            change size by (3)\n        end\n    else\n        set [pixelate v] effect to (0)\n        set [brightness v] effect to (5)\n        repeat until <(size) < [75]>\n            change size by (-3)\n        end\n    end\n    if <(page) = [1]> then\n        show\n    else\n        wait (0.4) seconds\n        hide\n        wait until <(page) = [1]>\n    end\nend\n\nwhen I receive [gamee v]\nshow\nforever\n    if <not <(page) = [1]>> then\n        set [d v] to [0]\n        repeat (20)\n            change [d v] by (-1)\n            change size by (d)\n        end\n        repeat (10)\n            change [d v] by (1)\n            change size by (d)\n        end\n        wait until <(page) = [1]>\n        hide\n    else\n        set [d v] to [0]\n        show\n        repeat (10)\n            change [d v] by (1)\n            change size by (d)\n        end\n        repeat (5)\n            change [d v] by (-1)\n            change size by (d)\n        end\n        wait until <not <(page) = [1]>>\n    end\nend\n\nwhen flag clicked\nhide\n\n@Sprite1\n\nwhen flag clicked\nshow\ngo to x: (0) y: (-1000)\nrepeat (600)\n    go to [front v] layer\n    change y by (1.5)\nend\nhide\nbroadcast (gamee v)\n\n@mobile controls\n\nwhen flag clicked\ngo to x: (-180) y: (-135)\nswitch costume to (arrow1-a2 v)\ncreate clone of (_myself_ v)\ngo to x: (80) y: (-135)\nswitch costume to (arrow1-a3 v)\ncreate clone of (_myself_ v)\ngo to x: (180) y: (-135)\nswitch costume to (arrow1-a v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\n\nwhen I start as a clone\nforever\n    go to [front v] layer\n    if <<(mobile controls🎮) = [1]> and <(menù) = [false]>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\n\nwhen I receive [no mobile controls v]\nrepeat until <(menù) = [true]>\n    hide\nend\n\nwhen this sprite clicked\n\nwhen flag clicked\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        set [brightness v] effect to (20)\n        if <(costume [number v]) = [1]> then\n            broadcast (right v)\n        end\n        if <(costume [number v]) = [2]> then\n            broadcast (left v)\n        end\n        if <(costume [number v]) = [3]> then\n            broadcast (up v)\n        end\n        wait (0.1) seconds\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I start as a clone\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        set [brightness v] effect to (20)\n        if <(costume [number v]) = [1]> then\n            broadcast (right v)\n        end\n        if <(costume [number v]) = [2]> then\n            broadcast (left v)\n        end\n        if <(costume [number v]) = [3]> then\n            broadcast (up v)\n        end\n        wait (0.1) seconds\n        set [brightness v] effect to (0)\n    end\nend\n\n@game over\n\nwhen flag clicked\nhide\nforever\n    if <(healt) = [0]> then\n        switch costume to (costume1 v)\n        show\n        broadcast (game over v)\n    else\n        hide\n    end\nend\n\n@win\n\nwhen I receive [win v]\nset [ghost v] effect to (0)\nshow\ngo to [front v] layer\nset [ghost v] effect to (0)\nswitch costume to (costume1 v)\n\nwhen flag clicked\nswitch costume to (costume2 v)\nhide\ngo to [back v] layer\nset [ghost v] effect to (100)\n\nswitch backdrop to (sfondo2 v)\n\n@black\n\nwhen flag clicked\nshow\ngo to [front v] layer\n\nwhen I receive [gamee v]\nhide\n\n@kill\n\nwhen flag clicked\nhide\n\nwhen I receive [game v]\nshow\nset [kill v] to [1]\nforever\n    switch costume to (kill)\nend\n\n@barra\n\nwhen flag clicked\nhide\n\nwhen I receive [game v]\nshow\ngo to [back v] layer\n\n
welcome to Destiny Wars  a pixel scrolling platformer \narrow keys OR wasd or mobile controls to move the player \nspace or click  to shoot\ndestroy enemy and avoid spikes