Platformer - Space Dash - 2 Player
@Stage\n\nwhen flag clicked\nforever\n    switch backdrop to (MAP)\nend\n\nset [map v] to [12]\n\nwhen I receive [menu3 v]\nset [map v] to [1]\n\n@Player\n\nwhen flag clicked\ngo to x: (-88) y: (50)\nset [x v] to [0]\nset [y v] to [0]\n\nwhen flag clicked\nhide\ndelete all of [characters v]\nadd [1] to [characters v]\nadd [2] to [characters v]\nadd [3] to [characters v]\nadd [4] to [characters v]\nadd [5] to [characters v]\nadd [6] to [characters v]\nadd [7] to [characters v]\nadd [8] to [characters v]\n\nbroadcast (gamestart v)\n\nforever\n    erase all\nend\n\nwhen I receive [menu1 v]\nset [clonetype v] to [player]\nset [clone# v] to [0]\ndelete all of [x's v]\ndelete all of [y's v]\nset [color v] effect to (0)\nrepeat (1)\n    change [clone# v] by (1)\n    create clone of (_myself_ v)\n    change [color v] effect by (25)\n    add [0] to [x's v]\n    add [0] to [y's v]\nend\n\nwhen I start as a clone\nif <(clonetype) = [player]> then\n    set [x v] to [0]\n    set [y v] to [0]\n    set [x_cord v] to [0]\n    set [y_cord v] to [0]\n    set [pitch v] effect to ((clone#) * (20))\n    set [speed v] to [2]\n    show\n    set volume to (100) %\n    forever\n        set rotation style [don't rotate v]\n        go to x: (item (clone#) of [x's v]) y: (item (clone#) of [y's v])\n        if <(y position) < [-100]> then\n            go to x: (item (MAP) of [respawn x v]) y: (0)\n        end\n        set rotation style [don't rotate v]\n        switch costume to ((((character#) * (6)) - (6)) + (1))\n        set size to (50) %\n        set [ghost v] effect to (100)\n        stamp\n        set [ghost v] effect to (0)\n        change y by (y)\n        change x by (x)\n        set size to (50) %\n        if <touching (map v)?> then\n            change y by ((y) * (-1))\n            set [y v] to [0]\n            change y by (3)\n            set size to (50) %\n            if <touching (map v)?> then\n                change x by ((x) * (-1))\n                set [x v] to [0]\n            end\n            change y by (-3)\n        else\n            change [y v] by (item (MAP) of [gravitty v])\n        end\n        if <<key ((item ((((clone#) * (5)) - (5)) + (4)) of [z-keybinds v]) v) pressed?> or <<(clone#) = [1]> and <key (right arrow v) pressed?>>> then\n            point in direction (90)\n            switch costume to ((((character#) * (6)) - (6)) + (costume))\n            change x by (3)\n            change y by (3)\n            if <touching (map v)?> then\n            change x by (-3)\n            change y by (-3)\n        else\n            if <<key ((item ((((clone#) * (5)) - (5)) + (2)) of [z-keybinds v]) v) pressed?> or <<(clone#) = [1]> and <key (left arrow v) pressed?>>> then\n                point in direction (-90)\n                switch costume to ((((character#) * (6)) - (6)) + (costume))\n                change x by (-3)\n                change y by (3)\n                if <touching (map v)?> then\n                change x by (3)\n                change y by (-3)\n            end\n        end\n        if <<key ((item ((((clone#) * (5)) - (5)) + (1)) of [z-keybinds v]) v) pressed?> or <<(clone#) = [1]> and <key (up arrow v) pressed?>>> then\n            change y by (-9)\n            if <touching (map v)?> then\n                start sound [Jump v]\n                set [y v] to [9]\n            end\n            change y by (9)\n        end\n        change [x v] by ((x) * (-0.25))\n        set [x_cord v] to (x position)\n        set [y_cord v] to (y position)\n        replace item (clone#) of [x's v] with (x_cord)\n        replace item (clone#) of [y's v] with (y_cord)\n        tests\n        set rotation style [left-right v]\n        go to x: (((x_cord) * (ZOOM)) + ((average-x) * ((ZOOM) * (-1)))) y: ((((y_cord) - (4)) * (ZOOM)) + ((average-y) * ((ZOOM) * (-1))))\n        set size to (((ZOOM) / (2)) * (100)) %\n        set rotation style [left-right v]\n        if < (costume [name v]) contains [hitbox]?> then\n            if <[3] < (y)> then\n                switch costume to ((((character#) * (6)) - (6)) + (6))\n            else\n                switch costume to ((((character#) * (6)) - (6)) + (2))\n            end\n        end\n        if <touching (_edge_ v)?> then\n            set [ghost v] effect to (100)\n        else\n            set [ghost v] effect to (0)\n        end\n        if <key ((item ((((clone#) * (5)) - (5)) + (5)) of [z-keybinds v]) v) pressed?> then\n            change [color v] effect by (5)\n        end\n    end\nend\n\nwhen I start as a clone\nif <(clonetype) = [player]> then\n    wait (pick random (0.01) to (0.2)) seconds\n    forever\n        set [walk-anim-time v] to [0.01]\n        set [costume v] to [3]\n        wait (walk-anim-time) seconds\n        set [costume v] to [4]\n        wait (walk-anim-time) seconds\n        set [costume v] to [3]\n        wait (walk-anim-time) seconds\n        set [costume v] to [2]\n        wait (walk-anim-time) seconds\n        set [costume v] to [5]\n        wait (walk-anim-time) seconds\n        set [costume v] to [6]\n        wait (walk-anim-time) seconds\n        set [costume v] to [5]\n        wait (walk-anim-time) seconds\n        set [costume v] to [2]\n        wait (walk-anim-time) seconds\n    end\nend\n\ndefine tests\nif <(MAP) = [2]> then\n    if <[20] > (distance to [interactor v])> then\n        start sound [button v]\n        set [map v] to [3]\n        set [set camera-x v] to (x_cord)\n        set [set-camera-y v] to (y_cord)\n    end\nelse\n    if <(MAP) = [5]> then\n        if <[10] > (distance to [interactor v])> then\n            start sound [portal v]\n            set [map v] to [6]\n            set [z-counter v] to [1]\n            repeat (length of [x's v])\n                replace item (z-counter) of [x's v] with [0]\n                replace item (z-counter) of [y's v] with [0]\n                change [z-counter v] by (1)\n            end\n        end\n    else\n        if <(MAP) = [6]> then\n            if <[20] > (distance to [interactor v])> then\n                start sound [button v]\n                set [map v] to [7]\n            end\n        else\n            if <(MAP) = [7]> then\n                if <[10] > (distance to [interactor v])> then\n                    start sound [portal v]\n                    set [map v] to [8]\n                    set [z-counter v] to [1]\n                    repeat (length of [x's v])\n                        replace item (z-counter) of [x's v] with [-200]\n                        replace item (z-counter) of [y's v] with [0]\n                        change [z-counter v] by (1)\n                    end\n                end\n            else\n                if <(MAP) = [8]> then\n                    if <[17] > (distance to [interactor v])> then\n                        start sound [portal v]\n                        set [map v] to [9]\n                        set [z-counter v] to [1]\n                        repeat (length of [x's v])\n                            replace item (z-counter) of [x's v] with [-200]\n                            replace item (z-counter) of [y's v] with [0]\n                            change [z-counter v] by (1)\n                        end\n                    end\n                else\n                    if <(MAP) = [9]> then\n                        if <[17] > (distance to [interactor v])> then\n                            start sound [portal v]\n                            set [map v] to [10]\n                            set [z-counter v] to [1]\n                            repeat (length of [x's v])\n                                replace item (z-counter) of [x's v] with (item (MAP) of [respawn x v])\n                                replace item (z-counter) of [y's v] with [50]\n                                change [z-counter v] by (1)\n                            end\n                        end\n                    else\n                        if <(MAP) = [10]> then\n                            if <[17] > (distance to [interactor v])> then\n                                start sound [portal v]\n                                set [map v] to [11]\n                                set [z-counter v] to [1]\n                                repeat (length of [x's v])\n                                    replace item (z-counter) of [x's v] with (item (MAP) of [respawn x v])\n                                    replace item (z-counter) of [y's v] with [50]\n                                    change [z-counter v] by (1)\n                                end\n                            end\n                        else\n                            if <(MAP) = [11]> then\n                                if <[17] > (distance to [interactor v])> then\n                                    start sound [portal v]\n                                    set [map v] to [12]\n                                    set [z-counter v] to [1]\n                                    repeat (length of [x's v])\n                                        replace item (z-counter) of [x's v] with (item (MAP) of [respawn x v])\n                                        replace item (z-counter) of [y's v] with [50]\n                                        change [z-counter v] by (1)\n                                    end\n                                end\n                            else\n                                if <(MAP) = [12]> then\n                                    if <[17] > (distance to [interactor v])> then\n                                        start sound [keypad v]\n                                        set [map v] to [13]\n                                        broadcast (keypad v)\n                                    end\n                                else\n                                    if <(MAP) = [14]> then\n                                        if <[17] > (distance to [interactor v])> then\n                                            start sound [portal v]\n                                            set [map v] to [15]\n                                            set [z-counter v] to [1]\n                                            repeat (length of [x's v])\n                                                replace item (z-counter) of [x's v] with (item (MAP) of [respawn x v])\n                                                replace item (z-counter) of [y's v] with [-70]\n                                                change [z-counter v] by (1)\n                                            end\n                                        end\n                                    else\n                                        if <(MAP) = [15]> then\n                                            if <[17] > (distance to [interactor v])> then\n                                                start sound [keypad v]\n                                                set [map v] to [16]\n                                                broadcast (keypad v)\n                                            end\n                                        else\n                                            if <(MAP) = [17]> then\n                                                if <[17] > (distance to [interactor v])> then\n                                                    start sound [portal v]\n                                                    set [map v] to [18]\n                                                    set [z-counter v] to [1]\n                                                    repeat (length of [x's v])\n                                                        replace item (z-counter) of [x's v] with (item (MAP) of [respawn x v])\n                                                        replace item (z-counter) of [y's v] with [15]\n                                                        change [z-counter v] by (1)\n                                                    end\n                                                end\n                                            else\n                                                if <(MAP) = [18]> then\n                                                    if <[20] > (distance to [interactor v])> then\n                                                        start sound [button v]\n                                                        set [map v] to [19]\n                                                    end\n                                                else\n                                                    if <(MAP) = [19]> then\n                                                        if <[17] > (distance to [interactor v])> then\n                                                            start sound [keypad v]\n                                                            set [map v] to [20]\n                                                            broadcast (keypad v)\n                                                        end\n                                                    else\n                                                        if <(MAP) = [21]> then\n                                                            if <[17] > (distance to [interactor v])> then\n                                                                hide\n                                                                play sound [portal v] until done\n                                                                replace item (clone#) of [x's v] with []\n                                                                replace item (clone#) of [y's v] with []\n                                                                delete this clone\n                                                            end\n                                                        end\n                                                    end\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [menu2 v]\nset [clonetype v] to [player]\nset [clone# v] to [0]\ndelete all of [x's v]\ndelete all of [y's v]\nset [color v] effect to (0)\nrepeat (2)\n    change [clone# v] by (1)\n    create clone of (_myself_ v)\n    change [color v] effect by (25)\n    add [0] to [x's v]\n    add [0] to [y's v]\nend\n\nwhen I receive [end_screen v]\nstop [other scripts in sprite v]\nset size to (500) %\ngo to x: (0) y: (0)\n\nwhen I receive [intro v]\ndelete this clone\n\nwhen I receive [menu3 v]\nset [character# v] to (item (1) of [characters v])\nshow\npoint in direction (90)\ngo to x: (0) y: (-25)\nset size to (400) %\nset [selector v] to [1]\nforever\n    if <<touching (mouse-pointer v)?> and <(MAP) = [1]>> then\n        set size to (330) %\n        if <mouse down?> then\n            if <touching (mouse-pointer v)?> then\n                change [selector v] by (1)\n                if <(SELECTOR) > (length of [characters v])> then\n                    set [selector v] to [1]\n                end\n                wait (0.01) seconds\n            end\n            wait until <not <mouse down?>>\n        end\n    else\n        set size to (300) %\n    end\n    set [character# v] to (item (SELECTOR) of [characters v])\n    switch costume to ((((item (SELECTOR) of [characters v]) * (6)) - (6)) + (2))\n    change [color v] effect by (1)\nend\n\nwhen I receive [intro v]\nhide\n\nwhen I receive [intro v]\nstop [other scripts in sprite v]\n\n@Map\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    set [ghost v] effect to (MAP SHOW)\n    set [brightness v] effect to (25)\n    switch costume to (MAP)\nend\n\nset [map v] to [11]\n\n@Visual\n\ndefine total-averages\nset [average-x v] to [0]\nset [#-sorter1 v] to [1]\nrepeat (length of [x's v])\n    change [average-x v] by (item (#-sorter1) of [x's v])\n    change [#-sorter1 v] by (1)\nend\nset [average-x v] to ((average-x) / (length of [x's v]))\nset [average-y v] to [0]\nset [#-sorter1 v] to [1]\nrepeat (length of [y's v])\n    change [average-y v] by (item (#-sorter1) of [y's v])\n    change [#-sorter1 v] by (1)\nend\nset [average-y v] to ((average-y) / (length of [y's v]))\n\ndefine distances\nif <(length of [x's v]) = [1]> then\n    set [zoom v] to [2.25]\nelse\n    set [#-sorter1 v] to [1]\n    set [zoom-finder v] to ([sqrt v] of ((((item (#-sorter1) of [x's v]) - (item ((#-sorter1) + (1)) of [x's v])) * ((item (#-sorter1) of [x's v]) - (item ((#-sorter1) + (1)) of [x's v]))) + (((item (#-sorter1) of [y's v]) - (item ((#-sorter1) + (1)) of [y's v])) * ((item (#-sorter1) of [y's v]) - (item ((#-sorter1) + (1)) of [y's v])))) )\n    set [zoom v] to ([abs v] of (((1200) - (zoom-finder)) / (700)) )\nend\n\nset [map v] to [12]\n\nwhen I receive [end_screen v]\nhide\nstop [other scripts in sprite v]\nif <(timer) < (BEST-TIME)> then\n    set [best-time v] to (timer)\nend\nshow variable [best-time v]\n\nwhen I receive [menu1 v]\nreset timer\n\nwhen I receive [menu2 v]\nreset timer\n\nwhen flag clicked\nforever\nend\n\nset [map v] to [19]\n\nwhen I receive [intro v]\nset [map v] to [2]\nclear graphic effects\n\nset [map v] to [12]\n\nwhen I receive [intro v]\nhide\n\nwhen I receive [menu1 v]\nshow\n\nwhen I receive [menu2 v]\nshow\n\nwhen I receive [menu1 v]\nset [zoom v] to [2]\nset [map v] to [2]\nhide variable [best-time v]\nforever\n    wait until <(MAP) = [3]>\n    wait (1) seconds\n    set [set camera-x v] to [100]\n    set [set-camera-y v] to [120]\n    set [map v] to [4]\n    wait (2) seconds\n    set [map v] to [5]\n    wait until <<(MAP) = [21]> and <<(item (2) of [x's v]) = []> and <(item (1) of [x's v]) = []>>>\n    clear graphic effects\n    repeat (100)\n        change [whirl v] effect by (5)\n        change [fisheye v] effect by (-5)\n        change [brightness v] effect by (-1)\n    end\n    broadcast (intro v)\nend\n\nwhen I receive [intro v]\nstop [other scripts in sprite v]\n\nwhen I receive [menu2 v]\nset [zoom v] to [2]\nset [map v] to [2]\nhide variable [best-time v]\nforever\n    wait until <(MAP) = [3]>\n    wait (1) seconds\n    set [set camera-x v] to [100]\n    set [set-camera-y v] to [120]\n    set [map v] to [4]\n    wait (2) seconds\n    set [map v] to [5]\n    wait until <<(MAP) = [21]> and <<(item (2) of [x's v]) = []> and <(item (1) of [x's v]) = []>>>\n    clear graphic effects\n    repeat (100)\n        change [whirl v] effect by (5)\n        change [fisheye v] effect by (-5)\n        change [brightness v] effect by (-1)\n    end\n    broadcast (intro v)\nend\n\nwhen I receive [menu2 v]\nshow\nswitch costume to (2 v)\nset [zoom_vel v] to [0]\ngo to [back v] layer\nforever\n    if <<(MAP) = [3]> or <(MAP) = [4]>> then\n        set [average-x v] to (SET CAMERA-X)\n        set [average-y v] to (SET-CAMERA-Y)\n        set [set-zoom v] to (MAP)\n        change [zoom_vel v] by (((SET-ZOOM) - (ZOOM)) * (.9))\n        set [zoom_vel v] to ((zoom_vel) * (.2))\n        change [zoom v] by (zoom_vel)\n    else\n        total-averages\n        distances\n    end\n    switch costume to (sizer v)\n    set size to ((ZOOM) * (100)) %\n    set [ghost v] effect to (0)\n    switch costume to (MAP)\n    go to x: (((average-x) * ((ZOOM) * (-1))) + (0)) y: (((average-y) * ((ZOOM) * (-1))) + (0))\nend\n\nwhen I receive [menu1 v]\nshow\nswitch costume to (2 v)\nset [zoom_vel v] to [0]\ngo to [back v] layer\nforever\n    if <<(MAP) = [3]> or <(MAP) = [4]>> then\n        set [average-x v] to (SET CAMERA-X)\n        set [average-y v] to (SET-CAMERA-Y)\n        set [set-zoom v] to (MAP)\n        change [zoom_vel v] by (((SET-ZOOM) - (ZOOM)) * (.9))\n        set [zoom_vel v] to ((zoom_vel) * (.2))\n        change [zoom v] by (zoom_vel)\n    else\n        total-averages\n        distances\n    end\n    switch costume to (sizer v)\n    set size to ((ZOOM) * (100)) %\n    set [ghost v] effect to (0)\n    switch costume to (MAP)\n    go to x: (((average-x) * ((ZOOM) * (-1))) + (0)) y: (((average-y) * ((ZOOM) * (-1))) + (0))\nend\n\n@Interactor\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (MAP SHOW)\n    if <(item (MAP) of [interactor_x v]) = []> then\n    else\n        go to x: (item (MAP) of [interactor_x v]) y: (item (MAP) of [interactor_y v])\n    end\nend\n\n@Intro\n\nwhen I start as a clone\nhide\nwait (0.000001) seconds\nshow\nset size to (100) %\nclear graphic effects\nif <(costume [number v]) = [3]> then\nif <[5] < (costume [number v])> then\n    forever\n        if <touching (mouse-pointer v)?> then\n            start sound [select v]\n            repeat until <not <touching (mouse-pointer v)?>>\n                set [brightness v] effect to (25)\n                if <mouse down?> then\n                    broadcast (join [menu] ((costume [number v]) - (5)))\n                    broadcast (hidemenu v)\n                end\n            end\n        else\n            set [brightness v] effect to (0)\n        end\n    end\nend\n\ndefine clones\ngo to x: (0) y: (0)\nswitch costume to (singleplayer v)\nrepeat (3)\n    create clone of (_myself_ v)\n    next costume\nend\ngo to x: (0) y: (0)\n\nwhen I receive [hidemenu v]\nstop all sounds\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [intro v]\nhide variable [best-time v]\nclear graphic effects\nshow\ngo to x: (0) y: (0)\nset [fisheye v] effect to (0)\nset size to (100) %\nswitch costume to (space2 v)\ncreate clone of (_myself_ v)\nrepeat (30)\n    switch costume to (sizer v)\n    change size by (5)\n    switch costume to (space v)\n    change [fisheye v] effect by (-2.5)\n    change [whirl v] effect by (2.5)\n    change [color v] effect by (25)\nend\nforever\n    set [ghost v] effect to (50)\n    switch costume to (sizer v)\n    change size by (15)\n    switch costume to (space v)\n    change [fisheye v] effect by (-2.5)\n    change [whirl v] effect by (1)\n    change [color v] effect by (1)\nend\n\nwhen I receive [intro v]\nstart sound [396239__romariogrande__alien-dream v]\nwait (1) seconds\nswitch costume to (space3 v)\ncreate clone of (_myself_ v)\nclones\n\nwhen flag clicked\nbroadcast (intro v)\n\n@Tutorial\n\nwhen I receive [menu1 v]\nbroadcast (UI v)\n\nwhen I receive [menu2 v]\nbroadcast (UI v)\n\nwhen I receive [ui v]\nforever\n    go to [front v] layer\n    go to x: (0) y: (-100)\n    set [ghost v] effect to (25)\n    if <<(item (1) of [x's v]) = []> and <(item (2) of [x's v]) = []>> then\n        hide\n    else\n        show\n    end\n    switch costume to (MAP)\nend\n\nwhen flag clicked\nhide\n\nif <<(item (1) of [x's v]) = []> and <(item (2) of [x's v]) = []>> then\n    hide\nelse\n    show\nend\n\nset [average-x v] to [0]\n\n@Task\n\nwhen I receive [keypad v]\nif <<(MAP) = [12]> or <(MAP) = [13]>> then\n    delete all of [z-1210 v]\n    fast\n    wait until <not <(z-1210) = [1 2 3 4 5 6 7 8 9 10]>>\n    wait until <[9] < (length of [z-1210 v])>\n    broadcast (keypadclose v)\n    if <(z-1210) = [1 2 3 4 5 6 7 8 9 10]> then\n        set [map v] to [14]\n        wait (0.25) seconds\n        start sound [good v]\n    else\n        wait until <not <mouse down?>>\n        set [map v] to [12]\n        start sound [bad v]\n    end\nelse\n    if <<(MAP) = [15]> or <(MAP) = [16]>> then\n        delete all of [z-1210 v]\n        fast\n        wait until <not <(z-1210) = [1 2 3 4 5 6 7 8 9 10]>>\n        wait until <[9] < (length of [z-1210 v])>\n        broadcast (keypadclose v)\n        if <(z-1210) = [1 2 3 4 5 6 7 8 9 10]> then\n            set [map v] to [17]\n            wait (0.25) seconds\n            start sound [good v]\n        else\n            wait until <not <mouse down?>>\n            set [map v] to [15]\n            start sound [bad v]\n        end\n    else\n        if <<(MAP) = [19]> or <(MAP) = [20]>> then\n            delete all of [z-1210 v]\n            fast\n            wait until <not <(z-1210) = [1 2 3 4 5 6 7 8 9 10]>>\n            wait until <[9] < (length of [z-1210 v])>\n            broadcast (keypadclose v)\n            if <(z-1210) = [1 2 3 4 5 6 7 8 9 10]> then\n                set [map v] to [21]\n                wait (0.25) seconds\n                start sound [good v]\n            else\n                wait until <not <mouse down?>>\n                set [map v] to [19]\n                start sound [bad v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nforever\n    set [ghost v] effect to (25)\n    go to [front v] layer\n    if <<(costume [number v]) = [11]> or <(costume [number v]) = [12]>> then\n    else\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (25)\n            if <mouse down?> then\n                add (costume [number v]) to [z-1210 v]\n                set instrument to (20 v)\n                play note ((((costume [number v]) * (-1)) + (58))) for (0.1) beats\n                switch costume to (black v)\n                set [brightness v] effect to (0)\n            end\n        else\n            set [brightness v] effect to (0)\n        end\n    end\nend\n\ndefine fast\nhide\ngo to x: (0) y: (0)\nswitch costume to (11 v)\ncreate clone of (_myself_ v)\ngo to x: (-100) y: (20)\nswitch costume to (pick random (1) to (10))\nrepeat (2)\n    repeat (5)\n        repeat until <not <[z-1210 v] contains (costume [number v])?>>\n            switch costume to (pick random (1) to (10))\n        end\n        add (costume [number v]) to [z-1210 v]\n        create clone of (_myself_ v)\n        change x by (48)\n    end\n    change x by ((48) * (-5))\n    change y by (-48)\nend\ndelete all of [z-1210 v]\n\nwhen I receive [keypadclose v]\nhide\ndelete this clone\n\nset [map v] to [12]\n\nchange [map v] by (10)\n\nset [map v] to [12]\n\n@Sprite1\n\nwhen I receive [intro v]\ndelete all of [x's v]\ndelete all of [y's v]\n\nwhen flag clicked\nhide\ngo to x: (230) y: (170)\nset [ghost v] effect to (50)\nset size to (75) %\nforever\n    go to [front v] layer\n    show\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        wait (0.1) seconds\n        if <(costume [number v]) = [2]> then\n            switch costume to (3 v)\n        else\n            if <(costume [number v]) = [3]> then\n                switch costume to (4 v)\n            else\n                if <(costume [number v]) = [4]> then\n                    switch costume to (5 v)\n                else\n                    switch costume to (2 v)\n                end\n            end\n        end\n        if <(costume [number v]) = [5]> then\n            wait (0.1) seconds\n            broadcast (intro v)\n        end\n    else\n        switch costume to (1 v)\n    end\nend\n\n@Text Engine\n\nwhen flag clicked\nhide\nset pen (saturation v) to (100)\nset [# of alphabet? v] to ((length of [letters v]) + (1))\n\ndefine PEN: (length) (width) WRITE: (text) X: (x) Y: (y) COLOR: (color) SLOW? <slow?> italic? <italic?> bold? <highlight>\nset size to (25) %\ngo to x: (x) y: (y)\nset [\(delete\)testvar-2 v] to [1]\nset pen size to (length)\nif <highlight> then\n    set pen color to (#212121)\n    set pen size to (length)\n    change pen size by ((length) * (2))\n    if <slow?> then\n        repeat (length of (text))\n            single-letter-draw (length) (width) (color) <slow?> text: (text) <italic?> <highlight>\n        end\n    else\n        single-letter-draw (length) (width) (color) <slow?> text: (text) <italic?> <highlight>\n    end\n    go to x: (x) y: (y)\n    set [\(delete\)testvar-2 v] to [1]\n    set pen size to ((length) * (1.25))\n    set pen (color v) to (color)\n    set pen (saturation v) to (0)\n    set pen (brightness v) to (100)\n    if <slow?> then\n        repeat (length of (text))\n            single-letter-draw (length) (width) (color) <slow?> text: (text) <italic?> <highlight>\n        end\n    else\n        single-letter-draw (length) (width) (color) <slow?> text: (text) <italic?> <highlight>\n    end\nelse\n    set pen (color v) to (color)\n    set pen (saturation v) to (100)\n    set pen (brightness v) to (100)\n    if <slow?> then\n        repeat (length of (text))\n            single-letter-draw (length) (width) (color) <slow?> text: (text) <italic?> <highlight>\n        end\n    else\n        single-letter-draw (length) (width) (color) <slow?> text: (text) <italic?> <highlight>\n    end\nend\n\nwhen flag clicked\nset [alphabet v] to [ABCDEFGHIJKLMNOPQRSTUVWXYZ,<.>/?"';:\[{\]}\|`~1!2@3#4$5%6^7&8*9\(0\)-_=+ ]\n\ndefine letter-match-fast (text)\nset [letter-match-# v] to [1]\nrepeat until <(letter (letter-match-#) of (alphabet)) = (letter (\(DELETE\)TESTVAR-2) of (text))>\n    change [letter-match-# v] by (1)\n    if <(length of [letters v]) < (letter-match-#)> then\n        set [letter-match-# v] to [32]\n        stop [this script v]\n    end\nend\n\ndefine single-letter-draw (length) (width) (color) <slow?> text: (texxxxt) <italic> <highlight>\nif <slow?> then\n    letter-match-fast (texxxxt)\n    set [\(delete\)testvar1### v] to [1]\n    repeat (5)\n        repeat (5)\n            if <(letter (\(DELETE\)TESTVAR1###) of (item (letter-match-#) of [letters v])) = [1]> then\n                pen down\n                pen up\n            end\n            change x by (width)\n            change [\(delete\)testvar1### v] by (1)\n        end\n        if <italic> then\n            change x by ((width) * (-5.4))\n        else\n            change x by ((width) * (-5))\n        end\n        change y by ((length) * (-1))\n    end\n    change [\(delete\)testvar-2 v] by (1)\n    if <italic> then\n        change x by ((length) * (6))\n    else\n        change x by ((length) * (5))\n    end\n    change y by ((length) * (5))\n    if <[220] < (x position)> then\n        set x to (-220)\n        change y by ((length) * (-6))\n    end\nelse\n    repeat (length of (texxxxt))\n        letter-match-fast (texxxxt)\n        set [\(delete\)testvar1### v] to [1]\n        repeat (5)\n            repeat (5)\n                if <(letter (\(DELETE\)TESTVAR1###) of (item (letter-match-#) of [letters v])) = [1]> then\n                    pen down\n                    pen up\n                end\n                change x by (width)\n                change [\(delete\)testvar1### v] by (1)\n            end\n            if <italic> then\n                change x by ((width) * (-5.4))\n            else\n                change x by ((width) * (-5))\n            end\n            change y by ((length) * (-1))\n        end\n        change [\(delete\)testvar-2 v] by (1)\n        if <italic> then\n            change x by ((length) * (6))\n        else\n            change x by ((length) * (5))\n        end\n        change y by ((length) * (5))\n        if <[220] < (x position)> then\n            set x to (-220)\n            change y by ((length) * (-6))\n        end\n    end\nend\n\nwhen I receive [menu1 v]\nerase all\nstop [other scripts in sprite v]\n\nwhen I receive [menu2 v]\nerase all\nstop [other scripts in sprite v]\n\nwhen I receive [menu3 v]\nerase all\nforever\n    erase all\n    PEN: [3] [2] WRITE: (join [You have ] (join (length of [characters v]) [ characters unlocked])) X: [-220] Y: [100] COLOR: [0] SLOW? <> italic? <> bold? \n    PEN: [3] [2] WRITE: (item (((([costume # v] of [player v]) - (2)) / (6)) + (1)) of [z-character-names v]) X: [-220] Y: [-90] COLOR: [0] SLOW? <> italic? <> bold? \n    wait until <mouse down?>\n    wait until <not <mouse down?>>\n    wait (0) seconds\nend\n\n@Screenshot 2020-11-03 at 1\n\nset size to (200) %\ngo to [front v] layer\nshow\nset [color v] effect to (0)\n\nwhen flag clicked\nhide\n\n
My new platformer game in scratch! Allows 2 players to play from one computer\n\nPLAYER 1- WASD\nPLAYER 2- IJKL\n\nLevel editor soon?