Draw Your Platformer
@Stage\n\nwhen flag clicked\nset pen color to (#2fe20b)\nerase all\nforever\n    \nend\n\n@Ball\n\nwhen flag clicked\nshow variable [type v]\nshow\nswitch costume to (costume1 v)\nset [y velocity v] to [0]\nset [x velocity v] to [0]\ngo to x: (-214) y: (-95)\nforever\n    if <key (right arrow v) pressed?> then\n        change [x velocity v] by (1)\n        switch costume to (costume1 v)\n    end\n    if <key (left arrow v) pressed?> then\n        change [x velocity v] by (-1)\n        switch costume to (costume2 v)\n    end\n    set [x velocity v] to ((x velocity) * (.9))\n    change x by (x velocity)\n    if <touching color (#05ff00)?> then\n        change y by (1)\n        if <touching color (#05ff00)?> then\n            change y by (1)\n            if <touching color (#05ff00)?> then\n                change y by (1)\n                if <touching color (#05ff00)?> then\n                    change y by (1)\n                    if <touching color (#05ff00)?> then\n                        change y by (1)\n                        if <touching color (#05ff00)?> then\n                            change x by ((x velocity) * (-1))\n                            change y by (-5)\n                        end\n                        if <key (up arrow v) pressed?> then\n                            if <(x velocity) > [0]> then\n                                set [x velocity v] to [-5]\n                            else\n                                set [x velocity v] to [5]\n                            end\n                            set [y velocity v] to [10]\n                        else\n                            set [x velocity v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y velocity v] by (-1)\n    change y by (y velocity)\n    if <touching color (#05ff00)?> then\n        change y by ((y velocity) * (-1))\n        set [y velocity v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#05ff00)?> then\n        if <key (up arrow v) pressed?> then\n            change [y velocity v] by (15)\n        end\n    end\n    change y by (1)\n    if <(x position) > [245]> then\n        change [level v] by (1)\n        set [y velocity v] to [0]\n        set [x velocity v] to [0]\n        go to x: (-214) y: (-95)\n        erase all\n    end\n    if <touching color (#ff0000)?> then\n        go to x: (-214) y: (-95)\n    end\n    if <(y position) < [-150]> then\n        go to x: (-214) y: (-95)\n    end\n    if <touching color (#faff00)?> then\n        set [y velocity v] to [20]\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nswitch costume to (ground v)\nset pen size to (5)\nset pen color to (#04ff00)\nerase all\nforever\n    set [type v] to (costume [name v])\n    go to (mouse-pointer v)\n    if <mouse down?> then\n        pen down\n    else\n        pen up\n    end\n    set pen size to ((10) + (<(type) = [Eraser]> * (10)))\n    if <(type) = [Ground]> then\n        set pen color to (#04ff00)\n    else\n        if <(type) = [Lava]> then\n            set pen color to (#ff0000)\n        else\n            if <(type) = [Eraser]> then\n                set pen color to (#00d1ff)\n            else\n                set pen color to (#faff00)\n            end\n        end\n    end\nend\n\nwhen [space v] key pressed\nnext costume\n\n@Sprite2\n\nwhen flag clicked\nhide\n\nshow\nhide variable [type v]\n\n
--------BUILDING LEVELS------\n\nHold and drag your mouse across the screen to build. Press space to switch between types.\n