Arrow Platformer - Preview
@Stage\n\nwhen flag clicked\nset [play? v] to [0]\nset [level v] to [1]\nset [max speed v] to [10]\nset [level x vel v] to [0]\nforever\n    play sound [GYVUS - Blue Sky \[Chillhop Records\].mp3 v] until done\nend\n\n@Player\n\nwhen flag clicked\ncreate clone of (_myself_ v)\nhide\nswitch costume to (образ1 v)\nset [y vel v] to [0]\nforever\n    moving\n    set x to (-190)\nend\n\ndefine moving\nif <not <[3] = ([costume # v] of [спрайт1 v])>> then\n    turn right ((x vel) * (5)) degrees\n    change y by (y vel)\n    change [level x vel v] by (x vel)\n    change [x vel v] by (((0) - (x vel)) / (5))\n    if <<<touching color (#a9cce1)?> or <touching color (#d8d8d8)?>> or <<touching color (#527590)?> or <touching color (#4482ab)?>>> then\n        set [y vel v] to [0]\n        repeat until <not <<<touching color (#a9cce1)?> or <touching color (#d8d8d8)?>> or <<touching color (#527590)?> or <touching color (#4482ab)?>>>>\n            change y by (1)\n        end\n    else\n        change [y vel v] by (-1)\n    end\n    change y by (-1)\n    if <touching (l1 v)?> then\n        broadcast (update level v)\n    end\n    if <<touching color (#8d5f5b)?> or <touching color (#b34726)?>> then\n        broadcast (update level v)\n    end\nend\n\nwhen I receive [quit v]\n\nwhen I receive [play v]\nshow\n\ngo to x: (-220) y: (-97)\n\nwhen flag clicked\nforever\n    controls\nend\n\nwhen I receive [update level v]\nset [level x vel v] to [0]\n\nset [x vel v] to [0]\n\ndefine controls\nif <not <[3] = ([costume # v] of [спрайт1 v])>> then\n    if <<<key (up arrow v) pressed?> or <key (space v) pressed?>> or <key (w v) pressed?>> then\n        change y by (-1)\n        if <<<touching color (#a9cce1)?> or <touching color (#d8d8d8)?>> or <<touching color (#527590)?> or <touching color (#4482ab)?>>> then\n            set [y vel v] to [12.5]\n        end\n    end\n    if <(level x vel) > [-1]> then\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            if <(x vel) > (join [-] (max speed))> then\n                change [x vel v] by (join [-] ((max speed) / (5)))\n            end\n        end\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        if <(x vel) < (max speed)> then\n            change [x vel v] by ((max speed) / (5))\n        end\n    end\n    repeat until <not <(level x vel) < [0]>>\n        change [level x vel v] by (1)\n    end\nend\n\nwhen flag clicked\nforever\n    if <[3] = ([costume # v] of [спрайт1 v])> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I start as a clone\nswitch costume to (образ2 v)\nset [ghost v] effect to (75)\nforever\n    change size by ((((100) + ([abs v] of (((x vel) + ([abs v] of ((y vel) / (2)) )) * (25)) )) - (size)) / (2))\n    go to (player v)\n    if <[3] = ([costume # v] of [спрайт1 v])> then\n        hide\n    else\n        show\n    end\nend\n\n@level platforms\n\nwhen I receive [play v]\n\nwhen flag clicked\nswitch costume to (3 v)\nhide\ngo to x: (0) y: (0)\nrepeat (9)\n    create clone of (_myself_ v)\n    next costume\nend\n\nwhen I start as a clone\nshow\nforever\n    if <<(level x vel) < [3795]> and <(level x vel) > [-1]>> then\n        set x to ((((costume [number v]) * (480)) - (480)) - (level x vel))\n    end\n    if <[461] > (x position)> then\n        if <[-461] < (x position)> then\n            show\n        else\n            hide\n        end\n    else\n        hide\n    end\n    if <(level x vel) > [3797]> then\n        set [level x vel v] to [3795]\n    end\nend\n\nwhen I receive [quit v]\n\n@образ1\n\nwhen flag clicked\nwait (0) seconds\nhide\nswitch costume to (образ1 v)\nbroadcast (Play v)\n\nwhen I receive [quit v]\nset [play? v] to [0]\n\nwhen I start as a clone\n\ngo to x: (0) y: (0)\nswitch costume to (2 v)\ncreate clone of (_myself_ v)\nshow\nforever\n    if <(play?) = [0]> then\n        show\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (5)\n            if <mouse down?> then\n                broadcast (Play v)\n                broadcast (update level v)\n                set [play? v] to [1]\n            end\n        else\n            clear graphic effects\n        end\n    else\n        hide\n    end\nend\n\nswitch costume to (12 v)\nforever\n    if <(play?) = [0]> then\n        show\n    else\n        hide\n    end\nend\n\nshow\n\nset [ghost v] effect to (99)\n\n@l1\n\nwhen flag clicked\nswitch costume to (3 v)\nhide\ngo to x: (0) y: (0)\nrepeat (8)\n    next costume\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset [ghost v] effect to (99)\nshow\nforever\n    if <(level x vel) > [-1]> then\n        set x to ((((costume [number v]) * (480)) - (480)) - (level x vel))\n    end\nend\n\nwhen I receive [restart v]\nset [level x vel v] to [0]\n\n@costume9\n\nwhen flag clicked\nswitch costume to (3 v)\nhide\n\nwhen I start as a clone\n\ngo to x: (0) y: (0)\nrepeat (4)\n    next costume\n    create clone of (_myself_ v)\nend\n\nshow\nforever\n    if <(level x vel) > [-1]> then\n        set x to ((((costume [number v]) * (480)) - (480)) - (level x vel))\n    end\n    if <touching (образ1 v)?> then\n        show\n    else\n        hide\n    end\nend\n\n@Спрайт1\n\nwhen flag clicked\nshow\nswitch costume to (2 v)\ncreate clone of (_myself_ v)\nswitch costume to (4 v)\ncreate clone of (_myself_ v)\nswitch costume to (6 v)\ncreate clone of (_myself_ v)\nswitch costume to (7 v)\ncreate clone of (_myself_ v)\nforever\n    go to x: (0) y: (0)\n    switch costume to (3 v)\n    wait until <<mouse down?> and <touching (mouse-pointer v)?>>\n    switch costume to (5 v)\n    go to x: (-240) y: (0)\n    repeat (22)\n        change x by (((0) - (x position)) / (3))\n    end\n    go to x: (0) y: (0)\n    wait until <mouse down?>\n    repeat (4)\n        change x by (((-280) - (x position)) / (3))\n    end\n    switch costume to (3 v)\n    go to x: (0) y: (0)\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (2 v)\nelse\n    forever\n        go to (спрайт1 v)\n        if <[3] = ([costume # v] of [спрайт1 v])> then\n            show\n            if <touching (mouse-pointer v)?> then\n                set [brightness v] effect to (-5)\n                if <mouse down?> then\n                    if <(costume [number v]) = [4]> then\n                        broadcast (tutorial v)\n                    else\n                        if <(costume [number v]) = [5]> then\n                            broadcast (restart v)\n                        end\n                    end\n                end\n            else\n                clear graphic effects\n            end\n        else\n            hide\n        end\n        go [backward v] (-5) layers\n    end\nend\n\nshow\n\n@Спрайт2\n\nwhen flag clicked\nhide\n\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\n\n