Forest [ A Platformer ]

Instructions:                      ★★★ INSTRUCTIONS ★★★\n- Arrow key to move \n- Don't touch spikes, saw, lava !!!\n\n                                Lov, Fav, Follow !\n

@Stage\n\nwhen flag clicked\nswitch backdrop to (2 v)\n\nwhen I receive [start v]\nswitch backdrop to (1 v)\n\n@Picture\n\nwhen flag clicked\nshow\nset [ghost v] effect to (0)\nset [pixelate v] effect to (0)\nset [whirl v] effect to (0)\nwait (1) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\n    change [pixelate v] effect by (5)\n    change [whirl v] effect by (5)\nend\nbroadcast (Start v)\n\nwhen I receive [start v]\nforever\n    play sound [Music 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 (big v)\nrepeat (5)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\nwhen I receive [start v]\nshow\nswitch costume to (1 v)\nset size to (100) %\npoint in direction (90)\ngo to x: (-202) y: (-63)\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: (-202) y: (-63)\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: (-202) y: (-63)\n    end\nend\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]) = [3]> then\n        turn right (5) degrees\n        go to x: (156) y: (-81)\n    end\n    if <(costume [number v]) = [6]> then\n        turn right (3) degrees\n        go to x: (62) y: (28)\n    end\n    if <(costume [number v]) = [7]> then\n        turn left (3) degrees\n        go to x: (0) y: (55)\n    end\nend\n\n