Spring Town (A Story Platformer)
@Stage\n\nwhen flag clicked\nhide variable [☁ green flag v]\nchange [☁ green flag v] by (1)\nadd (username) to [green flag v]\nshow list [green flag v]\nclear graphic effects\nset volume to (100) %\nstart sound [Start v]\nswitch backdrop to (color v)\nrepeat (200)\n    change [color v] effect by (1)\nend\n\nwhen I receive [a v]\nnext backdrop\n\nwhen I receive [b v]\nswitch backdrop to (space v)\n\nwhen I receive [c v]\nswitch backdrop to (intro v)\nwait (5) seconds\nbroadcast (d v)\n\nwhen I receive [e v]\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [f v]\nswitch backdrop to (backdrop2 v)\nrepeat (40)\n    change volume by (-2.5)\nend\n\nwhen I receive [message1 v]\nset [lag? v] to [0]\nclear sound effects\nset volume to (0) %\nswitch backdrop to (game v)\nstop all sounds\nforever\n    play sound [Sector A v] until done\nend\n\nwhen I receive [message1 v]\nwait (0.5) seconds\nrepeat (100)\n    change volume by (1)\nend\n\nwhen I receive [shush v]\nstop [other scripts in sprite v]\nstop all sounds\n\nwhen I receive [messege1b v]\nset [lag? v] to [0]\nclear sound effects\nset volume to (0) %\nswitch backdrop to (game2 v)\nstop all sounds\nforever\n    play sound [Sector B v] until done\nend\n\nwhen I receive [mute v]\nset volume to (0) %\n\nwhen I receive [sound v]\nset volume to (100) %\n\nwhen I receive [message1d v]\nwait (0.5) seconds\nrepeat (100)\n    change volume by (1)\nend\n\nwhen I receive [message1c v]\nset [lag? v] to [0]\nclear sound effects\nset volume to (0) %\nswitch backdrop to (game3 v)\nstop all sounds\nforever\n    play sound [Sector C v] until done\nend\n\nwhen I receive [message1c v]\nwait (0.5) seconds\nrepeat (100)\n    change volume by (1)\nend\n\nwhen [l v] key pressed\nif <(Lag?) = [0]> then\n    set [lag? v] to [1]\nelse\n    set [lag? v] to [0]\nend\n\nwhen I receive [message1d v]\nset [lag? v] to [0]\nclear sound effects\nset volume to (0) %\nswitch backdrop to (game4 v)\nstop all sounds\nforever\n    play sound [Sector D v] until done\nend\n\nwhen I receive [end v]\nstop all sounds\nswitch backdrop to (end v)\n\nwhen I receive [thank you for playing v]\nwait (3) seconds\nswitch backdrop to (last v)\nforever\n    play sound [End v] until done\nend\n\nwhen I receive [message1 v]\nswitch backdrop to (game v)\nclear graphic effects\nstop [other scripts in sprite v]\n\n@Player\n\nwhen flag clicked\nset [lag? v] to [0]\nhide\n\nwhen I receive [message1 v]\ngo to [front v] layer\ngo to x: (-200) y: (-100)\nset size to (140) %\nswitch costume to (costume1 v)\nshow\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [xv v] by (-1)\n    end\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [xv v] by (1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching color (#197f00)?> then\n        change y by (1)\n        if <touching color (#197f00)?> then\n            change y by (1)\n            if <touching color (#197f00)?> then\n                change y by (1)\n                if <touching color (#197f00)?> then\n                    change y by (1)\n                    if <touching color (#197f00)?> then\n                        change y by (1)\n                        if <touching color (#197f00)?> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\n                                end\n                                set [yv v] to [10]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <touching color (#197f00)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#197f00)?> then\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            set [yv v] to [10]\n        end\n    end\n    change y by (1)\n    if <(x position) > [241]> then\n        if <<(level) = [9]> or <<(level) = [10]> or <(level) = [11]>>> then\n            broadcast (message3 v)\n            bridge\n        else\n            broadcast (message3 v)\n            reset\n        end\n    end\n    if <key (r v) pressed?> then\n        if <<(level) = [10]> or <<(level) = [11]> or <(level) = [12]>>> then\n            bridge\n        else\n            reset\n        end\n    end\n    if <<(y position) < [-177]> or <touching color (#ff0000)?>> then\n        reset\n    end\nend\n\ndefine reset\ngo to x: (-200) y: (-100)\n\nwhen I receive [message1 v]\nforever\n    if <key (right arrow v) pressed?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\n    if <key (left arrow v) pressed?> then\n        switch costume to (costume3 v)\n    end\nend\n\ndefine bridge\ngo to x: (-200) y: (50)\nset [lag? v] to [1]\n\nwhen I receive [next v]\nstop [other scripts in sprite v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nbroadcast (messege1b v)\nstop [this script v]\n\nwhen I receive [messege1b v]\nwait (2) seconds\nbroadcast (Sector B v)\n\nwhen I receive [next2 v]\nstop [other scripts in sprite v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nbroadcast (message1c v)\nstop [this script v]\n\nwhen I receive [sector b v]\nclear graphic effects\nhide\ngo to [front v] layer\ngo to x: (-200) y: (-100)\nset size to (140) %\nswitch costume to (costume1 v)\nshow\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [xv v] by (-1.5)\n    end\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [xv v] by (1.5)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching color (#eadf97)?> then\n        change y by (1)\n        if <touching color (#eadf97)?> then\n            change y by (1)\n            if <touching color (#eadf97)?> then\n                change y by (1)\n                if <touching color (#eadf97)?> then\n                    change y by (1)\n                    if <touching color (#eadf97)?> then\n                        change y by (1)\n                        if <touching color (#eadf97)?> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\n                                end\n                                set [yv v] to [10]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <touching color (#eadf97)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#eadf97)?> then\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            set [yv v] to [10]\n        end\n    end\n    change y by (1)\n    if <(x position) > [241]> then\n        if <<(level) = [22]> or <(level) = [23]>> then\n            broadcast (message3 v)\n            bridge\n        else\n            broadcast (message3 v)\n            reset\n        end\n    end\n    if <key (r v) pressed?> then\n        if <<(level) = [23]> or <(level) = [24]>> then\n            bridge\n        else\n            reset\n        end\n    end\n    if <<(y position) < [-177]> or <touching color (#7d0000)?>> then\n        if <<(level) = [23]> or <(level) = [24]>> then\n            bridge\n        else\n            reset\n        end\n    end\nend\n\nwhen I receive [sector b v]\nforever\n    if <key (right arrow v) pressed?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\n    if <key (left arrow v) pressed?> then\n        switch costume to (costume3 v)\n    end\nend\n\nwhen I receive [sector c v]\nforever\n    if <key (right arrow v) pressed?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\n    if <key (left arrow v) pressed?> then\n        switch costume to (costume3 v)\n    end\nend\n\nwhen I receive [sector c v]\nclear graphic effects\ngo to [front v] layer\ngo to x: (-200) y: (-100)\nset size to (140) %\nswitch costume to (costume1 v)\nshow\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [xv v] by (-1.5)\n    end\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [xv v] by (1.5)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching color (#b2b2b2)?> then\n        change y by (1)\n        if <touching color (#b2b2b2)?> then\n            change y by (1)\n            if <touching color (#b2b2b2)?> then\n                change y by (1)\n                if <touching color (#b2b2b2)?> then\n                    change y by (1)\n                    if <touching color (#b2b2b2)?> then\n                        change y by (1)\n                        if <touching color (#b2b2b2)?> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\n                                end\n                                set [yv v] to [15]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <touching color (#b2b2b2)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#b2b2b2)?> then\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            set [yv v] to [15]\n        end\n    end\n    change y by (1)\n    if <(x position) > [241]> then\n        if <(level) = [35]> then\n            broadcast (message3 v)\n            higher\n        else\n            broadcast (message3 v)\n            reset\n        end\n    end\n    if <key (r v) pressed?> then\n        if <(level) = [36]> then\n            higher\n        else\n            reset\n        end\n    end\n    if <<(y position) < [-177]> or <touching color (#003fff)?>> then\n        reset\n    end\nend\n\nwhen I receive [message1c v]\nwait (2) seconds\nbroadcast (Sector C v)\n\ndefine higher\ngo to x: (-200) y: (100)\n\nwhen I receive [sector d v]\nclear graphic effects\ngo to [front v] layer\ngo to x: (-200) y: (-100)\nset size to (140) %\nswitch costume to (costume1 v)\nshow\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [xv v] by (-0.5)\n    end\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [xv v] by (0.5)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching color (#4e0000)?> then\n        change y by (1)\n        if <touching color (#4e0000)?> then\n            change y by (1)\n            if <touching color (#4e0000)?> then\n                change y by (1)\n                if <touching color (#4e0000)?> then\n                    change y by (1)\n                    if <touching color (#4e0000)?> then\n                        change y by (1)\n                        if <touching color (#4e0000)?> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-2.5]\n                                else\n                                    set [xv v] to [2.5]\n                                end\n                                set [yv v] to [8]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <touching color (#4e0000)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#4e0000)?> then\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            set [yv v] to [8]\n        end\n    end\n    change y by (1)\n    if <(x position) > [241]> then\n        \n            broadcast (message3 v)\n            higher\n        else\n            broadcast (message3 v)\n            reset\n        end\n    end\n    if <key (r v) pressed?> then\n        \n            higher\n        else\n            reset\n        end\n    end\n    if <<(y position) < [-177]> or <touching color (#ffffff)?>> then\n        reset\n    end\nend\n\nwhen I receive [sector d v]\nforever\n    if <key (right arrow v) pressed?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\n    if <key (left arrow v) pressed?> then\n        switch costume to (costume3 v)\n    end\nend\n\nwhen I receive [next3 v]\nstop [other scripts in sprite v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nbroadcast (message1d v)\nstop [this script v]\n\nwhen I receive [message1d v]\nwait (2) seconds\nbroadcast (Sector D v)\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\nstop [this script v]\n\nwhen I receive [message1 v]\nforever\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        switch costume to (costume3 v)\n    end\nend\n\nwhen I receive [sector b v]\nforever\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        switch costume to (costume3 v)\n    end\nend\n\nwhen I receive [sector c v]\nforever\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        switch costume to (costume3 v)\n    end\nend\n\nwhen I receive [sector d v]\nforever\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        switch costume to (costume3 v)\n    end\nend\n\n@Flowers\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nset size to (50) %\nshow\ngo to x: (pick random (140) to (-140)) y: (180)\nforever\n    point in direction (pick random (-90) to (90))\n    glide (3) secs to x: (x position) y: (-180)\n    wait (0.2) seconds\n    delete this clone\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [message1 v]\nstop [other scripts in sprite v]\nforever\n    if <(Lag?) = [0]> then\n        wait (pick random (0.5) to (0.7)) seconds\n        create clone of (_myself_ v)\n    end\nend\n\n@Ground\n\nwhen flag clicked\nhide variable [level v]\nhide\n\nwhen I receive [message1 v]\nswitch costume to (costume1 v)\nset [level v] to [1]\ngo to x: (0) y: (0)\nshow\nforever\n    set [level v] to (costume [number v])\n    if <(level) = [10]> then\n        go to [front v] layer\n    end\n    if <(level) = [23]> then\n        go to [front v] layer\n    end\n    if <(level) = [35]> then\n        go to [front v] layer\n    end\nend\n\nwhen I receive [message3 v]\nnext costume\n\nwhen I receive [messege1b v]\nswitch costume to (costume13 v)\nset [level v] to [13]\ngo [backward v] (1000) layers\n\nwhen I receive [message1c v]\nswitch costume to (costume25 v)\nset [level v] to [25]\ngo [backward v] (1000) layers\n\nwhen I receive [message1d v]\nswitch costume to (costume37 v)\nset [level v] to [37]\ngo [backward v] (1000) layers\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\nstop [this script v]\n\n@Level\n\nwhen flag clicked\nhide\n\nwhen I receive [message1 v]\nswitch costume to (costume1 v)\ngo to x: (-218) y: (161)\nset size to (50) %\nshow\nforever\n    switch costume to (level)\nend\n\nwhen I receive [messege1b v]\nswitch costume to (costume13 v)\n\nwhen I receive [message1c v]\nswitch costume to (costume25 v)\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (20)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [message1d v]\nswitch costume to (costume37 v)\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\nstop [this script v]\n\n@black\n\nwhen I receive [c v]\nrepeat (100)\n    change [ghost v] effect by (1)\nend\nhide\nstop [this script v]\n\nwhen I receive [message1 v]\nstop [other scripts in sprite v]\nhide\nstop [this script v]\n\nwhen flag clicked\ngo to [front v] layer\nclear graphic effects\ngo to x: (0) y: (0)\nshow\nwait (1) seconds\nrepeat (13)\n    repeat (50)\n        change [ghost v] effect by (2)\n    end\n    wait (3) seconds\n    repeat (50)\n        change [ghost v] effect by (-2)\n    end\n    broadcast (a v)\n    wait (1) seconds\nend\nbroadcast (b v)\nstop [this script v]\n\n@Earth\n\nwhen flag clicked\nhide\n\nwhen I receive [b v]\ngo to [front v] layer\ngo to x: (0) y: (0)\nset size to (100) %\nshow\nwait (1) seconds\nrepeat (660)\n    change size by (2)\nend\nhide\nbroadcast (c v)\nstop [this script v]\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [message1 v]\nstop [other scripts in sprite v]\nhide\nstop [this script v]\n\n@Help\n\nwhen flag clicked\nhide\n\nwhen I receive [message1 v]\nswitch costume to (costume1 v)\nset size to (50) %\ngo to x: (-133) y: (-89)\nhide\nforever\n    if <(level) = [12]> then\n        switch costume to (costume1 v)\n        set volume to (100) %\n        go to x: (180) y: (-68)\n        show\n        if <<touching (player v)?> and <<key (space v) pressed?> or <mouse down?>>> then\n            set volume to (100) %\n            broadcast (shush v)\n            set language to (en v)::tts\n            set voice to (giant v)::tts\n            speak [It seems like you have made it to Sector B.]::tts\n            speak [From here, there will be other new dangers.]::tts\n            speak [It might get a bit hard but you can do it.]::tts\n            speak [Good luck.]::tts\n            wait (3) seconds\n            broadcast (next v)\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [messege1b v]\nforever\n    if <(level) = [24]> then\n        switch costume to (costume2 v)\n        set volume to (100) %\n        go to x: (150) y: (-75)\n        show\n        if <<touching (player v)?> and <<key (space v) pressed?> or <mouse down?>>> then\n            broadcast (shush v)\n            set language to (en v)::tts\n            set voice to (giant v)::tts\n            speak [It seems like you have made it to Sector C.]::tts\n            speak [Beings here sometimes call it Rocky Road.]::tts\n            speak [Harder and harder it will get, but good luck.]::tts\n            wait (3) seconds\n            broadcast (next2 v)\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [message1c v]\nforever\n    if <(level) = [36]> then\n        switch costume to (costume3 v)\n        set volume to (100) %\n        go to x: (150) y: (-20)\n        show\n        if <<touching (player v)?> and <<key (space v) pressed?> or <mouse down?>>> then\n            broadcast (shush v)\n            set language to (en v)::tts\n            set voice to (giant v)::tts\n            speak [It seems like you have made it to Sector D.]::tts\n            speak [It is the final part of Spring Town.]::tts\n            speak [We all wish you luck.]::tts\n            speak [Do your best.]::tts\n            wait (3) seconds\n            broadcast (next3 v)\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [message1d v]\nforever\n    if <(level) = [48]> then\n        switch costume to (costume4 v)\n        set volume to (100) %\n        go to x: (190) y: (-113)\n        show\n        if <<touching (player v)?> and <<key (space v) pressed?> or <mouse down?>>> then\n            broadcast (shush v)\n            set language to (en v)::tts\n            set voice to (giant v)::tts\n            speak [You have made it to the end.]::tts\n            speak [This is the end of Spring Town.]::tts\n            speak [Next, you will journey through Summer Valley.]::tts\n            speak [I will meet you again soon later.]::tts\n            wait (3) seconds\n            broadcast (END v)\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nhide\n\n@Help2\n\nwhen flag clicked\nhide\n\nwhen I receive [message1 v]\nswitch costume to (costume1 v)\nshow\ngo to x: (-100) y: (280)\nglide (1) secs to x: (-100) y: (137)\n\nwhen I receive [message1 v]\nforever\n    if <key (x v) pressed?> then\n        glide (1) secs to x: (-100) y: (280)\n        hide\n    end\n    if <key (z v) pressed?> then\n        switch costume to (level)\n        show\n        glide (1) secs to x: (-100) y: (137)\n    end\nend\n\nwhen I receive [message3 v]\nnext costume\nshow\ngo to x: (-100) y: (280)\nglide (1) secs to x: (-100) y: (137)\n\nwhen I receive [messege1b v]\nswitch costume to (costume13 v)\n\nwhen I receive [message1c v]\nswitch costume to (costume25 v)\n\nwhen I receive [message1d v]\nswitch costume to (costume37 v)\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nhide\n\n@Sound\n\nwhen flag clicked\nhide\n\nwhen I receive [message1 v]\nwait (3) seconds\ngo to [front v] layer\nswitch costume to (costume1 v)\nshow\nset size to (30) %\ngo to x: (-217) y: (-167)\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (20)\n    else\n        set [brightness v] effect to (0)\n    end\n    go to [front v] layer\nend\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (mute v)\n    switch costume to (costume2 v)\n    wait (1) seconds\nelse\n    broadcast (sound v)\n    switch costume to (costume1 v)\n    wait (1) seconds\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nhide\n\n@Map\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [map v]\ngo to [front v] layer\ngo to x: (0) y: (0)\nshow\nforever\n    if <key (space v) pressed?> then\n        hide\n    end\nend\n\nwhen I receive [sector b v]\nswitch costume to (costume2 v)\n\nwhen I receive [sector c v]\nswitch costume to (costume3 v)\n\nwhen I receive [sector d v]\nswitch costume to (costume4 v)\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nhide\n\n@Guy\n\nwhen flag clicked\nclear graphic effects\nhide\n\nwhen I receive [c v]\nshow\npoint in direction (90)\nset rotation style [left-right v]\ngo to x: (99) y: (-107)\nset size to (94) %\nset [ghost v] effect to (100)\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\nsay [I will go now.] for (2) seconds\nsay [Wish me luck.] for (2) seconds\npoint in direction (-90)\nglide (3) secs to x: (240) y: (-107)\nbroadcast (e v)\ngo to x: (-200) y: (-113)\nglide (3) secs to x: (44) y: (-113)\nglide (0.3) secs to x: (44) y: (-10)\nglide (0.5) secs to x: (100) y: (-27)\nglide (0.3) secs to x: (132) y: (69)\nglide (0.5) secs to x: (172) y: (53)\nglide (1) secs to x: (230) y: (53)\nbroadcast (f v)\ngo to x: (-200) y: (-113)\nglide (3) secs to x: (240) y: (-113)\nhide\nbroadcast (message1 v)\nstop [this script v]\n\nwhen I receive [end v]\nclear graphic effects\nshow\npoint in direction (-90)\nset rotation style [left-right v]\ngo to x: (-200) y: (-118)\nset size to (94) %\nset [ghost v] effect to (100)\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\nglide (2) secs to x: (-120) y: (-118)\nglide (0.7) secs to x: (0) y: (0)\nglide (1) secs to x: (130) y: (-115)\nsay [I am finally in Summer Valley.] for (2) seconds\nglide (2) secs to x: (200) y: (-115)\nsay [Farewell until next time.] for (2) seconds\nglide (2) secs to x: (250) y: (-115)\nhide\nbroadcast (Thank you for playing v)\nstop [this script v]\n\nwhen I receive [message1 v]\nstop [other scripts in sprite v]\nhide\nstop [this script v]\n\n@Sprite1\n\nwhen flag clicked\nset [ghost v] effect to (100)\nwait (8) seconds\nset size to (40) %\nshow\ngo to x: (214) y: (-160)\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\nclear graphic effects\nforever\n    if <touching (mouse-pointer v)?> then\n        if <mouse down?> then\n            set size to (30) %\n            broadcast (message1 v)\n            hide\n            stop [this script v]\n        else\n            set [brightness v] effect to (30)\n        end\n    else\n        set size to (40) %\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [message1 v]\nhide\n\n@Sprite2\n\nwhen flag clicked\nhide\nwait (8) seconds\nset [ghost v] effect to (80)\nshow\ngo to x: (0) y: (0)\n\nwhen I receive [b v]\nhide\n\nwhen I receive [message1 v]\nhide\n\n@Sprite3\n\nwhen flag clicked\nhide\nwait (8) seconds\nforever\n    create clone of (_myself_ v)\n    wait (pick random (0.8) to (1.6)) seconds\nend\n\nwhen I start as a clone\nshow\nset [ghost v] effect to (pick random (80) to (99))\nset size to (50) %\ngo to x: (292) y: (pick random (109) to (177))\nglide (pick random (7) to (21)) secs to x: (-292) y: (y position)\ndelete this clone\n\nwhen I receive [b v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [message1 v]\nstop [other scripts in sprite v]\nhide\n\n
This project took me many hours to make, so a love and fave will be very appreciated!\nCheck out my other platformers too: https://scratch.mit.edu/studios/4685976/