Cobalt | Scrolling Platformer |

Instructions: Building Pen Platformers to their true potential...\n\nv2.0 coming soon... hopefully\n\nThis is a pen platformer and it does INCREDIBLY more rendering than a normal pen platformer because it looks just as good as a normal platformer. I'm trying to reduce lag, so now blocks only render when onscreen. If you have any ideas, they would be welcome. If for some reason it is slow, try running turbo mode or using a faster computer. (If your computer has 4 GB of RAM or less it might run slow)\n\nThis pen platformer not only looks AWESOME (at least for a pen platformer) but it also generates its own levels! which means this is an infinite pen platformer.\n\nCredit to LEGO Worlds for music

@Stage\n\n@Esper\n\nwhen flag clicked\nset size to (20) %\ngo to [front v] layer\nset [brightness v] effect to (0)\npoint in direction (90)\ngo to x: (-196) y: (-46)\nshow\nset [x座標のやつ v] to [0]\nset [y座標のやつ 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 [x座標のやつ v] by (0.9)\n        point in direction (90)\n    end\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> then\n        change [x座標のやつ v] by (-0.9)\n        point in direction (-90)\n    end\n    set [x座標のやつ v] to ((x座標のやつ) * (0.9))\n    change x by (x座標のやつ)\nend\n\nwhen I start as a clone\nrepeat (15)\n    change [ghost v] effect by (5)\n    change size by (-1)\n    change [color v] effect by (2.2)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I receive [次どぞ v]\nshow\ngo to x: (-196) y: (-46)\n\nwhen [timer v] > (0)\nhide\n\nwhen flag clicked\nforever\n    if <(distance to [moon v]) < [150]> then\n        set [brightness v] effect to (((distance to [moon v]) - (150)) / (2))\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [次どぞ v]\ngo to x: (-196) y: (-46)\n\nwhen flag clicked\nforever\n    if <<touching (spike  v)?> or <[-160] > (y position)>> then\n        point in direction (90)\n        go to x: (-196) y: (-46)\n    end\nend\n\nwhen flag clicked\nforever\n    地面に触れるやつ\n    change [y座標のやつ v] by (-1)\n    change y by (y座標のやつ)\n    if <<touching (地面esper v)?> or <touching (wall v)?>> then\n        change y by ((0) - (y座標のやつ))\n        set [y座標のやつ v] to [0]\n    end\n    change y by (-2)\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> and <<touching (地面esper v)?> or <touching (wall v)?>>> then\n        change [y座標のやつ v] by (15)\n        start sound [ジャンプ v]\n    else\n        if <touching (バネ v)?> then\n            set [y座標のやつ v] to [23]\n        end\n    end\n    change y by (1)\n    if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<mouse down?> and <<(y position) > (mouse y)> and <<touching (地面esper v)?> or <touching (wall v)?>>>>> then\n        switch costume to (しゃがみ v)\n    else\n        switch costume to (普通 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <[235] < (x position)> then\n        broadcast (Next Stage v)\n        hide\n        wait (1) seconds\n        point in direction (90)\n        go to x: (-196) y: (-46)\n    end\n    if <touching (バネ v)?> then\n        set [y座標のやつ v] to [23]\n    end\n    if <touching (warp hall v)?> then\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        point in direction (90)\n        if <(Stage) = [7]> then\n            go to x: (140) y: (-80)\n        end\n        if <(Stage) = [10]> then\n            go to x: (204) y: (167)\n        end\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n    end\n    set volume to (50) %\nend\n\ndefine 地面に触れるやつ\nif <<touching (地面esper v)?> or <touching (wall v)?>> then\n    change y by (1)\n    if <<touching (地面esper v)?> or <touching (wall v)?>> then\n        change y by (1)\n        if <<touching (地面esper v)?> or <touching (wall v)?>> then\n            change y by (1)\n            if <<touching (地面esper v)?> or <touching (wall v)?>> then\n                change y by (1)\n                if <<touching (地面esper v)?> or <touching (wall v)?>> then\n                    change y by (1)\n                    if <<touching (地面esper v)?> or <touching (wall v)?>> then\n                        change y by (1)\n                        if <<touching (地面esper v)?> or <touching (wall v)?>> then\n                            change x by ((0) - (x座標のやつ))\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 <[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 [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\n@地面Esper\n\nwhen flag clicked\nshow\nswitch costume to (1 v)\nset drag mode [not draggable v]\nforever\n    go to x: (0) y: (0)\nend\n\nwhen I receive [next stage v]\nwait (1) seconds\nnext costume\n\nwhen flag clicked\nforever\n    set [stage v] to (costume [number v])\n    if <(costume [number v]) = [12]> then\n        broadcast (Games Clear‼ v)\n        stop [this script v]\n    end\nend\n\nwhen [timer v] > (0)\nhide\n\n@バネ\n\nwhen flag clicked\nhide\nswitch costume to (コスチューム2 v)\ngo to x: (-162) y: (-81)\n\nwhen flag clicked\nforever\n    if <(Stage) = [10]> then\n        show\n        if <touching (esper v)?> then\n            switch costume to (コスチューム1 v)\n            wait (0.1) seconds\n            switch costume to (コスチューム2 v)\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    reset timer\nend\n\nwhen I receive [next stage v]\nhide\n\ndefine 地面に触れるやつ\n\n@⭐️❤️\n\nwhen flag clicked\ngo to x: (4) y: (161)\nshow\nset [ghost v] effect to (100)\ngo to [front v] layer\nrepeat (10)\n    change [ghost v] effect by (-10)\n    change y by (-2)\nend\nwait (5) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\n    change y by (2)\nend\nhide\n\nwhen flag clicked\nforever\n    play sound [Fade v] until done\nend\n\nwhen I receive [games clear‼ v]\nshow\nset [ghost v] effect to (100)\ngo to [front v] layer\nrepeat (10)\n    change [ghost v] effect by (-10)\n    change y by (-2)\nend\n\nwhen [timer v] > (0)\nhide\n\n@Moon\n\nwhen flag clicked\ngo to x: (189) y: (132)\nset size to (100) %\nforever\n    go to [back v] layer\n    repeat (10)\n        change size by (1)\n        wait (0.05) seconds\n    end\n    repeat (10)\n        change size by (-1)\n        wait (0.05) seconds\n    end\nend\n\n@Key\n\nwhen I receive [次どぞ v]\nwait (0.2) seconds\nif <(Stage) = [4]> then\n    switch costume to (key:normal v)\n    go to x: (-169) y: (134)\n    create clone of (_myself_ v)\nend\nif <(Stage) = [5]> then\n    switch costume to (key:normal v)\n    go to x: (-91) y: (-25)\n    create clone of (_myself_ v)\n    switch costume to (key:red v)\n    go to x: (198) y: (149)\n    create clone of (_myself_ v)\nend\nif <(Stage) = [9]> then\n    switch costume to (key:blue v)\n    go to x: (-113) y: (150)\n    create clone of (_myself_ v)\nend\nif <(Stage) = [11]> then\n    switch costume to (key:normal v)\n    go to x: (152) y: (-64)\n    create clone of (_myself_ v)\n    switch costume to (key:red v)\n    go to x: (-187) y: (100)\n    create clone of (_myself_ v)\n    switch costume to (key:blue v)\n    go to x: (-22) y: (144)\n    create clone of (_myself_ v)\n    switch costume to (key:esper v)\n    go to x: (139) y: (140)\n    create clone of (_myself_ v)\nend\n\nwhen [timer v] > (0)\nhide\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nif <<<touching color (#ffe166)?> or <touching color (#ff6666)?>> or <<touching color (#49a2ff)?> or <touching color (#ff4abf)?>>> then\n    delete this clone\nelse\n    show\n    wait until <touching (esper v)?>\n    if <(costume [number v]) = [1]> then\n        set [key v] to [1]\n    end\n    if <(costume [number v]) = [2]> then\n        set [key v] to [2]\n    end\n    if <(costume [number v]) = [3]> then\n        set [key v] to [3]\n    end\n    if <(costume [number v]) = [4]> then\n        set [key v] to [4]\n    end\n    repeat until <(Key) = [0]>\n        go to (esper v)\n    end\n    delete this clone\nend\n\nwhen I receive [next stage v]\nset [key v] to [0]\nhide\n\nwhen I receive [next stage v]\nhide\n\n@Spike \n\nwhen flag clicked\ngo to [back v] layer\nshow\nforever\n    switch costume to (Stage)\nend\n\nwhen [timer v] > (0)\nhide\n\nwhen I receive [次どぞ v]\nshow\n\nwhen I receive [next stage v]\nhide\n\n@Wall\n\nwhen I receive [次どぞ v]\ngo to [back v] layer\nhide\nwait (0.2) seconds\nif <(Stage) = [4]> then\n    switch costume to (normal  v)\n    point in direction (0)\n    go to x: (152) y: (-67)\n    create clone of (_myself_ v)\nend\nif <(Stage) = [5]> then\n    switch costume to (normal  v)\n    point in direction (0)\n    go to x: (-96) y: (132)\n    create clone of (_myself_ v)\n    switch costume to (red v)\n    point in direction (0)\n    go to x: (175) y: (-31)\n    create clone of (_myself_ v)\nend\nif <(Stage) = [9]> then\n    switch costume to (updown stair v)\n    point in direction (90)\n    go to x: (-113) y: (-25)\n    create clone of (_myself_ v)\n    switch costume to (blue  v)\n    point in direction (-90)\n    go to x: (41) y: (-23)\n    create clone of (_myself_ v)\nend\nif <(Stage) = [11]> then\n    switch costume to (normal  v)\n    point in direction (180)\n    go to x: (-123) y: (109)\n    create clone of (_myself_ v)\n    switch costume to (red v)\n    point in direction (-90)\n    go to x: (-24) y: (126)\n    create clone of (_myself_ v)\n    switch costume to (blue  v)\n    point in direction (-90)\n    go to x: (128) y: (123)\n    create clone of (_myself_ v)\n    switch costume to (esper v)\n    point in direction (0)\n    go to x: (227) y: (-79)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset [ghost v] effect to (0)\nif <<<touching color (#f8de6d)?> or <touching color (#fa656a)?>> or <<touching color (#68d8fc)?> or <touching color (#000000)?>>> then\n    delete this clone\nelse\n    show\n    forever\n        if <touching (key v)?> then\n            if <(Key) = (costume [number v])> then\n                set [key v] to [0]\n                repeat (4)\n                    change [ghost v] effect by (25)\n                end\n                delete this clone\n            else\n                wait until <touching (key v)?>\n            end\n        end\n        if <(costume [number v]) = [5]> then\n            glide (1.5) secs to x: (-113) y: (85)\n            glide (1.5) secs to x: (-113) y: (-25)\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [next stage v]\nhide\n\n@Warp hall\n\nwhen flag clicked\nforever\n    if <<(Stage) = [7]> or <(Stage) = [10]>> then\n        if <(Stage) = [7]> then\n            go to x: (1) y: (-132)\n        end\n        if <(Stage) = [10]> then\n            go to x: (150) y: (-72)\n        end\n        if <(Stage) = [11]> then\n            go to x: (85) y: (-41)\n        end\n        show\n        turn right (60) degrees\n    else\n        hide\n    end\nend\n\n@Follow\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    if <(Stage) = [8]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen [timer v] > (0)\nhide\n\n@サムネイル\n\nwhen flag clicked\nhide\n\nwhen [timer v] > (0)\ngo to [front v] layer\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\n@skip\n\nwhen flag clicked\nshow\n\nwhen I receive [games clear‼ v]\nforever\n    hide\nend\n\nwhen I receive [next stage v]\nhide\n\nwhen I receive [次どぞ v]\ngo to [front v] layer\nshow\n\nwhen this sprite clicked\nbroadcast (Next Stage v)\n\nwhen [timer v] > (0)\nhide\n\n@Next!\n\nwhen I receive [next stage v]\ngo to [front v] layer\nhide\nstart sound [High Whoosh v]\nclone [1]\nwait (0.05) seconds\nclone [2]\nwait (0.05) seconds\nclone [3]\nwait (0.05) seconds\nclone [4]\nwait (0.05) seconds\nclone [5]\nwait (1.5) seconds\nbroadcast (次どぞ v)\n\nset [color v] effect to (pick random (-250) to (250))\n\ndefine clone (cloneid)\nswitch costume to (cloneid)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nif <<(costume [number v]) = [1]> or <<(costume [number v]) = [2]> or <<(costume [number v]) = [3]> or <<(costume [number v]) = [4]> or <(costume [number v]) = [5]>>>>> then\n    go to x: (468) y: (0)\n    repeat until <(round (x position)) = [0]>\n        change x by (((0) - (x position)) / (4))\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [1]> then\n    wait (1.2) seconds\n    repeat until <[465] < (x position)>\n        change x by ((1) + ((x position) / (3)))\n    end\n    delete this clone\nend\nif <(costume [number v]) = [2]> then\n    wait (1.1) seconds\n    repeat until <[465] < (x position)>\n        change x by ((1) + ((x position) / (3)))\n    end\n    delete this clone\nend\nif <(costume [number v]) = [3]> then\n    wait (1) seconds\n    repeat until <[465] < (x position)>\n        change x by ((1) + ((x position) / (3)))\n    end\n    delete this clone\nend\nif <(costume [number v]) = [4]> then\n    wait (0.9) seconds\n    repeat until <[465] < (x position)>\n        change x by ((1) + ((x position) / (3)))\n    end\n    delete this clone\nend\nif <(costume [number v]) = [5]> then\n    wait (0.8) seconds\n    repeat until <[330] < (x position)>\n        change x by ((1) + ((x position) / (3)))\n    end\n    delete this clone\nend\n\n