-Green- A Mobile Freindly Platformer #GAMES
@Stage\n\nwhen I receive [restartnewlevel v]\nif <(Level) = [2]> then\n    wait (.001) seconds\n    broadcast (Level2 v)\nend\nif <(Level) = [3]> then\n    wait (.001) seconds\n    broadcast (Level3 v)\nend\nif <(Level) = [4]> then\n    wait (.001) seconds\n    broadcast (Level4 v)\nend\nif <(Level) = [5]> then\n    wait (.001) seconds\n    broadcast (Level5 v)\nend\n\nwhen I receive [finishedleveltrans v]\nif <not <(Level) = [5]>> then\n\nwhen I receive [restartnewlevel v]\nif <(Level) = [6]> then\n    repeat (10)\n        change volume by (-10)\n    end\n    set volume to (0) %\n    stop all sounds\nend\n\nwhen I receive [stop intro v]\nset volume to (10) %\nforever\n    if <(Level) = [6]> then\n        switch backdrop to (finishedbg v)\n    else\n        switch backdrop to (gamebg v)\n    end\nend\n\nwhen I receive [stop intro v]\nrepeat until <(Level) = [6]>\n    if <not <(Level) = [6]>> then\n        play sound [MitiS - You.mp3 v] until done\n    end\nend\n\n@Blank\n\n@Player\n\nwhen I start as a clone\nswitch costume to (playereye v)\ngo to [front v] layer\nforever\n    go to x: (PX) y: (PY)\n    change x by (((Xv) / (10)) * (-1))\n    change y by (((Yv) / (10)) * (-2))\nend\n\nwhen I start as a clone\nset rotation style [left-right v]\nset size to (0) %\nforever\n    point in direction (PDirection)\n    if <<key (right arrow v) pressed?> or <key (left arrow v) pressed?>> then\n        set size to ((size) + (((160) - (size)) / (4))) %\n    else\n        set size to ((size) + (((150) - (size)) / (3))) %\n    end\nend\n\nwhen I start as a clone\nforever\n    if <key (up arrow v) pressed?> then\n        set size to (170) %\n        repeat until <(IsGrounded) = [Y]>\n    end\nend\n\nwhen I receive [finishedleveltrans v]\nset [levelloadingdone v] to [N]\nhide\nrepeat until <(LevelLoadingDone) = [Y]>\n    set [xv v] to ((Xv) * (.9))\n    set [yv v] to ((Yv) * (.9))\n    change [camy v] by ((CamY) * (-.05))\n    change [camx v] by ((CamY) * (.001))\n    go to x: (0) y: (0)\n    set [xv v] to [0]\n    set [yv v] to [0]\nend\n\nwhen I start as a clone\nforever\n    if <(x position) > [7]> then\n        set x to (6.9)\n    end\n    if <(x position) < [-7]> then\n        set x to (-6.9)\n    end\n    if <(y position) > [7]> then\n        set y to (6.9)\n    end\n    if <(y position) < [-7]> then\n        set y to (-6.9)\n    end\nend\n\nwhen I receive [restartnewlevel v]\nset [levelloadingdone v] to [Y]\nshow\ngo to x: (0) y: (0)\nset [xv v] to [0]\nset [yv v] to [0]\nset [ghost v] effect to (100)\nwait (.3) seconds\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nclear graphic effects\nset [levelloadingdone v] to [N]\n\nwhen flag clicked\nforever\n    if <mouse down?> then\n        if <(mouse x) < (x position)> then\n            change [xv v] by (-1)\n            point in direction (-90)\n        else\n            if <(mouse x) > (x position)> then\n                change [xv v] by (1)\n                point in direction (90)\n            end\n        end\n    end\nend\n\nwhen I receive [restart v]\ngo to x: (0) y: (0)\nset [xv v] to [0]\nset [yv v] to [0]\nset [camx v] to [0]\nset [camy v] to [0]\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nclear graphic effects\n\nwhen flag clicked\nforever\n    if <(Level) = [6]> then\n        set [xv v] to [0]\n        set [yv v] to [0]\n        set [camx v] to [0]\n        set [camy v] to [0]\n        hide\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(Level) = [6]> then\n        delete this clone\n    end\nend\n\nwhen I receive [stop intro v]\nshow\npoint in direction (90)\ncreate clone of (_myself_ v)\ngo to x: (0) y: (0)\nset [xv v] to [0]\nset [yv v] to [0]\nset [levelloadingdone v] to [N]\nforever\n    if <key (left arrow v) pressed?> then\n        change [xv v] by (-1)\n        point in direction (-90)\n    end\n    if <key (right arrow v) pressed?> then\n        change [xv v] by (1)\n        point in direction (90)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\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 y by (1)\n                        if <touching (ground v)?> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                            if <key (up arrow v) pressed?> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-1]\n                                else\n                                    set [xv v] to [1]\n                                end\n                                set [yv v] to (Yv)\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (-1)\n    if <touching (ground v)?> then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [15]\n        end\n        if <mouse down?> then\n            if <(mouse y) > (y position)> then\n                set [yv v] to [15]\n            end\n        end\n    end\n    if <key (r v) pressed?> then\n        broadcast (Restart v)\n    end\n    change y by (1)\n    set [isgrounded v] to [N]\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <touching (ground v)?> then\n        set [isgrounded v] to [Y]\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    if <(Level) = [1]> then\n        if <(CamY) > [200]> then\n            broadcast (Restart v)\n        end\n    else\n        if <(Level) = [2]> then\n            if <(CamY) > [600]> then\n                broadcast (Restart v)\n            end\n        else\n            if <(Level) = [3]> then\n                if <(CamY) > [200]> then\n                    broadcast (Restart v)\n                end\n            else\n                if <(Level) = [4]> then\n                    if <(CamY) > [170]> then\n                        broadcast (Restart v)\n                    end\n                else\n                    if <(CamY) > [170]> then\n                        broadcast (Restart v)\n                    end\n                end\n            end\n        end\n    end\n    set [xv v] to (Xv)\n    set [px v] to (x position)\n    set [py v] to (y position)\n    set [pdirection v] to (direction)\n    change [camx v] by ((x position) * (-1))\n    change [camy v] by ((y position) * (-1))\n    go to x: (0) y: (0)\nend\n\nwhen flag clicked\nhide\n\n@PlayerWalkEffect\n\nwhen flag clicked\nhide\nforever\n    go to (player v)\n    point in direction ([direction v] of [player v])\nend\n\nwhen I start as a clone\nchange y by (-15)\nset size to (pick random (86) to (200)) %\nset [ghost v] effect to (pick random (15) to (35))\nshow\nrepeat (20)\n    change [ghost v] effect by (5)\n    change size by (pick random (-5) to (-1))\n    change y by (pick random (.7) to (1))\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    change x by ((Xv) * (-1))\n    change y by ((Yv) * (-1))\nend\n\nwhen I receive [stop intro v]\nforever\n    if <<<key (right arrow v) pressed?> or <key (left arrow v) pressed?>> and <(IsGrounded) = [Y]>> then\n        create clone of (_myself_ v)\n        wait (pick random (.2) to (.4)) seconds\n    end\n    if <not <<key (right arrow v) pressed?> or <key (left arrow v) pressed?>>> then\n        if <(IsGrounded) = [Y]> then\n            if <(Xv) > [1]> then\n                create clone of (_myself_ v)\n                wait (pick random (.2) to (.4)) seconds\n            else\n                if <(Xv) < [-1]> then\n                    create clone of (_myself_ v)\n                    wait (pick random (.2) to (.4)) seconds\n                end\n            end\n        end\n    end\nend\n\n@MobileMovement\n\nwhen I start as a clone\nswitch costume to (icon2 v)\nforever\n    go to (player v)\n    point towards (mouse-pointer v)\nend\n\nwhen I start as a clone\nforever\n    if <mouse down?> then\n        repeat (10)\n            change [ghost v] effect by (-2)\n        end\n        repeat until <not <mouse down?>>\n            set [ghost v] effect to (80)\n        end\n    else\n        repeat (10)\n            change [ghost v] effect by (2)\n        end\n        repeat until <mouse down?>\n            set [ghost v] effect to (100)\n        end\n    end\nend\n\nwhen I start as a clone\nrepeat (10)\n    set [ghost v] effect to (100)\nend\n\nwhen I start as a clone\nforever\n    if <(Level) = [6]> then\n        delete this clone\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [stop intro v]\nshow\nswitch costume to (icon v)\ncreate clone of (_myself_ v)\ngo to x: (0) y: (0)\nforever\n    go to (mouse-pointer v)\n    point towards (mouse-pointer v)\nend\n\nwhen I receive [stop intro v]\nrepeat (10)\n    set [ghost v] effect to (100)\nend\n\nwhen I receive [stop intro v]\ngo to x: (0) y: (0)\nforever\n    if <mouse down?> then\n        repeat (10)\n            change [ghost v] effect by (-2)\n        end\n        repeat until <not <mouse down?>>\n            set [ghost v] effect to (80)\n        end\n    else\n        repeat (10)\n            change [ghost v] effect by (2)\n        end\n        repeat until <mouse down?>\n            set [ghost v] effect to (100)\n        end\n    end\nend\n\nwhen I receive [stop intro v]\nforever\n    if <(Level) = [6]> then\n        hide\n    else\n        show\n    end\nend\n\n@Ground\n\nwhen I receive [gmove v]\ngo to x: (CamX) y: (CamY)\n\nwhen I receive [restartnewlevel v]\nchange [level v] by (1)\nset [camx v] to [0]\nset [camy v] to [0]\ngo to x: (0) y: (0)\n\nwhen I receive [finishedleveltrans v]\nif <(Level) = [5]> then\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    set [ghost v] effect to (100)\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nclear graphic effects\nset [level v] to [1]\nset [camx v] to [0]\nset [camy v] to [0]\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\n    broadcast (GMove v)\nend\n\nwhen I receive [stop intro v]\nforever\n    if <(Level) = [6]> then\n        go to x: (0) y: (0)\n        hide\n    else\n        if <not <(Level) = [6]>> then\n            show\n        end\n    end\nend\n\n@BG\n\nwhen I start as a clone\nswitch costume to (pick random (2) to (4))\ngo to x: (pick random (234) to (185)) y: (pick random (130) to (170))\nset size to (pick random (10) to (20)) %\nforever\n    change y by ((Yv) * (pick random (-.03) to (-.05)))\n    change x by (pick random (-.3) to (-1))\nend\n\nwhen I start as a clone\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (pick random (-1.5) to (-6))\nend\n\nwhen I start as a clone\nforever\n    if <(x position) < [-234]> then\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        delete this clone\n    end\nend\n\nwhen I receive [restartnewlevel v]\ngo to x: (0) y: (0)\ndelete this clone\n\nwhen I receive [restart v]\nif <(costume [name v]) = [BG]> then\n    go to x: (0) y: (0)\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <(Level) = [6]> then\n        delete this clone\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [stop intro v]\nswitch costume to (bg v)\ngo to x: (0) y: (0)\ngo to [back v] layer\nforever\n    if <(costume [name v]) = [BG]> then\n        change x by ((Xv) * (-.2))\n        change y by ((Yv) * (-.2))\n    end\nend\n\nwhen I receive [stop intro v]\nforever\n    if <not <(LevelLoadingDone) = [Y]>> then\n        if <not <(Level) = [6]>> then\n            create clone of (_myself_ v)\n            wait (pick random (2.5) to (5)) seconds\n        end\n    end\nend\n\nwhen I receive [stop intro v]\nforever\n    if <(Level) = [6]> then\n        go to x: (0) y: (0)\n        hide\n    else\n        show\n    end\nend\n\n@Level1\n\ndefine LevelStuff\ngo to x: (0) y: (0)\nrepeat (6)\n    create clone of (_myself_ v)\n    change [levelstuffclones v] by (1)\nend\n\nwhen I start as a clone\nclear graphic effects\nset [mynumber v] to [0]\nchange [mynumber v] by (LevelStuffClones)\nif <(MyNumber) = [1]> then\n    switch costume to (coin v)\n    set [mypositionx v] to [240]\n    set [mypositiony v] to [-120]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\n    forever\n        change [size v] by (1)\n        change size by ((0) - ([sin v] of ((Size) * (5)) ))\n    end\nend\nif <(MyNumber) = [2]> then\n    switch costume to (coin v)\n    set [mypositionx v] to [300]\n    set [mypositiony v] to [-120]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\n    wait (.1) seconds\n    forever\n        change [size v] by (1)\n        change size by ((0) - ([sin v] of ((Size) * (5)) ))\n    end\nend\nif <(MyNumber) = [3]> then\n    switch costume to (coin v)\n    set [mypositionx v] to [360]\n    set [mypositiony v] to [-120]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\n    wait (.2) seconds\n    forever\n        change [size v] by (1)\n        change size by ((0) - ([sin v] of ((Size) * (5)) ))\n    end\nend\nif <(MyNumber) = [4]> then\n    switch costume to (coin v)\n    set [mypositionx v] to [420]\n    set [mypositiony v] to [-120]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\n    wait (.3) seconds\n    forever\n        change [size v] by (1)\n        change size by ((0) - ([sin v] of ((Size) * (5)) ))\n    end\nend\nif <(MyNumber) = [5]> then\n    switch costume to (sign v)\n    set [mypositionx v] to [70]\n    set [mypositiony v] to [-35]\nend\nif <(MyNumber) = [6]> then\n    switch costume to (finishlevel v)\n    set [mypositionx v] to [700]\n    set [mypositiony v] to [-35]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\n    forever\n        if <not <touching (player v)?>> then\n            change [size v] by (1)\n            change size by ((0) - ([sin v] of ((Size) * (5)) ))\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    go to x: ((CamX) + (MyPositionX)) y: ((CamY) + (MyPositionY))\nend\n\nwhen I start as a clone\nforever\n    if <(costume [name v]) = [Coin]> then\n        if <touching (player v)?> then\n            broadcast (CollectedCoin v)\n            change [coins v] by (1)\n            repeat (5)\n                set size to ((size) + (((0) - (size)) / (4))) %\n            end\n            delete this clone\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(costume [name v]) = [FinishLevel]> then\n        if <touching (player v)?> then\n            broadcast (FinishedLevelTrans v)\n            set [spin v] to [0]\n            set size to (100) %\n            if <([x position v] of [player v]) < (x position)> then\n                if <([y position v] of [player v]) > (y position)> then\n                    switch costume to (finishlevelselup v)\n                else\n                    switch costume to (finishlevelselr v)\n                end\n            else\n                if <([x position v] of [player v]) > (x position)> then\n                    if <([y position v] of [player v]) > (y position)> then\n                        switch costume to (finishlevelselup v)\n                    else\n                        switch costume to (finishlevelsell v)\n                    end\n                end\n            end\n            reset timer\n            repeat until <(timer) > [2]>\n                change [spin v] by (1)\n                change [brightness v] effect by (1.7)\n                change size by (.3)\n            end\n            repeat (5)\n                set size to ((size) + (((0) - (size)) / (4))) %\n            end\n            hide\n            clear graphic effects\n            wait (.7) seconds\n            set [spin v] to [0]\n            point in direction (90)\n            show\n            switch costume to (finishlevelpop v)\n            repeat (10)\n                set size to ((size) + (((120) - (size)) / (4))) %\n            end\n            wait (0) seconds\n            repeat (5)\n                set size to ((size) + (((0) - (size)) / (3))) %\n            end\n            hide\n            wait (.3) seconds\n            broadcast (FLTransition v)\n            delete this clone\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <<(costume [name v]) = [FinishLevelSelR]> or <<(costume [name v]) = [FinishLevelSelL]> or <(costume [name v]) = [FinishLevelSelUp]>>> then\n        turn right (Spin) degrees\n    end\nend\n\nwhen I receive [restartnewlevel v]\ndelete this clone\n\nwhen I start as a clone\nif <(costume [name v]) = [Sign]> then\n    set [ghost v] effect to (100)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    set [ghost v] effect to (0)\nend\nforever\n    if <touching (_edge_ v)?> then\n        repeat (5)\n            change [ghost v] effect by (20)\n        end\n        repeat until <not <touching (_edge_ v)?>>\n            set [ghost v] effect to (100)\n        end\n    else\n        repeat (5)\n            change [ghost v] effect by (-20)\n        end\n        repeat until <touching (_edge_ v)?>\n            set [ghost v] effect to (0)\n        end\n    end\nend\n\nwhen I receive [stop intro v]\nset voice to (tenor v)::tts\nset [levelstuffclones v] to [0]\nswitch costume to (blank v)\ngo to x: (0) y: (0)\nLevelStuff\n\n@Level2\n\nwhen flag clicked\nset voice to (tenor v)::tts\nset [level2stuffclones v] to [0]\nswitch costume to (blank v)\ngo to x: (0) y: (0)\n\nwhen I start as a clone\nclear graphic effects\nset [mynumber v] to [0]\nchange [mynumber v] by (Level2StuffClones)\nif <(MyNumber) = [1]> then\n    switch costume to (spike v)\n    set [mypositionx v] to [240]\n    set [mypositiony v] to [-313]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [2]> then\n    switch costume to (spike v)\n    set [mypositionx v] to [300]\n    set [mypositiony v] to [-313]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [3]> then\n    switch costume to (spike v)\n    set [mypositionx v] to [360]\n    set [mypositiony v] to [-313]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [4]> then\n    switch costume to (spike v)\n    set [mypositionx v] to [420]\n    set [mypositiony v] to [-313]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [5]> then\n    switch costume to (finishlevel v)\n    set [mypositionx v] to [700]\n    set [mypositiony v] to [-35]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\n    forever\n        if <not <touching (player v)?>> then\n            change [size v] by (1)\n            change size by ((0) - ([sin v] of ((Size) * (5)) ))\n        end\n    end\nend\nif <(MyNumber) = [6]> then\n    switch costume to (booster v)\n    set [mypositionx v] to [350]\n    set [mypositiony v] to [0]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\n    wait (.5) seconds\n    forever\n        change [size v] by (1)\n        change size by ((0) - ([sin v] of ((Size) * (5)) ))\n    end\nend\nif <(MyNumber) = [7]> then\n    switch costume to (coin v)\n    set [mypositionx v] to [270]\n    set [mypositiony v] to [20]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\n    wait (.7) seconds\n    forever\n        change [size v] by (1)\n        change size by ((0) - ([sin v] of ((Size) * (5)) ))\n    end\nend\nif <(MyNumber) = [8]> then\n    switch costume to (coin v)\n    set [mypositionx v] to [220]\n    set [mypositiony v] to [20]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\n    wait (.7) seconds\n    forever\n        change [size v] by (1)\n        change size by ((0) - ([sin v] of ((Size) * (5)) ))\n    end\nend\nif <(MyNumber) = [9]> then\n    switch costume to (coin v)\n    set [mypositionx v] to [420]\n    set [mypositiony v] to [20]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\n    wait (.7) seconds\n    forever\n        change [size v] by (1)\n        change size by ((0) - ([sin v] of ((Size) * (5)) ))\n    end\nend\nif <(MyNumber) = [10]> then\n    switch costume to (coin v)\n    set [mypositionx v] to [470]\n    set [mypositiony v] to [20]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\n    wait (.7) seconds\n    forever\n        change [size v] by (1)\n        change size by ((0) - ([sin v] of ((Size) * (5)) ))\n    end\nend\n\ndefine LevelStuff\ngo to x: (0) y: (0)\nrepeat (10)\n    create clone of (_myself_ v)\n    change [level2stuffclones v] by (1)\nend\n\nwhen I start as a clone\nforever\n    go to x: ((CamX) + (MyPositionX)) y: ((CamY) + (MyPositionY))\nend\n\nwhen I start as a clone\nforever\n    if <(costume [name v]) = [Coin]> then\n        if <touching (player v)?> then\n            start sound [Coin v]\n            broadcast (CollectedCoin v)\n            change [coins v] by (1)\n            repeat (5)\n                set size to ((size) + (((0) - (size)) / (4))) %\n            end\n            delete this clone\n        end\n    end\n    if <(costume [name v]) = [Spike]> then\n        if <touching (player v)?> then\n            start sound [Dead v]\n            broadcast (Restart v)\n        end\n    end\n    if <(costume [name v]) = [Booster]> then\n        if <touching (player v)?> then\n            start sound [Booster v]\n            set [xv v] to [25]\n            set [yv v] to [5]\n            set size to (0) %\n            repeat (15)\n                set size to ((size) + (((100) - (size)) / (5))) %\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(costume [name v]) = [FinishLevel]> then\n        if <touching (player v)?> then\n            start sound [LevelComplete v]\n            broadcast (FinishedLevelTrans v)\n            set [spin v] to [0]\n            if <([x position v] of [player v]) < (x position)> then\n                if <([y position v] of [player v]) > (y position)> then\n                    switch costume to (finishlevelselup v)\n                else\n                    switch costume to (finishlevelselr v)\n                end\n            else\n                if <([x position v] of [player v]) > (x position)> then\n                    if <([y position v] of [player v]) > (y position)> then\n                        switch costume to (finishlevelselup v)\n                    else\n                        switch costume to (finishlevelsell v)\n                    end\n                end\n            end\n            reset timer\n            repeat until <(timer) > [2]>\n                change [spin v] by (1)\n                change [brightness v] effect by (1.7)\n                change size by (.3)\n            end\n            repeat (5)\n                set size to ((size) + (((0) - (size)) / (4))) %\n            end\n            hide\n            clear graphic effects\n            wait (.7) seconds\n            set [spin v] to [0]\n            point in direction (90)\n            show\n            switch costume to (finishlevelpop v)\n            repeat (10)\n                set size to ((size) + (((120) - (size)) / (4))) %\n            end\n            wait (0) seconds\n            repeat (5)\n                set size to ((size) + (((0) - (size)) / (3))) %\n            end\n            hide\n            wait (.3) seconds\n            broadcast (FLTransition v)\n            delete this clone\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <<(costume [name v]) = [FinishLevelSelR]> or <<(costume [name v]) = [FinishLevelSelL]> or <(costume [name v]) = [FinishLevelSelUp]>>> then\n        turn right (Spin) degrees\n    end\nend\n\nwhen I receive [restartnewlevel v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <touching (_edge_ v)?> then\n        repeat (5)\n            change [ghost v] effect by (20)\n        end\n        repeat until <not <touching (_edge_ v)?>>\n            set [ghost v] effect to (100)\n        end\n    else\n        repeat (5)\n            change [ghost v] effect by (-20)\n        end\n        repeat until <touching (_edge_ v)?>\n            set [ghost v] effect to (0)\n        end\n    end\nend\n\nwhen I receive [level2 v]\nLevelStuff\n\n@Level3\n\nwhen flag clicked\nset voice to (tenor v)::tts\nset [level3stuffclones v] to [0]\nswitch costume to (blank v)\ngo to x: (0) y: (0)\n\ndefine LevelStuff\ngo to x: (0) y: (0)\nrepeat (10)\n    create clone of (_myself_ v)\n    change [level3stuffclones v] by (1)\nend\n\nwhen I start as a clone\nclear graphic effects\nset [mynumber v] to [0]\nchange [mynumber v] by (Level3StuffClones)\nif <(MyNumber) = [1]> then\n    switch costume to (spike v)\n    set [mypositionx v] to [0]\n    set [mypositiony v] to [50]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [2]> then\n    switch costume to (spike v)\n    set [mypositionx v] to [60]\n    set [mypositiony v] to [50]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [3]> then\n    switch costume to (spike v)\n    set [mypositionx v] to [120]\n    set [mypositiony v] to [50]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [4]> then\n    switch costume to (spike v)\n    set [mypositionx v] to [180]\n    set [mypositiony v] to [50]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [5]> then\n    switch costume to (booster v)\n    set [mypositionx v] to [250]\n    set [mypositiony v] to [-30]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [6]> then\n    switch costume to (spikeup v)\n    set [mypositionx v] to [300]\n    set [mypositiony v] to [-30]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [7]> then\n    switch costume to (finishlevel v)\n    set [mypositionx v] to [420]\n    set [mypositiony v] to [-10]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [8]> then\n    switch costume to (coin v)\n    set [mypositionx v] to [120]\n    set [mypositiony v] to [-25]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [9]> then\n    switch costume to (coin v)\n    set [mypositionx v] to [250]\n    set [mypositiony v] to [30]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [10]> then\n    switch costume to (coin v)\n    set [mypositionx v] to [300]\n    set [mypositiony v] to [30]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\n\nwhen I start as a clone\nforever\n    go to x: ((CamX) + (MyPositionX)) y: ((CamY) + (MyPositionY))\nend\n\nwhen I start as a clone\nforever\n    if <(costume [name v]) = [Coin]> then\n        if <touching (player v)?> then\n            start sound [Coin v]\n            broadcast (CollectedCoin v)\n            change [coins v] by (1)\n            repeat (5)\n                set size to ((size) + (((0) - (size)) / (4))) %\n            end\n            delete this clone\n        end\n    end\n    if <<(costume [name v]) = [Spike]> or <(costume [name v]) = [SpikeUp]>> then\n        if <touching (player v)?> then\n            start sound [Dead v]\n            broadcast (Restart v)\n        end\n    end\n    if <(costume [name v]) = [Booster]> then\n        if <touching (player v)?> then\n            start sound [Booster v]\n            set [xv v] to [22]\n            set [yv v] to [5]\n            set size to (0) %\n            repeat (15)\n                set size to ((size) + (((100) - (size)) / (5))) %\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(costume [name v]) = [FinishLevel]> then\n        if <touching (player v)?> then\n            start sound [LevelComplete v]\n            broadcast (FinishedLevelTrans v)\n            set [spin v] to [0]\n            if <([x position v] of [player v]) < (x position)> then\n                if <([y position v] of [player v]) > (y position)> then\n                    switch costume to (finishlevelselup v)\n                else\n                    switch costume to (finishlevelselr v)\n                end\n            else\n                if <([x position v] of [player v]) > (x position)> then\n                    if <([y position v] of [player v]) > (y position)> then\n                        switch costume to (finishlevelselup v)\n                    else\n                        switch costume to (finishlevelsell v)\n                    end\n                end\n            end\n            reset timer\n            repeat until <(timer) > [2]>\n                change [spin v] by (1)\n                change [brightness v] effect by (1.7)\n                change size by (.3)\n            end\n            repeat (5)\n                set size to ((size) + (((0) - (size)) / (4))) %\n            end\n            hide\n            clear graphic effects\n            wait (.7) seconds\n            set [spin v] to [0]\n            point in direction (90)\n            show\n            switch costume to (finishlevelpop v)\n            repeat (10)\n                set size to ((size) + (((120) - (size)) / (4))) %\n            end\n            wait (0) seconds\n            repeat (5)\n                set size to ((size) + (((0) - (size)) / (3))) %\n            end\n            hide\n            wait (.3) seconds\n            broadcast (FLTransition v)\n            delete this clone\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <<(costume [name v]) = [FinishLevelSelR]> or <<(costume [name v]) = [FinishLevelSelL]> or <(costume [name v]) = [FinishLevelSelUp]>>> then\n        turn right (Spin) degrees\n    end\nend\n\nwhen I receive [restartnewlevel v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <touching (_edge_ v)?> then\n        repeat (5)\n            change [ghost v] effect by (20)\n        end\n        repeat until <not <touching (_edge_ v)?>>\n            set [ghost v] effect to (100)\n        end\n    else\n        repeat (5)\n            change [ghost v] effect by (-20)\n        end\n        repeat until <touching (_edge_ v)?>\n            set [ghost v] effect to (0)\n        end\n    end\nend\n\nwhen I receive [level3 v]\nLevelStuff\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        if <(costume [name v]) = [Coin]> then\n    end\n    if <touching (player v)?> then\n        if <(costume [name v]) = [Spike]> then\n    end\n    if <touching (player v)?> then\n        if <(costume [name v]) = [Booster]> then\n    end\nend\n\n@GameComplete\n\nwhen flag clicked\nset [hover v] to [0]\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [restartnewlevel v]\nwait (1) seconds\nif <(Level) = [6]> then\n    start sound [Avenza - Wicked \(Original Mix\)2 v]\n    set size to (0) %\n    show\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [stop intro v]\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to ((size) + (((160) - (size)) / (4))) %\n    else\n        set size to ((size) + (((140) - (size)) / (3))) %\n    end\nend\n\nwhen I receive [stop intro v]\nforever\n    change [hover v] by (1)\n    change y by ((0) - ([sin v] of ((Hover) * (5)) ))\nend\n\nwhen flag clicked\n\n@NotificationUI\n\ndefine Fade\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nclear graphic effects\n\nwhen I start as a clone\nshow\ngo to x: (100) y: (0)\nreset timer\nrepeat until <(timer) > [3]>\n    go to x: (((x position) * (0.9)) + (0)) y: (-10)\nend\nreset timer\nrepeat until <(timer) > [1]>\n    go to x: (((x position) * (0.9)) + (20)) y: (-10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I start as a clone\nFade\n\nwhen I receive [stop intro v]\ncreate clone of (_myself_ v)\ngo to x: (0) y: (0)\nhide\n\nwhen flag clicked\nhide\n\n@CoinsUI\n\nwhen I start as a clone\nset size to (0) %\nchange [mynumber v] by (UIClones)\nif <(MyNumber) = [1]> then\n    change x by (30)\n    change y by (-1)\n    forever\n        switch costume to (letter (1) of (Coins))\n    end\nend\nif <(MyNumber) = [2]> then\n    change x by (45)\n    change y by (-1)\n    forever\n        switch costume to (letter (2) of (Coins))\n    end\nend\nif <(MyNumber) = [3]> then\n    change x by (60)\n    change y by (-1)\n    forever\n        switch costume to (letter (2) of (Coins))\n    end\nend\n\nwhen I start as a clone\nforever\n    set size to ((size) + (((60) - (size)) / (3))) %\nend\n\nwhen I receive [collectedcoin v]\nstart sound [Coin v]\nif <not <(costume [name v]) = [CoinCounter]>> then\n    set size to (0) %\nend\n\nwhen I receive [finishedleveltrans v]\nrepeat (10)\n    set size to ((size) + (((0) - (size)) / (3))) %\n    change [ghost v] effect by (12)\nend\nhide\n\nwhen I receive [restartnewlevel v]\nset [coins v] to [0]\nif <not <(Level) = [6]>> then\n    show\n    set [ghost v] effect to (100)\n    wait (.3) seconds\n    set size to (0) %\n    repeat (10)\n        change [ghost v] effect by (-12)\n        if <(costume [name v]) = [CoinCounter]> then\n            set size to ((size) + (((80) - (size)) / (3))) %\n        end\n    end\n    clear graphic effects\nend\n\nwhen I start as a clone\nforever\n    if <touching (ground v)?> then\n        repeat (5)\n            change [brightness v] effect by (-2)\n        end\n        repeat until <not <touching (ground v)?>>\n            set [brightness v] effect to (-10)\n        end\n    else\n        repeat (5)\n            change [brightness v] effect by (2)\n        end\n        repeat until <touching (ground v)?>\n            set [brightness v] effect to (0)\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(Level) = [6]> then\n        delete this clone\n    end\nend\n\nwhen I receive [restartnewlevel v]\nwait (.001) seconds\nif <(Level) = [6]> then\n    hide\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [stop intro v]\nshow\ngo to [front v] layer\nclear graphic effects\nset [coins v] to [0]\nset [uiclones v] to [0]\nset size to (80) %\ngo to x: (-204) y: (151)\nswitch costume to (coincounter v)\nset [ghost v] effect to (0)\ncreate clone of (_myself_ v)\nchange [uiclones v] by (1)\nrepeat until <(Coins) > [9]>\ncreate clone of (_myself_ v)\nchange [uiclones v] by (1)\nrepeat until <(Coins) > [99]>\ncreate clone of (_myself_ v)\nchange [uiclones v] by (1)\n\n@TransitionMenu\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\nhide\n\nwhen I receive [fltransition v]\ngo to x: (423) y: (289)\nshow\nrepeat (100)\n    go to x: (((x position) * (0.9)) - (0)) y: (((y position) * (0.9)) - (0))\nend\n\nwhen I receive [fltransition v]\nswitch costume to (transition v)\nwait (2) seconds\nTittleMenu\nswitch costume to (transition v)\n\ndefine TittleMenu\nswitch costume to (tittle v)\ncreate clone of (_myself_ v)\nswitch costume to (checkmarkblank v)\ncreate clone of (_myself_ v)\nswitch costume to (nextbutton v)\ncreate clone of (_myself_ v)\nswitch costume to (bg v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\ngo to [front v] layer\nshow\nif <(costume [name v]) = [Tittle]> then\n    go to x: (0) y: (0)\n    set [ghost v] effect to (100)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    clear graphic effects\nend\nif <(costume [name v]) = [CheckMarkBlank]> then\n    set size to (0) %\n    go to x: (0) y: (45)\nend\nif <(costume [name v]) = [NextButton]> then\n    go to x: (0) y: (-40)\n    set size to (0) %\nend\nif <(costume [name v]) = [BG]> then\n    go to x: (0) y: (-70)\n    forever\n        go to x: (0) y: (((y position) * (0.9)) - (0))\n    end\nend\n\nwhen I start as a clone\nforever\n    if <<<(costume [name v]) = [CheckMarkBlank]> or <(costume [name v]) = [CheckMark1]>> or <<(costume [name v]) = [CheckMark2]> or <(costume [name v]) = [CheckMark3]>>> then\n        set size to ((size) + (((100) - (size)) / (3))) %\n    end\nend\n\nwhen I start as a clone\nforever\n    if <<(costume [name v]) = [NextButton]> or <(costume [name v]) = [NextButtonSel]>> then\n        if <touching (mouse-pointer v)?> then\n            set size to ((size) + (((130) - (size)) / (4))) %\n            switch costume to (nextbuttonsel v)\n        else\n            set size to ((size) + (((100) - (size)) / (3))) %\n            switch costume to (nextbutton v)\n        end\n    end\nend\n\nwhen this sprite clicked\nif <(costume [name v]) = [NextButtonSel]> then\n    repeat until <not <mouse down?>>\n        set size to ((size) + (((50) - (size)) / (3))) %\n    end\n    start sound [NextLevel v]\n    repeat (5)\n        set size to ((size) + (((100) - (size)) / (4))) %\n    end\n    broadcast (NextLevelTrans v)\n    repeat (10)\n        switch costume to (nextbuttonsel v)\n        set size to ((size) + (((0) - (size)) / (3))) %\n        change [ghost v] effect by (15)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [BG]> then\n    set [ghost v] effect to (100)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    clear graphic effects\nend\n\nwhen I receive [nextleveltrans v]\nwait (.3) seconds\nif <not <<<(costume [name v]) = [NextButton]> or <(costume [name v]) = [NextButtonSel]>> or <(costume [name v]) = [Transition]>>> then\n    clear graphic effects\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\nwhen I receive [nextlevel v]\nbroadcast (RestartNewLevel v)\nrepeat (100)\n    go to x: (((x position) * (0.9)) + (45)) y: (((y position) * (0.9)) + (45))\nend\nhide\n\nwhen I receive [nextleveltrans v]\nwait (2) seconds\nbroadcast (NextLevel v)\n\nwhen I start as a clone\nif <(costume [name v]) = [CheckMarkBlank]> then\n    if <(Level) = [1]> then\n        if <(Coins) = [4]> then\n            switch costume to (checkmark3 v)\n        else\n            if <(Coins) = [3]> then\n                switch costume to (checkmark3 v)\n            else\n                if <(Coins) = [2]> then\n                    switch costume to (checkmark2 v)\n                else\n                    if <(Coins) = [1]> then\n                        switch costume to (checkmark1 v)\n                    end\n                end\n            end\n        end\n    else\n        if <(Level) = [2]> then\n            if <(Coins) = [4]> then\n                switch costume to (checkmark3 v)\n            else\n                if <(Coins) = [3]> then\n                    switch costume to (checkmark3 v)\n                else\n                    if <(Coins) = [2]> then\n                        switch costume to (checkmark2 v)\n                    else\n                        if <(Coins) = [1]> then\n                            switch costume to (checkmark1 v)\n                        end\n                    end\n                end\n            end\n        else\n            if <(Level) = [3]> then\n                if <(Coins) = [4]> then\n                    switch costume to (checkmark3 v)\n                else\n                    if <(Coins) = [3]> then\n                        switch costume to (checkmark2 v)\n                    else\n                        if <(Coins) = [2]> then\n                            switch costume to (checkmark2 v)\n                        else\n                            if <(Coins) = [1]> then\n                                switch costume to (checkmark1 v)\n                            end\n                        end\n                    end\n                end\n            else\n                if <(Level) = [4]> then\n                    if <(Coins) = [4]> then\n                        switch costume to (checkmark3 v)\n                    else\n                        if <(Coins) = [3]> then\n                            switch costume to (checkmark2 v)\n                        else\n                            if <(Coins) = [2]> then\n                                switch costume to (checkmark2 v)\n                            else\n                                if <(Coins) = [1]> then\n                                    switch costume to (checkmark1 v)\n                                end\n                            end\n                        end\n                    end\n                else\n                    if <(Level) = [5]> then\n                        if <(Coins) = [4]> then\n                            switch costume to (checkmark3 v)\n                        else\n                            if <(Coins) = [3]> then\n                                switch costume to (checkmark2 v)\n                            else\n                                if <(Coins) = [2]> then\n                                    switch costume to (checkmark2 v)\n                                else\n                                    if <(Coins) = [1]> then\n                                        switch costume to (checkmark1 v)\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\n@Splash\n\nwhen flag clicked\nreset timer\nhide\ngo to x: (-480) y: (0)\nforever\n    set [timer v] to ((timer) + (0.1))\nend\n\nwhen [timer v] > (timer)\nswitch costume to (splash v)\nshow\nrepeat until <(round (x position)) = [0]>\n    change x by (((0) - (x position)) / (5))\nend\nset x to (0)\n\n@Intro\n\nwhen flag clicked\nplay sound [Nebula v] until done\n\nwhen flag clicked\nhide\nset [id v] to [j]\ncreate clone of (_myself_ v)\nwait (0) seconds\nset [id v] to [3]\ncreate clone of (_myself_ v)\nwait (0) seconds\nset [id v] to [cover]\ncreate clone of (_myself_ v)\nwait (0) seconds\nset [id v] to [bg]\ncreate clone of (_myself_ v)\nwait (0) seconds\nset [id v] to [j3]\ncreate clone of (_myself_ v)\nwait (0) seconds\nset [id v] to [jamie3128]\ncreate clone of (_myself_ v)\nwait (0) seconds\nbroadcast (bum v)\n\nwhen I start as a clone\nif <(id) = [j]> then\n    set [j percentage v] to [0.9]\n    set [ghost j v] to [100]\n    set [size j v] to [50]\n    set [direction j v] to [30]\n    set [place j v] to [-150]\n    point in direction (direction j)\n    go to x: (place j) y: (place j)\n    switch costume to (j v)\n    set [ghost v] effect to (ghost j)\n    set size to (size j) %\n    show\n    repeat (56)\n        set [ghost j v] to ((ghost j) * (j percentage))\n        set [size j v] to (((size j) + (11.1)) * (j percentage))\n        set [direction j v] to (((direction j) + (90.2)) * (j percentage))\n        set [ghost v] effect to (ghost j)\n        set size to (size j) %\n        go to [front v] layer\n        go to x: ((x position) * (j percentage)) y: ((y position) * (j percentage))\n        point in direction (direction j)\n    end\n    hide\nelse\n    if <(id) = [3]> then\n        point in direction (90)\n        go to x: (150) y: (150)\n        set [ghost v] effect to (100)\n        switch costume to (3 v)\n        wait (1) seconds\n        show\n        repeat (24)\n            go to x: ((x position) * (0.7)) y: ((y position) * (0.7))\n            change [ghost v] effect by (-4)\n            go to [front v] layer\n        end\n        hide\n    else\n        if <(id) = [cover]> then\n            go to x: (0) y: (0)\n            switch costume to (cover v)\n            show\n        else\n            if <(id) = [bg]> then\n                go to x: (0) y: (0)\n                set [brightness v] effect to (-50)\n                switch costume to (bg v)\n                show\n                repeat until <(stop intro) = [ye]>\n                    repeat (9)\n                        go to [back v] layer\n                        change x by (7)\n                        change y by (7)\n                    end\n                    go to x: (0) y: (0)\n                end\n                hide\n                delete this clone\n            else\n                if <(id) = [bum]> then\n                    go to x: (pick random (1) to (10)) y: (-160)\n                    point in direction (pick random (-120) to (120))\n                    switch costume to (bum v)\n                    set size to (pick random (30) to (100)) %\n                    set [brightness v] effect to (pick random (-30) to (0))\n                    set [ghost v] effect to (pick random (30) to (70))\n                    go to [front v] layer\n                    show\n                    repeat until <(y position) < [-160]>\n                        change y by (vel)\n                        change [vel v] by (-2)\n                        move (10) steps\n                    end\n                    hide\n                    delete this clone\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(id) = [cover]> then\n    set [move cover v] to [80]\n    set [ghost v] effect to (0)\n    wait (1.35) seconds\n    repeat (14)\n        change [ghost v] effect by (7.14285714)\n        change y by (move cover)\n        set [move cover v] to ((move cover) * (0.77))\n    end\n    hide\n    delete this clone\nelse\n    if <(id) = [bg]> then\n        wait (1.7) seconds\n        set [brightness bg v] to [100]\n        set [brightness v] effect to (brightness bg)\n        repeat (50)\n            set [brightness bg v] to ((brightness bg) * (0.95))\n            set [brightness v] effect to (brightness bg)\n        end\n    else\n        if <(id) = [j3]> then\n            wait (1.7) seconds\n            set [brightness bg v] to [100]\n            switch costume to (j3 v)\n            set [brightness v] effect to (brightness bg)\n            show\n            repeat (50)\n                set [brightness bg v] to ((brightness bg) * (0.95))\n                set [brightness v] effect to (brightness bg)\n            end\n        end\n    end\nend\n\nwhen I receive [bum v]\nwait (1.7) seconds\nset [id v] to [bum]\nrepeat (5)\n    bum\nend\n\ndefine bum\nset [vel v] to (pick random (20) to (30))\nrepeat (2)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(id) = [j3]> then\n    wait (1.7) seconds\n    go to x: (0) y: (0)\n    point in direction (90)\n    set [t j3 v] to [0]\n    set [x j3 v] to [0]\n    set [y j3 v] to [0]\n    set [z j3 v] to [0]\n    repeat until <(stop intro) = [ye]>\n        change [t j3 v] by (4)\n        change [x j3 v] by (2)\n        change [y j3 v] by (4)\n        change [z j3 v] by (12.8)\n        change x by ([cos v] of (x j3) )\n        change y by ([cos v] of (y j3) )\n        change size by ((2) * ([cos v] of (z j3) ))\n        turn right ((2.718) * ([abs v] of ([tan v] of (t j3) ) )) degrees\n    end\n    delete this clone\nelse\n    if <(id) = [jamie3128]> then\n        wait (3.7) seconds\n        set [jamie3128 v] to [-50]\n        go to x: (0) y: (-50)\n        switch costume to (jamie3128 v)\n        set [ghost v] effect to (100)\n        show\n        repeat (25)\n            set y to (jamie3128)\n            set [jamie3128 v] to ((jamie3128) * (0.9))\n            change [ghost v] effect by (-4)\n        end\n        wait (1.5) seconds\n        repeat (25)\n            set y to (jamie3128)\n            set [jamie3128 v] to (((jamie3128) * (0.9)) - (5))\n            change [ghost v] effect by (4)\n        end\n        go to x: (-400) y: (0)\n        switch costume to (cover v)\n        set [ghost v] effect to (0)\n        go to [front v] layer\n        show\n        repeat (25)\n            go to x: ((x position) * (0.8)) y: (0)\n        end\n        broadcast (stop intro v)\n        wait (0.5) seconds\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n    end\nend\n\nwhen I receive [stop intro v]\nset [stop intro v] to [ye]\n\nwhen flag clicked\nset [stop intro v] to []\n\n@Level4Stuff2\n\nwhen flag clicked\nset voice to (tenor v)::tts\nset [level4stuffclones v] to [0]\nswitch costume to (blank v)\ngo to x: (0) y: (0)\n\ndefine LevelStuff\ngo to x: (0) y: (0)\nrepeat (9)\n    create clone of (_myself_ v)\n    change [level4stuffclones v] by (1)\nend\n\nwhen I start as a clone\nclear graphic effects\nset [mynumber v] to [0]\nchange [mynumber v] by (Level4StuffClones)\nif <(MyNumber) = [1]> then\n    switch costume to (finishlevel v)\n    set [mypositionx v] to [435]\n    set [mypositiony v] to [-10]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [2]> then\n    switch costume to (spike v)\n    set [mypositionx v] to [245]\n    set [mypositiony v] to [-15]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [3]> then\n    switch costume to (spike v)\n    set [mypositionx v] to [245]\n    set [mypositiony v] to [67]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [4]> then\n    switch costume to (spike v)\n    set [mypositionx v] to [245]\n    set [mypositiony v] to [164]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [5]> then\n    switch costume to (spike v)\n    set [mypositionx v] to [245]\n    set [mypositiony v] to [255]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [6]> then\n    switch costume to (coin v)\n    set [mypositionx v] to [200]\n    set [mypositiony v] to [-25]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [7]> then\n    switch costume to (coin v)\n    set [mypositionx v] to [200]\n    set [mypositiony v] to [67]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [8]> then\n    switch costume to (coin v)\n    set [mypositionx v] to [200]\n    set [mypositiony v] to [164]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [9]> then\n    switch costume to (coin v)\n    set [mypositionx v] to [355]\n    set [mypositiony v] to [-20]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\n\nwhen I start as a clone\nforever\n    go to x: ((CamX) + (MyPositionX)) y: ((CamY) + (MyPositionY))\nend\n\nwhen I start as a clone\nforever\n    if <(costume [name v]) = [Coin]> then\n        if <touching (player v)?> then\n            start sound [Coin v]\n            broadcast (CollectedCoin v)\n            change [coins v] by (1)\n            repeat (5)\n                set size to ((size) + (((0) - (size)) / (4))) %\n            end\n            delete this clone\n        end\n    end\n    if <(costume [name v]) = [Spike]> then\n        if <touching (player v)?> then\n            start sound [Dead v]\n            broadcast (Restart v)\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(costume [name v]) = [FinishLevel]> then\n        if <touching (player v)?> then\n            start sound [LevelComplete v]\n            broadcast (FinishedLevelTrans v)\n            set [spin v] to [0]\n            if <([x position v] of [player v]) < (x position)> then\n                if <([y position v] of [player v]) > (y position)> then\n                    switch costume to (finishlevelselup v)\n                else\n                    switch costume to (finishlevelselr v)\n                end\n            else\n                if <([x position v] of [player v]) > (x position)> then\n                    if <([y position v] of [player v]) > (y position)> then\n                        switch costume to (finishlevelselup v)\n                    else\n                        switch costume to (finishlevelsell v)\n                    end\n                end\n            end\n            reset timer\n            repeat until <(timer) > [2]>\n                change [spin v] by (1)\n                change [brightness v] effect by (1.7)\n                change size by (.3)\n            end\n            repeat (5)\n                set size to ((size) + (((0) - (size)) / (4))) %\n            end\n            hide\n            clear graphic effects\n            wait (.7) seconds\n            set [spin v] to [0]\n            point in direction (90)\n            show\n            switch costume to (finishlevelpop v)\n            repeat (10)\n                set size to ((size) + (((120) - (size)) / (4))) %\n            end\n            wait (0) seconds\n            repeat (5)\n                set size to ((size) + (((0) - (size)) / (3))) %\n            end\n            hide\n            wait (.3) seconds\n            broadcast (FLTransition v)\n            delete this clone\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <<(costume [name v]) = [FinishLevelSelR]> or <<(costume [name v]) = [FinishLevelSelL]> or <(costume [name v]) = [FinishLevelSelUp]>>> then\n        turn right (Spin) degrees\n    end\nend\n\nwhen I receive [restartnewlevel v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <touching (_edge_ v)?> then\n        repeat (5)\n            change [ghost v] effect by (20)\n        end\n        repeat until <not <touching (_edge_ v)?>>\n            set [ghost v] effect to (100)\n        end\n    else\n        repeat (5)\n            change [ghost v] effect by (-20)\n        end\n        repeat until <touching (_edge_ v)?>\n            set [ghost v] effect to (0)\n        end\n    end\nend\n\nwhen I receive [level4 v]\nLevelStuff\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        if <(costume [name v]) = [Coin]> then\n        end\n    end\n    if <touching (player v)?> then\n        if <(costume [name v]) = [Spike]> then\n        end\n    end\nend\n\n@Level5Stuff2\n\nwhen flag clicked\nset voice to (tenor v)::tts\nset [level5stuffclones v] to [0]\nswitch costume to (blank v)\ngo to x: (0) y: (0)\n\ndefine LevelStuff\ngo to x: (0) y: (0)\nrepeat (11)\n    create clone of (_myself_ v)\n    change [level5stuffclones v] by (1)\nend\n\nwhen I start as a clone\nclear graphic effects\nset [mynumber v] to [0]\nchange [mynumber v] by (Level5StuffClones)\nif <(MyNumber) = [1]> then\n    switch costume to (finishlevel v)\n    set [mypositionx v] to [-320]\n    set [mypositiony v] to [330]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [2]> then\n    switch costume to (spike v)\n    set [mypositionx v] to [120]\n    set [mypositiony v] to [-30]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [3]> then\n    switch costume to (spike v)\n    set [mypositionx v] to [220]\n    set [mypositiony v] to [-30]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [4]> then\n    switch costume to (spike v)\n    set [mypositionx v] to [280]\n    set [mypositiony v] to [-30]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [5]> then\n    switch costume to (booster v)\n    set [mypositionx v] to [280]\n    set [mypositiony v] to [45]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [6]> then\n    switch costume to (spike v)\n    set [mypositionx v] to [130]\n    set [mypositiony v] to [190]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [7]> then\n    switch costume to (spike v)\n    set [mypositionx v] to [-242]\n    set [mypositiony v] to [325]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [8]> then\n    switch costume to (coin v)\n    set [mypositionx v] to [175]\n    set [mypositiony v] to [-25]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [9]> then\n    switch costume to (coin v)\n    set [mypositionx v] to [197]\n    set [mypositiony v] to [195]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [10]> then\n    switch costume to (coin v)\n    set [mypositionx v] to [80]\n    set [mypositiony v] to [195]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\nif <(MyNumber) = [11]> then\n    switch costume to (coin v)\n    set [mypositionx v] to [-237]\n    set [mypositiony v] to [370]\n    repeat (5)\n        set [ghost v] effect to (100)\n    end\nend\n\nwhen I start as a clone\nforever\n    go to x: ((CamX) + (MyPositionX)) y: ((CamY) + (MyPositionY))\nend\n\nwhen I start as a clone\nforever\n    if <(costume [name v]) = [Coin]> then\n        if <touching (player v)?> then\n            start sound [Coin v]\n            broadcast (CollectedCoin v)\n            change [coins v] by (1)\n            repeat (5)\n                set size to ((size) + (((0) - (size)) / (4))) %\n            end\n            delete this clone\n        end\n    end\n    if <(costume [name v]) = [Spike]> then\n        if <touching (player v)?> then\n            start sound [Dead v]\n            broadcast (Restart v)\n        end\n    end\n    if <(costume [name v]) = [Booster]> then\n        if <touching (player v)?> then\n            start sound [Booster v]\n            set [xv v] to [0]\n            set [yv v] to [17]\n            set size to (0) %\n            repeat (15)\n                set size to ((size) + (((100) - (size)) / (5))) %\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(costume [name v]) = [FinishLevel]> then\n        if <touching (player v)?> then\n            start sound [LevelComplete v]\n            broadcast (FinishedLevelTrans v)\n            set [spin v] to [0]\n            if <([x position v] of [player v]) < (x position)> then\n                if <([y position v] of [player v]) > (y position)> then\n                    switch costume to (finishlevelselup v)\n                else\n                    switch costume to (finishlevelselr v)\n                end\n            else\n                if <([x position v] of [player v]) > (x position)> then\n                    if <([y position v] of [player v]) > (y position)> then\n                        switch costume to (finishlevelselup v)\n                    else\n                        switch costume to (finishlevelsell v)\n                    end\n                end\n            end\n            reset timer\n            repeat until <(timer) > [2]>\n                change [spin v] by (1)\n                change [brightness v] effect by (1.7)\n                change size by (.3)\n            end\n            repeat (5)\n                set size to ((size) + (((0) - (size)) / (4))) %\n            end\n            hide\n            clear graphic effects\n            wait (.7) seconds\n            set [spin v] to [0]\n            point in direction (90)\n            show\n            switch costume to (finishlevelpop v)\n            repeat (10)\n                set size to ((size) + (((120) - (size)) / (4))) %\n            end\n            wait (0) seconds\n            repeat (5)\n                set size to ((size) + (((0) - (size)) / (3))) %\n            end\n            hide\n            wait (.3) seconds\n            broadcast (FLTransition v)\n            delete this clone\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <<(costume [name v]) = [FinishLevelSelR]> or <<(costume [name v]) = [FinishLevelSelL]> or <(costume [name v]) = [FinishLevelSelUp]>>> then\n        turn right (Spin) degrees\n    end\nend\n\nwhen I receive [restartnewlevel v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <touching (_edge_ v)?> then\n        repeat (5)\n            change [ghost v] effect by (20)\n        end\n        repeat until <not <touching (_edge_ v)?>>\n            set [ghost v] effect to (100)\n        end\n    else\n        repeat (5)\n            change [ghost v] effect by (-20)\n        end\n        repeat until <touching (_edge_ v)?>\n            set [ghost v] effect to (0)\n        end\n    end\nend\n\nwhen I receive [level5 v]\nLevelStuff\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        if <(costume [name v]) = [Coin]> then\n        end\n    end\n    if <touching (player v)?> then\n        if <(costume [name v]) = [Spike]> then\n        end\n    end\n    if <touching (player v)?> then\n        if <(costume [name v]) = [Booster]> then\n        end\n    end\nend\n\n
Welcome to -Green- A Mobile Freindly Platformer!\n---------------------------------------------------------------\n#7th on Trending and #12th on English Games Trending! THANK YOU SO MUCH :D\n\nThis is the best scrolling platformer I made!\nTime spent : About 1 month\nMobile Friendly!\n\nOnly 5 Levels, trying to make more... Sorry for it :(\n\n-INSTRUCTIONS (some also in game)-\n-right arrow keys to move.\n-Get to the portal to go to the next level.\n-Try to get past all 5 levels ( It took me a huge time tho)\n-Try not to touch the spikes\n-Click on the color on the menu to change the players color\n\nGreat Scratchers Who Loved And Faved :\n@Supercube_123 Loved & Faved\n@LOLele_54 Loved & Faved\n@TurtleEntertainement Loved & Faved\n@NeelDaPeel Loved\n\n-CREDITS-\nCloud effect by @Mick               \nCoin art and getting effect by @0014049                                                                         \nThe Player by @StratfordJames\nThis awesome Intro by @-SandBox-\nEverthing else by me :)\nMusic by MitiS - You\n\nHope you enjoy! Please make sure to leave a love and fav if you enjoyed! FEEDBACK ALWAYS APPRECIATED\n\n#Scrolling #Platformer #Player #Spikes #Mountain #Clouds #Mick #Wes64 #0014049 #made #it #Who #Can #Fav #This #Project