KENNEY Platformer V0.1.11

Instructions: #KENNEY #Platformer V0.1.9 By #FireHorse27\n\nThis project will be reshared whenever something new is added. This is crazy!\n\nDo not play on internet explorer. Sorry, I had to reset all the high scores for the V0.1.11 update.\n\nFind the Easter egg.\n\nWhat I changed:\nGot it to work in the new version of Scratch. No longer broken! :D @CODE599-Test stopped working on this so I fixed it and I am going to add new things.\nAdded New Achievement!\nAdded new level!\nAdded Highscores for the first six levels. Press space to see them. You must get three stars to set the new time record.\n\nPLAY IN FULL SCREEN!! It's Better :D\n\nLet me know if you find bugs.\n\nNEW VERSION COMING SOON!!! (MAYBE)\nThings to add:\n- 1 New Achievement (Only 4 Right Now)\n- 3 New levels (Only 6 Right Now)\n- New Costumes (partially implemented)\n- Power Ups\n\nControls:\n[Q] - Menu\n[↑] - Jump, Enter the Door\n[↓] - Duck, Drop\n[→] - Move Right\n[←] - Move Left\n\nCollect coins to get stars. By bouncing on monsters to kill them, you get coins. Drop the weights on the pads to get lots of coins. Pound crates to break them. You lose half a heart for touching spikes and monsters. You don't lose any if you bounce on the monster though. A whole heart is lost for falling off the world or touching the water. To get three stars, you have to collect all the coins. You will have to figure out what the blue orbs do. If you click on the running player on the main menu, you can change its color. :D Rest of the instructions are in the game.\n\nCredits:\nThank you to @CODE599-Test for making the original project. I probably could not have made something this complicated if @CODE599-Test had not started it so thank you.\nThe basic collision and scrolling script was from scratch tutorials.\nMusic is called Side-Steppin! \nhttp://kenney.nl/assets -- for the awesome graphics \n(Some are modified)\n\n#CODE599-Test #Kenney #Platformer #Cute #FireHorse27 #Fire #Horse #27

@Stage\n\nwhen I receive [sound v]\nrepeat (25)\n    change volume by (-4)\nend\nstop [other scripts in stage v]\nstop all sounds\nset volume to (100) %\nstart sound [game 2 v]\n\ndefine Set up\ndelete (all) of [level stars v]\nrepeat (12)\n    insert [0] at (1) of [level stars v] \nend\n\nwhen flag clicked\nset [first boot? v] to [1]\nSet up\nset [level v] to [0]\n\nwhen I receive [menu v]\nif <(First boot?) = [1]> then\n    set [first boot? v] to [0]\n    stop all sounds\n    set volume to (100) %\n    forever\n        play sound [menu v] until done\n    end\nend\n\nwhen I receive [menu sound v]\nrepeat (25)\n    change volume by (-4)\nend\nstop [other scripts in stage v]\nstop all sounds\nset volume to (100) %\nforever\n    play sound [menu v] until done\nend\n\nwhen I receive [play v]\nset [stars v] to [0]\nset [blue key? v] to [0]\nset [gold key? v] to [0]\nset [orange key? v] to [0]\nset [green key? v] to [0]\nset [go through door? v] to [0]\nset [toching door? v] to [0]\nset [player control? v] to [yes]\nset [smash? v] to [0]\nset [smash x? v] to [0]\nset [smash y v] to [0]\nset [menu? v] to [no]\n\nwhen [9 v] key pressed\nrepeat until <[10] = (length of [achievements v])>\n    delete (11) of [achievements v]\nend\n\n@Player\n\ndefine Get Touching <check platform?>\nif <touching (blocks v)?> then\n    set [touch v] to [9]\nelse\n    if <touching (ground v)?> then\n        set [touch v] to [9]\n    else\n        if <<check platform?> and <touching (platforms v)?>> then\n            set [touch v] to [1]\n        else\n            set [touch v] to [0]\n        end\n    end\nend\n\ndefine Set Walk (dir)\nchange [plyr speed x v] by ((1.5) * (dir))\npoint in direction ((90) * (dir))\nchange [frame v] by (1)\nif <<(falling?) < [4]> and <((frame) mod (4)) = [1]>> then\n    if <(Sounds) > [0]> then\n        start sound [footstep cloud v]\n    end\nend\n\ndefine Walk (speed)\nchange x by (speed)\nset [slope v] to [0]\nGet Touching <(in platforrm) = [1]>\nrepeat until <<(slope) = [8]> or <(touch) = [0]>>\n    change y by (1)\n    change [slope v] by (1)\n    Get Touching <(in platforrm) = [1]>\nend\nif <(slope) = [8]> then\n    change x by ((0) - (speed))\n    change y by ((0) - (slope))\n    if <<(touch) = [1]> and <(in platforrm) = [1]>> then\n        set [in platforrm v] to [2]\n        Walk (speed)\n        if <(plyr speed x) = [0]> then\n            set [in platforrm v] to [1]\n        end\n    else\n        if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <([abs v] of (speed) ) > [2.5]>> then\n            if <<(touch) > [1]> and <(wall jump) < [8]>> then\n                set [plyr speed x v] to ((-1.2) * (speed))\n                set [plyr speed y v] to [11]\n                set [falling? v] to [6]\n                set [wall jump v] to [15]\n                point in direction ((-90) * ((speed) / ([abs v] of (speed) )))\n                start sound [173326__soundnimja__jump-1 v]\n            else\n                set [plyr speed x v] to [0]\n            end\n        else\n            set [plyr speed x v] to [0]\n        end\n    end\nend\n\ndefine Gravity\nif <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n    change [plyr speed y v] by (-1)\nelse\n    if <(plyr speed y) < [4]> then\n        change [plyr speed y v] by (-1)\n    else\n        change [plyr speed y v] by (-2)\n    end\nend\nchange y by (round (plyr speed y))\nchange [falling? v] by (1)\n\ndefine Controls - Jump, Crouch\nif <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n    if <(Toching door?) = [1]> then\n        Go through door\n    else\n        if <<(jump key) = [0]> and <(falling?) < [3]>> then\n            set [plyr speed y v] to [14]\n            set [falling? v] to [6]\n            set [jump key v] to [1]\n            if <(Sounds) > [0]> then\n                start sound [173326__soundnimja__jump-1 v]\n            end\n        end\n    end\nelse\n    set [jump key v] to [0]\nend\nif <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n    if <(falling?) > [6]> then\n        set [plyr speed y v] to [-15]\n        set [plyr speed x v] to [0]\n        set [smash x? v] to (x position)\n        broadcast (smash look v)\n    else\n        set [in platforrm v] to [2]\n    end\nend\n\ndefine Check Hit Ceiling / Floor <up?>\nGet Touching \nif <(touch) = [0]> then\n    set [in platforrm v] to [1]\nelse\n    if <<up?> and <(touch) = [1]>> then\n        set [in platforrm v] to [2]\n    end\nend\nif <not <(touch) < (in platforrm)>> then\n    set [slope v] to (([abs v] of (round (plyr speed y)) ) + (4))\n    set [last y v] to ((y position) - (round (plyr speed y)))\n    repeat until <<(touch) < (in platforrm)> or <(slope) = [0]>>\n        if <up?> then\n            change y by (-1)\n        else\n            change y by (1)\n            set [falling? v] to [0]\n        end\n        Get Touching <not <up?>>\n        change [slope v] by (-1)\n        if <(touch) < [10]> then\n            set [last y v] to (y position)\n        end\n    end\n    if <(slope) = [0]> then\n        set y to (last y)\n        change x by ((0) - ((direction) / (89)))\n        set [last y v] to [999]\n        if <not <(push x) = [0]>> then\n            set [plyr speed x v] to ((push x) * (2))\n            Walk (plyr speed x)\n        end\n    else\n        set [plyr speed y v] to [0]\n    end\nend\n\ndefine Controls - Left and Right\nset [plyr speed x v] to (((plyr speed x) * (0.7)) + ((push x) * (0.3)))\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    Set Walk (-1)\nelse\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        Set Walk (1)\n    else\n        set [frame v] to [0]\n    end\nend\n\ndefine Set Costume\nif <(Smash?) = [yes]> then\n    switch costume to (p1_duck v)\nelse\n    if <(Go through door?) = [1]> then\n        switch costume to (p1_back v)\n    else\n        if <(Hurt) = [1]> then\n            switch costume to (p1_hurt v)\n        else\n            if <(falling?) < [6]> then\n                if <<<key (s v) pressed?> or <key (down arrow v) pressed?>> and <<(plyr speed x) < [0.5]> and <(plyr speed x) > [-0.5]>>> then\n                    switch costume to (p1_duck v)\n                else\n                    if <(frame) = [0]> then\n                        switch costume to (p1_stand v)\n                    else\n                        switch costume to ([floor v] of ((1) + ((frame) mod (11))) )\n                    end\n                end\n            else\n                if <(plyr speed y) > [0]> then\n                    switch costume to (p1_jump v)\n                else\n                    switch costume to (p1_jump v)\n                end\n            end\n        end\n    end\nend\n\ndefine Scroll Level (x)\nchange [scroll x v] by (x)\nchange x by ((0) - (x))\n\nwhen I receive [spawn at scroll v]\ngo to x: (0) y: (Scroll Y/ Y pos)\n\nwhen I receive [start v]\nset [color v] effect to (color)\nshow variable [time: v]\nset [stars v] to [0]\nset [time: v] to [0]\nset [num 2 v] to [0]\nset [life v] to [6]\nset [player control? v] to [yes]\ngo to [front v] layer\nReset Level\nset [fcount v] to [0]\nforever\n    set [lasy sy v] to (plyr speed y)\n    change [fcount v] by (1)\n    switch costume to (hitbox v)\n    if <(die) < [1]> then\n        show\n        if <(Player control?) = [yes]> then\n            Controls - Jump, Crouch\n        end\n        Gravity\n        Check Hit Ceiling / Floor <(plyr speed y) > [0]>\n        if <(wall jump) > [0]> then\n            change [wall jump v] by (-1)\n        else\n            if <(Player control?) = [yes]> then\n                Controls - Left and Right\n            end\n        end\n        Walk (plyr speed x)\n    else\n        Die Frame\n    end\n    Set Costume\n    Scroll Level (round ((x position) / (10)))\n    set [push x v] to [0]\n    broadcast (tick v) and wait\n    if <<touching (_edge_ v)?> and <(y position) < [-170]>> then\n        if <(Life) < [3]> then\n            broadcast (menu v)\n            broadcast (menu sound v)\n            hide variable [time: v]\n            change [life v] by (-2)\n        else\n            Reset Level\n            broadcast (reset v)\n            change [life v] by (-2)\n        end\n    end\nend\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\nhide\n\ndelete this clone\n\nwhen I receive [player flash v]\nrepeat until <(Hurt) = [0]>\n    repeat (5)\n        change [ghost v] effect by (15)\n    end\n    repeat (5)\n        change [ghost v] effect by (-15)\n    end\nend\nset [ghost v] effect to (0)\n\nwhen flag clicked\nhide\n\nif <(plyr speed x) = [0]> then\n    set [die v] to [1]\nend\n\ndefine Die Frame\nif <(die) = [1]> then\n    change [die v] by (1)\nend\nif <(y position) < [-189]> then\n    stop [this script v]\nend\nshow\nGravity\nCheck Hit Ceiling / Floor <(plyr speed y) > [0]>\nWalk (plyr speed x)\nif <(falling?) < [2]> then\n    change [die v] by (1)\n    set [plyr speed x v] to (((plyr speed x) * (0.7)) + ((push x) * (0.3)))\n    if <(die) > [60]> then\n        set [die v] to [-60]\n    end\nend\n\nif <touching (lift v)?> then\n    set [touch v] to [10]\n    set [push x v] to (lift push x)\nend\n\nwhen I receive [start v]\nwait (2) seconds\ngo to [front v] layer\n\ndefine Go through door\nif <not <(Go through door?) = [1]>> then\n    set [num 2 v] to [1]\n    broadcast (go through door v)\n    set [go through door? v] to [1]\nend\n\nwhen I receive [go through door v]\nset [player control? v] to [no]\nset [plyr speed x v] to [0]\nrepeat (20)\n    change x by ((((Door x) + (20)) - (x position)) * (0.5))\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nbroadcast (stars v) and wait\nbroadcast (menu v)\nbroadcast (menu sound v)\nhide variable [time: v]\nif <(Level) < [5]> then\n    if <((Level) + (1)) > ((Level at) - (1))> then\n        change [level at v] by (1)\n    end\n    if <<(username) = [FireHorse27]> and <key (k v) pressed?>> then\n        if <((Level) + (5)) > ((Level at) - (1))> then\n            set [level at v] to [6]\n        end\n    end\nend\ncheck to see if highscore was made\n\nwhen I receive [smash look v]\nset [smash? v] to [yes]\nset [player control? v] to [no]\nwait until <<(falling?) = [0]> or <(plyr speed y) > [0]>>\nstart sound [nsmb_toad_house_appear v]\nwait (0.4) seconds\nset [smash? v] to [no]\nset [player control? v] to [yes]\n\ndefine Reset Level\nbroadcast (reset v)\nset size to (30) %\nset rotation style [left-right v]\npoint in direction (90)\ngo to x: (0) y: (180)\nset [plyr speed x v] to [0]\nset [plyr speed y v] to [0]\nset [falling? v] to [10]\nset [in platforrm v] to [1]\nset [frame v] to [0]\nset [wall jump v] to [0]\nset [scroll x v] to [0]\nset [push x v] to [0]\nset [die v] to [0]\nset [hurt v] to [0]\nbroadcast (setup v)\n\nset [fcount v] to [4000]\nset [coins# v] to [19]\n\nwhen I receive [start v]\nset [ghost v] effect to (0)\nset [coins v] to [0]\nforever\n    if <key (q v) pressed?> then\n        broadcast (menu v)\n        broadcast (menu sound v)\n        wait (1) seconds\n    end\nend\n\nwhen I receive [spikes hit v]\nstart sound [smw_fireball v]\nset [player control? v] to [no]\nset [plyr speed x v] to [0]\nset [plyr speed y v] to [15]\nset [hurt v] to [1]\nswitch costume to (p1_hurt v)\nchange [life v] by (-1)\nwait (1) seconds\nif <(Life) < [1]> then\n    broadcast (menu v)\n    broadcast (menu sound v)\nelse\n    set [hurt v] to [2]\n    broadcast (player flash v)\n    set [player control? v] to [yes]\n    wait (2) seconds\n    set [hurt v] to [0]\nend\n\nwhen I receive [power up 1 v]\nset [hurt v] to [2]\nbroadcast (player flash v)\nwait (10) seconds\nset [hurt v] to [0]\n\nwhen I receive [toching block v]\nset [touch v] to [9]\n\nwhen I receive [player use spring v]\nset [plyr speed x v] to [0]\nset [plyr speed y v] to [0]\nchange x by ((((Spring x) + (20)) - (x position)) * (0.5))\nchange y by (((Spring y) - (y position)) * (0.5))\n\nwhen I receive [stars v]\nset [plyr speed x v] to [0]\nset [plyr speed y v] to [0]\n\nwhen I receive [toching door v]\ngo to [front v] layer\n\nset [scroll x v] to [2600]\nbroadcast (spawn at scroll v)\n\nset [☁ fastest time for level 1: v] to [1000]\n\nset [☁ fastest time for level 2: v] to [1000]\n\nset [☁ fastest time for level 3: v] to [1000]\n\nset [☁ fastest time for level 4: v] to [1000]\n\nset [☁ fastest time for level 5: v] to [1000]\n\nset [☁ fastest time for level 6: v] to [1000]\n\ndefine check to see if highscore was made\nif <(Stars) = [3]> then\n    if <(Level) = [0]> then\n        if <((☁ Fastest Time for Level 1:) + (0.1)) > (Time:)> then\n            set [☁ fastest time for level 1: v] to (Time:)\n            broadcast (set highscore person v) and wait\n        end\n    else\n        if <(Level) = [1]> then\n            if <(Time:) < ((☁ Fastest Time for Level 2:) + (0.1))> then\n                set [☁ fastest time for level 2: v] to (Time:)\n                broadcast (set highscore person v) and wait\n            end\n        else\n            if <(Level) = [2]> then\n                if <(Time:) < ((☁ Fastest Time for Level 3:) + (0.1))> then\n                    set [☁ fastest time for level 3: v] to (Time:)\n                    broadcast (set highscore person v) and wait\n                end\n            else\n                if <(Level) = [3]> then\n                    if <(Time:) < ((☁ Fastest Time for Level 4:) + (0.1))> then\n                        set [☁ fastest time for level 4: v] to (Time:)\n                        broadcast (set highscore person v) and wait\n                    end\n                else\n                    if <(Level) = [4]> then\n                        if <(Time:) < ((☁ Fastest Time for Level 5:) + (0.1))> then\n                            set [☁ fastest time for level 5: v] to (Time:)\n                            broadcast (set highscore person v) and wait\n                        end\n                    else\n                        if <(Level) = [5]> then\n                            if <(Time:) < ((☁ Fastest Time for Level 6:) + (0.1))> then\n                                set [☁ fastest time for level 6: v] to (Time:)\n                                broadcast (set highscore person v) and wait\n                            end\n                        else\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [menu v]\nhide variable [time: v]\n\n@Ground\n\nhide\n\nwhen I receive [load v]\nhide\nwait (0.5) seconds\nwait until <(Loading?) = [no]>\nshow\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\nhide\n\nwhen flag clicked\nhide variable [time: v]\nhide\n\nwhen I receive [play v]\nswitch costume to (costume1 v)\nset size to (400) %\nswitch costume to ((Level) + (2))\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nforever\n    set x to ([x position v] of [level v])\nend\n\nwhen I receive [start v]\nrepeat until <(num 2) = [1]>\n    wait (.1) seconds\n    change [time: v] by (.1)\nend\n\n@level\n\nwhen flag clicked\nhide\n\nwhen I receive [play v]\nswitch costume to (costume2 v)\nset size to (400) %\nswitch costume to ((Level) + (2))\nset y to (0)\nforever\n    set x to ((2160) - (Scroll X))\nend\n\nwhen I receive [play v]\nwait (0.2) seconds\ngo to [front v] layer\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [load v]\nhide\nwait (0.5) seconds\nwait until <(Loading?) = [no]>\nshow\n\ngo to [front v] layer\n\n@Background 1\n\nwhen flag clicked\nhide\n\nwhen I receive [play v]\nswitch costume to (costume2 v)\nset size to (100) %\nswitch costume to (background 1 v)\ngo to [front v] layer\ngo [backward v] (100) layers\nset y to (0)\nshow\nforever\n    set x to ((1600) - ((Scroll X) / (2)))\nend\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [load v]\nhide\nwait (0.5) seconds\nwait until <(Loading?) = [no]>\nshow\n\nwhen I receive [start v]\ngo [backward v] (100) layers\n\nhide\n\n@Objects\n\nwhen I receive [play v]\ndelete all of [concatenate:with:,level ,readvariable,level v]\nif <(Level) = [0]> then\n    set [num 1 v] to [0]\n    repeat (length of [level 0 v])\n        change [num 1 v] by (1)\n        add (item (num 1) of [level 0 v]) to [concatenate:with:,level ,readvariable,level v]\n    end\n    Set up\nend\nif <(Level) = [1]> then\n    set [num 1 v] to [0]\n    repeat (length of [level 1 v])\n        change [num 1 v] by (1)\n        add (item (num 1) of [level 1 v]) to [concatenate:with:,level ,readvariable,level v]\n    end\n    Set up\nend\nif <(Level) = [2]> then\n    set [num 1 v] to [0]\n    repeat (length of [level 2 v])\n        change [num 1 v] by (1)\n        add (item (num 1) of [level 2 v]) to [concatenate:with:,level ,readvariable,level v]\n    end\n    Set up\nend\nif <(Level) = [3]> then\n    set [num 1 v] to [0]\n    repeat (length of [level 3 v])\n        change [num 1 v] by (1)\n        add (item (num 1) of [level 3 v]) to [concatenate:with:,level ,readvariable,level v]\n    end\n    Set up\nend\nif <(Level) = [4]> then\n    set [num 1 v] to [0]\n    repeat (length of [level 4 v])\n        change [num 1 v] by (1)\n        add (item (num 1) of [level 4 v]) to [concatenate:with:,level ,readvariable,level v]\n    end\n    Set up\nend\nif <(Level) = [5]> then\n    set [num 1 v] to [0]\n    repeat (length of [level 5 v])\n        change [num 1 v] by (1)\n        add (item (num 1) of [level 5 v]) to [concatenate:with:,level ,readvariable,level v]\n    end\n    Set up\nend\n\nwhen flag clicked\nhide\nwait (0.4) seconds\ngo to [front v] layer\nset [clone id v] to [0]\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [play v]\nSet up\nwait (0.4) seconds\ngo to [front v] layer\n\nwhen I start as a clone\nif <(Clone type?) = [1]> then\n    go to [front v] layer\n    switch costume to (spikes v)\n    forever\n        if <<[-250] < (X pos)> and <[250] > (X pos)>> then\n            if <(Loading?) = [no]> then\n                show\n                if <(Hurt) = [0]> then\n                    if <touching (player v)?> then\n                        broadcast (spikes hit v) and wait\n                    end\n                end\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clone type?) = [2]> then\n    go to [front v] layer\n    set size to (50) %\n    switch costume to (coin v)\n    forever\n        if <<[-240] < (X pos)> and <[240] > (X pos)>> then\n            if <(Loading?) = [no]> then\n                show\n                if <touching (player v)?> then\n                    start sound [lm_coin v]\n                    change [coins v] by (1)\n                    delete this clone\n                end\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clone type?) = [3]> then\n    if <(letter (17) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) = [1]> then\n        switch costume to (water 1 v)\n    else\n        if <(letter (17) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) = [2]> then\n            switch costume to (water 2 v)\n        else\n            switch costume to (water 3 v)\n        end\n    end\n    set size to (100) %\n    go [backward v] (30) layers\n    if <(letter (17) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) = [3]> then\n        forever\n            if <<[-630] < (X pos)> and <[240] > (X pos)>> then\n                if <(Loading?) = [no]> then\n                    show\n                end\n            else\n                hide\n            end\n        end\n    else\n        forever\n            if <<[-440] < (X pos)> and <[240] > (X pos)>> then\n                if <(Loading?) = [no]> then\n                    show\n                end\n            else\n                hide\n            end\n        end\n    end\nend\nif <(Clone type?) = [4]> then\n    switch costume to (gold key 2 v)\n    go to [front v] layer\n    set size to (50) %\n    forever\n        if <touching (player v)?> then\n            start sound [lm_coin v]\n            set [gold key? v] to [1]\n            delete this clone\n        end\n        if <<[-240] < (X pos)> and <[240] > (X pos)>> then\n            if <(Loading?) = [no]> then\n                show\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clone type?) = [5]> then\n    switch costume to (green key 2 v)\n    go to [front v] layer\n    set size to (50) %\n    forever\n        if <touching (player v)?> then\n            start sound [lm_coin v]\n            set [green key? v] to [1]\n            delete this clone\n        end\n        if <<[-240] < (X pos)> and <[240] > (X pos)>> then\n            if <(Loading?) = [no]> then\n                show\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clone type?) = [6]> then\n    switch costume to (orange key 2 v)\n    go to [front v] layer\n    set size to (50) %\n    forever\n        if <touching (player v)?> then\n            start sound [lm_coin v]\n            set [orange key? v] to [1]\n            delete this clone\n        end\n        if <<[-240] < (X pos)> and <[240] > (X pos)>> then\n            if <(Loading?) = [no]> then\n                show\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clone type?) = [7]> then\n    switch costume to (blue key 2 v)\n    go to [front v] layer\n    set size to (50) %\n    forever\n        if <touching (player v)?> then\n            start sound [lm_coin v]\n            set [blue key? v] to [1]\n            delete this clone\n        end\n        if <<[-240] < (X pos)> and <[240] > (X pos)>> then\n            if <(Loading?) = [no]> then\n                show\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clone type?) = [8]> then\n    go to [front v] layer\n    set size to (100) %\n    forever\n        if <<(Blue key?) = [1]> and <<(Gold key?) = [1]> and <<(Green key?) = [1]> and <(Orange key?) = [1]>>>> then\n            switch costume to (door2 v)\n            if <touching (player v)?> then\n                broadcast (toching door v)\n                set [toching door? v] to [1]\n                set [door x v] to (x position)\n            else\n                set [toching door? v] to [0]\n            end\n        else\n            switch costume to (door1 v)\n        end\n        if <<[-240] < (X pos)> and <[240] > (X pos)>> then\n            if <(Loading?) = [no]> then\n                show\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clone type?) = [9]> then\n    go to [front v] layer\n    set size to (100) %\n    forever\n        if <<touching (player v)?> and <([y position v] of [player v]) > ((y position) + (20))>> then\n            if <(plyr speed y) < [0]> then\n                switch costume to (spring 2 v)\n                start sound [mk64_item_drop v]\n                set [plyr speed y v] to [28]\n            end\n        else\n            switch costume to (spring 1 v)\n        end\n        if <<[-240] < (X pos)> and <[240] > (X pos)>> then\n            if <(Loading?) = [no]> then\n                show\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clone type?) = [10]> then\n    go to [front v] layer\n    set size to (100) %\n    forever\n        if <(plyr speed y) = [0]> then\n            if <<([y position v] of [player v]) > ((y position) + (40))> and <<(Smash?) = [yes]> and <<(Smash x?) > ((x position) - (20))> and <(Smash x?) < ((x position) + (20))>>>> then\n                set [smash y v] to []\n                set [smash x v] to []\n                switch costume to (weight 2 v)\n                set [gravity v] to [0]\n                repeat (20)\n                    change [gravity v] by (-1)\n                    change y by (Gravity)\n                    move up\n                    set [smash y v] to (y position)\n                    set [smash x v] to (x position)\n                end\n                set [smash y v] to []\n                set [smash x v] to []\n                forever\n                    if <<[-245] < (X pos)> and <[245] > (X pos)>> then\n                        if <(Loading?) = [no]> then\n                            show\n                        end\n                    else\n                        hide\n                    end\n                end\n            else\n                switch costume to (weight 1 v)\n            end\n        end\n        if <<[-245] < (X pos)> and <[245] > (X pos)>> then\n            if <(Loading?) = [no]> then\n                show\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clone type?) = [11]> then\n    go to [front v] layer\n    set size to (100) %\n    forever\n        if <<<(Smash x) > ((x position) + (-10))> and <(Smash x) < ((x position) + (10))>> and <<(Smash y) > ((y position) + (-10))> and <(Smash y) < ((y position) + (10))>>> then\n            start sound [nsmb_toad_house_appear v]\n            switch costume to (button 2 v)\n            repeat (10)\n                change [coins v] by (1)\n            end\n            forever\n                switch costume to (button 2 v)\n            end\n        else\n            switch costume to (button 1 v)\n        end\n    end\nend\nif <(Clone type?) = [12]> then\n    switch costume to (enemy 1.1 v)\n    go to [front v] layer\n    set size to (85) %\n    set [move v] to [0]\n    set [tick v] to [1]\n    wait (letter (19) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) seconds\n    forever\n        if <(Tick) = [1]> then\n            change [move v] by (1)\n            if <(move) > ((letter (17) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) * (40))> then\n                set [tick v] to [0]\n                point in direction (-90)\n            end\n        else\n            change [move v] by (-1)\n            if <(move) < [0]> then\n                set [tick v] to [1]\n                point in direction (90)\n            end\n        end\n        set [x pos v] to ((Start x) + (move))\n        switch costume to ([floor v] of ((16) + ((((timer) mod (2)) * (3)) mod (2))) )\n        if <touching (player v)?> then\n            if <(plyr speed y) < [0]> then\n                if <not <(Hurt) = [1]>> then\n                    start sound [smb_kick v]\n                    set [plyr speed y v] to [15]\n                    switch costume to (enemy 1.3 v)\n                    wait (0.5) seconds\n                    repeat (5)\n                        change [coins v] by (1)\n                    end\n                    repeat (10)\n                        change [ghost v] effect by (10)\n                    end\n                    change [num monsters killed? v] by (1)\n                    if <(Num monsters killed?) = [30]> then\n                        broadcast (30 monsters smashed! v)\n                    end\n                    delete this clone\n                end\n            else\n                if <(Hurt) = [0]> then\n                    if <touching (player v)?> then\n                        set [hurt v] to [1]\n                        broadcast (spikes hit v)\n                    end\n                end\n            end\n        end\n    end\nend\nif <(Clone type?) = [13]> then\n    delete this clone\nend\nif <(Clone type?) = [14]> then\n    set size to (50) %\n    go to [front v] layer\n    switch costume to (power up 1 v)\n    forever\n        if <touching (player v)?> then\n            broadcast (power up 1 v)\n            delete this clone\n        end\n        if <<[-240] < (X pos)> and <[240] > (X pos)>> then\n            if <(Loading?) = [no]> then\n                show\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clone type?) = [15]> then\n    go to [front v] layer\n    set size to (50) %\n    switch costume to (tp v)\n    forever\n        if <touching (player v)?> then\n            set [scroll x v] to (join (letter (17) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (18) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (19) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (letter (20) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])))))\n            set [scroll y/ y pos v] to (join (letter (22) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (23) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (24) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (letter (25) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])))))\n            if <(Scroll Y/ Y pos) = []> then\n                set [scroll y/ y pos v] to [150]\n            end\n            broadcast (spawn at scroll v)\n            wait until <not <touching (player v)?>>\n        end\n        if <<[-240] < (X pos)> and <[240] > (X pos)>> then\n            if <(Loading?) = [no]> then\n                show\n            end\n        else\n            hide\n        end\n    end\nend\n\ndefine Set up\nset [clone id v] to [0]\nrepeat (length of [concatenate:with:,level ,readvariable,level v])\n    change [clone id v] by (1)\n    set [clone type? v] to (round (join (letter (1) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (2) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (3) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) []))))\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nwait (0.4) seconds\nif <not <(Clone type?) = [3]>> then\n    go to [front v] layer\nend\nif <(Clone type?) = [1]> then\n    wait (1) seconds\n    go to [front v] layer\nend\n\ndefine move up\nrepeat until <not <touching (ground v)?>>\n    set [gravity v] to [0]\n    change y by (1)\nend\n\nrepeat (10)\n    change [coins v] by (1)\nend\n\nwhen I start as a clone\nset y to ((-180) + ((40) * (join (letter (11) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (12) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (13) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (14) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (15) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) [])))))))\nset [x pos v] to (([x position v] of [level v]) + ((-2381) + ((40) * (join (letter (5) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (6) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (7) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (8) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (9) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) []))))))))\nset [start x v] to (X pos)\nforever\n    if <(Clone type?) = [10]> then\n    if <(Clone type?) = [12]> then\n        set x to ((() - (move)) + (([x position v] of [level v]) + ((-2381) + ((40) * (join (letter (5) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (6) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (7) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (8) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (9) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) [])))))))))\n        set [x pos v] to ((() - (move)) + (([x position v] of [level v]) + ((-2381) + ((40) * (join (letter (5) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (6) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (7) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (8) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (9) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) [])))))))))\n    else\n        if <not <(Clone type?) = [3]>> then\n            set x to (([x position v] of [level v]) + ((-2381) + ((40) * (join (letter (5) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (6) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (7) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (8) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (9) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) []))))))))\n        else\n            set x to (((20) - (((timer) * (10)) mod (40))) + (([x position v] of [level v]) + ((-2381) + ((40) * (join (letter (5) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (6) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (7) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (8) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (9) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) [])))))))))\n        end\n        set [x pos v] to (([x position v] of [level v]) + ((-2381) + ((40) * (join (letter (5) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (6) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (7) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (8) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (9) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) []))))))))\n    end\nend\n\nswitch costume to (join (letter (1) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (2) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (3) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) [])))\n\nwhen I start as a clone\n\nwhen I start as a clone\nif <(Clone type?) = [11]> then\n    forever\n        if <<[-245] < (X pos)> and <[245] > (X pos)>> then\n            if <(Loading?) = [no]> then\n                show\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clone type?) = [12]> then\n    forever\n        if <<[-245] < (X pos)> and <[245] > (X pos)>> then\n            if <(Loading?) = [no]> then\n                show\n            end\n        else\n            hide\n        end\n    end\nend\n\nif <<[-245] < (X pos)> and <[245] > (X pos)>> then\n\ninsert [001 00066 00002] at (46) of [level 5 v] \n\n@HUD\n\nwhen I start as a clone\nshow\nif <(Clone id) = [1]> then\n    set size to (50) %\n    forever\n        if <(Life) > [1]> then\n            switch costume to (life 1 v)\n        end\n        if <(Life) = [1]> then\n            switch costume to (life 2 v)\n        end\n        if <(Life) < [1]> then\n            switch costume to (life 3 v)\n        end\n    end\nend\nif <(Clone id) = [2]> then\n    set size to (50) %\n    forever\n        if <(Life) > [3]> then\n            switch costume to (life 1 v)\n        end\n        if <(Life) = [3]> then\n            switch costume to (life 2 v)\n        end\n        if <(Life) < [3]> then\n            switch costume to (life 3 v)\n        end\n    end\nend\nif <(Clone id) = [3]> then\n    set size to (50) %\n    forever\n        if <(Life) > [5]> then\n            switch costume to (life 1 v)\n        end\n        if <(Life) = [5]> then\n            switch costume to (life 2 v)\n        end\n        if <(Life) < [5]> then\n            switch costume to (life 3 v)\n        end\n    end\nend\nif <(Clone id) = [4]> then\n    change y by (2)\n    set size to (60) %\n    switch costume to (coin v)\nend\nif <<(Clone id) > [4]> and <(Clone id) < [10]>> then\n    set size to (60) %\n    switch costume to (0 v)\n    forever\n        switch costume to (letter ((Clone id) - (4)) of (Coin thing))\n    end\nend\nif <(Clone id) = [10]> then\n    forever\n        if <(Gold key?) = [1]> then\n            switch costume to (gold key 2 v)\n        else\n            switch costume to (gold key 1 v)\n        end\n    end\nend\nif <(Clone id) = [11]> then\n    forever\n        if <(Green key?) = [1]> then\n            switch costume to (green key 2 v)\n        else\n            switch costume to (green key 1 v)\n        end\n    end\nend\nif <(Clone id) = [12]> then\n    forever\n        if <(Orange key?) = [1]> then\n            switch costume to (orange key 2 v)\n        else\n            switch costume to (orange key 1 v)\n        end\n    end\nend\nif <(Clone id) = [13]> then\n    forever\n        if <(Blue key?) = [1]> then\n            switch costume to (blue key 2 v)\n        else\n            switch costume to (blue key 1 v)\n        end\n    end\nend\n\nwhen flag clicked\nset [life v] to [6]\n\ndefine Set up\nset size to (50) %\ngo to x: (-237) y: (150)\nhide\nset [clone id v] to [0]\nrepeat (3)\n    change [clone id v] by (1)\n    create clone of (_myself_ v)\n    change x by (20)\nend\ngo to x: (128) y: (150)\nset size to (62) %\nchange [clone id v] by (1)\ncreate clone of (_myself_ v)\nchange x by (20)\nrepeat (5)\n    change [clone id v] by (1)\n    create clone of (_myself_ v)\n    change x by (18)\nend\ngo to x: (-160) y: (155)\nset size to (58) %\nrepeat (4)\n    change [clone id v] by (1)\n    create clone of (_myself_ v)\n    change x by (25)\nend\n\nwhen I start as a clone\ngo to [front v] layer\nwait (1) seconds\ngo to [front v] layer\n\nwhen I receive [start v]\nSet up\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [play v]\nforever\n    if <(length of (Coins)) = [1]> then\n        set [coin thing v] to (join [0000] (Coins))\n    end\n    if <(length of (Coins)) = [2]> then\n        set [coin thing v] to (join [000] (Coins))\n    end\n    if <(length of (Coins)) = [3]> then\n        set [coin thing v] to (join [00] (Coins))\n    end\n    if <(length of (Coins)) = [4]> then\n        set [coin thing v] to (join [0] (Coins))\n    end\n    if <(length of (Coins)) = [5]> then\n        set [coin thing v] to (Coins)\n    end\nend\n\n@Menu\n\nwhen I receive [load menu v]\nhide\nset [selected? v] to [0]\nset [level at v] to [1]\nbroadcast (menu v)\n\ndefine Set up\nset [clone type? v] to [1]\nswitch costume to (menu background v)\ngo to x: (50) y: (65)\nshow\nset [clone id? v] to [0]\nset size to (200) %\nrepeat (3)\n    set x to (50)\n    change y by (-60)\n    repeat (3)\n        change [clone id? v] by (1)\n        create clone of (_myself_ v)\n        change x by (60)\n    end\nend\nset size to (100) %\ngo to x: (-60) y: (79)\nrepeat (3)\n    set x to (65)\n    change y by (-60)\n    repeat (3)\n        change [clone id? v] by (1)\n        create clone of (_myself_ v)\n        change x by (60)\n    end\nend\nchange [clone id? v] by (1)\ncreate clone of (_myself_ v)\nset size to (100) %\ngo to x: (0) y: (0)\nchange [clone id? v] by (1)\ncreate clone of (_myself_ v)\nset size to (100) %\ngo to x: (0) y: (0)\n\nwhen I receive [achievements page v]\ndelete this clone\n\nwhen I start as a clone\nif <(Clone type?) = [1]> then\n    go to [front v] layer\n    forever\n        if <<[10] > (Clone id?)> and <[0] < (Clone id?)>> then\n            if <((Level at) + (1)) > (Clone id?)> then\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (box 3 v)\n                    if <[0.2] < (timer)> then\n                        set [selected? v] to (Clone id?)\n                        if <mouse down?> then\n                            set [level v] to ((Selected?) - (1))\n                            stop [other scripts in sprite v]\n                            broadcast (load v)\n                        end\n                    end\n                else\n                    switch costume to (box 2 v)\n                end\n            else\n                switch costume to (box 1 v)\n            end\n        end\n        if <<[19] > (Clone id?)> and <[9] < (Clone id?)>> then\n            switch costume to (join ((Clone id?) - (9)) [])\n            if <((Level at) + (1)) > ((Clone id?) - (9))> then\n                show\n            else\n                hide\n            end\n        end\n        if <(Clone id?) = [19]> then\n            switch costume to (kenny v)\n            set size to (180) %\n            go to x: (-80) y: (110)\n        end\n        if <(Clone id?) = [20]> then\n            go to x: (140) y: (-131)\n            set size to (150) %\n            switch costume to (achievements1 v)\n            wait until <not <mouse down?>>\n            forever\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (achievements2 v)\n                    if <mouse down?> then\n                        broadcast (achievements page v)\n                        wait until <not <mouse down?>>\n                    end\n                else\n                    switch costume to (achievements1 v)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [menu v]\nset [selected? v] to [0]\nSet up\nreset timer\n\nwhen I receive [play v]\ndelete this clone\n\nwhen I receive [play v]\nhide\n\nwhen this sprite clicked\nif <(Clone id?) = [19]> then\n    broadcast (Easter Egg found v)\n    repeat (36)\n        turn right (10) degrees\n    end\nend\n\n@Menu char\n\nwhen flag clicked\nset [color v] to [0]\nhide\n\nwhen I receive [menu v]\ngo to [front v] layer\nset size to (200) %\nshow\ngo to x: (-90) y: (-50)\nswitch costume to (p1_walk01 v)\nforever\n    next costume\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        change [color v] effect by (2)\n        change [color v] by (2)\n    end\nend\n\nwhen I receive [start v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [load v]\ngo to x: (0) y: (0)\nwait (0.1) seconds\ngo to [front v] layer\n\nwhen I receive [achievements page v]\nstop [other scripts in sprite v]\nhide\n\n@Platforms\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [play v]\nshow\nswitch costume to (costume1 v)\nset size to (400) %\nswitch costume to ((Level) + (2))\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nforever\n    set x to ([x position v] of [level v])\nend\n\nwhen flag clicked\nhide\n\n@Cover\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\nend\n\nhide\n\nshow\n\nrepeat (100)\n\ngo to [front v] layer\n\nchange [ghost v] effect by (1)\n\n@blocks\n\nif <touching (player v)?> then\n\nset [toching block? v] to [1]\n\nset [toching block? v] to [0]\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nset y to ((-180) + ((40) * (join (letter (11) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (12) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (13) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (14) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (15) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) [])))))))\nset [x pos v] to (([x position v] of [level v]) + ((-2381) + ((40) * (join (letter (5) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (6) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (7) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (8) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (9) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) []))))))))\nset [start x v] to (X pos)\nforever\n    set y to ((-180) + ((40) * (join (letter (11) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (12) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (13) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (14) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (15) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) [])))))))\n    set x to (([x position v] of [level v]) + ((-2381) + ((40) * (join (letter (5) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (6) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (7) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (8) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (9) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) []))))))))\n    set [x pos v] to (([x position v] of [level v]) + ((-2381) + ((40) * (join (letter (5) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (6) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (7) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (8) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (9) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) []))))))))\nend\n\ndefine Set up\nset [clone id v] to [0]\nrepeat (length of [concatenate:with:,level ,readvariable,level v])\n    change [clone id v] by (1)\n    set [clone type? v] to (round (join (letter (1) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (2) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) (join (letter (3) of (item (Clone id) of [concatenate:with:,level ,readvariable,level v])) []))))\n    if <(Clone type?) = [13]> then\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I receive [play v]\nSet up\nwait (3) seconds\ngo to [front v] layer\n\nwhen I start as a clone\nshow\nif <(Clone type?) = [13]> then\n    go to [front v] layer\n    set size to (100) %\n    switch costume to (smash block1 v)\n    forever\n        if <<(plyr speed y) = [0]> and <<([y position v] of [player v]) < ((y position) + (60))> and <<([y position v] of [player v]) > ((y position) + (30))> and <<(Smash?) = [yes]> and <<(Smash x?) > ((x position) - (20))> and <(Smash x?) < ((x position) + (20))>>>>>> then\n            delete this clone\n        end\n        if <<[-245] < (X pos)> and <[245] > (X pos)>> then\n            show\n        else\n            hide\n        end\n    end\nend\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nif <(Level) = [0]> then\n    set [ghost v] effect to (0)\n    switch costume to (costume1 v)\n    go to x: (0) y: (-80)\n    switch costume to (1 v)\n    show\n    go to [front v] layer\n    Move\n    wait until <(Scroll X) > [320]>\n    Fade\n    set [ghost v] effect to (0)\n    switch costume to (costume1 v)\n    go to x: (0) y: (-80)\n    switch costume to (2 v)\n    Move\n    wait until <(Scroll X) > [670]>\n    Fade\n    set [ghost v] effect to (0)\n    switch costume to (costume1 v)\n    go to x: (0) y: (-80)\n    switch costume to (3 v)\n    Move\n    wait until <(Scroll X) > [1050]>\n    Fade\n    set [ghost v] effect to (0)\n    switch costume to (costume1 v)\n    go to x: (0) y: (-80)\n    switch costume to (4 v)\n    Move\n    wait until <(Scroll X) > [1420]>\n    Fade\n    set [ghost v] effect to (0)\n    switch costume to (costume1 v)\n    go to x: (0) y: (-80)\n    switch costume to (5 v)\n    Move\n    wait until <(Scroll X) > [1615]>\n    Fade\n    set [ghost v] effect to (0)\n    switch costume to (costume1 v)\n    go to x: (0) y: (-80)\n    switch costume to (6 v)\n    Move\n    wait until <(Scroll X) > [1880]>\n    Fade\n    set [ghost v] effect to (0)\n    switch costume to (costume1 v)\n    go to x: (0) y: (-80)\n    switch costume to (7 v)\n    Move\n    wait until <(Scroll X) > [2440]>\n    Fade\n    set [ghost v] effect to (0)\n    switch costume to (costume1 v)\n    go to x: (0) y: (-80)\n    switch costume to (8 v)\n    Move\n    wait until <(Scroll X) > [2820]>\n    Fade\n    set [ghost v] effect to (0)\n    switch costume to (costume1 v)\n    go to x: (0) y: (-80)\n    switch costume to (9 v)\n    Move\n    wait until <(Toching door?) = [1]>\n    Fade\n    hide\n    set [ghost v] effect to (0)\nend\n\ndefine Move\nrepeat (50)\n    change y by (((0) - (y position)) * (0.2))\nend\n\nwhen I receive [start v]\nif <(Level) = [0]> then\n    repeat (70)\n        go to [front v] layer\n    end\nend\n\ndefine Fade\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\nhide\n\n@Sprite2\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nforever\n    if <key (space v) pressed?> then\n        hide list [high scores v]\n    else\n        show list [high scores v]\n    end\nend\n\nwhen I receive [load v]\nset [loading? v] to [yes]\nshow\ngo to [front v] layer\nwait (0.2) seconds\nbroadcast (Play v)\nwait (1) seconds\nbroadcast (sound v)\nwait (0.5) seconds\nset [loading? v] to [no]\nhide\nbroadcast (Start v)\n\n@Stars\n\nwhen I start as a clone\nif <(Clone type?) = [2]> then\n    show\n    repeat (10)\n        go to [front v] layer\n    end\nend\n\nwhen I receive [menu v]\nwait (0.2) seconds\nSet up stars\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nif <(Clone type?) = [1]> then\n    show\n    go to x: (0) y: ([y position v] of [player v])\n    set size to (15) %\n    repeat (30)\n        change y by (((20) - (y position)) * (0.1))\n        change size by (((100) - (size)) * (0.05))\n    end\n    if <(Clone id) = [1]> then\n        if <(Stars) = [1]> then\n            repeat (30)\n                change y by (((40) - (y position)) * (0.1))\n                change size by (((120) - (size)) * (0.05))\n            end\n        end\n        if <(Stars) = [2]> then\n            repeat (30)\n                change y by (((40) - (y position)) * (0.1))\n                change x by (((-25) - (x position)) * (0.1))\n                change size by (((120) - (size)) * (0.05))\n            end\n        end\n        if <(Stars) = [3]> then\n            repeat (30)\n                change y by (((40) - (y position)) * (0.1))\n                change x by (((-50) - (x position)) * (0.1))\n                change size by (((120) - (size)) * (0.05))\n            end\n        end\n    end\n    if <(Clone id) = [2]> then\n        if <(Stars) = [2]> then\n            repeat (30)\n                change y by (((40) - (y position)) * (0.1))\n                change x by (((25) - (x position)) * (0.1))\n                change size by (((120) - (size)) * (0.05))\n            end\n        else\n            repeat (30)\n                change y by (((40) - (y position)) * (0.1))\n                change size by (((120) - (size)) * (0.05))\n            end\n        end\n    end\n    if <(Clone id) = [3]> then\n        repeat (30)\n            change y by (((40) - (y position)) * (0.1))\n            change x by (((50) - (x position)) * (0.1))\n            change size by (((120) - (size)) * (0.05))\n        end\n    end\nend\n\ndefine Set up stars\nset [clone type? v] to [2]\nset [counter v] to [0]\ngo to x: (80) y: (100)\nset [clone id v] to [0]\nset size to (40) %\nrepeat (3)\n    set x to (80)\n    change y by (-60)\n    repeat (3)\n        change [counter v] by (1)\n        if <(item (Counter) of [level stars v]) = [1]> then\n            change y by (-20)\n            change [clone id v] by (1)\n            create clone of (_myself_ v)\n            change y by (20)\n        end\n        if <(item (Counter) of [level stars v]) = [2]> then\n            change y by (-20)\n            change x by (-7)\n            change [clone id v] by (1)\n            create clone of (_myself_ v)\n            change x by (14)\n            change [clone id v] by (1)\n            create clone of (_myself_ v)\n            change x by (-7)\n            change y by (20)\n        end\n        if <(item (Counter) of [level stars v]) = [3]> then\n            change y by (-20)\n            change x by (-14)\n            change [clone id v] by (1)\n            create clone of (_myself_ v)\n            change x by (14)\n            change [clone id v] by (1)\n            create clone of (_myself_ v)\n            change x by (14)\n            change [clone id v] by (1)\n            create clone of (_myself_ v)\n            change x by (-14)\n            change y by (20)\n        end\n        if <(item (Counter) of [level stars v]) = [0]> then\n        change x by (60)\n    end\nend\n\ndefine Move1 (stars)\nset [clone id v] to [0]\nrepeat (stars)\n    change [clone id v] by (1)\n    create clone of (_myself_ v)\n    wait (1) seconds\nend\nwait (1) seconds\n\nwhen I receive [achievements page v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [play v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [menu v]\ndelete this clone\n\nwhen I receive [stars v]\nset [clone type? v] to [1]\ngo to [front v] layer\nif <(Level) = [0]> then\n    if <(Coins) > [27]> then\n        set [stars v] to [3]\n    else\n        if <(Coins) > [20]> then\n            set [stars v] to [2]\n        else\n            if <(Coins) > [13]> then\n                set [stars v] to [1]\n            else\n                set [stars v] to [0]\n            end\n        end\n    end\nelse\n    if <(Level) = [1]> then\n        if <(Coins) > [71]> then\n            set [stars v] to [3]\n        else\n            if <(Coins) > [53]> then\n                set [stars v] to [2]\n            else\n                if <(Coins) > [35]> then\n                    set [stars v] to [1]\n                else\n                    set [stars v] to [0]\n                end\n            end\n        end\n    else\n        if <(Level) = [2]> then\n            if <(Coins) > [49]> then\n                set [stars v] to [3]\n            else\n                if <(Coins) > [37]> then\n                    set [stars v] to [2]\n                else\n                    if <(Coins) > [24]> then\n                        set [stars v] to [1]\n                    else\n                        set [stars v] to [0]\n                    end\n                end\n            end\n        else\n            if <(Level) = [3]> then\n                if <(Coins) > [67]> then\n                    set [stars v] to [3]\n                else\n                    if <(Coins) > [50]> then\n                        set [stars v] to [2]\n                    else\n                        if <(Coins) > [33]> then\n                            set [stars v] to [1]\n                        else\n                            set [stars v] to [0]\n                        end\n                    end\n                end\n            else\n                if <(Level) = [4]> then\n                    if <(Coins) > [72]> then\n                        set [stars v] to [3]\n                    else\n                        if <(Coins) > [54]> then\n                            set [stars v] to [2]\n                        else\n                            if <(Coins) > [36]> then\n                                set [stars v] to [1]\n                            else\n                                set [stars v] to [0]\n                            end\n                        end\n                    end\n                else\n                    if <(Level) = [5]> then\n                        if <(Coins) > [70]> then\n                            set [stars v] to [3]\n                        else\n                            if <(Coins) > [52]> then\n                                set [stars v] to [2]\n                            else\n                                if <(Coins) > [34]> then\n                                    set [stars v] to [1]\n                                else\n                                    set [stars v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nif <(item ((Level) + (1)) of [level stars v]) < (Stars)> then\n    replace item ((Level) + (1)) of [level stars v] with (Stars)\nend\nif <(Stars) > [0]> then\n    Move1 (Stars)\nend\n\n@Sprite3\n\ndefine Set up\ndelete (all) of [achievements v]\nrepeat (10)\n    insert [0] at (1) of [achievements v] \nend\n\nwhen flag clicked\nhide\nSet up\n\nwhen I receive [menu v]\nwait (2) seconds\nwait until <(achievement?) = [no]>\nstop [other scripts in sprite v]\n\nwhen I receive [load v]\nstop [other scripts in sprite v]\ngo to x: (0) y: (70)\nhide\nset [achievement? v] to [no]\nwait (1) seconds\nforever\n    if <<(Life) < [1]> and <(item (1) of [achievements v]) = [0]>> then\n        set [achievement? v] to [yes]\n        switch costume to (1 v)\n        replace item (1) of [achievements v] with [1]\n        Show\n        set [achievement? v] to [no]\n    end\n    if <<(Stars) = [3]> and <(item (2) of [achievements v]) = [0]>> then\n        set [achievement? v] to [yes]\n        switch costume to (2 v)\n        replace item (2) of [achievements v] with [1]\n        Show\n        set [achievement? v] to [no]\n    end\nend\n\ndefine Show\nset [ghost v] effect to (0)\ngo to x: (0) y: (70)\nshow\ngo to [front v] layer\nrepeat (12)\n    change y by (((0) - (y position)) * (0.2))\n    go to [front v] layer\nend\nwait (2) seconds\nrepeat (6)\n    change y by (((70) - (y position)) * (0.3))\nend\nhide\n\nwhen I receive [easter egg found v]\nif <(item (3) of [achievements v]) = [0]> then\n    set [achievement? v] to [yes]\n    switch costume to (3 v)\n    replace item (3) of [achievements v] with [1]\n    Show\n    set [achievement? v] to [no]\nend\n\nwhen flag clicked\nset [num monsters killed? v] to [0]\n\nwhen I receive [30 monsters smashed! v]\nif <(item (4) of [achievements v]) = [0]> then\n    set [achievement? v] to [yes]\n    switch costume to (4 v)\n    replace item (4) of [achievements v] with [1]\n    Show\n    set [achievement? v] to [no]\nend\n\n@Sprite5\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nrepeat (10)\n    go to [front v] layer\n    create clone of (_myself_ v)\nend\nwait until <mouse down?>\nhide\nbroadcast (load menu v)\n\nwhen I start as a clone\ngo to [front v] layer\nswitch costume to (continue v)\nrepeat until <mouse down?>\n    set [ghost v] effect to ([abs v] of ((((timer) * (100)) mod (200)) - (100)) )\nend\ndelete this clone\n\n@Sprite4\n\nwhen I receive [menu v]\ndelete this clone\n\nwhen I start as a clone\nshow\ngo to [front v] layer\nif <(item (Clone id?) of [achievements v]) = [1]> then\n    switch costume to (join (Clone id?) [])\nelse\n    switch costume to (locked v)\nend\nif <(Clone id?) = [6]> then\n    switch costume to (back v)\n    wait until <not <mouse down?>>\n    forever\n        if <touching (mouse-pointer v)?> then\n            switch costume to (back2 v)\n            if <mouse down?> then\n                broadcast (menu v)\n                wait until <not <mouse down?>>\n            end\n        else\n            switch costume to (back v)\n        end\n    end\nend\nif <(Clone id?) = [7]> then\n    set y to (0)\n    set size to (100) %\n    switch costume to (bar v)\n    forever\n        set x to (-194)\n    end\nend\nif <(Clone id?) = [8]> then\n    set y to (0)\n    set size to (100) %\n    switch costume to (bar2 v)\n    forever\n        set x to (204)\n    end\nend\n\nwhen I receive [achievements page v]\nSet up\n\ndefine Set up\nset size to (80) %\nset [clone id? v] to [0]\ngo to x: (0) y: (150)\nswitch costume to (1.1 v)\nrepeat (6)\n    change [clone id? v] by (1)\n    create clone of (_myself_ v)\n    change y by (-60)\nend\nrepeat (2)\n    change [clone id? v] by (1)\n    create clone of (_myself_ v)\nend\ngo to x: (0) y: (0)\nswitch costume to (menu background v)\n\n@Highscores\n\ndelete all of [high scores v]\nadd [ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,./;'\[\]`-=<>?:"{}\|~!@#$%^&*\(\)_+] to [high scores v]\ndelete all of [alphebet and symbols v]\nset [num 1 v] to [0]\nrepeat (length of (High Scores))\n    change [num 1 v] by (1)\n    add (letter (num 1) of (High Scores)) to [alphebet and symbols v]\nend\n\ndefine Set High Scores\ndelete all of [high scores v]\nadd (join (letter (1) of (☁ Fastest Time for Level 1:)) (join (letter (2) of (☁ Fastest Time for Level 1:)) (join (letter (3) of (☁ Fastest Time for Level 1:)) (letter (4) of (☁ Fastest Time for Level 1:))))) to [high scores v]\nadd (join (letter (1) of (☁ Fastest Time for Level 2:)) (join (letter (2) of (☁ Fastest Time for Level 2:)) (join (letter (3) of (☁ Fastest Time for Level 2:)) (letter (4) of (☁ Fastest Time for Level 2:))))) to [high scores v]\nadd (join (letter (1) of (☁ Fastest Time for Level 3:)) (join (letter (2) of (☁ Fastest Time for Level 3:)) (join (letter (3) of (☁ Fastest Time for Level 3:)) (letter (4) of (☁ Fastest Time for Level 3:))))) to [high scores v]\nadd (join (letter (1) of (☁ Fastest Time for Level 4:)) (join (letter (2) of (☁ Fastest Time for Level 4:)) (join (letter (3) of (☁ Fastest Time for Level 4:)) (letter (4) of (☁ Fastest Time for Level 4:))))) to [high scores v]\nadd (join (letter (1) of (☁ Fastest Time for Level 5:)) (join (letter (2) of (☁ Fastest Time for Level 5:)) (join (letter (3) of (☁ Fastest Time for Level 5:)) (letter (4) of (☁ Fastest Time for Level 5:))))) to [high scores v]\nadd (join (letter (1) of (☁ Fastest Time for Level 6:)) (join (letter (2) of (☁ Fastest Time for Level 6:)) (join (letter (3) of (☁ Fastest Time for Level 6:)) (letter (4) of (☁ Fastest Time for Level 6:))))) to [high scores v]\nSet highscores with names\n\nwhen flag clicked\nunpack names\n\nif <(Level) = [3]> then\nelse\n    if <(Level) = [4]> then\n    else\n        if <(Level) = [5]> then\n        end\n    end\nend\n\nif <(letter (num 3) of (☁ People 1-3)) = [ ]> then\n    add (join (letter ((num 3) - (1)) of (☁ People 1-3)) (letter ((num 3) + (1)) of (☁ People 1-3))) to [list 1 v]\n    change [num 3 v] by (1)\nelse\nend\n\nset [☁ people 4-6 v] to (☁ People 1-3)\n\nset [☁ people 1-3 v] to [0000]\nset [☁ people 4-6 v] to [0000]\n\ndefine Set highscores with names\nadd (join (item (1) of [people 1-6 v]) (join [: ] (item (1) of [high scores v]))) to [high scores v]\nadd (join (item (2) of [people 1-6 v]) (join [: ] (item (2) of [high scores v]))) to [high scores v]\nadd (join (item (3) of [people 1-6 v]) (join [: ] (item (3) of [high scores v]))) to [high scores v]\nadd (join (item (4) of [people 1-6 v]) (join [: ] (item (4) of [high scores v]))) to [high scores v]\nadd (join (item (5) of [people 1-6 v]) (join [: ] (item (5) of [high scores v]))) to [high scores v]\nadd (join (item (6) of [people 1-6 v]) (join [: ] (item (6) of [high scores v]))) to [high scores v]\nrepeat (6)\n    delete (1) of [high scores v]\nend\n\nwhen [8 v] key pressed\n\nwhen [7 v] key pressed\nstop [all v]\n\nset [level v] to [1]\nbroadcast (set highscore person v)\nset [fake username v] to (item (pick random (1) to (6)) of [fake usernames v])\n\nset [level v] to [2]\nbroadcast (set highscore person v)\nset [fake username v] to (item (pick random (1) to (6)) of [fake usernames v])\n\nset [level v] to [0]\nbroadcast (set highscore person v)\nset [fake username v] to (item (pick random (1) to (6)) of [fake usernames v])\n\nwhen [1 v] key pressed\n\nwhen [3 v] key pressed\n\nwhen [2 v] key pressed\n\ndefine set user to highscore\ndelete all of [username encoded v]\ndelete all of [list 1 v]\nreplace item ((Level) + (1)) of [people 1-6 v] with (username)\nset [num 3 v] to [0]\nrepeat (length of (username))\n    change [num 3 v] by (1)\n    add (item (item # of (letter (num 3) of (username)) in [alphebet and symbols v]) of [alphabet and symbols encoded v]) to [username encoded v]\nend\nif <(Level) < [3]> then\n    set [num 3 v] to [0]\n    repeat (((length of (People 1-3)) + (1)) / (3))\n        change [num 3 v] by (2)\n        if <not <(letter (num 3) of (People 1-3)) = [ ]>> then\n            add (join (letter ((num 3) - (1)) of (People 1-3)) (letter (num 3) of (People 1-3))) to [list 1 v]\n        end\n        change [num 3 v] by (1)\n    end\n    if <(Level) = [0]> then\n        set [num 3 v] to [0]\n        repeat until <(item (num 3) of [list 1 v]) = [00]>\n            change [num 3 v] by (1)\n        end\n        repeat ((num 3) - (1))\n            delete (1) of [list 1 v]\n        end\n        set [num 3 v] to (length of (username))\n        repeat (length of [username encoded v])\n            insert (item (num 3) of [username encoded v]) at (1) of [list 1 v] \n            change [num 3 v] by (-1)\n        end\n    else\n        if <(Level) = [1]> then\n            set [num 3 v] to [0]\n            set [num 4 v] to [0]\n            repeat until <(item (num 3) of [list 1 v]) = [00]>\n                change [num 3 v] by (1)\n            end\n            set [num 4 v] to (num 3)\n            set [num 5 v] to [0]\n            change [num 3 v] by (1)\n            change [num 5 v] by (1)\n            repeat until <(item (num 3) of [list 1 v]) = [00]>\n                change [num 3 v] by (1)\n                change [num 5 v] by (1)\n            end\n            repeat ((num 5) - (1))\n                delete ((num 4) + (1)) of [list 1 v]\n            end\n            set [num 3 v] to (length of (username))\n            repeat (length of [username encoded v])\n                insert (item (num 3) of [username encoded v]) at ((num 4) + (1)) of [list 1 v] \n                change [num 3 v] by (-1)\n            end\n        else\n            set [num 3 v] to [0]\n            set [num 4 v] to [0]\n            repeat until <(item (num 3) of [list 1 v]) = [00]>\n                change [num 3 v] by (1)\n            end\n            set [num 5 v] to [0]\n            change [num 3 v] by (1)\n            repeat until <(item (num 3) of [list 1 v]) = [00]>\n                change [num 3 v] by (1)\n            end\n            change [num 3 v] by (1)\n            change [num 5 v] by (1)\n            set [num 4 v] to (num 3)\n            repeat until <(item (num 3) of [list 1 v]) = []>\n                change [num 3 v] by (1)\n                change [num 5 v] by (1)\n            end\n            repeat ((num 5) - (1))\n                delete (num 4) of [list 1 v]\n            end\n            set [num 3 v] to (length of (username))\n            repeat (length of [username encoded v])\n                insert (item (num 3) of [username encoded v]) at (num 4) of [list 1 v] \n                change [num 3 v] by (-1)\n            end\n        end\n    end\n    set [people 1-3 v] to (list 1)\nelse\n    if <(Level) < [6]> then\n        set [num 3 v] to [0]\n        repeat (((length of (People 4-6)) + (1)) / (3))\n            change [num 3 v] by (2)\n            if <not <(letter (num 3) of (People 4-6)) = [ ]>> then\n                add (join (letter ((num 3) - (1)) of (People 4-6)) (letter (num 3) of (People 4-6))) to [list 1 v]\n            end\n            change [num 3 v] by (1)\n        end\n        if <(Level) = [3]> then\n            set [num 3 v] to [0]\n            repeat until <(item (num 3) of [list 1 v]) = [00]>\n                change [num 3 v] by (1)\n            end\n            repeat ((num 3) - (1))\n                delete (1) of [list 1 v]\n            end\n            set [num 3 v] to (length of (username))\n            repeat (length of [username encoded v])\n                insert (item (num 3) of [username encoded v]) at (1) of [list 1 v] \n                change [num 3 v] by (-1)\n            end\n        else\n            if <(Level) = [4]> then\n                set [num 3 v] to [0]\n                set [num 4 v] to [0]\n                repeat until <(item (num 3) of [list 1 v]) = [00]>\n                    change [num 3 v] by (1)\n                end\n                set [num 4 v] to (num 3)\n                set [num 5 v] to [0]\n                change [num 3 v] by (1)\n                change [num 5 v] by (1)\n                repeat until <(item (num 3) of [list 1 v]) = [00]>\n                    change [num 3 v] by (1)\n                    change [num 5 v] by (1)\n                end\n                repeat ((num 5) - (1))\n                    delete ((num 4) + (1)) of [list 1 v]\n                end\n                set [num 3 v] to (length of (username))\n                repeat (length of [username encoded v])\n                    insert (item (num 3) of [username encoded v]) at ((num 4) + (1)) of [list 1 v] \n                    change [num 3 v] by (-1)\n                end\n            else\n                set [num 3 v] to [0]\n                set [num 4 v] to [0]\n                repeat until <(item (num 3) of [list 1 v]) = [00]>\n                    change [num 3 v] by (1)\n                end\n                set [num 5 v] to [0]\n                change [num 3 v] by (1)\n                repeat until <(item (num 3) of [list 1 v]) = [00]>\n                    change [num 3 v] by (1)\n                end\n                change [num 3 v] by (1)\n                change [num 5 v] by (1)\n                set [num 4 v] to (num 3)\n                repeat until <(item (num 3) of [list 1 v]) = []>\n                    change [num 3 v] by (1)\n                    change [num 5 v] by (1)\n                end\n                repeat ((num 5) - (1))\n                    delete (num 4) of [list 1 v]\n                end\n                set [num 3 v] to (length of (username))\n                repeat (length of [username encoded v])\n                    insert (item (num 3) of [username encoded v]) at (num 4) of [list 1 v] \n                    change [num 3 v] by (-1)\n                end\n            end\n        end\n        set [people 4-6 v] to (list 1)\n    end\nend\npack high scores\n\ndefine unpack names\nset [num 3 v] to [0]\nset [people 1-3 v] to []\nrepeat ((length of (☁ People 1-3)) / (2))\n    repeat (2)\n        change [num 3 v] by (1)\n        set [people 1-3 v] to (join (People 1-3) (letter (num 3) of (☁ People 1-3)))\n    end\n    set [people 1-3 v] to (join (People 1-3) [ ])\nend\nset [num 3 v] to [0]\nset [people 4-6 v] to []\nrepeat ((length of (☁ People 4-6)) / (2))\n    repeat (2)\n        change [num 3 v] by (1)\n        set [people 4-6 v] to (join (People 4-6) (letter (num 3) of (☁ People 4-6)))\n    end\n    set [people 4-6 v] to (join (People 4-6) [ ])\nend\ntranslate names\n\ndefine pack high scores\nset [num 3 v] to [0]\nset [people 1-3 encoded v] to []\nrepeat (length of (People 1-3))\n    change [num 3 v] by (1)\n    if <not <(letter (num 3) of (People 1-3)) = [ ]>> then\n        set [people 1-3 encoded v] to (join (People 1-3 encoded) (letter (num 3) of (People 1-3)))\n    end\nend\nset [☁ people 1-3 v] to (People 1-3 encoded)\nset [num 3 v] to [0]\nset [people 4-6 encoded v] to []\nrepeat (length of (People 4-6))\n    change [num 3 v] by (1)\n    if <not <(letter (num 3) of (People 4-6)) = [ ]>> then\n        set [people 4-6 encoded v] to (join (People 4-6 encoded) (letter (num 3) of (People 4-6)))\n    end\nend\nset [☁ people 4-6 v] to (People 4-6 encoded)\nunpack names\n\ndefine translate names\ndelete all of [people 1-6 v]\nrepeat (6)\n    add [] to [people 1-6 v]\nend\ndelete all of [list 1 v]\nset [num 3 v] to [0]\nrepeat (((length of (People 1-3)) + (1)) / (3))\n    change [num 3 v] by (2)\n    add (join (letter ((num 3) - (1)) of (People 1-3)) (letter (num 3) of (People 1-3))) to [list 1 v]\n    change [num 3 v] by (1)\nend\nset [num 3 v] to [0]\nrepeat until <(item (num 3) of [list 1 v]) = [00]>\n    change [num 3 v] by (1)\n    replace item (1) of [people 1-6 v] with (join (item (1) of [people 1-6 v]) (item (item # of (item (num 3) of [list 1 v]) in [alphabet and symbols encoded v]) of [alphebet and symbols v]))\nend\nchange [num 3 v] by (1)\nreplace item (2) of [people 1-6 v] with (join (item (2) of [people 1-6 v]) (item (item # of (item (num 3) of [list 1 v]) in [alphabet and symbols encoded v]) of [alphebet and symbols v]))\nrepeat until <(item (num 3) of [list 1 v]) = [00]>\n    change [num 3 v] by (1)\n    replace item (2) of [people 1-6 v] with (join (item (2) of [people 1-6 v]) (item (item # of (item (num 3) of [list 1 v]) in [alphabet and symbols encoded v]) of [alphebet and symbols v]))\nend\nrepeat until <(item (num 3) of [list 1 v]) = []>\n    change [num 3 v] by (1)\n    replace item (3) of [people 1-6 v] with (join (item (3) of [people 1-6 v]) (item (item # of (item (num 3) of [list 1 v]) in [alphabet and symbols encoded v]) of [alphebet and symbols v]))\nend\ndelete all of [list 1 v]\nset [num 3 v] to [0]\nrepeat (((length of (People 4-6)) + (1)) / (3))\n    change [num 3 v] by (2)\n    if <(letter (num 3) of (People 4-6)) = [ ]> then\n        add (join (letter ((num 3) - (1)) of (People 4-6)) (letter ((num 3) + (1)) of (People 4-6))) to [list 1 v]\n        change [num 3 v] by (1)\n    else\n        add (join (letter ((num 3) - (1)) of (People 4-6)) (letter (num 3) of (People 4-6))) to [list 1 v]\n    end\n    change [num 3 v] by (1)\nend\nset [num 3 v] to [0]\nrepeat until <(item (num 3) of [list 1 v]) = [00]>\n    change [num 3 v] by (1)\n    replace item (4) of [people 1-6 v] with (join (item (4) of [people 1-6 v]) (item (item # of (item (num 3) of [list 1 v]) in [alphabet and symbols encoded v]) of [alphebet and symbols v]))\nend\nchange [num 3 v] by (1)\nreplace item (5) of [people 1-6 v] with (join (item (5) of [people 1-6 v]) (item (item # of (item (num 3) of [list 1 v]) in [alphabet and symbols encoded v]) of [alphebet and symbols v]))\nrepeat until <(item (num 3) of [list 1 v]) = [00]>\n    change [num 3 v] by (1)\n    replace item (5) of [people 1-6 v] with (join (item (5) of [people 1-6 v]) (item (item # of (item (num 3) of [list 1 v]) in [alphabet and symbols encoded v]) of [alphebet and symbols v]))\nend\nrepeat until <(item (num 3) of [list 1 v]) = []>\n    change [num 3 v] by (1)\n    replace item (6) of [people 1-6 v] with (join (item (6) of [people 1-6 v]) (item (item # of (item (num 3) of [list 1 v]) in [alphabet and symbols encoded v]) of [alphebet and symbols v]))\nend\nSet High Scores\n\nwhen I receive [set highscore person v]\nunpack names 2\n\ndefine unpack names 2\nset [num 3 v] to [0]\nset [people 1-3 v] to []\nrepeat ((length of (☁ People 1-3)) / (2))\n    repeat (2)\n        change [num 3 v] by (1)\n        set [people 1-3 v] to (join (People 1-3) (letter (num 3) of (☁ People 1-3)))\n    end\n    set [people 1-3 v] to (join (People 1-3) [ ])\nend\nset [num 3 v] to [0]\nset [people 4-6 v] to []\nrepeat ((length of (☁ People 4-6)) / (2))\n    repeat (2)\n        change [num 3 v] by (1)\n        set [people 4-6 v] to (join (People 4-6) (letter (num 3) of (☁ People 4-6)))\n    end\n    set [people 4-6 v] to (join (People 4-6) [ ])\nend\nset user to highscore\n\nwhen [4 v] key pressed\n\nset [level v] to [3]\nbroadcast (set highscore person v)\nset [fake username v] to (item (pick random (1) to (6)) of [fake usernames v])\n\nwhen [5 v] key pressed\n\nset [level v] to [4]\nbroadcast (set highscore person v)\nset [fake username v] to (item (pick random (1) to (6)) of [fake usernames v])\n\nwhen [6 v] key pressed\n\nset [level v] to [5]\nbroadcast (set highscore person v)\nset [fake username v] to (item (pick random (1) to (6)) of [fake usernames v])\n\nset [☁ fastest time for level 1: v] to [0]\nset [☁ fastest time for level 2: v] to [0]\nset [☁ fastest time for level 3: v] to [0]\nset [☁ fastest time for level 4: v] to [0]\nset [☁ fastest time for level 5: v] to [0]\nset [☁ fastest time for level 6: v] to [0]\n\n