Sonic Quest - A platformer
@Stage\n\nwhen flag clicked\nswitch backdrop to (join [bg] (level))\n\nwhen I receive [start game v]\nset [color v] effect to (0)\nswitch backdrop to (join [bg] (level))\nif <(level) = [1]> then\n    music [1]\nelse\n    if <(level) = [2]> then\n        music [4]\n    else\n        if <(level) = [3]> then\n            music [5]\n        else\n            if <(level) = [4]> then\n                music [6]\n            end\n        end\n    end\nend\n\ndefine music (song)\nstop [other scripts in sprite v]\nset [music v] to (song)\nbroadcast (play music v)\n\nwhen I receive [end intro v]\nmusic [2]\n\nwhen I receive [leave title v]\nrepeat (40)\n    change volume by (-2.5)\nend\nstop [other scripts in sprite v]\nwait (0.2) seconds\nset volume to (100) %\n\nwhen I receive [world map v]\nswitch backdrop to (bg5 v)\nmusic [3]\nbroadcast (colour bg v)\n\nwhen I receive [colour bg v]\nforever\n    set [color v] effect to (((scrollx) * (-1)) / (10))\nend\n\nwhen I receive [toggle pause v]\nif <(pause) = [0]> then\n    set volume to (44) %\n    repeat (6)\n        change volume by (6)\n    end\nelse\n    set volume to (80) %\n    repeat (6)\n        change volume by (-6)\n    end\nend\n\nwhen I receive [play music v]\nclear sound effects\nset [pitch v] effect to (0)\nset volume to (80) %\nif <(music) = [1]> then\n    play sound [Super Bell Hill intro v] until done\n    forever\n        play sound [Super Bell Hill loop v] until done\n    end\nelse\n    if <(music) = [2]> then\n        play sound [Title intro v] until done\n        forever\n            play sound [Title loop v] until done\n        end\n    else\n        if <(music) = [3]> then\n            forever\n                play sound [earth v] until done\n            end\n        else\n            if <(music) = [4]> then\n                play sound [cave intro v] until done\n                forever\n                    play sound [cave loop v] until done\n                end\n            else\n                if <(music) = [5]> then\n                    play sound [AthleticIntro v] until done\n                    forever\n                        play sound [AthleticLoop v] until done\n                    end\n                else\n                    if <(music) = [6]> then\n                        play sound [fuzzy intro v] until done\n                        forever\n                            play sound [fuzzy loop v] until done\n                        end\n                    else\n                        if <(music) = [7]> then\n                            play sound [Victory intro v] until done\n                            wait (3) seconds\n                            broadcast (bad ending v)\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [goal animation v]\nset volume to (60) %\nrepeat (12)\n    change volume by (-5)\nend\nstop [other scripts in sprite v]\n\nwhen I receive [thanks for playing v]\nswitch backdrop to (thanks v)\nwait (2.5) seconds\nbroadcast (leave title v)\n\nwhen I receive [play music v]\n\nset [pitch v] effect to ((([abs v] of ([x speed v] of [player v]) ) * ((120) / (7))) - (120))\n\nwhen I receive [vic music v]\nmusic [7]\n\nif <(music) = [4]> then\n    forever\n        wait until <(underwater?) = [1]>\n        change volume by (-30)\n        repeat until <(underwater?) = [0]>\n            set [pitch v] effect to (-2)\n            repeat (5)\n                change [pitch v] effect by (0.5)\n            end\n            if <(underwater?) = [1]> then\n                repeat (10)\n                    change [pitch v] effect by (-0.5)\n                end\n                if <(underwater?) = [1]> then\n                    repeat (5)\n                        change [pitch v] effect by (0.5)\n                    end\n                end\n            end\n            set [pitch v] effect to (0)\n        end\n        change volume by (30)\n    end\nend\n\nwhen I receive [bad ending v]\nset [color v] effect to (0)\nswitch backdrop to (bg6 v)\nwait (3) seconds\nforever\n    switch backdrop to (bg7 v)\n    wait (0.5) seconds\n    switch backdrop to (bg8 v)\n    wait (0.5) seconds\nend\n\nwhen I receive [the end v]\nstop [other scripts in sprite v]\nswitch backdrop to (backdrop1 v)\nstart sound [Sonic the Hedgehog Ending Medley Music v]\n\n@player\n\nwhen I receive [start game v]\nset [newbest v] to [0]\nset [sliding? v] to [0]\nset rotation style [left-right v]\ndelete all of [removed objects v]\nset [playerhurt v] to [0]\nset [scroll speed v] to [0]\npoint in direction (90)\nif <(difficulty) = [1]> then\n    set [health v] to [4]\nelse\n    set [health v] to [3]\nend\nset [touching ground? v] to [0]\nset [able to swim? v] to [1]\nif <<(lvl hover) = [2]> or <(lvl hover) = [4]>> then\n    if <(lvl hover) = [4]> then\n        set [checkpoint v] to [01-02-1]\n        set [scrollx v] to [0]\n        set [scrolly v] to [-360]\n        set [sliding? v] to [1]\n    else\n        set [checkpoint v] to [01-03-1]\n        set [scrollx v] to [0]\n        set [scrolly v] to [-720]\n    end\nelse\n    set [checkpoint v] to [01-01-1]\n    set [scrollx v] to [0]\n    set [scrolly v] to [0]\nend\ndelete all of [checkpoint pos v]\nadd [-100] to [checkpoint pos v]\nif <(lvl hover) = [4]> then\n    add [0] to [checkpoint pos v]\nelse\n    add [-60] to [checkpoint pos v]\nend\ngo to x: (item (1) of [checkpoint pos v]) y: (item (2) of [checkpoint pos v])\nset [brightness v] effect to (0)\nset size to (100) %\nset [x speed v] to [0]\nset [y speed v] to [0]\nshow\nforever\n    set [frame-1x v] to (x position)\n    set [frame-1y v] to (y position)\n    set [touching ground? v] to [0]\n    set rotation style [don't rotate v]\n    switch costume to (hitbox v)\n    if <<(sliding?) = [1]> and <(last ground) = [1]>> then\n        set [x speed v] to (slide speed)\n    else\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <(0left mobile) = [1]>> then\n            if <<(username) = [ToadfanSchool]> and <key (space v) pressed?>> then\n                change [x speed v] by (((-10) - (x speed)) / (4))\n            else\n                if <(underwater?) = [0]> then\n                    change [x speed v] by (((-7) - (x speed)) / (4))\n                else\n                    change [x speed v] by ((((-5) + ((last ground) * (2))) - (x speed)) / (4))\n                end\n            end\n            point in direction (-90)\n        else\n            if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <(0right mobile) = [1]>> then\n                if <<(username) = [ToadfanSchool]> and <key (space v) pressed?>> then\n                    change [x speed v] by (((10) - (x speed)) / (4))\n                else\n                    if <(underwater?) = [0]> then\n                        change [x speed v] by (((7) - (x speed)) / (4))\n                    else\n                        change [x speed v] by ((((5) - ((last ground) * (2))) - (x speed)) / (4))\n                    end\n                end\n                point in direction (90)\n            else\n                if <(last ground) = [1]> then\n                    change [x speed v] by (((0) - (x speed)) / (4))\n                else\n                    change [x speed v] by (((0) - (x speed)) / (20))\n                end\n            end\n        end\n        set [slide speed v] to (x speed)\n    end\n    if <(underwater?) = [0]> then\n        if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <key (5 v) pressed?>> or <(0up mobile) = [1]>> then\n            change [y speed v] by (-1)\n        else\n            change [y speed v] by (-1.5)\n        end\n        if <(y speed) < [-15]> then\n            set [y speed v] to [-15]\n        end\n    else\n        change [y speed v] by (-0.5)\n        if <(y speed) < [-5]> then\n            set [y speed v] to [-5]\n        end\n        if <not <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <key (5 v) pressed?>> or <(0up mobile) = [1]>>> then\n            set [able to swim? v] to [1]\n        end\n        if <<(able to swim?) = [1]> and <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <key (5 v) pressed?>> or <(0up mobile) = [1]>>> then\n            set [able to swim? v] to [0]\n            start sound [nsmbwiiSwim v]\n            if <(y position) > (([y position v] of [water v]) + (150))> then\n                set [y speed v] to [15]\n            else\n                change [y speed v] by (6)\n                if <(y speed) > [7]> then\n                    set [y speed v] to [7]\n                end\n            end\n        end\n    end\n    change x by (x speed)\n    if <<(level) = [4]> and <(object pos check) = [0]>> then\n        change [scrollx v] by ((round ((scroll speed) * (100))) / (100))\n        if <(scrollx) < [-8280]> then\n            change [scroll speed v] by (((-3) - (scroll speed)) / (40))\n        else\n            if <(scrollx) < [-5150]> then\n                change [scroll speed v] by (((-5) - (scroll speed)) / (40))\n            else\n                if <(scrollx) < [-700]> then\n                    change [scroll speed v] by (((-3) - (scroll speed)) / (40))\n                else\n                    change [scroll speed v] by (((-5) - (scroll speed)) / (40))\n                end\n            end\n        end\n        if <(scrolly) < [0]> then\n            change [scrolly v] by (2)\n            change y by (2)\n        else\n            set [scrolly v] to [0]\n        end\n        if <(scrollx) < (item (level) of [level end pos v])> then\n            set [scrollx v] to (item (level) of [level end pos v])\n        else\n            change x by (scroll speed)\n        end\n    end\n    if <(x position) < [-230]> then\n        set x to (-230)\n    end\n    if <(x position) > [230]> then\n        set x to (230)\n    end\n    if <not <((round ((x speed) * (100))) / (100)) = [0]>> then\n        set [lastx v] to ((round ((x speed) * (100))) / (100))\n    end\n    if <not <((round ((y speed) * (100))) / (100)) = [0]>> then\n        set [lasty v] to ((round ((y speed) * (100))) / (100))\n    end\n    if <<touching (level v)?> or <touching (solid objects v)?>> then\n        xmoveback\n        if <([abs v] of (x speed) ) > [0.1]> then\n            xslope\n        end\n    end\n    if <<(touching ground?) = [0]> and <(y speed) < [0]>> then\n        if <(last ground) = [1]> then\n            check for ground\n        end\n    end\n    change y by (y speed)\n    if <<touching (level v)?> or <touching (solid objects v)?>> then\n        ymoveback\n        if <([abs v] of (y speed) ) > [0.1]> then\n    end\n    if <(touching ground?) = [1]> then\n        ground angle\n    else\n        set [leftfooth v] to [0]\n        set [rightfooth v] to [0]\n    end\n    set [xscrolled v] to [0]\n    set [yscrolled v] to [0]\n    set [actual x v] to ((scrollx) - (x position))\n    set [actual y v] to ((scrolly) - (y position))\n    if <[2] = [1]> then\n        change [xscrolled v] by ((round ((((actual x) - (scrollx)) / (8)) * (10))) / (10))\n        change [scrollx v] by ((round ((((actual x) - (scrollx)) / (8)) * (10))) / (10))\n        change x by (xscrolled)\n        change [yscrolled v] by ((round ((((actual y) - (scrolly)) / (8)) * (10))) / (10))\n        change [scrolly v] by ((round ((((actual y) - (scrolly)) / (8)) * (10))) / (10))\n        if <(scrolly) > [-1]> then\n            change [yscrolled v] by ((0) - (scrolly))\n            change [scrolly v] by ((0) - (scrolly))\n        end\n        change y by (yscrolled)\n    else\n        if <<not <<(level) = [4]> and <(object pos check) = [0]>>> and <(level) < [5]>> then\n            if <(y position) < [-50]> then\n                scroll [4]\n            end\n            if <(y position) > [50]> then\n                scroll [3]\n            end\n            if <(x position) > [25]> then\n                scroll [1]\n            end\n            if <(x position) < [-25]> then\n                scroll [2]\n            end\n        end\n    end\n    if <<<(scrolly) = [0]> and <(y position) < [-180]>> or <<touching (lava v)?> or <touching (bottom lava v)?>>> then\n        set [health v] to [0]\n    end\n    broadcast (scroll v)\n    set [last ground v] to (touching ground?)\n    set [overallspeed v] to (((((x position) - (frame-1x)) - (xscrolled)) + (((y position) - (frame-1y)) - (yscrolled))) / (2))\n    set rotation style [left-right v]\n    if <(touching ground?) = [1]> then\n        if <(sliding?) = [1]> then\n            if <<<((leftfootH) + (rightfootH)) < [4]> and <not <([abs v] of (slide speed) ) > [1]>>> or <(underwater?) = [1]>> then\n                switch costume to (8 v)\n                if <not <<<key (s v) pressed?> or <key (down arrow v) pressed?>> or <(0down mobile) = [1]>>> then\n                    set [sliding? v] to [0]\n                end\n            else\n                switch costume to (7 v)\n            end\n            if <not <(slide speed) = [0]>> then\n                if <(slide speed) > [0]> then\n                    point in direction (90)\n                else\n                    point in direction (-90)\n                end\n            end\n        else\n            switch costume to ((run costume) + (2))\n        end\n    else\n        if <(y speed) > [0]> then\n            if <(underwater?) = [0]> then\n                switch costume to (5 v)\n            else\n                switch costume to (11 v)\n            end\n        else\n            if <(sliding?) = [1]> then\n                switch costume to (7 v)\n            else\n                if <(underwater?) = [0]> then\n                    switch costume to (6 v)\n                else\n                    switch costume to (12 v)\n                end\n            end\n        end\n    end\n    if <(health) = [0]> then\n        start sound [down v]\n        if <[temporary green coins v] contains [10]?> then\n            delete (item # of [10] in [temporary green coins v]) of [temporary green coins v]\n            broadcast (update green coin counter v)\n        end\n        if <[temporary green coins v] contains [20]?> then\n            delete (item # of [20] in [temporary green coins v]) of [temporary green coins v]\n            broadcast (update green coin counter v)\n        end\n        if <[temporary green coins v] contains [30]?> then\n            delete (item # of [30] in [temporary green coins v]) of [temporary green coins v]\n            broadcast (update green coin counter v)\n        end\n        if <not <(y position) < [-180]>> then\n            switch costume to (13 v)\n            set [y speed v] to [12]\n            set [x speed v] to ((knockback dir) * (5))\n            repeat until <(y position) < [-180]>\n                change x by (x speed)\n                change y by (y speed)\n                change [y speed v] by (-1.5)\n                change [x speed v] by (((0) - (x speed)) / (20))\n                wait until <(pause) = [0]>\n            end\n            set [x speed v] to [0]\n            set [y speed v] to [0]\n            hide\n        else\n            hide\n            wait (1) seconds\n        end\n        wait until <(pause) = [0]>\n        start sound [respawn v]\n        repeat (25)\n            if <(join (letter (1) of (checkpoint)) (letter (2) of (checkpoint))) = [01]> then\n                change [scrollx v] by ((((((join (letter (1) of (checkpoint)) (letter (2) of (checkpoint))) - (1)) * (-480)) - (0)) - (scrollx)) / (4))\n                change [scrolly v] by ((((((join (letter (4) of (checkpoint)) (letter (5) of (checkpoint))) - (1)) * (-360)) - (0)) - (scrolly)) / (4))\n                if <(scrollx) < (item (level) of [level end pos v])> then\n                    set [scrollx v] to (item (level) of [level end pos v])\n                end\n            else\n                change [scrollx v] by ((((((join (letter (1) of (checkpoint)) (letter (2) of (checkpoint))) - (1)) * (-480)) - (item (1) of [checkpoint pos v])) - (scrollx)) / (4))\n                change [scrolly v] by ((((((join (letter (4) of (checkpoint)) (letter (5) of (checkpoint))) - (1)) * (-360)) - (item (2) of [checkpoint pos v])) - (scrolly)) / (4))\n                if <(scrollx) < (item (level) of [level end pos v])> then\n                    set [scrollx v] to (item (level) of [level end pos v])\n                end\n            end\n            if <(scrolly) > [0]> then\n                set [scrolly v] to [0]\n            end\n            broadcast (scroll v)\n            set [scroll speed v] to [0]\n            wait until <(pause) = [0]>\n        end\n        show\n        set [playerhurt v] to [0]\n        if <(difficulty) = [1]> then\n            set [health v] to [4]\n        else\n            set [health v] to [3]\n        end\n        point in direction (90)\n        if <(join (letter (1) of (checkpoint)) (letter (2) of (checkpoint))) = [01]> then\n            go to x: (item (1) of [checkpoint pos v]) y: (item (2) of [checkpoint pos v])\n        else\n            go to x: (current checkX) y: ((current checkY) + (40))\n        end\n        set [x speed v] to [0]\n        set [y speed v] to [0]\n        if <(join (letter (1) of (checkpoint)) (letter (2) of (checkpoint))) = [01]> then\n            set [scrollx v] to (((join (letter (1) of (checkpoint)) (letter (2) of (checkpoint))) - (1)) * (-480))\n            set [scrolly v] to (((join (letter (4) of (checkpoint)) (letter (5) of (checkpoint))) - (1)) * (-360))\n        else\n            set [scrollx v] to ((((join (letter (1) of (checkpoint)) (letter (2) of (checkpoint))) - (1)) * (-480)) - (item (1) of [checkpoint pos v]))\n            set [scrolly v] to ((((join (letter (4) of (checkpoint)) (letter (5) of (checkpoint))) - (1)) * (-360)) - (item (2) of [checkpoint pos v]))\n        end\n        if <(scrollx) < (item (level) of [level end pos v])> then\n            set [scrollx v] to (item (level) of [level end pos v])\n        end\n        if <(scrolly) > [0]> then\n            set [scrolly v] to [0]\n        end\n        if <<(scrollx) > [-100]> and <(level) = [4]>> then\n            set [sliding? v] to [1]\n        end\n    end\n    wait until <(pause) = [0]>\nend\n\nchange [xscrolled v] by (((actual x) - (scrollx)) / (8))\nchange [scrollx v] by (((actual x) - (scrollx)) / (8))\nchange x by (xscrolled)\nif <([abs v] of (((actual y) - (scrolly)) / (8)) ) > [0.05]> then\n    change [yscrolled v] by (((actual y) - (scrolly)) / (8))\n    change [scrolly v] by (((actual y) - (scrolly)) / (8))\n    if <(scrolly) > [-1]> then\n        change [yscrolled v] by ((0) - (scrolly))\n        change [scrolly v] by ((0) - (scrolly))\n    end\n    change y by (yscrolled)\nend\n\nwhen I receive [start game v]\nwait (0.5) seconds\nforever\n    wait until <(underwater?) = [1]>\n    start sound [Splash v]\n    wait until <(underwater?) = [0]>\n    start sound [Plunge v]\nend\n\nwhen I receive [start game v]\nwait (0.5) seconds\nforever\n    wait until <(underwater?) = [1]>\n    start sound [Splash v]\n    wait until <(underwater?) = [0]>\n    start sound [Plunge v]\nend\n\nwhen I receive [start game v]\nwait (0.5) seconds\nforever\n    wait until <(underwater?) = [1]>\n    start sound [Splash v]\n    wait until <(underwater?) = [0]>\n    start sound [Plunge v]\nend\n\ngo to x: (-100) y: (-60)\nset [x speed v] to [0]\nset [y speed v] to [0]\nset [scrollx v] to [0]\nset [scrolly v] to [0]\n\nwhen I receive [start game v]\nforever\n    if <((leftfootH) - (rightfootH)) > [0]> then\n        set [slide speed v] to ((slide speed) * (-1))\n    end\n    if <([abs v] of ((leftfootH) - (rightfootH)) ) < [2]> then\n        change [slide speed v] by (((0) - (slide speed)) / (10))\n    else\n        if <(slide speed) < ([abs v] of ((leftfootH) - (rightfootH)) )> then\n            change [slide speed v] by ((0.1) * ([abs v] of ((leftfootH) - (rightfootH)) ))\n        end\n    end\n    if <(slide speed) > [10]> then\n        set [slide speed v] to [10]\n    end\n    if <((leftfootH) - (rightfootH)) > [0]> then\n        set [slide speed v] to ((slide speed) * (-1))\n    end\nend\n\nwhen I receive [start game v]\nforever\n    if <<([abs v] of (x speed) ) > [1]> and <(sliding?) = [0]>> then\n        if <(touching ground?) = [1]> then\n            start sound (pick random (4) to (5))\n        end\n        set [run costume v] to [1]\n        repeat (3)\n            if <(underwater?) = [1]> then\n                wait (0) seconds\n            end\n            change [run costume v] by (1)\n        end\n        repeat (3)\n            if <(underwater?) = [1]> then\n                wait (0) seconds\n            end\n            change [run costume v] by (-1)\n        end\n    else\n        set [run costume v] to [0]\n    end\n    wait until <<(pause) = [0]> and <(health) > [0]>>\nend\n\nwhen flag clicked\nset [newbest v] to [0]\nset [knockback dir v] to [-1]\nset [underwater? v] to [0]\nset [playerhurt v] to [0]\nset rotation style [left-right v]\nset [scrollx v] to [0]\nset [scrolly v] to [0]\nhide\n\ndefine xslope\nset [slopemoves v] to [0]\nset [oldx v] to (x position)\nset [oldy v] to (y position)\nif <<not <touching (level v)?>> and <not <touching (solid objects v)?>>> then\n    change y by (3)\n    if <<touching (level v)?> or <touching (solid objects v)?>> then\n        change x by (([abs v] of (x speed) ) / (x speed))\n        if <<touching (level v)?> or <touching (solid objects v)?>> then\n            repeat until <<<not <touching (level v)?>> and <not <touching (solid objects v)?>>> or <(slopemoves) > [6]>>\n                change y by (-1)\n                change [slopemoves v] by (1)\n            end\n            if <(slopemoves) > [6]> then\n                set x to (oldx)\n                set y to (oldY)\n            end\n        else\n            change x by (-3)\n        end\n    else\n        change y by (-3)\n        change y by (-3)\n        if <<touching (level v)?> or <touching (solid objects v)?>> then\n            change x by (([abs v] of (x speed) ) / (x speed))\n            if <<touching (level v)?> or <touching (solid objects v)?>> then\n                repeat until <<<not <touching (level v)?>> and <not <touching (solid objects v)?>>> or <(slopemoves) > [6]>>\n                    change y by (1)\n                    change [slopemoves v] by (1)\n                end\n                if <(slopemoves) > [6]> then\n                    set x to (oldx)\n                    set y to (oldY)\n                end\n            else\n                change x by (-3)\n            end\n        else\n            change y by (3)\n        end\n    end\nend\n\ndefine xmoveback\nif <not <((round ((x speed) * (1000))) / (100)) = [0]>> then\n    set [oldx v] to (x position)\n    set [oldy v] to (y position)\n    set [slopemoves v] to [0]\n    repeat until <<<not <touching (level v)?>> and <not <touching (solid objects v)?>>> or <(slopemoves) > [50]>>\n        change y by (1)\n        change [slopemoves v] by (1)\n    end\n    go to x: (oldx) y: (oldY)\n    if <(slopemoves) > [15]> then\n        set [slopemoves v] to [0]\n        repeat until <<<not <touching (level v)?>> and <not <touching (solid objects v)?>>> or <(slopemoves) > [50]>>\n            change [slopemoves v] by (1)\n            change x by (((([abs v] of (lastX) ) / (lastX)) * (-1)) / (4))\n        end\n        if <(slopemoves) > [50]> then\n            go to x: (oldx) y: (oldY)\n        end\n    else\n        change x by (((([abs v] of (x speed) ) / (x speed)) / (-3)) * (slopemoves))\n    end\nend\n\nwhen [r v] key pressed\nif <(username) = [ToadfanSchool]> then\n    go to x: (-100) y: (-60)\n    set [x speed v] to [0]\n    set [y speed v] to [0]\n    set [scrollx v] to [0]\n    set [scrolly v] to [0]\nelse\n    set [health v] to [0]\nend\n\ndefine ymoveback\nset [slopemoves v] to [0]\nset [oldx v] to (x position)\nset [oldy v] to (y position)\nrepeat until <<<not <touching (level v)?>> and <not <touching (solid objects v)?>>> or <(slopemoves) > [100]>>\n    change [slopemoves v] by (1)\n    change y by (((([abs v] of (lastY) ) / (lastY)) * (-1)) / (4))\nend\nif <(slopemoves) > [100]> then\n    go to x: (oldx) y: (oldY)\nelse\n    if <(y speed) > [0]> then\n        set [touching ground? v] to [2]\n        broadcast (check block v)\n    else\n        set [touching ground? v] to [1]\n    end\n    set [y speed v] to [0]\n    if <<<<<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <key (5 v) pressed?>> or <(0up mobile) = [1]>> and <((([abs v] of (lastY) ) / (lastY)) * (-1)) = [1]>> and <(can jump on ground?) = [1]>> and <(underwater?) = [0]>> then\n        set [oldx v] to (x position)\n        set [oldy v] to (y position)\n        set [y speed v] to [15]\n        broadcast (player jump v)\n        change y by (3)\n        set [can jump on ground? v] to [0]\n        if <<touching (level v)?> or <touching (solid objects v)?>> then\n            go to x: (oldx) y: (oldY)\n            set [y speed v] to [0]\n            set [x speed v] to [0]\n        else\n            start sound [jump v]\n            set [sliding? v] to [0]\n        end\n    end\nend\n\ndefine scroll (number or text)\nif <(number or text) = [1]> then\n    repeat until <<not <(x position) > [25]>> or <([abs v] of (scrollx) ) > ([abs v] of (item (level) of [level end pos v]) )>>\n        change x by (-1)\n        change [scrollx v] by (-1)\n        change [xscrolled v] by (-1)\n    end\nelse\n    if <(number or text) = [2]> then\n        repeat until <<not <(x position) < [-25]>> or <(scrollx) > [-1]>>\n            change x by (1)\n            change [scrollx v] by (1)\n            change [xscrolled v] by (1)\n        end\n    else\n        if <(number or text) = [3]> then\n            repeat until <not <(y position) > [50]>>\n                change y by (-1)\n                change [scrolly v] by (-1)\n                change [yscrolled v] by (-1)\n            end\n        else\n            repeat until <<not <(y position) < [-50]>> or <(scrolly) > [-1]>>\n                change y by (1)\n                change [scrolly v] by (1)\n                change [yscrolled v] by (1)\n            end\n        end\n    end\nend\n\nset [oldx v] to (x position)\nset [oldy v] to (y position)\nset [slopemoves v] to [0]\nrepeat until <<<not <touching (level v)?>> and <not <touching (solid objects v)?>>> or <(slopemoves) > [50]>>\n    change y by (1)\n    change [slopemoves v] by (1)\nend\nsay (slopemoves)\ngo to x: (oldx) y: (oldY)\nif <(slopemoves) > [15]> then\n    set [slopemoves v] to [0]\n    repeat until <<<not <touching (level v)?>> and <not <touching (solid objects v)?>>> or <(slopemoves) > [50]>>\n        change [slopemoves v] by (1)\n        change x by (((([abs v] of (lastX) ) / (lastX)) * (-1)) / (4))\n    end\n    if <(slopemoves) > [50]> then\n        go to x: (oldx) y: (oldY)\n    end\nend\n\nwhen I receive [start game v]\nset [can jump on ground? v] to [1]\nforever\n    wait until <(can jump on ground?) = [0]>\n    wait until <<<<not <key (w v) pressed?>> and <not <key (up arrow v) pressed?>>> and <not <key (5 v) pressed?>>> and <not <(0up mobile) = [1]>>>\n    set [can jump on ground? v] to [1]\n    wait until <(pause) = [0]>\nend\n\ndefine check for ground\nset [oldx v] to (x position)\nset [oldy v] to (y position)\nset [slopemoves v] to [0]\nrepeat until <<<touching (level v)?> or <touching (solid objects v)?>> or <(slopemoves) > [10]>>\n    change [slopemoves v] by (1)\n    change y by (-1)\nend\nif <(slopemoves) > [10]> then\n    go to x: (oldx) y: (oldY)\nelse\n    set [touching ground? v] to [1]\nend\n\nwhen I receive [start game v]\nforever\n    wait until <(touching ground?) = [0]>\n    wait until <not <(touching ground?) = [0]>>\n    if <(touching ground?) = [1]> then\n        start sound [landgrass v]\n    else\n        start sound [hit ceiling v]\n    end\nend\n\nwhen [e v] key pressed\nif <(username) = [ToadfanSchool]> then\n    set y to (70)\n    set [x speed v] to [0]\n    set [y speed v] to [0]\nend\n\nwait (0) seconds\n\ndefine ground angle\nset [oldx v] to (x position)\nset [oldy v] to (y position)\nswitch costume to (lefthit v)\nset [up times v] to [0]\nrepeat until <<<touching (level v)?> or <touching (solid objects v)?>> or <(up times) > [12]>>\n    change [up times v] by (1)\n    change y by (-1)\nend\nset [leftfooth v] to (up times)\nif <(up times) > [12]> then\n    set [leftfooth v] to [0]\nend\ngo to x: (oldx) y: (oldY)\nswitch costume to (righthit v)\nset [up times v] to [0]\nrepeat until <<<touching (level v)?> or <touching (solid objects v)?>> or <(up times) > [12]>>\n    change [up times v] by (1)\n    change y by (-1)\nend\nset [rightfooth v] to (up times)\nif <(up times) > [12]> then\n    set [rightfooth v] to [0]\nend\ngo to x: (oldx) y: (oldY)\n\nwhen I receive [start game v]\nforever\n    wait until <<<<key (s v) pressed?> or <key (down arrow v) pressed?>> or <(0down mobile) = [1]>> and <(touching ground?) = [1]>>\n    if <(pause) = [0]> then\n        set [sliding? v] to [1]\n        if <((leftfootH) + (rightfootH)) < [4]> then\n            if <(round (x speed)) = [0]> then\n                set [slide speed v] to [0]\n            else\n                if <(x speed) > [0]> then\n                    set [slide speed v] to [1]\n                else\n                    set [slide speed v] to [-1]\n                end\n            end\n        end\n        if <<((leftfootH) + (rightfootH)) < [4]> and <not <([abs v] of (slide speed) ) > [1]>>> then\n            start sound [WU_SE_PLY_QUAT v]\n        end\n        if <(pause) = [0]> then\n            wait until <not <<<key (s v) pressed?> or <key (down arrow v) pressed?>> or <(0down mobile) = [1]>>>\n            if <([abs v] of ((leftfootH) - (rightfootH)) ) < [2]> then\n                set [sliding? v] to [0]\n            end\n        end\n    end\n    wait until <(pause) = [0]>\nend\n\nwhen I receive [start game v]\nforever\n    if <<<(sliding?) = [1]> and <(touching ground?) = [1]>> and <not <<((leftfootH) + (rightfootH)) < [4]> and <not <([abs v] of (slide speed) ) > [1]>>>>> then\n        start sound [slide start v]\n        wait (0.1) seconds\n        repeat until <not <<<(sliding?) = [1]> and <(touching ground?) = [1]>> and <not <<((leftfootH) + (rightfootH)) < [4]> and <not <([abs v] of (slide speed) ) > [1]>>>>>>\n            start sound [slide v]\n            wait (0.22) seconds\n            wait until <<(pause) = [0]> and <not <(health) = [0]>>>\n        end\n    end\n    wait until <<(pause) = [0]> and <not <(health) = [0]>>>\nend\n\nwhen I receive [bounce player v]\nset [y speed v] to [10]\nif <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <key (5 v) pressed?>> or <(0up mobile) = [1]>> then\n    change [y speed v] by (8)\nend\n\nwhen I receive [start game v]\nforever\n    wait until <(playerhurt) = [1]>\n    start sound [power-down v]\n    start sound [Crunch v]\n    set [x speed v] to (((([abs v] of ((x speed) * (2)) ) + (5)) - (touching ground?)) * (knockback dir))\n    set [y speed v] to [2]\n    change [health v] by (-1)\n    if <(health) < [0]> then\n        set [health v] to [0]\n    end\n    repeat (6)\n        set [ghost v] effect to (0)\n        repeat (5)\n            change [ghost v] effect by (10)\n            wait until <(pause) = [0]>\n        end\n        repeat (5)\n            change [ghost v] effect by (-10)\n            wait until <(pause) = [0]>\n        end\n    end\n    set [playerhurt v] to [0]\nend\n\nif  then\n    set [scrollx v] to ((-480) * (11))\nend\n\nwhen I receive [goal animation v]\nstop [other scripts in sprite v]\npoint in direction (90)\nset [ghost v] effect to (0)\nswitch costume to (9 v)\nset x to ((flagX) - (30))\nstart sound [WU_SE_PLY_QUAT v]\nwait (1) seconds\nrepeat until <(y position) < ((flagY) - (60))>\n    change y by (-4)\n    if <(y position) < ((flagY) - (60))> then\n        set y to ((flagY) - (61))\n    end\nend\n\nwhen I receive [course clear text v]\nset x to ((flagX) - (30))\nset y to ((flagY) - (61))\nset rotation style [all around v]\nswitch costume to (7 v)\nset [y speed v] to [10]\nchange y by (5)\nrepeat (21)\n    turn right (-16) degrees\n    change y by (y speed)\n    change x by (-4)\n    change [y speed v] by (-1)\nend\nset y to ((flagY) - (76))\npoint in direction (90)\nswitch costume to (0 v)\nif <(level) = [4]> then\n    wait (0.8) seconds\n    switch costume to (8 v)\n    wait (0.5) seconds\nelse\n    wait (1.2) seconds\n    switch costume to (8 v)\n    wait (0.4) seconds\nend\nswitch costume to (10 v)\nrepeat (3)\n    change y by (5)\nend\nrepeat (2)\n    change y by (2)\nend\n\nwhen I receive [exit stage v]\nwait (0.3) seconds\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [spring bounce v]\nset [y speed v] to [15]\nif <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <key (5 v) pressed?>> or <(0up mobile) = [1]>> then\n    change [y speed v] by (5)\nend\n\nwhen [k v] key pressed\nif <(username) = [ToadfanSchool]> then\n    set [health v] to [0]\nend\n\nset [scrollx v] to (item (level) of [level end pos v])\n\nwhen I receive [the end v]\nhide\n\n@bg\n\nwhen I receive [exit stage v]\nwait (0.3) seconds\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [scroll v]\nswitch costume to (box v)\nif <<(id) = [1]> or <(id) = [2]>> then\n    if <(level) = [3]> then\n        go to x: ((scrollx) / (10)) y: (((scrolly) + (((360) * ((screen) - (1))) * (10))) / (10))\n    else\n        go to x: (((scrollx) + (((480) * ((screen) - (1))) * (10))) / (10)) y: ((scrolly) / (10))\n    end\nelse\n    if <<(id) = [3]> or <(id) = [4]>> then\n        go to x: (((scrollx) + (((480) * ((screen) - (1))) * (3))) / (3)) y: ((scrolly) / (3))\n    else\n        go to x: (((scrollx) + (((480) * ((screen) - (1))) * (2))) / (2)) y: ((scrolly) / (2))\n    end\nend\ncostume\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nif <<<(id) = [1]> or <(id) = [2]>> and <(lvl theme) = [3]>> then\n    set [ghost v] effect to (90)\nend\nif <<<(id) = [3]> or <(id) = [4]>> and <(lvl theme) = [3]>> then\n    set [ghost v] effect to (50)\nend\ngo to x: (0) y: (0)\nif <<<(id) = [1]> or <(id) = [3]>> or <(id) = [5]>> then\n    set [screen v] to [1]\nelse\n    set [screen v] to [2]\nend\nif <<<(id) = [1]> or <(id) = [2]>> and <(level) = [1]>> then\n    set [ghost v] effect to (50)\nend\ncostume\nshow\nforever\n    if <not <(lvl theme) = [0]>> then\n        if <<<(id) = [1]> or <(id) = [2]>> and <(level) = [3]>> then\n            if <(y position) > [360]> then\n                change [screen v] by (-2)\n                wait (0.1) seconds\n            end\n            if <(y position) < [-360]> then\n                change [screen v] by (2)\n                wait (0.1) seconds\n            end\n        else\n            if <(x position) > [480]> then\n                change [screen v] by (-2)\n                wait (0.1) seconds\n            end\n            if <(x position) < [-480]> then\n                change [screen v] by (2)\n                wait (0.1) seconds\n            end\n        end\n    end\nend\n\ndefine clone (no)\nset [id v] to [0]\nrepeat (no)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [start game v]\nclone [6]\n\nwhen I receive [end intro v]\nset [lvl theme v] to (level)\n\nclone [6]\n\nwhen I receive [world map v]\nif <[1] = [1]> then\n    delete this clone\nend\nstop [other scripts in sprite v]\nhide\nset [lvl theme v] to [0]\nclone [2]\n\ndefine costume\nset [color v] effect to (0)\nif <<(id) = [1]> or <(id) = [2]>> then\n    switch costume to (join (lvl theme) (join [-] [1]))\n    if <(lvl theme) = [0]> then\n        set [color v] effect to (((scrollx) * (-1)) / (10))\n    end\nelse\n    if <<(id) = [3]> or <(id) = [4]>> then\n        switch costume to (join (lvl theme) (join [-] [2]))\n    else\n        switch costume to (join (lvl theme) (join [-] [3]))\n    end\nend\n\nwhen I receive [bad ending v]\nhide\n\n@solid objects\n\nwhen [b v] key pressed\nif <(username) = [ToadfanSchool]> then\n    delete (item # of (obj no) in [on-screen ns-objects v]) of [on-screen ns-objects v]\n    delete this clone\nend\n\nwhen I receive [exit stage v]\nwait (0.3) seconds\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen [b v] key pressed\nif <(username) = [ToadfanSchool]> then\n    delete (item # of (obj no) in [on screen solid-objs v]) of [on screen solid-objs v]\n    delete this clone\nend\n\nwhen I receive [scroll v]\nif <(id) = [x]> then\n    check\nelse\n    switch costume to (box v)\n    go to x: (((scrollx) + ((480) * ((join (letter (1) of (obj lvl)) (letter (2) of (obj lvl))) - (1)))) + (x)) y: (((scrolly) + ((360) * ((join (letter (4) of (obj lvl)) (letter (5) of (obj lvl))) - (1)))) + (y))\n    costume\nend\n\ndefine create objects lvl: (level)\nif <(level) = [04-01-1]> then\n    set [obj lvl v] to (level)\nend\n\nid: [1] x: [-50] y: [0] variation: [1] object no. [1]\n\ndefine check\nset [count v] to [0]\nrepeat (length of [shown levels v])\n    change [count v] by (1)\n    create objects lvl: (item (count) of [shown levels v])\nend\n\ndefine id: (id) x: (x pos) y: (y pos) variation: (vari) object no. (obj no)\nif <<not <[on screen solid-objs v] contains (obj no)?>> and <[shown levels v] contains (obj lvl)?>> then\n    set [obj no v] to (obj no)\n    set [vari v] to (vari)\n    set [id v] to (id)\n    set [x v] to (x pos)\n    set [y v] to (y pos)\n    create clone of (_myself_ v)\n    set [id v] to [x]\nend\n\nwhen I start as a clone\nadd (obj no) to [on screen solid-objs v]\nwait until <not <[shown levels v] contains (obj lvl)?>>\ndelete (item # of (obj no) in [on screen solid-objs v]) of [on screen solid-objs v]\ndelete this clone\n\nwhen I start as a clone\nshow\nswitch costume to (box v)\ngo to x: (((scrollx) + ((480) * ((join (letter (1) of (obj lvl)) (letter (2) of (obj lvl))) - (1)))) + (x)) y: (((scrolly) + ((360) * ((join (letter (4) of (obj lvl)) (letter (5) of (obj lvl))) - (1)))) + (y))\ncostume\n\nwhen I receive [start game v]\ndelete all of [on-screen ns-objects v]\n\nwhen I receive [check block v]\nif <<(id) = [1]> and <<touching (player v)?> and <(used?) = [0]>>> then\n    set [used? v] to [1]\nend\n\ndefine costume\nif <(id) = [1]> then\n    if <(used?) = [0]> then\n        switch costume to (block v)\n    else\n        switch costume to (empty block v)\n    end\nelse\n    if <(id) = [2]> then\n        switch costume to (locked door v)\n    else\n        if <(id) = [3]> then\n    end\nend\n\nwhen flag clicked\nset [id v] to [x]\ndelete all of [on-screen ns-objects v]\nhide\n\nwhen I receive [bad ending v]\nhide\n\n@non-solid objs\n\nwhen I receive [exit stage v]\nwait (0.3) seconds\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [scroll v]\nif <(id) = [x]> then\n    check\nelse\n    switch costume to (box v)\n    go to x: (((scrollx) + ((480) * ((join (letter (1) of (obj lvl)) (letter (2) of (obj lvl))) - (1)))) + (x)) y: (((scrolly) + ((360) * ((join (letter (4) of (obj lvl)) (letter (5) of (obj lvl))) - (1)))) + (y))\n    costume\n    if <<(id) = [1]> and <touching (player v)?>> then\n        if <(coin collected?) = [0]> then\n            if <<not <[temporary green coins v] contains (join (vari) [0])?>> and <not <[temporary green coins v] contains (join (vari) [1])?>>> then\n                add (join (vari) [0]) to [temporary green coins v]\n            end\n            start sound [unlock v]\n            start sound [galaxy chime v]\n            set [coin collected? v] to [1]\n            set [ghost v] effect to (0)\n            broadcast (update green coin counter v)\n        end\n    end\n    if <<(id) = [1]> and <(coin collected?) = [1]>> then\n        change size by (15)\n        change [ghost v] effect by (10)\n        if <(size) > [220]> then\n            delete (item # of (obj no) in [on-screen ns-objects v]) of [on-screen ns-objects v]\n            delete this clone\n        end\n    end\n    if <<<(id) = [2]> and <touching (player v)?>> and <(costume [name v]) = [checkpoint0]>> then\n        set [checkpoint v] to (obj lvl)\n        replace item (1) of [checkpoint pos v] with (x)\n        replace item (2) of [checkpoint pos v] with (y)\n        start sound [flag v]\n        if <(difficulty) = [1]> then\n            set [health v] to [4]\n        else\n            set [health v] to [3]\n        end\n        if <([x position v] of [player v]) > (x position)> then\n            point in direction (60)\n        else\n            point in direction (120)\n        end\n        if <[temporary green coins v] contains [10]?> then\n            replace item (item # of [10] in [temporary green coins v]) of [temporary green coins v] with [11]\n        end\n        if <[temporary green coins v] contains [20]?> then\n            replace item (item # of [20] in [temporary green coins v]) of [temporary green coins v] with [21]\n        end\n        if <[temporary green coins v] contains [30]?> then\n            replace item (item # of [30] in [temporary green coins v]) of [temporary green coins v] with [31]\n        end\n    end\n    if <(id) = [2]> then\n        turn right (((90) - (direction)) / (4)) degrees\n        set [current checkx v] to (x position)\n        set [current checky v] to (y position)\n    end\n    if <(id) = [3]> then\n        change [frame v] by (0.5)\n        if <(frame) > [6]> then\n            set [frame v] to [1]\n        end\n        if <(coin collected?) = [1]> then\n            change size by (15)\n            change [ghost v] effect by (10)\n            if <(size) > [220]> then\n                add (obj no) to [removed objects v]\n                delete (item # of (obj no) in [on-screen ns-objects v]) of [on-screen ns-objects v]\n                delete this clone\n            end\n        end\n    end\n    if <<touching (player v)?> and <(id) = [3]>> then\n        if <(coin collected?) = [0]> then\n            start sound [coin v]\n            change [coins v] by (1)\n            set [coin collected? v] to [1]\n        end\n    end\n    if <(id) = [4]> then\n        if <<touching (player v)?> and <(dead?) = [0]>> then\n            if <<(([y position v] of [player v]) - (y position)) > [18]> or <<(sliding?) = [1]> and <([abs v] of ([x speed v] of [player v]) ) > [3]>>> then\n                if <([y speed v] of [player v]) < [0]> then\n                    broadcast (bounce player v)\n                    start sound [smb_stomp v]\n                    set [dead? v] to [1]\n                    set [costumeno v] to [5]\n                else\n                    if <<(sliding?) = [1]> and <([abs v] of ([x speed v] of [player v]) ) > [3]>> then\n                        start sound [smb_stomp v]\n                        set [dead? v] to [1]\n                        set [costumeno v] to [5]\n                    end\n                end\n            else\n                set [knockback dir v] to ((([x position v] of [player v]) - (x position)) / ([abs v] of (([x position v] of [player v]) - (x position)) ))\n                set [playerhurt v] to [1]\n            end\n        end\n        if <(dead?) = [1]> then\n            change [costumeno v] by (1)\n            if <(costumeno) > [9]> then\n                hide\n                \n            end\n        end\n        switch costume to (join [mushroom] (costumeno))\n    end\n    if <(id) = [5]> then\n        if <touching (player v)?> then\n            if <<not <[green coins v] contains (join (level) (join [-] [1]))?>> and <<[temporary green coins v] contains [10]?> or <[temporary green coins v] contains [11]?>>> then\n                add (join (level) (join [-] [1])) to [green coins v]\n            end\n            if <<not <[green coins v] contains (join (level) (join [-] [2]))?>> and <<[temporary green coins v] contains [20]?> or <[temporary green coins v] contains [21]?>>> then\n                add (join (level) (join [-] [2])) to [green coins v]\n            end\n            if <<not <[green coins v] contains (join (level) (join [-] [3]))?>> and <<[temporary green coins v] contains [30]?> or <[temporary green coins v] contains [31]?>>> then\n                add (join (level) (join [-] [3])) to [green coins v]\n            end\n            if <not <[cleared v] contains (level)?>> then\n                add (level) to [cleared v]\n            end\n            if <(level) = [1]> then\n                if <(timer) < (☁ lvl1)> then\n                    set [☁ lvl1 v] to (timer)\n                    set [newbest v] to [1]\n                end\n            else\n                if <(level) = [2]> then\n                    if <(timer) < (☁ lvl2)> then\n                        set [☁ lvl2 v] to (timer)\n                        set [newbest v] to [1]\n                    end\n                else\n                    if <(level) = [3]> then\n                        if <(timer) < (☁ lvl3)> then\n                            set [☁ lvl3 v] to (timer)\n                            set [newbest v] to [1]\n                        end\n                    else\n                        if <(level) = [4]> then\n                            if <(timer) < (☁ lvl4)> then\n                                set [☁ lvl4 v] to (timer)\n                                set [newbest v] to [1]\n                            end\n                        end\n                    end\n                end\n            end\n            set [flagx v] to (x position)\n            set [flagy v] to (y position)\n            broadcast (goal animation v)\n            add (obj no) to [removed objects v]\n            delete (item # of (obj no) in [on-screen ns-objects v]) of [on-screen ns-objects v]\n            delete this clone\n        end\n    end\n    if <<<(id) = [6]> or <<(id) = [8]> or <(id) = [9]>>> or <<(id) = [10]> or <<(id) = [11]> or <<(id) = [12]> or <(id) = [13]>>>>> then\n        if <<touching (player v)?> and <(dead?) = [0]>> then\n            set [knockback dir v] to ((([x position v] of [player v]) - (x position)) / ([abs v] of (([x position v] of [player v]) - (x position)) ))\n            set [playerhurt v] to [1]\n        end\n    end\n    if <(id) = [7]> then\n        if <<<<touching (player v)?> and <([y speed v] of [player v]) < [0]>> and <([y position v] of [player v]) > ((y position) + (20))>> and <([abs v] of (([x position v] of [player v]) - (x position)) ) < [32]>> then\n            start sound [smw_spring_jump v]\n            broadcast (spring bounce v)\n            if <(vari) = [2]> then\n                switch costume to (fspring2 v)\n            else\n                switch costume to (spring2 v)\n            end\n        end\n    end\n    if <<(id) < [13]> and <(id) > [9]>> then\n        turn right (5) degrees\n    end\n    if <(object pos check) = [1]> then\n        say (join ((x position) + (((-480) * ((join (letter (1) of (obj lvl)) (letter (2) of (obj lvl))) - (1))) - (scrollx))) (join [,] ((y position) + (((-360) * ((join (letter (4) of (obj lvl)) (letter (5) of (obj lvl))) - (1))) - (scrolly)))))\n        if <<([abs v] of (x position) ) < [220]> and <([abs v] of (y position) ) < [160]>> then\n            set [x v] to ((x position) + (((-480) * ((join (letter (1) of (obj lvl)) (letter (2) of (obj lvl))) - (1))) - (scrollx)))\n            set [y v] to ((y position) + (((-360) * ((join (letter (4) of (obj lvl)) (letter (5) of (obj lvl))) - (1))) - (scrolly)))\n        end\n    else\n        say []\n    end\nend\n\nwhen I start as a clone\nadd (obj no) to [on-screen ns-objects v]\nwait until <not <[shown levels v] contains (obj lvl)?>>\ndelete (item # of (obj no) in [on-screen ns-objects v]) of [on-screen ns-objects v]\ndelete this clone\n\ndefine create objects lvl: (level)\nset [obj lvl v] to (level)\nif <(level) = [05-01-1]> then\n    id: [1] x: [139] y: [72] variation: [1] object no. [1]\nelse\n    if <(level) = [05-02-1]> then\n        id: [2] x: [-150] y: [-4] variation: [1] object no. [2]\n    else\n        if <(level) = [02-01-1]> then\n            id: [3] x: [-50] y: [90] variation: [1] object no. [3]\n            id: [3] x: [0] y: [90] variation: [1] object no. [4]\n        else\n            if <(level) = [03-01-1]> then\n                id: [3] x: [140] y: [20] variation: [1] object no. [5]\n            else\n                if <(level) = [04-01-1]> then\n                    id: [3] x: [0] y: [145] variation: [1] object no. [6]\n                    id: [3] x: [-40] y: [160] variation: [1] object no. [7]\n                else\n                    if <(level) = [04-02-1]> then\n                        id: [3] x: [40] y: [-45] variation: [1] object no. [8]\n                    else\n                        if <(level) = [06-02-1]> then\n                            id: [3] x: [-140] y: [-45] variation: [1] object no. [9]\n                            id: [3] x: [-60] y: [-100] variation: [1] object no. [10]\n                            id: [3] x: [20] y: [-160] variation: [1] object no. [11]\n                        else\n                            if <(level) = [06-01-1]> then\n                                id: [3] x: [100] y: [140] variation: [1] object no. [12]\n                                id: [3] x: [-30] y: [50] variation: [1] object no. [14]\n                                id: [3] x: [-150] y: [50] variation: [1] object no. [15]\n                                id: [3] x: [-90] y: [50] variation: [1] object no. [16]\n                            else\n                                if <(level) = [07-02-1]> then\n                                    id: [1] x: [80] y: [-40] variation: [2] object no. [13]\n                                else\n                                    if <(level) = [07-01-1]> then\n                                        id: [3] x: [-50] y: [20] variation: [1] object no. [17]\n                                        id: [3] x: [15] y: [20] variation: [1] object no. [18]\n                                    else\n                                        if <(level) = [08-01-1]> then\n                                            id: [3] x: [-100] y: [70] variation: [1] object no. [19]\n                                            id: [3] x: [-40] y: [70] variation: [1] object no. [20]\n                                            id: [3] x: [15] y: [70] variation: [1] object no. [21]\n                                            id: [4] x: [-40] y: [-15] variation: [1] object no. [22]\n                                            id: [2] x: [160] y: [-82] variation: [1] object no. [23]\n                                        else\n                                            if <(level) = [09-01-1]> then\n                                                id: [4] x: [40] y: [35] variation: [1] object no. [24]\n                                                id: [1] x: [-170] y: [220] variation: [3] object no. [25]\n                                                id: [3] x: [-20] y: [150] variation: [1] object no. [26]\n                                                id: [3] x: [40] y: [150] variation: [1] object no. [27]\n                                                id: [3] x: [100] y: [150] variation: [1] object no. [29]\n                                                id: [3] x: [198] y: [90] variation: [1] object no. [30]\n                                            else\n                                                if <(level) = [10-01-1]> then\n                                                    id: [3] x: [-102] y: [30] variation: [1] object no. [31]\n                                                    id: [3] x: [79] y: [-30] variation: [1] object no. [32]\n                                                    id: [3] x: [195] y: [30] variation: [1] object no. [33]\n                                                else\n                                                    if <(level) = [11-01-1]> then\n                                                        id: [4] x: [40] y: [-15] variation: [1] object no. [34]\n                                                    else\n                                                        if <(level) = [12-01-1]> then\n                                                            id: [5] x: [80] y: [15] variation: [1] object no. [35]\n                                                        end\n                                                    end\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nif <(level) = [02-01-2]> then\n    id: [3] x: [-165] y: [180] variation: [1] object no. [1]\n    id: [3] x: [-165] y: [120] variation: [1] object no. [2]\n    id: [3] x: [165] y: [180] variation: [1] object no. [3]\n    id: [3] x: [165] y: [120] variation: [1] object no. [4]\nelse\n    if <(level) = [02-02-2]> then\n        id: [3] x: [-165] y: [-120] variation: [1] object no. [5]\n        id: [3] x: [165] y: [-120] variation: [1] object no. [6]\n    else\n        if <(level) = [02-03-2]> then\n            id: [1] x: [0] y: [-120] variation: [1] object no. [7]\n        else\n            if <(level) = [03-02-2]> then\n                id: [4] x: [100] y: [38] variation: [1] object no. [15]\n                id: [4] x: [-150] y: [120] variation: [1] object no. [16]\n            else\n                if <(level) = [03-03-2]> then\n                    id: [4] x: [100] y: [-155] variation: [1] object no. [17]\n                else\n                    if <(level) = [04-01-2]> then\n                        id: [2] x: [-148] y: [18] variation: [1] object no. [8]\n                        id: [6] x: [130] y: [80] variation: [1] object no. [14]\n                    else\n                        if <(level) = [04-02-2]> then\n                            id: [3] x: [-130] y: [140] variation: [1] object no. [9]\n                            id: [3] x: [-130] y: [70] variation: [1] object no. [10]\n                            id: [3] x: [-130] y: [0] variation: [1] object no. [11]\n                            id: [3] x: [-130] y: [-70] variation: [1] object no. [12]\n                            id: [3] x: [-130] y: [-140] variation: [1] object no. [13]\n                        else\n                            if <(level) = [05-01-2]> then\n                                id: [6] x: [0] y: [0] variation: [1] object no. [18]\n                                id: [6] x: [160] y: [-80] variation: [1] object no. [19]\n                                id: [3] x: [80] y: [-40] variation: [1] object no. [20]\n                                id: [3] x: [-160] y: [80] variation: [1] object no. [21]\n                            else\n                                if <(level) = [06-01-2]> then\n                                    id: [6] x: [-120] y: [-140] variation: [1] object no. [22]\n                                    id: [6] x: [0] y: [40] variation: [1] object no. [23]\n                                    id: [6] x: [70] y: [-20] variation: [1] object no. [24]\n                                    id: [3] x: [-80] y: [-20] variation: [1] object no. [28]\n                                    id: [3] x: [0] y: [-60] variation: [1] object no. [29]\n                                    id: [3] x: [90] y: [-100] variation: [1] object no. [30]\n                                    id: [3] x: [200] y: [-10] variation: [1] object no. [31]\n                                else\n                                    if <(level) = [07-01-2]> then\n                                        id: [6] x: [-220] y: [-140] variation: [1] object no. [25]\n                                        id: [6] x: [-150] y: [30] variation: [1] object no. [26]\n                                        id: [2] x: [0] y: [-112] variation: [1] object no. [27]\n                                        id: [6] x: [-40] y: [80] variation: [2] object no. [32]\n                                        id: [6] x: [190] y: [80] variation: [2] object no. [33]\n                                        id: [3] x: [75] y: [80] variation: [1] object no. [34]\n                                    else\n                                        if <(level) = [07-02-2]> then\n                                            id: [6] x: [75] y: [-100] variation: [2] object no. [35]\n                                            id: [3] x: [-40] y: [-100] variation: [1] object no. [36]\n                                            id: [3] x: [190] y: [-100] variation: [1] object no. [37]\n                                            id: [9] x: [-40] y: [80] variation: [1] object no. [38]\n                                            id: [9] x: [190] y: [80] variation: [1] object no. [39]\n                                            id: [3] x: [75] y: [100] variation: [1] object no. [40]\n                                        else\n                                            if <(level) = [07-03-2]> then\n                                                id: [1] x: [-40] y: [-100] variation: [2] object no. [41]\n                                            else\n                                                if <(level) = [08-02-2]> then\n                                                    id: [3] x: [85] y: [100] variation: [1] object no. [47]\n                                                    id: [9] x: [180] y: [80] variation: [1] object no. [46]\n                                                    id: [9] x: [-10] y: [80] variation: [1] object no. [45]\n                                                    id: [3] x: [180] y: [-100] variation: [1] object no. [44]\n                                                    id: [3] x: [-10] y: [-100] variation: [1] object no. [43]\n                                                    id: [8] x: [85] y: [-100] variation: [2] object no. [42]\n                                                else\n                                                    if <(level) = [08-01-2]> then\n                                                        id: [3] x: [85] y: [100] variation: [1] object no. [52]\n                                                        id: [6] x: [180] y: [100] variation: [2] object no. [51]\n                                                        id: [6] x: [-10] y: [100] variation: [2] object no. [50]\n                                                        id: [8] x: [25] y: [-90] variation: [1] object no. [53]\n                                                        id: [8] x: [125] y: [-90] variation: [1] object no. [54]\n                                                        id: [3] x: [200] y: [0] variation: [1] object no. [55]\n                                                        id: [1] x: [-100] y: [-100] variation: [3] object no. [56]\n                                                    else\n                                                        if <(level) = [10-01-2]> then\n                                                            id: [5] x: [100] y: [-15] variation: [3] object no. [57]\n                                                        end\n                                                    end\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nif <(level) = [01-01-3]> then\n    id: [3] x: [-60] y: [55] variation: [1] object no. [4]\n    id: [3] x: [62] y: [142] variation: [1] object no. [5]\n    id: [3] x: [170] y: [190] variation: [1] object no. [6]\nelse\n    if <(level) = [02-01-3]> then\n        id: [7] x: [194] y: [100] variation: [1] object no. [1]\n        id: [1] x: [120] y: [90] variation: [1] object no. [2]\n    else\n        if <(level) = [02-02-3]> then\n            id: [7] x: [48] y: [-53] variation: [1] object no. [3]\n            id: [3] x: [-203] y: [-118] variation: [1] object no. [8]\n            id: [3] x: [-99] y: [-72] variation: [1] object no. [9]\n            id: [3] x: [-140] y: [200] variation: [1] object no. [10]\n            id: [3] x: [-40] y: [152] variation: [1] object no. [11]\n        else\n            if <(level) = [01-03-3]> then\n                id: [4] x: [140] y: [-111] variation: [1] object no. [12]\n                id: [7] x: [-113] y: [-50] variation: [1] object no. [13]\n                id: [7] x: [41] y: [89] variation: [1] object no. [14]\n                id: [7] x: [197] y: [159] variation: [1] object no. [15]\n                id: [3] x: [-113] y: [50] variation: [1] object no. [16]\n                id: [3] x: [41] y: [190] variation: [1] object no. [17]\n                id: [2] x: [-164] y: [-64] variation: [1] object no. [19]\n            else\n                if <(level) = [01-04-3]> then\n                    id: [1] x: [-200] y: [-40] variation: [2] object no. [21]\n                    id: [3] x: [197] y: [-100] variation: [1] object no. [18]\n                    id: [7] x: [86] y: [160] variation: [1] object no. [24]\n                    id: [3] x: [86] y: ((160) + (80)) variation: [1] object no. [28]\n                else\n                    if <(level) = [02-04-3]> then\n                        id: [4] x: [135] y: [4] variation: [1] object no. [20]\n                        id: [4] x: [-155] y: [152] variation: [1] object no. [22]\n                        id: [3] x: [-26] y: [111] variation: [1] object no. [23]\n                    else\n                        if <(level) = [01-05-3]> then\n                            id: [7] x: [-33] y: [-21] variation: [1] object no. [25]\n                            id: [7] x: [179] y: [123] variation: [1] object no. [26]\n                            id: [3] x: [-33] y: ((-21) + (80)) variation: [1] object no. [27]\n                            id: [3] x: [179] y: ((123) + (80)) variation: [1] object no. [29]\n                        else\n                            if <(level) = [02-05-3]> then\n                                id: [7] x: [-53] y: [94] variation: [1] object no. [30]\n                                id: [3] x: [-53] y: ((94) + (80)) variation: [1] object no. [31]\n                            else\n                                if <(level) = [02-06-3]> then\n                                    id: [2] x: [104] y: [-126] variation: [1] object no. [32]\n                                    id: [7] x: [-7] y: [95] variation: [1] object no. [33]\n                                    id: [3] x: [-7] y: ((95) + (80)) variation: [1] object no. [43]\n                                else\n                                    if <(level) = [02-07-3]> then\n                                        id: [7] x: [-174] y: [-116] variation: [1] object no. [34]\n                                        id: [10] x: [-91] y: [-180] variation: [1] object no. [35]\n                                        id: [3] x: [-174] y: ((-116) + (80)) variation: [1] object no. [44]\n                                    else\n                                        if <(level) = [01-07-3]> then\n                                            id: [7] x: [91] y: [-116] variation: [1] object no. [36]\n                                            id: [10] x: [204] y: [-35] variation: [1] object no. [37]\n                                            id: [7] x: [-88] y: [-42] variation: [1] object no. [38]\n                                            id: [10] x: [-10] y: [-35] variation: [1] object no. [39]\n                                            id: [7] x: [64] y: [54] variation: [2] object no. [40]\n                                            id: [7] x: [200] y: [160] variation: [2] object no. [41]\n                                            id: [10] x: [129] y: [160] variation: [1] object no. [42]\n                                            id: [3] x: [91] y: ((-116) + (80)) variation: [1] object no. [45]\n                                            id: [3] x: [-88] y: ((-42) + (80)) variation: [1] object no. [46]\n                                            id: [3] x: [64] y: ((54) + (80)) variation: [2] object no. [47]\n                                            id: [3] x: [200] y: ((160) + (80)) variation: [2] object no. [48]\n                                        else\n                                            if <(level) = [02-08-3]> then\n                                                id: [2] x: [-138] y: [-111] variation: [1] object no. [49]\n                                                id: [7] x: [-11] y: [-97] variation: [1] object no. [50]\n                                                id: [7] x: [98] y: [26] variation: [2] object no. [51]\n                                                id: [11] x: [150] y: [90] variation: [1] object no. [53]\n                                                id: [7] x: [-30] y: [180] variation: [1] object no. [54]\n                                            else\n                                                if <(level) = [02-09-3]> then\n                                                    id: [12] x: [76] y: [-120] variation: [1] object no. [55]\n                                                    id: [7] x: [-200] y: [-70] variation: [2] object no. [56]\n                                                    id: [12] x: [-130] y: [-120] variation: [1] object no. [57]\n                                                    id: [1] x: [200] y: [160] variation: [3] object no. [64]\n                                                    id: [7] x: [200] y: [-70] variation: [2] object no. [52]\n                                                    id: [11] x: [200] y: [100] variation: [1] object no. [65]\n                                                    id: [3] x: [-200] y: ((-70) + (80)) variation: [2] object no. [66]\n                                                else\n                                                    if <(level) = [01-09-3]> then\n                                                        id: [3] x: [150] y: ((-70) + (80)) variation: [2] object no. [67]\n                                                        id: [3] x: [10] y: ((-70) + (80)) variation: [2] object no. [68]\n                                                        id: [12] x: [215] y: [-80] variation: [1] object no. [60]\n                                                        id: [7] x: [150] y: [-70] variation: [2] object no. [58]\n                                                        id: [7] x: [10] y: [-70] variation: [2] object no. [59]\n                                                        id: [12] x: [80] y: [-80] variation: [1] object no. [61]\n                                                        id: [7] x: [-123] y: [-125] variation: [1] object no. [62]\n                                                        id: [7] x: [-185] y: [40] variation: [2] object no. [63]\n                                                        id: [7] x: [179] y: [167] variation: [1] object no. [69]\n                                                        id: [4] x: [50] y: [175] variation: [1] object no. [71]\n                                                    else\n                                                        if <(level) = [01-10-3]> then\n                                                            id: [3] x: [179] y: [-105] variation: [1] object no. [70]\n                                                        else\n                                                            if <(level) = [02-10-3]> then\n                                                                id: [5] x: [110] y: [15] variation: [1] object no. [72]\n                                                            end\n                                                        end\n                                                    end\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nif <(level) = [01-02-4]> then\n    id: [4] x: [35] y: [-69] variation: [2] object no. [2]\n    id: [4] x: [152] y: [-122] variation: [2] object no. [3]\nelse\n    if <(level) = [02-01-4]> then\n        id: [4] x: [-193] y: [187] variation: [2] object no. [4]\n        id: [4] x: [-76] y: [134] variation: [2] object no. [5]\n        id: [4] x: [68] y: [77] variation: [2] object no. [7]\n        id: [4] x: [193] y: [18] variation: [2] object no. [6]\n    else\n        if <(level) = [03-01-4]> then\n            id: [2] x: [-38] y: [-82] variation: [2] object no. [1]\n        else\n            if <(level) = [04-01-4]> then\n                id: [3] x: [-190] y: [55] variation: [1] object no. [8]\n                id: [3] x: [3] y: [117] variation: [1] object no. [9]\n                id: [3] x: [105] y: [21] variation: [1] object no. [10]\n                id: [3] x: [105] y: [-40] variation: [1] object no. [11]\n            else\n                if <(level) = [05-01-4]> then\n                    id: [1] x: [-202] y: [138] variation: [1] object no. [7]\n                    id: [3] x: [-101] y: [24] variation: [1] object no. [12]\n                    id: [4] x: [120] y: [-58] variation: [1] object no. [13]\n                else\n                    if <(level) = [06-01-4]> then\n                        id: [2] x: [-204] y: [-82] variation: [1] object no. [14]\n                        id: [3] x: [24] y: [-78] variation: [2] object no. [16]\n                        id: [3] x: [204] y: [-6] variation: [2] object no. [17]\n                    else\n                        if <(level) = [07-01-4]> then\n                            id: [1] x: [-55] y: [-65] variation: [2] object no. [15]\n                            id: [3] x: [96] y: [30] variation: [2] object no. [19]\n                        else\n                            if <(level) = [08-01-4]> then\n                                id: [13] x: [-30] y: [0] variation: [2] object no. [18]\n                                id: [3] x: [-155] y: [-81] variation: [2] object no. [20]\n                                id: [3] x: [84] y: [-81] variation: [2] object no. [21]\n                            else\n                                if <(level) = [09-01-4]> then\n                                    id: [2] x: [-189] y: [-83] variation: [2] object no. [22]\n                                    id: [13] x: [182] y: [0] variation: [2] object no. [23]\n                                    id: [3] x: [82] y: [-80] variation: [2] object no. [25]\n                                else\n                                    if <(level) = [10-01-4]> then\n                                        id: [13] x: [-80] y: [30] variation: [2] object no. [24]\n                                        id: [3] x: [-201] y: [-7] variation: [2] object no. [26]\n                                        id: [3] x: [-80] y: [60] variation: [2] object no. [27]\n                                        id: [3] x: [38] y: [-7] variation: [2] object no. [28]\n                                        id: [13] x: [160] y: [60] variation: [2] object no. [30]\n                                        id: [3] x: [160] y: [60] variation: [2] object no. [31]\n                                    else\n                                        if <(level) = [11-01-4]> then\n                                            id: [3] x: [-204] y: [-7] variation: [2] object no. [29]\n                                            id: [13] x: [0] y: [-35] variation: [2] object no. [32]\n                                            id: [13] x: [180] y: [-35] variation: [2] object no. [33]\n                                        else\n                                            if <(level) = [12-01-4]> then\n                                                id: [2] x: [-204] y: [-83] variation: [2] object no. [34]\n                                                id: [3] x: [7] y: [14] variation: [2] object no. [42]\n                                                id: [3] x: [158] y: [86] variation: [2] object no. [43]\n                                            else\n                                                if <(level) = [13-01-4]> then\n                                                    id: [3] x: [-126] y: [-8] variation: [2] object no. [44]\n                                                    id: [3] x: [83] y: [-81] variation: [2] object no. [45]\n                                                else\n                                                    if <(level) = [14-01-4]> then\n                                                        id: [3] x: [-201] y: [-8] variation: [2] object no. [46]\n                                                        id: [3] x: [69] y: [-8] variation: [2] object no. [47]\n                                                        id: [3] x: [205] y: [65] variation: [2] object no. [48]\n                                                    else\n                                                        if <(level) = [15-01-4]> then\n                                                            id: [3] x: [96] y: [33] variation: [2] object no. [49]\n                                                        else\n                                                            if <(level) = [16-01-4]> then\n                                                                id: [7] x: [-130] y: [-88] variation: [1] object no. [35]\n                                                                id: [1] x: [-201] y: [135] variation: [3] object no. [36]\n                                                                id: [13] x: [65] y: [90] variation: [3] object no. [37]\n                                                                id: [3] x: [186] y: [-8] variation: [2] object no. [50]\n                                                            else\n                                                                if <(level) = [17-01-4]> then\n                                                                    id: [13] x: [-170] y: [0] variation: [3] object no. [38]\n                                                                    id: [13] x: [65] y: [40] variation: [3] object no. [39]\n                                                                    id: [3] x: [-52] y: [-8] variation: [2] object no. [51]\n                                                                    id: [3] x: [174] y: [-64] variation: [2] object no. [52]\n                                                                else\n                                                                    if <(level) = [18-01-4]> then\n                                                                        id: [13] x: [-205] y: [0] variation: [2] object no. [40]\n                                                                    else\n                                                                        if <(level) = [19-01-4]> then\n                                                                            id: [5] x: [100] y: [15] variation: [2] object no. [41]\n                                                                            id: [3] x: [-150] y: [-60] variation: [2] object no. [53]\n                                                                            id: [3] x: [-75] y: [-60] variation: [2] object no. [54]\n                                                                            id: [3] x: [0] y: [-60] variation: [2] object no. [55]\n                                                                        end\n                                                                    end\n                                                                end\n                                                            end\n                                                        end\n                                                    end\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine id: (id) x: (x pos) y: (y pos) variation: (vari) object no. (obj no)\nif <<<not <[on-screen ns-objects v] contains (obj no)?>> and <[shown levels v] contains (obj lvl)?>> and <not <[removed objects v] contains (obj no)?>>> then\n    if <not <<<(difficulty) = [3]> and <(id) = [2]>> and <(vari) = [1]>>> then\n        set [obj no v] to (obj no)\n        set [vari v] to (vari)\n        set [id v] to (id)\n        set [x v] to (x pos)\n        set [y v] to (y pos)\n        create clone of (_myself_ v)\n        set [id v] to [x]\n    end\nend\n\nwhen I start as a clone\npoint in direction (90)\nset [can jump? v] to [0]\nset [dead? v] to [0]\nset [x speed v] to [0]\nset [y speed v] to [0]\nset [orignal x v] to (x)\nset [original y v] to (y)\nset [frame v] to [1]\nset [costumeno v] to [1]\nswitch costume to (box v)\ngo to x: (((scrollx) + ((480) * ((join (letter (1) of (obj lvl)) (letter (2) of (obj lvl))) - (1)))) + (x)) y: (((scrolly) + ((360) * ((join (letter (4) of (obj lvl)) (letter (5) of (obj lvl))) - (1)))) + (y))\ncostume\nshow\n\ndefine costume\nif <(id) = [1]> then\n    if <(coin collected?) = [1]> then\n        switch costume to (green coin end v)\n    else\n        if <<[green coins v] contains (join (level) (join [-] (vari)))?> or <<[temporary green coins v] contains (join (vari) [0])?> or <[temporary green coins v] contains (join (vari) [1])?>>> then\n            switch costume to (green coin2 v)\n            set [ghost v] effect to (50)\n        else\n            switch costume to (green coin v)\n            set [ghost v] effect to (0)\n        end\n    end\nelse\n    if <(id) = [2]> then\n        if <(obj lvl) = (checkpoint)> then\n            switch costume to (checkpoint1 v)\n        else\n            switch costume to (checkpoint0 v)\n        end\n    else\n        if <(id) = [3]> then\n            if <(coin collected?) = [1]> then\n                switch costume to (coin end v)\n            else\n                switch costume to (join [coin] (round (frame)))\n                if <(level) > [4]> then\n                    set [level v] to [4]\n                end\n            end\n        else\n            if <(id) = [4]> then\n                switch costume to (mushroom1 v)\n            else\n                if <(id) = [5]> then\n                    switch costume to (goalflag1 v)\n                else\n                    if <(id) = [6]> then\n                        switch costume to (spikeball v)\n                        set size to ((100) * ((0.5) + ((vari) / (2)))) %\n                    else\n                        if <(id) = [7]> then\n                            if <(vari) = [2]> then\n                                switch costume to (fspring v)\n                            else\n                                switch costume to (spring v)\n                            end\n                        else\n                            if <(id) = [8]> then\n                                switch costume to (spikeballhor v)\n                                set size to ((100) * ((0.5) + ((vari) / (2)))) %\n                            else\n                                if <(id) = [9]> then\n                                    switch costume to (spikeballver v)\n                                    set size to ((100) * ((0.5) + ((vari) / (2)))) %\n                                else\n                                    if <(id) = [10]> then\n                                        switch costume to (saw v)\n                                        set size to ((100) * ((0.5) + ((vari) / (2)))) %\n                                    else\n                                        if <(id) = [11]> then\n                                            switch costume to (sawhor v)\n                                            set size to ((100) * ((0.5) + ((vari) / (2)))) %\n                                        else\n                                            if <(id) = [12]> then\n                                                switch costume to (sawver v)\n                                                set size to ((100) * ((0.5) + ((vari) / (2)))) %\n                                            else\n                                                if <(id) = [13]> then\n                                                    switch costume to (fireball v)\n                                                    set size to ((100) * ((0.5) + ((vari) / (2)))) %\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <<<(id) = [1]> or <(id) = [6]>> or <<(id) = [8]> or <(id) = [9]>>> then\n    set [move v] to [0]\n    forever\n        change [move v] by (6)\n        change [y v] by (([sin v] of (move) ) / (2))\n        if <(id) = [1]> then\n            change [brightness v] effect by (([sin v] of (move) ) / (2))\n        end\n    end\nend\n\nwhen flag clicked\nset [coins v] to [0]\nset [id v] to [x]\nset [object pos check v] to [0]\nset [coin collected? v] to [0]\ndelete all of [on screen solid-objs v]\ndelete all of [removed objects v]\ndelete all of [temporary green coins v]\nhide\n\ndefine check\nset [count v] to [0]\nrepeat (length of [shown levels v])\n    change [count v] by (1)\n    create objects lvl: (item (count) of [shown levels v])\nend\n\nwhen I receive [start game v]\nset [object pos check v] to [0]\nset [coins v] to [0]\ndelete all of [on screen solid-objs v]\ndelete all of [removed objects v]\ndelete all of [temporary green coins v]\n\nwhen [b v] key pressed\nif <(username) = [ToadfanSchool]> then\n    delete (item # of (obj no) in [on-screen ns-objects v]) of [on-screen ns-objects v]\n    delete this clone\nend\n\nwhen I start as a clone\nset [costumeno v] to [1]\nif <<(id) = [4]> and <not <(vari) = [2]>>> then\n    forever\n        wait (0.02) seconds\n        if <(dead?) = [1]> then\n            stop [this script v]\n        end\n        change [costumeno v] by (1)\n        if <(costumeno) > [5]> then\n            set [costumeno v] to [1]\n        end\n        wait until <(pause) = [0]>\n        if <(dead?) = [1]> then\n            stop [this script v]\n        end\n    end\nend\n\nwhen I start as a clone\nif <<(id) = [4]> and <not <(vari) = [2]>>> then\n    set [costumeno v] to [1]\n    set rotation style [left-right v]\n    point in direction (90)\n    forever\n        if <(dead?) = [1]> then\n            stop [this script v]\n        end\n        set [x v] to (orignal x)\n        repeat (18)\n            if <(dead?) = [1]> then\n                stop [this script v]\n            end\n            change [x v] by (3)\n            wait until <(pause) = [0]>\n        end\n        point in direction (-90)\n        repeat (36)\n            if <(dead?) = [1]> then\n                stop [this script v]\n            end\n            change [x v] by (-3)\n            wait until <(pause) = [0]>\n        end\n        point in direction (90)\n        repeat (18)\n            if <(dead?) = [1]> then\n                stop [this script v]\n            end\n            change [x v] by (3)\n            wait until <(pause) = [0]>\n        end\n    end\nend\n\nwhen [x v] key pressed\nif <(username) = [ToadfanSchool]> then\n    delete all of [removed objects v]\nend\n\nwhen I start as a clone\nif <(id) = [1]> then\n    if <<[temporary green coins v] contains (join (vari) [0])?> or <[temporary green coins v] contains (join (vari) [1])?>> then\n        delete (item # of (obj no) in [on-screen ns-objects v]) of [on-screen ns-objects v]\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nif <(id) = [1]> then\n    set volume to (0) %\n    forever\n        wait until <(distance to [player v]) < [340]>\n        play sound [shine v] until done\n    end\nend\n\nwhen I start as a clone\nif <(id) = [1]> then\n    set volume to (0) %\n    forever\n        set volume to (((100) - ((distance to [player v]) / (3.4))) / (1.5)) %\n        set [pan left/right v] effect to (((x position) - ([x position v] of [player v])) / (5))\n    end\nend\n\nwhen I start as a clone\nif <<<(id) = [8]> or <(id) = [9]>> or <<(id) = [11]> or <(id) = [12]>>> then\n    forever\n        if <(dead?) = [1]> then\n            stop [this script v]\n        end\n        set [x v] to (orignal x)\n        set [y v] to (original y)\n        repeat (30)\n            if <(dead?) = [1]> then\n                stop [this script v]\n            end\n            if <<(id) = [8]> or <(id) = [11]>> then\n                change [x v] by (2)\n            else\n                change [y v] by (2)\n            end\n            wait until <(pause) = [0]>\n        end\n        repeat (60)\n            if <(dead?) = [1]> then\n                stop [this script v]\n            end\n            if <<(id) = [8]> or <(id) = [11]>> then\n                change [x v] by (-2)\n            else\n                change [y v] by (-2)\n            end\n            wait until <(pause) = [0]>\n        end\n        repeat (30)\n            if <(dead?) = [1]> then\n                stop [this script v]\n            end\n            if <<(id) = [8]> or <(id) = [11]>> then\n                change [x v] by (2)\n            else\n                change [y v] by (2)\n            end\n            wait until <(pause) = [0]>\n        end\n    end\nend\n\nwhen I receive [start game v]\nif <<(id) = [x]> and <(username) = [ToadfanSchool]>> then\n    forever\n        wait until <key (q v) pressed?>\n        set [object pos check v] to [1]\n        start sound [smb_stomp v]\n        wait until <not <key (q v) pressed?>>\n        wait until <key (q v) pressed?>\n        set [object pos check v] to [0]\n        start sound [smb_stomp v]\n        wait until <not <key (q v) pressed?>>\n    end\nend\n\nwhen I start as a clone\nif <(id) = [13]> then\n    set [x v] to (orignal x)\n    set [y v] to (original y)\n    forever\n        point in direction (-90)\n        set [y speed v] to [0]\n        repeat until <(y) < [-160]>\n            change [y speed v] by (-0.5)\n            change [y v] by (y speed)\n            wait until <(pause) = [0]>\n        end\n        point in direction (90)\n        if <([abs v] of (x position) ) < [240]> then\n            start sound [Splash v]\n        end\n        repeat until <(y) > ((original y) - (5))>\n            change [y v] by (((original y) - (y)) / (10))\n            wait until <(pause) = [0]>\n        end\n    end\nend\n\nset [scrollx v] to ((-480) * (10.6))\n\nwhen I receive [bad ending v]\nhide\n\n@water\n\nwhen I receive [exit stage v]\nwait (0.3) seconds\nstop [other scripts in sprite v]\nhide\nset [underwater? v] to [0]\nset volume to (0) %\ndelete this clone\n\nwhen flag clicked\nset [watery v] to [40]\nset volume to (0) %\nset [underwater? v] to [0]\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [scroll v]\nif <(level) = [2]> then\n    set y to ((scrolly) + (waterY))\n    if <(y position) > [40]> then\n        set y to (40)\n    end\n    if <<([y position v] of [player v]) < ((y position) + (185))> and <(music) = [4]>> then\n        set [underwater? v] to [1]\n    else\n        set [underwater? v] to [0]\n    end\nend\n\nwhen I receive [start game v]\nif <(level) = [2]> then\n    set [ghost v] effect to (50)\n    show\n    wait (0.5) seconds\n    forever\n        play sound [underwater v] until done\n    end\nend\n\nwhen I receive [start game v]\nif <(level) = [2]> then\n    forever\n        set volume to (0) %\n        wait until <(underwater?) = [1]>\n        set volume to (90) %\n        wait until <(underwater?) = [0]>\n        set volume to (0) %\n    end\nend\n\nwhen I receive [start game v]\nif <(level) = [2]> then\n    set [watery v] to [40]\n    wait (0.5) seconds\n    forever\n        if <(scrollx) < [-3750]> then\n            change [watery v] by (((-340) - (waterY)) / (20))\n        else\n            if <(scrollx) < [-2185]> then\n                if <(waterY) < [320]> then\n                    change [watery v] by (20)\n                else\n                    set [watery v] to [320]\n                end\n            else\n                set [watery v] to [40]\n            end\n        end\n    end\nend\n\nwhen I receive [bad ending v]\nhide\n\n@logo\n\nwhen I receive [world map v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [end intro v]\nswitch costume to (costume1 v)\nset [scrollx v] to [0]\nset [scrolly v] to [0]\nshow\ngo to x: (0) y: (229)\nset [logo y v] to [0]\nforever\n    change [logo y v] by (-1)\n    change y by (logo y)\n    if <(y position) < [40]> then\n        set [logo y v] to ((logo y) / (-2))\n        set y to (40)\n    end\n    broadcast (scroll v)\n    change [scrollx v] by (-2)\nend\n\nwhen flag clicked\nhide\n\n@fade\n\nwhen I receive [leave title v]\nstop [other scripts in sprite v]\ngo to [front v] layer\nshow\nset [ghost v] effect to (75)\nset y to (345)\nrepeat (20)\n    change y by (((0) - (y position)) / (4))\nend\nset y to (0)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nwait (0.25) seconds\nbroadcast (world map v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [select level v]\nwait (1) seconds\nstop [other scripts in sprite v]\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nwait (0.25) seconds\nbroadcast (start game v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\n\nwhen I receive [exit stage v]\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (0.25) seconds\nbroadcast (world map v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\n\nwhen I receive [bad ending v]\nhide\n\n@map bg\n\nwhen flag clicked\nhide\n\nwhen I receive [world map v]\n\nshow\ngo to [back v] layer\nswitch costume to (backdrop1 v)\nset size to (100) %\nswitch costume to (lines v)\nset [ghost v] effect to (92)\nforever\n    go to x: (0) y: (0)\n    repeat (201)\n        change x by (0.5)\n    end\nend\n\nwhen I receive [start game v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@hud\n\nwhen I receive [exit stage v]\nwait (0.3) seconds\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [start game v]\ncreate clone of (_myself_ v)\ngo to x: (-193) y: (134)\nshow\nset [health timer v] to [0]\nforever\n    switch costume to (join (join (health) (difficulty)) [])\n    change [health timer v] by (1)\n    if <(health timer) > [79]> then\n        if <not <(health) = [1]>> then\n            change x by (-5)\n        end\n        set [health timer v] to [80]\n    else\n        change x by (((-193) - (x position)) / (2))\n    end\n    set [ghost v] effect to (((-193) - (x position)) * (2))\n    change size by (((100) - (size)) / (4))\n    if <not <(health) = (old health)>> then\n        set [health timer v] to [0]\n        set size to (125) %\n        set x to (-193)\n    end\n    set [old health v] to (health)\nend\n\nset [health v] to [4]\n\nset [health v] to [3]\n\nset [health v] to [2]\n\nset [health v] to [1]\n\nwhen I receive [goal animation v]\nstop [other scripts in sprite v]\nhide\n\nwhen I start as a clone\nswitch costume to (coinbg v)\nset size to (100) %\nset [health timer v] to [80]\nset [old health v] to [0]\nset x to (250)\nshow\nforever\n    change [health timer v] by (1)\n    if <(health timer) > [79]> then\n        change x by (5)\n        set [health timer v] to [80]\n    else\n        change x by (((193) - (x position)) / (2))\n    end\n    set [ghost v] effect to (((193) - (x position)) * (-2))\n    if <not <(coins) = (old health)>> then\n        set [health timer v] to [0]\n        set x to (193)\n    end\n    set [old health v] to (coins)\nend\n\n@level bg\n\nwhen [z v] key pressed\nif <(username) = [ToadfanSchool]> then\n    if <[1] = [1]> then\n        delete this clone\n    end\n    clone\n    set [id v] to [x]\nend\n\nwhen I receive [exit stage v]\nwait (0.3) seconds\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [scroll v]\nif <not <(id) = [x]>> then\n    switch costume to (box v)\n    go to x: ((scrollx) + ((480) * ((join (letter (1) of (id)) (letter (2) of (id))) - (1)))) y: ((scrolly) + ((360) * ((join (letter (4) of (id)) (letter (5) of (id))) - (1))))\n    switch costume to (id)\n    if <<([abs v] of (x position) ) > [479]> or <([abs v] of (y position) ) > [359]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen flag clicked\nset [id v] to [x]\nhide\n\ndefine clone\nif <(level) = [1]> then\n    set [id v] to [01-01-1]\n    create clone of (_myself_ v)\n    set [id v] to [02-01-1]\n    create clone of (_myself_ v)\n    set [id v] to [03-01-1]\n    create clone of (_myself_ v)\n    set [id v] to [04-01-1]\n    create clone of (_myself_ v)\n    set [id v] to [05-02-1]\n    create clone of (_myself_ v)\n    set [id v] to [05-01-1]\n    create clone of (_myself_ v)\n    set [id v] to [06-01-1]\n    create clone of (_myself_ v)\n    set [id v] to [06-02-1]\n    create clone of (_myself_ v)\n    set [id v] to [07-02-1]\n    create clone of (_myself_ v)\nelse\n    if <(level) = [2]> then\n        set [id v] to [01-02-2]\n        create clone of (_myself_ v)\n        set [id v] to [02-01-2]\n        create clone of (_myself_ v)\n        set [id v] to [03-03-2]\n        create clone of (_myself_ v)\n        set [id v] to [07-01-2]\n        create clone of (_myself_ v)\n        set [id v] to [08-03-2]\n        create clone of (_myself_ v)\n        set [id v] to [09-01-2]\n        create clone of (_myself_ v)\n    else\n        if <(level) = [3]> then\n            set [id v] to [01-01-3]\n            create clone of (_myself_ v)\n            set [id v] to [02-06-3]\n            create clone of (_myself_ v)\n            set [id v] to [01-08-3]\n            create clone of (_myself_ v)\n        else\n            if <(level) = [4]> then\n                set [id v] to [03-01-4]\n                create clone of (_myself_ v)\n            end\n        end\n    end\nend\n\nwhen I receive [start game v]\nif <(id) = [x]> then\n    clone\n    set [id v] to [x]\nend\n\n@mobile controls\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset all zero\nhide\n\nwhen I receive [start game v]\nset all zero\nforever\n    set all zero\n    if <<mouse down?> and <(pause) = [0]>> then\n        if <(mouse x) > [80]> then\n            set [0right mobile v] to [1]\n        else\n            if <(mouse x) < [-80]> then\n                set [0left mobile v] to [1]\n            end\n        end\n        if <(mouse y) > [60]> then\n            set [0up mobile v] to [1]\n        else\n            if <(mouse y) < [-60]> then\n                set [0down mobile v] to [1]\n            end\n        end\n        if <<(mouse x) < [-80]> and <(mouse y) < [-60]>> then\n            set [pause v] to [1]\n            broadcast (toggle pause v)\n        end\n    else\n        set all zero\n    end\n    if <(pause) = [0]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [exit stage v]\nstop [other scripts in sprite v]\nhide\n\ndefine set all zero\nset [0up mobile v] to [0]\nset [0down mobile v] to [0]\nset [0left mobile v] to [0]\nset [0right mobile v] to [0]\n\nwhen I receive [start game v]\nset [ghost v] effect to (100)\nshow\nforever\n    wait until <mouse down?>\n    if <(pause) = [0]> then\n        set [ghost v] effect to (60)\n        show\n        wait until <not <mouse down?>>\n        wait (2) seconds\n        if <not <mouse down?>> then\n            repeat (20)\n                if <not <mouse down?>> then\n                    change [ghost v] effect by (2)\n                else\n                    set [ghost v] effect to (60)\n                end\n            end\n        end\n        if <mouse down?> then\n            set [ghost v] effect to (60)\n        else\n            set [ghost v] effect to (100)\n        end\n    end\nend\n\nwhen I receive [goal animation v]\nstop [other scripts in sprite v]\nrepeat (20)\n    change [ghost v] effect by (2)\nend\nset [ghost v] effect to (0)\nhide\n\nwhen [c v] key pressed\nif <(username) = [ToadfanSchool]> then\n    stop [other scripts in sprite v]\n    hide\nend\n\n@pause\n\nwhen I receive [exit stage v]\nwait (0.3) seconds\nstop [other scripts in sprite v]\nset [pause v] to [0]\nhide\ndelete this clone\n\nwhen I receive [start game v]\nhide\nwait (0.1) seconds\nforever\n    wait until <key (p v) pressed?>\n    set [pause v] to [1]\n    broadcast (toggle pause v)\n    wait until <not <key (p v) pressed?>>\n    wait until <key (p v) pressed?>\n    set [pause v] to [0]\n    broadcast (toggle pause v)\n    wait until <not <key (p v) pressed?>>\nend\n\nwhen flag clicked\nset [pause v] to [0]\nhide\nset [id v] to [x]\n\nwhen I receive [toggle pause v]\nif <<(pause) = [1]> and <(id) = [x]>> then\n    start sound [pause menu v]\n    set [id v] to [1]\n    create clone of (_myself_ v)\n    set [id v] to [2]\n    create clone of (_myself_ v)\n    set [id v] to [x]\n    switch costume to (white v)\n    set [ghost v] effect to (100)\n    show\n    repeat (5)\n        change [ghost v] effect by (-10)\n    end\nelse\n    if <(id) = [x]> then\n        set [ghost v] effect to (50)\n        show\n        repeat (5)\n            change [ghost v] effect by (10)\n        end\n        hide\n    else\n        start sound [menu disappear v]\n        set [ghost v] effect to (100)\n        show\n        repeat (5)\n            change [ghost v] effect by (20)\n        end\n        hide\n        delete this clone\n    end\nend\n\nwhen I receive [goal animation v]\nstop [other scripts in sprite v]\nset [pause v] to [0]\nhide\ndelete this clone\n\nwhen I start as a clone\ngo [forward v] (2) layers\nswitch costume to ((id) + (1))\nset [ghost v] effect to (100)\nshow\nrepeat (5)\n    change [ghost v] effect by (-20)\nend\nif <(id) = [2]> then\n    set [size time v] to [0]\n    forever\n        change [size time v] by (4)\n        change size by (([sin v] of (size time) ) / (2))\n    end\nend\n\nset [pause v] to [1]\nbroadcast (toggle pause v)\n\n@goal\n\nwhen I receive [exit stage v]\nwait (0.3) seconds\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [goal animation v]\nswitch costume to (pole v)\ngo to x: (flagX) y: ((flagY) - (1))\nshow\ncreate clone of (_myself_ v)\nwait (5.3) seconds\nswitch costume to (pole2 v)\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nswitch costume to (badflag v)\nwait (1) seconds\nstart sound [nsmb_flagpole v]\nrepeat (21)\n    change y by (-6)\nend\nrepeat (5)\n    change y by (-4)\nend\nrepeat (2)\n    change y by (-2)\nend\nrepeat (2)\n    change y by (-1)\nend\nwait (0.5) seconds\nif <(level) = [4]> then\n    broadcast (vic music v)\nelse\n    start sound [goal v]\nend\nbroadcast (course clear text v)\nwait (1.8) seconds\nset [brightness v] effect to (0)\nrepeat (10)\n    change [brightness v] effect by (-10)\n    change [ghost v] effect by (5)\nend\nswitch costume to (goodflag v)\nrepeat (10)\n    change [brightness v] effect by (10)\n    change [ghost v] effect by (-5)\nend\nrepeat (20)\n    change y by (((flagY) - (y position)) / (4))\nend\nset y to (flagY)\n\n@scoreboard\n\nwhen I receive [exit stage v]\nwait (0.3) seconds\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [course clear text v]\nwait (2.4) seconds\nset [ghost v] effect to (0)\nswitch costume to (course clear v)\nshow\nset size to (0) %\nrepeat (20)\n    change size by (((100) - (size)) / (4))\nend\nset size to (100) %\nwait (0.5) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nbroadcast (results v)\nset [ghost v] effect to (100)\nswitch costume to (black v)\nset [id v] to [1]\ncreate clone of (_myself_ v)\nrepeat (10)\n    change [ghost v] effect by (-5)\nend\nwait (3) seconds\nset [id v] to [2]\ncreate clone of (_myself_ v)\nwait until <<not <key (space v) pressed?>> and <not <mouse down?>>>\nwait until <<key (space v) pressed?> or <mouse down?>>\nwait until <<not <key (space v) pressed?>> and <not <mouse down?>>>\nbroadcast (time screen v)\nset [id v] to [2]\ncreate clone of (_myself_ v)\nwait (2) seconds\nwait until <<not <key (space v) pressed?>> and <not <mouse down?>>>\nwait until <<key (space v) pressed?> or <mouse down?>>\nwait until <<not <key (space v) pressed?>> and <not <mouse down?>>>\nbroadcast (exit stage v)\nstart sound [begin v]\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I start as a clone\ngo to [front v] layer\nif <(id) = [1]> then\n    switch costume to (score text v)\nelse\n    switch costume to (space v)\nend\n\nwhen I start as a clone\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [time screen v]\nif <(id) = [1]> then\n    switch costume to (time text v)\nelse\n    delete this clone\nend\n\n@score nos\n\nwhen I receive [exit stage v]\nwait (0.3) seconds\nset [coins v] to [0]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\ndefine clone (id)\nset [row v] to (id)\nset [id v] to [0]\nif <(id) = [1]> then\n    repeat (length of (coins))\n        change [id v] by (1)\n        switch costume to (letter (id) of (coins))\n        create clone of (_myself_ v)\n    end\n    change [id v] by (1)\n    switch costume to (x100 v)\n    create clone of (_myself_ v)\nelse\n    if <(id) = [2]> then\n        repeat (length of (length of [temporary green coins v]))\n            change [id v] by (1)\n            switch costume to (letter (id) of (length of [temporary green coins v]))\n            create clone of (_myself_ v)\n        end\n        change [id v] by (1)\n        switch costume to (x1000 v)\n        create clone of (_myself_ v)\n    else\n        if <(id) = [3]> then\n            repeat (length of (total score))\n                change [id v] by (1)\n                switch costume to (letter (id) of (total score))\n                create clone of (_myself_ v)\n            end\n        else\n            if <(id) = [4]> then\n                change [id v] by (1)\n                switch costume to (coin v)\n                create clone of (_myself_ v)\n                repeat (length of (coins))\n                    change [id v] by (1)\n                    switch costume to (letter ((id) - (1)) of (coins))\n                    create clone of (_myself_ v)\n                end\n            else\n                if <(id) = [5]> then\n                    repeat (length of (timer))\n                        change [id v] by (1)\n                        switch costume to (letter (id) of (timer))\n                        create clone of (_myself_ v)\n                    end\n                else\n                    if <(id) = [6]> then\n                        if <(level) = [1]> then\n                            repeat (length of (☁ lvl1))\n                                change [id v] by (1)\n                                switch costume to (letter (id) of (☁ lvl1))\n                                create clone of (_myself_ v)\n                            end\n                        else\n                            if <(level) = [2]> then\n                                repeat (length of (☁ lvl2))\n                                    change [id v] by (1)\n                                    switch costume to (letter (id) of (☁ lvl2))\n                                    create clone of (_myself_ v)\n                                end\n                            else\n                                if <(level) = [3]> then\n                                    repeat (length of (☁ lvl3))\n                                        change [id v] by (1)\n                                        switch costume to (letter (id) of (☁ lvl3))\n                                        create clone of (_myself_ v)\n                                    end\n                                else\n                                    if <(level) = [4]> then\n                                        repeat (length of (☁ lvl4))\n                                            change [id v] by (1)\n                                            switch costume to (letter (id) of (☁ lvl4))\n                                            create clone of (_myself_ v)\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [total score v] to [0]\nset size to (80) %\nhide\n\nwhen I start as a clone\nif <(row) = [4]> then\n    set [ghost v] effect to (0)\n    show\n    set [old coin v] to (coins)\n    wait until <not <(coins) = (old coin)>>\n    delete this clone\nelse\n    set [ghost v] effect to (100)\n    show\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nend\n\nwhen I start as a clone\nset size to (80) %\nif <(row) = [1]> then\n    go to x: ((0) + (((14) * (id)) - (14))) y: (42)\nelse\n    if <(row) = [2]> then\n        go to x: ((0) + (((14) * (id)) - (14))) y: (2)\n    else\n        if <(row) = [3]> then\n            set size to (160) %\n            go to x: ((0) + (((28) * (id)) - (14))) y: (-85)\n        else\n            if <(row) = [4]> then\n                set size to (160) %\n                go to x: (((212) + (((28) * (id)) - (28))) - ((length of (coins)) * (28))) y: (148)\n                wait (2.6) seconds\n                repeat (10)\n                    change [ghost v] effect by (10)\n                end\n                delete this clone\n            else\n                if <(row) = [5]> then\n                    go to x: ((0) + (((14) * (id)) - (14))) y: (23)\n                else\n                    if <(row) = [6]> then\n                        go to x: ((0) + (((14) * (id)) - (14))) y: (-16)\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [results v]\nset [total score v] to [0]\nwait (0.5) seconds\nstart sound [coin v]\nclone (1)\nwait (1) seconds\nclone (2)\nstart sound [coin-special v]\nwait (1) seconds\nset [total score v] to (((coins) * (100)) + ((length of [temporary green coins v]) * (1000)))\nstart sound [Tada v]\nclone (3)\n\nwhen I receive [start game v]\nset [old coin v] to [0]\nforever\n    if <not <(coins) = (old coin)>> then\n        clone (4)\n    end\n    set [old coin v] to (coins)\nend\n\nwhen I receive [time screen v]\nif <[1] = [1]> then\n    stop [other scripts in sprite v]\n    hide\n    delete this clone\nend\nwait (0.5) seconds\nstart sound [Glug v]\nclone (5)\nwait (1) seconds\nif <(newbest) = [1]> then\n    start sound [Tada v]\nelse\n    start sound [Glug v]\nend\nclone (6)\n\n@thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nforever\n    reset timer\nend\n\nwhen [timer v] > (0.25)\nif <(t?) = [1]> then\n    switch costume to (turbo mode v)\n    set size to (100) %\n    go to x: (0) y: (0)\n    go to [front v] layer\n    show\n    start sound [wrong v]\nelse\n    switch costume to (costume1 v)\n    go to x: (0) y: (110)\n    go to [front v] layer\n    show\n    repeat (20)\n        change y by (((0) - (y position)) / (4))\n    end\n    go to x: (0) y: (0)\nend\n\n@turbo detector\n\nwhen flag clicked\nset [t? v] to [0]\nset [ghost v] effect to (100)\nshow\nforever\n    set [turbo timer v] to [0]\n    go to x: (0) y: (182)\n    repeat (7)\n        change x by (10)\n    end\n    if <(turbo timer) = [0]> then\n        set [t? v] to [1]\n        stop [all v]\n    end\nend\n\nwhen flag clicked\nset [turbo timer v] to [0]\nforever\n    change [turbo timer v] by (1)\n    wait (0.01) seconds\nend\n\n@Intro\n\nwhen I start as a clone\nset [brightness v] effect to (0)\nif <(id) = [1]> then\n    point in direction (80)\n    switch costume to (logo bg v)\n    show\n    set size to (50) %\n    go to [front v] layer\n    repeat (25)\n        change size by (((100) - (size)) / (3))\n        turn right (((90) - (direction)) / (3)) degrees\n    end\n    wait (44) seconds\n    repeat (4)\n        change size by (((-15) - (size)) / (3))\n    end\n    hide\n    delete this clone\nelse\n    if <(id) = [2]> then\n        change y by (-5)\n        point in direction (65)\n        switch costume to (logo v)\n        show\n        set size to (0) %\n        go to [front v] layer\n        repeat (25)\n            change size by (((100) - (size)) / (3))\n            turn right (((90) - (direction)) / (3)) degrees\n        end\n        wait (44) seconds\n        repeat (6)\n            change size by (((-8) - (size)) / (3))\n        end\n        hide\n        delete this clone\n    else\n        if <<(id) = [3]> or <(id) = [4]>> then\n            go to [front v] layer\n            set size to (100) %\n            go to x: (0) y: (0)\n            repeat (40)\n                switch costume to (costume2 v)\n                change size by (((2750) - (size)) / (8))\n                if <(id) = [3]> then\n                    switch costume to (costume3 v)\n                else\n                    change [brightness v] effect by (-4)\n                    switch costume to (costume1 v)\n                end\n            end\n        else\n            hide\n            set volume to (75) %\n            if <(id) = [5]> then\n                set [pan left/right v] effect to (-100)\n                play sound [monodyL v] until done\n                delete this clone\n            else\n                set [pan left/right v] effect to (100)\n                play sound [monodyR v] until done\n                delete this clone\n            end\n        end\n    end\nend\n\nwhen flag clicked\nwait (2.5) seconds\nif <(intro end animation?) = [0]> then\n    set [id v] to [1]\n    create clone of (_myself_ v)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\nset [brightness v] effect to (20)\nrepeat (20)\n    change [brightness v] effect by (-1)\nend\nwait (0.6) seconds\nset size to (150) %\nset [brightness v] effect to (20)\nrepeat (20)\n    change [brightness v] effect by (-1)\nend\nwait (0.45) seconds\nrepeat (4)\n    set size to (150) %\n    set [brightness v] effect to (20)\n    repeat (5)\n        change [brightness v] effect by (-1)\n    end\nend\nrepeat (15)\n    change [brightness v] effect by (-1.5)\nend\nwait (0.675) seconds\nset size to (150) %\nset [brightness v] effect to (20)\nrepeat (20)\n    change [brightness v] effect by (-1)\nend\n\nwhen I receive [end intro v]\nstop [other scripts in sprite v]\nif <(costume [number v]) = [1]> then\n    set [intro played? v] to [0]\n    go to x: (0) y: (0)\n    switch costume to (bg2 v)\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    set [ghost v] effect to (0)\n    hide\nelse\n    delete this clone\nend\n\nwhen flag clicked\nset [x v] to (mouse x)\nset [intro: y v] to (mouse y)\nwait until <not <mouse down?>>\nif <(mouse y) > [179]> then\n    wait until <not <(mouse x) = (x)>>\n    wait until <not <(mouse y) = (Intro: y)>>\nend\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        wait until <<not <mouse down?>> or <touching (mouse-pointer v)?>>\n        if <<touching (mouse-pointer v)?> and <(intro end animation?) = [0]>> then\n            set [intro end animation? v] to [1]\n            set [id v] to [3]\n            start sound [Hit_Hurt4 v]\n            broadcast (z intro fade v)\n            create clone of (_myself_ v)\n            wait (0.15) seconds\n            set [id v] to [4]\n            create clone of (_myself_ v)\n            repeat (15)\n                change volume by (-7.5)\n            end\n            wait (0.5) seconds\n            broadcast (end intro v)\n            stop [this script v]\n        end\n    end\nend\n\ndefine float\nif <(costume [number v]) = [1]> then\n    change [float v] by (3)\n    change y by (([sin v] of (float) ) / (4))\nelse\n    if <(costume [number v]) = [3]> then\n        change [float v] by (6)\n    else\n        change [float v] by (-6)\n    end\n    change y by (([sin v] of (float) ) / (3))\n    change size by (([sin v] of (float) ) / (4))\n    turn right (([sin v] of (float) ) / (5)) degrees\nend\n\nwhen flag clicked\nshow\nif <(intro played?) = [0]> then\n    set [id v] to [5]\n    create clone of (_myself_ v)\n    set [id v] to [6]\n    create clone of (_myself_ v)\n    set [intro end animation? v] to [0]\n    set volume to (100) %\n    set [brightness v] effect to (-100)\n    go to x: (0) y: (0)\n    set size to (87) %\n    switch costume to (bg v)\n    point in direction (90)\n    show\n    go to [front v] layer\n    repeat (75)\n        change size by (((125) - (size)) / (50))\n        change [brightness v] effect by (1)\n        float\n    end\n    forever\n        float\n        change size by (((100) - (size)) / (25))\n    end\nelse\n    set [brightness v] effect to (-100)\n    wait (0.15) seconds\n    hide\n    broadcast (end intro v)\n    set [intro played? v] to [0]\nend\n\nwhen flag clicked\nwait (7.2) seconds\nif <(intro end animation?) = [0]> then\n    set [intro end animation? v] to [1]\n    set [id v] to [3]\n    start sound [Hit_Hurt4 v]\n    create clone of (_myself_ v)\n    wait (0.15) seconds\n    set [id v] to [4]\n    create clone of (_myself_ v)\n    wait (1) seconds\n    broadcast (end intro v)\nend\n\nwhen I start as a clone\nset [float v] to [0]\nwait (0.25) seconds\nif <(id) = [1]> then\n    repeat (27)\n        float\n    end\n    repeat (5)\n        change x by (50)\n        float\n    end\n    set x to ((x position) * (-1))\n    repeat (32)\n        change x by (((0) - (x position)) / (2))\n        float\n    end\n    set x to (0)\n    repeat (2)\n        repeat (5)\n            change y by (((25) - (y position)) / (2))\n            float\n        end\n        repeat (5)\n            change y by (((-25) - (y position)) / (2))\n            float\n        end\n    end\n    repeat (5)\n        change y by (((25) - (y position)) / (2))\n        float\n    end\n    set [spin! v] to [90]\n    repeat (15)\n        change y by (((0) - (y position)) / (2))\n        change [spin! v] by (((135) - (spin!)) / (8))\n        point in direction (spin!)\n    end\n    repeat (20)\n        change y by (((0) - (y position)) / (2))\n        change [spin! v] by (((45) - (spin!)) / (8))\n        point in direction (spin!)\n    end\n    set [zoom v] to [0]\n    repeat (100)\n        change y by (((0) - (y position)) / (2))\n        change [spin! v] by (((90) - (spin!)) / (8))\n        point in direction (spin!)\n        change [zoom v] by (-2)\n        change size by (zoom)\n    end\nelse\n    if <(id) = [2]> then\n        repeat (27)\n            float\n        end\n        repeat (5)\n            change x by (-50)\n            float\n        end\n        set x to ((x position) * (-1))\n        repeat (32)\n            change x by (((0) - (x position)) / (2))\n            float\n        end\n        set x to (0)\n        repeat (2)\n            repeat (5)\n                change y by (((-25) - (y position)) / (2))\n                float\n            end\n            repeat (5)\n                change y by (((25) - (y position)) / (2))\n                float\n            end\n        end\n        repeat (5)\n            change y by (((-25) - (y position)) / (2))\n            float\n        end\n        set [spin! v] to [90]\n        repeat (15)\n            change y by (((0) - (y position)) / (2))\n            change [spin! v] by (((45) - (spin!)) / (8))\n            point in direction (spin!)\n        end\n        repeat (20)\n            change y by (((0) - (y position)) / (2))\n            change [spin! v] by (((135) - (spin!)) / (8))\n            point in direction (spin!)\n        end\n        set [zoom v] to [0]\n        repeat (100)\n            change y by (((0) - (y position)) / (2))\n            change [spin! v] by (((90) - (spin!)) / (8))\n            point in direction (spin!)\n            change [zoom v] by (-2)\n            change size by (zoom)\n        end\n    end\nend\n\nmove (10) steps\n\nwhen I receive [z intro fade v]\nif <(id) > [4]> then\n    repeat (15)\n        change volume by (-7.5)\n    end\nend\n\nwhen flag clicked\nset [intro played? v] to [1]\n\nwhen I receive [bad ending v]\nhide\n\nwhen I receive [good ending v]\nhide\n\n@planet\n\nwhen I receive [start game v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [world map v]\nshow\ngo to x: (0) y: (-320)\nswitch costume to (costume2 v)\nset size to (180) %\nswitch costume to (costume1 v)\nforever\n    point in direction ((90) + ((scrollx) / (3.5)))\n    set [color v] effect to (((scrollx) * (-1)) / (10))\nend\n\nwhen I receive [bad ending v]\nhide\n\nwhen I receive [good ending v]\nhide\n\n@menu title\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [back to map v]\nstop [other scripts in sprite v]\nset y to (0)\nrepeat (4)\n    change y by (10)\nend\nswitch costume to (lvl select v)\nrepeat (20)\n    change y by (((0) - (y position)) / (4))\nend\nset y to (0)\n\nwhen I receive [world map v]\nswitch costume to (lvl select v)\nset y to (0)\nshow\n\nwhen I receive [data menu v]\nstop [other scripts in sprite v]\nset y to (0)\nrepeat (4)\n    change y by (10)\nend\nswitch costume to (data v)\nrepeat (20)\n    change y by (((0) - (y position)) / (4))\nend\nset y to (0)\n\nwhen I receive [select level v]\nstop [other scripts in sprite v]\nrepeat (4)\n    change y by (10)\nend\nset y to (0)\nhide\n\nwhen I receive [error code v]\nstop [other scripts in sprite v]\nset y to (0)\nrepeat (4)\n    change y by (10)\nend\nswitch costume to (error v)\nrepeat (20)\n    change y by (((0) - (y position)) / (4))\nend\nset y to (0)\n\n@green coin icon\n\nwhen I receive [exit stage v]\nwait (0.3) seconds\nstop [other scripts in sprite v]\nset [ghost v] effect to (0)\nhide\ndelete this clone\n\nwhen flag clicked\nset [id v] to [x]\nhide\n\nwhen I receive [back to map v]\nif <[1] = [1]> then\n    delete this clone\nend\nclone\n\nwhen I receive [world map v]\nif <[1] = [1]> then\n    delete this clone\nend\nclone\n\ndefine clone\nset [id v] to [0]\nrepeat (3)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\nset [id v] to [x]\n\nwhen I start as a clone\nforever\n    if <(lvl theme) = [0]> then\n        show\n        if <[green coins v] contains (join (lvl hover) (join [-] (id)))?> then\n            switch costume to (costume1 v)\n        else\n            switch costume to (costume2 v)\n        end\n        go to x: ((132) + (((id) - (1)) * (40))) y: (153)\n    else\n        if <<[temporary green coins v] contains (join (id) [0])?> or <[temporary green coins v] contains (join (id) [1])?>> then\n            switch costume to (costume1 v)\n        else\n            if <[green coins v] contains (join (level) (join [-] (id)))?> then\n                switch costume to (costume3 v)\n            else\n                switch costume to (costume2 v)\n            end\n        end\n        go to x: ((-40) + (((id) - (1)) * (40))) y: (153)\n    end\nend\n\nwhen I receive [data menu v]\ndelete this clone\n\nwhen I receive [select level v]\ndelete this clone\n\nwhen I receive [start game v]\nif <[1] = [1]> then\n    delete this clone\nend\nclone\n\nwhen I receive [update green coin counter v]\nif <not <(id) = [x]>> then\n    wait (0) seconds\n    if <(costume [number v]) = [1]> then\n        set [ghost v] effect to (0)\n    else\n        set [ghost v] effect to (50)\n    end\n    show\n    wait (1.5) seconds\n    repeat (20)\n        if <(costume [number v]) = [1]> then\n            change [ghost v] effect by (5)\n        else\n            change [ghost v] effect by (2.5)\n        end\n    end\n    set [ghost v] effect to (0)\n    hide\nend\n\n@lava\n\nwhen I receive [exit stage v]\nwait (0.3) seconds\nstop [other scripts in sprite v]\nset [ghost v] effect to (0)\nhide\ndelete this clone\n\nwhen I receive [start game v]\nif <(level) = [4]> then\n    set [ghost v] effect to (15)\n    go to x: (-137) y: (0)\n    show\n    forever\n        wait until <(pause) = [0]>\n        next costume\n        wait (0.1) seconds\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [start game v]\nif <(level) = [4]> then\n    forever\n        if <(scrollx) < [-8280]> then\n            change x by (((-137) - (x position)) / (40))\n        else\n            change x by (((0) - (x position)) / (40))\n        end\n    end\nend\n\nwhen I receive [bad ending v]\nhide\n\n@bottom lava\n\nwhen I receive [scroll v]\nif <(level) = [4]> then\n    switch costume to (costume2 v)\n    set y to ((scrolly) + (0))\n    switch costume to (costume1 v)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [exit stage v]\nwait (0.3) seconds\nstop [other scripts in sprite v]\nset [ghost v] effect to (0)\nhide\ndelete this clone\n\nwhen I receive [start game v]\nif <(level) = [4]> then\n    set [ghost v] effect to (15)\n    go to x: (0) y: (0)\n    show\nend\n\nwhen I receive [bad ending v]\nhide\n\n@clear icon\n\nwhen flag clicked\nset [id v] to [x]\nhide\n\nwhen I receive [back to map v]\nshow\nforever\n    if <[cleared v] contains (lvl hover)?> then\n        switch costume to (costume1 v)\n    else\n        switch costume to (costume2 v)\n    end\nend\n\nwhen I receive [world map v]\nshow\nforever\n    if <[cleared v] contains (lvl hover)?> then\n        switch costume to (costume1 v)\n    else\n        switch costume to (costume2 v)\n    end\nend\n\nwhen I receive [data menu v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [select level v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [start game v]\nstop [other scripts in sprite v]\nhide\n\n@timer\n\nwhen I receive [exit stage v]\nwait (0.3) seconds\nstop [other scripts in sprite v]\n\nwhen flag clicked\nset [timer v] to [0]\nhide\n\nwhen I receive [start game v]\nstop [other scripts in sprite v]\nset [timer v] to [0]\nrepeat until <(timer) = [999]>\n    repeat (30)\n        wait until <(pause) = [0]>\n    end\n    change [timer v] by (1)\nend\n\nwhen I receive [goal animation v]\nstop [other scripts in sprite v]\n\nset [scrollx v] to [-5000]\n\n@level\n\nwhen I receive [exit stage v]\nwait (0.3) seconds\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [scroll v]\nif <not <(id) = [x]>> then\n    switch costume to (box v)\n    go to x: ((scrollx) + ((480) * ((join (letter (1) of (id)) (letter (2) of (id))) - (1)))) y: ((scrolly) + ((360) * ((join (letter (4) of (id)) (letter (5) of (id))) - (1))))\n    broadcast (ground move v)\n    switch costume to (id)\n    if <<([abs v] of (x position) ) > [479]> or <([abs v] of (y position) ) > [359]>> then\n        hide\n        if <[shown levels v] contains (id)?> then\n            delete (item # of (id) in [shown levels v]) of [shown levels v]\n        end\n    else\n        show\n        if <not <[shown levels v] contains (id)?>> then\n            add (id) to [shown levels v]\n        end\n    end\nend\n\nwhen flag clicked\nset [id v] to [x]\ndelete all of [shown levels v]\nhide\n\ndefine clone\nif <not <(id) = [x]>> then\n    delete this clone\nend\nif <(level) = [1]> then\n    set [id v] to [01-01-1]\n    create clone of (_myself_ v)\n    set [id v] to [02-01-1]\n    create clone of (_myself_ v)\n    set [id v] to [03-01-1]\n    create clone of (_myself_ v)\n    set [id v] to [04-01-1]\n    create clone of (_myself_ v)\n    set [id v] to [05-01-1]\n    create clone of (_myself_ v)\n    set [id v] to [04-02-1]\n    create clone of (_myself_ v)\n    set [id v] to [05-02-1]\n    create clone of (_myself_ v)\n    set [id v] to [06-02-1]\n    create clone of (_myself_ v)\n    set [id v] to [06-01-1]\n    create clone of (_myself_ v)\n    set [id v] to [07-01-1]\n    create clone of (_myself_ v)\n    set [id v] to [07-02-1]\n    create clone of (_myself_ v)\n    set [id v] to [08-01-1]\n    create clone of (_myself_ v)\n    set [id v] to [09-01-1]\n    create clone of (_myself_ v)\n    set [id v] to [10-01-1]\n    create clone of (_myself_ v)\n    set [id v] to [11-01-1]\n    create clone of (_myself_ v)\n    set [id v] to [12-01-1]\n    create clone of (_myself_ v)\nelse\n    if <(level) = [2]> then\n        set [id v] to [01-01-2]\n        create clone of (_myself_ v)\n        set [id v] to [01-02-2]\n        create clone of (_myself_ v)\n        set [id v] to [02-01-2]\n        create clone of (_myself_ v)\n        set [id v] to [02-02-2]\n        create clone of (_myself_ v)\n        set [id v] to [03-01-2]\n        create clone of (_myself_ v)\n        set [id v] to [02-03-2]\n        create clone of (_myself_ v)\n        set [id v] to [03-02-2]\n        create clone of (_myself_ v)\n        set [id v] to [03-03-2]\n        create clone of (_myself_ v)\n        set [id v] to [04-03-2]\n        create clone of (_myself_ v)\n        set [id v] to [04-02-2]\n        create clone of (_myself_ v)\n        set [id v] to [04-01-2]\n        create clone of (_myself_ v)\n        set [id v] to [05-01-2]\n        create clone of (_myself_ v)\n        set [id v] to [05-02-2]\n        create clone of (_myself_ v)\n        set [id v] to [06-01-2]\n        create clone of (_myself_ v)\n        set [id v] to [06-02-2]\n        create clone of (_myself_ v)\n        set [id v] to [07-01-2]\n        create clone of (_myself_ v)\n        set [id v] to [07-02-2]\n        create clone of (_myself_ v)\n        set [id v] to [08-01-2]\n        create clone of (_myself_ v)\n        set [id v] to [08-02-2]\n        create clone of (_myself_ v)\n        set [id v] to [07-03-2]\n        create clone of (_myself_ v)\n        set [id v] to [06-03-2]\n        create clone of (_myself_ v)\n        set [id v] to [07-03-2]\n        create clone of (_myself_ v)\n        set [id v] to [09-03-2]\n        create clone of (_myself_ v)\n        set [id v] to [09-02-2]\n        create clone of (_myself_ v)\n        set [id v] to [09-01-2]\n        create clone of (_myself_ v)\n        set [id v] to [10-01-2]\n        create clone of (_myself_ v)\n    else\n        if <(level) = [3]> then\n            set [id v] to [01-01-3]\n            create clone of (_myself_ v)\n            set [id v] to [02-01-3]\n            create clone of (_myself_ v)\n            set [id v] to [02-02-3]\n            create clone of (_myself_ v)\n            set [id v] to [01-03-3]\n            create clone of (_myself_ v)\n            set [id v] to [01-04-3]\n            create clone of (_myself_ v)\n            set [id v] to [02-04-3]\n            create clone of (_myself_ v)\n            set [id v] to [01-05-3]\n            create clone of (_myself_ v)\n            set [id v] to [02-05-3]\n            create clone of (_myself_ v)\n            set [id v] to [02-06-3]\n            create clone of (_myself_ v)\n            set [id v] to [01-06-3]\n            create clone of (_myself_ v)\n            set [id v] to [01-07-3]\n            create clone of (_myself_ v)\n            set [id v] to [02-07-3]\n            create clone of (_myself_ v)\n            set [id v] to [01-08-3]\n            create clone of (_myself_ v)\n            set [id v] to [02-08-3]\n            create clone of (_myself_ v)\n            set [id v] to [01-09-3]\n            create clone of (_myself_ v)\n            set [id v] to [02-09-3]\n            create clone of (_myself_ v)\n            set [id v] to [01-10-3]\n            create clone of (_myself_ v)\n            set [id v] to [02-10-3]\n            create clone of (_myself_ v)\n        else\n            if <(level) = [4]> then\n                set [id v] to [01-01-4]\n                create clone of (_myself_ v)\n                set [id v] to [01-02-4]\n                create clone of (_myself_ v)\n                set [id v] to [02-01-4]\n                create clone of (_myself_ v)\n                set [id v] to [03-01-4]\n                create clone of (_myself_ v)\n                set [id v] to [04-01-4]\n                create clone of (_myself_ v)\n                set [id v] to [05-01-4]\n                create clone of (_myself_ v)\n                set [id v] to [06-01-4]\n                create clone of (_myself_ v)\n                set [id v] to [07-01-4]\n                create clone of (_myself_ v)\n                set [id v] to [08-01-4]\n                create clone of (_myself_ v)\n                set [id v] to [09-01-4]\n                create clone of (_myself_ v)\n                set [id v] to [10-01-4]\n                create clone of (_myself_ v)\n                set [id v] to [11-01-4]\n                create clone of (_myself_ v)\n                set [id v] to [12-01-4]\n                create clone of (_myself_ v)\n                set [id v] to [13-01-4]\n                create clone of (_myself_ v)\n                set [id v] to [14-01-4]\n                create clone of (_myself_ v)\n                set [id v] to [15-01-4]\n                create clone of (_myself_ v)\n                set [id v] to [16-01-4]\n                create clone of (_myself_ v)\n                set [id v] to [17-01-4]\n                create clone of (_myself_ v)\n                set [id v] to [18-01-4]\n                create clone of (_myself_ v)\n                set [id v] to [19-01-4]\n                create clone of (_myself_ v)\n            end\n        end\n    end\nend\n\nwhen I receive [start game v]\ndelete all of [shown levels v]\nset [id v] to [x]\nclone\nset [id v] to [x]\n\nwhen [z v] key pressed\nif <(username) = [ToadfanSchool]> then\n    clone\nend\n\nwhen I receive [bad ending v]\nhide\n\n@map levels2\n\ndefine clone\nset [id v] to [0]\nrepeat (4)\n    create clone of (_myself_ v)\n    change [id v] by (1)\nend\nset [id v] to [x]\n\nwhen I start as a clone\nset [yhover v] to (((id) - (1)) * (180))\nset size to (100) %\nset y to (35)\nshow\nforever\n    change [yhover v] by (4)\n    switch costume to (box v)\n    set x to ((scrollx) + ((id) * (200)))\n    set y to (((35) + (([sin v] of (yHover) ) * (10))) - (([abs v] of ((scrollx) + ((id) * (200))) ) / (3)))\n    if <<(id) = [3]> and <(length of [cleared v]) < [2]>> then\n        switch costume to (lvl4-lock v)\n    else\n        switch costume to ((id) + (3))\n    end\n    set size to ((100) - (([abs v] of (x position) ) / (5))) %\n    set [ghost v] effect to (([abs v] of (x position) ) / (3))\n    if <([abs v] of (x position) ) > [350]> then\n        hide\n    else\n        show\n    end\n    if <(id) > [3]> then\n        delete this clone\n    end\nend\n\nwhen flag clicked\nset size to (100) %\nset [id v] to [x]\nhide\n\nwhen I receive [world map v]\nset [scrollx v] to (((level) - (1)) * (-200))\nset [scrolly v] to [0]\nset [lvl hover v] to (level)\ncreate lvl icons\n\nwhen I receive [world map v]\nmap controls\n\nwhen I receive [select level v]\nstop [other scripts in sprite v]\nif <<((id) + (1)) = (lvl hover)> and <not <(id) = [x]>>> then\n    start sound [enter level v]\n    set size to (50) %\n    set [level v] to (lvl hover)\n    set [lvl theme v] to (lvl hover)\n    show\n    switch costume to ((lvl hover) + (2))\n    set [ghost v] effect to (0)\n    set x to (0)\n    repeat (30)\n        change y by (((0) - (y position)) / (4))\n        change size by (((100) - (size)) / (8))\n    end\n    set size to (100) %\n    set y to (0)\n    go to x: (0) y: (0)\n    set [zoom v] to [0]\n    set [zoom2 v] to [0]\n    start sound [Rip2 v]\n    repeat (20)\n        change [zoom2 v] by (0.5)\n        change [zoom v] by (zoom2)\n        switch costume to (box2 v)\n        change size by (zoom)\n        switch costume to ((lvl hover) + (2))\n    end\n    if <(level) < [5]> then\n        delete this clone\n    end\nelse\n    delete this clone\nend\n\nwhen I receive [data menu v]\nstop [other scripts in sprite v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nset [ghost v] effect to (0)\nhide\ndelete this clone\n\nwhen I receive [back to map v]\ncreate lvl icons\n\ndefine create lvl icons\nif <[1] = [1]> then\n    delete this clone\nend\nclone\nforever\n    change [scrollx v] by ((((((lvl hover) * (-1)) + (1)) * (200)) - (scrollx)) / (4))\n    broadcast (scroll v)\nend\n\ndefine map controls\nforever\n    if <key (left arrow v) pressed?> then\n        change [lvl hover v] by (-1)\n        if <(lvl hover) < [1]> then\n            set [lvl hover v] to [1]\n        else\n            start sound [Rip v]\n        end\n        wait until <not <key (left arrow v) pressed?>>\n    end\n    if <key (right arrow v) pressed?> then\n        change [lvl hover v] by (1)\n        if <(lvl hover) > [4]> then\n            set [lvl hover v] to [4]\n        else\n            start sound [Rip v]\n        end\n        wait until <not <key (right arrow v) pressed?>>\n    end\nend\n\nwhen I receive [back to map v]\nmap controls\n\nwhen I receive [change difficulty v]\nstop [other scripts in sprite v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nset [ghost v] effect to (0)\nhide\ndelete this clone\n\nwhen I receive [bad ending v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [good ending v]\nstop [other scripts in sprite v]\nhide\n\n@red glow\n\nwhen I receive [exit stage v]\nwait (0.3) seconds\nstop [other scripts in sprite v]\nset [ghost v] effect to (0)\nhide\ndelete this clone\n\nwhen I receive [start game v]\nif <(difficulty) = [4]> then\n    set [ghost v] effect to (50)\n    go to x: (0) y: (0)\n    show\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [bad ending v]\nhide\n\n@buttons\n\ndefine clone id: (id) repeat: (times)\nset [id v] to (id)\nrepeat (times)\n    create clone of (_myself_ v)\n    change [id v] by (1)\nend\nset [id v] to [x]\n\nwhen flag clicked\nshow list [your code: v]\nset [id v] to [x]\nhide\n\nwhen I start as a clone\nshow\nset size to (0) %\nif <(id) = [0]> then\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((120) - (size)) / (2))\n        if <<(id) = [4]> or <(id) = [10]>> then\n            change x by (((180) - (x position)) / (2))\n        end\n        if <(id) = [13]> then\n            change x by (((-180) - (x position)) / (2))\n        end\n        if <mouse down?> then\n            repeat until <<not <touching (mouse-pointer v)?>> or <not <mouse down?>>>\n                change size by (((80) - (size)) / (4))\n                if <<(id) = [4]> or <(id) = [10]>> then\n                    change x by (((195) - (x position)) / (4))\n                end\n                if <(id) = [13]> then\n                    change x by (((-195) - (x position)) / (4))\n                end\n            end\n            if <touching (mouse-pointer v)?> then\n                if <(id) = [0]> then\n            end\n        end\n    else\n        change size by (((100) - (size)) / (4))\n        if <<(id) = [4]> or <(id) = [10]>> then\n            change x by (((190) - (x position)) / (4))\n        end\n        if <(id) = [13]> then\n            change x by (((-190) - (x position)) / (4))\n        end\n    end\n    repeat until <not <mouse down?>>\n        change size by (((100) - (size)) / (4))\n        if <<(id) = [4]> or <(id) = [10]>> then\n            change x by (((190) - (x position)) / (4))\n        end\n        if <(id) = [13]> then\n            change x by (((-190) - (x position)) / (4))\n        end\n    end\nend\n\nwhen I receive [end intro v]\nif <(id) = [x]> then\n    wait (2) seconds\n    clone id: [1] repeat: [1]\n    clone id: [10] repeat: [1]\nend\n\nwhen I receive [world map v]\nif <(id) = [x]> then\n    clone id: [2] repeat: [1]\n    clone id: [4] repeat: [1]\n    clone id: [7] repeat: [2]\n    clone id: [13] repeat: [1]\nend\n\nwhen I start as a clone\nif <<(id) = [1]> or <(id) = [2]>> then\n    wait until <not <key (space v) pressed?>>\n    forever\n        wait until <key (space v) pressed?>\n        wait until <not <key (space v) pressed?>>\n        if <(id) = [1]> then\n            broadcast (leave title v)\n        else\n            if <(id) = [2]> then\n                if <<not <<(lvl hover) = [4]> and <(length of [cleared v]) < [2]>>> and <(lvl hover) < [5]>> then\n                    broadcast (select level v)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [toggle pause v]\nif <<(id) = [x]> and <(pause) = [1]>> then\n    clone id: [3] repeat: [1]\n    clone id: [9] repeat: [1]\nend\nif <<not <(id) = [x]>> and <(pause) = [0]>> then\n    stop [other scripts in sprite v]\n    repeat (5)\n        change size by (-10)\n        change [ghost v] effect by (20)\n    end\n    delete this clone\nend\n\nwhen I receive [data menu v]\nif <(id) = [x]> then\n    clone id: [5] repeat: [2]\n    clone id: [3] repeat: [1]\nelse\n    stop [other scripts in sprite v]\n    repeat (5)\n        change size by (-10)\n        change [ghost v] effect by (20)\n    end\n    delete this clone\nend\n\nwhen I receive [back to map v]\nif <(id) = [x]> then\n    clone id: [2] repeat: [1]\n    clone id: [4] repeat: [1]\n    clone id: [7] repeat: [2]\n    clone id: [13] repeat: [1]\nelse\n    stop [other scripts in sprite v]\n    repeat (5)\n        change size by (-10)\n        change [ghost v] effect by (20)\n    end\n    delete this clone\nend\n\nwhen I receive [select level v]\nif <not <(id) = [x]>> then\n    stop [other scripts in sprite v]\n    repeat (5)\n        change size by (-10)\n        change [ghost v] effect by (20)\n    end\n    delete this clone\nend\n\nwhen I receive [leave title v]\nif <not <(id) = [x]>> then\n    stop [other scripts in sprite v]\n    repeat (5)\n        change size by (-10)\n        change [ghost v] effect by (20)\n    end\n    delete this clone\nend\n\nwhen I receive [exit stage v]\nif <not <(id) = [x]>> then\n    stop [other scripts in sprite v]\n    repeat (5)\n        change size by (-10)\n        change [ghost v] effect by (20)\n    end\n    delete this clone\nend\n\nwhen I receive [save data v]\nif <(id) = [x]> then\n    save\n    hide list [your code: v]\nend\n\ndefine save\ndelete all of [your code: v]\ndelete all of [temp code v]\nset [code counter v] to [0]\nrepeat (4)\n    change [code counter v] by (1)\n    if <[cleared v] contains (code counter)?> then\n        add (join (item (item # of (pick random (1) to (5)) in [n2 v]) of [n1 v]) []) to [temp code v]\n    else\n        add (join (item (item # of (pick random (6) to (9)) in [n2 v]) of [n1 v]) []) to [temp code v]\n    end\n    set [code counter2 v] to [0]\n    repeat (3)\n        change [code counter2 v] by (1)\n        if <[green coins v] contains (join (code counter) (join [-] (code counter2)))?> then\n            add (join (item (item # of (pick random (1) to (5)) in [n2 v]) of [n1 v]) []) to [temp code v]\n        else\n            add (join (item (item # of (pick random (6) to (9)) in [n2 v]) of [n1 v]) []) to [temp code v]\n        end\n    end\nend\nadd (join (item (item # of (lvl hover) in [n2 v]) of [n1 v]) []) to [temp code v]\nadd (join (item (item # of (difficulty) in [n2 v]) of [n1 v]) []) to [temp code v]\nset [code counter v] to [0]\nrepeat (length of (username))\n    change [code counter v] by (1)\n    add (item (item # of (letter (code counter) of (username)) in [n2 v]) of [n1 v]) to [temp code v]\nend\nadd [Your save code is below. It contains your game progress, so please keep it safe!] to [your code: v]\nadd [Triple-click the code, then press Ctrl+C or ⌘+C to copy it:] to [your code: v]\nadd (temp code) to [your code: v]\n\nwhen I receive [load data v]\nif <not <(id) = [x]>> then\n    delete this clone\nelse\n    ask [Please input your save code:] and wait\n    if <(length of (answer)) < [10]> then\n        start sound [back button v]\n        set [code work? v] to [0]\n    else\n        load\n    end\n    if <(backdrop [number v]) = [6]> then\n        if <(code work?) = [1]> then\n            broadcast (back to map v)\n        else\n            clone id: [5] repeat: [2]\n            clone id: [3] repeat: [1]\n        end\n    else\n        if <(code work?) = [1]> then\n            broadcast (leave title v)\n        else\n            clone id: [1] repeat: [1]\n            clone id: [10] repeat: [1]\n        end\n    end\nend\n\ndefine load\nset [code work? v] to [0]\ndelete all of [n3 v]\nset [code counter v] to [0]\nrepeat (length of (username))\n    change [code counter v] by (1)\n    add (join (item (item # of (letter (((length of (answer)) - (length of (username))) + (code counter)) of (answer)) in [n1 v]) of [n2 v]) []) to [n3 v]\nend\nif <<(username) = (n3)> and <(length of (answer)) = ((length of (username)) + (18))>> then\n    delete all of [green coins v]\n    delete all of [cleared v]\n    set [code counter3 v] to [0]\n    set [code counter v] to [0]\n    repeat (4)\n        change [code counter v] by (1)\n        change [code counter3 v] by (1)\n        if <(item (item # of (letter (code counter3) of (answer)) in [n1 v]) of [n2 v]) < [6]> then\n            add (code counter) to [cleared v]\n        end\n        set [code counter2 v] to [0]\n        repeat (3)\n            change [code counter2 v] by (1)\n            change [code counter3 v] by (1)\n            if <(item (item # of (letter (code counter3) of (answer)) in [n1 v]) of [n2 v]) < [6]> then\n                add (join (code counter) (join [-] (code counter2))) to [green coins v]\n            end\n        end\n    end\n    change [code counter3 v] by (1)\n    set [lvl hover v] to (item (item # of (letter (code counter3) of (answer)) in [n1 v]) of [n2 v])\n    change [code counter3 v] by (1)\n    set [difficulty v] to (item (item # of (letter (code counter3) of (answer)) in [n1 v]) of [n2 v])\n    set [code work? v] to [1]\n    start sound [begin v]\nelse\n    start sound [error v]\n    broadcast (error code v)\nend\n\nwhen I receive [difficulty v]\nif <(id) = [x]> then\n    clone id: [11] repeat: [2]\n    clone id: [14] repeat: [1]\n    if <(length of [green coins v]) = [12]> then\n        clone id: [15] repeat: [1]\n    end\nelse\n    stop [other scripts in sprite v]\n    repeat (5)\n        change size by (-10)\n        change [ghost v] effect by (20)\n    end\n    delete this clone\nend\n\nwhen I receive [change difficulty v]\nif <(id) = [x]> then\n    clone id: [11] repeat: [2]\n    clone id: [3] repeat: [1]\n    clone id: [14] repeat: [1]\n    if <(length of [green coins v]) = [12]> then\n        clone id: [15] repeat: [1]\n    end\nelse\n    stop [other scripts in sprite v]\n    repeat (5)\n        change size by (-10)\n        change [ghost v] effect by (20)\n    end\n    delete this clone\nend\n\nwhen I receive [bad ending v]\nhide\n\n
instructions in game but make sure to play "Volcanic Valley zone" last for a better time.