Platformer test


@Stage\n\n@player\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nset [player_x v] to [150]\nset [power_x v] to [0]\nset [power_y v] to [0]\nset size to (100) %\nset [mode v] to [1]\nforever\n    if <(Mode) = [1]> then\n        if <key (right arrow v) pressed?> then\n            point in direction (90)\n            if <key (down arrow v) pressed?> then\n                change [power_x v] by (0.25)\n            else\n                change [power_x v] by (1)\n            end\n        end\n        if <key (left arrow v) pressed?> then\n            point in direction (-90)\n            if <key (down arrow v) pressed?> then\n                change [power_x v] by (-0.25)\n            else\n                change [power_x v] by (-1)\n            end\n        end\n        set [power_x v] to ((Power_X) * (0.9))\n        change x by (Power_X)\n        if <touching color (#000000)?> then\n            change y by (2)\n            if <touching color (#000000)?> then\n                change y by (2)\n                if <touching color (#000000)?> then\n                    change y by (2)\n                    if <touching color (#000000)?> then\n                        change y by (2)\n                        if <touching color (#000000)?> then\n                            change y by (2)\n                            if <touching color (#000000)?> then\n                                change x by ((Power_X) * (-1))\n                                set [power_x v] to ((Power_X) * (1))\n                                set [power_x v] to [0]\n                                change x by (-1)\n                                change y by (-10)\n                                change x by (1)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change y by (Power_Y)\n        if <touching color (#000000)?> then\n            change y by ((Power_Y) * (-1))\n            set [power_y v] to [0]\n        end\n        change y by (-2)\n        if <key (up arrow v) pressed?> then\n            if <touching color (#000000)?> then\n                set [power_y v] to [15]\n            end\n        end\n        if <touching color (#ff0101)?> then\n            set [player_x v] to [150]\n            set [power_x v] to [0]\n            set [power_y v] to [0]\n            go to x: (0) y: (0)\n        end\n        if <key (down arrow v) pressed?> then\n            if <touching color (#000000)?> then\n                switch costume to (gorem2 v)\n            else\n                change [power_y v] by (-5)\n            end\n        else\n            switch costume to (gorem v)\n            change [power_y v] by (-1.2)\n        end\n        change y by (2)\n        change [player_x v] by (x position)\n        set x to (0)\n    else\n        if <key (d v) pressed?> then\n            change [player_x v] by (10)\n        end\n        if <key (a v) pressed?> then\n            change [player_x v] by (-10)\n        end\n    end\nend\n\nwhen [c v] key pressed\nset [mode v] to [0]\n\nwhen [p v] key pressed\nset [mode v] to [1]\n\nwhen I receive [jump v]\n\nif <[0.05] < (timer)> then\n    broadcast (jump v)\nend\n\nreset timer\nrepeat until <[0.05] < (timer)>\n    if <not <key (up arrow v) pressed?>> then\n        set [power_y v] to [12.5]\n        stop [this script v]\n    end\nend\n\n@stage\n\ndefine Costume\nswitch costume to (letter (Block_X) of (item (Block_Y) of [mapdate v]))\nif <(letter (Block_X) of (item (Block_Y) of [mapdate v])) = (costume [number v])> then\n    show\nelse\n    switch costume to (3 v)\n    show\nend\n\nwhen I start as a clone\nshow\nset size to (100) %\nforever\n    if <<<(x position) > [240]> or <(x position) < [-240]>> or <<(y position) > [180]> or <(y position) < [-180]>>> then\n        switch costume to (blank v)\n    end\n    go to x: (((-210) + ((Block_X) * (50))) - (Player_X)) y: (((205) - ((Block_Y) * (50))) + (0))\n    if <(x position) > [270]> then\n        change [block_x v] by (-11)\n        hide\n    end\n    if <[-270] > (x position)> then\n        change [block_x v] by (11)\n        hide\n    end\n    if <(y position) > [240]> then\n        change [block_y v] by (9)\n        hide\n    end\n    if <[-240] > (y position)> then\n        change [block_y v] by (-9)\n        hide\n    end\n    Costume\n    if <(Mode) = [1]> then\nend\n\nwhen flag clicked\nset size to (100) %\nset [count v] to [0]\nset [block_y v] to [0]\nMapCreate\nhide\n\ndefine MapCreate\nrepeat (9)\n    change [block_y v] by (1)\n    set [block_x v] to [0]\n    repeat (11)\n        change [block_x v] by (1)\n        create clone of (_myself_ v)\n    end\nend\n\ndefine Block?\nif <key (1 v) pressed?> then\n    set [block? v] to [1]\nend\nif <key (2 v) pressed?> then\n    set [block? v] to [2]\nend\nif <key (3 v) pressed?> then\n    set [block? v] to [3]\nend\nif <key (4 v) pressed?> then\n    set [block? v] to [4]\nend\n\ndefine DateUpdate\nset [count v] to [0]\ndelete all of [dateupdater v]\nrepeat (length of (item (Block_Y) of [mapdate v]))\n    change [count v] by (1)\n    add (letter (count) of (item (Block_Y) of [mapdate v])) to [dateupdater v]\nend\nreplace item (Block_X) of [dateupdater v] with (Block?)\nset [n v] to []\nset [count v] to [0]\nrepeat (length of [dateupdater v])\n    change [count v] by (1)\n    set [n v] to (join (N) (item (count) of [dateupdater v]))\nend\nreplace item (Block_Y) of [mapdate v] with (N)\n\n