Platformer 1.3

Instructions: come on and play\n\nspace/up arrow-jump\nd/right arrow-right\na/left arrow-left\n

@Stage\n\n@kostium1 (3)\n\ndefine ruszaj się\nif <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n    change [speed x v] by (1)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [speed x v] by (-1)\nend\nset [speed x v] to ((speed x) * (0.9))\nchange x by (speed x)\nif <<touching (duszek4 v)?> or <touching (duszek2 v)?>> then\n    change y by (1)\n    if <<touching (duszek4 v)?> or <touching (duszek2 v)?>> then\n        change y by (1)\n        if <<touching (duszek4 v)?> or <touching (duszek2 v)?>> then\n            change y by (1)\n            if <<touching (duszek4 v)?> or <touching (duszek2 v)?>> then\n                change y by (1)\n                if <<touching (duszek4 v)?> or <touching (duszek2 v)?>> then\n                    change y by (-4)\n                    change x by ((speed x) * (-1))\n                    if <<key (space v) pressed?> or <key (up arrow v) pressed?>> then\n                        if <(speed x) > [0]> then\n                            set [speed x v] to [-10]\n                        else\n                            set [speed x v] to [10]\n                        end\n                        set [speed y v] to [13]\n                    else\n                        set [speed x v] to [0]\n                    end\n                end\n            end\n        end\n    end\nend\nchange [speed y v] by (-1)\nchange y by (speed y)\nif <<touching (duszek4 v)?> or <touching (duszek2 v)?>> then\n    change y by ((speed y) * (-1))\n    set [speed y v] to [0]\nend\nchange y by (-1)\nif <<<<touching (duszek4 v)?> and <key (space v) pressed?>> or <<touching (duszek2 v)?> and <key (space v) pressed?>>> or <<<touching (duszek2 v)?> and <key (up arrow v) pressed?>> or <<touching (duszek4 v)?> and <key (up arrow v) pressed?>>>> then\n    set [speed y v] to [13]\nend\nchange y by (1)\n\nwhen flag clicked\nforever\n    change [color v] effect by (25)\n    wait (0.10) seconds\nend\n\nwhen flag clicked\nbroadcast (level 1 v)\nset [sskok v] to [0]\n\nwhen flag clicked\ngo to x: (-213) y: (-74)\n\nwhen flag clicked\nforever\n    ruszaj się\n    create clone of (_myself_ v)\nend\n\nwhen I receive [level 1 v]\nforever\n    if <<(x position) = [241]> and <(y position) > [135]>> then\n        broadcast (koniec 1 lvl v)\n        go to x: (-213) y: (-74)\n        stop [this script v]\n    end\nend\n\nwhen I receive [koniec 1 lvl v]\nforever\n    if <touching (duszek5 v)?> then\n        go to x: (-213) y: (-74)\n    end\nend\n\nwhen flag clicked\nswitch backdrop to (blue sky 2  v)\n\nwhen I receive [koniec 1 lvl v]\nwait (1) seconds\nforever\n    if <<(x position) = [241]> and <(y position) > [103]>> then\n        broadcast (koniec lvl2 v)\n        go to x: (-213) y: (-74)\n        stop [this script v]\n    end\nend\n\nwhen I receive [koniec lvl3 v]\nwait (1) seconds\nforever\n    if <<(x position) = [241]> and <(y position) > [135]>> then\n        broadcast (koniec 4lvl v)\n        go to x: (-213) y: (-74)\n        stop [this script v]\n    end\nend\n\nwhen I receive [koniec lvl2 v]\nwait (1) seconds\nforever\n    if <<(x position) = [241]> and <(y position) > [32]>> then\n        broadcast (koniec lvl3 v)\n        go to x: (-213) y: (-74)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nstop all sounds\nforever\n    play sound [Hello v] until done\nend\n\nwhen flag clicked\nforever\n    set volume to (VOLUME:) %\nend\n\nwhen flag clicked\nset [volume: v] to [100]\n\nwhen I receive [koniec 4lvl v]\nwait (1) seconds\nforever\n    if <<(x position) = [241]> and <(y position) > [129]>> then\n        broadcast (koniec lvl 5 v)\n        go to x: (-213) y: (-74)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nshow\n\nwhen I start as a clone\nswitch costume to (2 v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I start as a clone\nrepeat (4)\n    change [color v] effect by (25)\nend\n\nwhen flag clicked\nswitch costume to (1 v)\nforever\n    if <<<key (up arrow v) pressed?> or <key (space v) pressed?>> and <<<not <key (a v) pressed?>> and <not <key (left arrow v) pressed?>>> and <<not <key (d v) pressed?>> and <not <key (right arrow v) pressed?>>>>> then\n        switch costume to (7 v)\n    else\n        if <<<<key (up arrow v) pressed?> or <key (space v) pressed?>> and <<key (d v) pressed?> or <key (right arrow v) pressed?>>> and <<not <key (left arrow v) pressed?>> and <not <key (a v) pressed?>>>> then\n            switch costume to (3 v)\n        else\n            if <<<key (up arrow v) pressed?> or <key (space v) pressed?>> and <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n                switch costume to (5 v)\n            else\n                if <<<key (d v) pressed?> or <key (right arrow v) pressed?>> and <<not <key (up arrow v) pressed?>> and <not <key (space v) pressed?>>>> then\n                    switch costume to (4 v)\n                else\n                    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> and <<not <key (up arrow v) pressed?>> and <not <key (space v) pressed?>>>> then\n                        switch costume to (6 v)\n                    else\n                        switch costume to (1 v)\n                    end\n                end\n            end\n        end\n    end\nend\n\n@Duszek1\n\nwhen flag clicked\nclear graphic effects\nshow\ngo to [front v] layer\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\n    wait (0.01) seconds\nend\nhide\n\n@Duszek2\n\nwhen flag clicked\nhide\n\nwhen I receive [koniec 4lvl v]\ngo to x: (-6) y: (81)\nshow\nforever\n    glide (1) secs to x: (91) y: (81)\n    glide (1) secs to x: (-6) y: (81)\nend\n\nwhen I receive [koniec lvl 5 v]\nhide\n\n@Duszek3\n\nwhen flag clicked\nhide\ngo to x: (0) y: (8)\n\nwhen I receive [koniec lvl 5 v]\nforever\n    repeat (10)\n        change [color v] effect by (10)\n        wait (0.01) seconds\n    end\n    repeat (10)\n        change [color v] effect by (-10)\n        wait (0.01) seconds\n    end\nend\n\nwhen I receive [koniec lvl 5 v]\nshow\nforever\n    repeat (10)\n        change [ghost v] effect by (10)\n        wait (0.01) seconds\n    end\n    repeat (10)\n        change [ghost v] effect by (-10)\n        wait (0.01) seconds\n    end\nend\n\n@Duszek4\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (kostium1 v)\n\nwhen I receive [koniec 1 lvl v]\nswitch costume to (kostium2 v)\n\nwhen I receive [koniec lvl2 v]\nswitch costume to (kostium3 v)\n\nwhen I receive [koniec lvl3 v]\nswitch costume to (kostium4 v)\n\nwhen I receive [koniec 4lvl v]\nswitch costume to (kostium6 v)\n\nwhen I receive [koniec lvl 5 v]\nswitch costume to (kostium5 v)\n\n@Duszek5\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (kostium1 v)\n\nwhen I receive [koniec 1 lvl v]\nswitch costume to (kostium2 v)\n\nwhen I receive [koniec lvl2 v]\nswitch costume to (kostium3 v)\n\nwhen I receive [koniec lvl3 v]\nswitch costume to (kostium4 v)\n\nwhen I receive [koniec 4lvl v]\nswitch costume to (kostium6 v)\n\nwhen I receive [koniec lvl 5 v]\nswitch costume to (kostium5 v)\n\n