★ Scratchy's Adventure ★                         #games #scratch #platformer #adventure #all
@Stage\n\ndefine Check 0s\nrepeat ((3) - (length of ([floor v] of ((Count) mod (1000)) )))\n    set [0.001 seconds v] to (join [0] (0.001 Seconds))\nend\n\nwhen I receive [fade in v]\nif <not <(In Fade?) = [1]>> then\n    set [previous volume v] to (Music Volume)\nend\nset [in fade? v] to [1]\nrepeat until <(round (Music Volume)) = [0]>\n    change [music volume v] by (((0) - (Music Volume)) / (3.25))\nend\nset [music volume v] to [0]\nstop [other scripts in sprite v]\nwait (0.1) seconds\nset [music volume v] to (Previous Volume)\nset [in fade? v] to [0]\n\nwhen I receive [start v]\nset [pitch v] effect to (0)\nforever\n    set volume to (Music Volume) %\nend\n\nwhen I receive [start v]\nswitch backdrop to (title screen v)\n\nwhen flag clicked\nclear graphic effects\nswitch backdrop to (title screen v)\nif <(In Fade?) = [1]> then\n    set [music volume v] to (Previous Volume)\nend\nset [in fade? v] to [0]\n\nwhen I receive [start v]\nset volume to (Music Volume) %\nplay sound [Title Screen - Start v] until done\nforever\n    play sound [Title Screen - Loop v] until done\nend\n\nwhen I receive [main menu v]\nswitch backdrop to (main menu v)\n\nwhen I receive [main menu v]\nset volume to (Music Volume) %\nforever\n    play sound [Main Menu v] until done\nend\n\nwhen I receive [load level v]\nset volume to (Music Volume) %\nplay sound (join (join [Level ] (Level#)) [ - Start]) until done\nforever\n    play sound (join (join [Level ] (Level#)) [ - Loop]) until done\nend\n\nwhen I receive [load level v]\nforever\n    if <(Pause?) = [False]> then\n        set [pitch v] effect to (0)\n        set volume to (Music Volume) %\n    else\n        set [pitch v] effect to ((-1) / (0))\n        set volume to (0) %\n    end\nend\n\nwhen I receive [load level v]\nswitch backdrop to (join [Level ] (Level#))\n\nwhen I receive [enter a level v]\nif <not <(In Fade?) = [1]>> then\n    set [previous volume v] to (Music Volume)\nend\nset [in fade? v] to [1]\nrepeat until <(round (Music Volume)) = [0]>\n    change [music volume v] by (((0) - (Music Volume)) / (3.25))\nend\nset [music volume v] to [0]\nstop [other scripts in sprite v]\nwait (0.1) seconds\nset [music volume v] to (Previous Volume)\nset [in fade? v] to [0]\n\nwhen I receive [win v]\nstop [other scripts in sprite v]\nset [count v] to ([floor v] of ((Timer) * (1000)) )\nif <([floor v] of (((Count) / (1000)) / (60)) ) > [9]> then\n    set [minutes v] to [10]\n    set [seconds v] to [00]\n    set [0.001 seconds v] to [000]\nelse\n    set [minutes v] to ([floor v] of (((Count) / (1000)) / (60)) )\n    set [seconds v] to ([floor v] of (((Count) / (1000)) mod (60)) )\n    set [0.001 seconds v] to ([floor v] of ((Count) mod (1000)) )\n    Check 0s\nend\nif <(Minutes) > [9]> then\n    set [time v] to [Too long]\nelse\n    if <([floor v] of (Seconds) ) > [9]> then\n        set [time v] to (join (Minutes) (join [:] (join (Seconds) (join [.] (0.001 Seconds)))))\n    else\n        set [time v] to (join (Minutes) (join [:] (join [0] (join (Seconds) (join [.] (0.001 Seconds))))))\n    end\nend\n\nwhen I receive [level results v]\nswitch backdrop to (main menu v)\n\nwhen I receive [load level v]\nset [minutes v] to [0]\nset [seconds v] to [00]\nset [0.001 seconds v] to [000]\nforever\n    set [count v] to ([floor v] of ((Timer) * (1000)) )\n    if <([floor v] of (((Count) / (1000)) / (60)) ) > [9]> then\n        set [minutes v] to [10]\n        set [seconds v] to [00]\n        set [0.001 seconds v] to [000]\n    else\n        set [minutes v] to ([floor v] of (((Count) / (1000)) / (60)) )\n        set [seconds v] to ([floor v] of (((Count) / (1000)) mod (60)) )\n        set [0.001 seconds v] to ([floor v] of ((Count) mod (1000)) )\n        Check 0s\n    end\n    if <(Minutes) > [9]> then\n        set [time v] to [Too long]\n    else\n        if <([floor v] of (Seconds) ) > [9]> then\n            set [time v] to (join (Minutes) (join [:] (join (Seconds) (join [.] (0.001 Seconds)))))\n        else\n            set [time v] to (join (Minutes) (join [:] (join [0] (join (Seconds) (join [.] (0.001 Seconds))))))\n        end\n    end\nend\n\nwhen I receive [load level v]\nreset timer\nset [count v] to [0]\nset [timer offset v] to [0]\nforever\n    if <(Pause?) = [False]> then\n        set [timer v] to ((timer) - (timer offset))\n    else\n        set [timer offset v] to ((timer) - (Timer))\n    end\nend\n\nwhen I receive [main menu v]\nset [pitch v] effect to (0)\nforever\n    set volume to (Music Volume) %\nend\n\nwhen I receive [thanks for playing v]\nswitch backdrop to (thanks for playing! v)\nset volume to (Music Volume) %\nplay sound [Thanks for playing! v] until done\nbroadcast (Back to Level Select v)\n\nwhen I receive [extras menu v]\nswitch backdrop to (main menu v)\n\nwhen I receive [extras menu v]\nset volume to (Music Volume) %\nforever\n    play sound [Main Menu v] until done\nend\n\nwhen I receive [extras menu v]\nset [pitch v] effect to (0)\nforever\n    set volume to (Music Volume) %\nend\n\nwhen I receive [extras game v]\nswitch backdrop to (join [Minigame ] (Minigame#))\n\nwhen I receive [extras game v]\nset volume to (Music Volume) %\nforever\n    play sound (join [Minigame ] (Minigame#)) until done\nend\n\nwhen I receive [extras game v]\nforever\n    if <(Pause?) = [False]> then\n        set [pitch v] effect to (0)\n        set volume to (Music Volume) %\n    else\n        set [pitch v] effect to ((-1) / (0))\n        set volume to (0) %\n    end\nend\n\n@Thumbnail\n\nswitch costume to (thumbnail v)\ngo to x: (0) y: (0)\nset [intro? v] to [True]\ngo to [front v] layer\nset size to (100) %\nclear graphic effects\nshow\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\ngo to [front v] layer\nset size to (100) %\nswitch costume to (stopping by v)\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\nend\n\n@Intro\n\nwhen flag clicked\nclear graphic effects\ngo to x: (0) y: (0)\nset size to (100) %\npoint in direction (90)\nshow\nset [brightness v] effect to (-100)\nif <(Intro?) = [True]> then\n    set [intro? v] to [False]\n    Reset\n    repeat (20)\n        change [brightness v] effect by (5)\n    end\n    start sound [Logo v]\n    wait (1.5) seconds\n    set [brightness v] effect to (0)\n    repeat (20)\n        change [brightness v] effect by (-5)\n    end\nend\nbroadcast (Start v)\nset [ghost v] effect to (0)\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (10)\nend\nhide\n\ndefine Reset\nset [music volume v] to [100]\nset [sound volume v] to [100]\nset [less animations? v] to [False]\nset [all cleared? v] to [0]\ndelete all of [cleared levels v]\nrepeat (4)\n    add [0] to [cleared levels v]\nend\n\n@Title Screen\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nset [selected level v] to [1]\nwait (0.4) seconds\nclear graphic effects\nset [id v] to [Logo]\ncreate clone of (_myself_ v)\nset [id v] to [Main]\nwait (1.25) seconds\nbroadcast (Menu v)\n\nwhen I start as a clone\nif <(ID) = [Logo]> then\n    set [sin v] to [0]\n    switch costume to (logo v)\n    point in direction (90)\n    clear graphic effects\n    show\n    set size to (100) %\n    go to x: (0) y: (1000)\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    set [y v] to [0]\n    repeat until <<(y position) < [83]> and <(round (Y)) = [0]>>\n        change [y v] by (-1.3)\n        if <<(y position) < [80]> or <(y position) = [80]>> then\n            broadcast (Boing v)\n            set [y v] to ((Y) * (-0.31))\n            change y by (Y)\n        end\n        change y by (Y)\n        change [ghost v] effect by (-10)\n    end\n    set y to (80)\nelse\n    if <(ID) = [Logo - 2]> then\n        set [sin v] to [0]\n        go to x: (0) y: (80)\n        switch costume to (logo v)\n        point in direction (90)\n        clear graphic effects\n        show\n        set size to (100) %\n        go to [front v] layer\n        set [ghost v] effect to (100)\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n    else\n        delete this clone\n    end\nend\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@Title Buttons\n\ndefine Show\nset [can i click menus? v] to [False]\nset [id v] to [Start]\ncreate clone of (_myself_ v)\nset [id v] to [Extras]\ncreate clone of (_myself_ v)\nset [id v] to [How to play]\ncreate clone of (_myself_ v)\nset [id v] to [Options]\ncreate clone of (_myself_ v)\nset [id v] to [Main]\nset [can i click menus? v] to [True]\n\nwhen flag clicked\nhide\n\nwhen I receive [menu v]\nif <(ID) = [Main]> then\n    go to [front v] layer\n    say []\n    clear graphic effects\n    Show\nend\n\nwhen I start as a clone\nsay []\nshow\nset x to (0)\nset size to (100) %\nif <(ID) = [Start]> then\n    switch costume to (start v)\n    set y to (-65)\nelse\n    if <(ID) = [Extras]> then\n        switch costume to (extras v)\n        set y to (-130)\n    else\n        if <(ID) = [How to play]> then\n            switch costume to (how to play v)\n            set x to (-201)\n            set y to (-140)\n        else\n            if <(ID) = [Options]> then\n                switch costume to (options v)\n                set x to (201)\n                set y to (-140)\n            else\n                delete this clone\n            end\n        end\n    end\nend\nset [brightness v] to [0]\nset [x v] to [0]\nset [y v] to (y position)\nforever\n    if <(Less animations?) = [True]> then\n        if <(Can I click menus?) = [True]> then\n            if <touching (mouse-pointer v)?> then\n                if <mouse down?> then\n                    set [brightness v] to [-30]\n                    set size to (90) %\n                else\n                    set [brightness v] to [30]\n                    set size to (110) %\n                end\n            else\n                say []\n                set [brightness v] to [0]\n                set size to (100) %\n            end\n        else\n            say []\n            set size to (100) %\n            set [brightness v] to [0]\n        end\n        set [x v] to [0]\n    else\n        if <(Can I click menus?) = [True]> then\n            if <touching (mouse-pointer v)?> then\n                if <mouse down?> then\n                    set [sin 2 v] to [0]\n                    change [brightness v] by (((-30) - (Brightness)) / (3))\n                    change [x v] by (((90) - (size)) / (3))\n                else\n                    change [sin 2 v] by (15)\n                    change [brightness v] by (((30) - (Brightness)) / (3))\n                    change [x v] by ((((([sin v] of (sin 2) ) * (3)) + (110)) - (size)) / (3))\n                end\n            else\n                say []\n                set [sin 2 v] to [0]\n                change [brightness v] by (((0) - (Brightness)) / (3))\n                change [x v] by (((100) - (size)) / (3))\n            end\n        else\n            say []\n            change [brightness v] by (((0) - (Brightness)) / (3))\n            change [x v] by (((100) - (size)) / (3))\n        end\n        set [x v] to ((x) * (0.65))\n        change size by (x)\n    end\n    set [brightness v] effect to (Brightness)\nend\n\nwhen I start as a clone\nforever\n    if <touching (mouse-pointer v)?> then\n        if <(Can I click menus?) = [True]> then\n            broadcast (Hover SFX v)\n            wait until <not <touching (mouse-pointer v)?>>\n        end\n    end\nend\n\nwhen this sprite clicked\nwait until <not <mouse down?>>\nif <touching (mouse-pointer v)?> then\n    if <(Can I click menus?) = [True]> then\n        if <(ID) = [Start]> then\n            set [brightness v] to [50]\n            change [x v] by (30)\n            set [can i click menus? v] to [False]\n            set [mode# v] to [Main Game]\n            broadcast (Start Game v)\n        else\n            if <(ID) = [Extras]> then\n                set [brightness v] to [50]\n                change [x v] by (30)\n                set [can i click menus? v] to [False]\n                set [mode# v] to [Extras]\n                broadcast (To Extras Menu v)\n            else\n                if <(ID) = [How to play]> then\n                    set [brightness v] to [50]\n                    change [x v] by (30)\n                    set [can i click menus? v] to [False]\n                    broadcast (Select SFX v)\n                    broadcast (How to play v)\n                else\n                    if <(ID) = [Options]> then\n                        set [brightness v] to [50]\n                        change [x v] by (30)\n                        set [can i click menus? v] to [False]\n                        broadcast (Select SFX v)\n                        broadcast (Options v)\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I start as a clone\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\n@Options Menu\n\nwhen I receive [start v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [exit options v]\nif <not <(ID) = [Main]>> then\n    repeat (10)\n        if <(ID) = [Black]> then\n            change [ghost v] effect by (5)\n        else\n            change [ghost v] effect by (10)\n        end\n    end\n    hide\n    set [can i click menus? v] to [True]\n    delete this clone\nend\n\nwhen I start as a clone\nset volume to (Sound Volume) %\n\nwhen I start as a clone\nshow\nclear graphic effects\ngo to x: (x) y: (y position)\nset [ghost v] effect to (100)\nrepeat (10)\n    if <(ID) = [Black]> then\n        change [ghost v] effect by (-5)\n    else\n        change [ghost v] effect by (-10)\n    end\nend\n\nwhen I receive [options v]\nif <(ID) = [Main]> then\n    go to [front v] layer\n    wait (0) seconds\n    clear graphic effects\n    set [can i click menus 2 v] to [False]\n    set [delay v] to [0]\n    set [orgin v] to [0]\n    set y to (0)\n    set [id v] to [Black]\n    set [x v] to [0]\n    create clone of (_myself_ v)\n    set y to (140)\n    set [id v] to [Options]\n    set [x v] to [0]\n    create clone of (_myself_ v)\n    set y to (-140)\n    set [id v] to [Back]\n    set [x v] to [-201]\n    create clone of (_myself_ v)\n    set y to (-40)\n    set [id v] to [Less animations]\n    set [x v] to [0]\n    create clone of (_myself_ v)\n    set y to (-85)\n    set [id v] to [Animations]\n    set [x v] to [0]\n    create clone of (_myself_ v)\n    set [max v] to (delay)\n    set [id v] to [Main]\n    set [can i click menus 2 v] to [True]\nend\n\nwhen I start as a clone\nif <(ID) = [Options]> then\n    switch costume to (options v)\nelse\n    if <(ID) = [Less animations]> then\n        switch costume to (less animations text v)\n    else\n        if <(ID) = [Animations]> then\n            switch costume to (less animations off v)\n        else\n            if <(ID) = [Back]> then\n                switch costume to (back v)\n            else\n                if <(ID) = [Black]> then\n                    switch costume to (black v)\n                else\n                    delete this clone\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (mouse-pointer v)?> then\n        if <not <<(ID) = [Less animations]> or <<(ID) = [Options]> or <(ID) = [Black]>>>> then\n            if <(Can I click menus 2) = [True]> then\n                broadcast (Hover SFX v)\n                wait until <not <touching (mouse-pointer v)?>>\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nset size to (100) %\nset [size v] to [0]\nset [current size v] to [100]\nset [brightness v] to [0]\nset [vel 2 v] to [0]\nif <not <<(ID) = [Less animations]> or <<(ID) = [Options]> or <(ID) = [Black]>>>> then\n    forever\n        if <(ID) = [Animations]> then\n            if <(Less animations?) = [True]> then\n                switch costume to (less animations on v)\n            else\n                switch costume to (less animations off v)\n            end\n        end\n        if <(Less animations?) = [True]> then\n            if <(ID) = [Animations]> then\n                if <(Can I click menus 2) = [True]> then\n                    if <touching (mouse-pointer v)?> then\n                        if <mouse down?> then\n                            set [brightness v] to [-30]\n                        else\n                            set [brightness v] to [20]\n                        end\n                    else\n                        set [brightness v] to [0]\n                    end\n                else\n                    set [brightness v] to [0]\n                end\n                set [current size v] to [100]\n            else\n                if <(Can I click menus 2) = [True]> then\n                    if <touching (mouse-pointer v)?> then\n                        if <mouse down?> then\n                            set [brightness v] to [-30]\n                            set [current size v] to [90]\n                        else\n                            set [brightness v] to [30]\n                            set [current size v] to [110]\n                        end\n                    else\n                        set [brightness v] to [0]\n                        set [current size v] to [100]\n                    end\n                else\n                    set [brightness v] to [0]\n                    set [current size v] to [100]\n                end\n            end\n            set [size v] to ((size) * (0.65))\n            set size to (Current size) %\n            set [brightness v] effect to (Brightness)\n        else\n            if <(ID) = [Animations]> then\n                if <(Can I click menus 2) = [True]> then\n                    if <touching (mouse-pointer v)?> then\n                        if <mouse down?> then\n                            set [vel 2 v] to [0]\n                            change [brightness v] by (((-30) - (Brightness)) / (3))\n                        else\n                            change [brightness v] by (((20) - (Brightness)) / (3))\n                        end\n                    else\n                        set [vel 2 v] to [0]\n                        change [brightness v] by (((0) - (Brightness)) / (3))\n                    end\n                else\n                    set [vel 2 v] to [0]\n                    change [brightness v] by (((0) - (Brightness)) / (3))\n                end\n                change [size v] by (((100) - (Current size)) / (3))\n            else\n                if <(Can I click menus 2) = [True]> then\n                    if <touching (mouse-pointer v)?> then\n                        if <mouse down?> then\n                            set [vel 2 v] to [0]\n                            change [brightness v] by (((-30) - (Brightness)) / (3))\n                            change [size v] by (((90) - (Current size)) / (3))\n                        else\n                            change [vel 2 v] by (15)\n                            change [brightness v] by (((30) - (Brightness)) / (3))\n                            change [size v] by ((((([sin v] of (vel 2) ) * (3)) + (110)) - (Current size)) / (3))\n                        end\n                    else\n                        set [vel 2 v] to [0]\n                        change [brightness v] by (((0) - (Brightness)) / (3))\n                        change [size v] by (((100) - (Current size)) / (3))\n                    end\n                else\n                    set [vel 2 v] to [0]\n                    change [brightness v] by (((0) - (Brightness)) / (3))\n                    change [size v] by (((100) - (Current size)) / (3))\n                end\n            end\n            set [size v] to ((size) * (0.65))\n            change [current size v] by (size)\n            set size to (Current size) %\n            set [brightness v] effect to (Brightness)\n        end\n    end\nend\n\nwhen this sprite clicked\nwait until <not <mouse down?>>\nif <touching (mouse-pointer v)?> then\n    if <(Can I click menus 2) = [True]> then\n        if <not <<(ID) = [Less animations]> or <<(ID) = [Options]> or <(ID) = [Black]>>>> then\n            set [brightness v] to [50]\n            if <not <(ID) = [Animations]>> then\n                change [size v] by (20)\n            end\n            if <(ID) = [Back]> then\n                set [can i click menus 2 v] to [False]\n                broadcast (Back SFX v)\n                broadcast (From Options v)\n                broadcast (Exit Options v)\n            else\n                if <(ID) = [Animations]> then\n                    broadcast (Change v)\n                    if <(Less animations?) = [True]> then\n                        set [less animations? v] to [False]\n                    else\n                        set [less animations? v] to [True]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\nset [id v] to [Main]\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@Volume Settings\n\nwhen I receive [options v]\nif <(ID) = [Main]> then\n    wait (0) seconds\n    go to [front v] layer\n    say []\n    clear graphic effects\n    set y to (70)\n    set x to (-130)\n    set [id v] to [Music]\n    create clone of (_myself_ v)\n    set x to (50)\n    set [type id# v] to [Music]\n    set [id v] to [Slider]\n    create clone of (_myself_ v)\n    set [id v] to [Knob]\n    create clone of (_myself_ v)\n    set [id v] to [Main]\n    change y by (-50)\n    set x to (-130)\n    set [id v] to [SFX]\n    create clone of (_myself_ v)\n    set x to (50)\n    set [type id# v] to [SFX]\n    set [id v] to [Slider]\n    create clone of (_myself_ v)\n    set [id v] to [Knob]\n    create clone of (_myself_ v)\n    set [id v] to [Main]\nend\n\nwhen flag clicked\nhide\nset [id v] to [Main]\n\nwhen I receive [exit options v]\nstop [other scripts in sprite v]\nif <(ID) = [Knob]> then\n    if <(Type ID#) = [SFX]> then\n        set [x v] to ((((Sound Volume) * (2)) - (100)) + (x))\n    else\n        if <(Type ID#) = [Music]> then\n            set [x v] to ((((Music Volume) * (2)) - (100)) + (x))\n        end\n    end\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\ndelete this clone\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 start as a clone\nsay []\nshow\nset size to (100) %\nif <(ID) = [Music]> then\n    switch costume to (music label v)\nelse\n    if <(ID) = [SFX]> then\n        switch costume to (sfx label v)\n    else\n        if <(ID) = [Knob]> then\n            switch costume to (knob v)\n        else\n            if <(ID) = [Slider]> then\n                switch costume to (slider v)\n            else\n                delete this clone\n            end\n        end\n    end\nend\nset [brightness v] to [0]\nset [x v] to (x position)\nif <(ID) = [Knob]> then\n    if <(Type ID#) = [SFX]> then\n        set x to ((((Sound Volume) * (2)) - (100)) + (x))\n    else\n        if <(Type ID#) = [Music]> then\n            set x to ((((Music Volume) * (2)) - (100)) + (x))\n        end\n    end\nend\npoint in direction (90)\nset [brightness v] to [0]\nif <not <(ID) = [Black]>> then\n    forever\n        if <(ID) = [Knob]> then\n            say []\n            if <(Can I click menus 2) = [True]> then\n                if <touching (mouse-pointer v)?> then\n                    if <(Type ID#) = [SFX]> then\n                        say (join (Sound Volume) [%])\n                    else\n                        if <(Type ID#) = [Music]> then\n                            say (join (Music Volume) [%])\n                        end\n                    end\n                    if <(Less animations?) = [True]> then\n                        set size to (110) %\n                        set [brightness v] to [30]\n                    else\n                        change [brightness v] by (((30) - (Brightness)) / (3))\n                        change [vel 2 v] by (15)\n                        change [size v] by ((((([sin v] of (vel 2) ) * (3)) + (110)) - (size)) / (3))\n                        set [size v] to ((size) * (0.65))\n                        change size by (size)\n                    end\n                    if <mouse down?> then\n                        repeat until <not <mouse down?>>\n                            if <(Less animations?) = [True]> then\n                                set size to (90) %\n                                set [brightness v] to [-30]\n                            else\n                                set [vel 2 v] to [0]\n                                change [brightness v] by (((-30) - (Brightness)) / (3))\n                                change [size v] by (((90) - (size)) / (3))\n                                set [size v] to ((size) * (0.65))\n                                change size by (size)\n                            end\n                            set [brightness v] effect to (Brightness)\n                            if <((mouse x) - (x)) < [-100]> then\n                                set x to ((-100) + (x))\n                            else\n                                if <((mouse x) - (x)) > [100]> then\n                                    set x to ((100) + (x))\n                                else\n                                    set x to (mouse x)\n                                end\n                            end\n                            if <(Type ID#) = [SFX]> then\n                                set [sound volume v] to (round ((((x position) - (x)) + (100)) / (2)))\n                            else\n                                if <(Type ID#) = [Music]> then\n                                    set [music volume v] to (round ((((x position) - (x)) + (100)) / (2)))\n                                    broadcast (Change Volume v)\n                                end\n                            end\n                            if <(Type ID#) = [SFX]> then\n                                say (join (Sound Volume) [%])\n                            else\n                                if <(Type ID#) = [Music]> then\n                                    say (join (Music Volume) [%])\n                                end\n                            end\n                        end\n                    end\n                else\n                    if <(Less animations?) = [True]> then\n                        set size to (100) %\n                        set [brightness v] to [0]\n                    else\n                        set [vel 2 v] to [0]\n                        change [size v] by (((100) - (size)) / (3))\n                        set [size v] to ((size) * (0.65))\n                        change size by (size)\n                        change [brightness v] by (((0) - (Brightness)) / (3))\n                    end\n                end\n            else\n                if <(Less animations?) = [True]> then\n                    set size to (100) %\n                    set [brightness v] to [0]\n                else\n                    change [size v] by (((100) - (size)) / (3))\n                    set [size v] to ((size) * (0.65))\n                    change size by (size)\n                    change [brightness v] by (((0) - (Brightness)) / (3))\n                end\n            end\n            set [brightness v] effect to (Brightness)\n            if <(Type ID#) = [SFX]> then\n                change x by ((((((Sound Volume) * (2)) - (100)) + (x)) - (x position)) / (3))\n            else\n                if <(Type ID#) = [Music]> then\n                    change x by ((((((Music Volume) * (2)) - (100)) + (x)) - (x position)) / (3))\n                end\n            end\n        else\n            change x by (((x) - (x position)) / (3))\n        end\n    end\nend\n\n@Select Level\n\nwhen I receive [start v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I start as a clone\nset volume to (Sound Volume) %\n\nwhen I start as a clone\nshow\nclear graphic effects\ngo to x: (x) y: (y position)\n\nwhen I receive [main menu v]\nif <(ID) = [Main]> then\n    clear graphic effects\n    set [can i click menus? v] to [False]\n    set y to (140)\n    set [id v] to [Title]\n    set [x v] to [0]\n    create clone of (_myself_ v)\n    set y to (140)\n    set [id v] to [Menu]\n    set [x v] to [-201]\n    create clone of (_myself_ v)\n    Level\n    set y to (10)\n    set [id v] to [Left]\n    set [x v] to [-200]\n    create clone of (_myself_ v)\n    set y to (10)\n    set [id v] to [Right]\n    set [x v] to [200]\n    create clone of (_myself_ v)\n    set y to (-133)\n    set [id v] to [Go!]\n    set [x v] to [0]\n    create clone of (_myself_ v)\n    set [id v] to [Main]\n    set [can i click menus? v] to [True]\nend\n\nwhen I start as a clone\nif <(ID) = [Title]> then\n    switch costume to (select level v)\nelse\n    if <(ID) = [Menu]> then\n        switch costume to (back v)\n    else\n        if <(ID) = [Level]> then\n            switch costume to (join [Level ] (Level Number))\n        else\n            if <(ID) = [Left]> then\n                switch costume to (left v)\n            else\n                if <(ID) = [Right]> then\n                    switch costume to (right v)\n                else\n                    if <(ID) = [Go!]> then\n                        switch costume to (go! v)\n                    else\n                        delete this clone\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (mouse-pointer v)?> then\n        if <not <<(ID) = [Title]> or <(ID) = [Level]>>> then\n            if <(Can I click menus?) = [True]> then\n                if <not <<<(ID) = [Left]> and <(Selected Level) = [1]>> or <<(ID) = [Right]> and <(Selected Level) = [4]>>>> then\n                    broadcast (Hover SFX v)\n                    wait until <not <touching (mouse-pointer v)?>>\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nset size to (100) %\nset [size v] to [0]\nset [current size v] to [100]\nset [brightness v] to [0]\nset [vel 2 v] to [0]\nif <not <<(ID) = [Title]> or <(ID) = [Level]>>> then\n    forever\n        if <<<(ID) = [Left]> and <(Selected Level) = [1]>> or <<(ID) = [Right]> and <(Selected Level) = [4]>>> then\n            if <(Less animations?) = [True]> then\n                set [brightness v] to [-50]\n                set [current size v] to [100]\n            else\n                set [vel 2 v] to [0]\n                change [brightness v] by (((-50) - (Brightness)) / (3))\n                change [size v] by (((100) - (Current size)) / (3))\n            end\n            set [size v] to ((size) * (0.65))\n            change [current size v] by (size)\n            set size to (Current size) %\n            set [brightness v] effect to (Brightness)\n        else\n            if <(Less animations?) = [True]> then\n                if <(Can I click menus?) = [True]> then\n                    if <touching (mouse-pointer v)?> then\n                        if <mouse down?> then\n                            set [brightness v] to [-30]\n                            set [current size v] to [90]\n                        else\n                            set [brightness v] to [30]\n                            set [current size v] to [110]\n                        end\n                    else\n                        set [brightness v] to [0]\n                        set [current size v] to [100]\n                    end\n                else\n                    set [brightness v] to [0]\n                    set [current size v] to [100]\n                end\n                set [size v] to ((size) * (0.65))\n                set size to (Current size) %\n                set [brightness v] effect to (Brightness)\n            else\n                if <(Can I click menus?) = [True]> then\n                    if <touching (mouse-pointer v)?> then\n                        if <mouse down?> then\n                            set [vel 2 v] to [0]\n                            change [brightness v] by (((-30) - (Brightness)) / (3))\n                            change [size v] by (((90) - (Current size)) / (3))\n                        else\n                            change [vel 2 v] by (15)\n                            change [brightness v] by (((30) - (Brightness)) / (3))\n                            change [size v] by ((((([sin v] of (vel 2) ) * (3)) + (110)) - (Current size)) / (3))\n                        end\n                    else\n                        set [vel 2 v] to [0]\n                        change [brightness v] by (((0) - (Brightness)) / (3))\n                        change [size v] by (((100) - (Current size)) / (3))\n                    end\n                else\n                    set [vel 2 v] to [0]\n                    change [brightness v] by (((0) - (Brightness)) / (3))\n                    change [size v] by (((100) - (Current size)) / (3))\n                end\n                set [size v] to ((size) * (0.65))\n                change [current size v] by (size)\n                set size to (Current size) %\n                set [brightness v] effect to (Brightness)\n            end\n        end\n    end\nend\n\nwhen this sprite clicked\nif <not <<(ID) = [Title]> or <(ID) = [Level]>>> then\n    wait until <not <mouse down?>>\n    if <touching (mouse-pointer v)?> then\n        if <(Can I click menus?) = [True]> then\n            if <(ID) = [Menu]> then\n                set [brightness v] to [50]\n                change [size v] by (20)\n                set [can i click menus? v] to [False]\n                broadcast (Back SFX v)\n                broadcast (Back to title v)\n            end\n            if <(ID) = [Go!]> then\n                set [brightness v] to [50]\n                change [size v] by (20)\n                set [can i click menus? v] to [False]\n                set [level# v] to (Selected Level)\n                broadcast (Select SFX v)\n                broadcast (Close Level Select v)\n            end\n            if <(ID) = [Left]> then\n                if <not <(Selected Level) = [1]>> then\n                    set [brightness v] to [50]\n                    change [size v] by (20)\n                    broadcast (Change v)\n                end\n                change [selected level v] by (-1)\n                if <(Selected Level) < [1]> then\n                    set [selected level v] to [1]\n                end\n            end\n            if <(ID) = [Right]> then\n                if <not <(Selected Level) = [4]>> then\n                    set [brightness v] to [50]\n                    change [size v] by (20)\n                    broadcast (Change v)\n                end\n                change [selected level v] by (1)\n                if <(Selected Level) > [4]> then\n                    set [selected level v] to [4]\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\nset [id v] to [Main]\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\ndelete this clone\n\ndefine Level\nset [level number v] to [1]\nset y to (10)\nset [x v] to [0]\nrepeat (4)\n    set [id v] to [Level]\n    create clone of (_myself_ v)\n    change [level number v] by (1)\nend\n\nwhen I start as a clone\nif <(ID) = [Level]> then\n    set size to (1000) %\n    set x to (((Selected Level) - (Level Number)) * (-480))\n    set size to (125) %\n    forever\n        set size to (1000) %\n        if <(Less animations?) = [True]> then\n            set x to (((Selected Level) - (Level Number)) * (-480))\n            set size to (125) %\n        else\n            change x by (((((Selected Level) - (Level Number)) * (-480)) - (x position)) / (3.5))\n            set size to ((((480) - ([abs v] of (round (x position)) )) / (480)) * (125)) %\n        end\n    end\nend\n\nwhen I receive [close level select v]\nif <<(ID) = [Level]> and <(Selected Level) = (Level Number)>> then\n    repeat (10)\n    stop [other scripts in sprite v]\n    broadcast (Enter a level v)\n    repeat (10)\n        change size by (((123) - (size)) / (-3))\n    end\n    repeat (15)\n        change size by (((123) - (size)) / (-3))\n        change [brightness v] effect by (10)\n    end\n    go to x: (0) y: (0)\n    broadcast (Enter Level! v)\nelse\n    if <not <(ID) = [Main]>> then\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        hide\n        delete this clone\n    end\nend\n\n@Extras Menu\n\nwhen I receive [start v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I start as a clone\nset volume to (Sound Volume) %\n\nwhen I start as a clone\nshow\nclear graphic effects\ngo to x: (x) y: (y position)\n\nwhen I receive [extras menu v]\nif <(ID) = [Main]> then\n    clear graphic effects\n    set [can i click menus? v] to [False]\n    set y to (140)\n    set [id v] to [Title]\n    set [x v] to [0]\n    create clone of (_myself_ v)\n    set y to (-140)\n    set [id v] to [Menu]\n    set [x v] to [-201]\n    create clone of (_myself_ v)\n    set y to (40)\n    set [extras number v] to [1]\n    set [id v] to [Selection]\n    set [x v] to [0]\n    create clone of (_myself_ v)\n    set y to (-40)\n    set [extras number v] to [2]\n    set [id v] to [Selection]\n    set [x v] to [0]\n    create clone of (_myself_ v)\n    set [id v] to [Main]\n    set [can i click menus? v] to [True]\nend\n\nwhen I start as a clone\nif <(ID) = [Title]> then\n    switch costume to (extras v)\nelse\n    if <(ID) = [Menu]> then\n        switch costume to (back v)\n    else\n        if <(ID) = [Selection]> then\n            switch costume to (join [Extras ] (Extras Number))\n        else\n            delete this clone\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (mouse-pointer v)?> then\n        if <not <(ID) = [Title]>> then\n            if <(Can I click menus?) = [True]> then\n                broadcast (Hover SFX v)\n                wait until <not <touching (mouse-pointer v)?>>\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nset size to (100) %\nset [size v] to [0]\nset [current size v] to [100]\nset [brightness v] to [0]\nset [vel 2 v] to [0]\nif <not <(ID) = [Title]>> then\n    forever\n        if <(Less animations?) = [True]> then\n            if <(Can I click menus?) = [True]> then\n                if <touching (mouse-pointer v)?> then\n                    if <mouse down?> then\n                        set [brightness v] to [-30]\n                        set [current size v] to [90]\n                    else\n                        set [brightness v] to [30]\n                        set [current size v] to [110]\n                    end\n                else\n                    set [brightness v] to [0]\n                    set [current size v] to [100]\n                end\n            else\n                set [brightness v] to [0]\n                set [current size v] to [100]\n            end\n            set [size v] to ((size) * (0.65))\n            set size to (Current size) %\n            set [brightness v] effect to (Brightness)\n        else\n            if <(Can I click menus?) = [True]> then\n                if <touching (mouse-pointer v)?> then\n                    if <mouse down?> then\n                        set [vel 2 v] to [0]\n                        change [brightness v] by (((-30) - (Brightness)) / (3))\n                        change [size v] by (((90) - (Current size)) / (3))\n                    else\n                        change [vel 2 v] by (15)\n                        change [brightness v] by (((30) - (Brightness)) / (3))\n                        change [size v] by ((((([sin v] of (vel 2) ) * (3)) + (110)) - (Current size)) / (3))\n                    end\n                else\n                    set [vel 2 v] to [0]\n                    change [brightness v] by (((0) - (Brightness)) / (3))\n                    change [size v] by (((100) - (Current size)) / (3))\n                end\n            else\n                set [vel 2 v] to [0]\n                change [brightness v] by (((0) - (Brightness)) / (3))\n                change [size v] by (((100) - (Current size)) / (3))\n            end\n            set [size v] to ((size) * (0.65))\n            change [current size v] by (size)\n            set size to (Current size) %\n            set [brightness v] effect to (Brightness)\n        end\n    end\nend\n\nwhen this sprite clicked\nif <not <(ID) = [Title]>> then\n    wait until <not <mouse down?>>\n    if <touching (mouse-pointer v)?> then\n        if <(Can I click menus?) = [True]> then\n            if <(ID) = [Menu]> then\n                set [brightness v] to [50]\n                change [size v] by (20)\n                set [can i click menus? v] to [False]\n                broadcast (Back SFX v)\n                broadcast (Back to title v)\n            end\n            if <(ID) = [Selection]> then\n                set [brightness v] to [50]\n                change [size v] by (20)\n                set [can i click menus? v] to [False]\n                set [minigame# v] to (Extras Number)\n                broadcast (Start Extras Game v)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\nset [id v] to [Main]\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@Pause\n\nwhen I start as a clone\nclear graphic effects\nshow\ngo to x: (x) y: (y position)\nif <(ID) = [Demo]> then\n    set [ghost v] effect to (0)\nelse\n    set [ghost v] effect to (100)\n    repeat (10)\n        change [ghost v] effect by (-7)\n    end\nend\n\nwhen I start as a clone\nif <(ID) = [Pause]> then\n    switch costume to (pause v)\nelse\n    delete this clone\nend\n\nwhen I start as a clone\nset [size v] to [0]\nset [y v] to (y position)\n\nwhen I start as a clone\nset [current size v] to [100]\ngo to [front v] layer\nset size to (100) %\nset [vel 2 v] to [0]\nforever\n    if <(Less animations?) = [True]> then\n        if <(Can I pause?) = [False]> then\n            if <touching (mouse-pointer v)?> then\n                if <mouse down?> then\n                    set [brightness v] to [-30]\n                    set [current size v] to [90]\n                else\n                    set [brightness v] to [30]\n                    set [current size v] to [110]\n                end\n            else\n                set [brightness v] to [0]\n                set [current size v] to [100]\n            end\n        else\n            set [brightness v] to [0]\n            set [current size v] to [100]\n        end\n        set [size v] to ((size) * (0.65))\n        set size to (Current size) %\n        set [brightness v] effect to (Brightness)\n    else\n        if <(Can I pause?) = [False]> then\n            if <touching (mouse-pointer v)?> then\n                if <mouse down?> then\n                    set [vel 2 v] to [0]\n                    change [brightness v] by (((-30) - (Brightness)) / (3))\n                    change [size v] by (((90) - (Current size)) / (3))\n                else\n                    change [vel 2 v] by (15)\n                    change [brightness v] by (((30) - (Brightness)) / (3))\n                    change [size v] by ((((([sin v] of (vel 2) ) * (3)) + (110)) - (Current size)) / (3))\n                end\n            else\n                set [vel 2 v] to [0]\n                change [brightness v] by (((0) - (Brightness)) / (3))\n                change [size v] by (((100) - (Current size)) / (3))\n            end\n        else\n            set [vel 2 v] to [0]\n            change [brightness v] by (((0) - (Brightness)) / (3))\n            change [size v] by (((100) - (Current size)) / (3))\n        end\n        set [size v] to ((size) * (0.65))\n        change [current size v] by (size)\n        set size to (Current size) %\n        set [brightness v] effect to (Brightness)\n    end\nend\n\nwhen this sprite clicked\nwait until <not <mouse down?>>\nif <touching (mouse-pointer v)?> then\n    if <(Can I pause?) = [False]> then\n        set [brightness v] to [50]\n        change [size v] by (20)\n        if <(ID) = [Pause]> then\n            set [can i pause? v] to [True]\n            set [pause? v] to [True]\n            broadcast (Pause v)\n        end\n    end\nend\n\nwhen flag clicked\nhide\nset [id v] to [Main]\n\nwhen I receive [load level v]\nif <(ID) = [Main]> then\n    clear graphic effects\n    set y to (143)\n    set [can i pause? v] to [False]\n    set [id v] to [Pause]\n    set [x v] to [203]\n    create clone of (_myself_ v)\n    set [id v] to [Main]\nend\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [win v]\nset [can i pause? v] to [True]\nrepeat (10)\n    change [ghost v] effect by (7)\nend\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <(Can I pause?) = [False]> then\n        if <touching (mouse-pointer v)?> then\n            set [in pause button? v] to [1]\n        else\n            set [in pause button? v] to [0]\n        end\n    else\n        set [in pause button? v] to [0]\n    end\nend\n\nwhen I receive [extras game start v]\nif <(ID) = [Main]> then\n    clear graphic effects\n    set y to (143)\n    set [can i pause? v] to [False]\n    set [id v] to [Pause]\n    set [x v] to [203]\n    create clone of (_myself_ v)\n    set [id v] to [Main]\nend\n\nwhen I receive [game over v]\nset [can i pause? v] to [True]\nrepeat (10)\n    change [ghost v] effect by (7)\nend\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@Pause Menu\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [resume v]\nif <not <(ID) = [Main]>> then\n    repeat (10)\n        if <(ID) = [Black]> then\n            change [ghost v] effect by (5)\n        else\n            change [ghost v] effect by (10)\n        end\n    end\n    hide\n    if <(ID) = [Black]> then\n        set [can i pause? v] to [False]\n        set [pause? v] to [False]\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nset volume to (Sound Volume) %\n\nwhen I start as a clone\nshow\nclear graphic effects\ngo to x: (x) y: (y position)\nset [ghost v] effect to (100)\nrepeat (10)\n    if <(ID) = [Black]> then\n        change [ghost v] effect by (-5)\n    else\n        change [ghost v] effect by (-10)\n    end\nend\n\nwhen I receive [pause v]\nif <(ID) = [Main]> then\n    go to [front v] layer\n    clear graphic effects\n    set [can i pause? v] to [True]\n    set [pause? v] to [True]\n    set [can i click menus 2 v] to [False]\n    set y to (0)\n    set [id v] to [Black]\n    set [x v] to [0]\n    create clone of (_myself_ v)\n    if <(Mode#) = [Main Game]> then\n        set y to (40)\n        set [id v] to [Resume]\n        set [x v] to [0]\n        create clone of (_myself_ v)\n        set y to (-40)\n        set [id v] to [Exit]\n        set [x v] to [0]\n        create clone of (_myself_ v)\n    else\n        set y to (80)\n        set [id v] to [Resume]\n        set [x v] to [0]\n        create clone of (_myself_ v)\n        set y to (0)\n        set [id v] to [Restart]\n        set [x v] to [0]\n        create clone of (_myself_ v)\n        set y to (-80)\n        set [id v] to [Quit]\n        set [x v] to [0]\n        create clone of (_myself_ v)\n    end\n    set [id v] to [Main]\n    wait (0.3) seconds\n    set [can i click menus 2 v] to [True]\nend\n\nwhen I start as a clone\nif <(ID) = [Resume]> then\n    switch costume to (resume v)\nelse\n    if <(ID) = [Exit]> then\n        switch costume to (exit v)\n    else\n        if <(ID) = [Restart]> then\n            switch costume to (restart v)\n        else\n            if <(ID) = [Quit]> then\n                switch costume to (quit v)\n            else\n                if <(ID) = [Black]> then\n                    switch costume to (black v)\n                else\n                    delete this clone\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (mouse-pointer v)?> then\n        if <not <(ID) = [Black]>> then\n            if <(Can I click menus 2) = [True]> then\n                broadcast (Hover SFX v)\n                wait until <not <touching (mouse-pointer v)?>>\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nset size to (100) %\nset [size v] to [0]\nset [current size v] to [100]\nset [brightness v] to [0]\nset [vel 2 v] to [0]\nif <not <(ID) = [Black]>> then\n    forever\n        if <(Less animations?) = [True]> then\n            if <(Can I click menus 2) = [True]> then\n                if <<touching (mouse-pointer v)?> or <<(ID) = [Resume]> and <key (p v) pressed?>>> then\n                    if <<mouse down?> or <<(ID) = [Resume]> and <key (p v) pressed?>>> then\n                        set [brightness v] to [-30]\n                        set [current size v] to [90]\n                    else\n                        set [brightness v] to [30]\n                        set [current size v] to [110]\n                    end\n                else\n                    set [brightness v] to [0]\n                    set [current size v] to [100]\n                end\n            else\n                set [brightness v] to [0]\n                set [current size v] to [100]\n            end\n            set [size v] to ((size) * (0.65))\n            set size to (Current size) %\n            set [brightness v] effect to (Brightness)\n        else\n            if <(Can I click menus 2) = [True]> then\n                if <<touching (mouse-pointer v)?> or <<(ID) = [Resume]> and <key (p v) pressed?>>> then\n                    if <<mouse down?> or <<(ID) = [Resume]> and <key (p v) pressed?>>> then\n                        set [vel 2 v] to [0]\n                        change [brightness v] by (((-30) - (Brightness)) / (3))\n                        change [size v] by (((90) - (Current size)) / (3))\n                    else\n                        change [vel 2 v] by (15)\n                        change [brightness v] by (((30) - (Brightness)) / (3))\n                        change [size v] by ((((([sin v] of (vel 2) ) * (3)) + (110)) - (Current size)) / (3))\n                    end\n                else\n                    set [vel 2 v] to [0]\n                    change [brightness v] by (((0) - (Brightness)) / (3))\n                    change [size v] by (((100) - (Current size)) / (3))\n                end\n            else\n                set [vel 2 v] to [0]\n                change [brightness v] by (((0) - (Brightness)) / (3))\n                change [size v] by (((100) - (Current size)) / (3))\n            end\n            set [size v] to ((size) * (0.65))\n            change [current size v] by (size)\n            set size to (Current size) %\n            set [brightness v] effect to (Brightness)\n        end\n    end\nend\n\nwhen this sprite clicked\nwait until <not <mouse down?>>\nif <touching (mouse-pointer v)?> then\n    if <(Can I click menus 2) = [True]> then\n        if <not <(ID) = [Black]>> then\n            if <(ID) = [Resume]> then\n                set [can i click menus 2 v] to [False]\n                broadcast (Select SFX v)\n                broadcast (Resume v)\n            end\n            if <(ID) = [Restart]> then\n                set [can i click menus 2 v] to [False]\n                set [brightness v] to [50]\n                change [size v] by (20)\n                broadcast (Select SFX v)\n                broadcast (Restart? v)\n            end\n            if <(ID) = [Quit]> then\n                set [can i click menus 2 v] to [False]\n                set [brightness v] to [50]\n                change [size v] by (20)\n                broadcast (Select SFX v)\n                broadcast (Quit? v)\n            end\n            if <(ID) = [Exit]> then\n                set [can i click menus 2 v] to [False]\n                set [brightness v] to [50]\n                change [size v] by (20)\n                broadcast (Select SFX v)\n                broadcast (Exit Course? v)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\nset [id v] to [Main]\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I start as a clone\nif <(ID) = [Black]> then\n    forever\n        if <(Can I click menus 2) = [True]> then\n            if <key (p v) pressed?> then\n                wait until <not <key (p v) pressed?>>\n                if <(Can I click menus 2) = [True]> then\n                    set [can i click menus 2 v] to [False]\n                    broadcast (Select SFX v)\n                    broadcast (Resume v)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [resume v]\nif <(ID) = [Resume]> then\n    set [brightness v] to [50]\n    change [size v] by (20)\nend\n\n@Results\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I start as a clone\nset volume to (Sound Volume) %\n\nwhen I start as a clone\nshow\nclear graphic effects\ngo to x: (x) y: (y position)\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [level results v]\nif <(ID) = [Main]> then\n    clear graphic effects\n    set [can i click menus 2 v] to [False]\n    set y to (0)\n    if <(Level#) = [4]> then\n        set y to (-70)\n        set [id v] to [Quit]\n        set [x v] to [0]\n        create clone of (_myself_ v)\n    else\n        set y to (-30)\n        set [id v] to [Next Level]\n        set [x v] to [0]\n        create clone of (_myself_ v)\n        set y to (-110)\n        set [id v] to [Quit]\n        set [x v] to [0]\n        create clone of (_myself_ v)\n    end\n    set [id v] to [Main]\n    set [can i click menus 2 v] to [True]\nend\n\nwhen I start as a clone\nif <(ID) = [Next Level]> then\n    switch costume to (next level v)\nelse\n    if <(ID) = [Quit]> then\n        switch costume to (quit v)\n    else\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (mouse-pointer v)?> then\n        if <(Can I click menus 2) = [True]> then\n            broadcast (Hover SFX v)\n            wait until <not <touching (mouse-pointer v)?>>\n        end\n    end\nend\n\nwhen I start as a clone\nset size to (100) %\nset [size v] to [0]\nset [current size v] to [100]\nset [brightness v] to [0]\nset [vel 2 v] to [0]\nforever\n    if <(Less animations?) = [True]> then\n        if <(Can I click menus 2) = [True]> then\n            if <touching (mouse-pointer v)?> then\n                if <mouse down?> then\n                    set [brightness v] to [-30]\n                    set [current size v] to [90]\n                else\n                    set [brightness v] to [30]\n                    set [current size v] to [110]\n                end\n            else\n                set [brightness v] to [0]\n                set [current size v] to [100]\n            end\n        else\n            set [brightness v] to [0]\n            set [current size v] to [100]\n        end\n        set [size v] to ((size) * (0.65))\n        set size to (Current size) %\n        set [brightness v] effect to (Brightness)\n    else\n        if <(Can I click menus 2) = [True]> then\n            if <touching (mouse-pointer v)?> then\n                if <mouse down?> then\n                    set [vel 2 v] to [0]\n                    change [brightness v] by (((-30) - (Brightness)) / (3))\n                    change [size v] by (((90) - (Current size)) / (3))\n                else\n                    change [vel 2 v] by (15)\n                    change [brightness v] by (((30) - (Brightness)) / (3))\n                    change [size v] by ((((([sin v] of (vel 2) ) * (3)) + (110)) - (Current size)) / (3))\n                end\n            else\n                set [vel 2 v] to [0]\n                change [brightness v] by (((0) - (Brightness)) / (3))\n                change [size v] by (((100) - (Current size)) / (3))\n            end\n        else\n            set [vel 2 v] to [0]\n            change [brightness v] by (((0) - (Brightness)) / (3))\n            change [size v] by (((100) - (Current size)) / (3))\n        end\n        set [size v] to ((size) * (0.65))\n        change [current size v] by (size)\n        set size to (Current size) %\n        set [brightness v] effect to (Brightness)\n    end\nend\n\nwhen this sprite clicked\nwait until <not <mouse down?>>\nif <touching (mouse-pointer v)?> then\n    if <(Can I click menus 2) = [True]> then\n        set [can i click menus 2 v] to [False]\n        set [brightness v] to [50]\n        change [size v] by (20)\n        if <(ID) = [Next Level]> then\n            broadcast (Next Level v)\n        end\n        if <(ID) = [Quit]> then\n            broadcast (Back SFX v)\n            broadcast (Return to level select after level clear v)\n        end\n    end\nend\n\nwhen flag clicked\nhide\nset [id v] to [Main]\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@How to play\n\nwhen I receive [start v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I start as a clone\nset volume to (Sound Volume) %\n\nwhen I start as a clone\nshow\nclear graphic effects\ngo to x: (x) y: (y position)\nset [ghost v] effect to (100)\nrepeat (10)\n    if <(ID) = [Black]> then\n        change [ghost v] effect by (-5)\n    else\n        change [ghost v] effect by (-10)\n    end\nend\n\nwhen I receive [how to play v]\nif <(ID) = [Main]> then\n    wait (0) seconds\n    go to [front v] layer\n    clear graphic effects\n    set [can i click menus 2 v] to [False]\n    set y to (0)\n    set [current control type v] to [1]\n    set [id v] to [Black]\n    set [x v] to [0]\n    create clone of (_myself_ v)\n    set y to (140)\n    set [id v] to [Title]\n    set [x v] to [0]\n    create clone of (_myself_ v)\n    set y to (-140)\n    set [id v] to [Back]\n    set [x v] to [-201]\n    create clone of (_myself_ v)\n    Level\n    set y to (-140)\n    set [id v] to [Left]\n    set [x v] to [10]\n    create clone of (_myself_ v)\n    set y to (-140)\n    set [id v] to [Right]\n    set [x v] to [160]\n    create clone of (_myself_ v)\n    set [id v] to [Main]\n    set [can i click menus 2 v] to [True]\nend\n\nwhen I start as a clone\nif <(ID) = [Black]> then\n    switch costume to (black v)\nelse\n    if <(ID) = [Title]> then\n        switch costume to (how to play v)\n    else\n        if <(ID) = [Back]> then\n            switch costume to (back v)\n        else\n            if <(ID) = [Controls]> then\n                switch costume to (join [Control ] (Type))\n            else\n                if <(ID) = [Left]> then\n                    switch costume to (pc v)\n                else\n                    if <(ID) = [Right]> then\n                        switch costume to (mobile v)\n                    else\n                        delete this clone\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (mouse-pointer v)?> then\n        if <not <<(ID) = [Title]> or <<(ID) = [Controls]> or <(ID) = [Black]>>>> then\n            if <(Can I click menus 2) = [True]> then\n                if <not <<<(ID) = [Left]> and <(Current Control Type) = [1]>> or <<(ID) = [Right]> and <(Current Control Type) = [2]>>>> then\n                    broadcast (Hover SFX v)\n                    wait until <not <touching (mouse-pointer v)?>>\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nset size to (100) %\nset [size v] to [0]\nset [current size v] to [100]\nset [brightness v] to [0]\nset [vel 2 v] to [0]\nif <not <<(ID) = [Title]> or <<(ID) = [Controls]> or <(ID) = [Black]>>>> then\n    forever\n        if <<<(ID) = [Left]> and <(Current Control Type) = [1]>> or <<(ID) = [Right]> and <(Current Control Type) = [2]>>> then\n            if <(Less animations?) = [True]> then\n                set [brightness v] to [40]\n                set [current size v] to [100]\n            else\n                set [vel 2 v] to [0]\n                change [brightness v] by (((40) - (Brightness)) / (3))\n                change [size v] by (((100) - (Current size)) / (3))\n            end\n            set [size v] to ((size) * (0.65))\n            change [current size v] by (size)\n            set size to (Current size) %\n            set [brightness v] effect to (Brightness)\n        else\n            if <(Less animations?) = [True]> then\n                if <(Can I click menus 2) = [True]> then\n                    if <touching (mouse-pointer v)?> then\n                        if <mouse down?> then\n                            set [brightness v] to [-30]\n                            set [current size v] to [90]\n                        else\n                            set [brightness v] to [30]\n                            set [current size v] to [110]\n                        end\n                    else\n                        set [brightness v] to [0]\n                        set [current size v] to [100]\n                    end\n                else\n                    set [brightness v] to [0]\n                    set [current size v] to [100]\n                end\n                set [size v] to ((size) * (0.65))\n                set size to (Current size) %\n                set [brightness v] effect to (Brightness)\n            else\n                if <(Can I click menus 2) = [True]> then\n                    if <touching (mouse-pointer v)?> then\n                        if <mouse down?> then\n                            set [vel 2 v] to [0]\n                            change [brightness v] by (((-30) - (Brightness)) / (3))\n                            change [size v] by (((90) - (Current size)) / (3))\n                        else\n                            change [vel 2 v] by (15)\n                            change [brightness v] by (((30) - (Brightness)) / (3))\n                            change [size v] by ((((([sin v] of (vel 2) ) * (3)) + (110)) - (Current size)) / (3))\n                        end\n                    else\n                        set [vel 2 v] to [0]\n                        change [brightness v] by (((0) - (Brightness)) / (3))\n                        change [size v] by (((100) - (Current size)) / (3))\n                    end\n                else\n                    set [vel 2 v] to [0]\n                    change [brightness v] by (((0) - (Brightness)) / (3))\n                    change [size v] by (((100) - (Current size)) / (3))\n                end\n                set [size v] to ((size) * (0.65))\n                change [current size v] by (size)\n                set size to (Current size) %\n                set [brightness v] effect to (Brightness)\n            end\n        end\n    end\nend\n\nwhen this sprite clicked\nif <not <<(ID) = [Title]> or <<(ID) = [Controls]> or <(ID) = [Black]>>>> then\n    wait until <not <mouse down?>>\n    if <touching (mouse-pointer v)?> then\n        if <(Can I click menus 2) = [True]> then\n            if <(ID) = [Back]> then\n                set [brightness v] to [50]\n                change [size v] by (20)\n                set [can i click menus 2 v] to [False]\n                broadcast (Back SFX v)\n                broadcast (Close how to play v)\n            end\n            if <(ID) = [Left]> then\n                if <not <(Current Control Type) = [1]>> then\n                    set [brightness v] to [50]\n                    change [size v] by (20)\n                    broadcast (Change v)\n                end\n                set [current control type v] to [1]\n            end\n            if <(ID) = [Right]> then\n                if <not <(Current Control Type) = [2]>> then\n                    set [brightness v] to [50]\n                    change [size v] by (20)\n                    broadcast (Change v)\n                end\n                set [current control type v] to [2]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\nset [id v] to [Main]\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\ndelete this clone\n\ndefine Level\nset [type v] to [1]\nset y to (10)\nset [x v] to [0]\nrepeat (2)\n    set [id v] to [Controls]\n    create clone of (_myself_ v)\n    change [type v] by (1)\nend\n\nwhen I start as a clone\nif <(ID) = [Controls]> then\n    set x to (((Current Control Type) - (Type)) * (-480))\n    forever\n        set size to (1000) %\n        if <(Less animations?) = [True]> then\n            set x to (((Current Control Type) - (Type)) * (-480))\n        else\n            change x by (((((Current Control Type) - (Type)) * (-480)) - (x position)) / (3.5))\n        end\n        set size to (100) %\n    end\nend\n\nwhen I receive [close how to play v]\nif <not <(ID) = [Main]>> then\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    hide\n    stop [other scripts in sprite v]\n    set [can i click menus? v] to [True]\n    delete this clone\nend\n\n@Window\n\nwhen I receive [main menu v]\nhide\ndelete this clone\n\nwhen I start as a clone\nshow\nclear graphic effects\ngo to x: (x) y: (y position)\nset [ghost v] effect to (100)\nif <(ID) = [Black]> then\n    repeat (10)\n        change [ghost v] effect by (-5)\n    end\nelse\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nend\n\nwhen I start as a clone\nif <(ID) = [Exit?]> then\n    switch costume to (exit? v)\nelse\n    if <(ID) = [Restart?]> then\n        switch costume to (restart? v)\n    else\n        if <(ID) = [Quit?]> then\n            switch costume to (quit? v)\n        else\n            if <<(ID) = [Yes]> or <<(ID) = [Yes R]> or <(ID) = [Yes Q]>>> then\n                switch costume to (yes v)\n            else\n                if <(ID) = [No]> then\n                    switch costume to (no v)\n                else\n                    if <(ID) = [Black]> then\n                        switch costume to (black v)\n                    else\n                        delete this clone\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (mouse-pointer v)?> then\n        if <not <<(ID) = [Black]> or <<(ID) = [Exit?]> or <<(ID) = [Restart?]> or <(ID) = [Quit?]>>>>> then\n            if <(Can I click Window?) = [True]> then\n                broadcast (Hover SFX v)\n                wait until <not <touching (mouse-pointer v)?>>\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nset size to (100) %\nset [current size v] to [100]\nset [brightness v] to [0]\nset [size v] to [0]\nsay []\nset [vel 2 v] to [0]\nif <not <<(ID) = [Black]> or <<(ID) = [Exit?]> or <<(ID) = [Restart?]> or <(ID) = [Quit?]>>>>> then\n    forever\n        if <(Less animations?) = [True]> then\n            if <(Can I click Window?) = [True]> then\n                if <touching (mouse-pointer v)?> then\n                    if <mouse down?> then\n                        set [brightness v] to [-30]\n                        set [current size v] to [90]\n                    else\n                        set [brightness v] to [30]\n                        set [current size v] to [110]\n                    end\n                else\n                    set [brightness v] to [0]\n                    set [current size v] to [100]\n                end\n            else\n                set [brightness v] to [0]\n                set [current size v] to [100]\n            end\n            set [size v] to ((size) * (0.65))\n            set size to (Current size) %\n            set [brightness v] effect to (Brightness)\n        else\n            if <(Can I click Window?) = [True]> then\n                if <touching (mouse-pointer v)?> then\n                    if <mouse down?> then\n                        set [vel 2 v] to [0]\n                        change [brightness v] by (((-30) - (Brightness)) / (3))\n                        change [size v] by (((90) - (Current size)) / (3))\n                    else\n                        change [vel 2 v] by (15)\n                        change [brightness v] by (((30) - (Brightness)) / (3))\n                        change [size v] by ((((([sin v] of (vel 2) ) * (3)) + (110)) - (Current size)) / (3))\n                    end\n                else\n                    set [vel 2 v] to [0]\n                    change [brightness v] by (((0) - (Brightness)) / (3))\n                    change [size v] by (((100) - (Current size)) / (3))\n                end\n            else\n                set [vel 2 v] to [0]\n                change [brightness v] by (((0) - (Brightness)) / (3))\n                change [size v] by (((100) - (Current size)) / (3))\n            end\n            set [size v] to ((size) * (0.65))\n            change [current size v] by (size)\n            set size to (Current size) %\n            set [brightness v] effect to (Brightness)\n        end\n    end\nend\n\nwhen I start as a clone\nset [y v] to (y position)\npoint in direction (90)\nif <(ID) = [Black]> then\n    set size to (100) %\n    set [size v] to [0]\n    set [sin v] to [0]\n    go to x: (0) y: (0)\nelse\n    set size to (100) %\n    set [size v] to [0]\n    set [sin v] to [0]\n    if <not <(Less animations?) = [True]>> then\n        change y by (-50)\n    end\n    forever\n        change y by (((y) - (y position)) / (3))\n    end\nend\n\nwhen this sprite clicked\nwait until <not <mouse down?>>\nif <touching (mouse-pointer v)?> then\n    if <(Can I click Window?) = [True]> then\n        if <not <<(ID) = [Black]> or <<(ID) = [Exit?]> or <<(ID) = [Restart?]> or <(ID) = [Quit?]>>>>> then\n            set [brightness v] to [50]\n            change [size v] by (20)\n            if <(ID) = [Yes]> then\n                set [can i click window? v] to [False]\n                broadcast (Select SFX v)\n                broadcast (Back to Level Select v)\n            end\n            if <(ID) = [Yes R]> then\n                set [can i click window? v] to [False]\n                broadcast (Start Extras Game v)\n            end\n            if <(ID) = [Yes Q]> then\n                set [can i click window? v] to [False]\n                broadcast (Select SFX v)\n                broadcast (Back to Extras Menu v)\n            end\n            if <(ID) = [No]> then\n                set [can i click window? v] to [False]\n                broadcast (Back SFX v)\n                broadcast (Exit Window v)\n            end\n        end\n    end\nend\n\nwhen I receive [exit window v]\nif <not <(ID) = [Main]>> then\n    set [y v] to (y position)\n    repeat (10)\n        if <(ID) = [Black]> then\n            change [ghost v] effect by (5)\n        else\n            change y by ((((y) + (1)) - (y position)) / (-1))\n            change [ghost v] effect by (10)\n        end\n    end\n    if <<(ID) = [Exit?]> or <<(ID) = [Restart?]> or <(ID) = [Quit?]>>> then\n        set [can i click menus 2 v] to [True]\n    end\n    hide\n    delete this clone\nend\n\nwhen flag clicked\nhide\nset [id v] to [Main]\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [fade out v]\nhide\ndelete this clone\n\nwhen I start as a clone\nset volume to (Sound Volume) %\n\nwhen I receive [start v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [exit course? v]\nif <(ID) = [Main]> then\n    clear graphic effects\n    go to [front v] layer\n    set [can i click window? v] to [False]\n    set y to (0)\n    set [id v] to [Black]\n    set [x v] to [0]\n    create clone of (_myself_ v)\n    set [id v] to [Exit?]\n    set [x v] to [0]\n    create clone of (_myself_ v)\n    set y to (-35)\n    set [id v] to [Yes]\n    set [x v] to [-100]\n    create clone of (_myself_ v)\n    set [id v] to [No]\n    set [x v] to [100]\n    create clone of (_myself_ v)\n    set [id v] to [Main]\n    set [can i click window? v] to [True]\nend\n\nwhen I receive [restart? v]\nif <(ID) = [Main]> then\n    clear graphic effects\n    go to [front v] layer\n    set [can i click window? v] to [False]\n    set y to (0)\n    set [id v] to [Black]\n    set [x v] to [0]\n    create clone of (_myself_ v)\n    set [id v] to [Restart?]\n    set [x v] to [0]\n    create clone of (_myself_ v)\n    set y to (-35)\n    set [id v] to [Yes R]\n    set [x v] to [-100]\n    create clone of (_myself_ v)\n    set [id v] to [No]\n    set [x v] to [100]\n    create clone of (_myself_ v)\n    set [id v] to [Main]\n    set [can i click window? v] to [True]\nend\n\nwhen I receive [quit? v]\nif <(ID) = [Main]> then\n    clear graphic effects\n    go to [front v] layer\n    set [can i click window? v] to [False]\n    set y to (0)\n    set [id v] to [Black]\n    set [x v] to [0]\n    create clone of (_myself_ v)\n    set [id v] to [Quit?]\n    set [x v] to [0]\n    create clone of (_myself_ v)\n    set y to (-35)\n    set [id v] to [Yes Q]\n    set [x v] to [-100]\n    create clone of (_myself_ v)\n    set [id v] to [No]\n    set [x v] to [100]\n    create clone of (_myself_ v)\n    set [id v] to [Main]\n    set [can i click window? v] to [True]\nend\n\n@Extras Game RulesCat\n\nwhen I receive [main menu v]\nhide\ndelete this clone\n\nwhen I start as a clone\nshow\nclear graphic effects\ngo to x: (x) y: (y position)\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I start as a clone\nif <(ID) = [Window]> then\n    switch costume to (join [Window ] (Minigame#))\nelse\n    if <(ID) = [Game Over]> then\n        switch costume to (game over v)\n    else\n        if <(ID) = [Start]> then\n            switch costume to (start v)\n        else\n            if <(ID) = [Retry]> then\n                switch costume to (retry v)\n            else\n                if <(ID) = [Quit]> then\n                    switch costume to (quit v)\n                else\n                    if <(ID) = [Back]> then\n                        switch costume to (back v)\n                    else\n                        delete this clone\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (mouse-pointer v)?> then\n        if <not <<(ID) = [Window]> or <(ID) = [Game Over]>>> then\n            if <(Can I click Window?) = [True]> then\n                broadcast (Hover SFX v)\n                wait until <not <touching (mouse-pointer v)?>>\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nset size to (100) %\nset [current size v] to [100]\nset [brightness v] to [0]\nset [size v] to [0]\nsay []\nset [vel 2 v] to [0]\nif <not <<(ID) = [Window]> or <(ID) = [Game Over]>>> then\n    forever\n        if <(Less animations?) = [True]> then\n            if <(Can I click Window?) = [True]> then\n                if <touching (mouse-pointer v)?> then\n                    if <mouse down?> then\n                        set [brightness v] to [-30]\n                        set [current size v] to [90]\n                    else\n                        set [brightness v] to [30]\n                        set [current size v] to [110]\n                    end\n                else\n                    set [brightness v] to [0]\n                    set [current size v] to [100]\n                end\n            else\n                set [brightness v] to [0]\n                set [current size v] to [100]\n            end\n            set [size v] to ((size) * (0.65))\n            set size to (Current size) %\n            set [brightness v] effect to (Brightness)\n        else\n            if <(Can I click Window?) = [True]> then\n                if <touching (mouse-pointer v)?> then\n                    if <mouse down?> then\n                        set [vel 2 v] to [0]\n                        change [brightness v] by (((-30) - (Brightness)) / (3))\n                        change [size v] by (((90) - (Current size)) / (3))\n                    else\n                        change [vel 2 v] by (15)\n                        change [brightness v] by (((30) - (Brightness)) / (3))\n                        change [size v] by ((((([sin v] of (vel 2) ) * (3)) + (110)) - (Current size)) / (3))\n                    end\n                else\n                    set [vel 2 v] to [0]\n                    change [brightness v] by (((0) - (Brightness)) / (3))\n                    change [size v] by (((100) - (Current size)) / (3))\n                end\n            else\n                set [vel 2 v] to [0]\n                change [brightness v] by (((0) - (Brightness)) / (3))\n                change [size v] by (((100) - (Current size)) / (3))\n            end\n            set [size v] to ((size) * (0.65))\n            change [current size v] by (size)\n            set size to (Current size) %\n            set [brightness v] effect to (Brightness)\n        end\n    end\nend\n\nwhen I start as a clone\npoint in direction (90)\nset size to (100) %\nset [size v] to [0]\nset [sin v] to [0]\n\nwhen this sprite clicked\nwait until <not <mouse down?>>\nif <touching (mouse-pointer v)?> then\n    if <(Can I click Window?) = [True]> then\n        if <not <<(ID) = [Window]> or <(ID) = [Game Over]>>> then\n            set [brightness v] to [50]\n            change [size v] by (20)\n            if <<(ID) = [Start]> or <(ID) = [Retry]>> then\n                set [can i click window? v] to [False]\n                broadcast (Select SFX v)\n                broadcast (Begin Game v)\n            end\n            if <<(ID) = [Back]> or <(ID) = [Quit]>> then\n                set [can i click window? v] to [False]\n                broadcast (Back SFX v)\n                broadcast (Back to Extras Menu v)\n            end\n        end\n    end\nend\n\nwhen I receive [begin game v]\nif <not <(ID) = [Main]>> then\n    if <(ID) = [Game Over]> then\n        broadcast (Hide Final Score v)\n    end\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    hide\n    if <<(ID) = [Start]> or <(ID) = [Retry]>> then\n        broadcast (Extras Game Start v)\n    end\n    delete this clone\nend\n\nwhen flag clicked\nhide\nset [id v] to [Main]\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [fade out v]\nhide\ndelete this clone\n\nwhen I start as a clone\nset volume to (Sound Volume) %\n\nwhen I receive [start v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [extras game v]\nif <(ID) = [Main]> then\n    clear graphic effects\n    set [pause? v] to [False]\n    set [can i click window? v] to [False]\n    set y to (0)\n    set [id v] to [Window]\n    set [x v] to [0]\n    create clone of (_myself_ v)\n    set y to (-105)\n    set [id v] to [Start]\n    set [x v] to [0]\n    create clone of (_myself_ v)\n    set y to (-140)\n    set [id v] to [Back]\n    set [x v] to [-201]\n    create clone of (_myself_ v)\n    set [id v] to [Main]\n    set [can i click window? v] to [True]\n    go to [front v] layer\nend\n\nwhen I receive [game over v]\nif <(ID) = [Main]> then\n    repeat (10)\n    clear graphic effects\n    set [pause? v] to [False]\n    set [can i click window? v] to [False]\n    set y to (0)\n    set [id v] to [Game Over]\n    set [x v] to [0]\n    create clone of (_myself_ v)\n    set y to (-45)\n    set [id v] to [Retry]\n    set [x v] to [0]\n    create clone of (_myself_ v)\n    set y to (-115)\n    set [id v] to [Quit]\n    set [x v] to [0]\n    create clone of (_myself_ v)\n    set [id v] to [Main]\n    set [can i click window? v] to [True]\n    go to [front v] layer\nend\n\n@Lives\n\nwhen I receive [extras game start v]\nset [lives v] to [3]\nif <(Minigame#) = [1]> then\n    show\n    go to x: (110) y: (140)\n    set [ghost v] effect to (100)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nend\n\nwhen I receive [extras game start v]\nset [lives v] to [3]\nforever\n    switch costume to (join [heart ] (Lives))\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [game over v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [hit v]\nrepeat (5)\n    go to x: (pick random (106) to (114)) y: (pick random (136) to (144))\nend\ngo to x: (110) y: (140)\n\nwhen I receive [heal v]\nset [brightness v] effect to (100)\nrepeat (5)\n    change [brightness v] effect by (-20)\nend\nset [brightness v] effect to (0)\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@Scene Manager\n\nwhen I receive [start game v]\nset volume to (Sound Volume) %\nstart sound [START v]\nbroadcast (Fade in v) and wait\nbroadcast (Main Menu v)\n\nwhen I receive [back to title v]\nbroadcast (Fade in v) and wait\nbroadcast (Start v)\n\nwhen I receive [enter level! v]\nbroadcast (Fade in \(No animation\) v) and wait\nset [selected level v] to (Level#)\nbroadcast (Load Level v)\n\nwhen I receive [back to level select v]\nbroadcast (Fade in v) and wait\nbroadcast (Main Menu v)\n\nwhen I receive [enter a level v]\nset volume to (Sound Volume) %\nstart sound [START v]\n\nwhen I receive [to level results v]\nbroadcast (Fade in v) and wait\nbroadcast (Level Results v)\n\nwhen I receive [next level v]\nset volume to (Sound Volume) %\nstart sound [START v]\nbroadcast (Fade in v) and wait\nchange [level# v] by (1)\nset [selected level v] to (Level#)\nbroadcast (Load Level v)\n\ndefine Cleck if all Clear\nset [i v] to [1]\nset [all clear? v] to [1]\nrepeat (length of [cleared levels v])\n    if <(item (i) of [cleared levels v]) = [0]> then\n        set [all clear? v] to [0]\n        stop [this script v]\n    end\n    change [i v] by (1)\nend\n\nwhen I receive [return to level select after level clear v]\nCleck if all Clear\nbroadcast (Fade in v) and wait\nif <<(All Clear?) = [1]> and <(All Cleared?) = [0]>> then\n    set [all cleared? v] to [1]\n    broadcast (Thanks for playing v)\nelse\n    broadcast (Main Menu v)\nend\n\nwhen I receive [to extras menu v]\nset volume to (Sound Volume) %\nstart sound [START v]\nbroadcast (Fade in v) and wait\nbroadcast (Extras Menu v)\n\nwhen I receive [start extras game v]\nset volume to (Sound Volume) %\nstart sound [START v]\nbroadcast (Fade in v) and wait\nbroadcast (Extras Game v)\n\nwhen I receive [back to extras menu v]\nbroadcast (Fade in v) and wait\nbroadcast (Extras Menu v)\n\n@Fade\n\nwhen flag clicked\nhide\n\nwhen I receive [fade in v]\nstop [other scripts in sprite v]\nshow\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\npoint in direction (90)\nset size to (100) %\nrepeat (25)\n    go to [front v] layer\n    change [ghost v] effect by (-4)\nend\nrepeat (40)\n    set [ghost v] effect to (0)\n    go to [front v] layer\nend\nbroadcast (Fade out v)\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\nwait (0) seconds\nrepeat (25)\n    go to [front v] layer\n    change [ghost v] effect by (4)\nend\nhide\n\nwhen I receive [fade in \(no animation\) v]\nstop [other scripts in sprite v]\nshow\ngo to x: (0) y: (0)\nset [brightness v] effect to (0)\ngo to [front v] layer\nset [ghost v] effect to (0)\npoint in direction (90)\nset size to (100) %\nrepeat (40)\n    set [ghost v] effect to (0)\n    go to [front v] layer\nend\nbroadcast (Fade out v)\n\n@Clear!\n\nwhen flag clicked\nhide\n\nwhen I receive [win v]\nstop [other scripts in sprite v]\nif <(item (Level#) of [cleared levels v]) = [0]> then\n    replace item (Level#) of [cleared levels v] with [1]\nend\nset [pause? v] to [Fause]\ngo to [front v] layer\nclear graphic effects\ngo to x: (0) y: (80)\nset size to (100) %\nset volume to (Music Volume) %\nstart sound [Course Clear v]\nset [brightness v] effect to (100)\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\nwait (2.5) seconds\nrepeat (10)\n    set size to (1000) %\n    change x by (((1) - (x position)) / (-1))\n    change [ghost v] effect by (10)\n    set size to (100) %\nend\nhide\nwait (0.5) seconds\nbroadcast (To Level Results v)\n\n@Text engine\n\ndefine Set Page Left (x1) Top (y1) Right (x2) Bottom (y2)\nset [page l v] to (x1)\nset [page t v] to (y1)\nset [page r v] to (x2)\nset [page b v] to (y2)\n\ndefine Alignment (align)\nif <(align) = [c]> then\n    set [xx v] to ((((Page L) + (Page R)) - (width)) / (2))\nelse\n    if <(align) = [r]> then\n        set [xx v] to ((Page R) - (width))\n    else\n        set [xx v] to (Page L)\n    end\nend\n\ndefine Find txt wrap index (text)\nset [width v] to [0]\nset [safe i v] to []\nforever\n    change [warp i v] by (1)\n    set [c v] to (letter (warp i) of (text))\n    if <(c) = []> then\n        stop [this script v]\n    end\n    if <(c) = [ ]> then\n        set [safe i v] to (warp i)\n        set [safe width v] to (width)\n    end\n    switch costume to (a  v)\n    switch costume to (join [a] (c))\n    change [width v] by ((item (costume [number v]) of [_width v]) * ((size) / (100)))\n    if <(width) > (page width)> then\n        if <(safe i) > []> then\n            set [warp i v] to (safe i)\n            set [width v] to (safe width)\n        else\n            change [width v] by ((0) - ((item (costume [number v]) of [_width v]) * ((size) / (100))))\n            change [warp i v] by (-1)\n        end\n        stop [this script v]\n    end\nend\n\ndefine Write letter feed (text)\nrepeat until <(id) > (warp i)>\n    switch costume to (a  v)\n    switch costume to (join [a] (letter (id) of (text)))\n    set x to ((xx) + ((item (costume [number v]) of [_offsetx v]) * ((size) / (100))))\n    if <not <<(letter (id) of (text)) = [ ]> or <(letter (id) of (text)) = []>>> then\n        create clone of (_myself_ v)\n    end\n    change [xx v] by ((item (costume [number v]) of [_width v]) * ((size) / (100)))\n    change [id v] by (1)\nend\n\ndefine Print (text) At: X (x) Y: (y) With size: (size) Brightness: (brightness) Ghost: (ghost) Align (align)\nif <(id) = [-1]> then\n    hide\n    clear graphic effects\n    switch costume to (a  v)\n    set size to (size) %\n    go to x: (x) y: (y)\n    set [ghost v] effect to (ghost)\n    set [brightness v] effect to (brightness)\n    if <(align) = [c]> then\n        Find Width (text)\n        set [xx v] to ((x) - ((width) / (2)))\n    else\n        if <(align) = [r]> then\n            Find Width (text)\n            set [xx v] to ((x) - (width))\n        else\n            set [xx v] to (x)\n        end\n    end\n    set [id v] to [0]\n    repeat (length of (text))\n        change [id v] by (1)\n        switch costume to (a  v)\n        switch costume to (join [a] (letter (id) of (text)))\n        set x to ((xx) + ((item (costume [number v]) of [_offsetx v]) * ((size) / (100))))\n        if <not <(letter (id) of (text)) = [ ]>> then\n            create clone of (_myself_ v)\n        end\n        change [xx v] by ((item (costume [number v]) of [_width v]) * ((size) / (100)))\n    end\n    set [id v] to [-1]\nend\n\ndefine Calculate Size Gap: (gap)\nset [line height v] to (((size) / (100)) * (24))\ndelete all of [_width v]\ndelete all of [_offsetx v]\nswitch costume to (round (0))\nrepeat (costume [number v])\n    next costume\n    set y to (0)\n    if <(length of (costume [name v])) = [2]> then\n        set x to (-9999)\n        repeat until <not <touching (_edge_ v)?>>\n            change x by (1)\n        end\n        change x by (240)\n        set [xx v] to (x position)\n        set x to (9999)\n        repeat until <not <touching (_edge_ v)?>>\n            change x by (-1)\n        end\n        add (xx) to [_offsetx v]\n        set [i v] to (((xx) + (240)) - (x position))\n        add ((i) + ((gap) * ((size) / (100)))) to [_width v]\n    else\n        add [] to [_offsetx v]\n        add [] to [_width v]\n    end\nend\n\ndefine Print page (text) With size: (size) Brightness: (brightness) Ghost: (ghost) Align (align)\nif <(id) = [-1]> then\n    hide\n    clear graphic effects\n    switch costume to (a  v)\n    set size to (size) %\n    set [ghost v] effect to (ghost)\n    set [brightness v] effect to (brightness)\n    set [page width v] to ((Page R) - (Page L))\n    set [warp i v] to [0]\n    set [id v] to [1]\n    repeat until <(id) > (length of (text))>\n        Find txt wrap index (text)\n        Alignment (align)\n        Write letter feed (text)\n        change y by ((0) - (Line Height))\n    end\n    set [id v] to [-1]\nend\n\nwhen flag clicked\nset [id v] to [-1]\nswitch costume to (aa v)\nset size to (100) %\nhide\nCalculate Size Gap: []\n\nwhen I receive [clear fonts v]\nhide\ndelete this clone\n\nwhen I start as a clone\nshow\n\ndefine Find Width (text)\nif <(id) = [-1]> then\n    set [id v] to [0]\n    set [width v] to [0]\n    repeat (length of (text))\n        change [id v] by (1)\n        switch costume to (a  v)\n        switch costume to (join [a] (letter (id) of (text)))\n        change [width v] by ((item (costume [number v]) of [_width v]) * ((size) / (100)))\n    end\n    set [id v] to [-1]\nend\n\nwhen I receive [level results v]\nif <(id) = [-1]> then\n    go to [back v] layer\n    broadcast (Clear fonts v)\n    Print (join [Time taken: ] (Time)) At: X [0] Y: [96] With size: [125] Brightness: [0] Ghost: [0] Align [c]\n    Print (join [Deaths: ] (Deaths)) At: X [0] Y: [64] With size: [125] Brightness: [0] Ghost: [0] Align [c]\nend\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [extras game start v]\nif <(id) = [-1]> then\n    go to [front v] layer\n    set [ghost v] to [100]\n    repeat (10)\n        change [ghost v] by (-10)\n        broadcast (Clear fonts v)\n        Print (Score) At: X [-225] Y: [140] With size: [160] Brightness: [-75] Ghost: (ghost) Align [l]\n    end\nend\n\nwhen I receive [update score v]\nif <(id) = [-1]> then\n    stop [other scripts in sprite v]\n    broadcast (Clear fonts v)\n    Print (Score) At: X [-225] Y: [140] With size: [160] Brightness: [-75] Ghost: [0] Align [l]\nend\n\nwhen I receive [game over v]\nif <(id) = [-1]> then\n    stop [other scripts in sprite v]\n    repeat (10)\n        change [ghost v] by (10)\n        broadcast (Clear fonts v)\n        Print (Score) At: X [-225] Y: [140] With size: [160] Brightness: [-75] Ghost: (ghost) Align [l]\n    end\n    go to [front v] layer\n    broadcast (Clear fonts v)\n    set [ghost v] to [100]\n    repeat (10)\n        change [ghost v] by (-10)\n        broadcast (Clear fonts v)\n        Print (Score) At: X [0] Y: [25] With size: [175] Brightness: [0] Ghost: (ghost) Align [c]\n    end\nend\n\nwhen I receive [hide final score v]\nif <(id) = [-1]> then\n    stop [other scripts in sprite v]\n    repeat (10)\n        change [ghost v] by (10)\n        broadcast (Clear fonts v)\n        Print (Score) At: X [0] Y: [25] With size: [175] Brightness: [0] Ghost: (ghost) Align [c]\n    end\n    broadcast (Clear fonts v)\nend\n\n@Sun\n\nwhen I receive [start v]\nset [pause? v] to [False]\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I start as a clone\ngo to [back v] layer\nshow\ngo to x: (209) y: (161)\nset size to (100) %\nset [size v] to [0]\nforever\n    if <(Pause?) = [False]> then\n        change [size v] by (3)\n        set size to ((([sin v] of (size) ) * (4)) + (100)) %\n        go to [back v] layer\n    end\nend\n\nwhen I receive [load level v]\nif <(Level#) = [1]> then\n    create clone of (_myself_ v)\nend\n\n@Ground on Title\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\nwhen I receive [start v]\nset size to (100) %\nshow\ngo to x: (0) y: (0)\nswitch costume to (ground v)\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@Player\n\nwhen flag clicked\nsay []\nhide\n\nwhen I receive [load level v]\nset [pause? v] to [False]\nset [deaths v] to [0]\nset [frame v] to [1]\nset [xvel v] to [0]\nset [yvel v] to [0]\nset [scroll x v] to [0]\nset [x v] to [0]\nset [can jump? v] to [0]\nset [crouch key? v] to [0]\nset size to (100) %\npoint in direction (90)\nset y to (-54)\nshow\nset [ghost v] effect to (0)\nset [is crouch? v] to [0]\nforever\n    if <(Pause?) = [False]> then\n        set [can jump? v] to [0]\n        set rotation style [don't rotate v]\n        switch costume to (hitbox check v)\n        if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<(Stick Power) > [0.2]> and <<(Sitck Direction) > [115]> or <(Sitck Direction) < [-115]>>>> then\n            switch costume to (hitbox check - crouch v)\n        end\n        if <<(y position) < [-169]> or <touching (spikes v)?>> then\n            set rotation style [left-right v]\n            change [deaths v] by (1)\n            broadcast (Oops v)\n            switch costume to (player - 4 v)\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            set [x v] to (Spawn point)\n            set [xvel v] to [0]\n            set [yvel v] to [0]\n            set y to (-54)\n            wait (0.4) seconds\n        end\n        if <touching color (#ffc233)?> then\n            broadcast (Big Boing v)\n            set [yvel v] to [20]\n        end\n        switch costume to (hitbox up v)\n        if <<<(Crouch Key?) = [1]> and <touching (level v)?>> or <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<(Stick Power) > [0.2]> and <<(Sitck Direction) > [115]> or <(Sitck Direction) < [-115]>>>>> then\n            set [crouch key? v] to [1]\n            if <touching (level v)?> then\n                set [is crouch? v] to [1]\n            end\n            switch costume to (hitbox - crouch v)\n        else\n            set [crouch key? v] to [0]\n            set [is crouch? v] to [0]\n            switch costume to (hitbox v)\n        end\n        change [ghost v] effect by (-10)\n        if <touching (water v)?> then\n            set [accel. speed v] to [0.6]\n            set [gravity v] to [-0.75]\n        else\n            set [accel. speed v] to [1]\n            set [gravity v] to [-1.25]\n        end\n        if <<<key (d v) pressed?> or <key (right arrow v) pressed?>> or <<(Stick Power) > [0.2]> and <(Sitck Direction) > [0]>>> then\n            if <not <touching (level v)?>> then\n                change [xvel v] by (Accel. speed)\n                point in direction (90)\n            end\n        end\n        if <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<(Stick Power) > [0.2]> and <(Sitck Direction) < [0]>>> then\n            if <not <touching (level v)?>> then\n                change [xvel v] by ((Accel. speed) * (-1))\n                point in direction (-90)\n            end\n        end\n        set [xvel v] to ((Xvel) * (0.9))\n        switch costume to (hitbox up v)\n        if <<<(Crouch Key?) = [1]> and <touching (level v)?>> or <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<(Stick Power) > [0.2]> and <<(Sitck Direction) > [115]> or <(Sitck Direction) < [-115]>>>>> then\n            switch costume to (hitbox right - crouch v)\n        else\n            switch costume to (hitbox right v)\n        end\n        set [bump? v] to [0]\n        if <touching (level v)?> then\n            if <(Bump?) = [0]> then\n                if <not <(Xvel) < [0]>> then\n                    set [bump? v] to [1]\n                    set [xvel v] to ((Xvel) * (-1.1))\n                end\n            end\n        end\n        switch costume to (hitbox up v)\n        if <<<(Crouch Key?) = [1]> and <touching (level v)?>> or <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<(Stick Power) > [0.2]> and <<(Sitck Direction) > [115]> or <(Sitck Direction) < [-115]>>>>> then\n            switch costume to (hitbox left - crouch v)\n        else\n            switch costume to (hitbox left v)\n        end\n        if <touching (level v)?> then\n            if <(Bump?) = [0]> then\n                if <not <(Xvel) > [0]>> then\n                    set [bump? v] to [1]\n                    set [xvel v] to ((Xvel) * (-1.1))\n                end\n            end\n        end\n        if <(x position) < [-213]> then\n            if <not <(Xvel) > [0]>> then\n                set [bump? v] to [1]\n                set [xvel v] to ((Xvel) * (-1.1))\n            end\n        end\n        if <(X) > [9590]> then\n            stop [other scripts in sprite v]\n            broadcast (Win v)\n            set rotation style [left-right v]\n            switch costume to (player - 1 v)\n            repeat (10)\n                switch costume to (player - 1 v)\n                change [ghost v] effect by (10)\n            end\n            hide\n            stop [this script v]\n        end\n        switch costume to (hitbox up v)\n        if <<<(Crouch Key?) = [1]> and <touching (level v)?>> or <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<(Stick Power) > [0.2]> and <<(Sitck Direction) > [115]> or <(Sitck Direction) < [-115]>>>>> then\n            switch costume to (hitbox - crouch v)\n        else\n            switch costume to (hitbox v)\n        end\n        change [x v] by (Xvel)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change y by (1)\n                            if <touching (level v)?> then\n                                change y by (-5)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change [yvel v] by (Gravity)\n        change y by (Yvel)\n        if <touching (level v)?> then\n            if <<(y position) < [-169]> or <touching (spikes v)?>> then\n                set rotation style [left-right v]\n                change [deaths v] by (1)\n                broadcast (Oops v)\n                switch costume to (player - 4 v)\n                repeat (10)\n                    change [ghost v] effect by (10)\n                end\n                set [x v] to (Spawn point)\n                set [xvel v] to [0]\n                set [yvel v] to [0]\n                set y to (-54)\n                wait (0.4) seconds\n            end\n            change y by ((Yvel) * (-1))\n            set [yvel v] to [0]\n        end\n        change y by (-5)\n        if <<touching (level v)?> or <<touching (water v)?> and <(Yvel) < [0]>>> then\n            if <<<key (up arrow v) pressed?> or <<key (w v) pressed?> or <key (space v) pressed?>>> or <<(Stick Power) > [0.2]> and <<(Sitck Direction) > [-65]> and <(Sitck Direction) < [65]>>>> then\n                if <(Is crouch?) = [0]> then\n                    broadcast (Jump v)\n                    if <touching (water v)?> then\n                        set [yvel v] to [12]\n                    else\n                        set [yvel v] to [15]\n                    end\n                end\n            end\n            set [can jump? v] to [1]\n        end\n        change y by (5)\n        set rotation style [left-right v]\n        switch costume to (hitbox up v)\n        if <<<(Crouch Key?) = [1]> and <touching (level v)?>> or <<<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<(Stick Power) > [0.2]> and <<(Sitck Direction) > [115]> or <(Sitck Direction) < [-115]>>>> and <(Yvel) < [2]>>> then\n            switch costume to (player - crouch v)\n        else\n            switch costume to (join [Player - ] (frame))\n        end\n    end\nend\n\nwhen I receive [load level v]\nshow\nset [spawn point v] to [0]\nset [scroll x v] to [0]\nset [x v] to [0]\nforever\n    if <(Pause?) = [False]> then\n        set size to (1000) %\n        if <<(X) < [0]> or <(X) = [0]>> then\n            change [scroll x v] by (((0) - (scroll x)) / (3))\n        else\n            if <<(X) > [9120]> or <(X) = [9120]>> then\n                change [scroll x v] by (((9120) - (scroll x)) / (3))\n            else\n                change [scroll x v] by (((X) - (scroll x)) / (3))\n            end\n        end\n        if <<(X) > [2400]> and <(Spawn point) = [0]>> then\n            set [spawn point v] to [2400]\n        end\n        if <<(X) > [4800]> and <(Spawn point) = [2400]>> then\n            set [spawn point v] to [4800]\n        end\n        if <<(X) > [7200]> and <(Spawn point) = [4800]>> then\n            set [spawn point v] to [7200]\n        end\n        set x to (((X) - (scroll x)) - (184))\n        set size to (100) %\n    end\nend\n\nwhen I receive [load level v]\nforever\n    if <(Pause?) = [False]> then\n        if <key (p v) pressed?> then\n            wait until <not <key (p v) pressed?>>\n            if <(Pause?) = [False]> then\n                set [pause? v] to [True]\n                broadcast (Pause v)\n            end\n        end\n    end\nend\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [load level v]\nset [frame v] to [1]\nset [next v] to [15]\nforever\n    if <<(Can Jump?) = [1]> or <(Yvel) < [2]>> then\n        if <(round ([abs v] of (Xvel) )) = [0]> then\n            if <<(next) < [0]> or <(next) = [0]>> then\n                set [next v] to [15]\n            end\n            set [frame v] to [1]\n        else\n            if <<(next) < [0]> or <(next) = [0]>> then\n                set [next v] to [15]\n                if <(frame) = [1]> then\n                    set [frame v] to [2]\n                else\n                    set [frame v] to [1]\n                end\n            end\n        end\n    else\n        if <<(next) < [0]> or <(next) = [0]>> then\n            set [next v] to [15]\n        end\n        set [frame v] to [3]\n    end\n    change [next v] by (([abs v] of (Xvel) ) * (-1))\nend\n\nwhen I receive [start v]\nset size to (100) %\nclear graphic effects\nshow\npoint in direction (90)\ngo to x: (-173) y: (-54)\nswitch costume to (player - 1 v)\nforever\n    switch costume to (player - 1 v)\n    wait (0.15) seconds\n    switch costume to (player - 2 v)\n    wait (0.15) seconds\nend\n\n@Level\n\nwhen I receive [tick v]\nset size to (400) %\ngo to x: (((scroll x) * (-1)) + (ox)) y: (0)\nshow\nset y to (0)\nif <<(((scroll x) * (-1)) + (ox)) < [-500]> or <(((scroll x) * (-1)) + (ox)) > [500]>> then\n    hide\nend\nset size to (100) %\nswitch costume to (join (join (join [L] (Level#)) [-]) (ID))\n\nwhen flag clicked\nset [id v] to [0]\nhide\n\ndefine Clone all\nset [id v] to [0]\nset [ox v] to [0]\nrepeat (19)\n    change [id v] by (1)\n    change [ox v] by (480)\n    set size to (100) %\n    create clone of (_myself_ v)\nend\nset [id v] to [0]\nset [ox v] to [0]\n\nwhen I receive [load level v]\nif <(ID) = [0]> then\n    set [scroll x v] to [0]\n    Clone all\n    forever\n        broadcast (tick v)\n    end\nend\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@Parallax\n\nwhen I receive [tick v]\nif <<(Level#) = [1]> or <<(Level#) = [3]> or <(Level#) = [4]>>> then\n    switch costume to (join [Level ] (Level#))\n    set [brightness v] effect to (0)\n    if <(Level#) = [1]> then\n        set [ghost v] effect to (0)\n    else\n        set [ghost v] effect to (40)\n    end\n    set size to (400) %\n    go to x: (((((scroll x) * (-0.5)) mod (480)) + (ox)) - (480)) y: (0)\n    show\n    set y to (0)\n    if <<(((((scroll x) * (-0.5)) mod (480)) + (ox)) - (480)) < [-800]> or <(((((scroll x) * (-0.5)) mod (480)) + (ox)) - (480)) > [800]>> then\n        hide\n    end\n    set size to (100) %\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [load level v]\nif <<(Level#) = [1]> or <<(Level#) = [3]> or <(Level#) = [4]>>> then\n    show\n    go to [back v] layer\n    go to [back v] layer\n    set [ox v] to [0]\n    create clone of (_myself_ v)\n    set [ox v] to [480]\n    go to [back v] layer\n    go to [back v] layer\nend\n\nwhen I receive [start v]\nset [level# v] to [1]\nshow\nset [scroll x v] to [0]\ngo to [back v] layer\ngo to [back v] layer\nset [ox v] to [0]\ncreate clone of (_myself_ v)\nset [ox v] to [480]\ngo to [back v] layer\ngo to [back v] layer\nforever\n    change [scroll x v] by (2)\n    if <<(scroll x) > [960]> or <(scroll x) = [960]>> then\n        set [scroll x v] to [0]\n    end\n    broadcast (tick3 v)\nend\n\nwhen I receive [tick3 v]\nswitch costume to (level 1 v)\nset [brightness v] effect to (0)\nif <(Level#) = [1]> then\n    set [ghost v] effect to (0)\nelse\n    set [ghost v] effect to (40)\nend\nset size to (400) %\ngo to x: (((((scroll x) * (-0.5)) mod (480)) + (ox)) - (480)) y: (0)\nshow\nset y to (0)\nif <<(((((scroll x) * (-0.5)) mod (480)) + (ox)) - (480)) < [-800]> or <(((((scroll x) * (-0.5)) mod (480)) + (ox)) - (480)) > [800]>> then\n    hide\nend\nset size to (100) %\n\n@Water\n\nwhen I receive [tick2 v]\nif <(Level#) = [2]> then\n    set size to (400) %\n    go to x: (((scroll x) * (-1)) + (ox)) y: (0)\n    show\n    set y to (0)\n    if <<(((scroll x) * (-1)) + (ox)) < [-500]> or <(((scroll x) * (-1)) + (ox)) > [500]>> then\n        hide\n    end\n    set size to (100) %\n    switch costume to (join (join (join [L] (Level#)) [-]) (ID))\nend\n\nwhen flag clicked\nhide\nset [id v] to [0]\n\ndefine Clone all of them\nif <(Level#) = [2]> then\n    set [id v] to [0]\n    set [ox v] to [0]\n    repeat (19)\n        change [id v] by (1)\n        change [ox v] by (480)\n        set size to (100) %\n        create clone of (_myself_ v)\n    end\n    set [id v] to [0]\n    set [ox v] to [0]\nend\n\nwhen I receive [load level v]\nif <(ID) = [0]> then\n    set [scroll x v] to [0]\n    Clone all of them\n    forever\n        broadcast (tick2 v)\n    end\nend\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\nhide\nset [id v] to [0]\ndelete this clone\n\n@Spikes\n\nwhen I receive [tick2 v]\nif <not <(Level#) = [3]>> then\n    set size to (400) %\n    go to x: (((scroll x) * (-1)) + (ox)) y: (0)\n    show\n    set y to (0)\n    if <<(((scroll x) * (-1)) + (ox)) < [-500]> or <(((scroll x) * (-1)) + (ox)) > [500]>> then\n        hide\n    end\n    set size to (100) %\n    switch costume to (join (join (join [L] (Level#)) [-]) (ID))\nend\n\nwhen flag clicked\nhide\nset [id v] to [0]\n\ndefine Clone all of them\nset [id v] to [0]\nset [ox v] to [0]\nrepeat (19)\n    change [id v] by (1)\n    change [ox v] by (480)\n    set size to (100) %\n    create clone of (_myself_ v)\nend\nset [id v] to [0]\nset [ox v] to [0]\n\nwhen I receive [load level v]\nif <(ID) = [0]> then\n    set [scroll x v] to [0]\n    if <not <(Level#) = [3]>> then\n        Clone all of them\n    end\nend\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\nhide\nset [id v] to [0]\ndelete this clone\n\n@Control Stick\n\nwhen I start as a clone\nswitch costume to (stick v)\ngo [forward v] (1) layers\nset [ghost v] effect to (25)\nforever\n    set [ghost v] effect to (100)\n    set [stick power v] to [0]\n    go to (myself)\n    wait until <mouse down?>\n    if <not <<(Pause?) = [False]> and <(In Pause Button?) = [0]>>> then\n        wait until <not <mouse down?>>\n    else\n        repeat until <<not <mouse down?>> or <not <(Pause?) = [False]>>>\n            set [ghost v] effect to (25)\n            go to (mouse-pointer v)\n            point towards (myself)\n            turn right (180) degrees\n            set [sitck direction v] to (direction)\n            set [stick power v] to (distance to [(myself) v])\n            if <(Stick Power) > (max stick)> then\n                move ((max stick) - (Stick Power)) steps\n                set [stick power v] to (max stick)\n            end\n            set [stick power v] to ((Stick Power) / (max stick))\n        end\n    end\nend\n\nwhen I receive [load level v]\nset [myself v] to [Control Stick]\nset [max stick v] to [52]\ngo to [front v] layer\nshow\nswitch costume to (base v)\nset [ghost v] effect to (60)\ncreate clone of (_myself_ v)\nforever\n    set [ghost v] effect to (100)\n    wait until <mouse down?>\n    if <not <<(Pause?) = [False]> and <(In Pause Button?) = [0]>>> then\n        wait until <not <mouse down?>>\n    else\n        set [ghost v] effect to (60)\n        go to (mouse-pointer v)\n    end\n    wait until <<not <mouse down?>> or <not <(Pause?) = [False]>>>\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [win v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [back to level select v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@Minigame Player\n\nwhen I receive [extras game start v]\nset [score v] to [0]\nset [vel v] to [0]\nset [jumps v] to [0]\nset [touching? v] to [False]\npoint in direction (90)\nif <(Minigame#) = [1]> then\n    go to x: (mouse x) y: (-54)\nelse\n    go to x: (-173) y: (-54)\nend\nset size to (100) %\nset [ghost v] effect to (100)\nshow\nset rotation style [left-right v]\nforever\n    change [ghost v] effect by (-10)\n    Game (Minigame#)\nend\n\nwhen flag clicked\nsay []\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change size by (-10)\n    change [ghost v] effect by (10)\nend\nhide\nsay []\n\ndefine Game (#)\nif <(Pause?) = [False]> then\n    if <(#) = [1]> then\n        switch costume to (hitbox v)\n        set [touching? v] to <touching (minigame objects v)?>\n        switch costume to (player - 1 v)\n        point towards (mouse-pointer v)\n        change x by (((mouse x) - (x position)) / (6))\n    end\n    if <(#) = [2]> then\n        switch costume to (hitbox v)\n        set [touching? v] to <touching (minigame objects v)?>\n        switch costume to (player - 1 v)\n        change [vel v] by (-1.3)\n        change y by (vel)\n        if <(y position) < [-54]> then\n            set [jumps v] to [0]\n            set [vel v] to [0]\n            set y to (-54)\n        end\n        if <not <<<mouse down?> and <(In Pause Button?) = [0]>> or <key (space v) pressed?>>> then\n            set [jumps v] to [7]\n        end\n        if <<<<mouse down?> and <(In Pause Button?) = [0]>> or <key (space v) pressed?>> and <(jumps) < [6]>> then\n            if <(jumps) = [0]> then\n                broadcast (Jump v)\n            end\n            change [jumps v] by (1)\n            set [vel v] to [11]\n            change y by (vel)\n        end\n    end\nend\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [extras game start v]\nforever\n    if <(Pause?) = [False]> then\n        if <key (p v) pressed?> then\n            wait until <not <key (p v) pressed?>>\n            if <(Pause?) = [False]> then\n                set [pause? v] to [True]\n                broadcast (Pause v)\n            end\n        end\n    end\nend\n\n@Minigame Objects\n\nwhen I start as a clone\nshow\nclear graphic effects\npoint in direction (90)\nif <(Minigame#) = [2]> then\n    set [direction v] to (((pick random (0) to (1)) * (2)) - (1))\n    set [random v] to ((pick random (-10.0) to (-6.0)) * ((1) + ((1) - (Spawn rate))))\n    set size to (1000) %\n    go to x: (250) y: (pick random (-40) to (-20))\n    set size to (100) %\n    forever\n        if <(Pause?) = [False]> then\n            if <(x position) < [-252]> then\n                change [score v] by (1)\n                broadcast (Update Score v)\n                if <not <<(Spawn rate) < [0.5]> or <(Spawn rate) = [0.5]>>> then\n                    change [spawn rate v] by (-0.0025)\n                end\n                hide\n                delete this clone\n            else\n                set size to (1000) %\n                turn right ((random) * (direction)) degrees\n                change x by (random)\n                set size to (100) %\n                if <<touching (minigame player v)?> and <(Touching?) = [true]>> then\n                    broadcast (Oops v)\n                    broadcast (Game Over v)\n                end\n            end\n        end\n    end\nelse\n    if <(Minigame#) = [1]> then\n        set [direction v] to (((pick random (0) to (1)) * (2)) - (1))\n        set [random v] to (pick random (-15.5) to (-5.0))\n        set size to (1000) %\n        go to x: (pick random (-240) to (240)) y: (350)\n        set size to (100) %\n        forever\n            if <(Pause?) = [False]> then\n                if <(y position) < [-55]> then\n                    repeat (4)\n                        change [ghost v] effect by (25)\n                        wait until <(Pause?) = [False]>\n                    end\n                    hide\n                    delete this clone\n                else\n                    turn right ((random) * (direction)) degrees\n                    change y by (random)\n                    if <<touching (minigame player v)?> and <(Touching?) = [true]>> then\n                        if <(costume [number v]) = [1]> then\n                            broadcast (Pop v)\n                            change [score v] by (1)\n                            broadcast (Update Score v)\n                            if <not <<(Spawn rate) < [0.5]> or <(Spawn rate) = [0.5]>>> then\n                                change [spawn rate v] by (-0.0025)\n                            end\n                        else\n                            if <(costume [number v]) = [3]> then\n                                if <not <(Lives) = [3]>> then\n                                    change [lives v] by (1)\n                                end\n                                broadcast (Heal v)\n                                broadcast (Collect v)\n                            else\n                                broadcast (Crunch v)\n                                change [lives v] by (-1)\n                                broadcast (Hit v)\n                                if <(Lives) = [0]> then\n                                    broadcast (Oops v)\n                                    broadcast (Game Over v)\n                                end\n                            end\n                        end\n                        repeat (4)\n                            change [ghost v] effect by (25)\n                            change size by (-10)\n                            wait until <(Pause?) = [False]>\n                        end\n                        hide\n                        delete this clone\n                    end\n                end\n            end\n        end\n    else\n        delete this clone\n    end\nend\n\nwhen flag clicked\nset size to (100) %\nhide\n\nwhen I receive [extras game start v]\nif <(Minigame#) = [1]> then\n    set [spawn rate v] to [1]\n    go to [back v] layer\n    forever\n        repeat (round ((pick random (0.2) to (0.9)) * (30)))\n            wait until <(Pause?) = [False]>\n        end\n        create clone of (_myself_ v)\n    end\nend\nif <(Minigame#) = [2]> then\n    set [spawn rate v] to [1]\n    go to [back v] layer\n    forever\n        repeat ((round ((pick random (1.25) to (3.0)) * (30))) / ((1) + ((1) - (Spawn rate))))\n            wait until <(Pause?) = [False]>\n        end\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\ndelete this clone\n\nwhen I start as a clone\nclear graphic effects\nif <(Minigame#) = [2]> then\n    switch costume to (basketball v)\nelse\n    if <(Minigame#) = [1]> then\n        if <<(pick random (1) to ((round ((8) * ((2) + ((Spawn rate) * (-1))))) * (2))) = [1]> and <(Lives) < [3]>> then\n            switch costume to (golden apple v)\n            point in direction (90)\n        else\n            if <(pick random (1) to (round ((5) * (Spawn rate)))) = [1]> then\n                switch costume to (rotten apple v)\n            else\n                switch costume to (apple v)\n            end\n        end\n    else\n        delete this clone\n    end\nend\n\nwhen I receive [fade out v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@Love/Fav detector\n\nwhen I start as a clone\nif <(Clone) = [Love]> then\n    show\n    switch costume to (love v)\n    go to x: (0) y: (0)\n    set [loved? v] to [0]\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [loved? v] to [1]\n            delete this clone\n        end\n    end\nelse\n    if <(Clone) = [Fav]> then\n        show\n        switch costume to (fav v)\n        go to x: (0) y: (0)\n        set [faved? v] to [0]\n        forever\n            if <touching (mouse-pointer v)?> then\n                set [faved? v] to [1]\n                delete this clone\n            end\n        end\n    else\n        if <(Clone) = [Thanks]> then\n            show\n            go to x: (-110) y: (1000)\n            switch costume to (pick random (1) to (4))\n            start sound [Thank you! ^w^ v]\n            set size to (100) %\n            set [ghost v] effect to (100)\n            repeat (25)\n                change y by (((156) - (y position)) / (5))\n                change [ghost v] effect by (-4)\n                go to [front v] layer\n            end\n            repeat (90)\n                set y to (156)\n                go to [front v] layer\n            end\n            repeat (10)\n                go to [front v] layer\n                change y by (((155) - (y position)) / (-1.8))\n                change [ghost v] effect by (10)\n            end\n            hide\n            delete this clone\n        else\n            delete this clone\n        end\n    end\nend\n\nwhen flag clicked\nhide\nset [loved? v] to [0]\nset [faved? v] to [0]\nset [clone v] to [Love]\ncreate clone of (_myself_ v)\nset [clone v] to [Fav]\ncreate clone of (_myself_ v)\nwait until <<(Loved?) = [1]> and <(Faved?) = [1]>>\nwait (1) seconds\nset [clone v] to [Thanks]\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nwhen this sprite clicked\nif <<(Loved?) = [1]> and <(Faved?) = [1]>> then\n    if <(Clone) = [Thanks]> then\n        stop [other scripts in sprite v]\n        repeat (10)\n            go to [front v] layer\n            change y by (((155) - (y position)) / (-1.8))\n            change [ghost v] effect by (10)\n        end\n        hide\n    end\nend\n\n@Sound Effects\n\nwhen I receive [change v]\nset volume to (Sound Volume) %\nstart sound [Change v]\n\nwhen I receive [select sfx v]\nset volume to (Sound Volume) %\nstart sound [Select v]\n\nwhen I receive [hover sfx v]\nset volume to (Sound Volume) %\nstart sound [Hover v]\n\nwhen I receive [back sfx v]\nset volume to (Sound Volume) %\nstart sound [Back v]\n\nwhen I receive [pause v]\nset volume to (Sound Volume) %\nstart sound [Pause v]\n\nwhen I receive [boing v]\nset volume to (Sound Volume) %\nstart sound [Boing v]\n\nwhen I receive [big boing v]\nset volume to (Sound Volume) %\nstart sound [Big Boing v]\n\nwhen I receive [oops v]\nset volume to (Sound Volume) %\nstart sound [Oops v]\n\nwhen I receive [jump v]\nset volume to (Sound Volume) %\nstart sound [Jump v]\n\nwhen I receive [pop v]\nset volume to (Sound Volume) %\nstart sound [Pop v]\n\nwhen I receive [collect v]\nset volume to (Sound Volume) %\nstart sound [Collect v]\n\nwhen I receive [crunch v]\nset volume to (Sound Volume) %\nstart sound [Crunch v]\n\n