Timed Platformer
@Stage\n\nwhen I receive [start timer v]\nstart sound [02-normal-mix-tetris-the-grand-master-zn-2-soundtrack-arcade v]\nswitch backdrop to (blank-drop v)\nwait until <(timer) < [1500]>\nstop all sounds\nstart sound [Tetris Grandmaster 3 OST - Level 2 v]\nswitch backdrop to (yellow-drop v)\nwait until <(timer) < [500]>\nstop all sounds\nstart sound [Clang v]\nstart sound [Reference? \(shortened\) v]\nswitch backdrop to (red-drop v)\n\nwhen flag clicked\nreset timer\nswitch backdrop to (black-drop v)\nset [timer v] to [5000]\nrepeat until <(timer) > [5]>\n    set [timer v] to (round (((5) - (timer)) * (1000)))\nend\nset [timer v] to [0]\nbroadcast (timer fail v)\n\nwhen I receive [win v]\nstop [other scripts in sprite v]\nstop all sounds\n\nwhen I receive [stop timer v]\nstop [other scripts in sprite v]\n\nwhen I receive [start timer v]\nreset timer\nrepeat until <(timer) > ((timer start) / (50))>\n    set [timer v] to (round ((timer start) - ((timer) * (50))))\nend\nstop [other scripts in sprite v]\nstop all sounds\nbroadcast (out of time v)\n\n@Text\n\nwhen flag clicked\nstart sound [Clock Ticking v]\nshow\nswitch costume to (costume1 v)\nwait until <(timer) < [4500]>\nswitch costume to (costume2 v)\nwait until <mouse down?>\nstop all sounds\nstart sound [Ding v]\nbroadcast (stop timer v)\n\nwhen I receive [timer fail v]\nstop all sounds\nstop [other scripts in sprite v]\nwait (0.01) seconds\nswitch costume to (costume3 v)\nplay sound [Oops v] until done\nstop [all v]\n\nwhen I receive [stop timer v]\nswitch costume to (costume4 v)\nwait (2) seconds\nset [timer v] to ((5000) - (timer))\nset [timer start v] to (timer)\nswitch costume to (costume5 v)\nwait (2) seconds\nbroadcast (start timer v)\nhide\n\nwhen I receive [out of time v]\nstop [other scripts in sprite v]\nswitch costume to (costume6 v)\nshow\nset [timer v] to [0]\nstart sound [Lose v]\n\nwhen I receive [win v]\nstop all sounds\nwait (0.1) seconds\nstart sound [Victory is Yours! v]\nswitch costume to (costume7 v)\nshow\n\n@TimerThousands\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset size to (100) %\nforever\n    switch costume to (letter (1) of (timer))\n    if <(length of (timer)) = [4]> then\n        go to x: (-155) y: (0)\n        show\n    else\n        go to x: (0) y: (0)\n        hide\n    end\nend\n\nwhen I receive [stop timer v]\nwait (3) seconds\nstop [other scripts in sprite v]\nset size to (50) %\nglide (0.5) secs to x: (-210) y: (130)\nforever\n    if <(length of (timer)) = [4]> then\n        switch costume to (letter (1) of (timer))\n    else\n        switch costume to (0 v)\n    end\nend\n\n@TimerHundreds\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset size to (100) %\nforever\n    switch costume to (letter ((length of (timer)) - (2)) of (timer))\n    if <(length of (timer)) = [4]> then\n        go to x: (-52) y: (0)\n        show\n    else\n        if <(length of (timer)) = [3]> then\n            go to x: (-103) y: (0)\n            show\n        else\n            go to x: (0) y: (0)\n            hide\n        end\n    end\nend\n\nwhen I receive [stop timer v]\nwait (3) seconds\nstop [other scripts in sprite v]\nset size to (50) %\nglide (0.5) secs to x: (-159) y: (130)\nforever\n    if <(length of (timer)) > [2]> then\n        switch costume to (letter ((length of (timer)) - (2)) of (timer))\n    else\n        switch costume to (0 v)\n    end\nend\n\n@TimerTens\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset size to (100) %\nforever\n    switch costume to (letter ((length of (timer)) - (1)) of (timer))\n    if <(length of (timer)) = [4]> then\n        go to x: (52) y: (0)\n        show\n    else\n        if <(length of (timer)) = [3]> then\n            go to x: (0) y: (0)\n            show\n        else\n            if <(length of (timer)) = [2]> then\n                go to x: (-52) y: (0)\n                show\n            else\n                go to x: (0) y: (0)\n                hide\n            end\n        end\n    end\nend\n\nwhen I receive [stop timer v]\nwait (3) seconds\nstop [other scripts in sprite v]\nset size to (50) %\nglide (0.5) secs to x: (-107) y: (130)\nforever\n    if <(length of (timer)) > [1]> then\n        switch costume to (letter ((length of (timer)) - (1)) of (timer))\n    else\n        switch costume to (0 v)\n    end\nend\n\n@TimerOnes\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset size to (100) %\nforever\n    switch costume to (letter (length of (timer)) of (timer))\n    if <(length of (timer)) = [4]> then\n        go to x: (155) y: (0)\n        show\n    else\n        if <(length of (timer)) = [3]> then\n            go to x: (103) y: (0)\n            show\n        else\n            if <(length of (timer)) = [2]> then\n                go to x: (52) y: (0)\n                show\n            else\n                go to x: (0) y: (0)\n                show\n            end\n        end\n    end\nend\n\nwhen I receive [stop timer v]\nwait (3) seconds\nstop [other scripts in sprite v]\nset size to (50) %\nglide (0.5) secs to x: (-56) y: (130)\nforever\n    switch costume to (letter (length of (timer)) of (timer))\nend\n\n@Player\n\nwhen flag clicked\nset [level v] to [0]\nset [y v] to [0]\nset [x v] to [0]\nset [run v] to [0]\ngo to x: (0) y: (0)\nset size to (70) %\nhide\n\nwhen I receive [start timer v]\nshow\nforever\n    if <<(left) = [1]> and <(right) = [1]>> then\n        switch costume to (middle v)\n    else\n        if <(left) = [1]> then\n            switch costume to (left v)\n        else\n            if <(right) = [1]> then\n                switch costume to (right v)\n            else\n                switch costume to (middle v)\n            end\n        end\n    end\nend\n\nwhen I receive [start timer v]\nset drag mode [not draggable v]\nset [level v] to [1]\nshow\npoint in direction (90)\ngo to x: (-211) y: (-36)\nset [y v] to [0]\nset [x v] to [0]\nset [run v] to [1]\nforever\n    if <(run) = [1]> then\n        change [y v] by (-0.7)\n        if <(right) = [1]> then\n            change [x v] by (1)\n        end\n        if <(left) = [1]> then\n            change [x v] by (-1)\n        end\n        set [x v] to ((x) * (0.889989))\n        change x by (x)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (-3)\n                        change x by ((x) * (-1))\n                        if <(jump) = [1]> then\n                            set [y v] to [8]\n                            if <[0] < (x)> then\n                                set [x v] to [-8]\n                            else\n                                set [x v] to [8]\n                            end\n                        else\n                            set [x v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n        change y by (y)\n        if <touching color (#000000)?> then\n            change y by ((y) - ((y) * (2)))\n            set [y v] to [0]\n        end\n        change y by (-1)\n        if <(jump) = [1]> then\n            if <touching color (#000000)?> then\n                set [y v] to [12]\n            end\n        end\n        change y by (1)\n        if <[230] < (x position)> then\n            broadcast (new level v)\n            go to x: (-211) y: (-36)\n        end\n        if <[-200] > (y position)> then\n            go to x: (-211) y: (-36)\n        end\n        if <touching color (#ff0000)?> then\n            go to x: (-211) y: (-36)\n        end\n        if <touching color (#005aff)?> then\n            set [y v] to [17.8]\n        end\n    end\nend\n\nwhen I receive [new level v]\nchange [level v] by (1)\nif <(level) > [25]> then\n    stop [other scripts in sprite v]\n    broadcast (win v)\nend\n\nwhen I receive [out of time v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [win v]\nstop [other scripts in sprite v]\nhide\n\n@Platformer\n\nwhen flag clicked\nswitch costume to (level 1 v)\nhide\n\nwhen I receive [new level v]\nnext costume\n\nwhen I receive [start timer v]\nswitch costume to (level 1 v)\nshow\n\nwhen I receive [win v]\nhide\n\nwhen I receive [out of time v]\nhide\n\n@Left\n\nwhen flag clicked\nset [ghost v] effect to (0)\nhide\n\nwhen I receive [start timer v]\nset [ghost v] effect to (50)\nshow\nforever\n    if <<<touching (mouse-pointer v)?> and <mouse down?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n        set [left v] to [1]\n    else\n        set [left v] to [0]\n    end\nend\n\n@Jump\n\nwhen flag clicked\nset [ghost v] effect to (0)\nhide\n\nwhen I receive [start timer v]\nset [ghost v] effect to (50)\nshow\nforever\n    if <<<touching (mouse-pointer v)?> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        set [jump v] to [1]\n    else\n        set [jump v] to [0]\n    end\nend\n\n@Right\n\nwhen I receive [start timer v]\nset [ghost v] effect to (50)\nshow\nforever\n    if <<<touching (mouse-pointer v)?> and <mouse down?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n        set [right v] to [1]\n    else\n        set [right v] to [0]\n    end\nend\n\nwhen flag clicked\nset [ghost v] effect to (0)\nhide\n\n@Thumbnail\n\nwhen flag clicked\ngo to [front v] layer\nhide\n\n
Stop the timer close to 0, but not at 0, or you'll lose! However close you get to it determines the time you have to beat the 25-level platformer!\n\nUse the arrow keys, WASD, or the arrow buttons.\n\nMy best score is 1137. (The time I still had left after beating it)\n\nHowever the closest I've stopped the timer to zero is 1. (seriously)\nEdit from 4/25/2024: I just stopped it at 0, I didn't even know that was possible!