Parkour - Platformer


@Stage\n\n@character\n\nwhen flag clicked\ngo to [front v] layer\nshow\ngo to x: (-216) y: (0)\nset [level v] to [1]\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    set [x v] to (x position)\n    set [y v] to (y position)\n    switch costume to (not moving v)\n    if <key (right arrow v) pressed?> then\n        change [xv v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((xv) * (.9))\n    change x by (xv)\n    if <<touching color (#ffffff)?> or <touching color (#000000)?>> then\n        change y by (1)\n        if <<touching color (#ffffff)?> or <touching color (#000000)?>> then\n            change y by (1)\n            if <<touching color (#ffffff)?> or <touching color (#000000)?>> then\n                change y by (1)\n                if <<touching color (#ffffff)?> or <touching color (#000000)?>> then\n                    change y by (1)\n                    if <<touching color (#ffffff)?> or <touching color (#000000)?>> then\n                        change y by (1)\n                    end\n                    change x by ((xv) * (-1))\n                    change y by (-5)\n                    if <key (up arrow v) pressed?> then\n                        if <(xv) > [0]> then\n                            set [xv v] to [-10]\n                        else\n                            set [xv v] to [10]\n                        end\n                        set [yv v] to [15]\n                    else\n                        set [xv v] to [0]\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by ((yv) * (1))\n    if <<touching color (#ffffff)?> or <touching color (#000000)?>> then\n        change y by ((yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <<touching color (#ffffff)?> or <touching color (#000000)?>> then\n        if <key (up arrow v) pressed?> then\n            change [yv v] by (12)\n            start sound [Low Whoosh v]\n        end\n    end\n    change y by (1)\n    if <(x position) > [235]> then\n        go to x: (-216) y: (0)\n        change [level v] by (1)\n        wait (0.1) seconds\n    end\n    if <<touching color (#c1c1c1)?> or <touching color (#ff6300)?>> then\n        broadcast (Death v)\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        set [ghost v] effect to (0)\n        go to x: (-216) y: (0)\n    end\nend\n\n@levels\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen flag clicked\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\n\nwhen flag clicked\nforever\n    play sound [Imagine Dragons - Radioactive v] until done\nend\n\n@lava\n\nwhen flag clicked\nforever\n    repeat (20)\n        change y by (0.5)\n    end\n    repeat (20)\n        change y by (-0.5)\n    end\nend\n\nwhen flag clicked\nshow\ngo to [back v] layer\ngo to x: (0) y: (0)\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen flag clicked\nforever\n    switch costume to (level)\nend\n\n@thumbnail\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\ngo to [front v] layer\ngo to x: (0) y: (0)\n\n