Platformer Builder V1.0 - A #Games

Instructions: Platformer Builder V1.0\n\nHow to Use:\nClick Flag TWICE for blocks to work. Click to place a block. Press start to play your level.\n\nThere is only 1 type of ground.\n\nMake sure to leave a Like and A Fave.\n\nFollow Me @Ryham301 For More.\n\nTags:\n#Games #Platformer #Builder #PlatformerBuilder #Ryham301

@Stage\n\nwhen flag clicked\nswitch backdrop to (black v)\n\nerase all\nswitch backdrop to (thumbnail v)\n\n@Thumbnail\n\nwhen flag clicked\nset [ghost v] effect to (100)\nforever\n    go to x: (0) y: (5)\n    go to [front v] layer\nend\n\n@Player\n\ndefine Run block\nRun Engine\n\ndefine Run Engine\n\nwhen I receive [startgame v]\ngo to x: (-206) y: (20)\nset [y spawn v] to [20]\nset [x spawn v] to [-208]\ngo to x: (X Spawn) y: (Y Spawn)\nswitch costume to (player v)\nswitch backdrop to (cavesbackround v)\nshow\nset size to (50) %\nset [x v] to [0]\nset [y v] to [0]\n\nwhen flag clicked\nhide\n\nwhen I receive [startgame v]\nshow\n\nif <(x position) > [233]> then\nend\n\ngo to x: (X Spawn) y: (Y Spawn)\nset [x v] to [0]\nset [y v] to [0]\n\nwhen flag clicked\ngo to x: (X Spawn) y: (Y Spawn)\n\nwhen I receive [startgame v]\nforever\n    Run block\nend\n\nwhen I receive [startgame v]\ngo to x: (-206) y: (20)\n\nwhen I receive [startgame v]\nforever\n    if <(Yes/No) = [Yes]> then\n        change [y v] by (-0.5)\n        if <<key (left arrow v) pressed?> or <<(x position) > (mouse x)> and <mouse down?>>> then\n            change [x v] by (-0.9)\n            switch costume to (player 2 v)\n        end\n        if <<key (right arrow v) pressed?> or <<(mouse x) > (x position)> and <mouse down?>>> then\n            change [x v] by (0.9)\n            switch costume to (player 1 v)\n        end\n        set [x v] to ((x) * (0.9))\n        change x by (x)\n        if <<touching (ground hitbox v)?> or <touching color (#00ff2c)?>> then\n            change y by (1)\n            if <<touching (ground hitbox v)?> or <touching color (#00ff2c)?>> then\n                change y by (1)\n                if <<touching (ground hitbox v)?> or <touching color (#00ff2c)?>> then\n                    change y by (1)\n                    if <<touching (ground hitbox v)?> or <touching color (#00ff2c)?>> then\n                        change y by (1)\n                        if <<touching (ground hitbox v)?> or <touching color (#00ff2c)?>> then\n                            change y by (1)\n                            if <<touching (ground hitbox v)?> or <touching color (#00ff2c)?>> then\n                                change y by (1)\n                                if <<touching (ground hitbox v)?> or <touching color (#00ff2c)?>> then\n                                    change y by (-6)\n                                    change x by ((x) * (-1))\n                                    if <<key (up arrow v) pressed?> or <<(mouse y) > (y position)> and <mouse down?>>> then\n                                        set [y v] to [9]\n                                        if <(x) > [0]> then\n                                            set [x v] to [-10]\n                                        else\n                                            set [x v] to [10]\n                                        end\n                                    else\n                                        set [x v] to [0]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change y by (y)\n        if <<touching (ground hitbox v)?> or <touching color (#00ff2c)?>> then\n            change y by ((y) * (-1))\n            set [y v] to [0]\n        end\n        change y by (-0.5)\n        if <<<<touching (ground hitbox v)?> or <touching color (#00ff2c)?>> and <key (up arrow v) pressed?>> or <<<touching (ground hitbox v)?> or <touching color (#00ff2c)?>> and <<(mouse y) > (y position)> and <mouse down?>>>> then\n            set [y v] to [9.5]\n        end\n        change y by (0.5)\n        if <touching color (#ff0000)?> then\n            repeat (20)\n                change [ghost v] effect by (5)\n            end\n            go to x: (X Spawn) y: (Y Spawn)\n            repeat (20)\n                change [ghost v] effect by (-5)\n            end\n            set [x v] to [0]\n            set [y v] to [0]\n        end\n    end\nend\n\nwhen I receive [startgame v]\nset y to (-206)\n\nwhen flag clicked\nforever\n    if <<touching (groundxchange v)?> or <touching (groundhit v)?>> then\n        set y to (-206)\n    end\nend\n\nwhen flag clicked\nadd [-206] to [xposition v]\n\nwhen flag clicked\nset [yes/no v] to [No]\n\nwhen I receive [startgame v]\nset [yes/no v] to [Yes]\n\nwhen I receive [startgame v]\ngo to x: (X Spawn) y: (Y Spawn)\n\ngo to x: (-206) y: (-218)\n\nwhen flag clicked\nforever\n    if <touching (portal v)?> then\n        broadcast (You Win v)\n    end\nend\n\nwhen I receive [you win v]\nstop [this script v]\n\n@Play Button\n\nchange size by (((105) - (size)) / (2))\n\nchange size by (((100) - (size)) / (2))\n\nbroadcast (play v)\n\nwhen flag clicked\nshow\n\nwhen I receive [startgame v]\nhide\nstop [this script v]\n\nwhen this sprite clicked\nbroadcast (StartGame v)\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        repeat until <(Brightness) = [5]>\n            change [brightness v] by (1)\n        end\n    else\n        set [brightness v] effect to (Brightness)\n    end\n    if <mouse down?> then\n    end\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nchange [brightness v] effect by (5)\n\nwhen flag clicked\nset [brightness v] to [0]\n\n@Ground HitBox\n\ndefine Snap To Grid\nset x to ((round ((x position) / (48))) * (48))\nset y to ((round ((y position) / (48))) * (48))\n\nwhen [space v] key pressed\nset [costume v] to ((Costume) + (1))\nswitch costume to (5 v)\n\nwhen this sprite clicked\n\nwhen flag clicked\nerase all\nrepeat until <(On/Off) = [Off]>\n    go to (mouse-pointer v)\n    Snap To Grid\nend\n\nwhen I start as a clone\nswitch costume to (1 v)\nshow\nset x to ((round ((x position) / (48))) * (48))\nset y to ((round ((y position) / (48))) * (48))\n\nnext costume\n\nwhen flag clicked\nset [costume v] to [1]\n\nwhen flag clicked\n\nwhen flag clicked\n\nwhen flag clicked\n\nwhen flag clicked\nrepeat until <(On/Off) = [Off]>\n    if <<mouse down?> and <not <touching (play button v)?>>> then\n        create clone of (_myself_ v)\n    end\nend\n\nwhen flag clicked\n\nforever\n\nwhen flag clicked\nset [on/off v] to [On]\n\nwhen I receive [startgame v]\nforever\n    stop [this script v]\nend\n\nwhen I receive [whatever v]\nset [costume2 v] to [1]\n\nforever\n\nbroadcast (Whatever v) and wait\n\nwhen I receive [startgame v]\nset [on/off v] to [Off]\n\nhide\n\nswitch costume to (Costume)\n\nwhen flag clicked\ngo to [back v] layer\n\nforever\n    switch costume to (Costume)\nend\n\nforever\n    if <(Costume) = [6]> then\n        set [costume v] to [1]\n    end\nend\n\nstamp\n\nforever\n\nwhen flag clicked\ngo to [back v] layer\n\nwhen I receive [you win v]\nforever\n    hide\n    stop [this script v]\nend\n\nwhen flag clicked\nshow\n\nset size to (100) %\n\n@YouWin\n\nwhen flag clicked\nhide\n\nwhen I receive [you win v]\ngo to [front v] layer\nshow\n\n@Bootom Lava\n\n@Music\n\nwhen flag clicked\nforever\n    play sound [Music v] until done\nend\n\n@Portal\n\n