Quartz - a scrolling platformer
@Stage\n\nwhen I receive [start v]\nswitch backdrop to (1 v)\nforever\n    play sound [Inferno v] until done\nend\n\nwhen flag clicked\nswitch backdrop to (2 v)\nbroadcast (start v)\n\n@Character\n\ndefine Go (direction) (speed)\nif <(ded) = [0]> then\n    point in direction (direction)\n    change x by (speed)\n    set [sthoppp v] to [0]\n    set [slope v] to [0]\n    repeat until <<(slope) = [8]> or <<not <touching color (#00d7df)?>> and <<not <touching color (#fff631)?>> and <not <touching color (#f7f7f7)?>>>>>\n        change y by (1)\n        change [slope v] by (1)\n        set [touched? v] to [1]\n    end\n    if <(slope) = [8]> then\n        change x by ((0) - (speed))\n        change y by ((0) - (slope))\n        if <(sthoppp) = [1]> then\n            set [xvel v] to [0]\n        end\n    end\n    if <(x position) < [-100]> then\n        if <[5] > (scroll x)> then\n            set [sthoppp v] to [1]\n            set [scroll xvel v] to [5]\n            change x by (5)\n        end\n    end\n    if <[100] < (x position)> then\n        set [sthoppp v] to [1]\n        set [scroll xvel v] to [-5]\n        change x by (-5)\n    end\nend\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\n\nwhen I receive [play v]\nset [brightness v] effect to (100)\ngo to x: (0) y: (0)\nset [yvel v] to [0]\nshow\nset [xvel v] to [0]\nforever\n    change [yvel v] by (-0.8)\n    change y by (yvel)\n    set [touched? v] to [0]\n    touch ground <(yvel) > [0]>\nend\n\nwhen I receive [play v]\nforever\n    if <<key (up arrow v) pressed?> and <(is it falling?) < [3]>> then\n        set [yvel v] to [10]\n    end\nend\n\nwhen I receive [play v]\nforever\n    set [xvel v] to [0]\n    set [ded v] to [0]\n    if <key (right arrow v) pressed?> then\n        Go [90] [5]\n        set [xvel v] to [5]\n    end\n    if <key (left arrow v) pressed?> then\n        Go [90] [-5]\n        set [xvel v] to [-5]\n    end\n    if <<<touching color (#f7f7f7)?> or <touching color (#fff631)?>> or <touching color (#00d7df)?>> then\n        set [xvel v] to ((xvel) * (-1))\n        change x by (xvel)\n        if <key (up arrow v) pressed?> then\n            set [yvel v] to [10]\n        end\n        set [touched? v] to [1]\n    end\nend\n\ndefine touch ground <up?>\nchange [is it falling? v] by (1)\nrepeat until <<not <touching color (#00d7df)?>> and <<not <touching color (#fff631)?>> and <not <touching color (#f7f7f7)?>>>>\n    if <up?> then\n        change y by (-1)\n        set [touched? v] to [1]\n    else\n        change y by (1)\n        set [is it falling? v] to [0]\n        set [touched? v] to [1]\n    end\n    set [yvel v] to [0]\n    set [touched? v] to [1]\n    if <touching color (#fff631)?> then\n        insert (scroll x) at (1) of [save scroll x v] \n        insert (x position) at (1) of [save x v] \n        insert (y position) at (1) of [save y v] \n    else\n        if <touching color (#00d7df)?> then\n            broadcast (finished v)\n        end\n    end\nend\n\nwhen I receive [play v]\ngo to x: (item (1) of [save x v]) y: (item (1) of [save y v])\nforever\n    change [scroll x v] by (scroll xvel)\n    set [scroll xvel v] to [0]\nend\n\nwhen I receive [play v]\nforever\n    if <[-178] > (y position)> then\n        start sound [crashed oof v]\n        hide\n        stop [other scripts in sprite v]\n        repeat until <(round (scroll x)) = (item (1) of [save scroll x v])>\n            set [brightness v] effect to (100)\n            set [scroll x v] to (item (1) of [save scroll x v])\n            stop [other scripts in sprite v]\n            set [ded v] to [1]\n        end\n        broadcast (restart v)\n    end\n    if <touching color (#ff8300)?> then\n        start sound [crashed oof v]\n        hide\n        stop [other scripts in sprite v]\n        repeat until <(round (scroll x)) = (item (1) of [save scroll x v])>\n            set [brightness v] effect to (100)\n            set [scroll x v] to (item (1) of [save scroll x v])\n            stop [other scripts in sprite v]\n            set [ded v] to [1]\n        end\n        broadcast (restart v)\n    end\n    if <touching (qwerty v)?> then\n        start sound [crashed oof v]\n        hide\n        stop [other scripts in sprite v]\n        repeat until <(round (scroll x)) = (item (1) of [save scroll x v])>\n            set [brightness v] effect to (100)\n            set [scroll x v] to (item (1) of [save scroll x v])\n            stop [other scripts in sprite v]\n            set [ded v] to [1]\n        end\n        broadcast (restart v)\n    end\nend\n\nwhen I receive [play v]\nset [brightness v] effect to (100)\ngo to x: (item (1) of [save x v]) y: (item (1) of [save y v])\nshow\nset [xvel v] to [0]\nset [yvel v] to [0]\nset size to (110) %\nrepeat (10)\n    change [brightness v] effect by (-10)\n    change size by (-1)\nend\n\nwhen I receive [play v]\nset size to (110) %\nset [brightness v] effect to (100)\n\nwhen I receive [start v]\nbroadcast (play v)\n\nwhen I receive [restart v]\nbroadcast (play v)\n\nwhen I receive [play v]\nforever\n    if <<[1] > (yvel)> and <(yvel) > [-1]>> then\n        if <(touched?) = [1]> then\n            set volume to (100) %\n            start sound [Quartz hit v]\n            wait until <not <<[1] > (yvel)> and <(yvel) > [-1]>>>\n        end\n    end\nend\n\nwhen I receive [play v]\nforever\n    if <<key (up arrow v) pressed?> and <(is it falling?) < [3]>> then\n        set volume to (100) %\n        start sound [Quartz hit v]\n        wait until <not <<key (up arrow v) pressed?> and <(is it falling?) < [3]>>>\n    end\nend\n\nwhen flag clicked\ndelete all of [save scroll x v]\ndelete all of [save x v]\ndelete all of [save y v]\ninsert [0] at (1) of [save scroll x v] \ninsert [0] at (1) of [save x v] \ninsert [0] at (1) of [save y v] \n\nwhen I receive [play v]\nforever\n    if <touching color (#9f69fe)?> then\n        set [yvel v] to [15]\n        start sound [sliem v]\n    end\nend\n\nwhen I receive [finished v]\nset [best one v] to (join [BEST SCORE:] (☁ best score))\nif <not <(score) = [0]>> then\n    stop [this script v]\nend\nif <(score) = [0]> then\n    set [score v] to (join [YOUR SCORE:] (round (timer)))\n    if <(☁ best score) > (round (timer))> then\n        set [☁ best score v] to (round (timer))\n        broadcast (new record v)\n    end\nend\n\nwhen flag clicked\nset [score v] to [0]\n\nwhen I receive [start v]\nreset timer\n\nwhen I receive [play v]\nforever\n    add (y position) to [movements v]\n    add (x position) to [movements2 v]\n    add (scroll x) to [movements3 v]\nend\n\nwhen flag clicked\ndelete all of [movements v]\ndelete all of [movements2 v]\ndelete all of [movements3 v]\n\nwhen I receive [new record v]\ndelete all of [saved1 v]\ndelete all of [saved2 v]\ndelete all of [saved3 v]\nsave (length of [movements v])\n\ndefine save (#)\nrepeat ((#) / (64))\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\n    add (item (saved # times) of [movements v]) to [saved1 v]\n    add (item (saved # times) of [movements2 v]) to [saved2 v]\n    add (item (saved # times) of [movements3 v]) to [saved3 v]\n    change [saved # times v] by (1)\nend\n\nwhen I receive [start v]\nset [saved # times v] to [1]\n\n@level\n\nwhen flag clicked\nhide\ngo to [back v] layer\n\nwhen I receive [start v]\nset [scroll x v] to [0]\nswitch costume to (level1 v)\nrepeat (15)\n    create clone of (_myself_ v)\n    next costume\nend\n\nwhen I start as a clone\nshow\nforever\n    go to x: ((scroll x) + (((costume [number v]) * (480)) - (480))) y: (0)\nend\n\n@Borders\n\nwhen flag clicked\nhide\nset size to (100) %\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nshow\n\n@qwerty\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nhide\nswitch costume to (1 v)\ncreate a sawblade in [0] [0]\nnext costume\ncreate a sawblade in [0] [0]\nnext costume\ncreate a sawblade in [0] [0]\nnext costume\ncreate a sawblade in [0] [0]\nnext costume\n\ndefine create a sawblade in (x) (y)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nforever\n    show\n    if <(costume [number v]) = [1]> then\n        go to x: ((scroll x) + (3950)) y: (-48)\n        turn right (5) degrees\n        go to [back v] layer\n    end\n    if <(costume [number v]) = [2]> then\n        go to x: ((scroll x) + (4550)) y: (70)\n        turn right (5) degrees\n        go to [back v] layer\n    end\n    if <(costume [number v]) = [3]> then\n        go to x: ((scroll x) + (4880)) y: (-105)\n        turn right (5) degrees\n        go to [back v] layer\n    end\n    if <(costume [number v]) = [4]> then\n        go to x: ((scroll x) + (5475)) y: (-105)\n        turn right (5) degrees\n        go to [back v] layer\n    end\nend\n\n@Visuals\n\ndefine Write (text)\nset [değişkenim v] to [1]\nrepeat (length of (text))\n    switch costume to (letter (değişkenim) of (text))\n    create clone of (_myself_ v)\n    change [değişkenim v] by (1)\n    change x by (12)\n    if <(x position) > [219]> then\n        change y by (-20)\n        set x to (-220)\n    end\nend\nhide\n\nwhen I start as a clone\nset size to (100) %\nshow\nwait (0) seconds\ndelete this clone\n\nwhen I receive [finished v]\nshow\nforever\n    set size to (100) %\n    go to x: (-200) y: (150)\n    set [brightness v] effect to (-100)\n    Write (score)\n    go to x: (-200) y: (120)\n    set [brightness v] effect to (-100)\n    Write (best one)\n    go to x: (-200) y: (90)\n    set [brightness v] effect to (-100)\n    Write [PLAY AGAIN AND BEAT THE HIGH SCORE!]\nend\n\n@.\n\nwhen flag clicked\nshow\ngo to [front v] layer\nset [ghost v] effect to (100)\n\n@i\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\nset [move v] to [1]\nforever\n    go to x: (((item (move) of [saved2 v]) + ((item (move) of [saved3 v]) * (-1))) + (scroll x)) y: (item (move) of [saved1 v])\n    change [move v] by (1)\nend\n\n
Quartz, a scrolling platformer\n-Arrow keys to move.\n-Yellow: checkpoint\n-Avoid Lava.\n-Avoid the saw blades.\n-Purple will make you jump.