90% Pen Platformer
@Stage\n\nwhen flag clicked\nforever\n    play sound [\[Drumstep\] - Tristam  \[Mpgun v] until done\nend\n\n@Sprite1\n\nwhen I receive [the end v]\npoint in direction (90)\nshow\ngo to x: (0) y: (25)\nset size to (100) %\nforever\n    repeat (10)\n        change size by (3)\n    end\n    repeat (10)\n        change size by (-3)\n    end\n    repeat (18)\n        turn right (20) degrees\n    end\n    repeat (10)\n        change size by (3)\n    end\n    repeat (10)\n        change size by (-3)\n    end\n    repeat (18)\n        turn left (20) degrees\n    end\nend\n\nwhen flag clicked\nhide\n\n@Intro \n\nwhen flag clicked\ngo to [front v] layer\ngo to x: (-16) y: (5)\nshow\npoint in direction (90)\nshow\nfade, glide and grow\nwait (1) seconds\nspin out\nwait (0.2) seconds\nbroadcast (intro done v)\n\ndefine fade, glide and grow\ngo to x: (0) y: (-180)\nset size to (1) %\nset [ghost v] effect to (100)\nrepeat (25)\n    change y by (((0) - (y position)) * (0.25))\n    change size by (((100) - (size)) * (0.25))\n    change [ghost v] effect by (-10)\nend\n\ndefine spin out\nrepeat (10)\n    turn right ((3.45) - ((direction) * (0.2))) degrees\n    change size by ((-2) - ((size) / (5)))\n    change [ghost v] effect by (10)\nend\nhide\npoint in direction (90)\n\n@Thumbnail\n\nwhen flag clicked\nshow\nforever\n    reset timer\n    set [ghost v] effect to (100)\n    go to [front v] layer\nend\n\n@Player\n\nwhen flag clicked\nswitch costume to (costume2 v)\nforever\n    if <<<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> or <key (up arrow v) pressed?>> then\n        create clone of (_myself_ v)\n    end\nend\n\nwhen flag clicked\ngo to x: (-216) y: (-141)\nset [level v] to [1]\nshow\nforever\n    go to [back v] layer\n    set [y v] to [0]\n    set [x v] to [0]\n    forever\n        change [y v] by (-1)\n        set [x v] to ((x) * (0.9))\n        if <key (left arrow v) pressed?> then\n            switch costume to (left v)\n            change [x v] by (-1)\n        end\n        if <key (right arrow v) pressed?> then\n            switch costume to (right v)\n            change [x v] by (1)\n        end\n        change x by (x)\n        if <touching color (#00e03d)?> then\n            change y by (1)\n        end\n        if <touching color (#00e03d)?> then\n            change y by (1)\n        end\n        if <touching color (#00e03d)?> then\n            change y by (1)\n        end\n        if <touching color (#00e03d)?> then\n            change y by (1)\n        end\n        if <touching color (#00e03d)?> then\n            change y by (-4)\n            change x by ((x) * (-1))\n            if <key (up arrow v) pressed?> then\n                set [y v] to [10]\n                if <([abs v] of (x) ) = (x)> then\n                    set [x v] to [-4]\n                else\n                    set [x v] to [4]\n                end\n            else\n                set [x v] to [0]\n            end\n        end\n        change y by (y)\n        if <touching color (#00e03d)?> then\n            change y by ((y) - ((y) * (2)))\n            set [y v] to [0]\n        end\n        change y by (-1)\n        if <<key (up arrow v) pressed?> and <touching color (#00e03d)?>> then\n            set [y v] to [15]\n        end\n        change y by (1)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#ff0000)?> then\n        go to x: (-216) y: (-141)\n    end\n    if <(x position) = [239]> then\n        broadcast (Next Level v)\n        change [level v] by (1)\n        go to x: (-216) y: (-141)\n    end\nend\n\nwhen I start as a clone\nrepeat (100)\n    change [ghost v] effect by (15)\n    change size by (-15)\nend\ndelete this clone\n\nwhen flag clicked\nhide\nwait (2) seconds\nshow\n\nwhen I receive [the end v]\nhide\n\nwhen flag clicked\nforever\n    if <key (space v) pressed?> then\n        wait (0.1) seconds\n        next costume\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (1 v) pressed?> then\n        forever\n            wait (0.1) seconds\n            next costume\n        end\n    end\nend\n\n@Pen\n\ndefine draw line from (x) (y) to (x2) (y2) set pen size to (pen size)\ngo to x: (x) y: (y)\nset pen color to (#00e03d)\nset pen size to (pen size)\npen down\ngo to x: (x2) y: (y2)\npen up\n\nwhen flag clicked\ngo to [back v] layer\nerase all\nhide\ndraw line from [-238] [-179] to [240] [-179] set pen size to [50]\n\nwhen I receive [next level v]\nerase all\nif <not <(level) = [800]>> then\n    draw line from [-238] [-179] to [240] [-179] set pen size to [50]\nend\nif <(level) = [1]> then\n    draw line from [-238] [-179] to [240] [-179] set pen size to [30]\nelse\n    if <(level) = [2]> then\n        draw line from [9] [-170] to [9] [100] set pen size to [30]\n    else\n        if <(level) = [3]> then\n            draw lava from [9] [-170] to [9] [-80] set pen size to [30]\n        else\n            if <(level) = [4]> then\n                draw line from [70] [-60] to [-70] [-60] set pen size to [30]\n                draw lava from [70] [-179] to [-70] [-179] set pen size to [50]\n            else\n                if <(level) = [5]> then\n                    draw lava from [-70] [-170] to [-70] [-80] set pen size to [30]\n                    draw lava from [70] [-170] to [70] [-80] set pen size to [30]\n                    draw line from [70] [-10] to [-70] [-10] set pen size to [30]\n                else\n                    if <(level) = [6]> then\n                        draw lava from [-61] [-173] to [-61] [26] set pen size to [30]\n                        draw line from [-80] [-173] to [-80] [26] set pen size to [30]\n                        draw lava from [49] [181] to [49] [-59] set pen size to [30]\n                        draw line from [70] [181] to [70] [-59] set pen size to [30]\n                        draw lava from [152] [-155] to [237] [-155] set pen size to [30]\n                        draw line from [-238] [-179] to [240] [-179] set pen size to [30]\n                    else\n                        if <(level) = [7]> then\n                            draw line from [20] [-179] to [20] [-40] set pen size to [30]\n                            draw line from [20] [-40] to [-200] [-40] set pen size to [30]\n                            draw line from [-50] [-100] to [-250] [-100] set pen size to [30]\n                            draw lava from [60] [-160] to [220] [-160] set pen size to [30]\n                            draw line from [160] [-100] to [160] [50] set pen size to [30]\n                            draw lava from [160] [130] to [160] [200] set pen size to [30]\n                        else\n                            if <(level) = [8]> then\n                                draw lava from [-200] [-179] to [240] [-179] set pen size to [50]\n                                draw line from [-140] [-110] to [-115] [-110] set pen size to [30]\n                                draw line from [130] [-60] to [110] [-60] set pen size to [30]\n                            else\n                                broadcast (The End v)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nif <(level) = [9]> then\n\ndefine draw lava from (x) (y) to (x2) (y2) set pen size to (pen size)\ngo to x: (x) y: (y)\nset pen color to (#ff0000)\nset pen size to (pen size)\npen down\ngo to x: (x2) y: (y2)\npen up\n\nwhen flag clicked\nforever\n    play sound [Xaf - Kaled v] until done\nend\n\n
                       This is still a work in progress\n---------------------------------------------------------------\nThis is my first use of pen ever, and it turned out pretty well.\nEverything is pen except the player itself. I made all the code myself.\nTo change the player color just press space.\n\nEnjoy!!