Dark (A Mobile Friendly Platformer)

Instructions: New game https://scratch.mit.edu/projects/338127154/\n**************************************************************\nTop loved on 10/19/2019!\nTop remixed on 10/23/2019!\n**************************************************************\nLet's get to 1000 loves!\n**************************************************************\nArrow keys, WASD, or tap!\nDon't touch spikes, don't fall, finish the game as fast as you can!\nI know it is short but please enjoy!\nYou will find your time on the last level at the top.\nMy best is 34 seconds. Try and beat it!\nGood luck!

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nrepeat until <(Level) = [10]>\n    play sound [TheFatRat - Unity \(Instrumental\) v] until done\nend\n\nwhen I receive [message2 v]\nstop all sounds\nforever\n    play sound [End v] until done\nend\n\n@Sprite1\n\nwhen flag clicked\ngo to x: (-200) y: (-100)\nset size to (80) %\nswitch costume to (costume1 v)\nshow\nset [level v] to [1]\nset [timer v] to [0]\nhide variable [timer v]\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n        change [xv v] by (1)\n    end\n    if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>>> then\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <<<touching (platform v)?> or <touching (sprite2 v)?>> or <<touching (number v)?> or <<touching (number2 v)?> or <<touching (number3 v)?> or <touching (number4 v)?>>>>> then\n        change y by (1)\n        if <<<touching (platform v)?> or <touching (sprite2 v)?>> or <<touching (number v)?> or <<touching (number2 v)?> or <<touching (number3 v)?> or <touching (number4 v)?>>>>> then\n            change y by (1)\n            if <<<touching (platform v)?> or <touching (sprite2 v)?>> or <<touching (number v)?> or <<touching (number2 v)?> or <<touching (number3 v)?> or <touching (number4 v)?>>>>> then\n                change y by (1)\n                if <<<touching (platform v)?> or <touching (sprite2 v)?>> or <<touching (number v)?> or <<touching (number2 v)?> or <<touching (number3 v)?> or <touching (number4 v)?>>>>> then\n                    change y by (1)\n                    if <<<touching (platform v)?> or <touching (sprite2 v)?>> or <<touching (number v)?> or <<touching (number2 v)?> or <<touching (number3 v)?> or <touching (number4 v)?>>>>> then\n                        change y by (1)\n                        if <<<touching (platform v)?> or <touching (sprite2 v)?>> or <<touching (number v)?> or <<touching (number2 v)?> or <<touching (number3 v)?> or <touching (number4 v)?>>>>> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\n                                end\n                                set [yv v] to [10]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <<<touching (platform v)?> or <touching (sprite2 v)?>> or <<touching (number v)?> or <<touching (number2 v)?> or <<touching (number3 v)?> or <touching (number4 v)?>>>>> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <<<touching (platform v)?> or <touching (sprite2 v)?>> or <<touching (number v)?> or <<touching (number2 v)?> or <<touching (number3 v)?> or <touching (number4 v)?>>>>> then\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n            set [yv v] to [10]\n        end\n    end\n    change y by (1)\n    if <(x position) > [238]> then\n        broadcast (message1 v)\n        reset\n    end\n    if <key (r v) pressed?> then\n        reset\n    end\n    if <<(y position) < [-177]> or <touching (spikes v)?>> then\n        reset\n    end\nend\n\ndefine reset\ngo to x: (-200) y: (-100)\n\nwhen flag clicked\nwait until <<key (any v) pressed?> or <mouse down?>>\nbroadcast (message3 v)\nstop [this script v]\n\nwhen I receive [message3 v]\nrepeat until <(Level) = [10]>\n    wait (0.05) seconds\n    change [timer v] by (0.1)\nend\nif <(Level) = [10]> then\n    broadcast (message4 v)\n    stop [this script v]\nend\n\n@Light\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset size to (200) %\nshow\nforever\n    go [backward v] (1) layers\n    go to (sprite1 v)\nend\n\n@Platform\n\nwhen I receive [message1 v]\nnext costume\nforever\n    set [level v] to (costume [number v])\n    if <(Level) = [10]> then\n        broadcast (message2 v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\nclear graphic effects\nshow\n\n@Sprite2\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [message2 v]\nshow\n\n@Sprite3\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\npoint in direction (90)\nset size to (25) %\nshow\ngo to x: (-147) y: (20)\nset [brightness v] effect to (0)\nglide (1) secs to (random position v)\ndelete this clone\n\nwhen I receive [message2 v]\nforever\n    wait (0.05) seconds\n    create clone of (_myself_ v)\nend\n\n@Sprite4\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\npoint in direction (90)\nset size to (25) %\nshow\ngo to x: (-15) y: (0)\nset [brightness v] effect to (0)\nglide (1) secs to (random position v)\ndelete this clone\n\nwhen I receive [message2 v]\nforever\n    wait (0.05) seconds\n    create clone of (_myself_ v)\nend\n\n@Sprite5\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\npoint in direction (90)\nset size to (25) %\nshow\ngo to x: (100) y: (0)\nset [brightness v] effect to (0)\nglide (1) secs to (random position v)\ndelete this clone\n\nwhen I receive [message2 v]\nforever\n    wait (0.05) seconds\n    create clone of (_myself_ v)\nend\n\n@Spikes\n\nwhen I receive [message1 v]\nnext costume\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nclear graphic effects\nshow\n\n@Number\n\nwhen flag clicked\nhide\n\nwhen I receive [message4 v]\nshow\nset size to (200) %\nforever\n    if <(Timer) < [100]> then\n        go to x: (-45) y: (100)\n        switch costume to (letter (1) of (Timer))\n    else\n        if <<[99] < (Timer)> and <(Timer) < [1000]>> then\n            go to x: (-60) y: (100)\n            switch costume to (letter (1) of (Timer))\n        else\n            if <<[999] < (Timer)> and <(Timer) < [10000]>> then\n                go to x: (-75) y: (100)\n                switch costume to (letter (1) of (Timer))\n            else\n                hide\n            end\n        end\n    end\nend\n\n@Number2\n\nwhen flag clicked\nhide\n\nwhen I receive [message4 v]\nshow\nset size to (200) %\nforever\n    if <(Timer) < [100]> then\n        go to x: (-15) y: (100)\n        switch costume to (letter (2) of (Timer))\n    else\n        if <<[99] < (Timer)> and <(Timer) < [1000]>> then\n            go to x: (-30) y: (100)\n            switch costume to (letter (2) of (Timer))\n        else\n            if <<[999] < (Timer)> and <(Timer) < [10000]>> then\n                go to x: (-45) y: (100)\n                switch costume to (letter (2) of (Timer))\n            end\n        end\n    end\nend\n\n@Number3\n\nwhen flag clicked\nhide\n\nwhen I receive [message4 v]\nshow\nset size to (200) %\nforever\n    if <(Timer) < [100]> then\n        hide\n    else\n        if <<[99] < (Timer)> and <(Timer) < [1000]>> then\n            go to x: (0) y: (100)\n            switch costume to (letter (3) of (Timer))\n        else\n            if <<[999] < (Timer)> and <(Timer) < [10000]>> then\n                go to x: (-15) y: (100)\n                switch costume to (letter (3) of (Timer))\n            end\n        end\n    end\nend\n\n@Number4\n\nwhen flag clicked\nhide\n\nwhen I receive [message4 v]\nshow\nset size to (200) %\nforever\n    if <(Timer) < [100]> then\n        hide\n    else\n        if <<[99] < (Timer)> and <(Timer) < [1000]>> then\n            hide\n        else\n            if <<[999] < (Timer)> and <(Timer) < [10000]>> then\n                go to x: (15) y: (100)\n                switch costume to (letter (4) of (Timer))\n            end\n        end\n    end\nend\n\n