scrolling platformer

Instructions: welcome to my best project!\ncontrol:\nwasd or arrows\nshoot with the mouse\nwhat to do?\ngo right\nshoot at the black gigi!\nblack bullets are killing you!\ncollect yellow coins!\n\neverything!\n\n\nспасибо @DamKush13 за костюмы

@Stage\n\n@игрок\n\nwhen flag clicked\nстарт\n\ndefine касание земли <вверх>\ngo to x: ((х) - (скроллинг х)) y: ((у) - (скроллинг у))\nset [прыжок? v] to [0]\nrepeat until <not <touching (платформы v)?>>\n    if <вверх> then\n        change [у v] by (-1)\n        set [скорость падения v] to [0]\n    else\n        set [прыжок? v] to [1]\n        change [у v] by (1)\n        set [скорость падения v] to [0]\n    end\n    go to x: ((х) - (скроллинг х)) y: ((у) - (скроллинг у))\nend\n\ndefine (х) (напр) <к>\ngo to x: (((х) + (х)) - (скроллинг х)) y: ((у) - (скроллинг у))\nif <<к> and <not <touching (платформы v)?>>> then\n    point in direction (напр)\n    change [х v] by (х)\nend\n\ndefine скроллинг\nchange [скроллинг х v] by (((х) - (скроллинг х)) / (10))\nchange [скроллинг у v] by ((((у) - (скроллинг у)) / (10)) - (3))\ngo to x: ((х) - (скроллинг х)) y: ((у) - (скроллинг у))\nbroadcast (положение определено v)\nif <(скроллинг х) < [-30]> then\n    set [скроллинг х v] to [-30]\nend\nif <(скроллинг у) < [-20]> then\n    set [скроллинг у v] to [-20]\nend\n\ndefine костюм\nif <(скорость падения) = [0]> then\n    switch costume to (стоять v)\nelse\n    if <(скорость падения) > [0]> then\n        switch costume to (прыжок v)\n    else\n        switch costume to (падать v)\n    end\nend\n\ndefine старт\nset rotation style [left-right v]\nset [наклон v] to [0]\nset [прыжок? v] to [0]\nset [скроллинг х v] to [0]\nset [скроллинг у v] to [0]\nset [х v] to [0]\nset [у v] to [-20]\nset [скорость падения v] to [0]\ngo to x: (0) y: (-20)\n\nwhen flag clicked\nforever\n    if <<touching (враг v)?> or <<touching ( пушка врага v)?> or <touching (спрайт 7 v)?>>> then\n        set [brightness v] effect to (-100)\n        broadcast (-1 жизнь v)\n        wait (0.2) seconds\n        set [brightness v] effect to (0)\n        wait (0.2) seconds\n        set [brightness v] effect to (-100)\n        wait (0.2) seconds\n        set [brightness v] effect to (0)\n        wait (1) seconds\n    end\nend\n\nwhen I receive [рестарт v]\nстарт\n\nwhen I receive [смерть v]\nrepeat (50)\n    switch costume to (смерть v)\nend\n\nwhen I receive [игра старт v]\nforever\n    switch costume to (костюм 1 v)\n    change [скорость падения v] by (-1)\n    change [у v] by (скорость падения)\n    касание земли <(скорость падения) > [0]>\n    [7] [90] <<key (right arrow v) pressed?> or <key (d v) pressed?>>\n    [-7] [-90] <<key (left arrow v) pressed?> or <key (a v) pressed?>>\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(прыжок?) = [1]>> then\n        set [скорость падения v] to [16]\n    end\n    скроллинг\n    костюм\n    broadcast (положение определено v)\nend\n\n@Платформы\n\nwhen I receive [положение определено v]\ngo to x: ((смещение х) - (скроллинг х)) y: (() - (скроллинг у))\nif <<(round ((смещение х) - (скроллинг х))) = (round (x position))> and <(round (() - (скроллинг у))) = (round (y position))>> then\n    show\nelse\n    hide\nend\n\nwhen flag clicked\nswitch costume to (level 1 1 v)\nset [смещение х v] to [0]\nrepeat (20)\n    create clone of (_myself_ v)\n    change [смещение х v] by (480)\n    next costume\nend\n\n@монетка\n\nwhen flag clicked\ngo to [front v] layer\nсоздать\n\nwhen I receive [положение определено v]\ngo to x: ((х монет) - (скроллинг х)) y: ((у монет) - (скроллинг у))\nif <<(round ((х монет) - (скроллинг х))) = (round (x position))> and <(round ((у монет) - (скроллинг у))) = (round (y position))>> then\n    show\nelse\n    hide\nend\nchange [у монет v] by ([cos v] of ((timer) * (500)) )\n\nwhen I start as a clone\nforever\n    if <touching (игрок v)?> then\n        change [монет v] by (1)\n        repeat (10)\n            change size by (-1)\n            change [ghost v] effect by (10)\n        end\n        delete this clone\n    end\nend\n\nwhen I receive [рестарт v]\nrepeat (1)\n    delete this clone\nend\nсоздать\n\ndefine создать\nset [х монет v] to [200]\nset [у монет v] to [0]\ncreate clone of (_myself_ v)\nset [х монет v] to [400]\nset [у монет v] to [100]\ncreate clone of (_myself_ v)\nset [х монет v] to [700]\nset [у монет v] to [0]\ncreate clone of (_myself_ v)\nset [х монет v] to [1110]\nset [у монет v] to [15]\ncreate clone of (_myself_ v)\nset [х монет v] to [1720]\nset [у монет v] to [-15]\ncreate clone of (_myself_ v)\nset [х монет v] to [2500]\nset [у монет v] to [20]\ncreate clone of (_myself_ v)\nset [х монет v] to [3000]\nset [у монет v] to [20]\ncreate clone of (_myself_ v)\nset [х монет v] to [4900]\nset [у монет v] to [50]\ncreate clone of (_myself_ v)\nset [х монет v] to [4900]\nset [у монет v] to [1000]\nset [монет v] to [0]\n\n@Heart\n\nwhen I receive [положение определено v]\ngo to (игрок v)\n\nwhen I receive [-1 жизнь v]\nnext costume\n\nwhen flag clicked\nswitch costume to (heart red v)\nforever\n    if <<<(costume [number v]) = [4]> or <(у) < [-190]>> or <key (r v) pressed?>> then\n        broadcast (смерть v)\n        wait (0.5) seconds\n        broadcast (рестарт v)\n    end\n    wait (1) seconds\nend\n\nwhen I receive [рестарт v]\nswitch costume to (heart red v)\n\n@враг\n\nwhen flag clicked\nсоздать врагов\n\nwhen I receive [положение определено v]\ngo to x: ((смещение х врага) - (скроллинг х)) y: ((смещение у врага) - (скроллинг у))\nif <<(round ((смещение х врага) - (скроллинг х))) = (round (x position))> and <(round ((смещение у врага) - (скроллинг у))) = (round (y position))>> then\n    show\nelse\n    hide\nend\nif <touching (спрайт 2 v)?> then\n    delete this clone\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [1]> then\n    forever\n        switch costume to (nano-d v)\n        wait (pick random (1) to (3)) seconds\n        switch costume to (костюм 1 v)\n        point towards (игрок v)\n        create clone of (_myself_ v)\n    end\nelse\n    if <(direction) > [0]> then\n        repeat (100)\n            change [смещение х врага v] by (6)\n            change [ghost v] effect by (1)\n        end\n    else\n        repeat (100)\n            change [смещение х врага v] by (-6)\n            change [ghost v] effect by (1)\n        end\n    end\n    delete this clone\nend\n\nwhen I receive [рестарт v]\nrepeat (1)\n    delete this clone\nend\nсоздать врагов\n\ndefine создать врагов\nset rotation style [left-right v]\nswitch costume to (nano-d v)\nset [смещение х врага v] to [500]\nset [смещение у врага v] to [90]\ncreate clone of (_myself_ v)\nset [смещение х врага v] to [2060]\nset [смещение у врага v] to [-50]\ncreate clone of (_myself_ v)\nset [смещение х врага v] to [3260]\nset [смещение у врага v] to [40]\ncreate clone of (_myself_ v)\n\n@ Пушка врага\n\nwhen I receive [положение определено v]\ngo to x: ((х пули пушки) - (скроллинг х)) y: ((у пули пушки) - (скроллинг у))\nif <<(round ((х пули пушки) - (скроллинг х))) = (round (x position))> and <(round ((у пули пушки) - (скроллинг у))) = (round (y position))>> then\n    show\nelse\n    hide\nend\n\nwhen flag clicked\nset [х пули пушки v] to [4430]\nset [у пули пушки v] to [200]\nforever\n    switch costume to (guitar-b v)\n    wait (2) seconds\n    switch costume to (guitar-b2 v)\n    create clone of (_myself_ v)\n    wait (0.3) seconds\nend\n\nwhen I start as a clone\nset size to (50) %\nswitch costume to (костюм 1 v)\nchange [х пули пушки v] by (-60)\nrepeat (100)\n    change [х пули пушки v] by (-3)\n    change [у пули пушки v] by (-3)\n    change [ghost v] effect by (0.4)\n    change size by (2)\nend\ndelete this clone\n\n@пушка кота\n\nwhen flag clicked\ngo to [front v] layer\ngo to x: (0) y: (-30)\npoint in direction (90)\n\nwhen I receive [игра старт v]\nforever\n    go to x: ([x position v] of [игрок v]) y: (([y position v] of [игрок v]) - (10))\n    point towards (mouse-pointer v)\nend\n\n@Спрайт 1\n\nwhen flag clicked\nswitch costume to (костюм 1 v)\nset size to (150) %\nswitch costume to (костюм 2 v)\ngo to [back v] layer\nset [смещение х фона v] to [-480]\nrepeat (5)\n    create clone of (_myself_ v)\n    change [смещение х фона v] by (1031)\nend\n\nwhen I receive [положение определено v]\ngo to x: ((смещение х фона) - ((скроллинг х) / (5))) y: ((50) - ((скроллинг у) / (2)))\nif <<(round ((смещение х фона) - ((скроллинг х) / (5)))) = (round (x position))> and <(round ((50) - ((скроллинг у) / (2)))) = (round (y position))>> then\n    show\nelse\n    hide\nend\n\n@Спрайт 2\n\nwhen flag clicked\ngo to [front v] layer\nhide\n\nwhen I start as a clone\ngo to (пушка кота v)\npoint towards (mouse-pointer v)\nmove (40) steps\nshow\nrepeat until <<touching (платформы v)?> or <<touching (враг v)?> or <touching (_edge_ v)?>>>\n    change x by (х пули)\n    change y by (у пули)\n    change [у пули v] by (-1)\nend\ndelete this clone\n\nwhen I receive [игра старт v]\nforever\n    if <mouse down?> then\n        go to (игрок v)\n        point towards (mouse-pointer v)\n        set [х пули v] to (([sin v] of (direction) ) * (17))\n        set [у пули v] to (([cos v] of (direction) ) * (17))\n        create clone of (_myself_ v)\n        wait (0.4) seconds\n    end\nend\n\n@Спрайт 3\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\n@Спрайт 4\n\nwhen flag clicked\ngo to x: (-215) y: (167)\nforever\n    switch costume to ((монет) + (1))\nend\n\n@Спрайт 5\n\nwhen flag clicked\ngo to x: (-300) y: (70)\nshow\nrepeat (10)\n    change x by (((0) - (x position)) / (5))\n    broadcast (положение определено v)\nend\nrepeat until <<mouse down?> and <touching (mouse-pointer v)?>>\n    if <touching (mouse-pointer v)?> then\n        change x by (((20) - (x position)) / (5))\n    else\n        change x by (((0) - (x position)) / (5))\n    end\n    broadcast (положение определено v)\nend\nbroadcast (игра старт v)\nrepeat (2)\n    change x by (((-300) - (x position)) / (5))\nend\nhide\n\n@Спрайт 6\n\nwhen flag clicked\ngo to [front v] layer\ngo to x: (-300) y: (-80)\nhide\nwait (0.2) seconds\nshow\nrepeat (27)\n    change x by (((0) - (x position)) / (5))\nend\n\nwhen I receive [игра старт v]\nrepeat (2)\n    change x by (((-300) - (x position)) / (5))\nend\nhide\n\n@Спрайт 7\n\nwhen I receive [положение определено v]\ngo to x: ((5400) - (скроллинг х)) y: (() - (скроллинг у))\nif <<(round ((5400) - (скроллинг х))) = (round (x position))> and <(round (() - (скроллинг у))) = (round (y position))>> then\n    show\nelse\n    hide\nend\n\nwhen flag clicked\ngo to [back v] layer\ngo [forward v] (3) layers\nswitch costume to (костюм 1 v)\nrepeat (3)\n    create clone of (_myself_ v)\n    next costume\nend\n\n