Cat Platformer

Instructions: IMPORTANT: Double clicking the flag will fix most bugs. Don't forget to do that!\n\nWelcome to Terraformer, a Terraria inspired Survival Platformer using pen stamps to generate semi-random levels where you can build, fight and mine. \nCONTROLS:\nWAD to move\nHold left click to use item\n1-9 number keys or click slots to change hotbar slot\nR to reset player position (use this to get out of the cave if it is too hard to jump back up)\nS to crouch\nZ to switch to solid block type\nX to switch to background block type\nLeft and right arrow keys to change direction of block\nClick the arrow facing down to open inventory\nHOW TO PLAY:\nIn this game, your goal is to build with the blocks you obtain by mining, and get gold from the slimes living in the caves. You can buy more things using the gold in Deryll's shop. To reach the cave, simply mine straight down. If you build anything you'd like to share, remix this project with a screenshot. \nNOTES:\nDouble click flag, fullscreen so you can see\nYou will likely encounter some sort of bug while playing. Leave any bug reports or suggestions in the comments!\nSpeak to Deryll, he has a lot more tips if you need them.\nOh and also, no advertising.\n\nHeart and star or I will take those coins you got

@Stage\n\nwhen backdrop switches to [backdrop21 v]\nask [Secret Code] and wait\nif <(answer) = [Crazybeast999]> then\n    switch backdrop to (backdrop30 v)\nend\n\nwhen backdrop switches to [backdrop31 v]\nask [Secret Code 2.0] and wait\nif <(answer) = [Crazybeast999]> then\n    switch backdrop to (backdrop23 v)\nend\n\nwhen backdrop switches to [backdrop31 v]\nif <not <(answer) = [Crazybeast999]>> then\n    ask [Secret Code 2.0] and wait\nend\n\nwhen backdrop switches to [backdrop21 v]\nif <not <(answer) = [Crazybeast999]>> then\n    ask [Secret Code] and wait\nend\n\n@Sprite1\n\ndefine Move\nforever\n    if <key (right arrow v) pressed?> then\n        change [xv v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((xv) * (0.9))\n    change x by (xv)\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (1)\n                        if <touching color (#000000)?> then\n                            change x by ((xv) * (-1))\n                            change y by (-5)\n                            if <key (up arrow v) pressed?> then\n                                if <(xv) > [0]> then\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\n                                end\n                                set [yv v] to [10]\n                            else\n                                set [yv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (yv)\n    if <touching color (#000000)?> then\n        change y by ((yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#000000)?> then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [15]\n        end\n    end\n    change y by (1)\nend\n\nwhen flag clicked\nMove\n\nwhen flag clicked\nhide\nwait (4) seconds\nshow\nswitch backdrop to (backdrop1 v)\nswitch costume to (costume1 v)\ngo to x: (-158) y: (-22)\nforever\n    if <touching color (#ff9999)?> then\n        set [xy v] to [0]\n        set [yv v] to [0]\n        go to x: (-136) y: (-93)\n    end\n    if <touching color (#ff0000)?> then\n        go to x: (-136) y: (-93)\n        switch backdrop to (next backdrop v)\n    end\n    if <key (r v) pressed?> then\n        go to x: (-136) y: (-93)\n    end\n    if <touching color (#99ffff)?> then\n        set [yv v] to [20]\n    end\n    if <touching color (#99ffbb)?> then\n        set [xv v] to [20]\n    end\nend\n\ngo to (random position v)\n\n@Sprite2\n\nwhen flag clicked\ngo to x: (0) y: (0)\nwait (3) seconds\nforever\n    play sound [DEAF KEV - Invincible \[NCS Release\].mp3 v] until done\nend\n\nwhen flag clicked\nshow\nwait (3) seconds\nrepeat (50)\n    change [ghost v] effect by (10)\nend\n\n