Volcanic Island - Tiled platformer                 #art #games #poliakoff #trending

Instructions: SEQUEL: https://scratch.mit.edu/projects/470686157\n\n\nAdvertiser friendly:\nTHIS IS A SEQUEL. CHECK OUT THE ORIGINAL: https://scratch.mit.edu/projects/397484781/\n<<<<<<<<<<<<<<<<<<<Intro>>>>>>>>>>>>>>>>>>>>>\nWell here it is. After a week of hard work, I bring you Volcanic island, a scrolling platformer\nIt features 7 levels and many non generic assets so I hope you enjoy\n<<<<<<<<<<<<<<<<Instructions>>>>>>>>>>>>>>>>>>\nUse the arrow keys to move. Don't fall in the void or hit the jumpy monsters or spikes. Chains and the other grey things are decoration, you go straight through them. The yellow things are obviously trampolines. However, with these you need to be falling already to get them to boost you up.\n<<<<<<<<<<<<<<<<<<<Boss>>>>>>>>>>>>>>>>>>>>\nTo beat the boss, you have to avoid the bouncy balls and lava. You don't have to do anything to kill it, just outlast the attacks\n<<<<<<<<<<<<<<<<<Credits>>>>>>>>>>>>>>>>>>>>>\nThank you to @toadfanschool for the art of the background (the volcano). All other art is by me\nThank you to @griffpatch for a little bit of the player scripts.\nThe music is Sing-bit-brawl by waterflame\n<<<<<<<<<<<<<<<<<<<Tags>>>>>>>>>>>>>>>>>>>>>\n#games #platformers #poliakoff #art #music #fun #lava #volcano #games #platformers #poliakoff #art #music #fun #lava #volcano #games #platformers #poliakoff #art #music #fun #lava #volcano #games #platformers #poliakoff #art #music #fun #lava #volcano #games #platformers #poliakoff #art #music #fun #lava #volcano #games #platformers #poliakoff #art #music #fun #lava #volcano #games #platformers #poliakoff #art #music #fun #lava #volcano #games #platformers #poliakoff #art #music #fun #lava #volcano #games #platformers #poliakoff #art #music #fun #lava #volcano #games #platformers #poliakoff #art #music #fun #lava #volcano #games #platformers #poliakoff #art #music #fun #lava #volcano #games #platformers #poliakoff #art #music #fun #lava #volcano 

@Stage\n\nwhen flag clicked\nswitch backdrop to (page v)\n\nwhen flag clicked\nswitch backdrop to (4-1 v)\n\nwhen I receive [play v]\nswitch backdrop to (4-2 v)\n\nwhen flag clicked\nplay sound [music start v] until done\nforever\n    play sound [music loop v] until done\nend\n\n@tiles\n\nwhen I start as a clone\nforever\n    clone-tick\nend\n\ndefine clone-tick\ngo to [back v] layer\nclear graphic effects\nset size to (95) %\ngo to x: (round ((block: X) - (scroll))) y: (y position)\nhide\nif <(round ((block: X) - (scroll))) = (x position)> then\n    show\nend\nif <(clonetype) = [0002]> then\n    switch costume to (0002 v)\nelse\n    if <(clonetype) = [0003]> then\n        switch costume to (0003 v)\n    else\n        if <(clonetype) = [0004]> then\n            switch costume to (0004 v)\n        else\n            if <(clonetype) = [0005]> then\n                switch costume to (0005 v)\n            else\n                if <(clonetype) = [0006]> then\n                    switch costume to (0006 v)\n                else\n                    if <(clonetype) = [0007]> then\n                        switch costume to (0007 v)\n                    else\n                        if <(clonetype) = [0008]> then\n                            switch costume to (0008 v)\n                        else\n                            if <(clonetype) = [0009]> then\n                                switch costume to (0009 v)\n                            else\n                                if <(clonetype) = [0010]> then\n                                    switch costume to (0010 v)\n                                else\n                                    if <(clonetype) = [0011]> then\n                                        switch costume to (0011 v)\n                                    else\n                                        if <(clonetype) = [0013]> then\n                                            switch costume to (0013 v)\n                                        else\n                                            if <(clonetype) = [0014]> then\n                                                switch costume to (0014 v)\n                                            else\n                                                if <(clonetype) = [0015]> then\n                                                    switch costume to (0015 v)\n                                                    go to [back v] layer\n                                                else\n                                                    if <(clonetype) = [0016]> then\n                                                        switch costume to (0016 v)\n                                                    else\n                                                        if <(clonetype) = [0017]> then\n                                                            switch costume to (0017 v)\n                                                        else\n                                                            if <(clonetype) = [0019]> then\n                                                                switch costume to (0019 v)\n                                                            end\n                                                        end\n                                                    end\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\npoint in direction (90)\nif <(costume [number v]) = [13]> then\n    go to [back v] layer\n    if <(monstersyspeed) < [0]> then\n        point in direction (-90)\n    end\n    change [monstersyspeed v] by (-1)\n    change y by (monstersyspeed)\n    if <(y position) < [-170]> then\n        set [monstersyspeed v] to ((() - (monstersyspeed)) + (1))\n    end\nend\nset size to (104) %\nif <(costume [number v]) > [14]> then\n    go to [back v] layer\nend\n\nif <(editing) = [1]> then\n\nwhen flag clicked\nset [clone? v] to [0]\n\nwhen I start as a clone\nset [clone? v] to [1]\n\nwhen I receive [generate level v]\nif  then\n    delete this clone\nend\nwait (0) seconds\ngenerate\nbroadcast (editor v) and wait\nset [scroll v] to [0]\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\n\nwhen I receive [generate level v]\nhide\n\nwhen I receive [undoclone v]\nif <(clone?) = [1]> then\n    if <not <[usedspaces v] contains (join (block: X) (y position))?>> then\n        delete this clone\n    end\nend\n\ndefine generate\nset [monstersyspeed v] to [0]\nset [scroll v] to [1000]\nset [editing v] to [-1]\ndelete all of [usedspaces v]\nset [i v] to [1]\nrepeat (length of [types v])\n    set [block: x v] to (item (i) of [x positions v])\n    go to x: ((block: X) - (scroll)) y: (item (i) of [y positions v])\n    add (join (block: X) (y position)) to [usedspaces v]\n    switch costume to (item (i) of [types v])\n    set [clonetype v] to (item (i) of [types v])\n    create clone of (_myself_ v)\n    change [i v] by (1)\nend\ngo to x: (-20000) y: (0)\nhide\n\nwhen I receive [play v]\nhide variable [blocksused v]\n\n@player\n\nwhen flag clicked\nhide\ngo to x: (-200) y: (40)\n\nwhen I receive [play v]\nif <(clone?) = [0]> then\n    set size to (50) %\n    switch costume to (hitbox v)\n    show\n    go to [front v] layer\n    change [y speed v] by (-2)\n    set [x speed v] to ((x speed) * (0.8))\n    change x by (round (x speed)) <(x speed) > [0]>\n    change y by (y speed) <(y speed) > [0]>\n    set rotation style [don't rotate v]\n    if <<(y position) < [-170]> or <touching color (#e53330)?>> then\n        start sound [Crunch v]\n        spawn\n    end\n    switch costume to (cube v)\n    if <<<touching color (#ffe900)?> and <(y speed) < [0]>> and <touching (tiles v)?>> then\n        set [y speed v] to [28]\n        start sound [Jump v]\n    end\n    if <touching color (#005306)?> then\n        start sound [win v]\n        change [level v] by (1)\n        broadcast (load v) and wait\n        spawn\n        set [scroll v] to [0]\n    end\n    if <(x position) > [50]> then\n        change [scroll v] by ((x position) - (50))\n    else\n        if <[-50] > (x position)> then\n            change [scroll v] by ((x position) + (50))\n        end\n    end\n    if <<(scroll) < [0]> or <(LEVEL) > [6]>> then\n        set [scroll v] to [0]\n    end\n    if <[4300] < (scroll)> then\n        set [scroll v] to [4300]\n    end\n    \n    if <<<touching color (#ce0000)?> and <<touching color (#ff4a00)?> or <touching color (#ff3e00)?>>> or <touching color (#343434)?>> then\n        start sound [Crunch v]\n        spawn\n        set [scroll v] to [0]\n    end\n    \nend\n\ndefine change x by (sx) <forward>\nchange [player x v] by (sx)\n\nif <touching color (#ff0000)?> then\n    repeat (10)\n        change [player y v] by (1)\n        \n        if <not <touching color (#ff0000)?>> then\n            stop [this script v]\n        end\n    end\n    change [player y v] by (-10)\n    \n    if <key (up arrow v) pressed?> then\n        set [y speed v] to [10]\n        if <forward> then\n            set [x speed v] to [-6]\n        else\n            set [x speed v] to [6]\n        end\n    else\n        set [x speed v] to [0]\n    end\n    repeat until <not <touching color (#ff0000)?>>\n        \n        if <(sx) > [0]> then\n            change [player x v] by (-1)\n        else\n            change [player x v] by (1)\n        end\n        \n        if <([abs v] of (x position) ) > [235]> then\n            broadcast (player glitch v)\n            stop [this script v]\n        end\n    end\nend\n\ndefine change y by (sy) <up >\nchange [player y v] by (sy)\n\nrepeat until <not <touching color (#ff0000)?>>\n    set [y speed v] to [0]\n    if <up > then\n        change [player y v] by (-1)\n    else\n        change [player y v] by (1)\n        if <key (up arrow v) pressed?> then\n            set [y speed v] to [20]\n        end\n    end\n    \nend\n\nwhen I receive [play v]\nif <(clone?) = [0]> then\n    if <key (left arrow v) pressed?> then\n        change [x speed v] by (-2)\n        point in direction (-90)\n    end\n    if <key (right arrow v) pressed?> then\n        change [x speed v] by (2)\n        point in direction (90)\n    end\n    set rotation style [left-right v]\nend\n\ndefine spawn\nset [player x v] to [0]\nreset timer\ngo to x: (0) y: (0)\nset [player y v] to [0]\nset [y speed v] to [0]\nset [x speed v] to [0]\nset [scroll v] to [0]\nif <(LEVEL) > [6]> then\n    set [player x v] to [-100]\nend\nif <(LEVEL) = [7]> then\n    broadcast (Level 7 v)\nend\n\nwhen I receive [editor v]\nspawn\n\nwhen I receive [editor v]\nhide\n\ndefine \ngo to x: ((player x) - (scroll)) y: (player y)\n\nwhen I receive [generate level v]\nspawn\n\nwhen I receive [player glitch v]\nspawn\nsay [Player glitched :\( You got trapped between moving platforms and non moving and stuck checking respawned you] for (5) seconds\n\n@unused\n\ndefine save\nto 4s\nmerge lists\nencode (save code)\ndelete all of [triple click this code and add it to the forum v]\nadd (save code) to [triple click this code and add it to the forum v]\nadd [Comment your codes] to [triple click this code and add it to the forum v]\nadd (join [code length: ] (length of (save code))) to [triple click this code and add it to the forum v]\nadd [Remember to love, fav and follow for more games] to [triple click this code and add it to the forum v]\nhide list [triple click this code and add it to the forum v]\nstop [all v]\n\ndefine to 4s\nset [i v] to [1]\nrepeat (length of [x positions v])\n    if <(length of (item (i) of [x positions v])) = [1]> then\n        replace item (i) of [x positions v] with [0000]\n    else\n        if <(length of (item (i) of [x positions v])) = [2]> then\n            if <(letter (1) of (item (i) of [x positions v])) = [-]> then\n                replace item (i) of [x positions v] with (join [-] (join [00] (letter (2) of (item (i) of [x positions v]))))\n            else\n                replace item (i) of [x positions v] with (join [00] (item (i) of [x positions v]))\n            end\n        else\n            if <(length of (item (i) of [x positions v])) = [3]> then\n                if <(letter (1) of (item (i) of [x positions v])) = [-]> then\n                    replace item (i) of [x positions v] with (join [-] (join [0] (join (letter (2) of (item (i) of [x positions v])) (letter (3) of (item (i) of [x positions v])))))\n                else\n                    replace item (i) of [x positions v] with (join [0] (item (i) of [x positions v]))\n                end\n            end\n        end\n    end\n    change [i v] by (1)\nend\nset [i v] to [1]\nrepeat (length of [y positions v])\n    if <(length of (item (i) of [y positions v])) = [1]> then\n        replace item (i) of [y positions v] with [0000]\n    else\n        if <(length of (item (i) of [y positions v])) = [2]> then\n            if <(letter (1) of (item (i) of [y positions v])) = [-]> then\n                replace item (i) of [y positions v] with (join [-] (join [00] (letter (2) of (item (i) of [y positions v]))))\n            else\n                replace item (i) of [y positions v] with (join [00] (item (i) of [y positions v]))\n            end\n        else\n            if <(length of (item (i) of [y positions v])) = [3]> then\n                if <(letter (1) of (item (i) of [y positions v])) = [-]> then\n                    replace item (i) of [y positions v] with (join [-] (join [0] (join (letter (2) of (item (i) of [y positions v])) (letter (3) of (item (i) of [y positions v])))))\n                else\n                    replace item (i) of [y positions v] with (join [0] (item (i) of [y positions v]))\n                end\n            end\n        end\n    end\n    change [i v] by (1)\nend\n\ndefine merge lists\nset [save code v] to []\nset [i v] to [1]\nrepeat (length of (types))\n    set [save code v] to (join (save code) (join (item (i) of [types v]) (join (item (i) of [x positions v]) (item (i) of [y positions v]))))\n    change [i v] by (1)\nend\n\nwhen flag clicked\ndelete all of [triple click this code and add it to the forum v]\n\nwhen flag clicked\nshow list [triple click this code and add it to the forum v]\n\nwhen I receive [save v]\nsave\n\ndefine encode (code)\nset [i v] to [1]\ndelete all of [encoding/decoding list v]\nrepeat (length of (code))\n    add (letter (i) of (code)) to [encoding/decoding list v]\n    change [i v] by (1)\nend\nset [i v] to [1]\nrepeat (length of [encoding/decoding list v])\n    if <(item (i) of [encoding/decoding list v]) = [0]> then\n        replace item (i) of [encoding/decoding list v] with [\)]\n    end\n    if <(item (i) of [encoding/decoding list v]) = [1]> then\n        replace item (i) of [encoding/decoding list v] with [!]\n    end\n    if <(item (i) of [encoding/decoding list v]) = [2]> then\n        replace item (i) of [encoding/decoding list v] with ["]\n    end\n    if <(item (i) of [encoding/decoding list v]) = [3]> then\n        replace item (i) of [encoding/decoding list v] with [£]\n    end\n    if <(item (i) of [encoding/decoding list v]) = [4]> then\n        replace item (i) of [encoding/decoding list v] with [$]\n    end\n    if <(item (i) of [encoding/decoding list v]) = [5]> then\n        replace item (i) of [encoding/decoding list v] with [%]\n    end\n    if <(item (i) of [encoding/decoding list v]) = [6]> then\n        replace item (i) of [encoding/decoding list v] with [^]\n    end\n    if <(item (i) of [encoding/decoding list v]) = [7]> then\n        replace item (i) of [encoding/decoding list v] with [&]\n    end\n    if <(item (i) of [encoding/decoding list v]) = [8]> then\n        replace item (i) of [encoding/decoding list v] with [*]\n    end\n    if <(item (i) of [encoding/decoding list v]) = [9]> then\n        replace item (i) of [encoding/decoding list v] with [\(]\n    end\n    if <(item (i) of [encoding/decoding list v]) = [-]> then\n        replace item (i) of [encoding/decoding list v] with [?]\n    end\n    change [i v] by (1)\nend\nset [i v] to [1]\nset [save code v] to []\nrepeat (length of [encoding/decoding list v])\n    set [save code v] to (join (save code) (item (i) of [encoding/decoding list v]))\n    change [i v] by (1)\nend\n\n@load\n\ndefine load\nset [load code v] to (item (LEVEL) of [levels v])\ndecode (load code)\nadd to lists\nbroadcast (generate level v) and wait\nforever\n    broadcast (play v)\nend\n\ndefine add to lists\ndelete all of [types v]\ndelete all of [x positions v]\ndelete all of [y positions v]\ndelete all of [usedspaces v]\nset [i v] to [1]\nrepeat ((length of (load code)) / (12))\n    add (join (letter (i) of (load code)) (join (letter ((i) + (1)) of (load code)) (join (letter ((i) + (2)) of (load code)) (letter ((i) + (3)) of (load code))))) to [types v]\n    change [i v] by (4)\n    add (join (letter (i) of (load code)) (join (letter ((i) + (1)) of (load code)) (join (letter ((i) + (2)) of (load code)) (letter ((i) + (3)) of (load code))))) to [x positions v]\n    change [i v] by (4)\n    add (join (letter (i) of (load code)) (join (letter ((i) + (1)) of (load code)) (join (letter ((i) + (2)) of (load code)) (letter ((i) + (3)) of (load code))))) to [y positions v]\n    change [i v] by (4)\nend\n\nwhen I receive [load v]\nload\n\ndefine decode (code)\nset [i v] to [1]\ndelete all of [encoding/decoding list v]\nrepeat (length of (code))\n    add (letter (i) of (code)) to [encoding/decoding list v]\n    change [i v] by (1)\nend\nset [i v] to [1]\nrepeat (length of [encoding/decoding list v])\n    if <(item (i) of [encoding/decoding list v]) = [\)]> then\n        replace item (i) of [encoding/decoding list v] with [0]\n    end\n    if <(item (i) of [encoding/decoding list v]) = [!]> then\n        replace item (i) of [encoding/decoding list v] with [1]\n    end\n    if <(item (i) of [encoding/decoding list v]) = ["]> then\n        replace item (i) of [encoding/decoding list v] with [2]\n    end\n    if <(item (i) of [encoding/decoding list v]) = [£]> then\n        replace item (i) of [encoding/decoding list v] with [3]\n    end\n    if <(item (i) of [encoding/decoding list v]) = [$]> then\n        replace item (i) of [encoding/decoding list v] with [4]\n    end\n    if <(item (i) of [encoding/decoding list v]) = [%]> then\n        replace item (i) of [encoding/decoding list v] with [5]\n    end\n    if <(item (i) of [encoding/decoding list v]) = [^]> then\n        replace item (i) of [encoding/decoding list v] with [6]\n    end\n    if <(item (i) of [encoding/decoding list v]) = [&]> then\n        replace item (i) of [encoding/decoding list v] with [7]\n    end\n    if <(item (i) of [encoding/decoding list v]) = [*]> then\n        replace item (i) of [encoding/decoding list v] with [8]\n    end\n    if <(item (i) of [encoding/decoding list v]) = [\(]> then\n        replace item (i) of [encoding/decoding list v] with [9]\n    end\n    if <(item (i) of [encoding/decoding list v]) = [?]> then\n        replace item (i) of [encoding/decoding list v] with [-]\n    end\n    change [i v] by (1)\nend\nset [i v] to [1]\nset [load code v] to []\nrepeat (length of [encoding/decoding list v])\n    set [load code v] to (join (load code) (item (i) of [encoding/decoding list v]))\n    change [i v] by (1)\nend\n\nwhen flag clicked\nset [level v] to [1]\n\nwhen I receive [winner!!! v]\nset [level v] to [8]\nbroadcast (load v)\n\n@buttons\n\nwhen flag clicked\nshow\nswitch costume to (play v)\ngo to x: (50) y: (25)\nforever\n    say []\n    clear graphic effects\n    set size to (100) %\n    if <touching (mouse-pointer v)?> then\n        say [Play game]\n        change size by (20)\n        change [brightness v] effect by (-25)\n        if <mouse down?> then\n            start sound [click v]\n            broadcast (load v)\n            stop [this script v]\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    say []\n    clear graphic effects\n    set size to (100) %\n    if <touching (mouse-pointer v)?> then\n        say [Make your own level and then share it with the community. MAKE SURE YOU READ THE INSTRUCTIONS]\n        change size by (20)\n        change [brightness v] effect by (-25)\n        if <mouse down?> then\n            start sound [click v]\n            stop [other scripts in sprite v]\n            broadcast (make v)\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [make v]\nstop [other scripts in sprite v]\ngo to x: (-1000) y: (0)\nhide\ndelete this clone\n\nwhen I receive [load v]\ngo to x: (-1000) y: (0)\nhide\ndelete this clone\n\nwhen I receive [editor v]\ngo to x: (185) y: (-150)\nshow\nswitch costume to (save v)\nclear graphic effects\nif <<key (s v) pressed?> and <key (p v) pressed?>> then\n    broadcast (save v)\nend\n\nwait (0) seconds\n\nwhen I receive [play v]\nhide\n\nwhen I receive [generate level v]\nwait (0) seconds\nhide\n\n@start\n\nwhen I receive [play v]\nhide\n\nwhen I receive [editor v]\nshow\ngo to x: ((0) - (scroll)) y: (0)\n\nwhen flag clicked\nhide\n\nwhen I receive [generate level v]\nwait (0) seconds\nhide\n\n@Sprite1\n\nwhen I receive [play v]\nshow\nforever\n    set [ghost v] effect to (20)\n    go to x: (0) y: (((35) * ([sin v] of (((timer) + (timer)) * (50)) )) - (16))\nend\n\nwhen flag clicked\nhide\n\n@boss1\n\nwhen I start as a clone\nset rotation style [all around v]\npoint in direction (90)\nif <(x position) > [0]> then\n    switch costume to (right v)\nelse\n    switch costume to (left v)\nend\nshow\nrepeat (2)\n    wait (0.2) seconds\n    hide\n    wait (0.2) seconds\n    show\nend\nshow\nswitch costume to (costume1 v)\nset [ballyspeed v] to [0]\nrepeat until <(y position) < [-180]>\n    change x by (Ballxspeed)\n    turn right (Ballxspeed) degrees\n    change y by (ballyspeed)\n    change [ballyspeed v] by (-1)\n    if <touching color (#ff0000)?> then\n        set [ballyspeed v] to ((ballyspeed) * (-0.9))\n    end\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [level 7 v]\nif  then\n    delete this clone\nend\n\ndefine Create (x) (y) (speed)\nif <(x) > [0]> then\n    switch costume to (right v)\nelse\n    switch costume to (left v)\nend\ngo to x: (x) y: (y)\nset [ballxspeed v] to (speed)\ncreate clone of (_myself_ v)\nhide\n\nwhen I receive [level 7 v]\nwait (2) seconds\nCreate [300] [100] [-3]\nwait (3) seconds\nCreate [-300] [100] [3]\nwait (3) seconds\nCreate [-300] [100] [3]\nCreate [300] [100] [-3]\nwait (12) seconds\nCreate [-300] [100] [3]\nCreate [300] [100] [-3]\n\nwhen I receive [level 7 v]\ndelete this clone\n\n@boss2\n\nwhen I receive [level 7 v]\nwait (12) seconds\nSpurt [-130] [180]\nwait (6) seconds\nSpurt [130] [180]\n\ndefine Spurt (x) (y)\nhide\ngo to x: (x) y: (y)\nrepeat (30)\n    set [particlesx v] to (pick random (-5) to (5))\n    set [particlesy v] to [0]\n    create clone of (_myself_ v)\n    wait (0) seconds\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nrepeat (150)\n    change [particlesy v] by (-0.5)\n    set [particlesx v] to ((particlesx) * (0.95))\n    change x by (particlesx)\n    change y by (particlesy)\n    if <touching color (#ff0000)?> then\n        change y by ((particlesy) * (-1))\n        set [particlesy v] to ((particlesy) * (-0.4))\n    end\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I receive [level 7 v]\ndelete this clone\n\n@Sprite2\n\nwhen I receive [level 7 v]\nstop [other scripts in sprite v]\nhide\nwait (30) seconds\nbroadcast (WINNER!!! v)\n\nwhen flag clicked\nhide\n\ndefine outofground\nrepeat until <not <touching color (#ff0000)?>>\n    change y by (1)\n    set [sy v] to [8]\nend\n\nwhen I receive [level 7 v]\nhide\n\nwhen I start as a clone\nset [ghost v] effect to (100)\nset [sy v] to [0]\ngo to x: (0) y: (148)\nforever\n    show\n    change [ghost v] effect by (-5)\n    change [sy v] by (-0.5)\n    change [ghost v] effect by (-5)\n    change y by (sy)\n    outofground\nend\n\nwhen I receive [winner!!! v]\nswitch costume to (costume2 v)\nrepeat (6)\n    create clone of (_myself_ v)\n    next costume\nend\nhide\n\n@fireworks\n\nwhen I start as a clone\nset pen color to (#ffdd00)\nset [alive v] to [0]\nif <(clones: ID) = [1]> then\n    go to x: (pick random (-150) to (150)) y: (-200)\n    set [clones velocity v] to (pick random (-8) to (8))\nelse\n    set [clones velocity v] to (pick random (8) to (18))\n    if <(explosion type) = [3]> then\n        change [clones velocity v] by (8)\n    end\n    set pen (color v) to (explosion color)\nend\n\nset [clones: id v] to [0]\nwait (pick random (0.1) to (1)) seconds\n\nwhen I receive [render pen v]\nif <(clones: ID) = [0]> then\nif <(clones: ID) = [1]> then\n    if <(alive) < ((25) + (pick random (0) to (5)))> then\n        set pen color to (#000263)\n        pen up\n        change y by (10)\n        change x by (clones velocity)\n        set pen size to (10)\n        pen down\n        move (0) steps\n        pen up\n    else\n        set [explosion type v] to (pick random (1) to (4))\n        clone explosion\n    end\nelse\n    change y by (-3)\n    pen up\n    set pen size to (10)\n    change pen (transparency v) by (5)\n    pen down\n    move (clones velocity) steps\n    if <(explosion type) = [3]> then\n        move (() - ((clones velocity) * (2))) steps\n        move ((clones velocity) * (2)) steps\n        set [clones velocity v] to ((clones velocity) * (0.9))\n    else\n        set [clones velocity v] to ((clones velocity) * (0.85))\n    end\n    pen up\n    if <(alive) > [25]> then\n        delete this clone\n    end\nend\n\ndefine clone explosion\nstart sound (pick random (1) to (10))\nset [clones: id v] to [2]\nset [explosion color v] to (pick random (1) to (100))\nif <<(explosion type) = [1]> or <(explosion type) = [4]>> then\n    repeat (50)\n        point in direction (pick random (1) to (360))\n        create clone of (_myself_ v)\n    end\n    delete this clone\nelse\n    if <(explosion type) = [2]> then\n        repeat (8)\n            point in direction (pick random (-135) to (-45))\n            create clone of (_myself_ v)\n        end\n        repeat (8)\n            point in direction (pick random (45) to (135))\n            create clone of (_myself_ v)\n        end\n        delete this clone\n    else\n        repeat (50)\n            set [explosion color v] to (pick random (1) to (100))\n            point in direction (pick random (1) to (360))\n            create clone of (_myself_ v)\n        end\n        delete this clone\n    end\nend\n\ndefine big\nrepeat (pick random (20) to (100))\n    set [explosion type v] to []\n    set [clones: id v] to [1]\n    create clone of (_myself_ v)\n    set [clones: id v] to [0]\nend\n\nwhen I receive [winner!!! v]\nset [alive v] to []\nerase all\nforever\n    repeat (pick random (3) to (8))\n        set [explosion type v] to []\n        set [clones: id v] to [1]\n        create clone of (_myself_ v)\n        set [clones: id v] to [0]\n        repeat (pick random (5) to (15))\n            wait (0) seconds\n        end\n    end\nend\n\nwhen I receive [winner!!! v]\nforever\n    erase all\n    broadcast (render pen v)\nend\n\nwhen flag clicked\nerase all\n\n@thumbnail2\n\nwhen flag clicked\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\n    go to x: (0) y: (0)\n    show\n    go to [front v] layer\nend\n\n