Scrolling Platformer
@Stage\n\nwhen I receive [start v]\nset volume to (70) %\nforever\n    play sound (pick random (1) to (6)) until done\nend\n\nwhen I receive [\( start \) intro v]\nforever\n    if <<key (q v) pressed?> and <key (r v) pressed?>> then\n        set [exit v] to [die]\n        wait until <<not <key (q v) pressed?>> and <not <key (r v) pressed?>>>\n    end\nend\n\nwhen I receive [\( start \) intro v]\nforever\n    if <<key (q v) pressed?> and <key (s v) pressed?>> then\n        set [exit v] to [skip]\n        wait until <<not <key (q v) pressed?>> and <not <key (s v) pressed?>>>\n    end\nend\n\nwhen I receive [\( start \) intro v]\nforever\n    if <(EASY / CHALLENGE) = [1]> then\n        broadcast (EASY v)\n        wait until <not <(EASY / CHALLENGE) = [1]>>\n    else\n        if <(EASY / CHALLENGE) = [2]> then\n            broadcast (HARD v)\n            wait until <not <(EASY / CHALLENGE) = [2]>>\n        end\n    end\nend\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [start v]\nforever\n    if <key (m v) pressed?> then\n        if <(volume) = [70]> then\n            set volume to (0) %\n        else\n            set volume to (70) %\n        end\n        wait until <not <key (m v) pressed?>>\n    end\nend\n\n@Blank\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\n@Player\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\nwhen I receive [play game v]\nset [level v] to [0]\nforever\n    set [is key pressed? v] to [0]\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    broadcast (Coin!!! v) and wait\n    broadcast (Tick v)\n    Game on\n    repeat until <(EXIT) > []>\n        Tick\n        broadcast (Tick v)\n        if <<<touching (coins v)?> and <(item ((LEVEL) + (1)) of [coin v]) = [0]>> or <<touching (coins2 v)?> and <(item ((LEVEL) + (1)) of [coin2 v]) = [0]>>> then\n            broadcast (Coin!!! v) and wait\n        end\n    end\n    if <(EXIT) = [win]> then\n        Game - Win\n    else\n        if <(EXIT) = [skip]> then\n            Game - Win\n            change [skip v] by (1)\n        else\n            Game - Die\n        end\n    end\nend\n\ndefine Game on\nset [x v] to [0]\nset [y v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [sx v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset [friction x v] to [0.8]\nset [friction y v] to [1]\nset [is key pressed? v] to [0]\nset [is touching trampolines v] to [0]\nset [ghost v] effect to (0)\nset size to (100) %\nshow\n\ndefine Tick\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    change [sx v] by (-2)\nend\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>> then\n    change [sx v] by (2)\nend\nset [sx v] to ((sx) * (FRICTION X))\nif <([abs v] of (sx) ) > [0.9]> then\n    Change player x by (round (sx))\nend\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>> then\n    if <(in air) < [4]> then\n        set [sy v] to [16]\n    end\nend\nif <(sy) > [-18]> then\n    change [sy v] by (-2)\nend\nset [sy v] to ((sy) * (FRICTION Y))\nChange player y by (sy)\nDie\nTrampolines\nset [scroll x v] to (x)\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\nchange [scroll x v] by (round (((x) - (SCROLL X)) / (10)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nif <touching (water v)?> then\n    set [friction x v] to [0.5]\n    set [friction y v] to [0.5]\n    set [in air v] to [0]\nelse\n    set [friction x v] to [0.8]\n    set [friction y v] to [1]\nend\nPosition\nif <(y) < [-180]> then\n    set [exit v] to [die]\nend\n\ndefine Change player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (platforms 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 (platforms v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (platforms v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    if <not <(LEVEL) = [5]>> then\n        if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>> and <<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <(x position) < (mouse x)>> or <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <(mouse x) < (x position)>>>> then\n            if <(sx) > [0]> then\n                set [sx v] to [-16]\n            else\n                set [sx v] to [16]\n            end\n            set [in air v] to [0]\n        else\n            set [sx v] to [0]\n        end\n    end\n    repeat until <not <touching (platforms 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 - Die\nstart sound [Die v]\nset [test v] to [STOP TIME]\nset [is key pressed? v] to [0]\nset [exit v] to []\nrepeat (5)\n    hide\n    wait (0.1) seconds\n    show\n    wait (0.1) seconds\nend\nhide\nwait (0.5) seconds\nbroadcast (TIME START v)\nset [test v] to [0]\n\ndefine Die\nif <touching (danger v)?> then\n    set [exit v] to [die]\nend\n\ndefine Game - Win\nrepeat (50)\n    point towards (exit v)\n    turn right (65) degrees\n    move ((distance to [exit v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nchange [level v] by (1)\nwait (1) seconds\n\nwhen I receive [ready clicked v]\nbroadcast (Green Flag v) and wait\nbroadcast (Play Game v) and wait\n\nwhen I receive [hide all sprites v]\nhide\n\ndefine Trampolines\nif <touching (trampolines v)?> then\n    if <not <(IS TOUCHING TRAMPOLINES) = [1]>> then\n        set [is touching trampolines v] to [1]\n        set [sy v] to [40]\n        set [is touching trampolines v] to [0]\n        stop [this script v]\n    end\nend\n\nwhen I receive [tick v]\nset size to (100) %\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [ready clicked v]\nset [collected max v] to [0]\n\nwhen I receive [setup v]\nPosition\nset [collected max v] to [0]\n\nwhen I receive [\( start \) intro v]\nbroadcast (START v)\n\nwhen I receive [setup v]\nPosition\n\nwhen I receive [tick v]\nif <<(MIN) = [0]> and <(SEC) < [1]>> then\n    set [exit v] to [die]\nend\n\ndefine Set (test)\n\nwhen flag clicked\nforever\n    if <(LEVEL) = [5]> then\n        set [x v] to [0]\n        set [y v] to [0]\n        set [scroll x v] to [0]\n        set [scroll y v] to [0]\n        set [sx v] to [0]\n        set [sy v] to [0]\n        set [in air v] to [0]\n        set [exit v] to []\n        set [friction x v] to [0.8]\n        set [friction y v] to [1]\n        set [is key pressed? v] to [0]\n        set [is touching trampolines v] to [0]\n        Tick\n        broadcast (Tick v) and wait\n        stop [this script v]\n    end\nend\n\nwhen I receive [coin!!! v]\nwait (0) seconds\nif <not <(TEST) = [0]>> then\n    repeat until <(TEST) = [1000]>\n        broadcast (Tick v)\n    end\nend\n\n@Platforms\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [0]> then\n    switch costume to (level 0 1 v)\n    Clone at x: [0] y: [350]\n    Clone at x: [0] y: [350]\n    Clone at x: [0] y: [350]\n    Clone at x: [430] y: [380]\nelse\n    if <(LEVEL) = [1]> then\n        switch costume to (level 1 1 v)\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n    else\n        if <(LEVEL) = [2]> then\n            switch costume to (level 2 1 v)\n            Clone at x: [0] y: [350]\n            Clone at x: [450] y: [350]\n        else\n            if <(LEVEL) = [3]> then\n                switch costume to (level 3 1 v)\n                Clone at x: [360] y: [0]\n                Clone at x: [480] y: [0]\n                Clone at x: [450] y: [350]\n            else\n                if <(LEVEL) = [4]> then\n                    switch costume to (level 4 1 v)\n                    Clone at x: [500] y: [0]\n                    Clone at x: [360] y: [180]\n                    Clone at x: [-360] y: [45]\n                    Clone at x: [0] y: [160]\n                else\n                    switch costume to (level 5 6 v)\n                    Clone at x: [0] y: [350]\n                end\n            end\n        end\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)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [hide all sprites v]\nhide\n\n@Danger\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [0]> then\n    switch costume to (level 0 1 v)\n    Clone at x: [0] y: [350]\n    Clone at x: [0] y: [350]\n    Clone at x: [0] y: [350]\n    Clone at x: [0] y: [350]\n    Clone at x: [360] y: [0]\nelse\n    if <(LEVEL) = [1]> then\n        switch costume to (level 1 1 v)\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n    else\n        if <(LEVEL) = [2]> then\n            switch costume to (level 2 1 v)\n            Clone at x: [0] y: [350]\n            Clone at x: [450] y: [350]\n        else\n            if <(LEVEL) = [3]> then\n                switch costume to (level 3 1 v)\n                Clone at x: [360] y: [0]\n                Clone at x: [480] y: [0]\n                Clone at x: [450] y: [350]\n            else\n                if <(LEVEL) = [4]> then\n                    switch costume to (level 4 1 v)\n                    Clone at x: [500] y: [0]\n                    Clone at x: [360] y: [180]\n                    Clone at x: [-360] y: [45]\n                    Clone at x: [0] y: [160]\n                else\n                    switch costume to (level 5 1 v)\n                    Clone at x: [0] y: [350]\n                end\n            end\n        end\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)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [hide all sprites v]\nhide\n\n@Water\n\nwhen I receive [green flag v]\ngo [backward v] (99) layers\nshow\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [0]> then\n    switch costume to (level 0 1 v)\n    Clone at x: [0] y: [350]\n    Clone at x: [0] y: [350]\n    Clone at x: [0] y: [350]\n    Clone at x: [0] y: [350]\n    Clone at x: [360] y: [0]\nelse\n    if <(LEVEL) = [1]> then\n        switch costume to (level 1 1 v)\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n    else\n        if <(LEVEL) = [2]> then\n            switch costume to (level 2 1 v)\n            Clone at x: [0] y: [350]\n            Clone at x: [450] y: [350]\n        else\n            if <(LEVEL) = [3]> then\n                switch costume to (level 3 1 v)\n                Clone at x: [360] y: [0]\n                Clone at x: [480] y: [0]\n                Clone at x: [450] y: [350]\n            else\n                if <(LEVEL) = [4]> then\n                    switch costume to (level 4 1 v)\n                    Clone at x: [500] y: [0]\n                    Clone at x: [360] y: [180]\n                    Clone at x: [-360] y: [45]\n                    Clone at x: [0] y: [160]\n                else\n                    switch costume to (level 5 1 v)\n                    Clone at x: [0] y: [350]\n                end\n            end\n        end\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)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [hide all sprites v]\nhide\n\n@Splash\n\nwhen flag clicked\nbroadcast (Hide all sprites v)\nset [skip v] to [0]\nset [level v] to [0]\nhide variable [your total skip is v]\nhide variable [your total time is v]\nhide variable [collected v]\nhide variable [record lvl 1 v]\nhide variable [record lvl 2 v]\nhide variable [timer v]\nhide variable [c / cm v]\nhide variable [skip v]\nhide variable [your time v]\nhide variable [mode show v]\ngo to [front v] layer\nhide\n\nwhen I receive [ready clicked v]\nshow variable [timer v]\nshow variable [c / cm v]\nshow variable [your time v]\n\nwhen I receive [ready clicked v]\nforever\n    set [c / cm v] to (join (COLLECTED) (join [ / ] (COLLECTED MAX)))\nend\n\nwhen I receive [ready clicked v]\nreset timer\nrepeat until <(LEVEL) > [4]>\n    set [your time v] to (join (Time Min) (join ['] (Time Sec)))\nend\n\nwhen flag clicked\nforever\n    wait (1.5) seconds\n    if <(LEVEL) > [4]> then\n        hide variable [collected v]\n        hide variable [record lvl 1 v]\n        hide variable [record lvl 2 v]\n        hide variable [timer v]\n        hide variable [c / cm v]\n        hide variable [skip v]\n        hide variable [your time v]\n        set [your total time is v] to (YOUR TIME)\n        if <<(LEVEL) = [5]> and <(SKIP) = [0]>> then\n            broadcast (decode v) and wait\n            if <(YOUR TIME) < (_decoded)> then\n                broadcast (Safe score! v) and wait\n            end\n        end\n    end\nend\n\nwhen flag clicked\nstart sound [pop v]\nforever\n    set [checktime v] to (timer)\nend\n\nwhen [timer v] > (checktime)\nbroadcast (Hide all sprites v)\nset [skip v] to [0]\nset [level v] to [0]\nhide variable [your total skip is v]\nhide variable [your total time is v]\nhide variable [collected v]\nhide variable [record lvl 1 v]\nhide variable [record lvl 2 v]\nhide variable [timer v]\nhide variable [c / cm v]\nhide variable [skip v]\nhide variable [your time v]\nhide variable [mode show v]\nstart sound [pop v]\nstop [this script v]\n\nwhen I receive [\( start \) intro v]\nbroadcast (Ready clicked v) and wait\n\nwhen [space v] key pressed\nif <key (q v) pressed?> then\n    if <(username) = [DGRflash]> then\n        set [skip v] to [0]\n        set [level v] to [0]\n        hide variable [your total skip is v]\n        hide variable [your total time is v]\n        hide variable [collected v]\n        hide variable [record lvl 1 v]\n        hide variable [record lvl 2 v]\n        hide variable [timer v]\n        hide variable [c / cm v]\n        hide variable [skip v]\n        hide variable [your time v]\n        hide variable [mode show v]\n        go to [front v] layer\n        show\n    end\nend\nif <<key (r v) pressed?> and <(username) = [DGRflash]>> then\n    reset timer\nend\n\nwhen I receive [ready clicked v]\nrepeat until <(LEVEL) > [4]>\n    if <(TurboWarp & Forkphorus) = [yes]> then\n        show variable [c / cm v]\n        show variable [your time v]\n        show variable [timer v]\n    end\nend\n\n@Collectables\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) (round (((([sin v] of (((timer) + (x)) * (200)) ) * (10)) + (y)) - (SCROLL Y)))\nset size to (round ((([cos v] of ((timer) * (700)) ) * (6)) + (65))) %\npoint in direction (round ((([cos v] of ((timer) * (200)) ) * (50)) + (90)))\nif <touching (player v)?> then\n    start sound [coin v]\n    switch costume to (collected v)\n    change [collected v] by (1)\n    delete this clone\nend\n\nwhen I receive [reset v]\nswitch costume to (collectable v)\ndelete this clone\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\nset [collected v] to [0]\nset [collected max v] to [0]\nif <(LEVEL) = [0]> then\n    switch costume to (collectable v)\n    Clone at x: [130] y: [410]\n    Clone at x: [-130] y: [350]\n    Clone at x: [150] y: [1265]\n    Clone at x: [62] y: [1210]\n    Clone at x: [70] y: [905]\n    Clone at x: [45] y: [1000]\n    Clone at x: [40] y: [1240]\n    Clone at x: [9] y: [1190]\n    Clone at x: [-100] y: [1160]\n    Clone at x: [-50] y: [1040]\n    Clone at x: [5] y: [900]\n    Clone at x: [75] y: [860]\n    Clone at x: [100] y: [830]\n    Clone at x: [131] y: [900]\n    Clone at x: [-80] y: [750]\n    Clone at x: [130] y: [525]\n    Clone at x: [135] y: [700]\n    Clone at x: [70] y: [515]\n    Clone at x: [200] y: [190]\n    Clone at x: [130] y: [250]\n    Clone at x: [110] y: [25]\n    Clone at x: [-125] y: [100]\n    Clone at x: [-80] y: [410]\n    Clone at x: [260] y: [20]\nelse\n    if <(LEVEL) = [1]> then\n        switch costume to (collectable v)\n        Clone at x: [72] y: [-25]\n        Clone at x: [124] y: [18]\n        Clone at x: [187] y: [18]\n        Clone at x: [238] y: [-25]\n        Clone at x: [720] y: [21]\n        Clone at x: [720] y: [77]\n    else\n        if <(LEVEL) = [2]> then\n            Clone at x: [206] y: [100]\n            Clone at x: [-130] y: [143]\n            Clone at x: [-218] y: [210]\n            Clone at x: [428] y: [737]\n            Clone at x: [585] y: [797]\n            Clone at x: [649] y: [830]\n        else\n            if <(LEVEL) = [3]> then\n                Clone at x: [-162] y: [62]\n                Clone at x: [119] y: [31]\n                Clone at x: [211] y: [37]\n                Clone at x: [244] y: [-19]\n                Clone at x: [350] y: [-28]\n                Clone at x: [355] y: [65]\n                Clone at x: [468] y: [60]\n                Clone at x: [606] y: [42]\n                Clone at x: [723] y: [-15]\n                Clone at x: [913] y: [2]\n                Clone at x: [909] y: [42]\n                Clone at x: [983] y: [317]\n                Clone at x: [1063] y: [213]\n                Clone at x: [1123] y: [336]\n                Clone at x: [1215] y: [418]\n                Clone at x: [1329] y: [525]\n                Clone at x: [1510] y: [617]\n            else\n                if <(LEVEL) = [4]> then\n                    Clone at x: [0] y: [55]\n                    Clone at x: [118] y: [-17]\n                    Clone at x: [429] y: [3]\n                    Clone at x: [371] y: [-75]\n                    Clone at x: [540] y: [46]\n                    Clone at x: [623] y: [69]\n                    Clone at x: [666] y: [138]\n                    Clone at x: [737] y: [174]\n                    Clone at x: [677] y: [229]\n                    Clone at x: [841] y: [192]\n                    Clone at x: [979] y: [180]\n                    Clone at x: [988] y: [304]\n                    Clone at x: [946] y: [581]\n                    Clone at x: [626] y: [338]\n                    Clone at x: [477] y: [453]\n                    Clone at x: [348] y: [587]\n                end\n            end\n        end\n    end\n    set [x v] to [-9999999]\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)\nswitch costume to (collectable v)\ncreate clone of (_myself_ v)\nchange [collected max v] by (1)\n\nwhen I receive [hide all sprites v]\nhide\n\n@coins\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) (round (((([sin v] of (((timer) + (x)) * (200)) ) * (10)) + (y)) - (SCROLL Y)))\n\nwhen I receive [setup v]\nclear graphic effects\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(Level) = [1]> then\n    new coin @ [450] [1450]\nelse\n    if <(Level) = [2]> then\n        new coin @ [360] [59]\n    else\n        if <(Level) = [3]> then\n            new coin @ [256] [122]\n        else\n            if <(Level) = [4]> then\n                new coin @ [-210] [13]\n            else\n                if <(Level) = [5]> then\n                    new coin @ [-211] [14]\n                end\n            end\n        end\n    end\nend\nset [x v] to [100000000000000000]\n\ndefine position (x) (y)\nset size to (100) %\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine new coin @ (x) (y)\nset [x v] to (x)\nset [y v] to (y)\nswitch costume to (coin v)\nclear graphic effects\ncreate clone of (_myself_ v)\nchange [collected max v] by (1000)\n\nwhen flag clicked\ndelete all of [coin v]\nadd [0] to [coin v]\nadd [0] to [coin v]\nadd [0] to [coin v]\nadd [0] to [coin v]\nadd [0] to [coin v]\nadd [0] to [coin v]\n\nwhen I receive [coin!!! v]\nif <<touching (player v)?> and <not <(costume [number v]) = [19]>>> then\n    start sound [Coin v]\n    replace item (Level) of [coin v] with [1]\n    repeat until <(TEST) > [999]>\n        change [test v] by (125)\n        change [collected v] by (125)\n        wait (0) seconds\n    end\n    broadcast (TIME START v)\n    set [test v] to [0]\n    wait (0) seconds\nend\n\nwhen I receive [tick v]\nif <(item (Level) of [coin v]) = [0]> then\n    next costume\n    if <(costume [name v]) = [done]> then\n        switch costume to (coin v)\n    end\nelse\n    switch costume to (done v)\nend\n\ndefine clone\nrepeat (2)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset size to (50) %\nif <(mode) = [ao]> then\n    if <(id) = [1]> then\n        go to x: (195) y: (-165)\n    end\n    if <(id) = [2]> then\n        go to x: (220) y: (-165)\n    end\n    show\n    set [ghost v] effect to (80)\n    switch costume to (coin v)\n    if <(item (id) of [coin v]) = [1]> then\n        set [ghost v] effect to (15)\n        switch costume to (done v)\n    end\n    repeat until <not <(mode) = [ao]>>\n        set size to (50) %\n        set y to ((([cos v] of ((timer) * (100)) ) * (5)) + (-160))\n        set [brightness v] effect to (<touching (mouse-pointer v)?> * (20))\n    end\n    delete this clone\nend\n\nwhen I receive [hide all sprites v]\ndelete this clone\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [hide all sprites v]\nhide\n\nwhen flag clicked\nset [test v] to [0]\nwait (1) seconds\nset [id v] to [0]\nclone\n\nwhen flag clicked\nforever\n    if <(TEST) = [STOP TIME]> then\n        delete all of [coin v]\n        add [0] to [coin v]\n        add [0] to [coin v]\n        add [0] to [coin v]\n        add [0] to [coin v]\n        add [0] to [coin v]\n        add [0] to [coin v]\n    end\nend\n\nwhen I receive [reset v]\nset [test v] to [0]\n\nwhen flag clicked\nforever\n    set [level v] to ((LEVEL) + (1))\nend\n\nwhen I receive [hide all sprites v]\nhide\n\n@coins2\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) (round (((([sin v] of (((timer) + (x)) * (200)) ) * (10)) + (y)) - (SCROLL Y)))\n\nwhen I receive [setup v]\nclear graphic effects\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(Level) = [1]> then\nset [x v] to [100000000000000000]\n\ndefine position (x) (y)\nset size to (100) %\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine new coin @ (x) (y)\nset [x v] to (x)\nset [y v] to (y)\nswitch costume to (coin v)\nclear graphic effects\ncreate clone of (_myself_ v)\nchange [collected max v] by (1000)\n\nwhen flag clicked\ndelete all of [coin2 v]\nadd [0] to [coin2 v]\nadd [0] to [coin2 v]\nadd [0] to [coin2 v]\nadd [0] to [coin2 v]\nadd [0] to [coin2 v]\n\nwhen I receive [coin!!! v]\nif <<touching (player v)?> and <not <(costume [number v]) = [19]>>> then\n    start sound [Coin v]\n    replace item (Level) of [coin2 v] with [1]\n    repeat until <(TEST) > [999]>\n        change [test v] by (125)\n        change [collected v] by (125)\n        wait (0) seconds\n    end\n    broadcast (TIME START v)\n    set [test v] to [0]\n    wait (0) seconds\nend\n\nwhen I receive [tick v]\nif <(item (Level) of [coin2 v]) = [0]> then\n    next costume\n    if <(costume [name v]) = [done]> then\n        switch costume to (coin v)\n    end\nelse\n    switch costume to (done v)\nend\n\ndefine clone\nrepeat (2)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset size to (50) %\nif <(mode) = [ao]> then\n    if <(id) = [1]> then\n        go to x: (195) y: (-165)\n    end\n    if <(id) = [2]> then\n        go to x: (220) y: (-165)\n    end\n    show\n    set [ghost v] effect to (80)\n    switch costume to (coin v)\n    if <(item (id) of [coin2 v]) = [1]> then\n        set [ghost v] effect to (15)\n        switch costume to (done v)\n    end\n    repeat until <not <(mode) = [ao]>>\n        set size to (50) %\n        set y to ((([cos v] of ((timer) * (100)) ) * (5)) + (-160))\n        set [brightness v] effect to (<touching (mouse-pointer v)?> * (20))\n    end\n    delete this clone\nend\n\nwhen I receive [hide all sprites v]\ndelete this clone\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [hide all sprites v]\nhide\n\nwhen flag clicked\nset [test v] to [0]\nwait (1) seconds\nset [id v] to [0]\nclone\n\nwhen flag clicked\nforever\n    if <(TEST) = [STOP TIME]> then\n        delete all of [coin2 v]\n        add [0] to [coin2 v]\n        add [0] to [coin2 v]\n        add [0] to [coin2 v]\n        add [0] to [coin2 v]\n        add [0] to [coin2 v]\n        add [0] to [coin2 v]\n    end\nend\n\nwhen I receive [reset v]\nset [test v] to [0]\n\nwhen flag clicked\nforever\n    set [level v] to ((LEVEL) + (1))\nend\n\nwhen I receive [hide all sprites v]\nhide\n\n@Exit\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [tick v]\nset size to (250) %\nPosition ((x) - (SCROLL X)) ((round (([sin v] of ((timer) * (200)) ) * (12))) + ((y) - (SCROLL Y)))\nif <<(COLLECTED) = (COLLECTED MAX)> or <(COLLECTED) > (COLLECTED MAX)>> then\n    switch costume to (open v)\n    if <touching (player v)?> then\n        set [exit v] to [win]\n    end\nend\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [0]> then\n    switch costume to (closed v)\n    Clone at x: [286] y: [0]\n    set [min v] to [1]\n    set [sec v] to [0]\n    show\nelse\n    if <(LEVEL) = [1]> then\n        switch costume to (closed v)\n        Clone at x: [1000] y: [30]\n        set [min v] to [0]\n        set [sec v] to [10]\n    else\n        if <(LEVEL) = [2]> then\n            switch costume to (closed v)\n            Clone at x: [728] y: [803]\n            set [min v] to [0]\n            set [sec v] to [22]\n        else\n            if <(LEVEL) = [3]> then\n                switch costume to (closed v)\n                Clone at x: [1606] y: [601]\n                set [min v] to [0]\n                set [sec v] to [19]\n            else\n                if <(LEVEL) = [4]> then\n                    switch costume to (closed v)\n                    Clone at x: [272] y: [600]\n                    set [min v] to [0]\n                    set [sec v] to [18]\n                else\n                    set [min v] to [0]\n                    set [sec v] to [3]\n                    set [collected max v] to [0]\n                    hide\n                end\n            end\n        end\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)\n\nwhen I receive [hide all sprites v]\nhide\n\nwhen I receive [start v]\nforever\n    repeat (100)\n        change [whirl v] effect by (25)\n    end\n    repeat (100)\n        change [whirl v] effect by (-25)\n    end\nend\n\n@Trampolines\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [0]> then\n    switch costume to (level 0 1 v)\n    Clone at x: [0] y: [350]\n    Clone at x: [0] y: [350]\n    Clone at x: [0] y: [350]\n    Clone at x: [0] y: [350]\n    Clone at x: [360] y: [0]\nelse\n    if <(LEVEL) = [1]> then\n        switch costume to (level 1 1 v)\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n    else\n        if <(LEVEL) = [2]> then\n            switch costume to (level 2 1 v)\n            Clone at x: [0] y: [350]\n            Clone at x: [450] y: [350]\n        else\n            if <(LEVEL) = [3]> then\n                switch costume to (level 3 1 v)\n                Clone at x: [360] y: [0]\n                Clone at x: [480] y: [0]\n                Clone at x: [450] y: [350]\n            else\n                if <(LEVEL) = [4]> then\n                    switch costume to (level 4 1 v)\n                    Clone at x: [500] y: [0]\n                    Clone at x: [360] y: [180]\n                    Clone at x: [-360] y: [180]\n                    Clone at x: [0] y: [160]\n                else\n                    switch costume to (level 5 1 v)\n                    Clone at x: [0] y: [350]\n                end\n            end\n        end\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)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [hide all sprites v]\nhide\n\n@TIMER\n\nwhen flag clicked\nhide variable [' v]\nhide variable [min v]\nhide variable [sec v]\nhide variable [my variable v]\nhide variable [mode show v]\n\nwhen flag clicked\nforever\n    set [' v] to [']\n    if <<(MIN) < [10]> and <(SEC) > [9]>> then\n        set [timer v] to (join [0] (join (MIN) (join (') (SEC))))\n    end\n    if <<(MIN) < [10]> and <(SEC) < [10]>> then\n        set [timer v] to (join [0] (join (MIN) (join (') (join [0] (SEC)))))\n    end\n    if <<(MIN) > [9]> and <(SEC) > [9]>> then\n        set [timer v] to (join (MIN) (join (') (SEC)))\n    end\n    if <<(MIN) > [9]> and <(SEC) < [10]>> then\n        set [timer v] to (join (MIN) (join (') (join [0] (SEC))))\n    end\nend\n\nwhen I receive [ready clicked v]\nforever\n    if <(EASY / CHALLENGE MODE) = [1]> then\n        hide variable [timer v]\n        set [mode check v] to [2]\n    else\n        if <(MODE CHECK) = [2]> then\n            set [mode check v] to [0]\n            set [exit v] to [DIE]\n        end\n        if <not <(TEST) = [0]>> then\n            stop [this script v]\n        end\n        wait (1) seconds\n        change [sec v] by (-1)\n        if <(SEC) < [0]> then\n            set [sec v] to [59]\n            change [min v] by (-1)\n        end\n        show variable [timer v]\n    end\nend\n\nwhen I receive [win v]\nWIN\n\ndefine WIN\nset [min v] to [10]\nset [sec v] to [0]\n\nwhen I receive [time start v]\nforever\n    if <(EASY / CHALLENGE MODE) = [1]> then\n        hide variable [timer v]\n        set [mode check v] to [2]\n    else\n        if <(MODE CHECK) = [2]> then\n            set [mode check v] to [0]\n            set [exit v] to [DIE]\n        end\n        if <<not <(TEST) = [0]>> or <<(MIN) = [0]> and <(SEC) < [1]>>> then\n            stop [this script v]\n        end\n        wait (1) seconds\n        change [sec v] by (-1)\n        if <(SEC) < [0]> then\n            set [sec v] to [59]\n            change [min v] by (-1)\n        end\n        show variable [timer v]\n    end\nend\n\nwhen I receive [easy v]\nif <(EASY / CHALLENGE) = [1]> then\n    if <(EASY / CHALLENGE) = [2]> then\n        stop [this script v]\n    end\n    set [mode show v] to [EASY MODE]\n    wait (0) seconds\n    repeat (3)\n        if <(EASY / CHALLENGE) = [2]> then\n            stop [this script v]\n        end\n        show variable [mode show v]\n        wait (0.5) seconds\n        if <(EASY / CHALLENGE) = [2]> then\n            stop [this script v]\n        end\n        hide variable [mode show v]\n        if <(EASY / CHALLENGE) = [2]> then\n            stop [this script v]\n        end\n        wait (0.5) seconds\n    end\nelse\n    stop [this script v]\nend\n\nwhen I receive [hard v]\nif <(EASY / CHALLENGE) = [2]> then\n    if <(EASY / CHALLENGE) = [1]> then\n        stop [this script v]\n    end\n    set [mode show v] to [CHALLENGE MODE]\n    wait (0) seconds\n    repeat (3)\n        if <(EASY / CHALLENGE) = [1]> then\n            stop [this script v]\n        end\n        show variable [mode show v]\n        wait (0.5) seconds\n        if <(EASY / CHALLENGE) = [1]> then\n            stop [this script v]\n        end\n        hide variable [mode show v]\n        if <(EASY / CHALLENGE) = [1]> then\n            stop [this script v]\n        end\n        wait (0.5) seconds\n    end\nelse\n    stop [this script v]\nend\n\nwhen I receive [setup v]\nif <(MODE CHECK) = [2]> then\n    broadcast (TIME START v)\n    stop [this script v]\nend\n\nwhen I receive [tick v]\nif <(LEVEL) < [5]> then\n    if <<(mouse y) > [-180]> and <(mouse x) < [240]>> then\n        if <(mouse x) > [50]> then\n            show variable [easy / challenge v]\n        else\n            hide variable [easy / challenge v]\n        end\n    else\n        hide variable [easy / challenge v]\n    end\nelse\n    hide variable [easy / challenge v]\nend\n\nwhen [timer v] > (checktime)\nhide variable [easy / challenge v]\n\n@Intro\n\ndefine Clone number (#)\nswitch costume to (#)\nshow\nif <(#) = [19]> then\n    show\n    switch costume to (costume13 v)\n    go to [front v] layer\n    set size to (50) %\n    clear graphic effects\n    go to x: (0) y: (0)\n    repeat until <(round (y position)) = [150]>\n        change y by (((150) - (y position)) / (4))\n    end\n    repeat until <(round (y position)) = [0]>\n        change y by (((0) - (y position)) / (2))\n    end\n    repeat until <<(round (size)) = [1800]> and <(round (direction)) = [90]>>\n        switch costume to (costume14 v)\n        change size by (((1800) - (size)) / (4))\n        switch costume to (costume13 v)\n    end\n    broadcast (Intro del clones v) and wait\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\nend\nif <(#) = [1]> then\n    set rotation style [all around v]\n    point in direction (60)\n    set size to (80) %\n    go to x: (352) y: (60)\n    Smooth glide [0] [20] [90] [85] speed [4]\n    set [@speed v] to [0]\n    repeat (22)\n        change [@speed v] by (-1)\n        change x by (@Speed)\n        change [ghost v] effect by ([abs v] of ((@Speed) / (2)) )\n    end\n    set [@speed v] to [12]\n    wait (1) seconds\n    clear graphic effects\n    set rotation style [left-right v]\n    set size to (85) %\n    point in direction (-90)\n    go to x: (-326) y: (20)\n    repeat (26)\n        change [@speed v] by (1)\n        change x by (@Speed)\n    end\n    delete this clone\nend\nif <(#) = [2]> then\n    set rotation style [all around v]\n    point in direction (60)\n    set size to (80) %\n    go to x: (352) y: (60)\n    Smooth glide [0] [20] [90] [85] speed [4]\n    set [@speed v] to [0]\n    switch costume to (pi2 v)\n    set [clone# v] to [5]\n    repeat (2)\n        change [clone# v] by (1)\n        create clone of (_myself_ v)\n    end\n    set [clone# v] to [14]\n    repeat (2)\n        change [clone# v] by (1)\n        create clone of (_myself_ v)\n    end\n    point in direction (90)\n    repeat (11)\n        change [@speed v] by (-1)\n        change y by (@Speed)\n        change size by (([abs v] of (@Speed) ) / (0.7))\n    end\nend\nif <(#) = [3]> then\n    set size to (100) %\n    point in direction (90)\n    go to x: (0) y: (0)\n    go to [front v] layer\nend\nif <(#) = [4]> then\n    point in direction (90)\n    set size to (100) %\n    go to x: (0) y: (0)\n    go to [back v] layer\nend\nif <(#) = [6]> then\n    go to x: (0) y: (20)\n    point in direction (-90)\n    set rotation style [all around v]\n    set size to (85) %\n    clear graphic effects\n    set [@speed v] to [0]\n    go to [front v] layer\n    forever\n        change [@speed v] by (1)\n        move ((@Speed) * (2)) steps\n        turn right (() - (@Speed)) degrees\n        change [ghost v] effect by ((@Speed) / (2))\n        change size by ((@Speed) / (3))\n    end\nend\nif <(#) = [7]> then\n    go to x: (0) y: (20)\n    point in direction (90)\n    set rotation style [all around v]\n    set size to (85) %\n    clear graphic effects\n    set [@speed v] to [0]\n    go to [front v] layer\n    forever\n        change [@speed v] by (1)\n        move ((@Speed) * (2)) steps\n        turn right (@Speed) degrees\n        change size by ((@Speed) / (3))\n        change [ghost v] effect by ((@Speed) / (2))\n    end\nend\nif <(#) = [8]> then\n    go to x: (-160) y: (20)\nend\nif <(#) = [9]> then\n    go to x: (-100) y: (20)\nend\nif <(#) = [10]> then\n    go to x: (-40) y: (20)\nend\nif <(#) = [11]> then\n    go to x: (23) y: (20)\nend\nif <(#) = [12]> then\n    go to x: (66) y: (20)\nend\nif <(#) = [13]> then\n    go to x: (112) y: (20)\nend\nif <(#) = [14]> then\n    go to x: (172) y: (20)\nend\nif <<(#) > [7]> and <[15] > (#)>> then\n    set size to (85) %\n    point in direction (90)\nend\nif <(#) = [15]> then\n    go to x: (-124) y: (0)\n    Smooth glide [0] [0] [90] [90] speed [4]\nend\nif <(#) = [16]> then\n    go to x: (124) y: (0)\n    Smooth glide [0] [0] [90] [90] speed [4]\nend\nif <<(#) > [7]> and <[17] > (#)>> then\n    set [@speed v] to [0]\n    forever\n        if <[15] > (#)> then\n            set y to ((([cos v] of ((@Speed) * (2)) ) * (10)) + (20))\n        else\n            set y to ((([cos v] of ((@Speed) * (2)) ) * (10)) + (0))\n        end\n        point in direction ((90) + (([cos v] of (@Speed) ) * (3)))\n        change [@speed v] by (11)\n    end\nend\nif <(#) = [17]> then\n    go to [back v] layer\n    go [forward v] (1) layers\n    point in direction (90)\n    go to x: (-240) y: (180)\n    set [ghost v] effect to (50)\n    set [@speed v] to [0]\n    forever\n        set rotation style [all around v]\n        set [@speed v] to [0]\n        repeat (25)\n            change [@speed v] by (0.25)\n            turn right (@Speed) degrees\n        end\n        set [@speed v] to [0]\n        repeat (25)\n            change [@speed v] by (0.25)\n            turn left (@Speed) degrees\n        end\n    end\nend\nif <(#) = [18]> then\n    go to [back v] layer\n    go [forward v] (1) layers\n    point in direction (90)\n    go to x: (240) y: (180)\n    set [ghost v] effect to (50)\n    forever\n        set rotation style [all around v]\n        set [@speed v] to [0]\n        repeat (25)\n            change [@speed v] by (0.25)\n            turn left (@Speed) degrees\n        end\n        set [@speed v] to [0]\n        repeat (25)\n            change [@speed v] by (0.25)\n            turn right (@Speed) degrees\n        end\n    end\nend\n\ndefine Create clones\nset [clone# v] to [0]\nrepeat (4)\n    change [clone# v] by (1)\n    create clone of (_myself_ v)\nend\nset [clone# v] to [17]\ncreate clone of (_myself_ v)\nset [clone# v] to [18]\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nCreate clones\n\nwhen I start as a clone\nClone number (Clone#)\n\ndefine Smooth glide (x) (y) (dir) (size) speed ()\nrepeat until <<<(round (x position)) = (x)> and <(round (y position)) = (y)>> and <<(round (direction)) = (dir)> and <(round (size)) = (size)>>>\n    change x by (((x) - (x position)) / ())\n    change y by (((y) - (y position)) / ())\n    turn right (((dir) - (direction)) / (() / (0.5))) degrees\n    change size by (((size) - (size)) / ())\nend\n\nwhen I start as a clone\nif <(Clone#) = [1]> then\n    wait (1.782) seconds\n    wait until <(x position) > [-150]>\n    set [clone# v] to [8]\n    create clone of (_myself_ v)\n    wait until <(x position) > [-100]>\n    set [clone# v] to [9]\n    create clone of (_myself_ v)\n    wait until <(x position) > [-50]>\n    set [clone# v] to [10]\n    create clone of (_myself_ v)\n    wait until <(x position) > [0]>\n    set [clone# v] to [11]\n    create clone of (_myself_ v)\n    wait until <(x position) > [50]>\n    set [clone# v] to [12]\n    create clone of (_myself_ v)\n    wait until <(x position) > [100]>\n    set [clone# v] to [13]\n    create clone of (_myself_ v)\n    wait until <(x position) > [150]>\n    set [clone# v] to [14]\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nwait until <<<key (space v) pressed?> or <mouse down?>> and <not <(Clone#) = [19]>>>\nstart sound [Connect v]\nset [clone# v] to [19]\ncreate clone of (_myself_ v)\nwait (.3) seconds\nrepeat (50)\n    change volume by (-2)\nend\nstop all sounds\nstop [other scripts in sprite v]\nbroadcast (\( START \) INTRO v)\ndelete this clone\n\nwhen flag clicked\nstart sound [Intro Music v]\nset volume to (100) %\nwait (5) seconds\nif <not <(Clone#) = [19]>> then\n    set [clone# v] to [19]\n    create clone of (_myself_ v)\n    wait (.3) seconds\n    repeat (50)\n        change volume by (-2)\n    end\n    stop all sounds\n    stop [other scripts in sprite v]\n    broadcast (\( START \) INTRO v)\n    delete this clone\nend\n\nwhen I receive [intro del clones v]\nif <not <(Clone#) = [19]>> then\n    delete this clone\nend\n\n@Outro\n\nwhen I start as a clone\nshow\nif <(costume [number v]) = [2]> then\n    set size to (1) %\n    repeat until <(round (size)) = [120]>\n        change size by (((120) - (size)) / (6))\n    end\nelse\n    if <(costume [number v]) = [3]> then\n        go to x: (416) y: (-100)\n        set size to (100) %\n        repeat until <(round (x position)) = [0]>\n            go to [front v] layer\n            change x by (((0) - (x position)) / (6))\n        end\n        forever\n            set y to (([y position v] of [outro v]) + (-120))\n            point in direction ([direction v] of [outro v])\n        end\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [2]> then\n    forever\n        point in direction ((([tan v] of ((timer) * (90)) ) * (5)) + (90))\n        go to (outro v)\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [5]> then\n    set [brightness v] effect to (3)\n    if <(letter ((length of ((Background#) / (2))) - (1)) of ((Background#) / (2))) = [.]> then\n        switch costume to (line1 v)\n    else\n        switch costume to (line2 v)\n    end\n    go to [back v] layer\n    set size to (100) %\n    go to x: ((Background#) - (((Background#) / (35)) - (1))) y: (345)\n    repeat until <(round (y position)) = [0]>\n        change y by (((0) - (y position)) / (4))\n    end\nend\n\nwhen [timer v] > (checktime)\nbroadcast (\( START \) OUTRO v)\nswitch costume to (blank v)\npoint in direction (90)\nshow\nset size to (100) %\nset [thumbnail# v] to [15]\ngo to [front v] layer\nswitch costume to (thumbnail v)\nrepeat ((Thumbnail#) * (2))\n    go to x: (pick random ((Thumbnail#) - ((Thumbnail#) * (2))) to (Thumbnail#)) y: (pick random ((Thumbnail#) - ((Thumbnail#) * (2))) to (Thumbnail#))\n    change [thumbnail# v] by (-0.5)\n    set [checktime v] to (timer)\nend\npoint in direction (90)\nhide\nset size to (90) %\nreset timer\nset [checktime v] to (timer)\nswitch costume to (line2 v)\nset [background# v] to [0]\nrepeat (14)\n    create clone of (_myself_ v)\n    change [background# v] by (35)\n    set [checktime v] to (timer)\nend\nshow\nswitch costume to (logo v)\ncreate clone of (_myself_ v)\nswitch costume to (1 of intro v)\ngo to x: (-314) y: (10)\nrepeat until <(round (x position)) = [0]>\n    change x by (((0) - (x position)) / (6))\n    set [checktime v] to (timer)\nend\nswitch costume to (2 of intro v)\ncreate clone of (_myself_ v)\nswitch costume to (1 of intro v)\nreset timer\nforever\n    set [checktime v] to (timer)\n    set y to ((([cos v] of ((timer) * (200)) ) * (10)) + (20))\n    point in direction ((([cos v] of ((timer) * (100)) ) * (5)) + (90))\nend\n\nwhen [timer v] > (checktime)\nset volume to (100) %\nwait until <(Thumbnail#) = [0]>\nforever\n    wait (1) seconds\n    play sound [Avicii - Levels v] until done\nend\n\nwhen flag clicked\nhide\nforever\n    set [checktime v] to (timer)\nend\n\nwhen flag clicked\nforever\n    if <(TurboWarp & Forkphorus) = [yes]> then\n        stop [other scripts in sprite v]\n        hide\n    end\nend\n\n@Costume Text Engine\n\ndefine Say : (text) at x: (x) y: (y)\ngo to [front v] layer\nswitch costume to (text bubble v)\ngo to x: (x) y: ((y) - (50))\nset [ghost v] effect to (100)\nshow\nset [# v] to [0]\nbroadcast (Clear v) and wait\nrepeat until <(round (y position)) = (y)>\n    change y by (((y) - (y position)) / (5))\n    change [ghost v] effect by (-8)\nend\nrepeat (length of (text))\n    change [# v] by (1)\n    if <(letter (#) of (text)) > []> then\n        set [asset v] to (letter (#) of (text))\n    else\n        set [asset v] to [space]\n    end\n    create clone of (_myself_ v)\nend\nwait until <key (space v) pressed?>\nwait until <not <key (space v) pressed?>>\nstart sound [Choose v]\nhide\nbroadcast (Clear v) and wait\nset [# v] to [0]\n\nwhen I start as a clone\nswitch costume to (asset)\nif <(costume [number v]) = [1]> then\n    switch costume to (space v)\nend\nchange x by (-42)\nchange y by (22)\nset [org. x v] to (x position)\nrepeat (#)\n    change x by (7)\n    if <([abs v] of ((x position) - (org. x)) ) = [84]> then\n        set x to ((org. x) + (7))\n        change y by (-9)\n    end\nend\nstart sound [Type v]\nshow\ngo to [front v] layer\n\nwhen I receive [clear v]\ndelete this clone\n\nwhen flag clicked\nhide\nforever\n    if <(LEVEL) = [5]> then\n        set [your total skip is v] to (SKIP)\n        set [check v] to (YOUR TIME)\n        set [check2 v] to (SKIP)\n        wait (1.5) seconds\n        broadcast (decode v)\n        Say : [ you win !   .......             press space ] at x: [0] y: [90]\n        Say : (join [your total  time is :    ] (YOUR TIME)) at x: [0] y: [90]\n        if <<<(YOUR TIME) = (_decoded)> and <(username) = (_decoded2)>> and <(SKIP) = [0]>> then\n            Say : [you got the   world    record :d] at x: [0] y: [90]\n            Say : [congratulat  ions !!!] at x: [0] y: [90]\n        else\n            Say : (join [ the world record is :  ] (join (_decoded) (join [ by ] (_decoded2)))) at x: [0] y: [90]\n        end\n        Say : [thanks for playing !!!] at x: [0] y: [90]\n        broadcast (Clear v) and wait\n        stop [this script v]\n    end\nend\n\n@Timer2\n\nwhen I receive [\( start \) intro v]\nset [time min v] to [00]\nset [time sec v] to [00]\nforever\n    repeat (59)\n        wait (1) seconds\n        change [time sec v] by (01)\n        if <(length of (Time Sec)) = [1]> then\n            set [time sec v] to (join [0] (Time Sec))\n        end\n    end\n    wait (1) seconds\n    change [time min v] by (01)\n    set [time sec v] to [00]\n    if <(length of (Time Min)) = [1]> then\n        set [time min v] to (join [0] (Time Min))\n    end\nend\n\n@Custom Blocks\n\ndefine check case (string)\nswitch costume to (null v)\nswitch costume to (string)\nif <(costume [name v]) = [null]> then\n    set [case v] to [l]\nelse\n    set [case v] to [u]\nend\n\nwhen flag clicked\ndecode)) (☁ View User)\nif <not < (_decoded) contains (username)?>> then\n    encode)) (join [ #] (username))\nend\n\nshow variable [_decoded v]\n\nhide variable [_decoded v]\n\ndefine decode)) (data)\nset [_chars v] to [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789`,./;'\[\]\-=~!@#$%^&*\(\)_+{}|:"<>?\(\) ]\nset [### v] to []\nset [_decoded v] to []\nset [# v] to [1]\nrepeat ((length of (data)) / (2))\n    set [### v] to (join (letter (#) of (data)) (letter ((#) + (1)) of (data)))\n    change [# v] by (2)\n    set [_decoded v] to (join (_decoded) (letter (###) of (_chars)))\nend\n\ndefine encode)) (data)\nset [_chars v] to [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789`,./;'\[\]\-=~!@#$%^&*\(\)_+{}|:"<>?\(\) ]\nset [_encoded v] to []\nset [# v] to [1]\nrepeat (length of (data))\n    check case (letter (#) of (data))\n    set [## v] to [1]\n    if <(case) = [u]> then\n        set [## v] to [27]\n    end\n    repeat until <(letter (##) of (_chars)) = (letter (#) of (data))>\n        change [## v] by (1)\n    end\n    if <(length of (##)) = [1]> then\n        set [_encoded v] to (join (_encoded) (join [0] (##)))\n    else\n        set [_encoded v] to (join (_encoded) (##))\n    end\n    change [# v] by (1)\nend\nset [☁ view user v] to (join (☁ View User) (_encoded))\n\n@Custom Blocks3\n\nwhen I receive [decode v]\ndecode#)) (☁ e1)\ndecode (☁ e2)\n\nwhen I receive [safe score! v]\nencode#)) (YOUR TIME)\nencode (username)\n\ndefine encode#)) (data)\nset [_chars v] to [abcdefghijklmnopqrstuvwxyz0123456789`,./;'\[\]\-=~!@#$%^&*\(\)_+{}|:"<>?\(\) ]\nset [_encoded v] to []\nset [# v] to [1]\nrepeat (length of (data))\n    set [## v] to [1]\n    repeat until <(letter (##) of (_chars)) = (letter (#) of (data))>\n        change [## v] by (1)\n    end\n    set [_encoded v] to (join (_encoded) ((##) + (9)))\n    change [# v] by (1)\nend\nset [☁ e1 v] to (_encoded)\n\ndefine decode#)) (data)\nset [_chars v] to [abcdefghijklmnopqrstuvwxyz0123456789`,./;'\[\]\-=~!@#$%^&*\(\)_+{}|:"<>?\(\) ]\nset [#next_2_letters v] to []\nset [_decoded v] to []\nset [# v] to [1]\nrepeat ((length of (data)) / (2))\n    set [#next_2_letters v] to (join (letter (#) of (data)) (letter ((#) + (1)) of (data)))\n    change [# v] by (2)\n    set [_decoded v] to (join (_decoded) (letter ((#next_2_letters) - (9)) of (_chars)))\nend\n\ndefine decode (data)\nset [_chars2 v] to [abcdefghijklmnopqrstuvwxyz0123456789`,./;'\[\]\-=~!@#$%^&*\(\)_+{}|:"<>?\(\) ]\nset [#next_2_letters2 v] to []\nset [_decoded2 v] to []\nset [#2 v] to [1]\nrepeat ((length of (data)) / (2))\n    set [#next_2_letters2 v] to (join (letter (#2) of (data)) (letter ((#2) + (1)) of (data)))\n    change [#2 v] by (2)\n    set [_decoded2 v] to (join (_decoded2) (letter ((#next_2_letters2) - (9)) of (_chars2)))\nend\n\ndefine encode (data)\nset [_chars2 v] to [abcdefghijklmnopqrstuvwxyz0123456789`,./;'\[\]\-=~!@#$%^&*\(\)_+{}|:"<>?\(\) ]\nset [_encoded2 v] to []\nset [#2 v] to [1]\nrepeat (length of (data))\n    set [##2 v] to [1]\n    repeat until <(letter (##2) of (_chars2)) = (letter (#2) of (data))>\n        change [##2 v] by (1)\n    end\n    set [_encoded2 v] to (join (_encoded2) ((##2) + (9)))\n    change [#2 v] by (1)\nend\nset [☁ e2 v] to (_encoded2)\n\n@TurboWarp & Forkphorus detector\n\nwhen flag clicked\nif <is compiled?> then\n    set [turbowarp & forkphorus v] to [yes]\nelse\n    set [turbowarp & forkphorus v] to [no]\nend\n\ndefine block name <is compiled?>\n\n
★★★ Project ★★★ \n\nA Scratch Recreation of "Scrolling Platformer" \nby DGRflash. \nThanks to Griffpatch for the original YT series! \n\n★★★ Instructions ★★★ \n\nBest played with your web browser in full screen mode (F11) to remove the title-bar - this interferes with the \n"UP, LEFT, RIGHT, DOWN AND W, A, S, D".\n(Q+S to skip level)  \n(Q+R to reset level)  \n\n★★★ Less Lag ★★★\n\nhttps://turbowarp.github.io/#390916403\n\n@0014049 for the intro