Colors! A Platformer {Mobile}
@Stage\n\nwhen I receive [next backdrop v]\nswitch backdrop to (next backdrop v)\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\n@Sprite1\n\nwhen I start as a clone\nforever\n    repeat (16)\n        change [color v] effect by (8)\n        change [ghost v] effect by (6.25)\n        if <(x position) > [270]> then\n            delete this clone\n        end\n    end\n    delete this clone\nend\n\nwhen backdrop switches to [backdrop2 v]\ngo to x: (-199) y: (-45)\n\nif <(x position) > [380]> then\n    switch backdrop to (next backdrop v)\nend\n\nwhen backdrop switches to [backdrop3 v]\ngo to x: (-199) y: (-45)\n\nwhen backdrop switches to [backdrop4 v]\ngo to x: (-199) y: (-80)\n\nwhen backdrop switches to [backdrop5 v]\ngo to x: (-199) y: (-45)\n\nwhen backdrop switches to [backdrop6 v]\ngo to x: (-199) y: (-45)\n\nwhen backdrop switches to [backdrop7 v]\ngo to x: (-243) y: (85)\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop8 v]\ngo to x: (-199) y: (-45)\n\nwhen backdrop switches to [backdrop8 v]\ngo to x: (-199) y: (-95)\n\nwhen I receive [game start! v]\nshow\nset [deaths v] to [0]\nswitch costume to (costume1 v)\nshow\ngo to x: (-199) y: (-45)\nset [x v] to [0]\nset [y v] to [0]\nforever\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        point in direction (90)\n        switch costume to (costume v)\n        change [x v] by (0.5)\n    end\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [x v] by (-0.5)\n        switch costume to (costume v)\n    end\n    change x by (X)\n    set [x v] to ((X) * (0.9))\n    if <touching color (#18ff4d)?> then\n        change y by (0.5)\n        if <touching color (#18ff4d)?> then\n            change y by (0.5)\n            if <touching color (#18ff4d)?> then\n                change y by (0.5)\n                if <touching color (#18ff4d)?> then\n                    change y by (0.5)\n                    if <touching color (#18ff4d)?> then\n                        change y by (0.5)\n                        if <touching color (#18ff4d)?> then\n                            change y by (0.5)\n                            if <touching color (#18ff4d)?> then\n                                change y by (0.5)\n                                if <touching color (#18ff4d)?> then\n                                    change y by (0.5)\n                                    if <key (up arrow v) pressed?> then\n                                        if <[0] < (X)> then\n                                            set [x v] to [-7]\n                                        else\n                                            set [x v] to [7]\n                                        end\n                                        set [y v] to [10]\n                                    else\n                                        set [x v] to ((X) * (-1.3))\n                                        change x by (X)\n                                        set [x v] to [0]\n                                        change x by ((X) / (5))\n                                    end\n                                    change y by (-4)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y v] by (-0.5)\n    change y by (Y)\n    if <touching color (#18ff4d)?> then\n        set [y v] to ((Y) * (-0.25))\n        change y by (Y)\n        if <touching color (#18ff4d)?> then\n            change y by (Y)\n            if <touching color (#18ff4d)?> then\n                change y by (Y)\n                if <touching color (#18ff4d)?> then\n                    change y by (Y)\n                end\n            end\n        end\n    end\n    change y by (-1)\n    if  then\n        set [y v] to [10]\n        switch costume to (costume v)\n    end\n    change y by (1)\n    if <touching (sprite6 v)?> then\n        switch costume to (costume1 v)\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        go to x: (-180) y: (-127)\n        set [ghost v] effect to (0)\n        switch costume to (costume v)\n    end\n    if <<key (left arrow v) pressed?> and <key (right arrow v) pressed?>> then\n        change [x v] by (0.5)\n    end\n    if <<(x position) > [205]> and <(backdrop [number v]) = [8]>> then\n        wait (.5) seconds\n        broadcast (End v)\n        hide\n        stop [other scripts in sprite v]\n        stop [this script v]\n    else\n        if <(x position) > [205]> then\n            broadcast (next backdrop v)\n        end\n    end\n    if <<touching (sprite9 v)?> or <<<touching (sprite8 v)?> or <touching (sprite7 v)?>> or <<touching (sprite6 v)?> or <<touching (sprite5 v)?> or <<touching (sprite4 v)?> or <touching (sprite3 v)?>>>>>> then\n        if <(backdrop [number v]) = [4]> then\n            go to x: (-199) y: (-80)\n        else\n            go to x: (-199) y: (-45)\n            change [deaths v] by (1)\n        end\n    end\n    if <(y position) < [-230]> then\n        change [deaths v] by (1)\n        go to x: (-131) y: (-159)\n    end\nend\n\n\n    broadcast (next backdrop v)\nend\n\nwhen I receive [game start! v]\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I receive [game start! v]\nplay sound [bensound-summer v] until done\nplay sound [bensound-summer v] until done\n\nwhen I receive [end v]\nhide\n\nwhen flag clicked\nset drag mode [not draggable v]\nbroadcast (mobile v)\n\nwhen I receive [mobile v]\nforever\n    if <<mouse down?> and <(mouse y) > (y position)>> then\n        set [y v] to [10]\n        wait (3) seconds\n        broadcast (mobile v)\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop2 v]\nswitch costume to (costume2 v)\n\nwhen backdrop switches to [backdrop3 v]\nswitch costume to (costume3 v)\n\nwhen backdrop switches to [backdrop4 v]\nswitch costume to (costume4 v)\n\nwhen backdrop switches to [backdrop5 v]\nswitch costume to (costume5 v)\n\nwhen backdrop switches to [backdrop6 v]\nswitch costume to (costume6 v)\n\nwhen backdrop switches to [backdrop7 v]\nswitch costume to (costume7 v)\n\nwhen backdrop switches to [backdrop8 v]\nswitch costume to (costume8 v)\n\nwhen I receive [end v]\nhide\n\nwhen I receive [game start! v]\nshow\nswitch costume to (costume1 v)\nset [ghost v] effect to (0)\n\n@download (6)\n\nwhen I start as a clone\nshow\ngo to [back v] layer\ngo to [back v] layer\nrepeat until <(x position) < [-220]>\n    move (5) steps\nend\ndelete this clone\n\nhide\n\ndefine Start\n\nwhen flag clicked\nhide\n\nwhen I receive [game start! v]\nshow\nStart\nhide\nforever\n    wait (.5) seconds\n    hide\n    point in direction (pick random (-70) to (-100))\n    go to x: (300) y: (pick random (-180) to (180))\n    set size to (pick random (20) to (50)) %\n    set [ghost v] effect to (pick random (55) to (75))\n    set [color v] effect to (pick random (1) to (100))\n    create clone of (_myself_ v)\nend\n\n@Sprite3\n\nwhen flag clicked\nswitch costume to (1 v)\nhide\n\nwhen backdrop switches to [backdrop2 v]\ngo to x: (42) y: (-123)\nshow\n\nwhen backdrop switches to [backdrop3 v]\nswitch costume to (costume1 v)\ngo to x: (-43) y: (-31)\n\nwhen backdrop switches to [backdrop4 v]\nswitch costume to (costume2 v)\ngo to x: (-41) y: (-30)\n\nwhen backdrop switches to [backdrop5 v]\nswitch costume to (costume3 v)\ngo to x: (-3) y: (71)\n\nwhen backdrop switches to [backdrop6 v]\nhide\n\n@Sprite6\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\nwhen I receive [end v]\nwait (1) seconds\nshow\ngo to x: (18) y: (-24)\n\nwhen I receive [end v]\nplay sound [Dance Magic v] until done\nplay sound [Dance Magic v] until done\nplay sound [Dance Magic v] until done\nplay sound [Dance Magic v] until done\n\n@Sprite7\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [end v]\nwait (1) seconds\nshow\ngo to x: (-226) y: (-82)\nglide (1) secs to x: (-94) y: (-79)\n\nwhen I receive [end v]\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\n@Sprite9\n\nwhen flag clicked\nhide\n\nwhen I receive [game start! v]\nshow\ngo to x: (-62) y: (-65)\nwait (3.3) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Sprite10\n\nwhen flag clicked\nset [ghost v] effect to (0)\nshow\nwait (3) seconds\nrepeat (25)\n    change [ghost v] effect by (4)\nend\nbroadcast (Game Start! v)\nhide\n\n@Sprite4\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop8 v]\nshow\ngo to x: (-89) y: (-37)\n\nwhen I receive [end v]\nhide\n\n@Sprite5\n\nwhen I receive [end v]\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [end v]\nwait (1) seconds\nshow\ngo to x: (286) y: (-127)\nglide (1) secs to x: (143) y: (-123)\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [end v]\nhide variable [deaths v]\n\n
Use arrow keys to move and jump\nMobile is pretty self-explanatory, swiping up to jump is easier than tapping\nAvoid spikes\nGet to the end of the screen to advance!\n\n\n\n\n