Sniper A Platformer [2 player]

Instructions: 300 followers : Games contest :\nhttps://scratch.mit.edu/projects/402460464\n\n[Player 1]\nRunner\nVous devez parcourir les 10 niveaux en moins de 100 secondes, sans vous faire tirer dessus par le sniper !\nVous devez aussi évitez les piques et la lave !\n\n[Player 2]\nSniper\nVous devez aux maximum ralentir le runner pour que le chronomètre arrive a 0, si se n'est pas le cas vous avez perdus.\n\n[Player 1]\nRunner\nYou have to go through the 10 levels in less than 100 seconds, without being shot by the sniper!\nYou must also avoid spikes and lava!\n\n[Player 2]\nSniper\nYou must slow down the runner as much as possible so that the timer reaches 0, if this is not the case you have lost.\n\nEnjoy !

@Stage\n\nwhen I receive [sniper win v]\nswitch backdrop to (arrière plan3 v)\n\nwhen I receive [player win v]\nswitch backdrop to (arrière plan4 v)\n\nwhen flag clicked\nswitch backdrop to (arrière plan1 v)\n\n@intro\n\nwhen flag clicked\nstart sound [Elek Tronomia - Elektronomia - Sky High v]\nhide\nset size to (220) %\ngo to [front v] layer\nwait (1) seconds\nshow\ngo to x: (0) y: (400)\nglide (0.111111111) secs to x: (0) y: (33)\nbroadcast (Skip Intro v)\nforever\n    go to [front v] layer\nend\n\nwhen I receive [message1 v]\nrepeat (5)\n    repeat (10)\n        change size by (5)\n    end\n    broadcast (boom v)\n    repeat (10)\n        change size by (-5)\n    end\nend\nwait (3) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\nforever\n    next costume\nend\n\nwhen flag clicked\nswitch backdrop to (arrière plan1 v)\nwait (11) seconds\nswitch backdrop to (arrière plan2 v)\nbroadcast (Début jeu v)\n\nwhen I receive [début jeu v]\nhide\n\n@Play_Icon_clip_art\n\nwhen flag clicked\nhide\n\nwhen I receive [début jeu v]\nshow\nset [56rtgfhf v] to [0]\nforever\n    if <touching (mouse-pointer v)?> then\n        set [56rtgfhf v] to (((56rtgfhf) * (0.75)) + (((130) - (size)) * (0.2)))\n        change size by (56rtgfhf)\n    else\n        set [56rtgfhf v] to (((56rtgfhf) * (0.8)) + (((100) - (size)) * (0.2)))\n        change size by (56rtgfhf)\n    end\nend\n\nwhen this sprite clicked\nbroadcast (start v)\n\nwhen I receive [start v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@intro2\n\nwhen I start as a clone\nrepeat (10)\n    change size by (-2.5)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen flag clicked\npoint in direction (90)\nhide\nset size to (75) %\ngo to [front v] layer\nwait (2) seconds\nshow\ngo to x: (-400) y: (0)\nglide (0.5) secs to x: (400) y: (0)\npoint in direction (60)\nglide (1) secs to x: (98) y: (-110)\nbroadcast (message1 v)\n\nwhen I receive [message1 v]\nrepeat (5)\n    repeat (10)\n        change size by (5)\n    end\n    broadcast (boom v)\n    repeat (10)\n        change size by (-5)\n    end\nend\nwait (3) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nforever\n    next costume\nend\n\nwhen I receive [début jeu v]\nhide\n\n@entourage\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset size to (50) %\ngo to [back v] layer\nshow\ngo to x: (400) y: (0)\nglide (1) secs to x: (0) y: (32)\n\nwhen I receive [message1 v]\nrepeat (5)\n    repeat (10)\n        change size by (2.5)\n    end\n    broadcast (boom v)\n    repeat (10)\n        change size by (-2.5)\n    end\nend\nwait (3) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nbroadcast (end v)\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nrepeat (10)\n    change size by (-2.5)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I receive [skip intro v]\nswitch costume to (costume2 v)\n\nwhen I receive [début jeu v]\nhide\n\n@Intro4\n\nwhen I receive [boom v]\nif <(size) < [21]> then\n    set [momentum v] to (pick random (10) to (15))\n    set [intro #2: yv v] to (pick random (2) to (3))\n    change [brightness v] effect by (pick random (-20) to (20))\n    change size by (pick random (10) to (20))\n    set [ghost v] effect to (45)\n    turn right (pick random (-10) to (10)) degrees\n    show\n    repeat until <touching (_edge_ v)?>\n        go to [back v] layer\n        move (Momentum) steps\n        change y by (Intro #2: Yv)\n    end\n    hide\n    delete this clone\nelse\n    repeat (2)\n        Spread\n        wait (0.2) seconds\n    end\nend\nstop [this script v]\n\ndefine Spread\nshow\ngo to [back v] layer\nset [ghost v] effect to (45)\nchange [dot count v] by (10)\ngo to (intro v)\npoint in direction (90)\ngo to (intro v)\nturn right (Dot Count) degrees\ncreate clone of (_myself_ v)\nrepeat until <touching (_edge_ v)?>\n    move (15) steps\nend\nhide\n\nwhen I receive [end v]\nhide\nstop [other scripts in sprite v]\n\nwhen flag clicked\nset size to (15) %\ngo to x: (0) y: (0)\npoint in direction (75)\nhide\nset [dot count v] to [0]\nrepeat (150)\n    create clone of (_myself_ v)\n    turn left (0.5) degrees\nend\n\nwhen I receive [début jeu v]\nhide\n\n@intro3\n\nwhen I receive [boom v]\nif <(size) < [21]> then\n    set [momentum v] to (pick random (10) to (15))\n    set [intro #2: yv v] to (pick random (2) to (3))\n    change [brightness v] effect by (pick random (-20) to (20))\n    change size by (pick random (10) to (20))\n    set [ghost v] effect to (45)\n    turn right (pick random (-10) to (10)) degrees\n    show\n    repeat until <touching (_edge_ v)?>\n        go to [back v] layer\n        move (Momentum) steps\n        change y by (Intro #2: Yv)\n    end\nelse\n    repeat (2)\n        Spread\n        wait (0.2) seconds\n    end\nend\n\nrepeat (2)\nend\n\ndefine Spread\nshow\ngo to [back v] layer\nset [ghost v] effect to (45)\nchange [dot count v] by (10)\ngo to (intro2 v)\npoint in direction (90)\ngo to (intro2 v)\nturn right (Dot Count) degrees\ncreate clone of (_myself_ v)\nrepeat until <touching (_edge_ v)?>\n    move (15) steps\nend\nhide\n\nwhen I receive [end v]\nhide\nstop [other scripts in sprite v]\n\nwhen flag clicked\nset size to (15) %\ngo to x: (0) y: (0)\npoint in direction (75)\nhide\nset [dot count v] to [0]\nrepeat (20)\n    create clone of (_myself_ v)\n    turn left (15) degrees\nend\n\nchange [intro #2: yv v] by (-0.4)\nset [momentum v] to ((Momentum) * (0.95))\n\nwhen I receive [début jeu v]\nhide\n\n@Danger\n\nwhen flag clicked\nhide\n\nwhen I receive [next v]\nnext costume\n\nwhen I receive [start v]\nshow\nswitch costume to (costume1 v)\ngo to x: (-0) y: (-0)\n\n@F1\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nset volume to (100) %\n\nhide\n\nwhen I receive [start v]\ngo to [front v] layer\nset [ghost v] effect to (0)\nshow\nset [x velocity v] to [0]\nset [y velocity v] to [0]\ngo to x: (-214) y: (-90)\nforever\n    if <key (right arrow v) pressed?> then\n        change [x velocity v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        change [x velocity v] by (-1)\n    end\n    set [x velocity v] to ((x velocity) * (.9))\n    change x by (x velocity)\n    if <touching color (#909090)?> then\n        change y by (1)\n        if <touching color (#909090)?> then\n            change y by (1)\n            if <touching color (#909090)?> then\n                change y by (1)\n                if <touching color (#909090)?> then\n                    change y by (1)\n                    if <touching color (#909090)?> then\n                        if <touching color (#909090)?> then\n                            change x by ((x velocity) * (-1))\n                            change x by (-5)\n                            if <key (up arrow v) pressed?> then\n                                if <(x velocity) > [0]> then\n                                    set [x velocity v] to [-5]\n                                else\n                                    set [x velocity v] to [5]\n                                end\n                                set [y velocity v] to [10]\n                            else\n                                set [x velocity v] to [0]\n                            end\n                        end\n                        change y by (1)\n                    end\n                end\n            end\n        end\n    end\n    change [y velocity v] by (-1)\n    change y by (y velocity)\n    if <touching color (#909090)?> then\n        change y by ((y velocity) * (-1))\n        set [y velocity v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#909090)?> then\n        if <key (up arrow v) pressed?> then\n            change [y velocity v] by (15)\n        end\n    end\n    if <touching color (#6aff66)?> then\n        change [y velocity v] by (35)\n    end\n    change y by (1)\n    if <(x position) > [230]> then\n        set [x velocity v] to [0]\n        set [y velocity v] to [0]\n        go to x: (-214) y: (-90)\n        broadcast (next v)\n    end\n    if <touching color (#ff0000)?> then\n        Mort\n        play sound [ROBLOX Death Sound v] until done\n    end\n    if <touching color (#ff4e4e)?> then\n        Mort\n        play sound [ROBLOX Death Sound v] until done\n    end\n    if <(Balle) = [1]> then\n        if <touching (mouse-pointer v)?> then\n            if <mouse down?> then\n                Mort\n                play sound [ROBLOX Death Sound v] until done\n            end\n        end\n    end\nend\n\nwhen I receive [next v]\ngo to x: (-214) y: (-90)\n\ndefine Mort\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nset [x velocity v] to [0]\nset [y velocity v] to [0]\ngo to x: (-214) y: (-90)\n\nwhen I receive [sniper win v]\nwait (0.1) seconds\nstop [all v]\n\nwhen I receive [player win v]\nwait (0.1) seconds\nstop [all v]\n\n@F2\n\nwhen I receive [next v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [start v]\nshow\nswitch costume to (costume1 v)\ngo to x: (-0) y: (-0)\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [11]> then\n        broadcast (player win v)\n    end\nend\n\n@Scope\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\nforever\n    go to (mouse-pointer v)\nend\n\nwhen I receive [start v]\nset [balle v] to [1]\nforever\n    if <(Balle) = [1]> then\n        if <mouse down?> then\n            change [balle v] by (-1)\n            play sound [GUN_FIRE-GoodSoundForYou-820112263 v] until done\n            wait (0.3) seconds\n            play sound [m249_saw v] until done\n            change [balle v] by (1)\n        end\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen I receive [début jeu v]\ngo to x: (0) y: (0)\nshow\n\nwhen I receive [start v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Sprite2\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\nswitch costume to (costume1 v)\nforever\n    wait (1) seconds\n    next costume\n    if <(costume [number v]) = [99]> then\n        broadcast (sniper win v)\n    end\nend\n\n@Sprite3\n\nwhen I receive [start v]\nshow\n\nwhen flag clicked\nhide\n\n@Sprite4\n\nwhen flag clicked\ngo to x: (-186) y: (140)\nhide\n\nwhen I receive [start v]\nshow\nforever\n    if <(Balle) = [0]> then\n        switch costume to (costume1 v)\n    end\n    if <(Balle) = [1]> then\n        switch costume to (costume2 v)\n    end\nend\n\n