Dangerous Trip 1 [ A Platformer ]

Instructions:                      ★★★ INSTRUCTIONS ★★★\n- Arrow key to move \n- Don't touch spikes, saw. lava,... !!!\n- Part 2 : https://scratch.mit.edu/projects/587899353\n\n                                Lov, Fav, Follow !

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [next v]\nnext backdrop\n\n@Picture\n\nwhen flag clicked\nshow\nset [ghost v] effect to (0)\nset [whirl v] effect to (0)\nset [pixelate v] effect to (0)\nwait (1) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\n    change [whirl v] effect by (5)\n    change [pixelate v] effect by (5)\nend\nbroadcast (Start v)\n\nwhen I receive [start v]\nforever\n    play sound [pop2 v] until done\nend\n\n@Player\n\nwhen flag clicked\nhide\nhide variable [x v]\nhide variable [y v]\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nswitch costume to (costume2 v)\nrepeat (5)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\nwhen I receive [start v]\nshow\nswitch costume to (costume1 v)\nset size to (100) %\npoint in direction (90)\ngo to x: (-199) y: (-62)\nset [x v] to [0]\nset [y v] to [0]\nforever\n    if <key (right arrow v) pressed?> then\n        change [x v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        change [x v] by (-1)\n    end\n    set [x v] to ((X) * (0.9))\n    change x by (X)\n    if <touching (ground v)?> then\n        change y by (1)\n        if <touching (ground v)?> then\n            change y by (1)\n            if <touching (ground v)?> then\n                change y by (1)\n                if <touching (ground v)?> then\n                    change y by (1)\n                    if <touching (ground v)?> then\n                        change y by (1)\n                        if <touching (ground v)?> then\n                            change x by ((X) * (-1))\n                            change y by (-1)\n                            if <key (up arrow v) pressed?> then\n                                if <(X) > [0]> then\n                                    set [x v] to [-5]\n                                else\n                                    set [x v] to [5]\n                                end\n                                set [y v] to [10]\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 v] by (-1)\n    change y by (Y)\n    if <touching (ground v)?> then\n        change y by ((Y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <touching (ground v)?> then\n        if <key (up arrow v) pressed?> then\n            set [y v] to [15]\n        end\n    end\n    if <(x position) > [221]> then\n        set size to (100) %\n        go to x: (-199) y: (-62)\n        broadcast (Next v)\n    end\n    if <<touching (spikes v)?> or <touching (saw v)?>> then\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        set size to (100) %\n        point in direction (90)\n        set [ghost v] effect to (0)\n        go to x: (-199) y: (-62)\n    end\n    if <touching color (#ffe817)?> then\n        change [y v] by (20)\n    end\nend\n\nchange [x v] by (-5)\n\n@Ground\n\nwhen flag clicked\nhide\nswitch costume to (1 v)\n\nwhen I receive [start v]\nshow\n\nwhen I receive [next v]\nnext costume\n\n@Spikes\n\nwhen flag clicked\nhide\nswitch costume to (1 v)\n\nwhen I receive [start v]\nshow\n\nwhen I receive [next v]\nnext costume\n\n@Saw\n\nwhen flag clicked\nhide\nswitch costume to (1 v)\n\nwhen I receive [start v]\nshow\n\nwhen I receive [next v]\nnext costume\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [4]> then\n        go to x: (121) y: (-87)\n        turn right (15) degrees\n    end\n    if <(costume [number v]) = [7]> then\n        go to x: (86) y: (40)\n        turn right (15) degrees\n    end\n    if <(costume [number v]) = [9]> then\n        go to x: (55) y: (-83)\n        turn right (15) degrees\n    end\n    if <(costume [number v]) = [10]> then\n        go to x: (75) y: (-83)\n        turn right (15) degrees\n    end\nend\n\n