Sunlight platformer

Instructions: In English:\nUse arrow keys \nor use WASD.\n\nPo Polsku:\nRuszasz się strzałkami\nalbo "WASD" (w - w górę, a - w lewo, d - w prawo)\nNaciśnij spację, aby przejść do następnego poziomu.

@Stage\n\n@Player\n\nwhen I receive [waidomość6 v]\nask [] and wait\nsay (answer) for (2) seconds\n\nwhen I receive [wiadomośćblue v]\nforever\n    if <key (any v) pressed?> then\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            switch costume to (blue right v)\n        end\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            switch costume to (blue left v)\n        end\n        if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n            switch costume to (blue right up v)\n        end\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n            switch costume to (blue left up v)\n        end\n    else\n        switch costume to (blue normal v)\n    end\nend\n\nwhen I receive [wiadomośćred v]\nforever\n    if <key (any v) pressed?> then\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            switch costume to (red right v)\n        end\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            switch costume to (red left v)\n        end\n        if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n            switch costume to (red right up v)\n        end\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n            switch costume to (left red up v)\n        end\n    else\n        switch costume to (red normal v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (water v)?> then\n        change [y v] by (1.5)\n        if <<<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> or <key (w v) pressed?>> then\n            change [y v] by (1.5)\n        end\n        if <<<key (down arrow v) pressed?> or <<mouse down?> and <(y position) > (mouse y)>>> or <key (s v) pressed?>> then\n            change [y v] by (-1.5)\n        end\n    end\nend\n\nwhen flag clicked\nset size to (100) %\ngo to x: (-185) y: (-114)\nshow\nset [x v] to [0]\nset [y v] to [0]\nforever\n    point in direction (90)\n    change [y v] by (-1)\n    if <<<key (left arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> or <key (a v) pressed?>> then\n        change [x v] by (-1)\n    end\n    if <<<key (right arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> or <key (d v) pressed?>> then\n        change [x v] by (1)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (-4)\n        change x by ((x) * (-1))\n        if <<<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> or <key (w v) pressed?>> then\n            set [y v] to [15]\n            if <([abs v] of (x) ) = (x)> 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    change y by (y)\n    if <touching (level v)?> then\n        change y by ((y) - ((y) * (2)))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<<<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> or <key (w v) pressed?>> and <touching (level v)?>> then\n        set [y v] to [15]\n    end\n    change y by (1)\nend\n\nwhen I receive [wiadomośćgreen v]\nforever\n    if <key (any v) pressed?> then\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            switch costume to (green right v)\n        end\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            switch costume to (green left v)\n        end\n        if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n            switch costume to (green right up v)\n        end\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n            switch costume to (green left up v)\n        end\n    else\n        switch costume to (green normal v)\n    end\nend\n\nwhen I receive [wiadomośćblack v]\nforever\n    if <key (any v) pressed?> then\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            switch costume to (right v)\n        end\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            switch costume to (left v)\n        end\n        if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n            switch costume to (right up v)\n        end\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n            switch costume to (left up v)\n        end\n    else\n        switch costume to (normal v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<<<<<<<touching (duszek1 v)?> or <touching (duszek2 v)?>> or <touching (duszek3 v)?>> or <touching (duszek4 v)?>> or <touching (saws v)?>> or <touching (saws1 v)?>> or <touching (saws2 v)?>> or <touching (saws3 v)?>> or <touching (saws4 v)?>> then\n        go to x: (-185) y: (-114)\n    end\n    if <(y position) < [-150]> then\n        go to x: (-185) y: (-114)\n    end\n    if <(x position) > [210]> then\n        broadcast (wiadomość1 v)\n        go to x: (-185) y: (-114)\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (any v) pressed?> then\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            switch costume to (right v)\n        end\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            switch costume to (left v)\n        end\n        if <<<key (right arrow v) pressed?> and <key (up arrow v) pressed?>> or <<key (w v) pressed?> and <key (d v) pressed?>>> then\n            switch costume to (right up v)\n        end\n        if <<<key (left arrow v) pressed?> and <key (up arrow v) pressed?>> or <<key (w v) pressed?> and <key (a v) pressed?>>> then\n            switch costume to (left up v)\n        end\n    else\n        switch costume to (normal v)\n    end\nend\n\nwhen I receive [wiadomosć5 v]\nhide\n\nwhen [space v] key pressed\nbroadcast (wiadomość1 v)\ngo to x: (-185) y: (-114)\n\n@Level\n\nwhen I receive [wiadomość1 v]\nnext costume\n\nwhen flag clicked\nshow\nswitch costume to (kostium1 v)\n\nwhen I receive [wiadomosć5 v]\nhide\n\n@Trail thingy\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    hide\n    go to [back v] layer\n    go to (player v)\n    create clone of (_myself_ v)\n    if <(level) = [11]> then\n        forever\n            hide\n        end\n    end\nend\n\nwhen I start as a clone\nshow\nclear graphic effects\ngo to [back v] layer\nset [ghost v] effect to (50)\ngo [forward v] (1) layers\nrepeat (10)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\nwhen I receive [wiadomośćgreen v]\nswitch costume to (costume2 v)\n\nwhen I receive [wiadomośćblue v]\nswitch costume to (costume3 v)\n\nwhen I receive [wiadomośćred v]\nswitch costume to (costume4 v)\n\nwhen I receive [wiadomośćblack v]\nswitch costume to (costume1 v)\n\nwhen I receive [wiadomosć5 v]\nhide\n\n@Duszek1\n\nwhen flag clicked\nhide\nset [level v] to [1]\ngo to x: (41) y: (-106)\nforever\n    if <<<(level) = [3]> or <(level) = [4]>> or <(level) = [5]>> then\n        broadcast (wiadomość2 v)\n    end\nend\n\nwhen I receive [wiadomość2 v]\nshow\nif <(level) = [3]> then\n    go to x: (41) y: (-105)\nend\nif <(level) = [4]> then\n    go to x: (72) y: (-105)\nend\nif <(level) = [5]> then\n    go to x: (105) y: (102)\nend\n\nwhen flag clicked\nforever\n    if <not <<<(level) = [3]> or <(level) = [4]>> or <(level) = [5]>>> then\n        hide\n    end\nend\n\nwhen I receive [wiadomość1 v]\nchange [level v] by (1)\n\n@Duszek2\n\nwhen flag clicked\nhide\ngo to x: (150) y: (-106)\n\nwhen I receive [wiadomość2 v]\nshow\nif <(level) = [3]> then\n    go to x: (150) y: (-105)\nend\nif <(level) = [4]> then\n    go to x: (23) y: (-105)\nend\nif <(level) = [5]> then\n    go to x: (155) y: (102)\nend\n\nwhen flag clicked\nforever\n    if <not <<<(level) = [3]> or <(level) = [4]>> or <(level) = [5]>>> then\n        hide\n    end\nend\n\n@Duszek3\n\nwhen flag clicked\nhide\ngo to x: (-77) y: (-105)\n\nwhen I receive [wiadomość2 v]\nshow\nif <(level) = [3]> then\n    go to x: (-77) y: (-105)\nend\nif <(level) = [4]> then\n    go to x: (119) y: (-105)\nend\nif <(level) = [5]> then\n    go to x: (205) y: (102)\nend\n\nwhen flag clicked\nforever\n    if <not <<(level) = [3]> or <(level) = [4]>>> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <<<(level) = [3]> or <(level) = [4]>> or <(level) = [5]>>> then\n        hide\n    end\nend\n\n@Duszek4\n\nwhen I receive [wiadomość2 v]\nif <(level) = [5]> then\n    show\n    go to x: (55) y: (102)\nend\n\nwhen flag clicked\nforever\n    if <not <(level) = [5]>> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <<<(level) = [3]> or <(level) = [4]>> or <(level) = [5]>>> then\n        hide\n    end\nend\n\n@Shop \n\nwhen flag clicked\nset [zmienna1 v] to [2]\nshow\ngo to x: (-190) y: (-153)\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        if <(zmienna1) = [2]> then\n            broadcast (wiadomość3 v)\n            wait (0.1) seconds\n            set [zmienna1 v] to [1]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<touching (mouse-pointer v)?> or <not <touching (mouse-pointer v)?>>> and <mouse down?>> then\n        if <(zmienna1) = [1]> then\n            broadcast (wiadomość4 v)\n            wait (0.1) seconds\n            set [zmienna1 v] to [2]\n        end\n    end\nend\n\n@Chat\n\nwhen flag clicked\ngo to x: (-120) y: (-153)\nshow\n\nwhen this sprite clicked\nbroadcast (waidomość6 v)\n\n@Green Outfit\n\nwhen flag clicked\nhide\ngo to x: (0) y: (100)\n\nwhen I receive [wiadomość3 v]\nshow\n\nwhen this sprite clicked\nbroadcast (wiadomośćgreen v)\n\nwhen I receive [wiadomość4 v]\nhide\n\n@Blue Outfit\n\nwhen flag clicked\nhide\ngo to x: (0) y: (30)\n\nwhen I receive [wiadomość3 v]\nshow\n\nwhen this sprite clicked\nbroadcast (wiadomośćblue v)\n\nwhen I receive [wiadomość4 v]\nhide\n\n@Red Outfit\n\nwhen flag clicked\nhide\ngo to x: (0) y: (-40)\n\nwhen I receive [wiadomość3 v]\nshow\n\nwhen this sprite clicked\nbroadcast (wiadomośćred v)\n\nwhen I receive [wiadomość4 v]\nhide\n\n@Shop\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\n\nwhen I receive [wiadomość3 v]\nshow\n\nwhen I receive [wiadomość4 v]\nhide\n\n@Water\n\nwhen flag clicked\nswitch costume to (kostium1 v)\nhide\nforever\n    go to [back v] layer\nend\n\nwhen I receive [wiadomość1 v]\nwait (0.01) seconds\nif <<(level) = [5]> or <(level) = [6]>> then\n    show\n    if <(level) = [5]> then\n        switch costume to (kostium1 v)\n        go to x: (120) y: (-165)\n        repeat until <not <(level) = [5]>>\n            glide (0.7) secs to x: (120) y: (-150)\n            glide (0.7) secs to x: (120) y: (-165)\n        end\n    end\n    if <(level) = [6]> then\n        switch costume to (kostium2 v)\n        go to x: (45) y: (-127)\n        repeat until <not <(level) = [6]>>\n            glide (0.7) secs to x: (45) y: (-112)\n            glide (0.7) secs to x: (45) y: (-127)\n        end\n    end\nelse\n    hide\nend\n\n@Black Outfit\n\nwhen flag clicked\nhide\ngo to x: (0) y: (-110)\n\nwhen I receive [wiadomość4 v]\nhide\n\nwhen I receive [wiadomość3 v]\nshow\n\nwhen flag clicked\nhide\ngo to x: (0) y: (-110)\n\nwhen this sprite clicked\nbroadcast (wiadomośćblack v)\n\n@Saws\n\nwhen I receive [wiadomość1 v]\nwait (0.01) seconds\nif <<<<(level) = [7]> or <(level) = [8]>> or <(level) = [9]>> or <(level) = [10]>> then\n    show\n    if <(level) = [7]> then\n        go to x: (-65) y: (-130)\n    end\n    if <(level) = [8]> then\n        go to x: (0) y: (-130)\n    end\n    if <(level) = [9]> then\n        go to x: (-65) y: (-140)\n    end\n    if <(level) = [10]> then\n        go to x: (-70) y: (-130)\n        repeat until <not <(level) = [10]>>\n            glide (0.8) secs to x: (-70) y: (-20)\n            wait (0.1) seconds\n            glide (0.8) secs to x: (-70) y: (-130)\n            wait (0.1) seconds\n        end\n    end\nelse\n    hide\nend\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nforever\n    go to [back v] layer\n    turn right (10) degrees\nend\n\n@Saws1\n\nwhen I receive [wiadomość1 v]\nwait (0.01) seconds\nif <<<<(level) = [7]> or <(level) = [8]>> or <(level) = [9]>> or <(level) = [10]>> then\n    show\n    if <(level) = [7]> then\n        go to x: (75) y: (-130)\n    end\n    if <(level) = [8]> then\n        go to x: (0) y: (41)\n    end\n    if <(level) = [9]> then\n        go to x: (0) y: (-140)\n    end\n    if <(level) = [10]> then\n        go to x: (80) y: (-130)\n        repeat until <not <(level) = [10]>>\n            glide (0.8) secs to x: (80) y: (-20)\n            wait (0.1) seconds\n            glide (0.8) secs to x: (80) y: (-130)\n            wait (0.1) seconds\n        end\n    end\nelse\n    hide\nend\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nforever\n    go to [back v] layer\n    turn right (10) degrees\nend\n\n@Saws2\n\nwhen I receive [wiadomość1 v]\nwait (0.01) seconds\nif <(level) = [9]> then\n    show\n    if <(level) = [9]> then\n        go to x: (65) y: (-140)\n    end\nelse\n    hide\nend\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nforever\n    go to [back v] layer\n    turn right (10) degrees\nend\n\n@Saws3\n\nwhen I receive [wiadomość1 v]\nwait (0.01) seconds\nif <(level) = [9]> then\n    show\n    if <(level) = [9]> then\n        go to x: (130) y: (-140)\n    end\nelse\n    hide\nend\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nforever\n    go to [back v] layer\n    turn right (10) degrees\nend\n\n@Saws4\n\nwhen I receive [wiadomość1 v]\nwait (0.01) seconds\nif <(level) = [9]> then\n    show\n    if <(level) = [9]> then\n        go to x: (195) y: (-140)\n    end\nelse\n    hide\nend\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nforever\n    go to [back v] layer\n    turn right (10) degrees\nend\n\n@Duszek5\n\nwhen flag clicked\nset size to (100) %\nswitch costume to (kostium1 v)\nshow\nwait (0.7) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nforever\n    go to [front v] layer\n    if <(level) = [11]> then\n        broadcast (wiadomosć5 v)\n        switch costume to (kostium2 v)\n        show\n        repeat (20)\n            change [ghost v] effect by (-5)\n        end\n        wait (3) seconds\n        switch costume to (kostium1 v)\n        stop [all v]\n    end\nend\n\n