Colorless: A Platformer - Part 1

Instructions: My first real project. (The others were just to make me a "scratcher")\n» Hints below\nCompete for the World Record time! Comment your time and deaths! Make sure to beat the average time!\nPlease Love and Favorite if you enjoyed it!\n\n–––––––––––––––––– Instructions –––––––––––––––––––\n\n» <^> or WASD to move\n»  s to skip the story\n»  m to mute\n\n––––––––––––––––––––– Hints ––––––––––––––––––––––\nOn the "wall jumping skills required" level, go to the very edge of the first platform, then jump up to skip most of the section. Another way to make it easier is by putting it on fullscreen to get some lag.\n\nFeel free to ask any questions if you are having a lot of trouble beating a level!

@Stage\n\nwhen flag clicked\nset volume to (100) %\nbroadcast (SoundCheck v)\n\nwhen I receive [changesong v]\nstop [other scripts in stage v]\nbroadcast (SoundCheck v)\nbroadcast (BackdropCheck v)\nstop all sounds\nif <(Song) = [0]> then\n    play sound [GYVUS - Blue Sky \[Chillhop Records\].mp3 v] until done\n    broadcast (ChangeSong v)\nelse\n    if <(Song) = [1]> then\n        play sound [ Victory.mp3 v] until done\n        broadcast (ChangeSong v)\n    else\n        if <<(Song) > [1 ]> and <not <(Song) = [1]>>> then\n            if <(Song) = [2]> then\n                play sound [Vexento - Praeclara v] until done\n                set [song v] to (pick random (2) to (4))\n                broadcast (ChangeSong v)\n            else\n                if <(Song) = [3]> then\n                    play sound [Vexento - Lights v] until done\n                    set [song v] to (pick random (2) to (4))\n                    broadcast (ChangeSong v)\n                else\n                    if <(Song) = [4]> then\n                        play sound [Vexento - My Love v] until done\n                        set [song v] to (pick random (2) to (4))\n                        broadcast (ChangeSong v)\n                    else\n                        play sound [Reggae Instrumental - I-ternal Love v] until done\n                        set [song v] to [5]\n                        broadcast (ChangeSong v)\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [soundcheck v]\nforever\n    if <key (m v) pressed?> then\n        wait (0.5) seconds\n        if <not <(volume) = [0]>> then\n            repeat (3)\n                set volume to (0) %\n            end\n        else\n            repeat (3)\n                set volume to (100) %\n            end\n        end\n    end\nend\n\nwhen I receive [backdropcheck v]\nforever\n    if <(Level) = [1]> then\n        switch backdrop to (cave1 v)\n    end\n    if <(Level) = [3]> then\n        switch backdrop to (cave2 v)\n    end\n    if <(Level) = [ 6 ]> then\n        switch backdrop to (cave3 v)\n    end\n    if <(Level) = [7]> then\n        switch backdrop to (forest1 v)\n    end\n    if <(Level) = [9]> then\n        switch backdrop to (forest2 v)\n    end\n    if <(Level) = [11]> then\n        switch backdrop to (forest3 v)\n    end\n    if <(Level) = [13]> then\n        switch backdrop to (snow1 v)\n    end\nend\n\nwhen flag clicked\nbroadcast (ChangeSong v)\nset [song v] to [0]\n\nwhen flag clicked\nswitch backdrop to (titlescreen v)\n\nwhen I receive [start v]\nstop [other scripts in stage v]\nset [song v] to [1]\nbroadcast (ChangeSong v)\nbroadcast (BackdropCheck v)\n\nwhen I receive [soundcheck v]\nforever\n    set [volume v] to (volume)\nend\n\nwhen I receive [voldown v]\nchange volume by (-10)\n\nwhen I receive [volup v]\nchange volume by (10)\n\nwhen I receive [victory!!!!! wahooo!!! v]\nstop [other scripts in stage v]\nset [song v] to [5]\nbroadcast (ChangeSong v)\nbroadcast (BackdropCheck v)\n\nwhen I receive [cutscenep2 v]\nswitch backdrop to (cave1 v)\n\nwhen I receive [cutscenep2 v]\nstop all sounds\nstop [other scripts in stage v]\nset [song v] to (pick random (2) to (4))\nbroadcast (ChangeSong v)\nbroadcast (BackdropCheck v)\nbroadcast (SoundCheck v)\n\n@Player\n\nwhen I receive [options menu v]\nhide\n\nwhen I receive [story time! v]\nhide\n\nwhen I receive [start v]\nset size to (60) %\nshow\nset [yv v] to [0]\ngo to x: (-187) y: (-105)\nset [xv v] to [0]\n\nwhen I receive [cutscenep1 v]\nhide\n\nwhen I receive [map v]\nset [play v] to [0]\nhide\n\nwhen I receive [mapback v]\nset [play v] to [1]\nshow\n\nwhen I receive [victory!!!!! wahooo!!! v]\nset [victory v] to [1]\nwait (1) seconds\ngo to x: (-185) y: (-90)\n\nwhen I receive [start2 v]\nforever\n    if <(Play) = [1]> then\n        if <(LDM MODE) = [0]> then\n            if <(Dead) = [1]> then\n                set [brightness v] effect to (50)\n                repeat (10)\n                    change [ghost v] effect by (10)\n                    change [brightness v] effect by (1)\n                end\n                wait (0.2) seconds\n                set [dead v] to [0]\n                set [ghost v] effect to (0)\n                set [brightness v] effect to (0)\n                go to x: (-187) y: (-105)\n            end\n        else\n            if <(Dead) = [1]> then\n                wait (0.2) seconds\n                set [dead v] to [0]\n                set [ghost v] effect to (0)\n                set [brightness v] effect to (0)\n                go to x: (-187) y: (-105)\n            end\n        end\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Play) = [1]> then\n        if <(LDM MODE) = [0]> then\n            if <(Dead) = [1]> then\n                set [brightness v] effect to (50)\n                repeat (10)\n                    change [ghost v] effect by (10)\n                    change [brightness v] effect by (1)\n                end\n                wait (0.2) seconds\n                set [dead v] to [0]\n                set [ghost v] effect to (0)\n                set [brightness v] effect to (0)\n                go to x: (-187) y: (-105)\n            end\n        else\n            if <(Dead) = [1]> then\n                wait (0.2) seconds\n                set [dead v] to [0]\n                set [ghost v] effect to (0)\n                set [brightness v] effect to (0)\n                go to x: (-187) y: (-105)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [death count: v] to [0]\nset [dead v] to [0]\nhide variable [death count: v]\nhide variable [☁ deaths in world record time: v]\nset [time: v] to [0]\nhide variable [time: v]\nhide variable [☁ world record time: v]\nset [level v] to [0]\nhide variable [world record: v]\nhide variable [minigame deaths: v]\nset [victory v] to [0]\nhide variable [average time v]\nhide\n\nwhen I receive [victory!!!!! wahooo!!! v]\nforever\n    if <(Dead) = [0]> then\n        if <touching color (#ff0000)?> then\n            set [xv v] to [0]\n            set [yv v] to [0]\n            change [minigame deaths: v] by (1)\n            set [dead v] to [1]\n        end\n    end\nend\n\nwhen I receive [cutscenep2 v]\nstop [other scripts in sprite v]\nshow\nswitch costume to (costume1 v)\nset size to (100) %\ngo to x: (-137) y: (30)\n\nwhen I receive [start2 v]\nwait (0.1) seconds\nset size to (60) %\nshow\nset [yv v] to [0]\nset [xv v] to [0]\ngo to x: (-187) y: (10)\n\nwhen I receive [start v]\nset [play v] to [1]\nMove\n\nwhen I receive [title screen v]\nswitch costume to (costume1 v)\ngo to x: (37) y: (60)\nhide\n\nwhen I receive [start2 v]\nset [play v] to [1]\nMove\ngo to x: (-187) y: (-105)\n\ndefine DeathCheck\nforever\n    if <<(Play) = [1]> and <(Victory) = [0]>> then\n        if <<(x position) = [240]> or <(x position) > [240]>> then\n            set x to (-187)\n            set y to (-105)\n            set [xv v] to [0]\n            set [yv v] to [0]\n            broadcast (Next Stage v)\n        end\n        if <(Dead) = [0]> then\n            if <<touching (obstacles v)?> or <<touching (changingground v)?> and <(GroundColor) = [2]>>> then\n                set [xv v] to [0]\n                set [yv v] to [0]\n                change [death count: v] by (1)\n                set [dead v] to [1]\n            end\n        end\n    end\nend\n\ndefine Move\nforever\n    if <(Play) = [1]> then\n        if <(Dead) = [0]> then\n            if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n                change [xv v] by (1.1)\n                switch costume to (costume1 v)\n            end\n            if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n                change [xv v] by (-1.1)\n                switch costume to (costume2 v)\n            end\n            set [xv v] to ((xv) * (0.82))\n            change x by (xv)\n            if <<touching (ground v)?> or <<touching (changingground v)?> and <(GroundColor) = [1]>>> then\n                change y by (1)\n                if <<touching (ground v)?> or <<touching (changingground v)?> and <(GroundColor) = [1]>>> then\n                    change y by (1)\n                    if <<touching (ground v)?> or <<touching (changingground v)?> and <(GroundColor) = [1]>>> then\n                        change y by (1)\n                        if <<touching (ground v)?> or <<touching (changingground v)?> and <(GroundColor) = [1]>>> then\n                            change y by (1)\n                            if <<touching (ground v)?> or <<touching (changingground v)?> and <(GroundColor) = [1]>>> then\n                                change y by (1)\n                                if <<touching (ground v)?> or <<touching (changingground v)?> and <(GroundColor) = [1]>>> then\n                                    change x by ((xv) * (-1))\n                                    change y by (-5)\n                                end\n                                if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                    if <(xv) > [0]> then\n                                        set [xv v] to [-5]\n                                    else\n                                        set [xv v] to [5]\n                                    end\n                                    set [yv v] to [9]\n                                else\n                                    set [xv v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n            change [yv v] by (-1)\n            change y by (yv)\n            if <<touching (ground v)?> or <<touching (changingground v)?> and <(GroundColor) = [1]>>> then\n                change y by ((yv) * (-1))\n                set [yv v] to [0]\n            end\n            change y by (-1)\n            if <<touching (ground v)?> or <<touching (changingground v)?> and <(GroundColor) = [1]>>> then\n                if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                    set [yv v] to [14]\n                end\n            end\n            change y by (1)\n        end\n    end\nend\n\nwhen I receive [start v]\nDeathCheck\n\nwhen I receive [start2 v]\nDeathCheck\n\n@Ground\n\nwhen flag clicked\ngo to x: (-2) y: (-38)\nset [level v] to [0]\nset [title screen v] to [0]\nhide\n\nwhen I receive [story time! v]\nhide\n\nwhen flag clicked\nforever\n    set [groundcostume v] to (costume [number v])\nend\n\nwhen I receive [cheater!!! v]\nforever\n    switch costume to (cheater! v)\n    show variable [death count: v]\nend\n\nwhen I receive [victory!!!!! wahooo!!! v]\nshow variable [minigame deaths: v]\nshow variable [time: v]\nshow variable [death count: v]\nif <<(Time:) > [80]> and <(Time:) < (☁ World Record Time:)>> then\n    set [☁ world record time: v] to (Time:)\n    set [☁ deaths in world record time: v] to (Death Count:)\n    set [world record: v] to (join [Time: ] (join (☁ World Record Time:) (join [  Deaths: ] (☁ Deaths in World Record Time:))))\nend\nshow variable [world record: v]\nif <(Time:) > [80]> then\n    broadcast (averagetime v)\nend\n\nwhen I receive [next stage v]\nif <(Level) < [13]> then\n    if <(Level) = [12]> then\n        broadcast (cutscenep1 v)\n    else\n        next costume\n        change [level v] by (1)\n        go to x: (-2) y: (-38)\n    end\nend\nif <<(Level) > [12]> and <not <(Level) = [30]>>> then\n    if <(Level) = [16]> then\n        broadcast (cutscenep5 v)\n    else\n        next costume\n        change [level v] by (1)\n        go to x: (-2) y: (-38)\n    end\nend\n\nwhen I receive [start2 v]\nshow\ngo to x: (-2) y: (-38)\nswitch costume to (level 13 v)\nset [level v] to [13]\n\nwhen I receive [start v]\nswitch costume to (level 1 v)\nset [level v] to [1]\nshow\n\nwhen I receive [victory!!!!! wahooo!!! v]\nswitch costume to (victory v)\ngo to x: (-2) y: (0)\nset [level v] to [30]\n\nwhen I receive [averagetime v]\nif <(Level) = [30]> then\n    if <(Time:) < [10000]> then\n        change [☁ completions v] by (1)\n        change [☁ total time v] by (Time:)\n        set [☁ average time v] to ((☁ Total Time) / (☁ Completions))\n    end\nend\nshow variable [☁ average time v]\nif <(Time:) < (☁ Average Time)> then\n    broadcast (aboveaverage v)\nelse\n    broadcast (belowaverage v)\nend\n\nwhen I receive [cutscenep2 v]\nhide\n\n@Obstacles\n\nwhen flag clicked\ngo to x: (-2) y: (-38)\nset [level v] to [0]\nset [title screen v] to [0]\nhide\n\nwhen I receive [story time! v]\nhide\n\nwhen I receive [cheater!!! v]\nforever\n    switch costume to (cheater! v)\n    show variable [death count: v]\nend\n\nwhen I receive [next stage v]\nif <(Level) < [13]> then\n    if <(Level) = [12]> then\n        broadcast (cutscenep1 v)\n    else\n        next costume\n    end\nend\nif <<(Level) > [12]> and <not <(Level) = [30]>>> then\n    if <(Level) = [16]> then\n        hide\n    else\n        next costume\n    end\nend\n\nwhen I receive [start2 v]\nshow\ngo to x: (-2) y: (-38)\nswitch costume to (level 13 v)\n\nwhen I receive [start v]\nswitch costume to (level 1 v)\nset [level v] to [1]\nshow\n\nwhen I receive [victory!!!!! wahooo!!! v]\nswitch costume to (victory v)\ngo to x: (-2) y: (0)\n\nwhen I receive [cutscenep2 v]\nhide\n\n@Play\n\nwhen I receive [options menu v]\nhide\n\nwhen this sprite clicked\nbroadcast (Story Time! v)\nhide\n\nwhen I receive [start2 v]\nhide\n\ndefine Bounce\nforever\n    glide (1) secs to x: (-17) y: (-59)\n    wait (0) seconds\n    glide (1) secs to x: (-17) y: (-79)\nend\n\nwhen I receive [start v]\nwait (1) seconds\nforever\n    change [time: v] by (1)\n    wait (1) seconds\nend\n\nwhen I receive [cutscenep1 v]\nstop [other scripts in sprite v]\n\nwhen I receive [start2 v]\nwait (1) seconds\nrepeat until <(Level) = [30]>\n    change [time: v] by (1)\n    wait (1) seconds\nend\n\nwhen I receive [victory!!!!! wahooo!!! v]\nstop [other scripts in sprite v]\n\nwhen I receive [title screen v]\ngo to x: (-17) y: (-79)\nshow\nforever\n    if <(LDM MODE) = [0]> then\n        Bounce\n    else\n        go to x: (-17) y: (-59)\n    end\nend\n\n@Options\n\nwhen this sprite clicked\nbroadcast (Options Menu v)\nset [option menu v] to [1]\nset [title screen v] to [0]\n\nwhen I receive [story time! v]\nhide\n\nwhen I receive [title screen v]\ngo to x: (4) y: (-80)\nswitch costume to (options v)\nshow\nforever\n    if <(LDM MODE) = [0]> then\n        Bounce\n    else\n        go to x: (4) y: (-59)\n    end\nend\n\ndefine Bounce\nforever\n    glide (1) secs to x: (4) y: (-59)\n    wait (0) seconds\n    glide (1) secs to x: (4) y: (-80)\nend\n\nwhen I receive [options menu v]\nhide\n\nwhen I receive [start v]\nhide\n\n@Intro\n\nwhen I receive [intro v]\nset size to (135) %\ngo to [front v] layer\ngo to x: (18) y: (25)\nswitch costume to (intro v)\nclear graphic effects\nshow\nwait (1) seconds\nrepeat (5)\n    change [brightness v] effect by (-10)\nend\nswitch costume to (intro 2 v)\nset [brightness v] effect to (0)\nwait (2) seconds\nbroadcast (Title Screen v)\nset [title screen v] to [1]\nhide\n\n@StoryText\n\nwhen flag clicked\ngo to x: (6) y: (27)\nset [play v] to [0]\nset [start v] to [0]\nhide\n\nwhen I receive [story time! v]\nforever\n    repeat until <(Story) = [10]>\n        if <key (s v) pressed?> then\n            broadcast (start v)\n            hide\n            stop [other scripts in sprite v]\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [story time! v]\nshow\nset [story v] to [1]\nswitch costume to (story1 v)\nforever\n    if <(Level) = [0 ]> then\n        if <key (space v) pressed?> then\n            if <(Story) = [10]> then\n                broadcast (start v)\n                hide\n            else\n                next costume\n                change [story v] by (1)\n                wait (1) seconds\n            end\n        end\n    end\nend\n\n@LevelText\n\nwhen I receive [start v]\nif <(LDM MODE) = [0 ]> then\n    show\n    forever\n        if <(Level) = [ 1 ]> then\n            hide\n            go to x: (-3) y: (16)\n            switch costume to (leveltext1 v)\n            show\n        end\n        if <(Level) = [2]> then\n            hide\n            switch costume to (leveltext2 v)\n            show\n        end\n        if <(Level) = [3]> then\n            hide\n            go to x: (-7) y: (-84)\n            switch costume to (leveltext3 v)\n            show\n        end\n        if <(Level) = [4]> then\n            hide\n        end\n        if <(Level) = [5]> then\n            hide\n            go to x: (181) y: (-159)\n            switch costume to (leveltext5 v)\n            show\n        end\n        if <(Level) = [6]> then\n            hide\n            go to x: (76) y: (-20)\n            switch costume to (leveltext6 v)\n            show\n        end\n        if <(Level) = [7]> then\n            hide\n            go to x: (-7) y: (11)\n            switch costume to (leveltext7 v)\n            show\n        end\n        if <(Level) = [8]> then\n            hide\n            go to x: (0) y: (-130)\n            switch costume to (leveltext8 v)\n            show\n        end\n        if <(Level) = [9]> then\n            hide\n            go to x: (20) y: (7)\n            switch costume to (leveltext9 v)\n            show\n        end\n        if <(Level) = [10]> then\n            hide\n            go to x: (20) y: (20)\n            switch costume to (leveltext10 v)\n            show\n        end\n        if <(Level) = [11]> then\n            hide\n            go to x: (-37) y: (-63)\n            switch costume to (leveltext11 v)\n            show\n        end\n        if <(Level) = [12]> then\n            hide\n            go to x: (0) y: (-73)\n            switch costume to (leveltext12 v)\n            show\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [cheater!!! v]\nhide\n\nwhen I receive [victory!!!!! wahooo!!! v]\nhide\n\nwhen I receive [start2 v]\nif <(LDM MODE) = [0 ]> then\n    show\n    forever\n        if <(Level) = [13]> then\n            hide\n            go to x: (0) y: (-15)\n            switch costume to (leveltext13 v)\n            show\n        end\n        if <(Level) = [14]> then\n            hide\n        end\n        if <(Level) = [15]> then\n            hide\n            go to x: (0) y: (0)\n            switch costume to (leveltext15 v)\n            show\n        end\n        if <(Level) = [16]> then\n            hide\n            go to x: (0) y: (0)\n            switch costume to (leveltext16 v)\n            show\n        end\n    end\nend\n\nwhen I receive [cutscenep2 v]\nstop [other scripts in sprite v]\nhide\n\nif <(Level) = [12]> then\n    if <(Level) = [12]> then\n        hide\n        go to x: (0) y: (-73)\n        switch costume to (leveltext12 v)\n        show\n    end\n    hide\n    go to x: (0) y: (-73)\n    switch costume to (leveltext12 v)\n    show\nend\n\nswitch costume to (leveltext13 v)\nshow\n\nwhen I receive [aboveaverage v]\ngo to x: (32) y: (-171)\nswitch costume to (above average v)\nshow\n\nwhen I receive [belowaverage v]\ngo to x: (18) y: (-145)\nswitch costume to (below average v)\nshow\n\n@UpArrow\n\nwhen I receive [options menu v]\nshow\n\nwhen flag clicked\ngo to x: (51) y: (-46)\nset size to (80) %\nhide\n\nwhen flag clicked\nforever\n    if <(Option Menu) = [1]> then\n        show\n    end\n    if <(Option Menu) = [0]> then\n        hide\n    end\nend\n\nwhen flag clicked\nset [option menu v] to [0]\n\nwhen I receive [title screen v]\nhide\n\nwhen flag clicked\nset [volume v] to [0]\n\nwhen this sprite clicked\nif <not <(Volume) = [100]>> then\n    broadcast (VolUp v)\nend\n\n@DownArrow\n\nwhen I receive [options menu v]\nshow\n\nwhen flag clicked\ngo to x: (58) y: (-33)\nset size to (79) %\nhide\n\nwhen I receive [title screen v]\nhide\n\nwhen flag clicked\nforever\n    if <(Option Menu) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <not <(Volume) = [0]>> then\n    broadcast (VolDown v)\nend\n\n@Back\n\nwhen this sprite clicked\nif <(Option Menu) = [1]> then\n    broadcast (Title Screen v)\n    set [title screen v] to [1]\n    set [option menu v] to [0]\nend\n\nwhen flag clicked\ngo to x: (-22) y: (-172)\nset size to (90) %\nhide\n\nwhen I receive [options menu v]\nset [option menu v] to [1]\nshow\n\nwhen I receive [title screen v]\nhide\n\n@Volume\n\nwhen flag clicked\nhide\n\nwhen I receive [options menu v]\nshow\ngo to x: (-88) y: (14)\nrepeat until <(Title Screen) = [1]>\n    if <(Volume) = [100]> then\n        switch costume to (vol100 v)\n    end\n    if <(Volume) = [90]> then\n        switch costume to (vol90 v)\n    end\n    if <(Volume) = [80]> then\n        switch costume to (vol80 v)\n    end\n    if <(Volume) = [70]> then\n        switch costume to (vol70 v)\n    end\n    if <(Volume) = [60]> then\n        switch costume to (vol60 v)\n    end\n    if <(Volume) = [50]> then\n        switch costume to (vol50 v)\n    end\n    if <(Volume) = [40]> then\n        switch costume to (vol40 v)\n    end\n    if <(Volume) = [30]> then\n        switch costume to (vol30 v)\n    end\n    if <(Volume) = [20]> then\n        switch costume to (vol20 v)\n    end\n    if <(Volume) = [10]> then\n        switch costume to (vol10 v)\n    end\n    if <(Volume) = [0]> then\n        switch costume to (vol0 v)\n    end\nend\n\nwhen I receive [title screen v]\nhide\n\n@Tree1\n\nwhen flag clicked\nhide\n\nwhen I receive [treecheck v]\nset size to (80) %\nforever\n    if <<(Level) > [6]> and <(Level) < [13]>> then\n        go to x: (-98) y: (-112)\n        show\n        forever\n            if <(LDM) = [0]> then\n                wait (pick random (3) to (5)) seconds\n                repeat until <(costume [number v]) = [7]>\n                    wait (0) seconds\n                    next costume\n                end\n                wait (pick random (3) to (5)) seconds\n                repeat until <(costume [number v]) = [1]>\n                    wait (0) seconds\n                    switch costume to ((costume [number v]) - (1))\n                end\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [cheater!!! v]\nhide\n\nwhen I receive [victory!!!!! wahooo!!! v]\nhide\n\nwhen I receive [start2 v]\nbroadcast (TreeCheck v)\nbroadcast (LDMCheck v)\n\nwhen I receive [next stage v]\nstop [other scripts in sprite v]\nbroadcast (TreeCheck v)\nbroadcast (LDMCheck v)\n\nwhen I receive [ldmoff v]\nif <<(Level) > [6]> and <(Level) < [13]>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [ldmcheck v]\nforever\n    if <<(LDM) = [1]> or <(LDM MODE) = [1]>> then\n        hide\n    end\nend\n\n@Tree2\n\nwhen flag clicked\nhide\n\nwhen I receive [treecheck v]\nset size to (80) %\nforever\n    if <<(Level) > [6]> and <(Level) < [13]>> then\n        go to x: (112) y: (-112)\n        show\n        forever\n            if <(LDM) = [0]> then\n                wait (pick random (3) to (5)) seconds\n                repeat until <(costume [number v]) = [7]>\n                    wait (0) seconds\n                    next costume\n                end\n                wait (pick random (3) to (5)) seconds\n                repeat until <(costume [number v]) = [1]>\n                    wait (0) seconds\n                    switch costume to ((costume [number v]) - (1))\n                end\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [cheater!!! v]\nhide\n\nwhen I receive [victory!!!!! wahooo!!! v]\nhide\n\nwhen I receive [start2 v]\nbroadcast (TreeCheck v)\nbroadcast (LDMCheck v)\n\nwhen I receive [ldmcheck v]\nforever\n    if <<(LDM) = [1]> or <(LDM MODE) = [1]>> then\n        hide\n    end\nend\n\nwhen I receive [ldmoff v]\nif <<(Level) > [6]> and <(Level) < [13]>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [next stage v]\nstop [other scripts in sprite v]\nbroadcast (TreeCheck v)\nbroadcast (LDMCheck v)\n\n@CheaterDetector\n\nwhen flag clicked\nset [groundcostume v] to [0]\nhide\n\nwhen I receive [start v]\nwait (0.25) seconds\nforever\n    if <not <(Level) = [30]>> then\n        if <not <(GroundCostume) = (Level)>> then\n            broadcast (CHEATER!!! v)\n        end\n    end\nend\n\n@ChangingGround\n\nwhen flag clicked\nswitch costume to (clone1 v)\nhide\n\nwhen I receive [story time! v]\nhide\n\nwhen I receive [next stage v]\nforever\n    if <<(Level) = [8]> or <(Level) = [10]>> then\n        if <(Level) = [8]> then\n            show\n            go to x: (-147) y: (123)\n            create clone of (_myself_ v)\n            go to x: (-52) y: (44)\n            create clone of (_myself_ v)\n            hide\n            stop [this script v]\n        end\n        if <(Level) = [10]> then\n            show\n            go to x: (-183) y: (-56)\n            create clone of (_myself_ v)\n            go to x: (-71) y: (31)\n            create clone of (_myself_ v)\n            go to x: (33) y: (30)\n            create clone of (_myself_ v)\n            go to x: (119) y: (-27)\n            create clone of (_myself_ v)\n            go to x: (207) y: (30)\n            create clone of (_myself_ v)\n            hide\n            repeat (10)\n                set [groundcolor v] to [1]\n            end\n            stop [this script v]\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [cheater!!! v]\nhide\n\nwhen I receive [victory!!!!! wahooo!!! v]\nhide\n\nwhen I start as a clone\nwait (2) seconds\nshow\nforever\n    if <(Level) = [8]> then\n        repeat until <not <(Level) = [8]>>\n            switch costume to (clone1 v)\n            set [groundcolor v] to [1]\n            if <(Level) = [8]> then\n                repeat (10)\n                    if <(Level) = [8]> then\n                        wait (0.3) seconds\n                    end\n                end\n            end\n            switch costume to (clone2 v)\n            set [groundcolor v] to [2]\n            if <(Level) = [8]> then\n                repeat (10)\n                    if <(Level) = [8]> then\n                        wait (0.3) seconds\n                    end\n                end\n            end\n        end\n        delete this clone\n    end\n    if <(Level) = [10]> then\n        repeat until <not <(Level) = [10]>>\n            set [groundcolor v] to [1]\n            switch costume to (clone1 v)\n            repeat (10)\n                if <(Level) = [10]> then\n                    wait (0.3) seconds\n                end\n            end\n            set [groundcolor v] to [2]\n            switch costume to (clone2 v)\n            if <(Level) = [10]> then\n                repeat (10)\n                    if <(Level) = [10]> then\n                        wait (0.3) seconds\n                    end\n                end\n            end\n        end\n        delete this clone\n    end\nend\n\ndefine delete this clone\ndelete this clone\n\n@Map\n\nwhen flag clicked\ngo to x: (-15) y: (3)\nhide\n\nwhen I receive [map v]\ngo to [front v] layer\nshow\nset size to (105) %\n\nwhen I receive [mapback v]\nhide\n\n@Cutscene\n\nwhen flag clicked\nset [cutscene2 v] to [0]\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [cutscenep2 v]\nshow\n\nwhen I receive [start2 v]\nhide\n\n@TextCutscene\n\nwhen flag clicked\nswitch costume to (scenetext1 v)\ngo to x: (-76) y: (3)\nhide\nset [cutscene v] to [0]\nset [cutscenetext v] to [0]\n\nwhen I receive [cutscenep2 v]\nset [cutscenetext v] to [1]\nswitch costume to (scenetext1 v)\nshow\n\nwhen I receive [cutscenetext v]\nswitch costume to (scenetext8 v)\n\nwhen I receive [start2 v]\nhide\n\nwhen [space v] key pressed\nif <(Cutscene) = [1]> then\n    Text\nend\nwait until <not <key (space v) pressed?>>\n\nwhen I receive [start2 v]\nset [cutscene v] to [0]\n\ndefine Text\nif <<(CutsceneText) = [1]> or <<(CutsceneText) = [2]> or <<(CutsceneText) = [3]> or <<(CutsceneText) = [4]> or <<(CutsceneText) = [5]> or <(CutsceneText) = [6]>>>>>> then\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    change [cutscenetext v] by (1)\n    next costume\n    wait (0.1) seconds\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nelse\n    if <(CutsceneText) = [7]> then\n        broadcast (CutsceneP3 v)\n        set [cutscene v] to [0]\n    end\n    if <(Cutscene2) = [1]> then\n        broadcast (CutsceneP4 v)\n        set [cutscene v] to [0]\n        set [cutscene2 v] to [0]\n        wait (1) seconds\n        hide\n    end\nend\n\n@Fade In/Out\n\nwhen I receive [cutscenep1 v]\nif <(LDM MODE) = [0]> then\n    go to [front v] layer\n    show\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    wait (2) seconds\n    broadcast (CutsceneP2 v)\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    set [cutscene v] to [1]\nelse\n    set [ghost v] effect to (0)\n    wait (2) seconds\n    broadcast (CutsceneP2 v)\n    set [ghost v] effect to (100)\n    set [cutscene v] to [1]\nend\n\nwhen I receive [cutscenep3 v]\nif <(LDM MODE) = [0]> then\n    go to [front v] layer\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    wait (2) seconds\n    broadcast (CutsceneText v)\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    set [cutscene v] to [1]\n    set [cutscene2 v] to [1]\nelse\n    set [ghost v] effect to (0)\n    wait (2) seconds\n    broadcast (CutsceneText v)\n    set [ghost v] effect to (100)\n    set [cutscene v] to [1]\n    set [cutscene2 v] to [1]\nend\n\nwhen flag clicked\ngo to [front v] layer\ngo to x: (0) y: (0)\nhide\nset [ghost v] effect to (100)\n\nwhen I receive [cutscenep4 v]\nif <(LDM MODE) = [0]> then\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    wait (2) seconds\n    broadcast (Start2 v)\n    go to [front v] layer\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    set [cutscene v] to [0]\n    set [cutscene2 v] to [0]\nelse\n    set [ghost v] effect to (0)\n    wait (2) seconds\n    broadcast (Start2 v)\n    set [ghost v] effect to (100)\n    set [cutscene v] to [0]\n    set [cutscene2 v] to [0]\nend\n\nwhen I receive [cutscenep5 v]\nif <(LDM MODE) = [0]> then\n    go to [front v] layer\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    wait (2) seconds\n    broadcast (Victory!!!!! WAHOOO!!! v)\n    set [level v] to [30]\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\nelse\n    set [ghost v] effect to (0)\n    wait (2) seconds\n    broadcast (Victory!!!!! WAHOOO!!! v)\n    set [level v] to [30]\n    set [ghost v] effect to (100)\nend\n\n@MapButtons\n\nwhen flag clicked\nswitch costume to (mapbutton v)\ngo to x: (204) y: (147)\nset [map v] to [0]\nhide\n\nwhen this sprite clicked\nif <(Map) = [0]> then\n    broadcast (Map v)\n    set [map v] to [1]\nelse\n    broadcast (MapBack v)\n    set [map v] to [0]\nend\n\nwhen I receive [cutscenep2 v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [mapback v]\ngo to x: (204) y: (147)\nswitch costume to (mapbutton v)\ngo to [front v] layer\nshow\n\nwhen I receive [map v]\nswitch costume to (back v)\nrepeat (2)\n    go to [front v] layer\nend\n\nwhen I receive [start2 v]\ngo to [front v] layer\nshow\n\nwhen I receive [start v]\ngo to [front v] layer\nforever\n    if <<(Level) > [7]> or <(Level) = [7]>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Map) = [1]> then\n        if <touching (mouse-pointer v)?> then\n            set size to (125) %\n            go to x: (-187) y: (129)\n            wait until <not <touching (mouse-pointer v)?>>\n        else\n            set size to (100) %\n            go to x: (-192) y: (133)\n        end\n    end\nend\n\nwhen I receive [start2 v]\nshow\nwait (1) seconds\ngo to [front v] layer\n\nwhen I receive [victory!!!!! wahooo!!! v]\nhide\n\nwhen I receive [start2 v]\nforever\n    if <(Map) = [1]> then\n        if <touching (mouse-pointer v)?> then\n            set size to (125) %\n            go to x: (-187) y: (129)\n            wait until <not <touching (mouse-pointer v)?>>\n        else\n            set size to (100) %\n            go to x: (-192) y: (133)\n        end\n    end\nend\n\n@MapLocation\n\nwhen flag clicked\nset size to (105) %\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [7]> then\n        go to x: (-107) y: (-84)\n    end\n    if <(Level) = [8]> then\n        go to x: (-89) y: (-82)\n    end\n    if <(Level) = [9]> then\n        go to x: (-50) y: (-80)\n    end\n    if <(Level) = [10]> then\n        go to x: (-25) y: (-90)\n    end\n    if <(Level) = [11]> then\n        go to x: (-10) y: (-107)\n    end\n    if <(Level) = [12]> then\n        go to x: (19) y: (-131)\n    end\n    if <(Level) = [13]> then\n        go to x: (46) y: (-126)\n    end\n    if <(Level) = [14]> then\n        go to x: (64) y: (-110)\n    end\n    if <(Level) = [15]> then\n        go to x: (83) y: (-104)\n    end\n    if <(Level) = [16]> then\n        go to x: (92) y: (-109)\n    end\nend\n\nwhen I receive [mapback v]\nhide\n\nwhen I receive [map v]\nif <(LDM MODE) = [0]> then\n    show\n    repeat (10)\n        go to [front v] layer\n    end\nend\n\nwhen I receive [ldm mode on v]\nstop [other scripts in sprite v]\n\n@Snow\n\nwhen I start as a clone\ngo to x: (pick random (-230) to (182)) y: (180)\nset size to (pick random (50) to (15)) %\nset [y-var v] to (pick random (-3) to (-5))\nif <(LDM) = [0]> then\n    show\n    repeat until <(y position) < [-175]>\n        change y by (y-var)\n    end\nend\ndelete this clone\n\nwhen I receive [cheater!!! v]\nstop [other scripts in sprite v]\n\nwhen I receive [start2 v]\nforever\n    if <<(Level) = [13]> or <(Level) > [13]>> then\n        if <<(LDM) = [0]> and <(LDM MODE) = [0]>> then\n            create clone of (_myself_ v)\n            wait (0.5) seconds\n        end\n    end\nend\n\nwhen flag clicked\ngo [backward v] (10) layers\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [victory!!!!! wahooo!!! v]\nset [ldm v] to [1]\nset [y-var v] to [-40]\nwait (3) seconds\nstop [other scripts in sprite v]\n\nwhen I receive [ldm mode on v]\nforever\n    stop [other scripts in sprite v]\nend\n\n@Thumbnail\n\nwhen flag clicked\nset size to (135) %\ngo to [front v] layer\nshow\ngo to x: (0) y: (30)\nbroadcast (Intro v)\n\nwhen I receive [intro v]\nhide\n\n@Title Screen\n\nwhen flag clicked\nswitch costume to (title screen v)\ngo to x: (-2) y: (-38)\nset [level v] to [0]\nset [title screen v] to [0]\nhide\n\nwhen I receive [title screen v]\ngo to x: (-2) y: (-38)\nshow\nforever\n    if <(LDM MODE) = [0]> then\n        Bounce\n    else\n        go to x: (-2) y: (-20)\n    end\nend\n\nwhen I receive [story time! v]\nhide\n\nwhen I receive [start v]\nhide\n\ndefine Bounce\nforever\n    glide (1) secs to x: (-2) y: (-20)\n    wait (0) seconds\n    glide (1) secs to x: (-2) y: (-38)\nend\n\nwhen I receive [options menu v]\nhide\n\n@Ending\n\nwhen I start as a clone\ngo to x: (pick random (-230) to (182)) y: (180)\nset size to (pick random (45) to (20)) %\nswitch costume to (pick random (1) to (2))\nset [y-var v] to (pick random (-3) to (-5))\nif <(LDM) = [0]> then\n    show\n    repeat until <(y position) < [-175]>\n        change y by (y-var)\n    end\nend\ndelete this clone\n\nwhen flag clicked\nset [ldm v] to [0]\nforever\n    if <key (l v) pressed?> then\n        wait (0.1) seconds\n        if <not <(LDM) = [0]>> then\n            repeat (3)\n                set [ldm v] to [0]\n                broadcast (LDMoff v)\n            end\n        else\n            repeat (3)\n                set [ldm v] to [1]\n            end\n        end\n    end\nend\n\nwhen flag clicked\ngo [backward v] (10) layers\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [victory!!!!! wahooo!!! v]\nwait (4) seconds\nset [ldm v] to [0]\nforever\n    if <<(LDM) = [0]> and <(LDM MODE) = [0]>> then\n        create clone of (_myself_ v)\n        wait (0.5) seconds\n    end\nend\n\nwhen I receive [cheater!!! v]\nstop [other scripts in sprite v]\n\nwhen I receive [ldm mode on v]\nforever\n    stop [other scripts in sprite v]\nend\n\n@LDM Mode:\n\nwhen this sprite clicked\nif <(LDM MODE) = [0]> then\n    set [ldm mode v] to [1]\n    switch costume to (ldm on v)\nelse\n    switch costume to (ldm off v)\n    set [ldm mode v] to [0]\nend\n\nwhen I receive [options menu v]\ngo to x: (-35) y: (96)\nset size to (100) %\nshow\n\nwhen I receive [title screen v]\nhide\n\nwhen I receive [start v]\nif <(LDM MODE) = [1]> then\n    broadcast (LDM Mode On v)\nend\n\nwhen flag clicked\nhide\nswitch costume to (ldm off v)\nhide variable [ldm mode v]\nset [ldm mode v] to [0]\n\n