Stickman Platformer - Chapter 1 - The Forest- Scrolling, Mobile friendly

Instructions: !!!!----PRESS THE GREEN FLAG 3 TIMES BT----!!!!\n\n\nHey there! This is my 4th project, 2nd game and 1st platformer! This took good 3 months to do!\n---------------------------------------------------------\nWelcome to Stickman Platformer - Chapter 1 - The Forest (Scrolling, Mobile friendly)!!! \n-------------------------------------------------\nThis is a beginning of a 3-5 chapter series of platformers + boss-levels!!\n----------------------------------\nOn one peaceful night, when the whole village\nwas asleep, he came.\n \nHe came, with fiery hands and a giant body.\n \nHe came. The devil came.\n \nHe had no mercy towards the people in the \nvillage. He was simply evil.\n \nHe just burned it.\n \nThere were only few survivors.\n\n\nYou survived.\nYou need revenge.\n----------------------------------\nThis is a scrolling - mobile friendly platformer with a boss level at the end!\n---------------------------------------\nArrow keys or a,w,s & d to move! Don't touch spikes or the Devil's fire!!!!! \n-------------------------------------\nEnjoy, Love, Favorite and Follow!!!!!

@Stage\n\nwhen I receive [hide start up animation v]\nswitch backdrop to (backdrop2 v)\n\n@thumbnail and stories\n\nwhen flag clicked\nswitch costume to (thumbnail v)\nset [ghost v] effect to (0)\nswitch costume to (thumbnail v)\ngo to [front v] layer\nshow\nwait (1) seconds\nset [ghost v] effect to (100)\n\nwhen I receive [hide start up animation v]\nswitch costume to (costume1 v)\nset [ghost v] effect to (0)\nforever\n    if <<<key (space v) pressed?> or <mouse down?>> and <not <(costume [number v]) = [4]>>> then\n        next costume\n        wait (0.8) seconds\n    end\n    if <(costume [number v]) = [4]> then\n        if <<key (space v) pressed?> or <mouse down?>> then\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            broadcast (start the game v)\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [end story v]\nswitch costume to (costume4 v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nforever\n    if <<<key (space v) pressed?> or <mouse down?>> and <(costume [number v]) = [5]>> then\n        hide\n    end\nend\n\nwhen I receive [outro v]\nstop all sounds\nswitch costume to (costume5 v)\nshow\n\nswitch costume to (thumbnail v)\nset [ghost v] effect to (0)\n\n@Pro\n\nwhen flag clicked\ngo to x: (8) y: (-11)\nshow\nswitch backdrop to (backdrop1 v)\nswitch costume to (costume2 v)\nrepeat (28)\n    next costume\n    wait (0.04) seconds\nend\nswitch costume to (costume2 v)\n\nwhen I receive [hide start up animation v]\nhide\nforever\n    play sound [y2mate v] until done\nend\n\n@PRO\n\nwhen flag clicked\nstart sound [y2mate2 v]\nswitch costume to (costume1 v)\ncreate clone of (_myself_ v)\ngo to x: (-277) y: (-83)\nhide\nwait (3) seconds\nshow\nglide (0.05) secs to x: (8) y: (-72)\nwait (3) seconds\nbroadcast (Hide start up animation v)\n\nwhen I start as a clone\nswitch costume to (pro v)\ngo to x: (277) y: (50)\nhide\nwait (2.5) seconds\nstart sound [recording1 v]\nshow\nglide (0.05) secs to x: (8) y: (50)\n\nwhen flag clicked\nforever\n    if <(SCROLL X) > [7730]> then\n        play sound [y2mate v] until done\n    end\nend\n\nwhen I receive [hide start up animation v]\nhide\n\n@PLAY\n\nwhen backdrop switches to [backdrop2 v]\nshow\nforever\n    point in direction (91)\n    set size to (100) %\n    if <touching (mouse-pointer v)?> then\n        change size by (10)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nswitch backdrop to (backdrop3 v)\nhide\n\nwhen backdrop switches to [backdrop2 v]\nset volume to (50) %\n\nwhen I receive [start the game v]\nplay sound [y2mate v] until done\n\n@ TheGuy\n\nwhen flag clicked\nforever\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>> then\n        point in direction (90)\n    end\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        point in direction (-90)\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    if <<<<key (a v) pressed?> or <<key (d v) pressed?> or <<key (w v) pressed?> or <key (s v) pressed?>>>> or <<key (up arrow v) pressed?> or <<key (down arrow v) pressed?> or <<key (left arrow v) pressed?> or <key (right arrow v) pressed?>>>>> or <mouse down?>> then\n        Running costumes\n    else\n        Staying costumes\n    end\nend\n\nwhen I receive [hide start up animation v]\ngo to x: (14) y: (-144)\nchange [brightness v] effect by (100)\nforever\n    go to ( theguy hitbox v)\nend\n\ndefine Running costumes\nswitch costume to (1 v)\nwait (0.04) seconds\nswitch costume to (2 v)\nwait (0.04) seconds\nswitch costume to (3 v)\nwait (0.04) seconds\nswitch costume to (4 v)\nwait (0.04) seconds\nswitch costume to (5 v)\nwait (0.04) seconds\nswitch costume to (6 v)\nwait (0.04) seconds\nswitch costume to (7 v)\nwait (0.04) seconds\nswitch costume to (8 v)\nwait (0.04) seconds\nswitch costume to (9 v)\nwait (0.04) seconds\n\ndefine Staying costumes\nswitch costume to (stay v)\nwait (0.1) seconds\nswitch costume to (stay2 v)\nwait (0.1) seconds\nswitch costume to (stay23 v)\nwait (0.1) seconds\nswitch costume to (stay4 v)\nwait (0.1) seconds\n\nwhen I receive [died v]\nrepeat (8)\n    change [ghost v] effect by (12.5)\nend\nrepeat (8)\n    change [ghost v] effect by (-12.5)\nend\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\n@ TheGuy HITBOX\n\nwhen I receive [tick v]\nif <<<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>> and <touching (water v)?>> then\n    set [sy v] to [3]\nend\n\nwhen flag clicked\nforever\n    if <<key (r v) pressed?> and <(username) = [ProgrammeKing]>> then\n        set [stckman's x v] to [7000]\n        set [scroll x v] to [7000]\n    end\n    if <<key (e v) pressed?> and <(username) = [ProgrammeKing]>> then\n        set [stckman's x v] to [6000]\n        set [scroll x v] to [6000]\n    end\nend\n\ndefine Start\nset size to (20) %\npoint in direction (90)\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [stckman's x v] to [0]\nset [stckman's y v] to [0]\nset [sy v] to [0]\nset [air time v] to [0]\nset [status v] to []\nshow\n\ndefine Tick\nif <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> and <not <touching (water v)?>>> then\n    Stickman's x by [-7]\nend\nif <<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>> and <not <touching (water v)?>>> then\n    Stickman's x by [7]\nend\nif <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> and <touching (water v)?>> then\n    Stickman's x by [-3]\nend\nif <<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>> and <touching (water v)?>> then\n    Stickman's x by [3]\nend\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>> then\n    if <<(air time) < [4]> and <touching (water v)?>> then\n        set [sy v] to [3]\n    end\n    if <<(air time) < [4]> and <not <touching (water v)?>>> then\n        set [sy v] to [15]\n    end\nend\nif <touching (water v)?> then\n    change [sy v] by (-0.1)\nelse\n    change [sy v] by (-2)\nend\nchange [scroll x v] by (round (((Stckman's x) - (SCROLL X)) / (5)))\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nchange [scroll y v] by (round (((Stckman's y) - (SCROLL Y)) / (4)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nif <(Stckman's y) < [-180]> then\n    broadcast (died v)\n    wait (0.2) seconds\n    set [stckman's x v] to [0]\n    set [scroll x v] to [0]\n    wait (0.5) seconds\nend\nPosit.\nStickman's y by (sy)\nPosit.\n\ndefine Stickman's y by (sy)\nchange [stckman's y v] by (sy)\nchange [air time v] by (1)\nPosit.\nrepeat until <not <touching (level v)?>>\n    if <(sy) > [0]> then\n        change [stckman's y v] by (-1)\n    else\n        change [stckman's y v] by (2)\n        set [air time v] to [0]\n    end\n    Posit.\n    set [sy v] to [0]\nend\n\ndefine Posit.\ngo to x: ((Stckman's x) - (SCROLL X)) y: ((Stckman's y) - (SCROLL Y))\n\ndefine Stickman's x by (sx)\nchange [stckman's x v] by (sx)\nPosit.\nif <touching (level v)?> then\n    repeat (12)\n        change [stckman's y v] by (2)\n        Posit.\n        if <not <touching (level v)?>> then\n            stop [this script v]\n        end\n    end\n    change [stckman's y v] by (-12)\n    repeat until <not <touching (level v)?>>\n        if <(sx) > [0]> then\n            change [stckman's x v] by (-1)\n        else\n            change [stckman's x v] by (1)\n        end\n        Posit.\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\nwhen flag clicked\nforever\n    if <(SCROLL X) > [7343]> then\n        broadcast (Boss Level v)\n        set [boss v] to [1]\n    else\n        if <[7343] > (SCROLL X)> then\n            set [boss v] to [0]\n            broadcast (no boss level v)\n        end\n    end\nend\n\nwhen flag clicked\nset [end v] to [0]\nset [boss v] to [0]\nforever\n    if <(End) = [0]> then\n        if <<touching (spikes & devil v)?> or <<touching (spikes & devil v)?> and <touching (water v)?>>> then\n            broadcast (died v)\n            wait (0.2) seconds\n            set [stckman's x v] to [0]\n            set [scroll x v] to [0]\n            wait (0.5) seconds\n        end\n    end\n    if <touching (fire v)?> then\n        change [stickman's xp v] by (-1)\n    end\n    if <(Stickman's XP) = [0]> then\n        set [stickman's xp v] to [5]\n        set [stckman's x v] to [0]\n        set [scroll x v] to [0]\n    end\n    if <(SCROLL X) > [7730]> then\n        broadcast (outro v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nset [stckman's x v] to [0]\nset [scroll x v] to [0]\n\nwhen I receive [end story v]\nset [end v] to [1]\n\nwhen backdrop switches to [backdrop3 v]\nhide\nswitch costume to (costume1 v)\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    Start\n    repeat until <(Status) > []>\n        Tick\n        broadcast (Tick v) and wait\n    end\nend\n\n@LEVEL\n\nwhen I receive [setup v]\nshow\nset [levels: x v] to [0]\nset [levels: y v] to [0]\nswitch costume to (level 1 1 v)\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [levels: x v] by (x)\nchange [levels: y v] by (y)\nnext costume\n\nwhen I receive [tick v]\nposition ((levels: x) - (SCROLL X)) (((levels: y) - (13)) - (SCROLL Y))\n\nif <(backdrop [number v]) = [3]> then\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\nwhen backdrop switches to [backdrop3 v]\nset [ghost v] effect to (0)\n\n@WATER\n\nwhen I receive [setup v]\nshow\nset [levels: x v] to [0]\nset [levels: y v] to [0]\nswitch costume to (level 1 1 v)\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [levels: x v] by (x)\nchange [levels: y v] by (y)\nnext costume\n\nwhen I receive [tick v]\nset [ghost v] effect to (25)\nposition ((levels: x) - (SCROLL X)) (((levels: y) - (13)) - (SCROLL Y))\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\nwhen flag clicked\ngo to [front v] layer\ngo [backward v] (1) layers\n\n@SPIKES & DEVIL\n\nwhen I receive [tick v]\nposition ((levels: x2) - (SCROLL X)) (((levels: y2) - (13)) - (SCROLL Y))\n\nwhen I receive [setup v]\nshow\nset [levels: x2 v] to [0]\nset [levels: y2 v] to [0]\nswitch costume to (level 1 1 v)\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [levels: x2 v] by (x)\nchange [levels: y2 v] by (y)\nnext costume\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\nbroadcast (Boss Level v)\n\nwhen I receive [end story v]\nforever\nend\n\nhide\n\nwhen I receive [end story v]\nset [ghost v] effect to (100)\n\nhide\n\nforever\nend\n\nwhen backdrop switches to [backdrop3 v]\nset [ghost v] effect to (0)\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\n@fire\n\nwhen flag clicked\nforever\n    hide\n    if <(Boss) = [1]> then\n        show variable [stickman's xp v]\n        show variable [boss xp v]\n        wait (1) seconds\n        repeat until <<(Boss XP) = [0.1]> or <(Boss XP) < [0.1]>>\n            go to (spikes & devil v)\n            show\n            point towards ( theguy hitbox v)\n            repeat until <<touching ( theguy hitbox v)?> or <touching (_edge_ v)?>>\n                move (3.5) steps\n            end\n            hide\n            wait (pick random (1) to (2)) seconds\n        end\n    end\nend\n\nwhen flag clicked\nhide variable [boss xp v]\nhide variable [stickman's xp v]\n\nwhen I receive [no boss level v]\nhide\nhide variable [boss xp v]\nhide variable [stickman's xp v]\nset [stickman's xp v] to [5]\nset [boss xp v] to [3]\n\nwhen I receive [boss level v]\nif <not <<(Boss XP) = [0.1]> or <(Boss XP) < [0.1]>>> then\n    show variable [stickman's xp v]\n    show variable [boss xp v]\nelse\n    hide variable [boss xp v]\n    hide variable [stickman's xp v]\nend\n\nwhen flag clicked\nforever\n    if <(SCROLL X) > [7343]> then\n        wait (17) seconds\n        change [boss xp v] by (-1)\n        wait (17) seconds\n        change [boss xp v] by (-1)\n        wait (17) seconds\n        change [boss xp v] by (-0.9)\n    else\n        if <<(Boss XP) = [0.1]> or <(Boss XP) < [0.1]>> then\n            broadcast (End Story v)\n            broadcast (no boss level v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Boss XP) = [0.1]> or <(Boss XP) < [0.1]>> then\n        broadcast (End Story v)\n        stop [this script v]\n    end\nend\n\n