Dangerous 2 || A Platformer || by Gijax

Instructions:                         || Dangerous ||                \n \n \n✅Click 2 times on the green flag please!✅\n \n  Part 2 !\nTo play you have to use the directional arrows or in mobile version !\n\n⚠️⚠️⚠️ Like Fav and follow me for part 3! ⚠️⚠️⚠️\n\n\nI know it's short sorry!\n\n\n\n______\nCredits :\n¨¨¨¨¨¨¨¨¨¨\nThanks to @YoussefElHaouzi for a code !\n\nAnd @Volcanoscratch for the music !

@Stage\n\nwhen backdrop switches to [arrière-plan2 v]\nshow\nset [ghost v] effect to (100)\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\nwait (2) seconds\nrepeat (100)\n    change [ghost v] effect by (1)\nend\nhide\n\nwhen flag clicked\nstart sound [NIVIRO - The Floor Is Lava \[NCS Release\] v]\n\nwhen flag clicked\nswitch backdrop to (arrière-plan1 v)\n\nwhen I receive [fin v]\nswitch backdrop to (arrière-plan2 v)\n\n@Player !\n\nwhen flag clicked\nforever\n    if <touching (next level v)?> then\n        broadcast (Ground v)\n    end\n    if <touching (next level v)?> then\n        broadcast (Ground v)\n    end\nend\n\nwhen I receive [ground v]\ngo to x: (-166) y: (-7)\n\nwhen flag clicked\nshow\ngo to x: (-166) y: (-7)\nset [y v] to [0]\nset [x v] to [0]\nforever\n    change [y v] by (-1)\n    set [x v] to (((X) - (X)) * (0.8))\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x v] by (7)\n        switch costume to (costume1 v)\n    end\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(x position) > (mouse x)>>> then\n        change [x v] by (-7)\n        switch costume to (costume2 v)\n    end\n    change x by (X)\n    if <touching (ground ! v)?> then\n        change y by (2)\n        if <touching (ground ! v)?> then\n            change y by (2)\n            if <touching (ground ! v)?> then\n                change y by (2)\n                if <touching (ground ! v)?> then\n                    change y by (2)\n                    if <touching (ground ! v)?> then\n                        change y by (2)\n                        if <touching (ground ! v)?> then\n                            change y by (-8)\n                            change x by ((X) * (-2))\n                            if <<<<key (space v) pressed?> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> or <<mouse down?> and <(mouse y) > (y position)>>> and <<not <(costume [number v]) = [3]>> and <not <(costume [number v]) = [4]>>>> then\n                                set [y v] to [10]\n                                if <([abs v] of (X) ) = (X)> then\n                                    set [x v] to [-16]\n                                else\n                                    set [x v] to [12]\n                                end\n                            else\n                                set [x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (Y)\n    if <touching (ground ! v)?> then\n        change y by ((Y) - ((Y) * (2)))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<<<key (space v) pressed?> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> or <<mouse down?> and <(mouse y) > (y position)>>> and <<not <(costume [number v]) = [3]>> and <not <(costume [number v]) = [4]>>>> then\n        if <touching (ground ! v)?> then\n            set [y v] to [16]\n        end\n    end\n    change y by (1)\nend\n\nwhen flag clicked\ngo to x: (-177) y: (-93)\nforever\n    if <touching (next level v)?> then\n        broadcast (Ground v)\n    end\nend\n\nwhen I receive [ground v]\ngo to x: (-166) y: (-7)\n\nwhen I receive [-1 v]\ngo to x: (-166) y: (-7)\n\nwhen I receive [hole v]\nhide\n\nwhen flag clicked\nwait (30) seconds\nforever\n    create clone of (_myself_ v)\n    wait (0.01) seconds\nend\n\nwhen I start as a clone\nset [ghost v] effect to (70)\nrepeat (7)\n    wait (0.01) seconds\n    change [ghost v] effect by (2)\nend\ndelete this clone\n\n@Ground !\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [costume2]> then\n        broadcast (Lave v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [costume4]> then\n        broadcast (spikes v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [costume3]> then\n        broadcast (pique v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [costume5]> then\n        broadcast (Pentes v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [costume4]> then\n        broadcast (rien v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [costume6]> then\n        broadcast (spike again ! v)\n    end\nend\n\nwhen I receive [hole v]\nhide\n\nwhen flag clicked\nshow\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [costume7]> then\n        broadcast (fin v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [costume7]> then\n        go to [front v] layer\n        switch costume to (costume8 v)\n        broadcast (fin v)\n    end\nend\n\nwhen I receive [fin v]\nswitch backdrop to (arrière-plan2 v)\n\nwhen I receive [ground v]\nnext costume\n\n@Next Level\n\nwhen I receive [hole v]\nhide\n\nwhen flag clicked\nshow\n\nwhen I receive [fin v]\nhide\n\n@Spikes\n\nwhen flag clicked\nhide\n\nwhen I receive [lave v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (costume1 v)\nif <touching (player ! v)?> then\n    broadcast (-1 v)\nend\n\nwhen I receive [spikes v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (costume2 v)\nif <touching (player ! v)?> then\n    broadcast (-1 v)\nend\n\nwhen I receive [pique v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (costume2 v)\nif <touching (player ! v)?> then\n    broadcast (-1 v)\nend\n\nwhen I receive [pentes v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (costume3 v)\nif <touching (player ! v)?> then\n    broadcast (-1 v)\nend\n\nwhen I receive [spike again ! v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (costume4 v)\nif <touching (player ! v)?> then\n    broadcast (-1 v)\nend\n\nwhen I receive [trou v]\nhide\n\nwhen I receive [rien v]\nhide\n\nwhen I receive [fin v]\nhide\n\n@TO BE CONTINUED !\n\nwait (3) seconds\n\nwhen backdrop switches to [arrière-plan2 v]\nshow\ngo to [front v] layer\nset [ghost v] effect to (100)\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\nwait (2) seconds\nrepeat (100)\n    change [ghost v] effect by (1)\nend\nhide\n\nwhen flag clicked\nhide\n\n@Thumbnails\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (100)\n    show\n    go to [front v] layer\nend\n\n@Fire\n\nwhen flag clicked\nset [hideclones v] to [0]\n\nwhen I start as a clone\nif <(pick random (1) to (2)) = [1]> then\n    go to [back v] layer\nelse\n    go to [back v] layer\nend\nshow\ngo to x: (pick random (-240) to (240)) y: (400)\npoint in direction (pick random (-180) to (180))\nrepeat until <touching (ground v)?>\n    change y by (-4)\n    wait (0.01) seconds\nend\ndelete this clone\n\nwhen I start as a clone\nrepeat (9)\n    change [ghost v] effect by (-3)\n    wait (0.02) seconds\nend\n\nwhen I receive [theend v]\nset [hideclones v] to [1]\nwait (0) seconds\nstop [other scripts in sprite v]\n\nwhen I start as a clone\nforever\n    if <(hideclones) = [1]> then\n        delete this clone\n    end\nend\n\nwhen flag clicked\nwait (30) seconds\nshow\nforever\n    wait (pick random (0.01) to (0.07)) seconds\n    create clone of (_myself_ v)\nend\n\n@Sprite2\n\nwhen flag clicked\nhide\ngo to [front v] layer\nswitch costume to (costume1 v)\nwait (1) seconds\nset [ghost v] effect to (100)\nshow\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\nwait (2) seconds\nrepeat (100)\n    change [ghost v] effect by (1)\nend\nhide\nswitch costume to (costume2 v)\nset [ghost v] effect to (100)\nshow\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\nwait (2) seconds\nrepeat (100)\n    change [ghost v] effect by (1)\nend\nhide\nswitch costume to (costume3 v)\nset [ghost v] effect to (100)\nshow\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\nwait (2) seconds\nrepeat (100)\n    change [ghost v] effect by (1)\nend\nhide\n\n@TO BE CONTINUED !2\n\nwhen backdrop switches to [arrière-plan2 v]\nwait (3) seconds\nshow\nset [ghost v] effect to (100)\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\nwait (2) seconds\nrepeat (100)\n    change [ghost v] effect by (1)\nend\nhide\n\nwhen flag clicked\nhide\n\n@Sprite1\n\nwhen flag clicked\ngo to [front v] layer\nshow\nwait (25) seconds\nrepeat (100)\n    change [ghost v] effect by (1)\nend\nhide\n\nset [ghost v] effect to (100)\n\n