My Lab (Scrolling Platformer) Mobile Friendly  #games
@Stage\n\nwhen flag clicked\nbroadcast (Start v)\n\nwhen I receive [start v]\nswitch backdrop to (backdrop v)\nset [timer v] to [0]\nforever\n    change [timer v] by (1)\n    if <(timer) > [50]> then\n        set [timer v] to [0]\n    end\nend\n\nwhen [m v] key pressed\nset [mouse v] to (join ((mouse x) + (Scroll x)) (join [,] ((mouse y) + (Scroll y))))\n\nwhen I receive [start v]\nwait (0.5) seconds\nset volume to (50) %\nforever\n    play sound [TheFatRat - Unity \(Instrumental\) v] until done\nend\n\nwhen I receive [start v]\nforever\n    if <(Music) = [0]> then\n        set volume to (50) %\n    else\n        set volume to (0) %\n    end\nend\n\nwhen I receive [start v]\nset [timer v] to [0]\nwait (0.5) seconds\nforever\n    if <(Shop) = [No]> then\n        wait (1) seconds\n        change [timer v] by (1)\n    end\nend\n\nwhen I receive [win v]\nstop [other scripts in sprite v]\n\n@Blank2\n\n@Blank\n\n@Player\n\nwhen I receive [start v]\nset [checkpoint x v] to [-199]\nset [checkpoint y v] to [-118]\nset [speed x v] to [1.5]\nset [speed y v] to [16]\nset [flash v] to [no]\nset size to (50) %\nbroadcast (Green Flag v) and wait\nbroadcast (Play Game v) and wait\n\ndefine Game On\nset [sx v] to [0]\nset [x v] to (Checkpoint x)\nset [y v] to (Checkpoint y)\nset [sy v] to [0]\nset [in air v] to [0]\nset [finish v] to []\nset [scroll x v] to [0]\nset [scroll y v] to [0]\npoint in direction (90)\nshow\n\ndefine Tick\nswitch costume to (hitbox v)\nif <(Shop) = [No]> then\n    if <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<(mouse x) < (x position)> and <mouse down?>>> then\n        point in direction (-90)\n        change [sx v] by ((Speed x) * (-1))\n    end\n    if <<<key (d v) pressed?> or <key (right arrow v) pressed?>> or <<(mouse x) > (x position)> and <mouse down?>>> then\n        point in direction (90)\n        change [sx v] by (Speed x)\n    end\nend\nif <(Shop) = [No]> then\n    set [sx v] to ((sx) * (0.8))\n    if <([abs v] of (sx) ) > [0.9]> then\n        Change Player x by (round (sx))\n    end\nend\nif <(Shop) = [No]> then\n    if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<(mouse y) > (y position)> and <mouse down?>>> then\n        if <(in air) < [4]> then\n            set [sy v] to (Speed y)\n        end\n    end\nend\nif <(Shop) = [No]> then\n    if <(sy) > [-20]> then\n        change [sy v] by (-2)\n    end\n    Change Player y by (sy)\n    Die\n    set [scroll x v] to (x)\n    change [scroll x v] by (round (((x) - (Scroll x)) / (10)))\n    if <(Scroll x) > [7290]> then\n        set [scroll x v] to [7295]\n    end\n    if <(Scroll x) < [0]> then\n        set [scroll x v] to [0]\n    end\n    change [scroll y v] by (round (((y) - (Scroll y)) / (10)))\n    if <(Scroll y) < [0]> then\n        set [scroll y v] to [0]\n    end\n    Position\nend\nswitch costume to (2 v)\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\nwhen I receive [play game v]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    Game On\n    repeat until <(Finish) > []>\n        Tick\n        Position\n        broadcast (Tick v)\n    end\n    if <(Finish) = [Yes]> then\n        Game Con\n    else\n        Game End\n    end\nend\n\ndefine Change Player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (platform v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\ndefine Position\ngo to x: ((x) - (Scroll x)) y: ((y) - (Scroll y))\n\ndefine Change Player x by (sx)\nchange [x v] by (sx)\nPosition\nif <touching (platform v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (platform v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<(mouse y) > (y position)> and <mouse down?>>> then\n        if <(sx) > [0]> then\n            set [sx v] to [-15]\n        else\n            set [sx v] to [15]\n        end\n        set [in air v] to [0]\n    else\n        set [sx v] to [0]\n    end\n    repeat until <not <touching (platform v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Game End\nif <(Sounds) = [0]> then\n    start sound [die v]\nend\nrepeat (2)\n    hide\n    wait (0.05) seconds\n    show\n    wait (0.05) seconds\nend\nhide\nif <(Coins) > [9]> then\n    create clone of (_myself_ v)\nend\n\ndefine Die\nif <<touching (danger v)?> or <touching (spikes v)?>> then\n    set [finish v] to [Die]\nend\n\ndefine Game Con\nbroadcast (Win v)\n\nwhen I receive [bounce v]\nif <touching (enemy v)?> then\n    set [sy v] to [18]\nend\n\nwhen I receive [bounce v]\nif <touching (trampoline v)?> then\n    set [sy v] to [30]\nend\n\nwhen I receive [start v]\nforever\n    if <(Sounds) = [0]> then\n        set volume to (50) %\n    else\n        set volume to (0) %\n    end\nend\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I start as a clone\nshow\npoint in direction (90)\nswitch costume to (3 v)\ngo to x: (-169) y: (122)\nchange [coins v] by (-10)\nglide (1) secs to x: (-169) y: (180)\ndelete this clone\n\nwhen I start as a clone\nset [ghost v] effect to (0)\nrepeat (5)\n    change [ghost v] effect by (12)\nend\n\n@Platform\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    if <(Sounds) = [0]> then\n        set volume to (50) %\n    else\n        set volume to (0) %\n    end\nend\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [tick v]\nPosition ((x) - (Scroll x)) ((y) - (Scroll y))\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nnext costume\nchange [x v] by (x)\nchange [y v] by (y)\n\nwhen I receive [setup v]\nhide\nswitch costume to (1 v)\nset [x v] to [0]\nset [y v] to [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [800] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [250]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [-360]\nClone at x: [360] y: [-60]\nClone at x: [400] y: [250]\n\nwhen I receive [reset v]\ndelete this clone\n\n@Enemy\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\ndefine Clone at x: (x) y: (y) Change: (change) Side: (side)\nset [change v] to (change)\nset [x v] to (x)\nset [y v] to (y)\nset [side v] to (side)\nswitch costume to (1 v)\ncreate clone of (_myself_ v)\n\nwhen I receive [tick v]\nPosition (((x) - (Scroll x)) + (offset)) ((y) - (Scroll y))\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<([abs v] of (x position) ) < [250]> and <([abs v] of (y position) ) < [190]>> then\n    show\nelse\n    hide\nend\nif <(Shop) = [No]> then\n    if <(die) = [0]> then\n        if <(timer) > [25]> then\n            set [offset v] to ((((((100) - ((timer) * (side))) * ((change) / (50))) - (offset)) / (7)) + (offset))\n        end\n        if <(timer) < [26]> then\n            set [offset v] to ((offset) + (((((timer) * (side)) * ((change) / (50))) - (offset)) / (7)))\n        end\n    end\nend\n\nwhen I start as a clone\ngo to [front v] layer\ngo [backward v] (2) layers\nset size to (50) %\nset rotation style [left-right v]\nwait (1) seconds\nforever\n    if <touching (player v)?> then\n        if <<([y position v] of [player v]) > (y position)> and <([sy v] of [player v]) < [-1]>> then\n            set [die v] to [2]\n            broadcast (Bounce v)\n            if <(Shop) = [0]> then\n                start sound [Death v]\n            end\n            stop [other scripts in sprite v]\n            broadcast (Bounce v)\n            repeat (5)\n                broadcast (Bounce v)\n                change [ghost v] effect by (20)\n            end\n            switch costume to (2 v)\n            set [ghost v] effect to (0)\n            repeat (8)\n                change [y v] by (4)\n                change [ghost v] effect by (5)\n            end\n            switch costume to (2 v)\n            set [xy v] to (join (round (((x) + (offset)) + (5000))) (round ((y) + (5000))))\n            broadcast (Bounce v)\n            change [coins v] by (4)\n            delete this clone\n        else\n            set [finish v] to [Die]\n        end\n    end\nend\n\nwhen I receive [reset v]\nrepeat (1)\n    delete this clone\nend\nClone at x: [360] y: [-120] Change: [150] Side: [1.5]\nClone at x: [175] y: [-120] Change: [220] Side: [2]\nClone at x: [600] y: [-73] Change: [220] Side: [2]\nClone at x: [1613] y: [90] Change: [220] Side: [2]\nClone at x: [1765] y: [90] Change: [200] Side: [2.5]\nClone at x: [2131] y: [90] Change: [200] Side: [2]\nClone at x: [2260] y: [90] Change: [220] Side: [2.5]\nClone at x: [3254] y: [-119] Change: [220] Side: [2.5]\nClone at x: [5752] y: [240] Change: [220] Side: [2.5]\nClone at x: [6154] y: [128] Change: [200] Side: [2.5]\nClone at x: [6346] y: [128] Change: [220] Side: [2]\nClone at x: [7199] y: [-34] Change: [220] Side: [2]\nset [x v] to [-99999]\n\nwhen I receive [start v]\nset [die v] to [0]\nforever\n    if <(Sounds) = [0]> then\n        set volume to (50) %\n    else\n        set volume to (0) %\n    end\nend\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@Danger\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    if <(Sounds) = [0]> then\n        set volume to (50) %\n    else\n        set volume to (0) %\n    end\nend\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [tick v]\nPosition ((x) - (Scroll x)) ((y) - (Scroll y))\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [800] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [250]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [-360]\nClone at x: [360] y: [-60]\nClone at x: [400] y: [250]\n\nwhen I receive [reset v]\ndelete this clone\n\n@Collectables\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (Scroll x)) ((y) - (Scroll y))\nif <(Shop) = [No]> then\n    if <<touching (player v)?> and <(costume [number v]) = [2]>> then\n        if <(Sounds) = [0]> then\n            start sound [coin v]\n        end\n        change [coins v] by (1)\n        delete this clone\n    end\n    if <<touching (player v)?> and <(costume [number v]) = [1]>> then\n        if <(Sounds) = [0]> then\n            start sound [coin v]\n        end\n        change [coins v] by (10)\n        delete this clone\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at x: (x) y: (y) Type: (1/2)\nset [x v] to (x)\nset [y v] to (y)\nswitch costume to (1/2)\ncreate clone of (_myself_ v)\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nClone at x: [130] y: [58] Type: [2]\nClone at x: [65] y: [23] Type: [2]\nClone at x: [65] y: [57] Type: [2]\nClone at x: [195] y: [23] Type: [2]\nClone at x: [195] y: [57] Type: [2]\nClone at x: [907] y: [27] Type: [2]\nClone at x: [907] y: [58] Type: [2]\nClone at x: [1000] y: [87] Type: [2]\nClone at x: [1000] y: [118] Type: [2]\nClone at x: [1093] y: [160] Type: [2]\nClone at x: [1093] y: [132] Type: [2]\nClone at x: [2184] y: [283] Type: [2]\nClone at x: [2118] y: [283] Type: [2]\nClone at x: [2340] y: [283] Type: [2]\nClone at x: [2044] y: [283] Type: [2]\nClone at x: [2256] y: [283] Type: [2]\nClone at x: [2413] y: [283] Type: [2]\nClone at x: [2490] y: [283] Type: [2]\nClone at x: [2343] y: [155] Type: [1]\nClone at x: [2648] y: [-18] Type: [2]\nClone at x: [2648] y: [22] Type: [2]\nClone at x: [2648] y: [64] Type: [2]\nClone at x: [2843] y: [-114] Type: [2]\nClone at x: [2785] y: [-114] Type: [2]\nClone at x: [3010] y: [-114] Type: [2]\nClone at x: [2938] y: [-114] Type: [2]\nClone at x: [3966] y: [150] Type: [2]\nClone at x: [3966] y: [118] Type: [2]\nClone at x: [4123] y: [150] Type: [2]\nClone at x: [4123] y: [118] Type: [2]\nClone at x: [4272] y: [150] Type: [2]\nClone at x: [4272] y: [118] Type: [2]\nClone at x: [4782] y: [115] Type: [2]\nClone at x: [4782] y: [157] Type: [2]\nClone at x: [4919] y: [115] Type: [2]\nClone at x: [4919] y: [157] Type: [2]\nClone at x: [6572] y: [-12] Type: [1]\nClone at x: [7261] y: [166] Type: [1]\nset [x v] to [-99999]\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nset [coins v] to [0]\nhide\n\nwhen I start as a clone\nset [sine v] to [0]\nforever\n    if <(Shop) = [No]> then\n        change [sine v] by (7.5)\n        set size to ((([sin v] of ((sine) * (2)) ) * (5)) + (50)) %\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(Sounds) = [0]> then\n        set volume to (50) %\n    else\n        set volume to (0) %\n    end\nend\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@Deco\n\nwhen flag clicked\nhide\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [tick v]\nPosition ((x) - (Scroll x)) ((y) - (Scroll y))\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [800] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [250]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [-360]\nClone at x: [360] y: [-60]\nClone at x: [400] y: [250]\n\nwhen I receive [reset v]\ndelete this clone\n\n@Trampoline\n\nwhen flag clicked\nhide\n\nwhen I receive [tick v]\nposition ((x) - (Scroll x)) ((y) - (Scroll y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nClone at x: [2008] y: [112]\nClone at x: [3456] y: [-98]\nClone at x: [5147] y: [132]\nset [x v] to [-99999]\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I start as a clone\nshow\nforever\n    if <touching (player v)?> then\n        if <([sy v] of [player v]) < [0]> then\n            broadcast (bounce v)\n            if <(Sounds) = [0]> then\n                start sound [Big Boing v]\n            end\n            switch costume to (1 v)\n            broadcast (bounce v)\n            repeat (6)\n                broadcast (bounce v)\n                next costume\n            end\n            broadcast (bounce v)\n            if <(costume [number v]) > [7]> then\n                broadcast (bounce v)\n                switch costume to (1 v)\n            end\n        end\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Sounds) = [0]> then\n        set volume to (50) %\n    else\n        set volume to (0) %\n    end\nend\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@Coin\n\nwhen flag clicked\nshow\nswitch costume to (coin1 v)\nforever\n    next costume\n    wait (0.05) seconds\nend\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@Checkpoint\n\nwhen I receive [tick v]\nposition ((x) - (Scroll x)) ((y) - (Scroll y))\nif <touching (player v)?> then\n    if <(checkpoint#) = [1]> then\n        set y to (-95)\n        if <not <(costume [number v]) = [2]>> then\n            if <(Sounds) = [0]> then\n                start sound [Checkpoint v]\n                broadcast (Checkpoint v)\n            end\n        end\n        switch costume to (2 v)\n        set [checkpoint x v] to [1502]\n        set [checkpoint y v] to [-125]\n    end\n    if <(checkpoint#) = [2]> then\n        if <not <(costume [number v]) = [2]>> then\n            if <(Sounds) = [0]> then\n                start sound [Checkpoint v]\n                broadcast (Checkpoint v)\n            end\n        end\n        switch costume to (2 v)\n        set [checkpoint x v] to [4607]\n        set [checkpoint y v] to [109]\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\ngo to [back v] layer\ncreate clone of (_myself_ v)\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nset [checkpoint# v] to [1]\nClone at x: [1500] y: [-95]\nset [checkpoint# v] to [2]\nClone at x: [4606] y: [140]\nset [x v] to [-99999]\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nswitch costume to (1 v)\n\nwhen I receive [start v]\nforever\n    if <(Sounds) = [0]> then\n        set volume to (50) %\n    else\n        set volume to (0) %\n    end\nend\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@Spikes\n\nwhen I receive [green flag v]\nhide\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\nif <(Shop) = [No]> then\n    turn right (10) degrees\nend\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\ngo to [back v] layer\ncreate clone of (_myself_ v)\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nClone at x: [2585] y: [-50]\nClone at x: [2712] y: [-50]\nClone at x: [2899] y: [-138]\nClone at x: [4722] y: [90]\nClone at x: [4852] y: [90]\nClone at x: [4985] y: [90]\nClone at x: [5194] y: [202]\nClone at x: [5194] y: [290]\nClone at x: [6007] y: [227]\nClone at x: [6336] y: [110]\nClone at x: [3590] y: [95]\nClone at x: [3762] y: [95]\nClone at x: [4500] y: [90]\nset [x v] to [-99999]\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [tick v]\nPosition ((x) - (Scroll x)) ((y) - (Scroll y))\n\nwhen I receive [start v]\nforever\n    if <(Sounds) = [0]> then\n        set volume to (50) %\n    else\n        set volume to (0) %\n    end\nend\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@Numbers\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 flag clicked\nforever\n    set size to (0) %\nend\n\nwhen I receive [time v]\nset [digits v] to [1]\nrepeat (30)\n    create clone of (_myself_ v)\n    change [digits v] by (1)\nend\nhide\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\ngo to [front v] layer\nforever\n    set size to (45) %\n    go to x: (((digits) * (16)) - (225)) y: (146)\n    if <(length of (Coins)) < (digits)> then\n        hide\n    else\n        show\n        switch costume to (letter (digits) of (Coins))\n    end\nend\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [win v]\n\n@Finish\n\nwhen I receive [tick v]\nposition ((x) - (Scroll x)) ((y) - (Scroll y))\nif <touching (player v)?> then\n    set [finish v] to [Yes]\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\ngo to [back v] layer\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nClone at x: [7468] y: [-6]\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nswitch costume to (1 v)\n\nwhen I receive [start v]\nforever\n    if <(Sounds) = [0]> then\n        set volume to (50) %\n    else\n        set volume to (0) %\n    end\nend\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@Buttons\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nwait (0.5) seconds\nswitch costume to (shop v)\nset [shop v] to [No]\nshow\nforever\n    go to x: (-198) y: (-162)\n    if <touching (mouse-pointer v)?> then\n        repeat until <(size) > [95]>\n            change size by (2)\n        end\n        if <mouse down?> then\n            if <(Shop) = [No]> then\n                set [shop v] to [Yes]\n                broadcast (Shop v)\n                create clone of (_myself_ v)\n            end\n            wait until <not <mouse down?>>\n        end\n    else\n        repeat until <(size) < [92]>\n            change size by (-2)\n        end\n    end\nend\n\nwhen I receive [start v]\ngo to [front v] layer\n\nwhen I start as a clone\nforever\n    go to [front v] layer\nend\n\nwhen I start as a clone\nswitch costume to (close v)\nshow\nforever\n    go to x: (111) y: (98)\n    if <touching (mouse-pointer v)?> then\n        repeat until <(size) > [95]>\n            change size by (2)\n        end\n        if <mouse down?> then\n            if <(Shop) = [Yes]> then\n                set [shop v] to [No]\n                broadcast (No Shop v)\n                delete this clone\n            end\n            wait until <not <mouse down?>>\n        end\n    else\n        repeat until <(size) < [92]>\n            change size by (-2)\n        end\n    end\nend\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@Shop\n\nwhen flag clicked\nhide\nforever\n    go to x: (0) y: (0)\n    switch costume to (1 v)\n    go to [front v] layer\nend\n\nwhen I receive [shop v]\nshow\nset [clone# v] to [1]\ncreate clone of (_myself_ v)\nset [clone# v] to [2]\ncreate clone of (_myself_ v)\n\nwhen I receive [no shop v]\nhide\n\nwhen I start as a clone\nforever\n    go to [front v] layer\n    if <(clone#) = [1]> then\n        go to x: (90) y: (-5)\n        if <(Speed x) = [2]> then\n            switch costume to (bougth v)\n        else\n            switch costume to (buy v)\n        end\n    end\n    if <(clone#) = [2]> then\n        go to x: (90) y: (-85)\n        if <(Speed y) = [18]> then\n            switch costume to (bougth v)\n        else\n            switch costume to (buy v)\n        end\n    end\nend\n\nwhen I start as a clone\nset size to (90) %\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        repeat until <(size) > [95]>\n            change size by (2)\n        end\n        if <mouse down?> then\n            if <<(clone#) = [1]> and <(costume [number v]) = [2]>> then\n                if <<(Coins) = [40]> or <(Coins) > [40]>> then\n                    set [speed x v] to [2]\n                    change [coins v] by (-40)\n                    switch costume to (bougth v)\n                end\n            end\n            if <<(clone#) = [2]> and <(costume [number v]) = [2]>> then\n                if <<(Coins) = [50]> or <(Coins) > [50]>> then\n                    change [coins v] by (-50)\n                    set [speed y v] to [18]\n                    switch costume to (bougth v)\n                end\n            end\n            wait until <not <mouse down?>>\n        end\n    else\n        repeat until <(size) < [92]>\n            change size by (-2)\n        end\n    end\nend\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@Screen\n\nwhen I receive [win v]\nshow\ngo to [front v] layer\nforever\n    go to x: (0) y: (0)\nend\n\nwhen flag clicked\nhide\n\n@Timer\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\ngo to [front v] layer\nforever\n    set size to (50) %\n    go to x: (((digits) * (20)) - (20)) y: (-140)\n    if <(length of (Timer)) < (digits)> then\n        hide\n    else\n        show\n        switch costume to (letter (digits) of (Timer))\n    end\nend\n\nwhen I receive [start v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [win v]\nset [digits v] to [1]\nrepeat (30)\n    create clone of (_myself_ v)\n    change [digits v] by (1)\nend\nhide\n\n@Thumbnail\n\nwhen [timer v] > (0.05)\nset [ghost v] effect to (100)\nshow\ngo to [front v] layer\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\nend\n\nwhen flag clicked\nshow\ngo to x: (00) y: (0)\ngo to [front v] layer\nhide\n\nwhen flag clicked\nforever\n    reset timer\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@Sounds\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nwait (0.5) seconds\nset [sounds v] to [0]\nset [music v] to [0]\ncreate clone of (_myself_ v)\nshow\nforever\n    if <(Music) = [0]> then\n        switch costume to (music v)\n    else\n        switch costume to (mute v)\n    end\nend\n\nwhen I start as a clone\nshow\nforever\n    if <(Sounds) = [0]> then\n        switch costume to (sounds on v)\n    else\n        switch costume to (sounds off v)\n    end\nend\n\nwhen I start as a clone\nshow\nforever\n    go to x: (208) y: (161)\n    if <(Shop) = [No]> then\n        if <touching (mouse-pointer v)?> then\n            repeat until <(size) > [95]>\n                change size by (2)\n            end\n            if <mouse down?> then\n                if <(Sounds) = [0]> then\n                    set [sounds v] to [2]\n                    wait until <not <mouse down?>>\n                else\n                    if <(Sounds) = [2]> then\n                        set [sounds v] to [0]\n                        wait until <not <mouse down?>>\n                    end\n                end\n            end\n        else\n            repeat until <(size) < [92]>\n                change size by (-2)\n            end\n        end\n    end\nend\n\nwhen I receive [start v]\nshow\nforever\n    go to x: (172) y: (161)\n    if <(Shop) = [No]> then\n        if <touching (mouse-pointer v)?> then\n            repeat until <(size) > [95]>\n                change size by (2)\n            end\n            if <mouse down?> then\n                if <(Music) = [0]> then\n                    set [music v] to [2]\n                    wait until <not <mouse down?>>\n                else\n                    if <(Music) = [2]> then\n                        set [music v] to [0]\n                        wait until <not <mouse down?>>\n                    end\n                end\n            end\n        else\n            repeat until <(size) < [92]>\n                change size by (-2)\n            end\n        end\n    end\nend\n\n
                          ⭐Instructions⭐\n*Use The W,A,S,D or Arrow Keys To Move.\n*Jump Onto Kill Enemies.\n*Part 2: https://scratch.mit.edu/projects/443520276/\n *The Rest Are In The Game\n *My Time 91s \n Top Loved 8/26/20