World's Largest Platformer [Collab!]
@Stage\n\nwhen flag clicked\nset [manager v] to [0]\nif <(LogoShown) = [false]> then\n    switch backdrop to (thumbnail v)\n    set [manager v] to [Intro]\n    broadcast (Intro v)\n    repeat (20)\n        change [brightness v] effect by (-2)\n    end\n    set [brightness v] effect to (0)\n    switch backdrop to (project v)\n    wait until <(LogoShown) = [true]>\n    set [manager v] to [Start]\n    broadcast (Start v)\nelse\n    set [brightness v] effect to (-100)\n    switch backdrop to (project v)\n    repeat (20)\n        change [brightness v] effect by (5)\n    end\n    set [manager v] to [Start]\n    broadcast (Start v)\nend\n\nset [logoshown v] to [false]\n\nwhen I receive [start v]\nset [manager v] to [Menu]\nbroadcast (Menu v)\n\nwhen flag clicked\nset volume to (100) %\nif <(LogoShown) = [false]> then\n    wait until <(LogoShown) = [true]>\n    forever\n        play sound [Bensound - Adventures v] until done\n    end\nelse\n    forever\n        play sound [Bensound - Adventures v] until done\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Music) = [1]> then\n        repeat (20)\n            change volume by (5)\n        end\n        set volume to (100) %\n        wait until <not <(Music) = [1]>>\n    else\n        repeat (20)\n            change volume by (-5)\n        end\n        set volume to (0) %\n        wait until <not <(Music) = [0]>>\n    end\nend\n\n@Intro\n\nwhen I start as a clone\nif <(Clone) = [Particles]> then\n    switch costume to (particle v)\n    set size to (pick random (20) to (100)) %\n    set [ghost v] effect to (pick random (0) to (70))\n    set [brightness v] effect to (0)\n    go to x: (0) y: (0)\n    point in direction (pick random (-180) to (180))\n    set [v v] to (pick random (10) to (15))\n    set [i v] to (pick random (2) to (7))\n    go to [front v] layer\n    show\n    repeat until <<<(x position) < [-150]> or <[150] < (x position)>> or <<(y position) < [-150]> or <[150] < (y position)>>>\n        move (v) steps\n        change y by (i)\n        change [i v] by (-0.3)\n        set [v v] to ((v) * (0.95))\n    end\n    repeat (10)\n        change [ghost v] effect by (10)\n        move (v) steps\n        change y by (i)\n        change [i v] by (-0.3)\n        set [v v] to ((v) * (0.95))\n    end\n    delete this clone\nend\n\nwhen flag clicked\nhide\nswitch costume to (default v)\nset size to (100) %\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\npoint in direction (90)\n\nwhen I receive [intro v]\nset [clone v] to [Backdrop]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone v] to [Logo]\ncreate clone of (_myself_ v)\nset [clone v] to [Particles]\ncreate clone of (_myself_ v)\ncreate clone of (_myself_ v)\ncreate clone of (_myself_ v)\ncreate clone of (_myself_ v)\ncreate clone of (_myself_ v)\ncreate clone of (_myself_ v)\ncreate clone of (_myself_ v)\ncreate clone of (_myself_ v)\ncreate clone of (_myself_ v)\ncreate clone of (_myself_ v)\ncreate clone of (_myself_ v)\ncreate clone of (_myself_ v)\ncreate clone of (_myself_ v)\ncreate clone of (_myself_ v)\ncreate clone of (_myself_ v)\ncreate clone of (_myself_ v)\ncreate clone of (_myself_ v)\ncreate clone of (_myself_ v)\ncreate clone of (_myself_ v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(Clone) = [Backdrop]> then\n    switch costume to (backdrop v)\n    set size to (100) %\n    set [ghost v] effect to (100)\n    go to x: (-400) y: (0)\n    point in direction (90)\n    go to [back v] layer\n    show\n    repeat (25)\n        change [ghost v] effect by (-10)\n        change x by (((0) - (x position)) / (4))\n    end\n    wait (1.2) seconds\n    set [logoshown v] to [true]\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Logo]> then\n    switch costume to (logo v)\n    set size to (0) %\n    set [ghost v] effect to (100)\n    go to x: (0) y: (0)\n    point in direction (45)\n    go to [front v] layer\n    show\n    start sound [Intro v]\n    repeat (40)\n        set [i v] to (((i) * (0.7)) + (((65) - (size)) / (5)))\n        change [ghost v] effect by (-15)\n        change size by (i)\n        turn right (((90) - (direction)) / (4)) degrees\n    end\n    change x by (0.05)\n    repeat (10)\n        set [i v] to (((i) * (0.7)) + (((65) - (size)) / (5)))\n        change [ghost v] effect by (10)\n        change size by (i)\n        change x by (x position)\n    end\n    delete this clone\nend\n\n@Menu\n\nwhen flag clicked\nset [owntrigger v] to [0]\nset [clone v] to [0]\nset [playercolor v] to [1]\nset [music v] to [1]\nset [levelchangetrigger v] to [0]\nset [show controls v] to [0]\nhide\nswitch costume to (button 1 v)\nset size to (100) %\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\npoint in direction (90)\n\nwhen I start as a clone\nif <(Clone) = [Title]> then\n    hide\n    switch costume to (title v)\n    set size to (0) %\n    set [ghost v] effect to (100)\n    go to x: (0) y: (115)\n    point in direction (87)\n    show\n    set [v v] to [0]\n    repeat until <not <(Manager) = [Menu]>>\n        change [ghost v] effect by (-3)\n        change [v v] by (6)\n        turn right (([sin v] of (v) ) * (0.3)) degrees\n        if <<<touching (mouse-pointer v)?> or <(distance to [mouse-pointer v]) < [50]>> and <not <(Show Controls) = [1]>>> then\n            change size by (((110) - (size)) / (4))\n            if <mouse down?> then\n                start sound [Select v]\n                repeat (2)\n                    change [brightness v] effect by (0)\n                    change [v v] by (6)\n                    turn right (([sin v] of (v) ) * (0.3)) degrees\n                    if <<touching (mouse-pointer v)?> or <(distance to [mouse-pointer v]) < [50]>> then\n                        change size by (((110) - (size)) / (4))\n                    else\n                        change size by (((100) - (size)) / (4))\n                    end\n                    change size by (((20) - (size)) / (2))\n                end\n                repeat (10)\n                    change [brightness v] effect by (0)\n                    change [v v] by (6)\n                    turn right (([sin v] of (v) ) * (0.3)) degrees\n                    if <<touching (mouse-pointer v)?> or <(distance to [mouse-pointer v]) < [50]>> then\n                        change size by (((110) - (size)) / (4))\n                    else\n                        change size by (((100) - (size)) / (4))\n                    end\n                    change size by (((100) - (size)) / (4))\n                end\n            end\n        else\n            change size by (((100) - (size)) / (4))\n        end\n    end\n    repeat (20)\n        change [ghost v] effect by (5)\n        change [v v] by (6)\n        turn right (([sin v] of (v) ) * (0.2)) degrees\n    end\n    hide\n    set [manager v] to [Ready]\n    delete this clone\nend\n\nwhen I receive [menu v]\nif <not <(OwnTrigger) = [1]>> then\n    set [owntrigger v] to [1]\n    if <not <(EndTrigger) = [0]>> then\n        wait (0.5) seconds\n    end\n    hide\n    switch costume to (button 1 v)\n    set size to (100) %\n    set [ghost v] effect to (100)\n    set [brightness v] effect to (0)\n    go to x: (0) y: (0)\n    point in direction (90)\n    wait (0.2) seconds\n    set [clone v] to [Title]\n    create clone of (_myself_ v)\n    wait (0.1) seconds\n    set [clone v] to [Button 1]\n    create clone of (_myself_ v)\n    wait (0.1) seconds\n    set [clone v] to [Button 3]\n    create clone of (_myself_ v)\n    set [clone v] to [Button 4]\n    create clone of (_myself_ v)\n    wait (0.1) seconds\n    set [clone v] to [Button 5]\n    create clone of (_myself_ v)\n    set [clone v] to [Button 6]\n    create clone of (_myself_ v)\n    wait until <not <(Manager) = [Menu]>>\n    set [owntrigger v] to [0]\nend\n\nwhen I start as a clone\nif <(Clone) = [Button 1]> then\n    hide\n    switch costume to (button 1 v)\n    set size to (100) %\n    set [ghost v] effect to (100)\n    go to x: (0) y: (-100)\n    point in direction (90)\n    show\n    repeat (20)\n        change [ghost v] effect by (-5)\n        change y by (((-50) - (y position)) / (4))\n    end\n    set y to (-50)\n    repeat until <not <(Manager) = [Menu]>>\n        if <<touching (mouse-pointer v)?> and <not <(Show Controls) = [1]>>> then\n            start sound [Touch v]\n            set [brightness v] effect to (-10)\n            repeat until <<not <touching (mouse-pointer v)?>> and <not <(Show Controls) = [1]>>>\n                change size by (((90) - (size)) / (2))\n                if <<mouse down?> and <not <(Show Controls) = [1]>>> then\n                    set [manager v] to [Play]\n                    broadcast (Play v)\n                    start sound [Select v]\n                    repeat (20)\n                        change [ghost v] effect by (5)\n                        change size by (((80) - (size)) / (4))\n                        change [brightness v] effect by (5)\n                    end\n                    hide\n                    delete this clone\n                end\n            end\n        else\n            set [brightness v] effect to (0)\n            change size by (((100) - (size)) / (2))\n        end\n        if <<key (space v) pressed?> and <not <(Show Controls) = [1]>>> then\n            set [manager v] to [Play]\n            broadcast (Play v)\n            start sound [Select v]\n            repeat (20)\n                change [ghost v] effect by (5)\n                change size by (((80) - (size)) / (4))\n                change [brightness v] effect by (5)\n            end\n            hide\n            delete this clone\n        end\n    end\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    hide\n    delete this clone\nend\n\nwhen I start as a clone\nif <<(Clone) = [Button 3]> or <(Clone) = [Button 4]>> then\n    hide\n    switch costume to (Clone)\n    set size to (100) %\n    set [ghost v] effect to (100)\n    if <(costume [name v]) = [Button 3]> then\n        go to x: (-100) y: (10)\n    else\n        go to x: (100) y: (10)\n    end\n    point in direction (90)\n    show\n    repeat (20)\n        change [ghost v] effect by (-5)\n        if <(costume [name v]) = [Button 3]> then\n            change x by (((-40) - (x position)) / (4))\n        else\n            change x by (((40) - (x position)) / (4))\n        end\n    end\n    repeat until <not <(Manager) = [Menu]>>\n        if <<<touching (mouse-pointer v)?> or <(distance to [mouse-pointer v]) < [20]>> and <not <(Show Controls) = [1]>>> then\n            start sound [Touch v]\n            set [brightness v] effect to (-10)\n            repeat until <<not <<touching (mouse-pointer v)?> or <(distance to [mouse-pointer v]) < [30]>>> and <not <(Show Controls) = [1]>>>\n                set [brightness v] effect to (-10)\n                change size by (((100) - (size)) / (2))\n                if <<mouse down?> and <not <(Show Controls) = [1]>>> then\n                    start sound [Wood Tap v]\n                    if <(costume [name v]) = [Button 3]> then\n                        if <not <(PlayerColor) = [1]>> then\n                            change [playercolor v] by (-1)\n                            wait until <not <<<touching (mouse-pointer v)?> or <(distance to [mouse-pointer v]) < [30]>> and <mouse down?>>>\n                        else\n                            set [playercolor v] to [4]\n                            wait until <not <<<touching (mouse-pointer v)?> or <(distance to [mouse-pointer v]) < [30]>> and <mouse down?>>>\n                        end\n                    else\n                        if <not <(PlayerColor) = [4]>> then\n                            change [playercolor v] by (1)\n                            wait until <not <<<touching (mouse-pointer v)?> or <(distance to [mouse-pointer v]) < [30]>> and <mouse down?>>>\n                        else\n                            set [playercolor v] to [1]\n                            wait until <not <<<touching (mouse-pointer v)?> or <(distance to [mouse-pointer v]) < [30]>> and <mouse down?>>>\n                        end\n                    end\n                end\n            end\n        else\n            set [brightness v] effect to (0)\n            change size by (((100) - (size)) / (2))\n        end\n    end\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    hide\n    delete this clone\nend\n\nwhen I start as a clone\nif <<(Clone) = [Button 5]> or <(Clone) = [Button 6]>> then\n    hide\n    switch costume to (join (Clone) [.1])\n    set size to (100) %\n    set [ghost v] effect to (100)\n    if <(costume [name v]) = [Button 5.1]> then\n        go to x: (-400) y: (-50)\n    else\n        go to x: (400) y: (-50)\n    end\n    point in direction (90)\n    if <(costume [name v]) = (join [Button 5] (join (letter (9) of (costume [name v])) (letter (10) of (costume [name v]))))> then\n        if <(Show Controls) = [0]> then\n            switch costume to (button 5.1 v)\n        else\n            switch costume to (button 5.2 v)\n        end\n        if <(Show Controls) = [0]> then\n            set [brightness v] effect to (0)\n        else\n            set [brightness v] effect to (-20)\n        end\n    else\n        if <(Music) = [1]> then\n            switch costume to (button 6.1 v)\n        else\n            switch costume to (button 6.2 v)\n        end\n    end\n    show\n    repeat (20)\n        change [ghost v] effect by (-5)\n        if <<(costume [name v]) = [Button 5.1]> or <(costume [name v]) = [Button 5.2]>> then\n            change x by (((-130) - (x position)) / (4))\n        else\n            change x by (((130) - (x position)) / (4))\n        end\n        if <not <(Manager) = [Menu]>> then\n            repeat (20)\n                change [ghost v] effect by (5)\n            end\n            hide\n            delete this clone\n        end\n    end\n    repeat until <not <(Manager) = [Menu]>>\n        if <<<touching (mouse-pointer v)?> or <(distance to [mouse-pointer v]) < [20]>> and <not <(Show Controls) = [1]>>> then\n            start sound [Touch v]\n            set [brightness v] effect to (-10)\n            repeat until <<not <touching (mouse-pointer v)?>> and <not <(Show Controls) = [1]>>>\n                set [brightness v] effect to (-10)\n                change size by (((90) - (size)) / (2))\n                if <(costume [name v]) = (join [Button 5] (join (letter (9) of (costume [name v])) (letter (10) of (costume [name v]))))> then\n                    if <(Show Controls) = [0]> then\n                        switch costume to (button 5.1 v)\n                    else\n                        switch costume to (button 5.2 v)\n                        set [brightness v] effect to (-20)\n                    end\n                else\n                    if <(Music) = [1]> then\n                        switch costume to (button 6.1 v)\n                    else\n                        switch costume to (button 6.2 v)\n                    end\n                end\n                if <<mouse down?> and <not <(Show Controls) = [1]>>> then\n                    start sound [Wood Tap v]\n                    if <(costume [name v]) = (join [Button 5] (join (letter (9) of (costume [name v])) (letter (10) of (costume [name v]))))> then\n                        if <(Show Controls) = [0]> then\n                            set [show controls v] to [1]\n                            set [clone v] to [Controls]\n                            create clone of (_myself_ v)\n                            set [clone v] to [Fade]\n                            create clone of (_myself_ v)\n                        else\n                            set [show controls v] to [0]\n                        end\n                    else\n                        if <(Music) = [1]> then\n                            set [music v] to [0]\n                        else\n                            set [music v] to [1]\n                        end\n                    end\n                    if <(costume [name v]) = (join [Button 5] (join (letter (9) of (costume [name v])) (letter (10) of (costume [name v]))))> then\n                        if <(Show Controls) = [0]> then\n                            switch costume to (button 5.1 v)\n                            set [brightness v] effect to (0)\n                        else\n                            switch costume to (button 5.2 v)\n                            set [brightness v] effect to (-20)\n                        end\n                    else\n                        if <(Music) = [1]> then\n                            switch costume to (button 6.1 v)\n                        else\n                            switch costume to (button 6.2 v)\n                        end\n                    end\n                    wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n                end\n            end\n        else\n            change size by (((100) - (size)) / (2))\n        end\n        if <(costume [name v]) = (join [Button 5] (join (letter (9) of (costume [name v])) (letter (10) of (costume [name v]))))> then\n            if <(Show Controls) = [0]> then\n                set [brightness v] effect to (0)\n            else\n                set [brightness v] effect to (-20)\n            end\n        else\n            set [brightness v] effect to (0)\n        end\n    end\n    repeat (15)\n        change [ghost v] effect by (7.5)\n    end\n    hide\n    delete this clone\nend\n\nif <(costume [name v]) = (join [Button 5] (join (letter (9) of (costume [name v])) (letter (10) of (costume [name v]))))> then\n    if <(Show Controls) = [0]> then\n        switch costume to (button 5.1 v)\n        set [brightness v] effect to (0)\n    else\n        switch costume to (button 5.2 v)\n        set [brightness v] effect to (-20)\n    end\nelse\n    if <(Music) = [1]> then\n        switch costume to (button 6.1 v)\n    else\n        switch costume to (button 6.2 v)\n    end\nend\n\nwhen I start as a clone\nif <(Clone) = [Transition]> then\n    hide\n    switch costume to (transition v)\n    set size to (120) %\n    set [ghost v] effect to (100)\n    go to x: (0) y: (0)\n    point in direction (90)\n    go to [front v] layer\n    show\n    repeat (20)\n        go to [front v] layer\n        change [ghost v] effect by (-5)\n    end\n    change [level v] by (1)\n    wait (0.05) seconds\n    repeat (20)\n        go to [front v] layer\n        change [ghost v] effect by (5)\n    end\n    hide\n    delete this clone\nend\n\nwhen I receive [game v]\nrepeat until <not <(Manager) = [Game]>>\n    if <(LevelChangeTrigger) = [1]> then\n        set [clone v] to [Transition]\n        create clone of (_myself_ v)\n        set [levelchangetrigger v] to [0]\n    end\nend\n\nwhen I start as a clone\nif <(Clone) = [Controls]> then\n    hide\n    switch costume to (controls v)\n    set size to (100) %\n    set [ghost v] effect to (100)\n    go to x: (0) y: (-400)\n    point in direction (90)\n    go to [front v] layer\n    show\n    repeat (20)\n        go to [front v] layer\n        change [ghost v] effect by (-5)\n        change y by (((0) - (y position)) / (4))\n    end\n    repeat until <<not <(Show Controls) = [1]>> or <not <(Manager) = [Menu]>>>\n        if <mouse down?> then\n            wait until <not <mouse down?>>\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            set [show controls v] to [0]\n            delete this clone\n        end\n    end\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Fade]> then\n    if <(Manager) = [Menu]> then\n        hide\n        switch costume to (fade v)\n        set size to (100) %\n        set [ghost v] effect to (100)\n        go to x: (0) y: (0)\n        point in direction (90)\n        go to [front v] layer\n        show\n        repeat (10)\n            change [ghost v] effect by (-5)\n        end\n        wait until <<not <(Show Controls) = [1]>> or <not <(Manager) = [Menu]>>>\n        repeat (10)\n            change [ghost v] effect by (5)\n        end\n        delete this clone\n    else\n        hide\n        switch costume to (fade v)\n        set size to (100) %\n        set [ghost v] effect to (100)\n        go to x: (0) y: (0)\n        point in direction (90)\n        go to [front v] layer\n        show\n        repeat (10)\n            change [ghost v] effect by (-5)\n        end\n        wait until <not <(End) = [1]>>\n        wait (0.2) seconds\n        repeat (10)\n            change [ghost v] effect by (5)\n        end\n        delete this clone\n    end\nend\n\nwhen I receive [game v]\nwait (0.1) seconds\nwait until <not <(End) = [0]>>\nwait (3) seconds\nset [endtrigger v] to [1]\nset [clone v] to [Fade]\ncreate clone of (_myself_ v)\nwait (0.1) seconds\nset [clone v] to [Font 8]\ncreate clone of (_myself_ v)\nwait (0.1) seconds\nset [clone v] to [Icons 0]\nrepeat (3)\n    set [clone v] to (join [Icons ] ((letter (7) of (Clone)) + (1)))\n    create clone of (_myself_ v)\n    wait (0.1) seconds\nend\nset [clone v] to [Diamonds]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(Clone) = [Button 7]> then\n    hide\n    switch costume to (button 7 v)\n    set size to (100) %\n    set [ghost v] effect to (100)\n    go to x: (0) y: (-100)\n    point in direction (90)\n    go to [front v] layer\n    show\n    repeat (20)\n        change [ghost v] effect by (-5)\n        change y by (((0) - (y position)) / (4))\n    end\n    set y to (0)\n    repeat until <not <(End) = [1]>>\n        if <touching (mouse-pointer v)?> then\n            start sound [Touch v]\n            set [brightness v] effect to (-10)\n            repeat until <not <touching (mouse-pointer v)?>>\n                change size by (((90) - (size)) / (2))\n                if <mouse down?> then\n                    set [end v] to [0]\n                    set [manager v] to [Menu]\n                    broadcast (Menu v)\n                    start sound [Select v]\n                    repeat (10)\n                        change [ghost v] effect by (10)\n                        change size by (((80) - (size)) / (2))\n                    end\n                    hide\n                    delete this clone\n                end\n            end\n        else\n            set [brightness v] effect to (0)\n            change size by (((100) - (size)) / (2))\n        end\n        if <key (space v) pressed?> then\n            set [end v] to [0]\n            set [manager v] to [Menu]\n            broadcast (Menu v)\n            start sound [Select v]\n            repeat (10)\n                change [ghost v] effect by (10)\n                change size by (((80) - (size)) / (2))\n            end\n            hide\n            delete this clone\n        end\n    end\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    hide\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Font 8]> then\n    hide\n    switch costume to (font 8 v)\n    set size to (100) %\n    set [ghost v] effect to (100)\n    go to x: (0) y: (25)\n    point in direction (90)\n    go to [front v] layer\n    set [v v] to [0]\n    show\n    repeat (20)\n        change [v v] by (6)\n        go to [front v] layer\n        change [ghost v] effect by (-5)\n        change y by (([sin v] of (v) ) * (1.5))\n    end\n    repeat until <not <(End) = [1]>>\n        change [v v] by (6)\n        change y by (([sin v] of (v) ) * (1.5))\n    end\n    repeat (10)\n        change [v v] by (6)\n        change [ghost v] effect by (10)\n        change y by (([sin v] of (v) ) * (1.5))\n    end\n    delete this clone\nend\n\nturn right (([sin v] of (v) ) * (0.5)) degrees\n\nturn right (([sin v] of (v) ) * (0.5)) degrees\n\nturn right (([sin v] of (v) ) * (0.5)) degrees\n\nwhen I start as a clone\nif <(Clone) = (join [Icons ] (letter (7) of (Clone)))> then\n    hide\n    switch costume to (Clone)\n    set size to (50) %\n    set [ghost v] effect to (100)\n    go to x: ((-150) + ((letter (7) of (costume [name v])) * (75))) y: (-75)\n    point in direction (90)\n    go to [front v] layer\n    set [v v] to [0]\n    show\n    repeat (20)\n        change [v v] by (6)\n        go to [front v] layer\n        change [ghost v] effect by (-5)\n        change size by (([sin v] of (v) ) * (1))\n        change y by (([sin v] of (v) ) * (1.5))\n    end\n    repeat until <not <(End) = [1]>>\n        change [v v] by (6)\n        change size by (([sin v] of (v) ) * (1))\n        change y by (([sin v] of (v) ) * (1.5))\n    end\n    repeat (10)\n        change [v v] by (6)\n        change [ghost v] effect by (10)\n        change size by (([sin v] of (v) ) * (1))\n        change y by (([sin v] of (v) ) * (1.5))\n    end\n    delete this clone\nend\n\nwhen I receive [game v]\nwait (0.1) seconds\nrepeat until <not <(Manager) = [Game]>>\n    if <(LDM) = [0]> then\n        set [clone v] to [LDM]\n        create clone of (_myself_ v)\n        wait until <not <(LDM) = [0]>>\n    end\nend\n\nwhen I start as a clone\nif <(Clone) = [LDM]> then\n    hide\n    switch costume to (ldm v)\n    set size to (100) %\n    set [ghost v] effect to (100)\n    go to x: (0) y: (-400)\n    point in direction (90)\n    go to [front v] layer\n    set [v v] to [0]\n    show\n    repeat (20)\n        change [v v] by (6)\n        go to [front v] layer\n        change [ghost v] effect by (-5)\n        change size by (([sin v] of (v) ) * (1))\n        change y by (((-167.5) - (y position)) / (4))\n    end\n    repeat until <not <(Manager) = [Game]>>\n        repeat (20)\n            change [v v] by (6)\n            go to [front v] layer\n            change size by (([sin v] of (v) ) * (1))\n            change [ghost v] effect by (5)\n            if <not <(LDM) = [0]>> then\n                repeat (20)\n                    change [v v] by (6)\n                    go to [front v] layer\n                    change size by (([sin v] of (v) ) * (1))\n                    change [ghost v] effect by (5)\n                end\n                delete this clone\n            end\n        end\n        repeat (20)\n            change [v v] by (6)\n            go to [front v] layer\n            change size by (([sin v] of (v) ) * (1))\n            change [ghost v] effect by (-5)\n            if <not <(LDM) = [0]>> then\n                repeat (20)\n                    change [v v] by (6)\n                    go to [front v] layer\n                    change size by (([sin v] of (v) ) * (1))\n                    change [ghost v] effect by (5)\n                end\n                delete this clone\n            end\n        end\n    end\n    repeat (20)\n        change [v v] by (6)\n        change [ghost v] effect by (5)\n        change size by (([sin v] of (v) ) * (1))\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Diamonds]> then\n    hide\n    switch costume to (join [Diamonds ] (Diamonds))\n    set size to (100) %\n    set [ghost v] effect to (0)\n    go to x: (400) y: (0)\n    point in direction (90)\n    go to [front v] layer\n    show\n    repeat (20)\n        go to [front v] layer\n        change x by (((0) - (x position)) / (4))\n    end\n    wait until <not <(End) = [1]>>\n    repeat (10)\n        change [ghost v] effect by (10)\n        change x by (((100) - (x position)) / (2))\n    end\n    delete this clone\nend\n\nwait (1) seconds\n\n@Player\n\nwhen flag clicked\nset [deadtrigger v] to [0]\nset [jump v] to [0]\nset [rotatemodetrigger v] to [0]\nset [rotatetrigger v] to [0]\nset [leveltrigger v] to [0]\nhide\nswitch costume to (default v)\nset size to (100) %\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\npoint in direction (90)\n\nwhen I receive [menu v]\nif <not <(EndTrigger) = [0]>> then\n    wait (0.5) seconds\nend\nhide\nswitch costume to (default v)\nset size to (30) %\nset [ghost v] effect to (100)\nif <(PlayerColor) = [1]> then\n    set [color v] effect to (0)\nend\nif <(PlayerColor) = [2]> then\n    set [color v] effect to (25)\nend\nif <(PlayerColor) = [3]> then\n    set [color v] effect to (75)\nend\nif <(PlayerColor) = [4]> then\n    set [color v] effect to (-30)\nend\ngo to x: (0) y: (-50)\npoint in direction (90)\nwait (0.2) seconds\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\n    change y by (((15) - (y position)) / (4))\nend\nrepeat until <not <(Manager) = [Menu]>>\n    if <(PlayerColor) = [1]> then\n        set [color v] effect to (0)\n    end\n    if <(PlayerColor) = [2]> then\n        set [color v] effect to (25)\n    end\n    if <(PlayerColor) = [3]> then\n        set [color v] effect to (75)\n    end\n    if <(PlayerColor) = [4]> then\n        set [color v] effect to (-30)\n    end\nend\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nrepeat until <(Manager) = [Game]>\n    hide\nend\n\nwhen I receive [game v]\nwait (0.1) seconds\nrepeat until <not <(Manager) = [Game]>>\n    if <<touching (ground v)?> and <not <(DeathTrigger) = [1]>>> then\n        change y by (1)\n        if <touching (ground v)?> then\n            change y by (1)\n            if <touching (ground v)?> then\n                change y by (1)\n                if <touching (ground v)?> then\n                    change y by (1)\n                    if <touching (ground v)?> then\n                        change y by (1)\n                        if <touching (ground v)?> then\n                            change x by ((x) * (-1))\n                            change y by (-5)\n                            if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<mouse down?> and <((mouse y) - (y position)) > [70]>>> then\n                                if <(x) > [0]> then\n                                    set [x v] to [-4]\n                                else\n                                    set [x v] to [4]\n                                end\n                                set [y v] to [12]\n                            else\n                                set [x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [game v]\nwait (0.1) seconds\nrepeat until <not <(Manager) = [Game]>>\n    change [y v] by (-1)\n    change y by (y)\n    if <<touching (ground v)?> and <not <(DeathTrigger) = [1]>>> then\n        change y by ((-1) * (y))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <touching (ground v)?> then\n        if <<<<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<mouse down?> and <((mouse y) - (y position)) > [70]>>> and <not <(DeathTrigger) = [1]>>> and <not <(End) = [1]>>> then\n            start sound [High Whoosh v]\n            set [y v] to [12]\n        end\n    end\n    change y by (1)\n    if <<<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> and <not <(End) = [1]>>> then\n        if <not <(RotateModeTrigger) = [1]>> then\n            if <not <<(x position) = [-220]> or <(x position) < [-220]>>> then\n                change [x v] by (-1)\n            end\n            set [rotatetrigger v] to [Left]\n            set rotation style [left-right v]\n            point in direction (-90)\n        end\n    end\n    if <<<<key (d v) pressed?> or <key (right arrow v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> and <not <(End) = [1]>>> then\n        if <not <(RotateModeTrigger) = [1]>> then\n            change [x v] by (1)\n            set [rotatetrigger v] to [Right]\n            set rotation style [left-right v]\n            point in direction (90)\n        end\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\nend\n\nwhen I receive [game v]\nset [deathtrigger v] to [0]\nset [rotatetrigger v] to [Right]\nwait (0.1) seconds\nrepeat until <not <(Manager) = [Game]>>\n    if <<<touching (obstacles v)?> or <touching (enemies v)?>> and <not <(DeathTrigger) = [1]>>> then\n        if <(EnemyKillerKillTrigger) = [1]> then\n            if <touching (enemies v)?> then\n                wait (0.05) seconds\n            end\n        end\n        if <touching (obstacles v)?> then\n            set [deadtrigger v] to [1]\n            set [deathtrigger v] to [1]\n            set [rotatemodetrigger v] to [1]\n            start sound [Plopp v]\n            switch costume to (hit v)\n            if <(RotateTrigger) = [Left]> then\n                point in direction (90)\n            end\n            set rotation style [all around v]\n            move (-5) steps\n            if <not <(y position) > [30]>> then\n                set [y v] to [12]\n            end\n            repeat (20)\n                change [ghost v] effect by (5)\n                change size by (((30) - (size)) / (4))\n                if <(RotateTrigger) = [Right]> then\n                    turn right (5) degrees\n                else\n                    turn left (5) degrees\n                end\n            end\n            hide\n            set [deadtrigger v] to [0]\n            set [deathtrigger v] to [0]\n            switch costume to (stand v)\n            set size to (30) %\n            go to x: (-190) y: (SpawnY)\n            point in direction (90)\n            show\n            repeat (10)\n                change [ghost v] effect by (-5)\n                switch costume to (stand v)\n            end\n            set [rotatemodetrigger v] to [0]\n            repeat (10)\n                change [ghost v] effect by (-5)\n            end\n            point in direction (90)\n            set rotation style [left-right v]\n        else\n            if <not <(EnemyKillTrigger) = [1]>> then\n                set [deadtrigger v] to [1]\n                set [deathtrigger v] to [1]\n                set [rotatemodetrigger v] to [1]\n                start sound [Plopp v]\n                switch costume to (hit v)\n                if <(RotateTrigger) = [Left]> then\n                    point in direction (90)\n                end\n                set rotation style [all around v]\n                move (-5) steps\n                if <not <(y position) > [30]>> then\n                    set [y v] to [12]\n                end\n                repeat (20)\n                    change [ghost v] effect by (5)\n                    change size by (((30) - (size)) / (4))\n                    if <(RotateTrigger) = [Right]> then\n                        turn right (5) degrees\n                    else\n                        turn left (5) degrees\n                    end\n                end\n                hide\n                set [deadtrigger v] to [0]\n                set [deathtrigger v] to [0]\n                switch costume to (stand v)\n                set size to (30) %\n                go to x: (-190) y: (SpawnY)\n                point in direction (90)\n                show\n                repeat (10)\n                    change [ghost v] effect by (-5)\n                    switch costume to (stand v)\n                end\n                set [rotatemodetrigger v] to [0]\n                repeat (10)\n                    change [ghost v] effect by (-5)\n                end\n                point in direction (90)\n                set rotation style [left-right v]\n            end\n        end\n    end\nend\n\nwhen I receive [game v]\nrepeat until <not <(Manager) = [Game]>>\n    if <<<<<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>> or <<<mouse down?> and <(mouse x) > (x position)>> or <<mouse down?> and <(mouse x) < (x position)>>>> and <(InAirTrigger) = [0]>> and <not <(End) = [1]>>> then\n        repeat until <<not <<<<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>> or <<<mouse down?> and <(mouse x) > (x position)>> or <<mouse down?> and <(mouse x) < (x position)>>>> and <(InAirTrigger) = [0]>>> and <not <(End) = [1]>>>\n            if <<not <(RotateModeTrigger) = [1]>> and <not <(End) = [1]>>> then\n                switch costume to (walk 1 v)\n            end\n            if <([abs v] of (x) ) > [6]> then\n                wait (0.05) seconds\n            else\n                if <([abs v] of (x) ) > [4]> then\n                    wait (0.08) seconds\n                else\n                    if <([abs v] of (x) ) > [2]> then\n                        wait (0.08) seconds\n                    else\n                        if <([abs v] of (x) ) > [0]> then\n                            wait (0.1) seconds\n                        end\n                    end\n                end\n            end\n            if <<not <(RotateModeTrigger) = [1]>> and <not <(End) = [1]>>> then\n                switch costume to (walk 2 v)\n            end\n            if <([abs v] of (x) ) > [6]> then\n                wait (0.05) seconds\n            else\n                if <([abs v] of (x) ) > [4]> then\n                    wait (0.08) seconds\n                else\n                    if <([abs v] of (x) ) > [2]> then\n                        wait (0.08) seconds\n                    else\n                        if <([abs v] of (x) ) > [0]> then\n                            wait (0.1) seconds\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nif <not <<(x position) = [-220]> or <(x position) < [-220]>>> then\n    switch costume to (walk 2 v)\nend\nif <<not <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>>> and <(Jump) = [0]>> then\n    switch costume to (stand v)\n    wait until <<<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>> and <(Jump) = [0]>>\nelse\n    if <([abs v] of (x) ) > [6]> then\n        wait (0.05) seconds\n    else\n        if <([abs v] of (x) ) > [4]> then\n            wait (0.08) seconds\n        else\n            if <([abs v] of (x) ) > [2]> then\n                wait (0.08) seconds\n            else\n                if <([abs v] of (x) ) > [0]> then\n                    wait (0.1) seconds\n                end\n            end\n        end\n    end\n    if <not <<(x position) = [-220]> or <(x position) < [-220]>>> then\n        switch costume to (walk 1 v)\n    end\n    if <not <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>>> then\n        switch costume to (stand v)\n        wait until <<<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>> and <(Jump) = [0]>>\n    else\n        if <([abs v] of (x) ) > [6]> then\n            wait (0.05) seconds\n        else\n            if <([abs v] of (x) ) > [4]> then\n                wait (0.08) seconds\n            else\n                if <([abs v] of (x) ) > [2]> then\n                    wait (0.08) seconds\n                else\n                    if <([abs v] of (x) ) > [0]> then\n                        wait (0.1) seconds\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [game v]\nwait (0.1) seconds\nrepeat until <not <(Manager) = [Game]>>\n    if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<mouse down?> and <((mouse y) - (y position)) > [70]>>> then\n        set [jump v] to [1]\n        wait until <(y) = [0]>\n        wait until <(y) < [0]>\n        wait until <(y) = [0]>\n        set [jump v] to [0]\n    end\nend\n\nwhen I receive [game v]\nwait (0.1) seconds\nrepeat until <not <(Manager) = [Game]>>\n    if <<<(x position) > [200]> and <not <(DeathTrigger) = [1]>>> and <not <(End) = [1]>>> then\n        set [rotatemodetrigger v] to [1]\n        set [levelchangetrigger v] to [1]\n        set [y v] to [12]\n        switch costume to (swim 1 v)\n        repeat (5)\n            change [ghost v] effect by (20)\n        end\n        hide\n        wait until <not <(LevelTrigger) = (Level)>>\n        wait until <(LevelTrigger) = (Level)>\n    end\nend\n\nwhen I receive [game v]\nwait (0.1) seconds\nset [deadtrigger v] to [0]\nrepeat until <not <(Manager) = [Game]>>\n    set [leveltrigger v] to (Level)\n    wait until <not <(LevelTrigger) = (Level)>>\n    set [rotatemodetrigger v] to [1]\n    set [x v] to [0]\n    set [y v] to [0]\n    hide\n    switch costume to (stand v)\n    set size to (30) %\n    wait (0.05) seconds\n    go to x: (-190) y: (SpawnY)\n    point in direction (90)\n    show\n    repeat (10)\n        change [ghost v] effect by (-5)\n    end\n    set [rotatemodetrigger v] to [0]\n    repeat (10)\n        change [ghost v] effect by (-5)\n    end\n    point in direction (90)\n    set rotation style [left-right v]\nend\n\nwhen I receive [game v]\nset [rotatemodetrigger v] to [1]\nset [x v] to [0]\nset [y v] to [0]\nhide\nswitch costume to (stand v)\nset size to (30) %\nset [ghost v] effect to (100)\ngo to x: (-190) y: (0)\npoint in direction (90)\nshow\nrepeat (10)\n    change [ghost v] effect by (-5)\nend\nset [rotatemodetrigger v] to [0]\nrepeat (10)\n    change [ghost v] effect by (-5)\nend\npoint in direction (90)\nset rotation style [left-right v]\n\nwhen I receive [game v]\nwait (0.1) seconds\nrepeat until <not <(Manager) = [Game]>>\n    if <(x position) < [-220]> then\n        set x to (-220)\n        switch costume to (stand v)\n        set [x v] to [10]\n    end\n    if <(y position) > [150]> then\n        set y to (150)\n    end\n    if <<not <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>>> and <not <<<mouse down?> and <(mouse x) > (x position)>> or <<mouse down?> and <(mouse x) < (x position)>>>>> then\n        if <<<not <(RotateModeTrigger) = [1]>> and <(InAirTrigger) = [0]>> and <not <(End) = [1]>>> then\n            switch costume to (stand v)\n        end\n    end\n    if <touching (jumppads v)?> then\n        set [y v] to [18]\n    end\n    if <(x position) < [-210]> then\n        set [edgetrigger v] to [1]\n    else\n        set [edgetrigger v] to [0]\n    end\nend\n\nwhen I receive [game v]\nwait (0.1) seconds\nrepeat until <not <(Manager) = [Game]>>\n    if <<not <(RotateModeTrigger) = [1]>> and <not <(End) = [1]>>> then\n        go to [front v] layer\n    end\nend\n\nif <<not <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>>> and <not <<<mouse down?> and <(mouse x) > (x position)>> or <<mouse down?> and <(mouse x) < (x position)>>>>> then\n    repeat until <<not <<not <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>>> and <not <<<mouse down?> and <(mouse x) > (x position)>> or <<mouse down?> and <(mouse x) < (x position)>>>>>> or <not <(InAirTrigger) = [1]>>>\n        switch costume to (jump v)\n    end\nend\n\nwhen I receive [game v]\nwait (0.1) seconds\nrepeat until <not <(Manager) = [Game]>>\n    if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<mouse down?> and <((mouse y) - (y position)) > [70]>>> then\n        set [jump v] to [1]\n        wait (0.05) seconds\n        if <touching (ground v)?> then\n            set [jump v] to [0]\n        end\n    end\nend\n\nwhen I receive [game v]\nwait (0.1) seconds\nrepeat until <not <(Manager) = [Game]>>\n\nswitch costume to (jump v)\nrepeat until <not <(InAirTrigger) = [1]>>\n    switch costume to (jump v)\nend\n\nif <(Level) = [4]> then\n    set y to (40)\nend\n\nwhen I receive [game v]\nwait (0.1) seconds\nwait until <not <(End) = [0]>>\nset [x v] to [0]\nswitch costume to (stand v)\nrepeat (20)\n    switch costume to (stand v)\n    set x to (-190)\nend\nrepeat until <not <(x position) < [-100]>>\n    change [x v] by (1)\nend\nset [y v] to [15]\nrepeat until <not <(x position) < [100]>>\n    change [x v] by (1)\nend\nswitch costume to (stand v)\nset rotation style [left-right v]\npoint in direction (-90)\nwait until <not <(End) = [1]>>\nset rotation style [left-right v]\npoint in direction (90)\nrepeat (10)\n    change [ghost v] effect by (10)\n    change [x v] by (0.5)\nend\nhide\n\nwhen I receive [game v]\nwait (0.1) seconds\nwait until <not <(End) = [0]>>\nwait until <(x position) > [-189]>\nrepeat until <not <(x position) < [-100]>>\n    switch costume to (walk 1 v)\n    wait (0.1) seconds\n    switch costume to (walk 2 v)\n    wait (0.1) seconds\nend\nswitch costume to (jump v)\n\n@Background\n\nwhen flag clicked\nset [leveltrigger v] to [0]\nhide\nswitch costume to (button 1 v)\nset size to (100) %\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\npoint in direction (90)\n\nwhen I receive [startgame v]\nset [leveltrigger v] to [0]\nswitch costume to (level 1 v)\nset size to (100) %\nset [ghost v] effect to (100)\nset [brightness v] effect to (-10)\ngo to x: (0) y: (-400)\npoint in direction (90)\ngo to [back v] layer\nshow\nrepeat (20)\n    change [ghost v] effect by (-4)\n    change y by (((0) - (y position)) / (4))\nend\ngo to [back v] layer\nset y to (0)\nwait until <(Manager) = [Game]>\nrepeat until <not <(Manager) = [Game]>>\n    set [leveltrigger v] to (Level)\n    wait until <not <(LevelTrigger) = (Level)>>\n    switch costume to (join [Level ] (Level))\n    if <(costume [name v]) = [Level 11]> then\n        create clone of (_myself_ v)\n        wait (0.5) seconds\n        wait until <not <(End) = [1]>>\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        hide\n        stop [this script v]\n    end\nend\nrepeat (20)\n    change [ghost v] effect by (4)\nend\nhide\n\nwhen I start as a clone\nswitch costume to (level 11.2 v)\nset size to (100) %\nset [ghost v] effect to (0)\ngo to x: (0) y: (0)\npoint in direction (90)\nshow\nwait (1) seconds\nwait until <not <([x position v] of [player v]) < [-10]>>\nrepeat (40)\n    change y by (((-180) - (y position)) / (8))\nend\nwait until <not <(End) = [1]>>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\n@Ground\n\nwhen flag clicked\nset [level v] to [0]\nset [inairtrigger v] to [0]\nset [end v] to [0]\nset [endtrigger v] to [0]\nhide\nswitch costume to (blank v)\nset size to (100) %\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\npoint in direction (90)\n\nwhen I receive [menu v]\nif <not <(EndTrigger) = [0]>> then\n    wait (0.5) seconds\nend\nhide\nswitch costume to (blank v)\nset size to (100) %\nset [ghost v] effect to (100)\ngo to x: (0) y: (-400)\npoint in direction (90)\nset [endtrigger v] to [0]\nshow\nrepeat (50)\n    change [ghost v] effect by (-5)\n    change y by (((0) - (y position)) / (8))\nend\nset y to (0)\n\nwhen I receive [play v]\nstop [other scripts in sprite v]\nset [end v] to [0]\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\nwait until <(Manager) = [Ready]>\nwait (0.1) seconds\nset [level v] to [1]\nhide\nswitch costume to (level 1 v)\nset size to (100) %\nset [ghost v] effect to (100)\ngo to x: (0) y: (-400)\npoint in direction (90)\nset [manager v] to [StartGame]\nbroadcast (StartGame v)\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\n    change y by (((0) - (y position)) / (4))\nend\nset y to (0)\nset [manager v] to [Game]\nbroadcast (Game v)\n\nwhen I receive [game v]\ngo to [front v] layer\nrepeat until <not <(Manager) = [Game]>>\n    set [leveltrigger v] to (Level)\n    wait until <not <(LevelTrigger) = (Level)>>\n    switch costume to (join [Level ] (Level))\n    if <(costume [name v]) = [Level 11]> then\n        set [end v] to [1]\n        wait until <not <(End) = [1]>>\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        hide\n        stop [this script v]\n    end\nend\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I receive [game v]\nset [end v] to [0]\nset [endtrigger v] to [0]\nrepeat until <not <(Manager) = [Game]>>\n    if <touching (hitbox v)?> then\n        set [inairtrigger v] to [0]\n    else\n        set [inairtrigger v] to [1]\n    end\nend\n\nwhen I receive [game v]\ndelete all of [spawny specific v]\nadd [4] to [spawny specific v]\nadd [5] to [spawny specific v]\nadd [7] to [spawny specific v]\nset [spawny v] to [-100]\nrepeat until <not <(Manager) = [Game]>>\n    if <[spawny specific v] contains (Level)?> then\n        set [spawny v] to [40]\n    else\n        set [spawny v] to [-100]\n    end\nend\n\n@Other\n\nwhen flag clicked\nhide\nswitch costume to (bee 1 v)\nset size to (100) %\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\npoint in direction (90)\n\nwhen I receive [startgame v]\nset [leveltrigger v] to [0]\nhide\nswitch costume to (bee 1 v)\nset size to (100) %\nset [ghost v] effect to (100)\ngo to x: (0) y: (-400)\npoint in direction (90)\nwait until <(Manager) = [Game]>\nrepeat until <not <(Manager) = [Game]>>\n    if <(Level) = [1]> then\n        set [clone v] to [Level 1.1]\n        create clone of (_myself_ v)\n    end\n    if <(Level) = [5]> then\n        set [clone v] to [Level 5.1]\n        create clone of (_myself_ v)\n        set [clone v] to [Level 5.2]\n        create clone of (_myself_ v)\n    end\n    if <(Level) = [7]> then\n        set [clone v] to [Level 7.1]\n        create clone of (_myself_ v)\n    end\n    if <(Level) = [9]> then\n        set [clone v] to [Level 9.1]\n        create clone of (_myself_ v)\n    end\n    if <(Level) = [11]> then\n        wait (1) seconds\n        wait until <not <([x position v] of [player v]) < [-50]>>\n        set [clone v] to [Level 11.1]\n        repeat until <not <(End) = [1]>>\n            create clone of (_myself_ v)\n            wait (1) seconds\n        end\n    end\n    set [leveltrigger v] to (Level)\n    wait until <not <(LevelTrigger) = (Level)>>\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 1.1]> then\n    switch costume to (bee 1 v)\n    set size to (50) %\n    set [ghost v] effect to (20)\n    go to x: (180) y: (-10)\n    set rotation style [left-right v]\n    point in direction (90)\n    show\n    go [backward v] (1) layers\n    set [leveltrigger v] to (Level)\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        switch costume to (bee 1 v)\n        wait (0.05) seconds\n        switch costume to (bee 2 v)\n        wait (0.05) seconds\n    end\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 1.1]> then\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        point in direction (90)\n        repeat (100)\n            change x by (((-50) - (x position)) / (16))\n        end\n        wait (0.5) seconds\n        point in direction (-90)\n        repeat (100)\n            change x by (((180) - (x position)) / (16))\n        end\n        wait (0.5) seconds\n    end\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 1.1]> then\n    set [v v] to [0]\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        change [v v] by (6)\n        change y by (([sin v] of (v) ) * (2))\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 5.1]> then\n    switch costume to (bee 1 v)\n    set size to (50) %\n    set [ghost v] effect to (20)\n    go to x: (180) y: (100)\n    set rotation style [left-right v]\n    point in direction (90)\n    show\n    go [backward v] (1) layers\n    set [leveltrigger v] to (Level)\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        switch costume to (bee 1 v)\n        wait (0.05) seconds\n        switch costume to (bee 2 v)\n        wait (0.05) seconds\n    end\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 5.1]> then\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        point in direction (90)\n        repeat (100)\n            change x by (((-50) - (x position)) / (16))\n        end\n        wait (0.5) seconds\n        point in direction (-90)\n        repeat (100)\n            change x by (((180) - (x position)) / (16))\n        end\n        wait (0.5) seconds\n    end\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 5.1]> then\n    set [v v] to [0]\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        change [v v] by (6)\n        change y by (([sin v] of (v) ) * (2))\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 7.1]> then\n    switch costume to (bee 1 v)\n    set size to (50) %\n    set [ghost v] effect to (20)\n    go to x: (400) y: (100)\n    set rotation style [left-right v]\n    point in direction (90)\n    show\n    go [backward v] (1) layers\n    set [leveltrigger v] to (Level)\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        switch costume to (bee 1 v)\n        wait (0.05) seconds\n        switch costume to (bee 2 v)\n        wait (0.05) seconds\n    end\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 7.1]> then\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        point in direction (90)\n        repeat (100)\n            change x by (((-150) - (x position)) / (16))\n        end\n        wait (0.5) seconds\n        point in direction (-90)\n        repeat (100)\n            change x by (((110) - (x position)) / (16))\n        end\n        wait (0.5) seconds\n    end\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 7.1]> then\n    set [v v] to [0]\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        change [v v] by (6)\n        change y by (([sin v] of (v) ) * (2))\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 5.2]> then\n    switch costume to (switch 1 v)\n    set size to (40) %\n    set [ghost v] effect to (20)\n    go to x: (30) y: (-120)\n    set rotation style [all around v]\n    point in direction (90)\n    show\n    go [backward v] (1) layers\n    set [leveltrigger v] to (Level)\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        if <<touching (player v)?> and <<(BarnacleTrigger) = [0]> and <not <(RotateModeTrigger) = [1]>>>> then\n            switch costume to (switch 2 v)\n            set [barnacletrigger v] to [1]\n            set [y v] to [10]\n            play sound [Water Drop v] until done\n        end\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 9.1]> then\n    switch costume to (switch 1 v)\n    set size to (40) %\n    set [ghost v] effect to (20)\n    go to x: (150) y: (-120)\n    set rotation style [all around v]\n    point in direction (90)\n    show\n    go [backward v] (1) layers\n    set [leveltrigger v] to (Level)\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        if <<<touching (player v)?> and <(BarnacleTrigger) = [0]>> and <not <(RotateModeTrigger) = [1]>>> then\n            switch costume to (switch 2 v)\n            set [barnacletrigger v] to [1]\n            set [y v] to [10]\n            play sound [Water Drop v] until done\n        end\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 11.1]> then\n    hide\n    switch costume to (particle v)\n    set size to (pick random (150) to (225)) %\n    set [ghost v] effect to (0)\n    set [color v] effect to (pick random (0) to (2000))\n    go to x: (pick random (-200) to (200)) y: (-185)\n    set [ys v] to (pick random (-300) to (-180))\n    repeat (15)\n        change [ys v] by (15)\n        set y to (ys)\n        if <not <[-175] > (y position)>> then\n            show\n        end\n        if <not <(End) = [1]>> then\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            delete this clone\n        end\n    end\n    set [clone v] to [Level 11.2]\n    repeat (10)\n        create clone of (_myself_ v)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 11.2]> then\n    change [color v] effect by (pick random (-25) to (25))\n    show\n    set [xv v] to (pick random (-10) to (10))\n    set [yv v] to (pick random (0) to (25))\n    repeat until <(y position) < [-170]>\n        change [ghost v] effect by (3)\n        set size to ((200) + ((yv) * (5))) %\n        set [xv v] to ((xv) * (0.9))\n        set [yv v] to ((yv) * (0.9))\n        change [yv v] by (-1)\n        change x by (xv)\n        change y by (yv)\n        if <not <(End) = [1]>> then\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            delete this clone\n        end\n    end\n    delete this clone\nend\n\n@Enemies\n\nwhen flag clicked\nset [clone v] to [0]\nset [enemykilltrigger v] to [0]\nset [enemykillerkilltrigger v] to [0]\nhide\nswitch costume to (default v)\nset size to (100) %\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\npoint in direction (90)\n\nwhen I receive [startgame v]\nset [leveltrigger v] to [0]\nset [enemykilltrigger v] to [0]\nset [enemykillerkilltrigger v] to [0]\nhide\nswitch costume to (saw 1 v)\nset size to (100) %\nset [ghost v] effect to (100)\ngo to x: (0) y: (-400)\npoint in direction (90)\nwait until <(Manager) = [Game]>\nrepeat until <not <(Manager) = [Game]>>\n    if <(Level) = [2]> then\n        set [clone v] to [Level 2.1]\n        create clone of (_myself_ v)\n    end\n    if <(Level) = [3]> then\n        set [clone v] to [Level 3.1]\n        create clone of (_myself_ v)\n    end\n    if <(Level) = [4]> then\n        set [clone v] to [Level 4.1]\n        create clone of (_myself_ v)\n        set [clone v] to [Level 4.2]\n        create clone of (_myself_ v)\n    end\n    if <(Level) = [5]> then\n        set [clone v] to [Level 5.1]\n        create clone of (_myself_ v)\n    end\n    if <(Level) = [6]> then\n        set [clone v] to [Level 6.1]\n        create clone of (_myself_ v)\n    end\n    if <(Level) = [7]> then\n        set [clone v] to [Level 7.1]\n        create clone of (_myself_ v)\n        set [clone v] to [Level 7.2]\n        create clone of (_myself_ v)\n    end\n    if <(Level) = [8]> then\n        set [clone v] to [Level 8.1]\n        create clone of (_myself_ v)\n    end\n    if <(Level) = [9]> then\n        set [clone v] to [Level 9.1]\n        create clone of (_myself_ v)\n        set [clone v] to [Level 9.2]\n        create clone of (_myself_ v)\n        set [clone v] to [Level 9.3]\n        create clone of (_myself_ v)\n    end\n    if <(Level) = [10]> then\n        set [clone v] to [Level 10.1]\n        create clone of (_myself_ v)\n        set [clone v] to [Level 10.2]\n        create clone of (_myself_ v)\n    end\n    set [leveltrigger v] to (Level)\n    wait until <not <(LevelTrigger) = (Level)>>\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 2.1]> then\n    switch costume to (saw 1 v)\n    set size to (100) %\n    set [ghost v] effect to (0)\n    go to x: (65) y: (-150)\n    point in direction (90)\n    show\n    go [backward v] (1) layers\n    set [leveltrigger v] to (Level)\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        turn right (7.5) degrees\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 3.1]> then\n    switch costume to (saw 1 v)\n    set size to (100) %\n    set [ghost v] effect to (0)\n    go to x: (57) y: (-150)\n    point in direction (90)\n    show\n    go [backward v] (1) layers\n    set [leveltrigger v] to (Level)\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        turn right (7.5) degrees\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 4.1]> then\n    switch costume to (fly 1 v)\n    set size to (50) %\n    set [ghost v] effect to (0)\n    go to x: (400) y: (70)\n    set rotation style [left-right v]\n    point in direction (90)\n    show\n    go [backward v] (1) layers\n    set [leveltrigger v] to (Level)\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        repeat (100)\n            change x by (((130) - (x position)) / (16))\n        end\n        wait (0.5) seconds\n        point in direction (90)\n        repeat (100)\n            change x by (((-160) - (x position)) / (16))\n        end\n        wait (0.5) seconds\n        point in direction (-90)\n    end\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 4.1]> then\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        switch costume to (fly 1 v)\n        wait (0.05) seconds\n        switch costume to (fly 2 v)\n        wait (0.05) seconds\n    end\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 4.1]> then\n    set [v v] to [0]\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        change [v v] by (6)\n        change y by (([sin v] of (v) ) * (2))\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 4.2]> then\n    switch costume to (slime 1 v)\n    set size to (50) %\n    set [ghost v] effect to (0)\n    go to x: (55) y: (-15)\n    set rotation style [left-right v]\n    point in direction (90)\n    show\n    go [backward v] (1) layers\n    set [leveltrigger v] to (Level)\n    set [v v] to [0]\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        if <(([x position v] of [player v]) - (30)) < (x position)> then\n            point in direction (90)\n        else\n            point in direction (-90)\n        end\n        change [v v] by (6)\n        change x by (([sin v] of (v) ) * (1))\n        if <<touching (player v)?> and <not <(RotateModeTrigger) = [1]>>> then\n            if <([y position v] of [player v]) > (y position)> then\n                set [enemykilltrigger v] to [1]\n                set [y v] to [5]\n                start sound [Suction Cup v]\n                switch costume to (slime 2 v)\n                repeat (20)\n                    change y by (((-60) - (y position)) / (4))\n                    if <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>> then\n                        delete this clone\n                    end\n                end\n                set [enemykilltrigger v] to [0]\n                delete this clone\n            end\n        end\n    end\n    delete this clone\nend\n\nwhen I receive [game v]\nrepeat until <not <(Manager) = [Game]>>\n    if <(Level) = [4]> then\n        set [enemykillerkilltrigger v] to [1]\n    else\n        set [enemykillerkilltrigger v] to [0]\n    end\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 5.1]> then\n    switch costume to (barnacle 1 v)\n    set size to (70) %\n    set [ghost v] effect to (0)\n    go to x: (150) y: (-120)\n    point in direction (90)\n    show\n    go [backward v] (1) layers\n    set [v v] to [0]\n    set [barnacletrigger v] to [0]\n    set [leveltrigger v] to (Level)\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        switch costume to (barnacle 1 v)\n        change [v v] by (10)\n        change y by (([sin v] of (v) ) * (2))\n        if <(BarnacleTrigger) = [1]> then\n            set [enemykilltrigger v] to [1]\n            repeat (20)\n                change [pixelate v] effect by (10)\n                change [ghost v] effect by (5)\n                change [brightness v] effect by (5)\n            end\n            set [enemykilltrigger v] to [0]\n            delete this clone\n        end\n        if <touching (player v)?> then\n            switch costume to (barnacle 2 v)\n            if <([x position v] of [player v]) < (x position)> then\n                set [x v] to [-7]\n            else\n                set [x v] to [7]\n            end\n            repeat (10)\n                change [v v] by (10)\n                change y by (([sin v] of (v) ) * (2))\n                if <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>> then\n                    delete this clone\n                end\n                if <(BarnacleTrigger) = [1]> then\n                    repeat (20)\n                        change [pixelate v] effect by (10)\n                        change [ghost v] effect by (5)\n                        change [brightness v] effect by (5)\n                    end\n                    delete this clone\n                end\n            end\n            switch costume to (barnacle 1 v)\n        end\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 9.1]> then\n    switch costume to (fly 1 v)\n    set size to (50) %\n    set [ghost v] effect to (0)\n    go to x: (400) y: (110)\n    set rotation style [left-right v]\n    point in direction (90)\n    show\n    go [backward v] (1) layers\n    set [leveltrigger v] to (Level)\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        repeat (100)\n            change x by (((100) - (x position)) / (16))\n        end\n        wait (0.5) seconds\n        point in direction (90)\n        repeat (100)\n            change x by (((-180) - (x position)) / (16))\n        end\n        wait (0.5) seconds\n        point in direction (-90)\n        set y to (120)\n    end\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 6.1]> then\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        switch costume to (fly 1 v)\n        wait (0.05) seconds\n        switch costume to (fly 2 v)\n        wait (0.05) seconds\n    end\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 6.1]> then\n    set [v v] to [0]\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        change [v v] by (6)\n        change y by (([sin v] of (v) ) * (2))\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 8.1]> then\n    switch costume to (slime 1 v)\n    set size to (70) %\n    set [ghost v] effect to (0)\n    go to x: (115) y: (-100)\n    set rotation style [left-right v]\n    point in direction (90)\n    show\n    go [backward v] (1) layers\n    set [leveltrigger v] to (Level)\n    set [v v] to [0]\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        change [v v] by (6)\n        change x by (([sin v] of (v) ) * (1))\n        if <<<touching (hitbox v)?> and <(([y position v] of [player v]) - (10)) > (y position)>> and <not <(RotateModeTrigger) = [1]>>> then\n            set [enemykilltrigger v] to [1]\n            wait (0.05) seconds\n            set [y v] to [5]\n            start sound [Suction Cup v]\n            switch costume to (slime 2 v)\n            repeat (20)\n                change y by (((-150) - (y position)) / (4))\n                if <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>> then\n                    delete this clone\n                end\n            end\n            set [enemykilltrigger v] to [0]\n            delete this clone\n        end\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 7.1]> then\n    switch costume to (saw 1 v)\n    set size to (100) %\n    set [ghost v] effect to (0)\n    go to x: (60) y: (-150)\n    point in direction (90)\n    show\n    go [backward v] (1) layers\n    set [leveltrigger v] to (Level)\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        turn right (7.5) degrees\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 9.1]> then\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        switch costume to (fly 1 v)\n        wait (0.05) seconds\n        switch costume to (fly 2 v)\n        wait (0.05) seconds\n    end\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 9.1]> then\n    set [v v] to [0]\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        change [v v] by (6)\n        change y by (([sin v] of (v) ) * (2))\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 9.2]> then\n    switch costume to (barnacle 1 v)\n    set size to (70) %\n    set [ghost v] effect to (0)\n    go to x: (80) y: (45)\n    point in direction (90)\n    show\n    go [backward v] (2) layers\n    set [v v] to [0]\n    set [barnacletrigger v] to [0]\n    set [leveltrigger v] to (Level)\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        switch costume to (barnacle 1 v)\n        change [v v] by (10)\n        change y by (([sin v] of (v) ) * (0.5))\n        if <(BarnacleTrigger) = [1]> then\n            set [enemykilltrigger v] to [1]\n            repeat (20)\n                change [pixelate v] effect by (10)\n                change [ghost v] effect by (5)\n                change [brightness v] effect by (5)\n            end\n            set [enemykilltrigger v] to [0]\n            delete this clone\n        end\n        if <<touching (player v)?> and <not <(RotateModeTrigger) = [1]>>> then\n            switch costume to (barnacle 2 v)\n            if <([x position v] of [player v]) < (x position)> then\n                set [x v] to [-7]\n            else\n                set [x v] to [7]\n            end\n            repeat (10)\n                change [v v] by (10)\n                change y by (([sin v] of (v) ) * (0.5))\n                if <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>> then\n                    delete this clone\n                end\n                if <(BarnacleTrigger) = [1]> then\n                    repeat (20)\n                        change [pixelate v] effect by (10)\n                        change [ghost v] effect by (5)\n                        change [brightness v] effect by (5)\n                    end\n                    delete this clone\n                end\n            end\n            switch costume to (barnacle 1 v)\n        end\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 9.3]> then\n    switch costume to (saw 1 v)\n    set size to (100) %\n    set [ghost v] effect to (0)\n    go to x: (60) y: (-150)\n    point in direction (90)\n    show\n    go [backward v] (1) layers\n    set [leveltrigger v] to (Level)\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        turn right (7.5) degrees\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 10.1]> then\n    switch costume to (saw 1 v)\n    set size to (100) %\n    set [ghost v] effect to (0)\n    go to x: (-25) y: (-150)\n    point in direction (90)\n    show\n    go [backward v] (1) layers\n    set [leveltrigger v] to (Level)\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        turn right (7.5) degrees\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Level 10.2]> then\n    switch costume to (slime 1 v)\n    set size to (70) %\n    set [ghost v] effect to (0)\n    go to x: (160) y: (82)\n    set rotation style [left-right v]\n    point in direction (90)\n    show\n    go [backward v] (1) layers\n    set [leveltrigger v] to (Level)\n    set [v v] to [0]\n    repeat until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n        if <(([x position v] of [player v]) - (30)) < (x position)> then\n            point in direction (90)\n        else\n            point in direction (90)\n        end\n        change [v v] by (6)\n        change x by (([sin v] of (v) ) * (1))\n        if <<touching (player v)?> and <not <(RotateModeTrigger) = [1]>>> then\n            if <<([y position v] of [player v]) > (y position)> or <<(([y position v] of [player v]) + (10)) > (y position)> and <touching (hitbox v)?>>> then\n                set [enemykilltrigger v] to [1]\n                set [y v] to [5]\n                start sound [Suction Cup v]\n                switch costume to (slime 2 v)\n                repeat (20)\n                    if <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>> then\n                        delete this clone\n                    end\n                end\n                set [enemykilltrigger v] to [0]\n            end\n        end\n    end\n    delete this clone\nend\n\n@Obstacles\n\nwhen flag clicked\nhide\nswitch costume to (default v)\nset size to (100) %\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\npoint in direction (90)\n\nwhen I receive [startgame v]\nset [leveltrigger v] to [0]\nswitch costume to (level 1 v)\nset size to (100) %\nset [ghost v] effect to (100)\nset [brightness v] effect to (-10)\ngo to x: (0) y: (-400)\npoint in direction (90)\ngo to [back v] layer\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\n    change y by (((0) - (y position)) / (4))\nend\nset y to (0)\nwait until <(Manager) = [Game]>\nrepeat until <not <(Manager) = [Game]>>\n    set [leveltrigger v] to (Level)\n    set [ghost v] effect to (100)\n    set y to (-400)\n    repeat (20)\n        change [ghost v] effect by (-5)\n        change y by (((0) - (y position)) / (4))\n    end\n    wait until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n    switch costume to (join [Level ] (Level))\nend\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\n@Trail\n\nwhen flag clicked\nset [trail v] to [1]\nhide\nswitch costume to (default v)\nset size to (100) %\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\npoint in direction (90)\n\nwhen I receive [game v]\nrepeat until <not <(Manager) = [Game]>>\n    if <<<<<<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>> or <<<mouse down?> and <(mouse x) > (x position)>> or <<mouse down?> and <(mouse x) < (x position)>>>> and <not <(InAirTrigger) = [1]>>> and <not <(RotateModeTrigger) = [1]>>> and <not <(End) = [1]>>> then\n        if <not <(Trail) = [0]>> then\n            create clone of (_myself_ v)\n        end\n    end\nend\n\nwhen I start as a clone\nswitch costume to (default v)\nset size to (pick random (0) to (30)) %\nset [ghost v] effect to (20)\ngo to x: (([x position v] of [player v]) - (pick random (-5) to (5))) y: (([y position v] of [player v]) - (25))\npoint in direction (90)\nshow\nif <not <(EdgeTrigger) = [1]>> then\n    repeat (20)\n        change [ghost v] effect by (5)\n        if <not <touching (ground v)?>> then\n            change y by (-1)\n            turn right (pick random (2) to (5)) degrees\n        end\n    end\n    delete this clone\nelse\n    delete this clone\nend\n\nwhen I receive [game v]\nrepeat until <not <(Manager) = [Game]>>\n    if <(LDM) = [1]> then\n        set [trail v] to [1]\n    else\n        set [trail v] to [0]\n    end\nend\n\n@Jumppads\n\nwhen flag clicked\nhide\nswitch costume to (default v)\nset size to (100) %\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\npoint in direction (90)\n\nwhen I receive [startgame v]\nset [leveltrigger v] to [0]\nswitch costume to (level 1 v)\nset size to (100) %\nset [ghost v] effect to (100)\ngo to x: (0) y: (-400)\npoint in direction (90)\ngo to [front v] layer\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\n    change y by (((0) - (y position)) / (4))\nend\nset y to (0)\nwait until <(Manager) = [Game]>\nrepeat until <not <(Manager) = [Game]>>\n    set [leveltrigger v] to (Level)\n    set y to (-400)\n    repeat (20)\n        change y by (((0) - (y position)) / (4))\n    end\n    wait until <<not <(LevelTrigger) = (Level)>> or <not <(Manager) = [Game]>>>\n    switch costume to (join [Level ] (Level))\nend\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I receive [game v]\nrepeat until <not <(Manager) = [Game]>>\n    if <<touching (player v)?> and <not <(RotateModeTrigger) = [1]>>> then\n        set [jump v] to [1]\n        start sound [Jump v]\n        repeat (5)\n            change y by (((-30) - (y position)) / (2))\n        end\n        wait until <not <touching (player v)?>>\n        repeat (20)\n            change y by (((0) - (y position)) / (4))\n            if <touching (player v)?> then\n                start sound [Jump v]\n            end\n        end\n    end\nend\n\n@Hitbox\n\nwhen flag clicked\nset [ldm v] to [1]\nhide\nswitch costume to (default v)\nset size to (100) %\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\npoint in direction (90)\n\nwhen I receive [game v]\nset [ldm v] to [1]\nset [owndt v] to [0]\nswitch costume to (default v)\nset size to (100) %\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\npoint in direction (90)\nshow\nrepeat until <not <(Manager) = [Game]>>\n    go to x: ([x position v] of [player v]) y: (([y position v] of [player v]) - (25))\n    if <<<not <(DeadTrigger) = [0]>> and <not <(OwnDT) = [1]>>> and <not <(LDM) = [0]>>> then\n        create clone of (_myself_ v)\n        create clone of (_myself_ v)\n        create clone of (_myself_ v)\n        create clone of (_myself_ v)\n    end\nend\n\nwhen [timer v] > (0.01)\nhide\n\nwhen I start as a clone\nswitch costume to (particle v)\nset size to (50) %\nset [ghost v] effect to (pick random (0) to (50))\nif <(PlayerColor) = [1]> then\n    set [color v] effect to (0)\nend\nif <(PlayerColor) = [2]> then\n    set [color v] effect to (25)\nend\nif <(PlayerColor) = [3]> then\n    set [color v] effect to (75)\nend\nif <(PlayerColor) = [4]> then\n    set [color v] effect to (-30)\nend\npoint in direction (90)\nchange y by (20)\ngo to [front v] layer\nset [v v] to (pick random (-5) to (5))\nset [i v] to (pick random (0) to (10))\nshow\nrepeat until <touching (_edge_ v)?>\n    change size by (pick random (1) to (3))\n    if <not <(DeadTrigger) = [0]>> then\n        change x by (((([x position v] of [player v]) - (x position)) / (8)) + (v))\n    end\n    change y by (i)\n    change [i v] by (-1.5)\nend\ndelete this clone\n\nset [owndt v] to [1]\nset [owndt v] to [0]\n\nwhen I receive [game v]\nrepeat until <not <(Manager) = [Game]>>\n    if <key (l v) pressed?> then\n        if <(LDM) = [1]> then\n            set [ldm v] to [0]\n            wait until <not <key (l v) pressed?>>\n        else\n            set [ldm v] to [1]\n            wait until <not <key (l v) pressed?>>\n        end\n    end\nend\n\n@Diamonds\n\nwhen flag clicked\nset [diamondcollecttrigger v] to [0]\nset [diamonds v] to [0]\nhide\nswitch costume to (diamond v)\nset size to (100) %\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\npoint in direction (90)\n\nwhen I receive [startgame v]\nset [diamondcollecttrigger v] to [0]\nset [diamonds v] to [0]\nset [leveltrigger v] to [0]\nset [owntrigger v] to [0]\nhide\nswitch costume to (diamond v)\nset size to (100) %\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\npoint in direction (90)\nwait until <(Manager) = [Game]>\nrepeat until <not <(Manager) = [Game]>>\n    if <(Level) = [2]> then\n        set [clone v] to [0057 | -055]\n        if <not <(OwnTrigger) = [1]>> then\n            create clone of (_myself_ v)\n        end\n    end\n    if <(Level) = [3]> then\n        set [clone v] to [-190 | 0040]\n        if <not <(OwnTrigger) = [1]>> then\n            create clone of (_myself_ v)\n        end\n    end\n    if <(Level) = [4]> then\n        set [clone v] to [-030 | -005]\n        if <not <(OwnTrigger) = [1]>> then\n            create clone of (_myself_ v)\n        end\n    end\n    if <(Level) = [6]> then\n        set [clone v] to [-180 | 0030]\n        if <not <(OwnTrigger) = [1]>> then\n            create clone of (_myself_ v)\n        end\n    end\n    if <(Level) = [7]> then\n        set [clone v] to [0175 | -105]\n        if <not <(OwnTrigger) = [1]>> then\n            create clone of (_myself_ v)\n        end\n    end\n    if <(Level) = [8]> then\n        set [clone v] to [-085 | -055]\n        if <not <(OwnTrigger) = [1]>> then\n            create clone of (_myself_ v)\n        end\n    end\n    if <(Level) = [9]> then\n        set [clone v] to [-215 | 0075]\n        if <not <(OwnTrigger) = [1]>> then\n            create clone of (_myself_ v)\n        end\n    end\n    if <(Level) = [10]> then\n        set [clone v] to [-060 | 0080]\n        if <not <(OwnTrigger) = [1]>> then\n            create clone of (_myself_ v)\n        end\n    end\n    set [owntrigger v] to [1]\n    set [leveltrigger v] to (Level)\n    wait until <not <(LevelTrigger) = (Level)>>\n    set [owntrigger v] to [0]\nend\n\nwhen I start as a clone\nswitch costume to (diamond v)\nset size to (60) %\nif <not <(DeadTrigger) = [1]>> then\n    set [ghost v] effect to (0)\nelse\n    set [ghost v] effect to (100)\nend\ngo to x: (join (join (letter (1) of (Clone)) (letter (2) of (Clone))) (join (letter (3) of (Clone)) (letter (4) of (Clone)))) y: (join (join (letter (8) of (Clone)) (letter (9) of (Clone))) (join (letter (10) of (Clone)) (letter (11) of (Clone))))\npoint in direction (90)\nset [leveltrigger v] to (Level)\nset [owntrigger v] to [0]\nset [v v] to [0]\nshow\nif <(DeadTrigger) = [1]> then\n    repeat (20)\n        change [v v] by (4)\n        change [ghost v] effect by (-5)\n        change y by (([sin v] of (v) ) * (0.5))\n    end\nend\nrepeat until <not <(DeadTrigger) = [1]>>\n    change [v v] by (4)\n    change y by (([sin v] of (v) ) * (0.5))\nend\nrepeat until <<not <(Manager) = [Game]>> or <not <(LevelTrigger) = (Level)>>>\n    change [v v] by (4)\n    change y by (([sin v] of (v) ) * (0.5))\n    if <<touching (player v)?> and <not <(DeadTrigger) = [1]>>> then\n        start sound [Collect v]\n        set [diamondcollecttrigger v] to [1]\n        set [owntrigger v] to [1]\n        change [diamonds v] by (1)\n        set [yv v] to [5]\n        repeat (20)\n            change [ghost v] effect by (5)\n            change size by (-1)\n            change y by (yv)\n            change [yv v] by (-0.5)\n        end\n        go to x: (join (join (letter (1) of (Clone)) (letter (2) of (Clone))) (join (letter (3) of (Clone)) (letter (4) of (Clone)))) y: (join (join (letter (8) of (Clone)) (letter (9) of (Clone))) (join (letter (10) of (Clone)) (letter (11) of (Clone))))\n        wait until <<not <(Manager) = [Game]>> or <<not <(LevelTrigger) = (Level)>> or <(DeadTrigger) = [1]>>>\n        set size to (60) %\n        if <(DeadTrigger) = [1]> then\n            set [v v] to [0]\n            set [owntrigger v] to [0]\n            change [diamonds v] by (-1)\n            set size to (60) %\n            go to x: (join (join (letter (1) of (Clone)) (letter (2) of (Clone))) (join (letter (3) of (Clone)) (letter (4) of (Clone)))) y: (join (join (letter (8) of (Clone)) (letter (9) of (Clone))) (join (letter (10) of (Clone)) (letter (11) of (Clone))))\n            point in direction (90)\n            repeat (20)\n                change [v v] by (4)\n                change [ghost v] effect by (-5)\n                change y by (([sin v] of (v) ) * (0.5))\n            end\n        else\n            delete this clone\n        end\n    end\nend\ndelete this clone\n\nswitch costume to (diamond v)\nset size to (60) %\nif <not <(DeadTrigger) = [1]>> then\n    set [ghost v] effect to (0)\nelse\n    set [ghost v] effect to (100)\nend\ngo to x: (join (join (letter (1) of (Clone)) (letter (2) of (Clone))) (join (letter (3) of (Clone)) (letter (4) of (Clone)))) y: (join (join (letter (8) of (Clone)) (letter (9) of (Clone))) (join (letter (10) of (Clone)) (letter (11) of (Clone))))\npoint in direction (90)\nset [leveltrigger v] to (Level)\nset [owntrigger v] to [0]\nset [v v] to [0]\nshow\nif <(DeadTrigger) = [1]> then\n    change [v v] by (4)\n    repeat (20)\n        change [ghost v] effect by (-5)\n        change y by (([sin v] of (v) ) * (0.5))\n    end\nend\nrepeat until <<<not <(Manager) = [Game]>> or <not <(LevelTrigger) = (Level)>>> or <(DeadTrigger) = [1]>>\n    change [v v] by (4)\n    change y by (([sin v] of (v) ) * (0.5))\n    if <<touching (player v)?> and <not <(DeadTrigger) = [1]>>> then\n        start sound [Collect v]\n        set [owntrigger v] to [1]\n        change [diamonds v] by (1)\n        set [yv v] to [2]\n        repeat (20)\n            change [ghost v] effect by (5)\n            change y by (yv)\n            change [yv v] by (-0.5)\n        end\n        wait until <<<not <(Manager) = [Game]>> or <not <(LevelTrigger) = (Level)>>> or <(DeadTrigger) = [1]>>\n    end\nend\nif <(DeadTrigger) = [1]> then\n    set [owntrigger v] to [0]\n    if <(OwnTrigger) = [1]> then\n        change [diamonds v] by (-1)\n        repeat (10)\n            change [v v] by (4)\n            change [ghost v] effect by (10)\n            change y by (([sin v] of (v) ) * (0.5))\n        end\n        delete this clone\n    end\nend\ndelete this clone\n\nwait until <<<not <(Manager) = [Game]>> or <not <(LevelTrigger) = (Level)>>> or <(DeadTrigger) = [1]>>\n\nif <(DeadTrigger) = [1]> then\n    set [owntrigger v] to [0]\n    if <(OwnTrigger) = [1]> then\n        change [diamonds v] by (-1)\n        repeat (10)\n            change [v v] by (4)\n            change [ghost v] effect by (10)\n            change y by (([sin v] of (v) ) * (0.5))\n        end\n        delete this clone\n    end\nend\n\nif <(DeadTrigger) = [1]> then\n    if <(DiamondCollectTrigger) = [1]> then\n        change [diamonds v] by (-1)\n    end\nend\nset [diamondcollecttrigger v] to [0]\n\nif <(OwnTrigger) = [1]> then\n    change [diamonds v] by (-1)\n    repeat (10)\n        change [v v] by (4)\n        change [ghost v] effect by (10)\n        change y by (([sin v] of (v) ) * (0.5))\n    end\n    delete this clone\nend\n\nset [clone v] to [-030 | -111]\n\n@Thumbnail\n\nwhen flag clicked\nhide\nset [ghost v] effect to (100)\ngo to [front v] layer\nswitch costume to (thumbnail 1 v)\npoint in direction (90)\ngo to x: (-400) y: (0)\nforever\n    reset timer\nend\n\nwhen [timer v] > (0.01)\nset [ghost v] effect to (100)\ngo to [front v] layer\nswitch costume to (thumbnail 1 v)\npoint in direction (90)\ngo to x: (-400) y: (0)\nshow\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\n    change x by (((0) - (x position)) / (2))\nend\nset x to (0)\n\n
CONTROLS:\nArrow keys/WASD/Mobile to move your player.\nAvoid spikes, lava, gears and pikes (they move.)\nCollect all coins, then go to the portal to advance.\nBounce on bounce pads.\nClimb any ladders nearby.\nJump on jump rings to get a boost.\nBlue pushes you right.\nYou can wall jump! :D