Minecraft - A Platformer                           #games
@Stage\n\nwhen flag clicked\nset [brightness v] effect to (0)\nforever\n    repeat (1000)\n        change [brightness v] effect by (-0.05)\n    end\n    repeat (1000)\n        change [brightness v] effect by (0.05)\n    end\nend\n\nset [brightness v] effect to (0)\n\n@Fungi\n\nwhen flag clicked\nswitch costume to (costume2 v)\nforever\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change x by (-4)\n        next costume\n        if <(costume [number v]) > [11]> then\n            switch costume to (costume2 v)\n        end\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change x by (4)\n        next costume\n        if <(costume [number v]) > [11]> then\n            switch costume to (costume2 v)\n        end\n    end\n    if <not <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>>> then\n        switch costume to (costume2 v)\n    end\n    if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n        switch costume to (costume12 v)\n        wait until <not <touching (ground v)?>>\n        switch costume to (costume13 v)\n        wait until <not <touching (ground v)?>>\n        wait until <touching (ground v)?>\n    end\nend\n\nstart sound [Squish Pop v]\n\nstart sound [Squish Pop v]\n\nwhen flag clicked\nshow\nforever\n    go to (my friend v)\nend\n\nwhen I receive [die v]\nhide\nwait (0.5) seconds\nshow\n\n@my friend\n\nwhen flag clicked\n\ndefine starting position\nset [wait v] to [1]\nset [fallspeed v] to [0]\nif <<(level) = [2]> and <(talk) = [0]>> then\n    set [wait v] to [1]\n    broadcast (pigtalk v)\n    set [talk v] to [1]\nend\ngo to x: (-220) y: (-100)\nwait (0.1) seconds\nshow\nUP\nset [wait v] to [0]\n\nwhen I receive [boing v]\nset [fallspeed v] to [18]\n\nbroadcast (coolieu v)\n\nwhen I receive [end of end v]\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [wait v] to [1]\nset [talk v] to [0]\nset size to (100) %\nhide\nshow\nset [ghost v] effect to (100)\nset [runspeed v] to [0]\nset [fallspeed v] to [0]\ngo to x: (-200) y: (-45)\nforever\n    if <(wait) = [0]> then\n        change [fallspeed v] by (-1)\n        if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n            set [runspeed v] to [-5]\n        end\n        if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n            set [runspeed v] to [5]\n        end\n        if <not <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>>> then\n            set [runspeed v] to [0]\n        end\n        set [my friend x v] to (x position)\n        if <touching (water v)?> then\n            change x by ((runspeed) / (3))\n        else\n            change x by (runspeed)\n        end\n        if <<touching (ground v)?> or <touching (growing and shrinking  v)?>> then\n            change y by (1)\n        end\n        if <<touching (ground v)?> or <touching (growing and shrinking  v)?>> then\n            change y by (1)\n        end\n        if <<touching (ground v)?> or <touching (growing and shrinking  v)?>> then\n            change y by (1)\n        end\n        if <<touching (ground v)?> or <touching (growing and shrinking  v)?>> then\n            change y by (1)\n        end\n        if <touching (growing and shrinking  v)?> then\n            set y to ((y of Growing and Shrinking) + (30))\n        end\n        if <<touching (ground v)?> or <touching (growing and shrinking  v)?>> then\n            change y by (-4)\n            change x by ((runspeed) * (-1))\n        end\n        if <touching (water v)?> then\n            change y by ((fallspeed) / (3))\n        else\n            change y by (fallspeed)\n        end\n        set [y v] to (y position)\n        if <<touching (ground v)?> or <touching (growing and shrinking  v)?>> then\n            change y by ((fallspeed) - ((fallspeed) * (2)))\n            set [fallspeed v] to [0]\n        end\n        change y by (-1)\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <<touching (ground v)?> or <touching (growing and shrinking  v)?>>> then\n            set [takeoffspeed v] to [8]\n            broadcast (charge v)\n            repeat until <<not <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <<touching (ground v)?> or <touching (growing and shrinking  v)?>>>> or <(takeoffspeed) > [16]>>\n                if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <<touching (ground v)?> or <touching (growing and shrinking  v)?>>> then\n                    change [takeoffspeed v] by (0.4)\n                end\n                if <touching (growing and shrinking  v)?> then\n                    set y to ((y of Growing and Shrinking) + (30))\n                end\n            end\n            broadcast (Jumped v)\n            start sound [Low Whoosh v]\n            set [fallspeed v] to (takeoffspeed)\n        end\n        change y by (1)\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <touching (water v)?>> then\n            set [fallspeed v] to [5]\n        end\n        if <touching (spikes v)?> then\n            broadcast (die v)\n            hide\n        end\n        if <touching (trampoline v)?> then\n            set [fallspeed v] to [15]\n            broadcast (boing v)\n        end\n        if <(x position) > [230]> then\n            broadcast (transition v)\n            set [wait v] to [1]\n        end\n        if <touching (pig v)?> then\n            broadcast (die v)\n            hide\n        end\n        if <key (n v) pressed?> then\n            broadcast (transition v)\n            set [wait v] to [1]\n            wait until <not <key (n v) pressed?>>\n        end\n        if <key (r v) pressed?> then\n            broadcast (die v)\n            hide\n        end\n        if <touching (spike log v)?> then\n            broadcast (die v)\n            hide\n        end\n        if <(y position) < [-180]> then\n            broadcast (die v)\n            hide\n        end\n        if <key (m v) pressed?> then\n            ask [what level do you want to skip too.] and wait\n            set [level selected v] to [1]\n            broadcast (transition v)\n            set [wait v] to [1]\n        end\n    end\nend\n\nif <<<key (w v) pressed?> or <key (w v) pressed?>> or <<key (up arrow v) pressed?> or <key (up arrow v) pressed?>>> then\n    set [fallspeed v] to [12]\n    if <([abs v] of (runspeed) ) = (runspeed)> then\n        set [runspeed v] to [-4]\n    else\n        set [runspeed v] to [4]\n    end\nelse\n    set [runspeed v] to [0]\nend\n\nwhen I receive [end intro v]\n\nstarting position\n\nwhen I receive [end of transition v]\nset [talk v] to [0]\nif <(level selected) = [1]> then\n    if <<<<<(answer) = [1]> or <(answer) = [2]>> or <<(answer) = [3]> or <(answer) = [4]>>> or <<<(answer) = [5]> or <(answer) = [6]>> or <<(answer) = [7]> or <(answer) = [8]>>>> or <<<<(answer) = [9]> or <(answer) = [10]>> or <<(answer) = [11]> or <(answer) = [12]>>> or <<<(answer) = [13]> or <(answer) = [14]>> or <<(answer) = [15]> or <(answer) = [16]>>>>> then\n        set [level v] to (answer)\n        set [level selected v] to [0]\n    end\nelse\n    change [level v] by (1)\nend\nstarting position\nset [wait v] to [0]\n\nwhen I receive [oooooooffff v]\nbroadcast (die v)\nhide\n\n\n\ndefine UP\nrepeat until <not <touching (ground v)?>>\n    change y by (4)\nend\n\nwhen flag clicked\nset [level selected v] to [0]\n\nset [level selected v] to [1]\nbroadcast (transition v)\nset [wait v] to [1]\n\nwhen I receive [die v]\nstart sound [Squish Pop v]\nstarting position\nwait (0.5) seconds\nshow\n\nstart sound [Squish Pop v]\n\nstart sound [Squish Pop v]\n\nwhen I receive [talk with me v]\nstop [other scripts in sprite v]\n\n@Ground\n\nwhen flag clicked\nforever\n    switch costume to (level)\nend\n\n@Decor\n\n@Trampoline\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\n\nwhen I receive [boing v]\nstart sound [High Whoosh v]\nstart sound [Jump v]\nset [boing speed v] to [-5]\nrepeat until <(boing speed) = [0]>\n    change y by (boing speed)\n    change [boing speed v] by (1)\nend\nset [boing speed v] to [5]\nrepeat until <(boing speed) = [0]>\n    change y by (boing speed)\n    change [boing speed v] by (-1)\nend\n\nwhen flag clicked\nshow\nforever\n    switch costume to (level)\nend\n\n@Spikes\n\nwhen flag clicked\nset [level v] to [1]\nshow\ngo to x: (0) y: (0)\nset size to (200) %\nforever\n    switch costume to (level)\nend\n\n@Characters\n\n@Pig\n\nwhen I start as a clone\nshow\nif <(clone type) = [1]> then\n    if <(level) = [1]> then\n    if <(level) = [2]> then\n        set [pig rampage v] to [60]\n        go to x: (-80) y: (-33)\n        function of clone type 1\n    end\n    if <(level) = [3]> then\n        set [pig rampage v] to [60]\n        go to x: (150) y: (85)\n        function of clone type 1\n    end\n    if <(level) = [4]> then\n    if <(level) = [5]> then\n        set [pig rampage v] to [80]\n        go to x: (150) y: (0)\n        function of clone type 1\n    end\n    if <(level) = [6]> then\n    if <(level) = [7]> then\n    if <(level) = [8]> then\n        set [pig rampage v] to [40]\n        go to x: (200) y: (-80)\n        function of clone type 1\n    end\n    if <(level) = [9]> then\n    if <(level) = [10]> then\n    if <(level) = [11]> then\n        set [pig rampage v] to [100]\n        go to x: (-190) y: (113)\n        function of clone type 1\n    end\n    if <(level) = [12]> then\n    if <(level) = [13]> then\n    if <(level) = [14]> then\n        set [pig rampage v] to [100]\n        go to x: (100) y: (-20)\n        function of clone type 1\n    end\n    if <(level) = [15]> then\n    if <(level) = [16]> then\nend\n\ndefine function of clone type 1\nforever\n    repeat until <not <(clone level) = (level)>>\n        start sound [Pig-Heavy-Grunting-A-www v]\n        if <(wait) = [1]> then\n            wait until <not <(wait) = [1]>>\n        end\n        repeat (pig rampage)\n            change x by (1)\n        end\n        repeat (pig rampage)\n            change x by (-1)\n        end\n    end\nend\n\nwhen I start as a clone\nif <(clone type) = [1]> then\n    forever\n        switch costume to (costume1 v)\n        wait (1) seconds\n        switch costume to (costume1 v)\n        repeat (10)\n            next costume\n        end\n    end\nend\n\nswitch costume to (costume1 v)\nrepeat (9)\n    next costume\nend\n\nwhen I start as a clone\nforever\n    if <not <(clone level) = (level)>> then\n        stop all sounds\n        delete this clone\n    end\nend\n\nwhen flag clicked\nset size to (150) %\nset [level v] to [1]\nhide\nforever\n    if <(level) = [1]> then\n    if <(level) = [2]> then\n        set [clone level v] to [2]\n        set [clone type v] to [1]\n        create clone of (_myself_ v)\n        wait until <not <(clone level) = (level)>>\n    end\n    if <(level) = [3]> then\n        set [clone level v] to [3]\n        set [clone type v] to [1]\n        create clone of (_myself_ v)\n        wait until <not <(clone level) = (level)>>\n    end\n    if <(level) = [4]> then\n    if <(level) = [5]> then\n        set [clone level v] to [5]\n        set [clone type v] to [1]\n        create clone of (_myself_ v)\n        wait until <not <(clone level) = (level)>>\n    end\n    if <(level) = [6]> then\n    if <(level) = [7]> then\n    if <(level) = [8]> then\n        set [clone level v] to [8]\n        set [clone type v] to [1]\n        create clone of (_myself_ v)\n        wait until <not <(clone level) = (level)>>\n    end\n    if <(level) = [9]> then\n    if <(level) = [10]> then\n    if <(level) = [11]> then\n        set [clone level v] to [11]\n        set [clone type v] to [1]\n        create clone of (_myself_ v)\n        wait until <not <(clone level) = (level)>>\n    end\n    if <(level) = [12]> then\n    if <(level) = [13]> then\n    if <(level) = [14]> then\n        set [clone level v] to [14]\n        set [clone type v] to [1]\n        create clone of (_myself_ v)\n        wait until <not <(clone level) = (level)>>\n    end\n    if <(level) = [15]> then\n    if <(level) = [16]> then\nend\n\n@DEKU\n\nwhen flag clicked\nset size to (200) %\nset [level v] to [1]\nhide\nforever\n    if <(level) = [1]> then\n    if <(level) = [2]> then\n    if <(level) = [3]> then\n    if <(level) = [4]> then\n    if <(level) = [5]> then\n    if <(level) = [6]> then\n        set [deku clone level v] to (level)\n        create clone of (_myself_ v)\n        wait until <not <(Deku Clone LEVEL) = (level)>>\n    end\n    if <(level) = [7]> then\n        set [deku clone level v] to (level)\n        create clone of (_myself_ v)\n        wait until <not <(Deku Clone LEVEL) = (level)>>\n    end\n    if <(level) = [8]> then\n    if <(level) = [9]> then\n    if <(level) = [10]> then\n    if <(level) = [11]> then\n        set [deku clone level v] to (level)\n        create clone of (_myself_ v)\n        wait until <not <(Deku Clone LEVEL) = (level)>>\n    end\n    if <(level) = [12]> then\n        set [deku clone level v] to (level)\n        create clone of (_myself_ v)\n        wait until <not <(Deku Clone LEVEL) = (level)>>\n    end\n    if <(level) = [13]> then\n        set [deku clone level v] to (level)\n        create clone of (_myself_ v)\n        wait until <not <(Deku Clone LEVEL) = (level)>>\n    end\n    if <(level) = [14]> then\n        set [deku clone level v] to (level)\n        create clone of (_myself_ v)\n        wait until <not <(Deku Clone LEVEL) = (level)>>\n    end\n    if <(level) = [15]> then\n        set [deku clone level v] to (level)\n        create clone of (_myself_ v)\n        wait until <not <(Deku Clone LEVEL) = (level)>>\n    end\n    if <(level) = [16]> then\nend\n\nwhen I start as a clone\ngo to [back v] layer\nif <(level) = [1]> then\nif <(level) = [2]> then\nif <(level) = [3]> then\nif <(level) = [4]> then\nif <(level) = [5]> then\nif <(level) = [6]> then\n    go to x: (150) y: (-4)\n    be a deku\nend\nif <(level) = [7]> then\n    go to x: (100) y: (-34)\n    be a deku\nend\nif <(level) = [8]> then\nif <(level) = [9]> then\nif <(level) = [10]> then\nif <(level) = [11]> then\n    go to x: (30) y: (-145)\n    be a deku\nend\nif <(level) = [12]> then\n    go to x: (100) y: (-20)\n    be a deku\nend\nif <(level) = [13]> then\n    go to x: (150) y: (-20)\n    be a deku\nend\nif <(level) = [14]> then\n    go to x: (-50) y: (24)\n    be a deku\nend\nif <(level) = [15]> then\n    go to x: (100) y: (-117)\n    be a deku\nend\nif <(level) = [16]> then\n\ndefine be a deku\nshow\nrepeat until <not <(Deku Clone LEVEL) = (level)>>\n    if <[200] > (distance to [fungi v])> then\n        start sound [recording1 v]\n        start sound [Sneaker Squeak v]\n        repeat (14)\n            change y by (2)\n        end\n        repeat until <not <[200] > (distance to [fungi v])>>\n            switch costume to (costume1 v)\n            wait (0.1) seconds\n            switch costume to (costume2 v)\n            wait (0.1) seconds\n            switch costume to (costume3 v)\n            wait (0.1) seconds\n            switch costume to (costume1 v)\n            wait (0.1) seconds\n            set [deku clone x v] to (x position)\n            set [deku clone y v] to (y position)\n            start sound [pop v]\n            broadcast (SHOOT v)\n            wait (1) seconds\n        end\n        repeat (14)\n            change y by (-2)\n        end\n    end\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    set rotation style [left-right v]\n    if <(My friend X) > (x position)> then\n        point in direction (-90)\n    else\n        point in direction (90)\n    end\n    if <not <(Deku Clone LEVEL) = (level)>> then\n        delete this clone\n    end\nend\n\nwhen I receive [transition v]\ndelete this clone\n\nbroadcast (transition v)\n\n@SPIKE LOG\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\nforever\n    set [log spike v] to [10]\n    repeat until <(log spike) = [0]>\n        change y by (log spike)\n        change [log spike v] by (-1)\n    end\n    wait (1) seconds\n    set [log spike v] to [-10]\n    repeat until <(log spike) = [0]>\n        change y by (log spike)\n        change [log spike v] by (1)\n    end\n    wait (1) seconds\nend\n\nstart sound [Crank v]\n\n@Transition\n\nwhen flag clicked\nswitch costume to (costume2 v)\nset size to (100) %\nhide\n\nwhen I receive [transition v]\nswitch costume to (costume2 v)\nshow\nset size to (500) %\nset [size changer v] to [-2]\nrepeat until <(size) < [20]>\n    if <(size) > [50]> then\n        switch costume to (costume2 v)\n    end\n    change size by (size changer)\n    change [size changer v] by (-1)\n    switch costume to (costume1 v)\nend\nbroadcast (end of transition v)\nhide\n\n@tutorial\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\n\nwhen I receive [tutorial v]\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\nwait until <not <(level) = [1]>>\nhide\n\n@Text Box\n\nwhen I receive [show on screen v]\nset [clone? v] to [0]\nhide\nrepeat (20)\n    go to x: (Text Box X) y: (Text Box Y)\nend\n\nwhen I receive [show on screen v]\nset [text box x v] to [0]\nset [text box y v] to [-480]\nrepeat until <([abs v] of (Text Box Y) ) < [1]>\n    set [text box y v] to ((Text Box Y) * (0.6))\nend\nset [text box y v] to [0]\n\nwhen I start as a clone\nset [clone? v] to [1]\nswitch costume to (Letter ID)\ngo to [front v] layer\nrepeat (20)\n    go to x: ((Letter X) + (Text Box X)) y: ((Letter Y) + (Text Box Y))\nend\n\nwhen I receive [end v]\nif <(Clone?) = [0]> then\n    hide\nelse\n    delete this clone\nend\n\ndefine Say: (what you gonna say?) (title of that?) (icon?) (voice?)\nbroadcast (end v) and wait\nstop [other scripts in sprite v]\nbroadcast (show on screen v)\nwait (0) seconds\nswitch costume to (icon?)\nclear graphic effects\nshow\nTitle: (title of that?)\nset [current letter v] to [0]\nset [letter x v] to [-220]\nset [letter y v] to [-100]\nset [word length v] to [0]\nrepeat (length of (what you gonna say?))\n    change [current letter v] by (1)\n    change [letter x v] by (8)\n    if <<<<<(letter (Current Letter) of (what you gonna say?)) = [,]> or <(letter (Current Letter) of (what you gonna say?)) = [!]>> or <(letter (Current Letter) of (what you gonna say?)) = [?]>> or <(letter (Current Letter) of (what you gonna say?)) = [.]>> or <(letter (Current Letter) of (what you gonna say?)) = [ ]>> then\n        set [word length v] to [1]\n        repeat until <<<<<<(letter ((Current Letter) + (Word Length)) of (what you gonna say?)) = [,]> or <(letter ((Current Letter) + (Word Length)) of (what you gonna say?)) = [!]>> or <(letter ((Current Letter) + (Word Length)) of (what you gonna say?)) = [?]>> or <(letter ((Current Letter) + (Word Length)) of (what you gonna say?)) = [.]>> or <(letter ((Current Letter) + (Word Length)) of (what you gonna say?)) = [ ]>> or <(length of (what you gonna say?)) < ((Current Letter) + (Word Length))>>\n            change [word length v] by (1)\n        end\n    end\n    if <[220] < (((Word Length) * (8)) + (Letter X))> then\n        set [letter x v] to [-220]\n        change [letter y v] by (-10)\n    end\n    set [word length v] to [0]\n    set [letter id v] to (letter (Current Letter) of (what you gonna say?))\n    create clone of (_myself_ v)\n    switch costume to (icon?)\n    start sound (voice?)\nend\nwait until <key (z v) pressed?>\nbroadcast (end v) and wait\nstart sound [normal v]\nwait (0.1) seconds\n\ndefine Title: (title)\nset [current letter v] to [0]\nset [letter x v] to [-230]\nset [letter y v] to [-74]\nrepeat (length of (title))\n    change [current letter v] by (1)\n    change [letter x v] by (8)\n    set [letter id v] to (letter (Current Letter) of (title))\n    create clone of (_myself_ v)\nend\n\nrepeat (5)\n    change [ghost v] effect by (20)\nend\n\nrepeat (5)\n    change [ghost v] effect by (20)\nend\n\nwhen I receive [play v]\n\nwhen flag clicked\nbroadcast (play for real v)\n\nwhen flag clicked\nhide\nbroadcast (tutorial v)\nwait (0.1) seconds\nset [wait v] to [1]\nSay: [i love being a mushroom] [  biff] [Biff] []\nSay: [i dont…] [   you] [You2] []\nSay: [bro, why!] [  biff] [Biff] []\nSay: [i just want to do something with my life and be a hero] [   you] [You2] []\nSay: [wow! well good luck i guess, but i mean we are just mushrooms] [  biff] [Biff] []\nSay: [why stay planted your whole life?] [   you] [You2] []\nSay: [because thats what mushrooms do!] [  biff] [Biff] []\nSay: [not anymore, well see ya biff!] [   you] [You2] []\nSay: [wait, what!] [  biff] [Biff] []\nset [wait v] to [0]\n\nwhen I receive [pigtalk v]\nset [wait v] to [1]\nSay: [oink… im starving] [    pig] [Pig] []\nbroadcast (back v)\n\nwhen I receive [back v]\nset [wait v] to [0]\n\nwhen I receive [talk with me v]\nwait (1) seconds\nSay: [i see you have finally arrived] [   ?] [SENS] []\nSay: [you have come far.] [   ?] [SENS] []\nSay: [but your training and purpose are only beginning to be realized] [   ?] [SENS] []\nbroadcast (end it all v)\n\n@Shadows\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (80)\nforever\n    switch costume to (level)\n    go to [back v] layer\nend\n\n@Thumbnail\n\nwhen flag clicked\nforever\n    show\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\n@Particles of sadness\n\nwhen I receive [die v]\nif <(priority particle) = [1]> then\n    hide\n    clone\nend\n\ndefine clone\nshow\ngo to (my friend v)\nswitch costume to (costume1 v)\nrepeat (5)\n    create clone of (_myself_ v)\nend\nswitch costume to (costume2 v)\nrepeat (10)\n    create clone of (_myself_ v)\nend\nswitch costume to (costume3 v)\nrepeat (3)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nstart sound [recording1 v]\nset [priority particle v] to [0]\nchange x by (pick random (-20) to (20))\nchange y by (pick random (-20) to (20))\nset [p-x v] to (pick random (-0.1) to (-4.1))\nset [p-y v] to (y position)\nrepeat until <touching (_edge_ v)?>\n    change x by ((p-x) * (2))\n    turn right ((p-x) * (2)) degrees\n    move (1) steps\n    change [p-y v] by (p-x)\nend\ndelete this clone\n\nwhen flag clicked\nset size to (200) %\nset [priority particle v] to [1]\nforever\n    hide\nend\n\nset [ghost v] effect to (1)\n\n@Jump Charge Up\n\nwhen flag clicked\ngo to x: (0) y: (160)\nset size to (200) %\nhide\n\nwhen I receive [charge v]\ngo to [front v] layer\nset [charger v] to [1]\nshow\nrepeat until <(charger) = [0]>\n    if <(takeoffspeed) > [8]> then\n        switch costume to (costume1 v)\n    end\n    if <(takeoffspeed) > [9]> then\n        switch costume to (costume2 v)\n    end\n    if <(takeoffspeed) > [10]> then\n        switch costume to (costume3 v)\n    end\n    if <(takeoffspeed) > [11]> then\n        switch costume to (costume4 v)\n    end\n    if <(takeoffspeed) > [12]> then\n        switch costume to (costume5 v)\n    end\n    if <(takeoffspeed) > [13]> then\n        switch costume to (costume6 v)\n    end\n    if <(takeoffspeed) > [14]> then\n        switch costume to (costume7 v)\n    end\n    if <(takeoffspeed) > [15]> then\n        switch costume to (costume8 v)\n    end\nend\nhide\n\nwhen I receive [jumped v]\nset [charger v] to [0]\n\n@shadow\n\nwhen flag clicked\nset size to (200) %\ngo to x: (0) y: (0)\nset [ghost v] effect to (80)\nforever\n    go to [back v] layer\n    go to (my friend v)\nend\n\n@Sprite1\n\nwhen flag clicked\nswitch costume to (costume2 v)\nset size to (100) %\n\nwhen I receive [transition v]\ncreate clone of (_myself_ v)\nswitch costume to (costume2 v)\nshow\nset size to (500) %\nset [size changer 2 v] to [-2]\nrepeat until <(size) < [30]>\n    if <(size) > [50]> then\n        switch costume to (costume2 v)\n    end\n    change size by (size changer 2)\n    change [size changer 2 v] by (-1)\n    switch costume to (costume1 v)\nend\n\nwhen I start as a clone\nwait (0.6) seconds\ngo to x: (0) y: (0)\nswitch costume to (costume2 v)\nshow\nset size to (90) %\nswitch costume to (costume1 v)\n\nwhen I receive [end of transition v]\ndelete this clone\n\nwhen I receive [end of transition v]\nhide\n\n@Water\n\nwhen flag clicked\ngo to [back v] layer\nshow\nforever\n    switch costume to (level)\n    set y to ((0) + ((10) * ([cos v] of (((timer) - (50)) * (300)) )))\nend\n\n@DEKU BULLET\n\nwhen flag clicked\nhide\nset [deku bullet official v] to [1]\n\nwhen I receive [shoot v]\nif <(DEKU BULLET OFFICIAL) = [1]> then\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset size to (200) %\nshow\ngo to x: (deku clone x) y: (deku clone y)\nchange y by (5)\nif <(My friend X) > (x position)> then\n    change x by (18)\nelse\n    change x by (-18)\nend\nif <(My friend X) > (x position)> then\n    repeat until <<touching (ground v)?> or <<touching (my friend v)?> or <touching (_edge_ v)?>>>\n        change x by (10)\n        turn right (5) degrees\n    end\nelse\n    repeat until <<touching (ground v)?> or <<touching (my friend v)?> or <touching (_edge_ v)?>>>\n        change x by (-10)\n        turn right (-5) degrees\n    end\nend\nif <touching (my friend v)?> then\n    broadcast (OOOOOOOFFFF v)\nend\ndelete this clone\n\npoint in direction (90)\n\ndelete this clone\n\n@Sensei Mushroom\n\nwhen flag clicked\nset [level v] to [1]\nhide\ngo to x: (0) y: (1)\nwait until <(level) = [16]>\nshow\nwait (0.1) seconds\nset [wait v] to [1]\nbroadcast (Talk with me v)\n\nwhen flag clicked\nforever\n    next costume\n    wait (0.5) seconds\nend\n\n@Sprite2\n\nwhen flag clicked\nhide\n\nwhen I receive [end it all v]\nset [ghost v] effect to (100)\ngo to [front v] layer\nshow\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\nwait (3) seconds\nstop [all v]\n\n@Music\n\nwhen flag clicked\nforever\n    play sound [Fungus v] until done\nend\n\n@PopUps\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nset y to (230)\nshow\nforever\n    switch costume to (pick random (1) to (2))\n    repeat (15)\n        change y by (-4)\n    end\n    wait (pick random (2) to (5)) seconds\n    repeat (15)\n        change y by (4)\n    end\n    wait (pick random (30) to (60)) seconds\nend\n\n