Colors (A Mobile Friendly Platformer)
@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop2 v)\nforever\n    play sound [TheFatRat - Unity \(Instrumental\) v] until done\nend\n\nwhen I receive [end v]\nswitch backdrop to (backdrop2 v)\nstop [other scripts in sprite v]\nforever\n    play sound [End v] until done\nend\n\nwhen flag clicked\nforever\n    if <not <[999] > (timer)>> then\n        switch backdrop to (backdrop1 v)\n        broadcast (stop v)\n        stop [this script v]\n    end\nend\n\n@Player\n\nwhen I start as a clone\nrepeat (10)\n    change size by (-5)\n    change [ghost v] effect by (-5)\nend\ndelete this clone\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 [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)?> then\n        change y by (1)\n        if <touching (platform v)?> then\n            change y by (1)\n            if <touching (platform v)?> then\n                change y by (1)\n                if <touching (platform v)?> then\n                    change y by (1)\n                    if <touching (platform v)?> then\n                        change y by (1)\n                        if <touching (platform 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 [12]\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)?> 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)?> 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 [12]\n        end\n    end\n    if <touching (bounce pad v)?> then\n        set [yv v] to [20]\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\n    if <touching (zoom v)?> then\n        set [xv v] to [25]\n    end\n    if <touching (zoom2 v)?> then\n        set [xv v] to [-25]\n    end\n    if <touching (water 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 [7]\n        else\n            if <<key (down arrow v) pressed?> or <<key (s v) pressed?> or <<mouse down?> and <(y position) > (mouse y)>>>> then\n                set [yv v] to [-3]\n            else\n                set [yv v] to [3]\n            end\n        end\n    end\nend\n\ndefine reset\ngo to x: (-200) y: (-100)\nset [xv v] to [0]\nset [yv v] to [0]\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I receive [retry v]\nreset\n\nwhen I receive [skip v]\nbroadcast (message1 v)\nreset\n\nwhen flag clicked\nwait until <<<key (right arrow v) pressed?> or <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<key (d v) pressed?> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>>>>> or <mouse down?>>\nreset timer\nbroadcast (start v)\nstop [this script v]\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\n\n@Platform\n\nwhen I receive [message1 v]\nnext costume\nforever\n    set [level v] to (costume [number v])\n    if <(Level) = [11]> then\n        broadcast (END v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nclear graphic effects\nshow\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\n\n@Water\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nclear graphic effects\nshow\nwait (1) seconds\ngo to [back v] layer\n\nwhen I receive [message1 v]\nnext costume\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\n\n@Spikes\n\nwhen I receive [message1 v]\nnext costume\n\nwhen flag clicked\ngo to [back v] layer\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nclear graphic effects\nshow\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\n\n@Bounce Pad\n\nwhen flag clicked\ngo to [back v] layer\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nclear graphic effects\nshow\n\nwhen I receive [message1 v]\nnext costume\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\n\n@Zoom\n\nwhen flag clicked\ngo to [back v] layer\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nclear graphic effects\nshow\n\nwhen I receive [message1 v]\nnext costume\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\n\n@Zoom2\n\nwhen flag clicked\ngo to [back v] layer\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nclear graphic effects\nshow\n\nwhen I receive [message1 v]\nnext costume\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\n\n@Sprite2\n\nwhen flag clicked\ngo to [back v] layer\nclear graphic effects\ngo to x: (-210) y: (162)\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        if <mouse down?> then\n            wait until <not <mouse down?>>\n            broadcast (retry v)\n        else\n            set [brightness v] effect to (10)\n        end\n    else\n        clear graphic effects\n    end\nend\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\n\n@Number\n\nwhen flag clicked\nset [brightness v] effect to (-20)\ngo to x: (-30) y: (160)\nswitch costume to (0 v)\nshow\n\nwhen I receive [start v]\nset size to (200) %\nforever\n    if <(timer) < [10]> then\n        go to x: (-30) y: (160)\n        switch costume to (letter (1) of (timer))\n    else\n        if <<not <(timer) < [10]>> and <(timer) < [100]>> then\n            go to x: (-45) y: (160)\n            switch costume to (letter (1) of (timer))\n        else\n            if <<[99] < (timer)> and <(timer) < [1000]>> then\n                go to x: (-60) y: (160)\n                switch costume to (letter (1) of (timer))\n            else\n                if <<[999] < (timer)> and <(timer) < [10000]>> then\n                    go to x: (-75) y: (160)\n                    switch costume to (letter (1) of (timer))\n                else\n                    hide\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\n\n@Number2\n\nwhen flag clicked\nset [brightness v] effect to (-20)\ngo to x: (0) y: (160)\nswitch costume to (0 v)\nshow\n\nwhen I receive [start v]\nset size to (200) %\nforever\n    if <(timer) < [10]> then\n        go to x: (0) y: (160)\n        switch costume to (letter (3) of (timer))\n    else\n        if <<not <(timer) < [10]>> and <(timer) < [100]>> then\n            go to x: (-15) y: (160)\n            switch costume to (letter (2) of (timer))\n        else\n            if <<[99] < (timer)> and <(timer) < [1000]>> then\n                go to x: (-30) y: (160)\n                switch costume to (letter (2) of (timer))\n            else\n                if <<[999] < (timer)> and <(timer) < [10000]>> then\n                    go to x: (-75) y: (160)\n                    switch costume to (letter (1) of (timer))\n                else\n                    hide\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\n\n@dot\n\nwhen flag clicked\nset [brightness v] effect to (-20)\ngo to x: (-15) y: (160)\nswitch costume to (0 v)\nshow\n\nwhen I receive [start v]\nset size to (200) %\nforever\n    if <(timer) < [10]> then\n        go to x: (-15) y: (160)\n    else\n        if <<(timer) < [100]> and <(timer) < [100]>> then\n            go to x: (0) y: (160)\n        else\n            if <<[99] < (timer)> and <(timer) < [1000]>> then\n                go to x: (15) y: (160)\n            else\n                if <<[999] < (timer)> and <(timer) < [10000]>> then\n                    go to x: (-75) y: (160)\n                    switch costume to (letter (1) of (timer))\n                else\n                    hide\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\n\n@Number3\n\nwhen flag clicked\ngo to x: (30) y: (160)\nset [brightness v] effect to (-20)\nswitch costume to (0 v)\nshow\n\nwhen I receive [start v]\nset size to (200) %\nforever\n    if <(timer) < [10]> then\n        go to x: (30) y: (160)\n        switch costume to (letter (4) of (timer))\n    else\n        if <<not <(timer) < [10]>> and <(timer) < [100]>> then\n            go to x: (15) y: (160)\n            switch costume to (letter (4) of (timer))\n        else\n            if <<[99] < (timer)> and <(timer) < [1000]>> then\n                go to x: (0) y: (160)\n                switch costume to (letter (3) of (timer))\n            else\n                if <<[999] < (timer)> and <(timer) < [10000]>> then\n                    go to x: (-75) y: (160)\n                    switch costume to (letter (1) of (timer))\n                else\n                    hide\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\n\n@Number4\n\nwhen flag clicked\nset [brightness v] effect to (-20)\ngo to x: (45) y: (160)\nswitch costume to (0 v)\nhide\n\nwhen I receive [start v]\nset size to (200) %\nforever\n    if <<not <(timer) < [10]>> and <(timer) < [100]>> then\n        show\n        go to x: (45) y: (160)\n        switch costume to (letter (5) of (timer))\n    else\n        if <<[99] < (timer)> and <(timer) < [1000]>> then\n            go to x: (30) y: (160)\n            switch costume to (letter (5) of (timer))\n        else\n            if <<[999] < (timer)> and <(timer) < [10000]>> then\n                go to x: (-75) y: (160)\n                switch costume to (letter (1) of (timer))\n            else\n                hide\n            end\n        end\n    end\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\n\n@Number5\n\nwhen flag clicked\nset [brightness v] effect to (-20)\ngo to x: (45) y: (160)\nswitch costume to (0 v)\nhide\n\nwhen I receive [start v]\nset size to (200) %\nforever\n    if <<[99] < (timer)> and <(timer) < [1000]>> then\n        show\n        go to x: (60) y: (160)\n        switch costume to (letter (6) of (timer))\n    else\n        if <<[999] < (timer)> and <(timer) < [10000]>> then\n            go to x: (-75) y: (160)\n            switch costume to (letter (1) of (timer))\n        else\n            hide\n        end\n    end\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\n\n@Sprite1\n\nwhen I receive [end v]\ngo to [back v] layer\nset size to (100) %\ngo to x: (0) y: (60)\nshow\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\n\n
Let's get this top loved!\n**************************************************************\nBeat this time on keyboard: 41.21\nBeat this time on mobile: 54.78\n**************************************************************\nPlay my other games here!\nhttps://scratch.mit.edu/studios/4685976/\n**************************************************************\nArrow keys, WAD or tap to move.\nAvoid red and falling.\nBlue lets you jump higher.\nThe yellow thing boosts you forwards.\nThe orange thing boosts you backwards.\nYou can swim in light blue.\nYou can walk on brown.