Lava Escape - A scrolling platformer

Instructions: Welcome to Lava Escape! The goal is to outrun the lava and parkour through the obstacles. Just press the green flag to restart if it happens.\nControls:\nArrow keys to move and yeah that's pretty much it XD\nHave fun!

@Stage\n\n@Player\n\ndefine Reset\ngo to x: (0) y: (0)\nset [scroll x v] to [0]\nset [vx v] to [6]\nset [vy v] to [0]\nset [alive v] to [0]\n\ndefine Run game\nchange [attempt v] by (1)\nbroadcast (Start v)\nforever\n    change y by (Vy)\n    change [vy v] by (-1)\n    if <touching color (#000000)?> then\n        Y collision\n        if <(Showtime!) = [true]> then\n            if <<key (up arrow v) pressed?> and <(([abs v] of (Vy) ) / (Vy)) = [-1]>> then\n                set [vy v] to [15]\n            else\n                set [vy v] to [0]\n            end\n        end\n    end\nend\n\ndefine Y collision\nif <touching color (#000000)?> then\n    repeat until <not <touching color (#000000)?>>\n        change y by ((([abs v] of (Vy) ) / (Vy)) * (-1))\n    end\nend\n\nwhen I receive [ready v]\nX movement\n\ndefine X movement\nforever\n    set [showtime! v] to [true]\n    if <key (right arrow v) pressed?> then\n        set [vx v] to [15]\n        X collision\n    end\n    if <key (left arrow v) pressed?> then\n        set [vx v] to [-15]\n        X collision\n    end\n    set [vx v] to ((Vx) / (2))\n    change x by (Vx)\n    X collision\nend\n\ndefine X collision\nif <touching color (#000000)?> then\n    change x by ((0) - (Vx))\n    set [vx v] to [0]\nend\n\ndefine Scroll\nforever\n    if <(x position) > [0]> then\n        change x by ((0) - (Vx))\n        change [scroll x v] by (Vx)\n    end\n    if <(x position) < (Vx)> then\n        change x by (10)\n        change [scroll x v] by (Vx)\n    end\nend\n\nwhen I receive [ready v]\nScroll\n\ndefine Death\nforever\n    if <<touching (lava wall v)?> or <touching (lava floor v)?>> then\n        set [showtime! v] to [false]\n        Reset\n        Run game\n    end\nend\n\nwhen I receive [start v]\nDeath\n\nwhen flag clicked\nset [attempt v] to [0]\nReset\nRun game\n\n@Ground\n\nwhen I start as a clone\nPosition\n\nwhen I receive [go v]\n\ndefine Create Level\nhide\nset [scroll x v] to [0]\nset [level x v] to [0]\ngo to [front v] layer\nswitch costume to (level 1 v)\nrepeat (11)\n    create clone of (_myself_ v)\n    next costume\n    change [level x v] by (480)\nend\nbroadcast (Start v)\n\ndefine Position\nshow\nforever\n    set x to ((Level X) - (Scroll x))\n    if <((Level X) - (Scroll x)) = (x position)> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nCreate Level\n\n@Lava Wall\n\nwhen I receive [ready v]\nforever\n    change [lava x v] by (5)\nend\n\nwhen I receive [start v]\nshow\ngo to x: (-480) y: (0)\nset [lava x v] to [-480]\n\nwhen I receive [ready v]\nforever\n    set x to ((Lava x) - (Scroll x))\n    if <((Lava x) - (Scroll x)) = (x position)> then\n        show\n    else\n        hide\n    end\n    if <(Lava x) = [3920]> then\n        stop [other scripts in sprite v]\n    end\nend\n\n@Lava Floor\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\n\n@Countdown\n\nwhen flag clicked\nset instrument to (2 v)\nset [showtime! v] to [false]\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\ngo to [front v] layer\nset size to (0) %\nhide\nrepeat (3)\n    show\n    repeat (20)\n        change size by (5)\n    end\n    play note (72) for (0.25) beats\n    repeat (20)\n        change size by (-5)\n    end\n    hide\n    next costume\nend\nshow\nrepeat (20)\n    change size by (5)\nend\nplay note (84) for (0.25) beats\nrepeat (20)\n    change size by (-5)\nend\nhide\nnext costume\nset [showtime! v] to [true]\nbroadcast (Ready v)\n\nwhen I receive [ready v]\nforever\n    play sound [Monody+-+Loop v] until done\nend\n\n@Attempt Word\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen flag clicked\nforever\n    set x to ((Level X) - (Scroll x))\nend\n\nwhen flag clicked\nforever\n    if <((Level X) - (Scroll x)) = (x position)> then\n        show\n    else\n        hide\n    end\nend\n\n@Score\n\nwhen flag clicked\nset [digits v] to [1]\nrepeat (30)\n    create clone of (_myself_ v)\n    change [digits v] by (1)\nend\nhide\n\nwhen I start as a clone\nshow\nforever\n    set size to (50) %\nend\n\nwhen I start as a clone\nforever\n    set x to ((((Level X) - (Scroll x)) - (110)) + ((digits) * (15)))\n    set y to (160)\nend\n\nwhen I start as a clone\nforever\n    if <((((Level X) - (Scroll x)) - (110)) + ((digits) * (15))) = (x position)> then\n        if <(length of (Attempt)) < (digits)> then\n            hide\n        else\n            show\n            switch costume to (letter (digits) of (Attempt))\n        end\n    else\n        hide\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    go to [front v] layer\n    show\n    set [ghost v] effect to (100)\nend\n\n@Score2\n\nwhen flag clicked\nset [level x v] to [4285]\nset [digits v] to [1]\nrepeat (30)\n    create clone of (_myself_ v)\n    change [digits v] by (1)\nend\nhide\n\nwhen I start as a clone\nshow\nforever\n    set size to (40) %\nend\n\nwhen I start as a clone\nforever\n    set x to (((Level X) - (Scroll x)) + ((digits) * (15)))\n    set y to (115)\nend\n\nwhen I start as a clone\nforever\n    if <(((Level X) - (Scroll x)) + ((digits) * (15))) = (x position)> then\n        if <(length of (Attempt)) < (digits)> then\n            hide\n        else\n            show\n            switch costume to (letter (digits) of (Attempt))\n        end\n    else\n        hide\n    end\nend\n\n