Nyan Platformer

Instructions: Arrow keys/WASD to move, but the game has a tutorial on how to play\n\nNEW: Cloud Highscore, this means that when play while signed in to a scratcher account if you beat the current highscore yours will be saved.

@Stage\n\n@Sprite1\n\nwhen this sprite clicked\nhide\nswitch backdrop to (backdrop1 v)\nswitch costume to (nyan_cat_by_atkforever-d9j5htb-5 v)\nset size to (10) %\nset [ghost v] effect to (0)\ngo to x: (-200) y: (-100)\npoint in direction (90)\nset [level v] to [1]\nwait (3.5) seconds\nswitch backdrop to (backdrop4 v)\nswitch backdrop to (next backdrop v)\nshow\nshow variable [deaths v]\nshow variable [level v]\nforever\n    change [gravity v] by (-0.5)\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        next costume\n        change [xvel v] by (0.7)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        next costume\n        change [xvel v] by (-0.7)\n    end\n    set [xvel v] to ((XVel) * (0.9))\n    change x by (XVel)\n    if <touching color (#000000)?> then\n        change y by (0.9)\n        if <touching color (#000000)?> then\n            change y by (0.9)\n            if <touching color (#000000)?> then\n                change y by (0.9)\n                if <touching color (#000000)?> then\n                    change y by (0.9)\n                    if <touching color (#000000)?> then\n                        change y by (0.9)\n                        if <touching color (#000000)?> then\n                            change x by ((XVel) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                if <(XVel) > [0]> then\n                                    set [xvel v] to [-8]\n                                else\n                                    set [xvel v] to [8]\n                                end\n                                set [gravity v] to [10]\n                            else\n                                set [xvel v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (gravity)\n    if <touching color (#000000)?> then\n        change y by ((gravity) * (-1))\n        set [gravity v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#000000)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [gravity v] to [8]\n        end\n    end\n    change y by (1)\n    if <touching color (#ffff00)?> then\n        set [gravity v] to [0]\n        switch backdrop to (next backdrop v)\n        go to x: (-200) y: (-100)\n        change [level v] by (1)\n    end\n    if <touching color (#00ffff)?> then\n        set [gravity v] to [12]\n    end\n    if <touching color (#f0a23a)?> then\n        show\n        hide\n        reset timer\n    end\n    if <<touching color (#ff0101)?> or <<key (r v) pressed?> or <touching color (#e2ce95)?>>> then\n        if <<touching color (#ff0101)?> or <touching color (#e2ce95)?>> then\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            set [xvel v] to [0]\n            set [ghost v] effect to (0)\n            change [deaths v] by (1)\n            set [gravity v] to [0]\n            go to x: (-200) y: (-100)\n        else\n            set [xvel v] to [0]\n            set [ghost v] effect to (0)\n            set [gravity v] to [0]\n            go to x: (-200) y: (-100)\n        end\n    end\nend\n\nwhen backdrop switches to [backdrop3 v]\nhide\ngo to x: (999) y: (999)\n\nwhen backdrop switches to [tac-nayn-nyan-cat-tac-nayn-26040173-606-388-0 v]\nshow\n\nwhen this sprite clicked\nset volume to (1200) %\nforever\n    play sound [recording1 v] until done\nend\n\nhide variable [deaths v]\n\nwhen backdrop switches to [backdrop2 v]\nhide variable [level v]\n\nset [level v] to [1]\n\nwhen flag clicked\nhide variable [level v]\nhide variable [deaths v]\nhide\nswitch backdrop to (images v)\nset [deaths v] to [0]\nset [sub level v] to [0]\nset [gravity v] to [0]\nset [xvel v] to [0]\nset size to (40) %\nswitch backdrop to (images v)\ngo to x: (-120) y: (-20)\n\n@Sprite2\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop2 v]\ngo to x: (990000) y: (9999999)\nhide\n\nwhen backdrop switches to [nyancat v]\nshow\nforever\n    go to x: (-8) y: (-1)\nend\n\n@Sprite3\n\nwhen flag clicked\nhide\nset size to (20) %\ngo to x: (999) y: (999)\npoint in direction (90)\n\nwhen backdrop switches to [nyancat5 v]\nshow\ngo to x: (93) y: (-61)\nrepeat until <(Level) = [13]>\n    glide (1) secs to x: (-192) y: (-98)\n    glide (1) secs to x: (140) y: (-98)\nend\n\nwhen backdrop switches to [nyancat17 v]\nset size to (17) %\nshow\ngo to x: (93) y: (-61)\nforever\n    glide (1.3) secs to x: (-192) y: (-104)\n    glide (1.3) secs to x: (55) y: (-104)\nend\n\nwhen backdrop switches to [nyancat12 v]\nhide\ngo to x: (999) y: (999)\n\nwhen backdrop switches to [nyancat8 v]\nhide\ngo to x: (999) y: (999)\n\n@tac\n\nwhen backdrop switches to [backdrop1 v]\nhide\ngo to x: (999) y: (999)\n\nwhen flag clicked\nset [hi v] to [0]\nhide variable [level v]\nhide variable [deaths v]\nhide\nswitch backdrop to (images v)\nset [deaths v] to [0]\nset [gravity v] to [0]\nset [xvel v] to [0]\nset size to (75) %\nswitch backdrop to (images v)\ngo to x: (120) y: (-20)\n\nwhen backdrop switches to [tac-nayn-nyan-cat-tac-nayn-26040173-606-388-0 v]\nshow\n\nwhen this sprite clicked\nforever\n    set [hi v] to [100]\n    set volume to (150) %\n    play sound [recording1 v] until done\nend\n\nwhen backdrop switches to [backdrop2 v]\nhide variable [level v]\n\nwhen this sprite clicked\nhide\nswitch backdrop to (backdrop3 v)\nswitch costume to (nyan_cat_by_atkforever-d9j5htb-5 v)\nset size to (22.1) %\nset [ghost v] effect to (0)\ngo to x: (-200) y: (-100)\npoint in direction (90)\nset [level v] to [1]\nwait (3.5) seconds\nswitch backdrop to (backdrop4 v)\nswitch backdrop to (next backdrop v)\nshow variable [deaths v]\nshow\nshow variable [level v]\nforever\n    change [gravity v] by (-0.4)\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        next costume\n        change [xvel v] by (0.6)\n        point in direction (90)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        next costume\n        change [xvel v] by (-0.7)\n        point in direction (90)\n    end\n    set [xvel v] to ((XVel) * (0.9))\n    change x by (XVel)\n    if <touching color (#000000)?> then\n        change y by (0.9)\n        if <touching color (#000000)?> then\n            change y by (0.9)\n            if <touching color (#000000)?> then\n                change y by (0.9)\n                if <touching color (#000000)?> then\n                    change y by (0.9)\n                    if <touching color (#000000)?> then\n                        change y by (0.9)\n                        if <touching color (#000000)?> then\n                            change x by ((XVel) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                if <(XVel) > [0]> then\n                                    set [xvel v] to [-8]\n                                else\n                                    set [xvel v] to [8]\n                                end\n                                set [gravity v] to [10]\n                            else\n                                set [xvel v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (gravity)\n    if <touching color (#000000)?> then\n        change y by ((gravity) * (-1))\n        set [gravity v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#000000)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [gravity v] to [8]\n        end\n    end\n    change y by (1)\n    if <touching color (#ffff00)?> then\n        set [gravity v] to [0]\n        switch backdrop to (next backdrop v)\n        go to x: (-200) y: (-100)\n        change [level v] by (1)\n        broadcast (Next Level v) and wait\n    end\n    if <touching color (#00ffff)?> then\n        set [gravity v] to [12]\n    end\n    if <<touching color (#ff0101)?> or <key (r v) pressed?>> then\n        if <touching color (#ff0101)?> then\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            set [xvel v] to [0]\n            set [ghost v] effect to (0)\n            change [deaths v] by (1)\n            set [gravity v] to [0]\n            go to x: (-200) y: (-100)\n        else\n            set [xvel v] to [0]\n            set [ghost v] effect to (0)\n            set [gravity v] to [0]\n            go to x: (-200) y: (-100)\n        end\n    end\nend\n\n@DRAGON\n\nwhen flag clicked\nhide\nset size to (55) %\ngo to x: (999) y: (999)\n\nwhen backdrop switches to [nyancat7 v]\nshow\nforever\n    next costume\n    go to x: (80) y: (-60)\n    wait (0.13) seconds\nend\n\nwhen backdrop switches to [backdrop2 v]\nset size to (12) %\nhide\ngo to x: (999) y: (999)\nhide\n\n@8616\n\n@8 bit 20\n\nwhen flag clicked\nset size to (12) %\nhide\ngo to x: (999) y: (999)\n\nwhen backdrop switches to [nyancat7 v]\nrepeat until <(Level) = [20]>\n    wait (0) seconds\n    go to x: (-26) y: (-38)\n    show\n    glide (1) secs to x: (-250) y: (6)\n    hide\n    go to x: (999) y: (999)\n    wait (0.1) seconds\nend\n\nwhen backdrop switches to [backdrop2 v]\nset size to (12) %\nhide\ngo to x: (999) y: (999)\n\n@8 bit 2\n\nwhen flag clicked\nset size to (12) %\nhide\ngo to x: (999) y: (999)\n\nwhen backdrop switches to [nyancat7 v]\nrepeat until <(Level) = [20]>\n    wait (0.1) seconds\n    go to x: (-26) y: (-38)\n    show\n    glide (1.2) secs to x: (-250) y: (-27)\n    hide\n    go to x: (999) y: (999)\n    wait (0.4) seconds\nend\n\nwhen backdrop switches to [backdrop2 v]\nset size to (12) %\nhide\ngo to x: (999) y: (999)\n\n@8 bit 3\n\nwhen flag clicked\nset size to (12) %\nhide\ngo to x: (999) y: (999)\n\nwhen backdrop switches to [backdrop2 v]\nset size to (12) %\nhide\ngo to x: (999) y: (999)\n\nwhen backdrop switches to [nyancat7 v]\nrepeat until <(Level) = [20]>\n    go to x: (-26) y: (-38)\n    show\n    glide (1) secs to x: (-250) y: (-38)\n    hide\n    go to x: (999) y: (999)\n    wait (0.3) seconds\nend\n\n@blue-fire-png-18\n\nwhen flag clicked\nset size to (12) %\nhide\ngo to x: (999) y: (999)\n\nwhen backdrop switches to [nyancat7 v]\npoint in direction (180)\nrepeat until <(Level) = [20]>\n    wait (0.8) seconds\n    go to x: (-26) y: (-38)\n    show\n    glide (0.8) secs to x: (-250) y: (-134)\n    hide\n    go to x: (999) y: (999)\n    wait (0.4) seconds\n    show\n    go to x: (-26) y: (-38)\n    glide (1) secs to x: (-250) y: (-20)\n    hide\n    wait (1.4) seconds\n    show\n    go to x: (-26) y: (-38)\n    glide (1) secs to x: (-250) y: (-59)\n    hide\nend\n\nwhen backdrop switches to [backdrop2 v]\nset size to (12) %\nhide\ngo to x: (999) y: (999)\n\n@8 bit 4\n\nwhen backdrop switches to [nyancat7 v]\nrepeat until <(Level) = [20]>\n    wait (0.2) seconds\n    go to x: (-26) y: (-38)\n    show\n    glide (1) secs to x: (-250) y: (6)\n    hide\n    go to x: (999) y: (999)\n    wait (0.1) seconds\nend\n\nwhen flag clicked\nset size to (12) %\nhide\ngo to x: (999) y: (999)\n\nwhen backdrop switches to [backdrop2 v]\nset size to (12) %\nhide\ngo to x: (999) y: (999)\n\n@Sprite4\n\nwhen flag clicked\nset size to (12) %\nhide\ngo to x: (999) y: (999)\n\nwhen backdrop switches to [nyancat7 v]\nset size to (100) %\nshow\ngo to x: (-28) y: (43)\nforever\n    glide (2) secs to x: (56) y: (43)\n    glide (2) secs to x: (-200) y: (43)\nend\n\nwhen backdrop switches to [backdrop2 v]\nset size to (12) %\nhide\ngo to x: (999) y: (999)\n\n@floater101\n\nwhen flag clicked\nshow\ngo to x: (85) y: (-75)\nforever\n    wait (0.05) seconds\n    next costume\nend\n\nwhen this sprite clicked\nhide\nswitch backdrop to (tac-nayn-nyan-cat-tac-nayn-26040173-606-388-0 v)\ngo to x: (999) y: (999)\n\n@jeremy-nyan-cat-trans-001\n\nwhen flag clicked\ngo to x: (999) y: (999)\nhide\n\nwhen backdrop switches to [backdrop2 v]\nshow\ngo to x: (-276) y: (-42)\n\n@led-screen-you-win-loop-huge-color-shows-video-stars-text-39756057\n\nwhen flag clicked\ngo to x: (999) y: (999)\nhide\n\nwhen backdrop switches to [backdrop2 v]\nshow\ngo to x: (50) y: (0)\n\nwhen flag clicked\nset size to (70) %\n\n@3021307-inline-fb-thumbsup-printpackaging\n\n@download\n\nwhen flag clicked\nhide\nset size to (50) %\ngo to x: (999) y: (999)\n\nwhen backdrop switches to [backdrop2 v]\nshow\ngo to x: (-153) y: (55)\n\n@Sprite5\n\nwhen backdrop switches to [nyancat15 v]\nshow\ngo to x: (-66) y: (1)\nforever\n    wait (2) seconds\n    next costume\nend\n\nwhen flag clicked\ngo to x: (999) y: (999)\nhide\n\nwhen backdrop switches to [nyancat9 v]\ngo to x: (999) y: (999)\nhide\n\n@download2\n\nwhen flag clicked\nswitch costume to (download v)\nhide\nwait until <(Level) = [1]>\nwait (3.5) seconds\nforever\n    create clone of (_myself_ v)\nend\n\nwhen backdrop switches to [backdrop3 v]\nswitch costume to (costume1 v)\n\nwhen I start as a clone\nshow\nif <(hi) = [100]> then\n    go to (sprite1 v)\n    point in direction ([direction v] of [tac v])\n    set [ghost v] effect to (0)\n    repeat (10)\n        go to (tac v)\n        change y by (46)\n        change x by (67)\n    end\n    repeat (10)\n        change x by (-6)\n        change [ghost v] effect by (10)\n    end\nelse\n    point in direction ([direction v] of [sprite1 v])\n    set [ghost v] effect to (0)\n    repeat (10)\n        change y by (10)\n        go to (sprite1 v)\n    end\n    repeat (10)\n        change x by (-6)\n        change [ghost v] effect by (10)\n    end\nend\ndelete this clone\n\nchange x by (-19)\n\nchange x by (-6)\n\n@tumblr_static_rainbow\n\nwhen backdrop switches to [nyancat9 v]\ngo to x: (36) y: (28)\nshow\n\nwhen backdrop switches to [nyancat6 v]\ngo to x: (999) y: (999)\nhide\n\nwhen flag clicked\ngo to x: (999) y: (999)\nhide\n\n@Mlg_Doge\n\nwhen flag clicked\ngo to x: (999) y: (999)\nhide\n\nwhen backdrop switches to [nyancat15 v]\ngo to x: (999) y: (999)\nhide\n\nwhen backdrop switches to [nyancat14 v]\ngo to x: (8) y: (11)\nshow\n\n@Flappy-Bird-(Yellow)\n\nwhen flag clicked\nset size to (30) %\ngo to x: (999) y: (999)\nhide\n\nwhen backdrop switches to [nyancat16 v]\nshow\nrepeat until <(Level) = [18]>\n    go to x: (-236) y: (6)\n    glide (0.05) secs to x: (-233) y: (12)\n    glide (0.05) secs to x: (-226) y: (19)\n    glide (0.05) secs to x: (-215) y: (27)\n    glide (0.05) secs to x: (-206) y: (32)\n    glide (0.05) secs to x: (-194) y: (38)\n    glide (0.05) secs to x: (-187) y: (38)\n    glide (0.05) secs to x: (-180) y: (31)\n    glide (0.05) secs to x: (-174) y: (25)\n    glide (0.05) secs to x: (-168) y: (18)\n    glide (0.05) secs to x: (-158) y: (14)\n    glide (0.05) secs to x: (-151) y: (3)\n    glide (0.05) secs to x: (-139) y: (-4)\n    glide (0.05) secs to x: (-134) y: (0)\n    glide (0.05) secs to x: (-126) y: (6)\n    glide (0.05) secs to x: (-119) y: (13)\n    glide (0.05) secs to x: (-111) y: (20)\n    glide (0.05) secs to x: (-105) y: (26)\n    glide (0.05) secs to x: (-99) y: (24)\n    glide (0.05) secs to x: (-95) y: (21)\n    glide (0.05) secs to x: (-89) y: (19)\n    glide (0.05) secs to x: (-85) y: (10)\n    glide (0.05) secs to x: (-85) y: (10)\n    glide (0.05) secs to x: (-83) y: (5)\n    glide (0.05) secs to x: (-73) y: (-2)\n    glide (0.05) secs to x: (-66) y: (-9)\n    glide (0.05) secs to x: (-62) y: (-17)\n    glide (0.05) secs to x: (-57) y: (-24)\n    glide (0.05) secs to x: (-50) y: (-29)\n    glide (0.05) secs to x: (-45) y: (-37)\n    glide (0.05) secs to x: (-40) y: (-45)\n    glide (0.05) secs to x: (-34) y: (-50)\n    glide (0.05) secs to x: (-31) y: (-53)\n    glide (0.05) secs to x: (-25) y: (-46)\n    glide (0.05) secs to x: (-18) y: (-40)\n    glide (0.05) secs to x: (-13) y: (-34)\n    glide (0.05) secs to x: (-7) y: (-30)\n    glide (0.05) secs to x: (0) y: (-26)\n    glide (0.05) secs to x: (7) y: (-34)\n    glide (0.05) secs to x: (21) y: (-45)\n    glide (0.05) secs to x: (23) y: (-50)\n    glide (0.05) secs to x: (28) y: (-45)\n    glide (0.05) secs to x: (33) y: (-39)\n    glide (0.05) secs to x: (41) y: (-28)\n    glide (0.05) secs to x: (45) y: (-23)\n    glide (0.05) secs to x: (52) y: (-14)\n    glide (0.05) secs to x: (56) y: (-3)\n    glide (0.05) secs to x: (61) y: (5)\n    glide (0.05) secs to x: (62) y: (10)\n    glide (0.05) secs to x: (65) y: (19)\n    glide (0.05) secs to x: (69) y: (28)\n    glide (0.05) secs to x: (70) y: (38)\n    glide (0.05) secs to x: (74) y: (57)\n    glide (0.05) secs to x: (80) y: (65)\n    glide (0.05) secs to x: (86) y: (76)\n    glide (0.05) secs to x: (96) y: (84)\n    glide (0.05) secs to x: (100) y: (86)\n    glide (0.05) secs to x: (104) y: (83)\n    glide (0.05) secs to x: (112) y: (74)\n    glide (0.05) secs to x: (120) y: (68)\n    glide (0.05) secs to x: (132) y: (76)\n    glide (0.05) secs to x: (143) y: (86)\n    glide (0.05) secs to x: (154) y: (79)\n    glide (0.05) secs to x: (165) y: (69)\n    glide (0.05) secs to x: (177) y: (49)\n    glide (0.05) secs to x: (191) y: (32)\n    glide (0.05) secs to x: (203) y: (26)\n    glide (0.05) secs to x: (215) y: (18)\n    glide (0.05) secs to x: (229) y: (7)\n    glide (0.05) secs to x: (240) y: (-3)\n    glide (0.05) secs to x: (247) y: (-10)\n    glide (0.05) secs to x: (254) y: (-14)\nend\n\nwhen backdrop switches to [nyancat11 v]\ngo to x: (999) y: (999)\nhide\nhide\nhide\nhide\n\n@Sprite6\n\nwhen flag clicked\nset [time v] to [0]\nforever\n    if <(backdrop [name v]) = [nyancat]> then\n        forever\n            wait (1) seconds\n            change [time v] by (1)\n            if <(backdrop [name v]) = [backdrop2]> then\n                forever\n                    set [time v] to (Time)\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Time) < (☁ World Record)> and <(backdrop [name v]) = [backdrop2]>> then\n        wait (0.2) seconds\n        set [☁ world record v] to (Time)\n    end\nend\n\n