sketch platformer 2

Instructions: + 3 new stage\n+ new mechanic (Hold down the mouse button) R erase all\n+ boss\n14.10:\nboss już działa : D\n

@Stage\n\nwhen I receive [next level v]\nnext backdrop\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nforever\n    play sound [Bubblegum K v] until done\nend\n\nwhen backdrop switches to [backdrop10 v]\nstop [other scripts in sprite v]\n\n@lf_UI\n\nwhen I receive [alert v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nshow\nswitch costume to (costume2 v)\ngo to x: (0) y: (50)\nrepeat until <(y position) < [0.2]>\n    change [ghost v] effect by (-10)\n    change y by (((0) - (y position)) / (7))\nend\nwait (4) seconds\nrepeat until <(y position) > [50]>\n    change [ghost v] effect by (10)\n    change y by (((y position) + (5)) / (5))\nend\nhide\n\n@Level\n\nwhen [r v] key pressed\nerase all\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [play v]\nswitch costume to (1 v)\nshow\n\nwhen I receive [next level v]\nerase all\nnext costume\n\n@Detector\n\nwhen flag clicked\nshow\nset [@id v] to [1]\ncreate clone of (_myself_ v)\nset [@id v] to [2]\ncreate clone of (_myself_ v)\nset [stared? v] to [0]\nset [loved? v] to [0]\nwait until <<(Stared?) = [1]> and <(Loved?) = [1]>>\nwait (0.1) seconds\nbroadcast (alert v)\n\nwhen I start as a clone\nshow\ngo to x: (-15) y: (0)\nif <(@id) = [1]> then\n    switch costume to (fave v)\n    forever\n        if <touching (mouse-pointer v)?> then\n            wait (0.03) seconds\n            if <touching (mouse-pointer v)?> then\n                set [stared? v] to ((1) - (Stared?))\n                wait until <not <touching (mouse-pointer v)?>>\n                wait (0.05) seconds\n            end\n        end\n    end\nelse\n    if <(@id) = [2]> then\n        switch costume to (love v)\n        forever\n            if <touching (mouse-pointer v)?> then\n                wait (0.03) seconds\n                if <touching (mouse-pointer v)?> then\n                    set [loved? v] to ((1) - (Loved?))\n                    wait until <not <touching (mouse-pointer v)?>>\n                    wait (0.05) seconds\n                end\n            end\n        end\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\nset [ghost v] effect to (50)\nforever\n    if <touching (mouse-pointer v)?> then\n        set [ghost v] effect to (0)\n    else\n        set [ghost v] effect to (50)\n    end\nend\n\nwhen flag clicked\nforever\n    show\n    wait (2) seconds\n    hide\n    wait (5) seconds\nend\n\n@Danger\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\ngo to x: (0) y: (0)\n\n@pen\n\nwhen flag clicked\nset pen (saturation v) to (0)\nset pen (brightness v) to (35)\nforever\n    set pen size to (pick random (5) to (9.2))\nend\n\nwhen flag clicked\nforever\n    if <mouse down?> then\n        go to (mouse-pointer v)\n        pen down\n        repeat until <<not <mouse down?>> or <touching color (#ff6767)?>>\n            go to (mouse-pointer v)\n        end\n        if <touching color (#ff6767)?> then\n            pen up\n            wait (1) seconds\n            go to (gofcio v)\n        end\n    end\n    pen up\nend\n\n@Gofcio\n\nwhen flag clicked\nerase all\nbroadcast (PLAY v)\nshow\nswitch costume to (kostium2 v)\nset size to (100) %\ngo to x: (-210) y: (0)\nset rotation style [left-right v]\nhide variable [y v]\nhide variable [x v]\nset [y v] to [0]\nset [x v] to [0]\nforever\n    change [y v] by (-1)\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [x v] by (-1)\n        point in direction (-90)\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [x v] by (1)\n        point in direction (90)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <<touching (level v)?> or <touching color (#5a5a5a)?>> then\n        change y by (1)\n    end\n    if <<touching (level v)?> or <touching color (#5a5a5a)?>> then\n        change y by (1)\n    end\n    if <<touching (level v)?> or <touching color (#5a5a5a)?>> then\n        change y by (1)\n    end\n    if <<touching (level v)?> or <touching color (#5a5a5a)?>> then\n        change y by (1)\n    end\n    if <<touching (level v)?> or <touching color (#5a5a5a)?>> then\n        change y by (-4)\n        change x by ((x) * (-1))\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [y v] to [17]\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    change y by (y)\n    if <<touching (level v)?> or <touching color (#5a5a5a)?>> 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 <key (w v) pressed?>> and <<touching (level v)?> or <touching color (#5a5a5a)?>>> then\n        set [y v] to [15]\n    end\n    change y by (1)\n    if <<<touching (danger v)?> or <(mouse y) = [-187]>> or <touching color (#ff6767)?>> then\n        set rotation style [all around v]\n        repeat (10)\n            change size by (-10)\n            change [ghost v] effect by (10)\n            turn right (15) degrees\n        end\n        clear graphic effects\n        set size to (100) %\n        set rotation style [left-right v]\n        point in direction (90)\n        go to x: (-210) y: (0)\n        set [y v] to [0]\n        set [x v] to [0]\n    end\n    if <(x position) > [240]> then\n        broadcast (Next Level v)\n        go to x: (-210) y: (0)\n        set [y v] to [0]\n        set [x v] to [0]\n    end\n    if <touching (trampolines v)?> then\n        set [y v] to [15]\n    end\n    if <<key (up arrow v) pressed?> and <touching (trampolines v)?>> then\n        set [y v] to [20]\n    end\nend\n\n@boss\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nif <(cloneID) = [0]> then\n    switch costume to (obraz3 v)\n    repeat (15)\n        change size by (10)\n    end\n    delete this clone\nend\nif <(cloneID) = [1]> then\n    switch costume to (obraz5 v)\n    repeat (15)\n        change size by (30)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nset pen color to (#ff6666)\nset pen size to (5)\nif <(cloneID) = [2]> then\n    pen down\n    repeat until <<touching (gofcio v)?> or <<touching (level v)?> or <touching color (#595959)?>>>\n        move (7) steps\n        set size to (20) %\n        switch costume to (obraz5 v)\n    end\n    delete this clone\nend\n\nwhen backdrop switches to [backdrop10 v]\nshow\nset size to (100) %\nswitch costume to (obraz2 v)\nset [brightness v] effect to (0)\nclear sound effects\nstart sound [pillar_man_theme v]\nsay [only I can be a character in platformers]\nset [cloneid v] to [0]\nrepeat (5)\n    create clone of (_myself_ v)\n    wait (0.4) seconds\nend\nwait (0.4) seconds\nchange [cloneid v] by (2)\nrepeat until <touching (gofcio v)?>\n    repeat (10)\n        create clone of (_myself_ v)\n        point towards (gofcio v)\n        wait (0.1) seconds\n    end\n    wait (5) seconds\nend\nswitch costume to (obraz1 v)\nsay [you will die with me]\nrepeat (100)\n    change [brightness v] effect by (1)\n    change volume by (-1)\nend\nset [cloneid v] to [1]\ncreate clone of (_myself_ v)\nhide\nerase all\nstop [other scripts in sprite v]\n\n@InkedScreenshot_1_LI\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (100)\n\n