Christmas || MULTIPLAYER Platformer

Instructions: == Christmas ==\n  Platformer Map\n\nFINISHED FINALLY\nCURATED 2/23/2021 by @015_NMJ Thank you!!!!!\n\nI worked real hard on this, plz heart and star!\nMultiplayer! Yes finally! Mobile too!\nOther cool games:\nhttps://scratch.mit.edu/projects/460099279/\nhttps://scratch.mit.edu/projects/480921225/\n\n*scroll to the bottom for hints*\n\nRemember:\nFalling from 690 pixels or farther up will result in you dying.\n\nThanks to @-Shadowlight- 's engine!\n\n== Song from ==\nL'Orchestra Cinématique (youtube)\nWritten by Trad/Arr. Otic Productions\n\n*HINTS*\nGo right until you see a big candy cane. Follow the arrow to climb up the tall tower and collect the key. Then go right until you see a hill. Walljump onto the gingerbread house and hop on the pink plant and then jump to get onto the cliff. Climb up until you see a big hole, and go inside to get the shrinker. Then fall down the cliff until you see a small hole that you passed and climb in. Collect the key and shrink again and then leave. Go left until you see the big candy cane again. Go in between the two large candy canes, there is a locked gate there that will open and only a small player will fit. Then go left, pass spikes, and collect the final key on the very left. Finally, go all the way back and the gates should be unlocked. Keep going and you will win the game.\n\n#games #game #all #platformer #art #scrolling #christmas #holiday #random #a #b #c #d #e #f #g #h #i #j #k #l #m #n #o #p #q #r #s #t #u #v #w #x #y #z #1 #2 #3 #4 #5 #6 #7 #8 #9 #0 #hear #star #view #remix #comment #scratch #multiplayer #platformers #cool #project #mobile

@Stage\n\nwhen flag clicked\nforever\n    play sound [Tranquility2 v] until done\nend\n\nwhen I receive [green flag v]\nclear graphic effects\n\nwhen I receive [lighten v]\nchange [brightness v] effect by (darken/lighten rate)\n\nwhen I receive [darken v]\nchange [brightness v] effect by ((darken/lighten rate) * (-1))\n\n@Blank\n\n@Player\n\nwhen flag clicked\nbroadcast (Green Flag v) and wait\nbroadcast (Play Game v) and wait\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\nset [player color v] to (pick random (0) to (75))\n\nwhen I receive [play game v]\nset [total clones v] to [0]\ndelete all of [keys v]\nadd [0] to [keys v]\nadd [0] to [keys v]\nadd [0] to [keys v]\nbroadcast (Reset v) and wait\nbroadcast (Setup v) and wait\nforever\n    Get player id\n    Game on\n    broadcast (Secondary Loop v)\n    set [player frame counter v] to [1]\n    repeat until <(EXIT) > []>\n        Tick\n        Refresh User List\n        broadcast (Tick v)\n        if <(Player Frame Counter) > [3]> then\n            set [player frame counter v] to [1]\n            broadcast (Online v)\n        else\n            change [player frame counter v] by (1)\n        end\n        if <[0] < (PLAYER ID)> then\n            Set P# Cloud Variable\n        end\n    end\n    if <(EXIT) = [Win]> then\n        Game - Win\n    else\n        Game - Die\n    end\nend\n\nif <not <<(x) = (SCROLL X)> and <(y) = (SCROLL Y)>>> then\n\ndefine Game on\nset [x v] to (checkpoint x)\nset [y v] to (checkpoint y)\nset [speed y v] to [0]\nset [speed x v] to [0]\nset [in air maximum v] to [40]\nset [in air too hi v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset [energy v] to [0]\nset [ability v] to [none]\nset size to (100) %\nclear graphic effects\nset [color v] effect to (player color)\nswitch costume to (player v)\nshow\n\ndefine Tick\nif <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    change [speed x v] by (-2)\n    point in direction (-90)\nend\nif <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    change [speed x v] by (2)\n    point in direction (90)\nend\nset [speed x v] to ((Speed x) * (0.8))\nif <([abs v] of (Speed x) ) > [0.9]> then\n    Change player x by (round (Speed x))\nend\nif <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n    if <(in air) < [4]> then\n        set [speed y v] to [16]\n    end\nend\nif <(Speed y) > [-20]> then\n    change [speed y v] by (-2)\nend\nChange player y by (Speed y)\nSet SCROLL X\nSet SCROLL Y\nPosition\nif <(y) < [-540]> then\n    set [exit v] to [Die]\nend\nif <(in air too hi) > (in air maximum)> then\n    if <(in air) = [0]> then\n        set [exit v] to [Die]\n    end\nend\nset [in air too hi v] to (in air)\nif <touching (danger v)?> then\n    set [exit v] to [Die]\nend\nif <touching (small v)?> then\n    set size to (50) %\n    set [ability v] to [small]\n    set [energy v] to [30]\nend\n\ndefine Change player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <<touching (platformshb v)?> or <touching (gates v)?>>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [speed y v] to [0]\nend\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine Change player x by (sx)\nchange [x v] by (sx)\nPosition\nif <<touching (platformshb v)?> or <touching (gates v)?>> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <<touching (platformshb v)?> or <touching (gates v)?>>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n        if <(sx) > [0]> then\n            set [speed x v] to [-16]\n        else\n            set [speed x v] to [16]\n        end\n        set [in air v] to [0]\n    else\n        set [speed x v] to [0]\n    end\n    repeat until <not <<touching (platformshb v)?> or <touching (gates v)?>>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Game - Die\nset [exit v] to []\nrepeat (2)\n    wait (0.05) seconds\n    hide\n    wait (0.05) seconds\n    show\nend\nwait (0.2) seconds\nrepeat (10)\n    Position\n    next costume\n    change [brightness v] effect by (10)\nend\nset [x v] to (checkpoint x)\nset [y v] to (checkpoint y)\nhide\nwait (0.5) seconds\nset [darken/lighten rate v] to ((100) / (7))\nrepeat (7)\n    Set SCROLL X\n    Set SCROLL Y\n    broadcast (Tick v)\n    broadcast (darken v)\nend\nrepeat (11)\n    Set SCROLL X\n    Set SCROLL Y\n    broadcast (Tick v)\nend\nrepeat (7)\n    Set SCROLL X\n    Set SCROLL Y\n    broadcast (Tick v)\n    broadcast (lighten v)\nend\n\ndefine Game - Win\nset [darken/lighten rate v] to ((100) / (7))\nrepeat (7)\n    broadcast (darken v)\nend\nbroadcast (END v) and wait\nstop [all v]\n\nChange player y by [1000]\n\nwhen I receive [secondary loop v]\nrepeat until <(EXIT) > []>\n    wait until <not <(Ability) = [none]>>\n    repeat until <(Energy) < [1]>\n        if <(Ability) = [small]> then\n            set size to (50) %\n        else\n            set size to (150) %\n        end\n        wait (1) seconds\n        change [energy v] by (-1)\n    end\n    set [ability v] to [none]\n    set size to (100) %\n    Stuck?\nend\n\ndefine Get player id\nif <(letter (1) of (☁ P1)) = [0]> then\n    set [player id v] to [1]\nelse\n    if <(letter (1) of (☁ P2)) = [0]> then\n        set [player id v] to [2]\n    else\n        if <(letter (1) of (☁ P3)) = [0]> then\n            set [player id v] to [3]\n        else\n            if <(letter (1) of (☁ P4)) = [0]> then\n                set [player id v] to [4]\n            else\n                if <(letter (1) of (☁ P5)) = [0]> then\n                    set [player id v] to [5]\n                else\n                    if <(letter (1) of (☁ P6)) = [0]> then\n                        set [player id v] to [6]\n                    else\n                        if <(letter (1) of (☁ P7)) = [0]> then\n                            set [player id v] to [7]\n                        else\n                            if <(letter (1) of (☁ P8)) = [0]> then\n                                set [player id v] to [8]\n                            else\n                                if <(letter (1) of (☁ P9)) = [0]> then\n                                    set [player id v] to [9]\n                                else\n                                    if <(letter (1) of (☁ P10)) = [0]> then\n                                        set [player id v] to [10]\n                                    else\n                                        set [player id v] to [0]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\ngenerate number (x) with pos/neg\ngenerate number (y) with pos/neg\n\ndefine Set P# Cloud Variable\nset [refreshed p# v] to [1]\ngenerate number (x) with pos/neg\ngenerate number (y) with pos/neg\nget quadruple digit (player color)\nset [refreshed p# v] to (join (REFRESHED P#) (VALUE))\nif <(Ability) = [small]> then\n    set [refreshed p# v] to (join (REFRESHED P#) [1])\nelse\n    set [refreshed p# v] to (join (REFRESHED P#) [0])\nend\nset [afk id v] to (join (pick random (0) to (9)) (join (pick random (0) to (9)) (join (pick random (0) to (9)) (pick random (0) to (9)))))\nset [refreshed p# v] to (join (REFRESHED P#) (AFK ID))\nIf (PLAYER ID) = number set P# to (REFRESHED P#)\n\ndefine get quadruple digit (value)\nset [value v] to (value)\nif <(value) < [10]> then\n    set [value v] to (join [000] (value))\nelse\n    if <(value) < [100]> then\n        set [value v] to (join [00] (value))\n    else\n        if <(value) < [1000]> then\n            set [value v] to (join [0] (value))\n        end\n    end\nend\n\nwhen flag clicked\nset [ended? v] to [0]\nforever\n    reset timer\nend\n\nwhen [timer v] > (0.1)\nif <(ended?) < [1]> then\n    change [ended? v] by (1)\n    If (PLAYER ID) = number set P# to [0]\nend\n\nwhen I receive [secondary loop v]\nrepeat until <(EXIT) > []>\n    set [responsiblility v] to (pick random (1) to (10))\n    if <(letter (1) of (item (responsiblility) of [players v])) = [1]> then\n        if <not <(responsiblility) = (PLAYER ID)>> then\n            set [previous sp id v] to (join (letter (17) of (item (responsiblility) of [players v])) (join (letter (18) of (item (responsiblility) of [players v])) (join (letter (19) of (item (responsiblility) of [players v])) (letter (20) of (item (responsiblility) of [players v])))))\n            wait (1) seconds\n            if <(previous sp id) = (join (letter (17) of (item (responsiblility) of [players v])) (join (letter (18) of (item (responsiblility) of [players v])) (join (letter (19) of (item (responsiblility) of [players v])) (letter (20) of (item (responsiblility) of [players v])))))> then\n                If (responsiblility) = number set P# to [0]\n            end\n        end\n    end\nend\n\ndefine Refresh User List\ndelete all of [players v]\nadd (☁ P1) to [players v]\nadd (☁ P2) to [players v]\nadd (☁ P3) to [players v]\nadd (☁ P4) to [players v]\nadd (☁ P5) to [players v]\nadd (☁ P6) to [players v]\nadd (☁ P7) to [players v]\nadd (☁ P8) to [players v]\nadd (☁ P9) to [players v]\nadd (☁ P10) to [players v]\n\n\n\nget quadruple digit (AFK ID)\n\ndefine If (input) = number set P# to (output)\nif <(input) = [1]> then\n    set [☁ p1 v] to (output)\nelse\n    if <(input) = [2]> then\n        set [☁ p2 v] to (output)\n    else\n        if <(input) = [3]> then\n            set [☁ p3 v] to (output)\n        else\n            if <(input) = [4]> then\n                set [☁ p4 v] to (output)\n            else\n                if <(input) = [5]> then\n                    set [☁ p5 v] to (output)\n                else\n                    if <(input) = [6]> then\n                        set [☁ p6 v] to (output)\n                    else\n                        if <(input) = [7]> then\n                            set [☁ p7 v] to (output)\n                        else\n                            if <(input) = [8]> then\n                                set [☁ p8 v] to (output)\n                            else\n                                if <(input) = [9]> then\n                                    set [☁ p9 v] to (output)\n                                else\n                                    if <(input) = [10]> then\n                                        set [☁ p10 v] to (output)\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [secondary loop v]\nrepeat until <(EXIT) > []>\n\nwait (0.1) seconds\n\ndefine generate number (number) with pos/neg\nif <(number) < [0]> then\n    set [refreshed p# v] to (join (REFRESHED P#) [0])\nelse\n    set [refreshed p# v] to (join (REFRESHED P#) [1])\nend\nget quadruple digit ([abs v] of (number) )\nset [refreshed p# v] to (join (REFRESHED P#) (VALUE))\n\nif <(PLAYER ID) = [1]> then\n    set [☁ p1 v] to (REFRESHED P#)\nelse\n    if <(PLAYER ID) = [2]> then\n        set [☁ p2 v] to (REFRESHED P#)\n    else\n        if <(PLAYER ID) = [3]> then\n            set [☁ p3 v] to (REFRESHED P#)\n        else\n            if <(PLAYER ID) = [4]> then\n                set [☁ p4 v] to (REFRESHED P#)\n            else\n                if <(PLAYER ID) = [5]> then\n                    set [☁ p5 v] to (REFRESHED P#)\n                else\n                    if <(PLAYER ID) = [6]> then\n                        set [☁ p6 v] to (REFRESHED P#)\n                    else\n                        if <(PLAYER ID) = [7]> then\n                            set [☁ p7 v] to (REFRESHED P#)\n                        else\n                            if <(PLAYER ID) = [8]> then\n                                set [☁ p8 v] to (REFRESHED P#)\n                            else\n                                if <(PLAYER ID) = [9]> then\n                                    set [☁ p9 v] to (REFRESHED P#)\n                                else\n                                    if <(PLAYER ID) = [10]> then\n                                        set [☁ p10 v] to (REFRESHED P#)\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Stuck?\nif <touching (platformshb v)?> then\n    change [y v] by (20)\n    Position\n    if <touching (platformshb v)?> then\n        change [x v] by (20)\n        Position\n        if <touching (platformshb v)?> then\n            change [y v] by (-20)\n            Position\n            if <touching (platformshb v)?> then\n                change [y v] by (-20)\n                Position\n                if <touching (platformshb v)?> then\n                    change [x v] by (-20)\n                    Position\n                    if <touching (platformshb v)?> then\n                        change [x v] by (-20)\n                        Position\n                        if <touching (platformshb v)?> then\n                            change [y v] by (20)\n                            Position\n                            if <touching (platformshb v)?> then\n                                change [y v] by (20)\n                                Position\n                                if <touching (platformshb v)?> then\n                                    change [x v] by (-20)\n                                    Position\n                                    if <touching (platformshb v)?> then\n                                        set [exit v] to [Die]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nbroadcast (Online v) and wait\n\nwhen I receive [green flag v]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\n\ndefine Set SCROLL X\nchange [scroll x v] by (round (((x) - (SCROLL X)) / (10)))\nif <(SCROLL Y) < [-90]> then\n    if <(SCROLL X) < [-480]> then\n        set [scroll x v] to [-480]\n    end\nelse\n    if <(SCROLL X) < [0]> then\n        set [scroll x v] to [0]\n    end\nend\nif <(SCROLL X) > ((480) * (12))> then\n    set [scroll x v] to [5761]\nend\n\ndefine Set SCROLL Y\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\nif <(SCROLL Y) < [-360]> then\n    set [scroll y v] to [-360]\nend\n\n@Others\n\nwhen flag clicked\nhide\n\ndefine Create Other Players\nset [id v] to [1]\ncreate clone of (_myself_ v)\nset [id v] to [2]\ncreate clone of (_myself_ v)\nset [id v] to [3]\ncreate clone of (_myself_ v)\nset [id v] to [4]\ncreate clone of (_myself_ v)\nset [id v] to [5]\ncreate clone of (_myself_ v)\nset [id v] to [6]\ncreate clone of (_myself_ v)\nset [id v] to [7]\ncreate clone of (_myself_ v)\nset [id v] to [8]\ncreate clone of (_myself_ v)\nset [id v] to [9]\ncreate clone of (_myself_ v)\nset [id v] to [10]\ncreate clone of (_myself_ v)\nset [id v] to [0]\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [online v]\nif <(id) > [0]> then\n    Set Selected Player\n    if <(letter (1) of (Selected Player)) = [0]> then\n        hide\n    else\n        if <(id) = ([player id v] of [player v])> then\n            delete this clone\n        else\n            position\n        end\n    end\nend\n\nwhen I receive [setup v]\nCreate Other Players\n\nwhen I start as a clone\nif <(id) = ([player id v] of [player v])> then\n    delete this clone\nend\n\ndefine Set Selected Player\nif <(id) = [1]> then\n    set [selected player v] to (☁ P1)\nelse\n    if <(id) = [2]> then\n        set [selected player v] to (☁ P2)\n    else\n        if <(id) = [3]> then\n            set [selected player v] to (☁ P3)\n        else\n            if <(id) = [4]> then\n                set [selected player v] to (☁ P4)\n            else\n                if <(id) = [5]> then\n                    set [selected player v] to (☁ P5)\n                else\n                    if <(id) = [6]> then\n                        set [selected player v] to (☁ P6)\n                    else\n                        if <(id) = [7]> then\n                            set [selected player v] to (☁ P7)\n                        else\n                            if <(id) = [8]> then\n                                set [selected player v] to (☁ P8)\n                            else\n                                if <(id) = [9]> then\n                                    set [selected player v] to (☁ P9)\n                                else\n                                    if <(id) = [10]> then\n                                        set [selected player v] to (☁ P10)\n                                    else\n                                        delete this clone\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ngo to x: () y: ()\nwait (0) seconds\n\nforever\n    show\n    Set Selected Player\n    repeat until <(letter (1) of (Selected Player)) = [1]>\n        Set Selected Player\n    end\n    repeat until <(letter (1) of (Selected Player)) = [0]>\n        repeat until <not <(Selected Player) = []>>\n            Set Selected Player\n        end\n        repeat (3)\n    end\nend\n\ndefine position\nshow\nset [color v] effect to (join (letter (12) of (Selected Player)) (join (letter (13) of (Selected Player)) (join (letter (14) of (Selected Player)) (letter (15) of (Selected Player)))))\nif <(letter (2) of (Selected Player)) = [0]> then\n    set [sel plyr x v] to [-1]\nelse\n    set [sel plyr x v] to [1]\nend\nset [sel plyr x v] to ((Sel Plyr X) * (join (letter (3) of (Selected Player)) (join (letter (4) of (Selected Player)) (join (letter (5) of (Selected Player)) (letter (6) of (Selected Player))))))\nif <(letter (7) of (Selected Player)) = [0]> then\n    set [sel plyr y v] to [-1]\nelse\n    set [sel plyr y v] to [1]\nend\nset [sel plyr y v] to ((Sel Plyr Y) * (join (letter (8) of (Selected Player)) (join (letter (9) of (Selected Player)) (join (letter (10) of (Selected Player)) (letter (11) of (Selected Player))))))\nset [r sp x v] to (Sel Plyr X)\nset [r sp y v] to (Sel Plyr Y)\nGlide from (r sp x prev) (r sp y prev) to (r sp x) (r sp y) with [1] out of [3]\nset [r sp x prev v] to (r sp x)\nset [r sp y prev v] to (r sp y)\n\ndefine Glide from (fromx) (fromy) to (tox) (toy)\nset [plyr frac count v] to [1]\nrepeat (10)\n    go to x: ((fromx) + (((tox) - (fromx)) * ((plyr frac count) / (10)))) y: ((fromy) + (((toy) - (fromy)) * ((plyr frac count) / (10))))\n    change [plyr frac count v] by (1)\nend\n\nGlide from (r sp x prev) (r sp y prev) to (r sp x) (r sp y)\n\nset [plyr frac count v] to [1]\nrepeat (3)\n    go to x: ((r sp x prev) + (((r sp x) - (r sp x prev)) * ((plyr frac count) / (3)))) y: ((r sp y prev) + (((r sp y) - (r sp y prev)) * ((plyr frac count) / (3))))\n    change [plyr frac count v] by (1)\nend\n\ndefine Glide from (fromx) (fromy) to (tox) (toy) with (frac) out of (whole)\nset [plyr frac count v] to [1]\nrepeat (whole)\n    go to x: (((fromx) + (((tox) - (fromx)) * ((frac) / (whole)))) - (SCROLL X)) y: (((fromy) + (((toy) - (fromy)) * ((frac) / (whole)))) - (SCROLL Y))\n    change [plyr frac count v] by (1)\n    go to [front v] layer\n    go [backward v] (id) layers\n    if <<[240] > ([abs v] of (x position) )> and <[180] > ([abs v] of (y position) )>> then\n        point in direction (90)\n        switch costume to (player v)\n        if <(letter (16) of (Selected Player)) = [1]> then\n            set size to (50) %\n        else\n            set size to (100) %\n        end\n    else\n        switch costume to (arrow v)\n        if <<(x position) < [239]> and <[-239] < (x position)>> then\n            set x to ((x position) * ((220) / (240)))\n        else\n            set x to (((x position) / ([abs v] of (x position) )) * (220))\n        end\n        if <<(y position) < [179]> and <[-179] < (y position)>> then\n            set y to ((y position) * ((160) / (180)))\n        else\n            set y to (((y position) / ([abs v] of (y position) )) * (160))\n        end\n        point towards (blank v)\n        turn left (180) degrees\n    end\nend\n\nGlide from (r sp x prev) (r sp y prev) to (r sp x) (r sp y) with [1] out of [3]\nGlide from (r sp x prev) (r sp y prev) to (r sp x) (r sp y) with [2] out of [3]\nGlide from (r sp x prev) (r sp y prev) to (r sp x) (r sp y) with [3] out of [3]\n\nset [r sp x prev v] to (r sp x)\nset [r sp y prev v] to (r sp y)\n\nset [r sp x v] to ((Sel Plyr X) - (SCROLL X))\nset [r sp y v] to ((Sel Plyr Y) - (SCROLL Y))\n\ngo to x: ((fromx) + (((tox) - (fromx)) * ((frac) / (whole)))) y: ((fromy) + (((toy) - (fromy)) * ((frac) / (whole))))\n\nGlide from (r sp x prev) (r sp y prev) to (r sp x) (r sp y) with [1] out of [3]\nGlide from (r sp x prev) (r sp y prev) to (r sp x) (r sp y) with [2] out of [3]\n\n@PlatformsHB\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nif <(is clone?) = [1]> then\n    Change XY\n    if <<(([x v] of [player v]) + (-720)) < (x)> and <(x) < (([x v] of [player v]) + (720))>> then\n        if <<(([y v] of [player v]) + (-540)) < (y)> and <(y) < (([y v] of [player v]) + (540))>> then\n            Position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n        else\n            hide\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [setup v]\nhide\nset [is clone? v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (lx0y0 v)\nswitch backdrop to (sky v)\nClone at x: ((480) * (-1)) y: ((360) * (-1))\nClone at x: ((480) * (-1)) y: ((360) * (0))\nClone at x: ((480) * (-1)) y: ((360) * (1))\nClone at x: ((480) * (0)) y: ((360) * (-1))\nClone at x: ((480) * (0)) y: ((360) * (0))\nClone at x: ((480) * (0)) y: ((360) * (1))\nClone at x: ((480) * (1)) y: ((360) * (-1))\nClone at x: ((480) * (1)) y: ((360) * (0))\nClone at x: ((480) * (1)) y: ((360) * (1))\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\ndefine Position (x) (y)\nswitch costume to (join [l] (join (join [x] ((x) / (480))) (join [y] ((y) / (360)))))\nif <(join [l] (join (join [x] ((x) / (480))) (join [y] ((y) / (360))))) = (costume [name v])> then\n    go to x: (x) y: (y)\n    set [ghost v] effect to (100)\n    if <<(x) = (x position)> and <(y) = (y position)>> then\n        show\n    else\n        hide\n    end\nelse\n    hide\nend\n\nwhen I start as a clone\nset [is clone? v] to [1]\n\ndefine Change XY\nrepeat until <((x) - (SCROLL X)) > ((480) * (-2))>\n    change [x v] by ((480) * (3))\nend\nrepeat until <((480) * (2)) > ((x) - (SCROLL X))>\n    change [x v] by ((480) * (-3))\nend\nrepeat until <((y) - (SCROLL Y)) > ((360) * (-2))>\n    change [y v] by ((360) * (3))\nend\nrepeat until <((360) * (2)) > ((y) - (SCROLL Y))>\n    change [y v] by ((360) * (-3))\nend\n\n@PlatformsDB\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nif <(is clone?) = [1]> then\n    Change XY\n    if <<(([x v] of [player v]) + (-720)) < (x)> and <(x) < (([x v] of [player v]) + (720))>> then\n        if <<(([y v] of [player v]) + (-540)) < (y)> and <(y) < (([y v] of [player v]) + (540))>> then\n            Position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n        else\n            hide\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [setup v]\nhide\nset [is clone? v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (lx0y0 v)\nswitch backdrop to (sky v)\nClone at x: ((480) * (-1)) y: ((360) * (-1))\nClone at x: ((480) * (-1)) y: ((360) * (0))\nClone at x: ((480) * (-1)) y: ((360) * (1))\nClone at x: ((480) * (0)) y: ((360) * (-1))\nClone at x: ((480) * (0)) y: ((360) * (0))\nClone at x: ((480) * (0)) y: ((360) * (1))\nClone at x: ((480) * (1)) y: ((360) * (-1))\nClone at x: ((480) * (1)) y: ((360) * (0))\nClone at x: ((480) * (1)) y: ((360) * (1))\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nchange [total clones v] by (1)\nset [x v] to (x)\nset [y v] to (y)\ngo to [front v] layer\ncreate clone of (_myself_ v)\n\ndefine Position (x) (y)\nswitch costume to (join [l] (join (join [x] ((x) / (480))) (join [y] ((y) / (360)))))\nif <(join [l] (join (join [x] ((x) / (480))) (join [y] ((y) / (360))))) = (costume [name v])> then\n    go to x: (x) y: (y)\n    if <<(x) = (x position)> and <(y) = (y position)>> then\n        go to [back v] layer\n        go [forward v] (3) layers\n        show\n    else\n        hide\n    end\nelse\n    hide\nend\n\nwhen I start as a clone\nset [is clone? v] to [1]\n\nwhen I receive [darken v]\nchange [brightness v] effect by ((darken/lighten rate) * (-1))\n\nwhen I receive [lighten v]\nchange [brightness v] effect by (darken/lighten rate)\n\ndefine Change XY\nrepeat until <((x) - (SCROLL X)) > ((480) * (-2))>\n    change [x v] by ((480) * (3))\nend\nrepeat until <((480) * (2)) > ((x) - (SCROLL X))>\n    change [x v] by ((480) * (-3))\nend\nrepeat until <((y) - (SCROLL Y)) > ((360) * (-2))>\n    change [y v] by ((360) * (3))\nend\nrepeat until <((360) * (2)) > ((y) - (SCROLL Y))>\n    change [y v] by ((360) * (-3))\nend\n\n@PlatformsDF\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nif <(is clone?) = [1]> then\n    Change XY\n    if <<(([x v] of [player v]) + (-720)) < (x)> and <(x) < (([x v] of [player v]) + (720))>> then\n        if <<(([y v] of [player v]) + (-540)) < (y)> and <(y) < (([y v] of [player v]) + (540))>> then\n            Position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n        else\n            hide\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [setup v]\nhide\nset [is clone? v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (lx0y0 v)\nswitch backdrop to (sky v)\nClone at x: ((480) * (-1)) y: ((360) * (-1))\nClone at x: ((480) * (-1)) y: ((360) * (0))\nClone at x: ((480) * (-1)) y: ((360) * (1))\nClone at x: ((480) * (0)) y: ((360) * (-1))\nClone at x: ((480) * (0)) y: ((360) * (0))\nClone at x: ((480) * (0)) y: ((360) * (1))\nClone at x: ((480) * (1)) y: ((360) * (-1))\nClone at x: ((480) * (1)) y: ((360) * (0))\nClone at x: ((480) * (1)) y: ((360) * (1))\n\ndefine Position (x) (y)\nswitch costume to (join [l] (join (join [x] ((x) / (480))) (join [y] ((y) / (360)))))\nif <(join [l] (join (join [x] ((x) / (480))) (join [y] ((y) / (360))))) = (costume [name v])> then\n    go to x: (x) y: (y)\n    if <<(x) = (x position)> and <(y) = (y position)>> then\n        go to [front v] layer\n        go [backward v] (5) layers\n        show\n    else\n        hide\n    end\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\ngo to [front v] layer\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [is clone? v] to [1]\n\nwhen I receive [lighten v]\nchange [brightness v] effect by (darken/lighten rate)\n\nwhen I receive [darken v]\nchange [brightness v] effect by ((darken/lighten rate) * (-1))\n\ndefine Change XY\nrepeat until <((x) - (SCROLL X)) > ((480) * (-2))>\n    change [x v] by ((480) * (3))\nend\nrepeat until <((480) * (2)) > ((x) - (SCROLL X))>\n    change [x v] by ((480) * (-3))\nend\nrepeat until <((y) - (SCROLL Y)) > ((360) * (-2))>\n    change [y v] by ((360) * (3))\nend\nrepeat until <((360) * (2)) > ((y) - (SCROLL Y))>\n    change [y v] by ((360) * (-3))\nend\n\n@Danger\n\nwhen I start as a clone\nset [is clone? v] to [1]\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\ngo to [front v] layer\ncreate clone of (_myself_ v)\n\nwhen I receive [setup v]\nhide\nset [is clone? v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (lx0y0 v)\nswitch backdrop to (sky v)\nClone at x: ((480) * (-1)) y: ((360) * (-1))\nClone at x: ((480) * (-1)) y: ((360) * (0))\nClone at x: ((480) * (-1)) y: ((360) * (1))\nClone at x: ((480) * (0)) y: ((360) * (-1))\nClone at x: ((480) * (0)) y: ((360) * (0))\nClone at x: ((480) * (0)) y: ((360) * (1))\nClone at x: ((480) * (1)) y: ((360) * (-1))\nClone at x: ((480) * (1)) y: ((360) * (0))\nClone at x: ((480) * (1)) y: ((360) * (1))\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nif <(is clone?) = [1]> then\n    Change XY\n    if <<(([x v] of [player v]) + (-720)) < (x)> and <(x) < (([x v] of [player v]) + (720))>> then\n        if <<(([y v] of [player v]) + (-540)) < (y)> and <(y) < (([y v] of [player v]) + (540))>> then\n            Position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n        else\n            hide\n        end\n    else\n        hide\n    end\nend\n\ndefine Position (x) (y)\nswitch costume to (join [l] (join (join [x] ((x) / (480))) (join [y] ((y) / (360)))))\nif <(join [l] (join (join [x] ((x) / (480))) (join [y] ((y) / (360))))) = (costume [name v])> then\n    go to x: (x) y: (y)\n    if <<(x) = (x position)> and <(y) = (y position)>> then\n        go to [back v] layer\n        go [forward v] ((total clones) + (3)) layers\n        show\n    else\n        hide\n    end\nelse\n    hide\nend\n\nhide\n\nwhen I receive [lighten v]\nchange [brightness v] effect by (darken/lighten rate)\n\nwhen I receive [darken v]\nchange [brightness v] effect by ((darken/lighten rate) * (-1))\n\ndefine Change XY\nrepeat until <((x) - (SCROLL X)) > ((480) * (-2))>\n    change [x v] by ((480) * (3))\nend\nrepeat until <((480) * (2)) > ((x) - (SCROLL X))>\n    change [x v] by ((480) * (-3))\nend\nrepeat until <((y) - (SCROLL Y)) > ((360) * (-2))>\n    change [y v] by ((360) * (3))\nend\nrepeat until <((360) * (2)) > ((y) - (SCROLL Y))>\n    change [y v] by ((360) * (-3))\nend\n\n@Background1\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\ngo to [back v] layer\ngo [forward v] (1) layers\ngo to x: (((SCROLL X) - ((480) * (1.5))) * (-0.25)) y: ((SCROLL Y) * (-0.25))\nswitch costume to (sizer v)\nset size to (150) %\nswitch costume to (background v)\n\nwhen I receive [setup v]\nshow\n\nwhen I receive [reset v]\nhide\n\nwhen I receive [lighten v]\nchange [brightness v] effect by (darken/lighten rate)\n\nwhen I receive [darken v]\nchange [brightness v] effect by ((darken/lighten rate) * (-1))\n\n@Background2\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\ngo to [back v] layer\ngo [forward v] (0) layers\ngo to x: (((SCROLL X) - ((480) * (1.5))) * (-0.125)) y: ((SCROLL Y) * (-0.125))\nswitch costume to (sizer v)\nset size to (150) %\nswitch costume to (background v)\n\nwhen I receive [setup v]\nshow\n\nwhen I receive [reset v]\nhide\n\nwhen I receive [lighten v]\nchange [brightness v] effect by (darken/lighten rate)\n\nwhen I receive [darken v]\nchange [brightness v] effect by ((darken/lighten rate) * (-1))\n\n@Small\n\nwhen I receive [tick v]\nif <(is clone?) = [1]> then\n    if <<(([x v] of [player v]) + (-720)) < (x)> and <(x) < (([x v] of [player v]) + (720))>> then\n        if <<(([y v] of [player v]) + (-540)) < (y)> and <(y) < (([y v] of [player v]) + (540))>> then\n            Position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n        else\n            hide\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Position (x) (y)\nswitch costume to (small v)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    go to [front v] layer\n    show\n    set [color v] effect to ([player color v] of [player v])\nelse\n    hide\nend\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\ngo to [front v] layer\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [is clone? v] to [1]\n\nwhen I receive [setup v]\nhide\nset [is clone? v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (small v)\nswitch backdrop to (sky v)\nClone at x: [4160] y: [780]\nClone at x: [4220] y: [300]\n\nwhen I receive [lighten v]\nchange [brightness v] effect by (darken/lighten rate)\n\nwhen I receive [darken v]\nchange [brightness v] effect by ((darken/lighten rate) * (-1))\n\n@Gates\n\nwhen I receive [setup v]\nhide\nset [is clone? v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nswitch backdrop to (sky v)\nClone at x: ((480) * (4)) y: ((360) * (0)) keyid: [1]\nClone at x: ((480) * (4)) y: ((360) * (-1)) keyid: [2]\nClone at x: ((480) * (5)) y: ((360) * (-1)) keyid: [3]\n\ndefine Clone at x: (x) y: (y) keyid: (id)\nset [id v] to (id)\nset [x v] to (x)\nset [y v] to (y)\ngo to [front v] layer\ncreate clone of (_myself_ v)\n\ndefine Position (x) (y)\nif <(item (id) of [keys v]) = [1]> then\n    hide\nelse\n    switch costume to (join [g] (join [x] (join ((x) / (480)) (join [y] ((y) / (360))))))\n    go to x: (x) y: (y)\n    if <<(x) = (x position)> and <(y) = (y position)>> then\n        go to [front v] layer\n        go [backward v] (4) layers\n        show\n    else\n        hide\n    end\nend\n\nwhen I start as a clone\nset [is clone? v] to [1]\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [tick v]\nif <(is clone?) = [1]> then\n    if <<(([x v] of [player v]) + (-720)) < (x)> and <(x) < (([x v] of [player v]) + (720))>> then\n        if <<(([y v] of [player v]) + (-540)) < (y)> and <(y) < (([y v] of [player v]) + (540))>> then\n            Position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n        else\n            hide\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [lighten v]\nchange [brightness v] effect by (darken/lighten rate)\n\nwhen I receive [darken v]\nchange [brightness v] effect by ((darken/lighten rate) * (-1))\n\nreplace item (1) of [keys v] with [0]\nreplace item (2) of [keys v] with [0]\nreplace item (3) of [keys v] with [0]\n\nreplace item (1) of [keys v] with [1]\nreplace item (2) of [keys v] with [1]\nreplace item (3) of [keys v] with [1]\n\nset [ability v] to [small]\nset [energy v] to [1000]\n\n@Keys\n\ndefine Clone at x: (x) y: (y) keyid: (id)\nset [id v] to (id)\nset [x v] to (x)\nset [y v] to (y)\ngo to [front v] layer\ncreate clone of (_myself_ v)\n\nwhen I receive [setup v]\nhide\nset [is clone? v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nswitch backdrop to (sky v)\nClone at x: [4220] y: [240] keyid: [1]\nClone at x: [1315] y: [1035] keyid: [2]\nClone at x: [-685] y: [-300] keyid: [3]\nClone at x: [2900] y: [-380] keyid: [0]\n\nwhen I receive [tick v]\nif <(is clone?) = [1]> then\n    if <<(([x v] of [player v]) + (-720)) < (x)> and <(x) < (([x v] of [player v]) + (720))>> then\n        if <<(([y v] of [player v]) + (-540)) < (y)> and <(y) < (([y v] of [player v]) + (540))>> then\n            Position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n        else\n            hide\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I start as a clone\nset [is clone? v] to [1]\npoint in direction (80)\nif <(id) > [0]> then\n    point in direction (135)\nend\nforever\n    repeat (10)\n        change [y v] by (-0.5)\n    end\n    repeat (10)\n        change [y v] by (-1)\n    end\n    repeat (10)\n        change [y v] by (-0.5)\n    end\n    wait (0.1) seconds\n    repeat (10)\n        change [y v] by (0.5)\n    end\n    repeat (10)\n        change [y v] by (1)\n    end\n    repeat (10)\n        change [y v] by (0.5)\n    end\n    wait (0.1) seconds\nend\n\ndefine Position (x) (y)\nif <(id) > [0]> then\n    switch costume to (key v)\nelse\n    switch costume to (end v)\nend\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    go to [front v] layer\n    go [backward v] (3) layers\n    show\nelse\n    hide\nend\n\nwhen I receive [green flag v]\nhide\n\nwhen I start as a clone\nwait until <[30] > (distance to [player v])>\nif <(id) > [0]> then\n    replace item (id) of [keys v] with [1]\nelse\n    set [exit v] to [win]\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I receive [lighten v]\nchange [brightness v] effect by (darken/lighten rate)\n\nwhen I receive [darken v]\nchange [brightness v] effect by ((darken/lighten rate) * (-1))\n\nwhen I start as a clone\nwait (0.5) seconds\nif <not <(id) > [0]>> then\n    forever\n        wait (0.1) seconds\n        repeat (10)\n            turn right (0.5) degrees\n        end\n        repeat (10)\n            turn right (1) degrees\n        end\n        repeat (10)\n            turn right (0.5) degrees\n        end\n        wait (0.1) seconds\n        repeat (10)\n            turn right (-0.5) degrees\n        end\n        repeat (10)\n            turn right (-1) degrees\n        end\n        repeat (10)\n            turn right (-0.5) degrees\n        end\n    end\nend\n\n@Online\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [secondary loop v]\nset [is clone? v] to [0]\nset [is ready? v] to [0]\nstop [other scripts in sprite v]\nwait (1.5) seconds\nset size to (100) %\nMake Sure\nswitch costume\nshow\ngo to x: (0) y: (70)\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-7.5)\n    change y by (((0) - (y position)) / (5))\nend\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (7.5)\n    change y by (((70) - (y position)) / (5))\nend\nhide\ngo to x: (-220) y: (-160)\nset [is ready? v] to [1]\nset [ghost v] to [0]\ncreate clone of (_myself_ v)\nshow\nset size to (50) %\nswitch costume to (p v)\nset [ghost v] effect to (100)\nwait until <(EXIT) > []>\nrepeat (10)\n    change [ghost v] effect by (7.5)\nend\n\nrepeat (10)\n    change [ghost v] effect by (-7.5)\nend\n\ndefine detect user\nset [sum v] to [0]\nchange [sum v] by (letter (1) of (☁ P1))\nchange [sum v] by (letter (1) of (☁ P2))\nchange [sum v] by (letter (1) of (☁ P3))\nchange [sum v] by (letter (1) of (☁ P4))\nchange [sum v] by (letter (1) of (☁ P5))\nchange [sum v] by (letter (1) of (☁ P6))\nchange [sum v] by (letter (1) of (☁ P7))\nchange [sum v] by (letter (1) of (☁ P8))\nchange [sum v] by (letter (1) of (☁ P9))\nchange [sum v] by (letter (1) of (☁ P10))\nif <([player id v] of [player v]) = [1]> then\n    change [sum v] by ((0) - (letter (1) of (☁ P1)))\nelse\n    if <([player id v] of [player v]) = [2]> then\n        change [sum v] by ((0) - (letter (1) of (☁ P2)))\n    else\n        if <([player id v] of [player v]) = [3]> then\n            change [sum v] by ((0) - (letter (1) of (☁ P3)))\n        else\n            if <([player id v] of [player v]) = [4]> then\n                change [sum v] by ((0) - (letter (1) of (☁ P4)))\n            else\n                if <([player id v] of [player v]) = [5]> then\n                    change [sum v] by ((0) - (letter (1) of (☁ P5)))\n                else\n                    if <([player id v] of [player v]) = [6]> then\n                        change [sum v] by ((0) - (letter (1) of (☁ P6)))\n                    else\n                        if <([player id v] of [player v]) = [7]> then\n                            change [sum v] by ((0) - (letter (1) of (☁ P7)))\n                        else\n                            if <([player id v] of [player v]) = [8]> then\n                                change [sum v] by ((0) - (letter (1) of (☁ P8)))\n                            else\n                                if <([player id v] of [player v]) = [9]> then\n                                    change [sum v] by ((0) - (letter (1) of (☁ P9)))\n                                else\n                                    if <([player id v] of [player v]) = [10]> then\n                                        change [sum v] by ((0) - (letter (1) of (☁ P10)))\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nadd (sum) to [user results v]\n\ndefine switch costume\nif <(sum) = [0]> then\n    switch costume to (alone v)\nelse\n    if <(sum) = [10]> then\n        switch costume to (full v)\n    else\n        switch costume to (youcon v)\n    end\nend\n\ndefine Make Sure\ndetect user\n\nwhen I start as a clone\nset [is clone? v] to [1]\ngo to x: (-177) y: (-160)\nshow\nset size to (50) %\nset [ghost v] effect to (100)\nwait until <(EXIT) > []>\nrepeat (10)\n    change [ghost v] effect by (7.5)\nend\ndelete this clone\n\nif <(sum) = [0]> then\n    detect user\n    if <(sum) = [0]> then\n        detect user\n        if <(sum) = [0]> then\n            detect user\n            if <(sum) = [0]> then\n                detect user\n                if <(sum) = [0]> then\n                    detect user\n                    if <(sum) = [0]> then\n                        detect user\n                        if <(sum) = [0]> then\n                            detect user\n                            if <(sum) = [0]> then\n                                detect user\n                                if <(sum) = [0]> then\n                                    detect user\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nset [previous sum v] to (sum)\nrepeat until <not <(sum) = (previous sum)>>\nif <(sum) < (previous sum)> then\n    switch costume to (discon v)\nelse\n    switch costume to (newcon v)\nend\nshow\ngo to x: (0) y: (70)\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-7.5)\n    change y by (((0) - (y position)) / (5))\nend\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (7.5)\n    change y by (((70) - (y position)) / (5))\nend\nhide\n\nwhen I receive [tick v]\nif <(is ready?) = [1]> then\n    if <(ghost) < [10]> then\n        change [ghost v] effect by (-7.5)\n        change [ghost v] by (1)\n    end\n    go to [front v] layer\n    if <(is clone?) = [1]> then\n        Make Sure\n        switch costume to (join [p] (sum))\n        go to [front v] layer\n    end\nend\n\nwhen I receive [secondary loop v]\ndelete this clone\n\n@Menu\n\nwhen flag clicked\nswitch costume to (dark1 v)\nrepeat (9)\n    next costume\nend\n\n@Resources\n\n@Splash\n\nwhen I receive [green flag v]\nswitch costume to (splash3 v)\nhide\n\nwhen [timer v] > (0.1)\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\n    go to [front v] layer\nend\n\nwhen I receive [end v]\nswitch costume to (ending v)\nhide\n\n