Elemental crystals the platformer

Instructions: Press green flag few times.\nInstructions in game.\nr to restart\ns to skip a level\n\nSTORYLINE\nThe world is very dangerous for balls. They can't defend themselves. They can only jump. You want to save them. The elemental crystals can create completely new world, without any dangers, where balls can live happily. But the crystals are hidden and it's very hard to get them.

@Stage\n\nwhen I receive [message1 v]\nswitch backdrop to (tło2 v)\nwait until <(level) = [15]>\nswitch backdrop to (tło3 v)\nwait until <(level) = [19]>\nswitch backdrop to (tło4 v)\nwait until <(level) = [24]>\nswitch backdrop to (tło5 v)\nwait until <(level) = [28]>\nswitch backdrop to (tło6 v)\nwait until <(level) = [30]>\nrepeat until <(level) = [33]>\n    switch backdrop to (tło5 v)\n    wait (4) seconds\n    switch backdrop to (tło7 v)\n    wait (0.01) seconds\n    switch backdrop to (tło5 v)\n    wait (0.1) seconds\n    switch backdrop to (tło7 v)\n    wait (0.01) seconds\nend\nswitch backdrop to (tło6 v)\nwait until <(level) = [34]>\nswitch backdrop to (tło8 v)\nwait until <(level) = [37]>\nswitch backdrop to (tło3 v)\n\nwhen flag clicked\nswitch backdrop to (tło1 v)\nforever\n    play sound [Vexento - Pixel Party v] until done\nend\n\nwhen [s v] key pressed\nif <not <<(level) = [9]> or <<<(level) = [18]> or <(level) = [27]>> or <<(level) = [36]> or <(level) = [45]>>>>> then\n    change [level v] by (1)\n    broadcast (dead v)\n    wait until <not <key (s v) pressed?>>\nend\n\nwhen [r v] key pressed\nbroadcast (dead v)\nwait until <not <key (r v) pressed?>>\n\n@Player\n\nwhen flag clicked\nset [xv v] to [0]\nset [yv v] to [0]\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 (sprite2 v)?> or <<touching (disappearing ground1 v)?> or <touching (disappearing ground2 v)?>>> then\n        change y by (1)\n        if <<touching (sprite2 v)?> or <<touching (disappearing ground1 v)?> or <touching (disappearing ground2 v)?>>> then\n            change y by (1)\n            if <<touching (sprite2 v)?> or <<touching (disappearing ground1 v)?> or <touching (disappearing ground2 v)?>>> then\n                change y by (1)\n                if <<touching (sprite2 v)?> or <<touching (disappearing ground1 v)?> or <touching (disappearing ground2 v)?>>> then\n                    change y by (1)\n                    if <<touching (sprite2 v)?> or <<touching (disappearing ground1 v)?> or <touching (disappearing ground2 v)?>>> then\n                        change y by (1)\n                        if <<touching (sprite2 v)?> or <<touching (disappearing ground1 v)?> or <touching (disappearing ground2 v)?>>> 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                                change [yv v] by (5)\n                            else\n                                set [xv 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 (sprite2 v)?> or <<touching (disappearing ground1 v)?> or <touching (disappearing ground2 v)?>>> then\n        change y by ((yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <<touching (sprite2 v)?> or <<touching (disappearing ground1 v)?> or <touching (disappearing ground2 v)?>>> 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\nset [level v] to [1]\ngo to x: (-220) y: (-100)\nforever\n    if <(x position) > [230]> then\n        if <not <(level) = [9]>> then\n            go to x: (-220) y: (-100)\n            change [level v] by (1)\n        else\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (danger v)?> or <touching (danger2 v)?>> then\n        go to x: (-220) y: (-100)\n        broadcast (dead v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (slowing thing v)?> then\n        repeat until <not <touching (slowing thing v)?>>\n            set [yv v] to [0]\n            if <<not <key (right arrow v) pressed?>> and <not <key (left arrow v) pressed?>>> then\n                set [xv v] to [0]\n            end\n            if <key (right arrow v) pressed?> then\n                set [xv v] to [1]\n            end\n            if <key (left arrow v) pressed?> then\n                set [xv v] to [-1]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (bounce v)?> then\n        set [yv v] to [20]\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (teleport1 v)?> and <([costume # v] of [teleport1 v]) = [1]>> then\n        go to (teleport2 v)\n        change y by (10)\n        wait (2) seconds\n    end\n    if <<touching (teleport2 v)?> and <([costume # v] of [teleport2 v]) = [1]>> then\n        go to (teleport1 v)\n        change y by (10)\n        wait (2) seconds\n    end\n    if <<touching (teleport3 v)?> and <([costume # v] of [teleport3 v]) = [1]>> then\n        go to (teleport4 v)\n        change y by (10)\n        wait (2) seconds\n    end\n    if <<touching (teleport4 v)?> and <([costume # v] of [teleport4 v]) = [1]>> then\n        go to (teleport3 v)\n        change y by (10)\n        wait (2) seconds\n    end\n    if <<touching (teleport5 v)?> and <([costume # v] of [teleport5 v]) = [1]>> then\n        go to (teleport6 v)\n        change y by (10)\n        wait (2) seconds\n    end\n    if <<touching (teleport6 v)?> and <([costume # v] of [teleport6 v]) = [1]>> then\n        go to (teleport5 v)\n        change y by (10)\n        wait (2) seconds\n    end\nend\n\nwhen I receive [message1 v]\nset [level v] to [10]\ngo to x: (-220) y: (-100)\n\nwhen I receive [message2 v]\nset [level v] to [19]\ngo to x: (-220) y: (-100)\n\nwhen flag clicked\nforever\n    if <<(level) > [18]> and <(level) < [28]>> then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [5]\n        else\n            set [yv v] to [-1]\n        end\n    end\nend\n\nwhen I receive [message3 v]\nset [level v] to [28]\ngo to x: (-220) y: (-100)\n\nset [level v] to [30]\n\nwhen I receive [message4 v]\nset [level v] to [37]\ngo to x: (-220) y: (-100)\n\nwhen I receive [4th crystal v]\nstop [other scripts in sprite v]\n\nwhen I receive [dead v]\ngo to x: (-220) y: (-100)\n\n@Sprite2\n\nwhen flag clicked\nset [ghost v] effect to (100)\nforever\n    switch costume to (level)\nend\n\nset [ghost v] effect to (0)\n\nset [level v] to [18]\n\n@Sprite3\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    switch costume to ([costume # v] of [sprite2 v])\nend\n\n@Danger\n\nwhen flag clicked\nshow\ngo to x: (-27) y: (10)\npoint in direction (90)\nforever\n    switch costume to ([costume # v] of [sprite2 v])\nend\n\nwhen flag clicked\nwait until <(level) = [12]>\ngo to x: (234) y: (130)\nhide\nrepeat until <(level) = [13]>\n    show\n    point in direction (-127)\n    repeat until <(y position) < [-180]>\n        move (10) steps\n    end\n    wait (0.5) seconds\n    go to x: (234) y: (130)\nend\n\nwhen flag clicked\nwait until <(level) = [17]>\ngo to x: (180) y: (-100)\nhide\nset rotation style [left-right v]\nrepeat until <(level) = [18]>\n    show\n    point in direction (-90)\n    glide (2) secs to x: (-180) y: (-100)\n    point in direction (90)\n    glide (2) secs to x: (180) y: (-100)\nend\n\nwhen flag clicked\nforever\n    if <<<<not <(level) = [17]>> and <not <(level) = [12]>>> and <not <(level) = [22]>>> and <not <(level) = [25]>>> then\n        go to x: (-27) y: (10)\n        point in direction (90)\n    end\nend\n\nwhen flag clicked\nwait until <(level) = [22]>\ngo to x: (-27) y: (10)\nhide\nset rotation style [don't rotate v]\nrepeat until <(level) = [23]>\n    show\n    point in direction (90)\n    glide (2) secs to x: (-27) y: (75)\n    point in direction (90)\n    glide (2) secs to x: (-27) y: (10)\nend\n\nwhen flag clicked\nwait until <(level) = [25]>\ngo to x: (-160) y: (40)\nhide\nset rotation style [left-right v]\nrepeat until <(level) = [26]>\n    show\n    point in direction (90)\n    glide (2) secs to x: (-5) y: (40)\n    point in direction (-90)\n    glide (2) secs to x: (-160) y: (40)\nend\n\nwhen flag clicked\nwait until <(level) = [32]>\ngo to x: (-27) y: (10)\nhide\nset rotation style [don't rotate v]\nrepeat until <(level) = [33]>\n    show\n    point in direction (90)\n    glide (2) secs to x: (220) y: (10)\n    point in direction (-90)\n    glide (2) secs to x: (-27) y: (10)\nend\n\nset [level v] to [45]\n\n@Slowing thing\n\nwhen flag clicked\nforever\n    switch costume to ([costume # v] of [sprite2 v])\nend\n\n@Bounce\n\nwhen flag clicked\nforever\n    switch costume to ([costume # v] of [sprite2 v])\nend\n\nset [level v] to [40]\n\n@Teleport1\n\nwhen flag clicked\nswitch costume to (active v)\nhide\nwait until <(level) = [7]>\nshow\ngo to x: (-60) y: (-128)\nwait until <(level) = [8]>\nshow\nswitch costume to (off v)\nwait until <(level) = [9]>\nhide\nwait until <(level) = [15]>\ngo to x: (-70) y: (-128)\nshow\nswitch costume to (off v)\nwait until <(level) = [16]>\nhide\nwait until <(level) = [18]>\ngo to x: (-161) y: (101)\nshow\nswitch costume to (active v)\nwait until <(level) = [19]>\nhide\nwait until <(level) = [25]>\ngo to x: (73) y: (50)\nshow\nswitch costume to (hidden v)\nwait until <(level) = [26]>\nhide\n\nwhen I receive [pressed v]\nif <(level) = [8]> then\n    switch costume to (active v)\nend\nif <(level) = [15]> then\n    switch costume to (active v)\nend\nif <(level) = [25]> then\n    switch costume to (active v)\nend\n\n@Teleport2\n\nwhen flag clicked\nswitch costume to (active v)\nhide\nwait until <(level) = [7]>\nshow\ngo to x: (81) y: (-128)\nwait until <(level) = [8]>\nshow\nswitch costume to (off v)\nwait until <(level) = [9]>\nhide\nwait until <(level) = [15]>\ngo to x: (81) y: (-128)\nshow\nswitch costume to (off v)\nwait until <(level) = [16]>\nhide\nwait until <(level) = [18]>\ngo to x: (160) y: (-127)\nshow\nswitch costume to (active v)\nwait until <(level) = [19]>\nhide\nwait until <(level) = [25]>\ngo to x: (204) y: (50)\nshow\nswitch costume to (hidden v)\nwait until <(level) = [26]>\nhide\n\nwhen I receive [pressed v]\nif <(level) = [8]> then\n    switch costume to (active v)\nend\nif <(level) = [15]> then\n    switch costume to (active v)\nend\nif <(level) = [25]> then\n    switch costume to (active v)\nend\n\n@Magic of teleports\n\nwhen flag clicked\nhide\nwait until <(level) = [7]>\nrepeat until <not <(level) = [7]>>\n    create clone of (_myself_ v)\n    wait (0.1) seconds\nend\n\nwhen I start as a clone\nset [brightness v] effect to (pick random (-25) to (25))\nset [ghost v] effect to (50)\nshow\nif <[1] = (pick random (1) to (2))> then\n    go to (teleport1 v)\n    change x by (pick random (-20) to (20))\n    repeat (10)\n        change y by (2)\n        change [ghost v] effect by (5)\n    end\n    hide\nelse\n    go to (teleport2 v)\n    change x by (pick random (-20) to (20))\n    repeat (10)\n        change y by (2)\n        change [ghost v] effect by (5)\n    end\n    hide\nend\n\nwhen I receive [pressed v]\n\nif <(level) = [8]> then\n    repeat until <not <(level) = [8]>>\n        create clone of (_myself_ v)\n        wait (0.1) seconds\n    end\nend\n\n@Button\n\nwhen flag clicked\nhide\nwait until <(level) = [8]>\nshow\nswitch costume to (not pressed v)\ngo to x: (-58) y: (-24)\nwait until <touching (player v)?>\nswitch costume to (pressed v)\nbroadcast (pressed v)\nwait until <(level) = [9]>\nhide\nwait until <(level) = [15]>\nshow\nswitch costume to (not pressed v)\ngo to x: (-214) y: (122)\nwait until <touching (player v)?>\nswitch costume to (pressed v)\nbroadcast (pressed v)\nwait until <(level) = [16]>\nhide\nwait until <(level) = [25]>\nshow\nswitch costume to (not pressed hidden v)\ngo to x: (172) y: (-130)\nwait until <touching (player v)?>\nswitch costume to (pressed v)\nbroadcast (pressed v)\nwait until <(level) = [26]>\nhide\n\nwhen flag clicked\nforever\n    if <not <<(level) = [8]> or <<(level) = [25]> or <(level) = [15]>>>> then\n        hide\n    end\nend\n\nwhen flag clicked\nhide\nwait until <(level) = [15]>\nshow\nswitch costume to (not pressed v)\ngo to x: (-214) y: (122)\nwait until <touching (player v)?>\nswitch costume to (pressed v)\nbroadcast (pressed v)\nwait until <(level) = [16]>\nhide\nwait until <(level) = [25]>\nshow\nswitch costume to (not pressed hidden v)\ngo to x: (172) y: (-130)\nwait until <touching (player v)?>\nswitch costume to (pressed v)\nbroadcast (pressed v)\nwait until <(level) = [26]>\nhide\n\nwhen flag clicked\nhide\nwait until <(level) = [15]>\nshow\nswitch costume to (not pressed v)\ngo to x: (-214) y: (122)\nwait until <touching (player v)?>\nswitch costume to (pressed v)\nbroadcast (pressed v)\nwait until <(level) = [16]>\nhide\n\n@Magic of teleports2\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nset [brightness v] effect to (pick random (-25) to (25))\nset [ghost v] effect to (50)\nshow\nif <[1] = (pick random (1) to (2))> then\n    go to (teleport1 v)\n    change x by (pick random (-20) to (20))\n    repeat (10)\n        change y by (2)\n        change [ghost v] effect by (5)\n    end\n    hide\nelse\n    go to (teleport2 v)\n    change x by (pick random (-20) to (20))\n    repeat (10)\n        change y by (2)\n        change [ghost v] effect by (5)\n    end\n    hide\nend\n\nwhen I receive [pressed v]\nif <(level) = [8]> then\n    repeat until <not <(level) = [8]>>\n        create clone of (_myself_ v)\n        wait (0.1) seconds\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nhide\nforever\n    go to [front v] layer\n    if <(level) = [9]> then\n        if <([x position v] of [player v]) > [230]> then\n            switch costume to (kostium1 v)\n            set [brightness v] effect to (100)\n            show\n            repeat (10)\n                change [brightness v] effect by (-10)\n            end\n            wait until <key (space v) pressed?>\n            repeat (10)\n                change [brightness v] effect by (10)\n            end\n            hide\n            set [level v] to [10]\n            broadcast (message1 v)\n        end\n    end\nend\n\nwhen I receive [1st crystal v]\nswitch costume to (kostium3 v)\nset [brightness v] effect to (100)\nshow\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\nwait until <key (space v) pressed?>\nrepeat (10)\n    change [brightness v] effect by (10)\nend\nswitch costume to (kostium2 v)\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\nwait until <key (space v) pressed?>\nrepeat (10)\n    change [brightness v] effect by (10)\nend\nhide\nset [level v] to [19]\nbroadcast (message2 v)\n\nwhen I receive [2nd crystal v]\nswitch costume to (kostium4 v)\nset [brightness v] effect to (100)\nshow\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\nwait until <key (space v) pressed?>\nrepeat (10)\n    change [brightness v] effect by (10)\nend\nswitch costume to (kostium5 v)\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\nwait until <key (space v) pressed?>\nrepeat (10)\n    change [brightness v] effect by (10)\nend\nhide\nset [level v] to [28]\nbroadcast (message3 v)\n\nwhen I receive [3rd crystal v]\nswitch costume to (kostium6 v)\nset [brightness v] effect to (100)\nshow\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\nwait until <key (space v) pressed?>\nrepeat (10)\n    change [brightness v] effect by (10)\nend\nswitch costume to (kostium7 v)\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\nwait until <key (space v) pressed?>\nrepeat (10)\n    change [brightness v] effect by (10)\nend\nhide\nset [level v] to [37]\nbroadcast (message4 v)\n\nwhen I receive [4th crystal v]\nswitch costume to (kostium8 v)\nset [brightness v] effect to (100)\nshow\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\nwait until <key (space v) pressed?>\nrepeat (10)\n    change [brightness v] effect by (10)\nend\nswitch costume to (kostium9 v)\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\nstop [all v]\n\n@Disappearing ground1\n\nwhen flag clicked\nset [ghost v] effect to (0)\nhide\n\nwhen flag clicked\nwait until <(level) = [13]>\nswitch costume to (kostium13 v)\nshow\ngo to x: (-107) y: (-11)\nrepeat until <not <(level) = [13]>>\n    if <<(yv) = [0]> and <<((x position) + (30)) > ([x position v] of [player v])> and <((x position) - (30)) < ([x position v] of [player v])>>> then\n        wait (2) seconds\n        repeat (5)\n            change [ghost v] effect by (20)\n            change y by (-1)\n        end\n        hide\n    end\nend\nhide\n\nwhen I receive [dead v]\nif <(level) = [13]> then\n    go to x: (-107) y: (-11)\n    show\n    set [ghost v] effect to (0)\nend\nif <(level) = [35]> then\n    go to x: (-107) y: (-11)\n    show\n    set [ghost v] effect to (0)\nend\n\nwhen flag clicked\nwait until <(level) = [35]>\nswitch costume to (kostium1 v)\nshow\ngo to x: (-107) y: (-11)\nset [ghost v] effect to (0)\nrepeat until <not <(level) = [35]>>\n    if <<(yv) = [0]> and <<((x position) + (65)) > ([x position v] of [player v])> and <((x position) - (65)) < ([x position v] of [player v])>>> then\n        wait (2) seconds\n        repeat (5)\n            change [ghost v] effect by (20)\n            change y by (-1)\n        end\n        hide\n    end\nend\nhide\n\n@Disappearing ground2\n\nwhen flag clicked\nhide\nset [ghost v] effect to (0)\n\nwhen flag clicked\ngo to x: (76) y: (93)\nwait until <(level) = [13]>\nshow\nrepeat until <not <(level) = [13]>>\n    if <<(yv) = [0]> and <<((x position) + (30)) > ([x position v] of [player v])> and <((x position) - (30)) < ([x position v] of [player v])>>> then\n        wait (2) seconds\n        repeat (5)\n            change [ghost v] effect by (20)\n            change y by (-1)\n        end\n        hide\n    end\nend\nhide\n\nwhen I receive [dead v]\nif <(level) = [13]> then\n    go to x: (76) y: (93)\n    show\n    set [ghost v] effect to (0)\nend\n\n@Magic of teleports3\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nset [brightness v] effect to (pick random (-25) to (25))\nset [ghost v] effect to (50)\nshow\nif <[1] = (pick random (1) to (2))> then\n    go to (teleport1 v)\n    change x by (pick random (-20) to (20))\n    repeat (10)\n        change y by (2)\n        change [ghost v] effect by (5)\n    end\n    hide\nelse\n    go to (teleport2 v)\n    change x by (pick random (-20) to (20))\n    repeat (10)\n        change y by (2)\n        change [ghost v] effect by (5)\n    end\n    hide\nend\n\nwhen I receive [pressed v]\nif <(level) = [15]> then\n    repeat until <not <(level) = [15]>>\n        create clone of (_myself_ v)\n        wait (0.1) seconds\n    end\nend\n\n@Teleport3\n\nwhen flag clicked\nswitch costume to (active v)\nhide\nwait until <(level) = [15]>\nshow\ngo to x: (-74) y: (26)\nwait until <(level) = [16]>\nhide\nwait until <(level) = [18]>\nshow\ngo to x: (-29) y: (102)\nswitch costume to (off v)\nwait until <(level) = [19]>\nhide\n\nwhen I receive [pressed2 v]\nif <(level) = [18]> then\n    switch costume to (active v)\nend\n\n@Teleport4\n\nwhen flag clicked\nswitch costume to (active v)\nhide\nwait until <(level) = [15]>\nshow\ngo to x: (-74) y: (125)\nwait until <(level) = [16]>\nhide\nwait until <(level) = [18]>\nshow\ngo to x: (-160) y: (-36)\nswitch costume to (off v)\nwait until <(level) = [19]>\nhide\n\nwhen I receive [pressed2 v]\nif <(level) = [18]> then\n    switch costume to (active v)\nend\n\n@Magic of teleports4\n\nwhen flag clicked\nhide\nwait until <(level) = [15]>\nrepeat until <not <(level) = [15]>>\n    create clone of (_myself_ v)\n    wait (0.1) seconds\nend\n\nwhen I start as a clone\nset [brightness v] effect to (pick random (-25) to (25))\nset [ghost v] effect to (50)\nshow\nif <[1] = (pick random (1) to (2))> then\n    go to (teleport3 v)\n    change x by (pick random (-20) to (20))\n    repeat (10)\n        change y by (2)\n        change [ghost v] effect by (5)\n    end\n    hide\nelse\n    go to (teleport4 v)\n    change x by (pick random (-20) to (20))\n    repeat (10)\n        change y by (2)\n        change [ghost v] effect by (5)\n    end\n    hide\nend\n\nwhen I receive [pressed v]\n\nif <(level) = [8]> then\n    repeat until <not <(level) = [8]>>\n        create clone of (_myself_ v)\n        wait (0.1) seconds\n    end\nend\n\n@Magic of teleports5\n\nwhen flag clicked\nhide\nwait until <(level) = [18]>\nrepeat until <not <(level) = [18]>>\n    create clone of (_myself_ v)\n    wait (0.1) seconds\nend\n\nwhen I start as a clone\nset [brightness v] effect to (pick random (-25) to (25))\nset [ghost v] effect to (50)\nshow\nif <[1] = (pick random (1) to (2))> then\n    go to (teleport1 v)\n    change x by (pick random (-20) to (20))\n    repeat (10)\n        change y by (2)\n        change [ghost v] effect by (5)\n    end\n    hide\nelse\n    go to (teleport2 v)\n    change x by (pick random (-20) to (20))\n    repeat (10)\n        change y by (2)\n        change [ghost v] effect by (5)\n    end\n    hide\nend\n\nwhen I receive [pressed v]\n\nif <(level) = [8]> then\n    repeat until <not <(level) = [8]>>\n        create clone of (_myself_ v)\n        wait (0.1) seconds\n    end\nend\n\n@Button2\n\nwhen flag clicked\nhide\nwait until <(level) = [18]>\nshow\nswitch costume to (not pressed v)\ngo to x: (172) y: (-38)\nwait until <touching (player v)?>\nswitch costume to (pressed v)\nbroadcast (pressed2 v)\nwait until <(level) = [19]>\nhide\n\n@Magic of teleports6\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nset [brightness v] effect to (pick random (-25) to (25))\nset [ghost v] effect to (50)\nshow\nif <[1] = (pick random (1) to (2))> then\n    go to (teleport3 v)\n    change x by (pick random (-20) to (20))\n    repeat (10)\n        change y by (2)\n        change [ghost v] effect by (5)\n    end\n    hide\nelse\n    go to (teleport4 v)\n    change x by (pick random (-20) to (20))\n    repeat (10)\n        change y by (2)\n        change [ghost v] effect by (5)\n    end\n    hide\nend\n\nwhen I receive [pressed2 v]\nif <(level) = [18]> then\n    repeat until <not <(level) = [18]>>\n        create clone of (_myself_ v)\n        wait (0.1) seconds\n    end\nend\n\n@Teleport5\n\nwhen flag clicked\nswitch costume to (active v)\nhide\nwait until <(level) = [18]>\nshow\ngo to x: (83) y: (103)\nswitch costume to (off v)\nwait until <(level) = [19]>\nhide\n\nwhen I receive [pressed3 v]\nif <(level) = [18]> then\n    switch costume to (active v)\nend\n\n@Teleport6\n\nwhen flag clicked\nswitch costume to (active v)\nhide\nwait until <(level) = [18]>\nshow\ngo to x: (1) y: (-36)\nswitch costume to (off v)\nwait until <(level) = [19]>\nhide\n\nwhen I receive [pressed3 v]\nif <(level) = [18]> then\n    switch costume to (active v)\nend\n\n@Magic of teleports7\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nset [brightness v] effect to (pick random (-25) to (25))\nset [ghost v] effect to (50)\nshow\nif <[1] = (pick random (1) to (2))> then\n    go to (teleport5 v)\n    change x by (pick random (-20) to (20))\n    repeat (10)\n        change y by (2)\n        change [ghost v] effect by (5)\n    end\n    hide\nelse\n    go to (teleport6 v)\n    change x by (pick random (-20) to (20))\n    repeat (10)\n        change y by (2)\n        change [ghost v] effect by (5)\n    end\n    hide\nend\n\nwhen I receive [pressed3 v]\nif <(level) = [18]> then\n    repeat until <not <(level) = [18]>>\n        create clone of (_myself_ v)\n        wait (0.1) seconds\n    end\nend\n\n@Button3\n\nwhen flag clicked\nhide\nwait until <(level) = [18]>\nshow\nswitch costume to (not pressed v)\ngo to x: (-103) y: (-38)\nwait until <touching (player v)?>\nswitch costume to (pressed v)\nbroadcast (pressed3 v)\nwait until <(level) = [19]>\nhide\n\nset [level v] to [17]\n\n@Sprite4\n\nwhen flag clicked\nhide\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nwait until <(level) = [18]>\nswitch costume to (kostium1 v)\nshow\ngo to x: (65) y: (17)\nwait until <touching (player v)?>\nbroadcast (1st crystal v)\nhide\nwait until <(level) = [19]>\n\nwhen flag clicked\nwait until <(level) = [27]>\nswitch costume to (kostium2 v)\nshow\ngo to x: (65) y: (17)\nwait until <touching (player v)?>\nbroadcast (2nd crystal v)\nhide\nwait until <(level) = [28]>\n\nwhen flag clicked\nwait until <(level) = [36]>\nswitch costume to (kostium3 v)\nshow\ngo to x: (23) y: (-88)\nwait until <touching (player v)?>\nbroadcast (3rd crystal v)\nhide\nwait until <(level) = [37]>\n\nwhen flag clicked\nwait until <(level) = [45]>\nswitch costume to (kostium4 v)\nshow\ngo to x: (23) y: (-88)\nwait until <touching (player v)?>\nbroadcast (4th crystal v)\nhide\n\nwait until <(level) = [37]>\n\n@Sprite5\n\nwhen flag clicked\nhide\nwait until <(level) > [18]>\nswitch costume to (kostium1 v)\nshow\ngo to [front v] layer\nset [ghost v] effect to (50)\nwait until <(level) > [27]>\nhide\nwait until <(level) > [29]>\nswitch costume to (kostium2 v)\nshow\ngo to [front v] layer\nset [ghost v] effect to (50)\nwait until <(level) > [32]>\nhide\n\n@Sprite6\n\nwhen flag clicked\ngo [backward v] (30) layers\nhide\nwait until <(level) > [23]>\nforever\n    if <(level) < [28]> then\n        show\n        go to (player v)\n    else\n        hide\n    end\nend\n\n@Magic of teleports8\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nset [brightness v] effect to (pick random (-25) to (25))\nset [ghost v] effect to (50)\nshow\nif <[1] = (pick random (1) to (2))> then\n    go to (teleport1 v)\n    change x by (pick random (-20) to (20))\n    repeat (10)\n        change y by (2)\n        change [ghost v] effect by (5)\n    end\n    hide\nelse\n    go to (teleport2 v)\n    change x by (pick random (-20) to (20))\n    repeat (10)\n        change y by (2)\n        change [ghost v] effect by (5)\n    end\n    hide\nend\n\nwhen I receive [pressed v]\nif <(level) = [25]> then\n    repeat until <not <(level) = [25]>>\n        create clone of (_myself_ v)\n        wait (0.1) seconds\n    end\nend\n\n@Danger2\n\nwhen flag clicked\nhide\nwait until <(level) = [38]>\nshow\nswitch costume to (kostium1 v)\nrepeat until <(level) = [39]>\n    wait (2) seconds\n    show\n    repeat (5)\n        next costume\n        wait (0.1) seconds\n    end\n    hide\nend\nhide\n\n@Duszek1\n\nwhen flag clicked\nhide\n\n