Jungle - Platformer

Instructions: Move with arrow keys, WASD or touch\n\n

@Stage\n\nwhen flag clicked\nswitch backdrop to (cenário1 v)\n\n@ground\n\nwhen flag clicked\ngo to [front v] layer\nswitch backdrop to (cenário1 v)\nforever\n    switch costume to ([backdrop # v] of [_stage_ v])\nend\n\n@player\n\nwhen I start as a clone\nswitch costume to (fantasia2 v)\nset [ghost v] effect to (0)\nrepeat (10)\n    change size by (-5)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen flag clicked\nswitch costume to (fantasia1 v)\ngo to [front v] layer\nset rotation style [left-right v]\ngo to x: (-209) y: (-85)\nforever\n    change [y v] by (-0.5)\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [x v] by (-1)\n        point in direction (-90)\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x v] by (1)\n        point in direction (90)\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    end\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 (-0.5)\n    if <<touching (ground v)?> and <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <((mouse y) - (y position)) > [50]>>>>> then\n        set [y v] to [10]\n    end\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 y by (-6)\n                            if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <((mouse y) - (y position)) > [50]>>>> then\n                                set [y v] to [10]\n                                if <(x) > [0]> then\n                                    set [x v] to [-10]\n                                else\n                                    set [x v] to [10]\n                                end\n                            else\n                                change x by ((x) * (-1))\n                                set [x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nswitch backdrop to (1 v)\nforever\n    if <touching (bad v)?> then\n        go to x: (-209) y: (-85)\n    end\n    if <touching (spike v)?> then\n        go to x: (-209) y: (-85)\n    end\n    if <(x position) = [248]> then\n        next backdrop\n        go to x: (-209) y: (-85)\n    end\n    if <touching (spike v)?> then\n        go to x: (-209) y: (-85)\n    end\n    if <touching (enemy v)?> then\n        go to x: (-209) y: (-85)\n    end\nend\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nstop all sounds\nforever\n    play sound [Itty Bitty 8 Bit v] until done\nend\n\n@spike\n\nwhen flag clicked\nforever\n    switch costume to ([backdrop # v] of [_stage_ v])\nend\n\n@Ator1\n\nwhen flag clicked\nshow\nforever\n    go to [front v] layer\n    change [ghost v] effect by (1000)\nend\n\n@Ator2\n\nwhen flag clicked\npoint in direction (90)\nswitch costume to (fantasia1 v)\nforever\n    if on edge, bounce\n    move (2) steps\nend\n\n@Ator3\n\nwhen flag clicked\npoint in direction (-90)\nswitch costume to (fantasia1 v)\nforever\n    if on edge, bounce\n    move (2) steps\nend\n\n@Ator4\n\nwhen flag clicked\npoint in direction (-90)\nswitch costume to (fantasia1 v)\nforever\n    if on edge, bounce\n    move (2) steps\nend\n\n