Endgame Revenge - A Platformer (Save Data)

Instructions: Sequel: "Doctor Strange - The Hidden Side," https://scratch.mit.edu/projects/382134199.\n-----------------------------------------------------------------\nUpdate Log:\nApril 1 2020: v1.5,  added level editor; now with save data which takes a few moments to load after you place in the save code (it might take longer if you create a bigger platform).\nMarch 13 2020: Full game Release.\nJuly 21 2019: Beta Game release.\n----------------------------------------------------------------\n    How to play? Scroll to the bottom.\n    One of the top 25 projects shown in the search page for "#Endgame." Use turbo-mode to see Thanos jump crazy. Some older computers may not be compatible with this game which makes it overall glitchy.\n    If you want a challenge on mobile, then use button mode. Want to know how to complete all the levels? (It's not cheating.) Level Avenger, link here: https://scratch.mit.edu/projects/324212661/. \n    Please ❤️ And ⭐️! \n> Hacked version by @coppper_1927: https://scratch.mit.edu/projects/377341522.\nDO NOT MAKE ANY UNNECESSARY REMIXES!\n----------------------------------------------------------------Every level has been tested and is possible. Please read the instructions below. Tip: when you freeze up that should mean that you are stuck in the ground, just press "R," on computer or the reset button on mobile to reposition Thanos. \n-----------------------------------------------------------------\n> Stones Overview:\n- 1) The Reality Stone. Press "1" on the computer and             point towards the desired direction to shoot. Mobile users should press the red button then press onto the desired location to shoot (may be difficult to do). Use this to defeat the Avengers on boss battles.\n- 2) The Space Stone. Press "2" on the computer then a portal will appear and it will follow the mouse until the mouse is clicked. Mobile users should press the blue button then the desired location to place a portal. Touch the portal as Thanos and it will teleport him forwards a certain amount of steps, enough to pass through walls. There is a limit (20 max) that can be placed at once; although there is no purpose for that many.\n- 3) The Time Stone. Press "3" on computer to gain 5 earth points. Press the green button on mobile to gain 5 health points. You can only do this once every 100 seconds.\n- 4) The Power Stone. Press "4" on computer or press the purple button on mobile to make a powerful fist that will block bullets and harm the Avengers.\n- 5) The Mind Stone. Press "5" on computer or press the yellow button on mobile to open the store in which you can buy upgrades with xp. Xp can be earned by Avengers coins and by conquering boss battles.\n- 6) the Soul Stone. Press "6" on computer or press the orange button on mobile to create platforms (controls on how to make these is the same to the space stone).\n-----------------------------------------------------------------\n> Controls on PC/Mac:\nPress 1-6 for each stones' power. (When you own each stone.)\nPress WASD or arrow keys to move.\nPress space to jump.\nPress X to delete portals.\nPress V for the Mad Titan's Blade. (You must claim it first before using.)\nPress R to reposition.\n-----------------------------------------------------------------\n> Controls for Mobile:\nPress arrow buttons to move. (If you choose touch mobile mode, then tap on the screen to move. Left side = move left. Right side = move right. Top top half of the screen = jump.)\nPress the up arrow to jump (If you select button mode).\nPress your selected color on the bar to use a stone.\nPress the action button to use the Mad Titan's Blade.\nPress the X button to delete portal.\nPress the R button to reposition.\n-----------------------------------------------------------------\n> This game is fully made by Whiteout12. (I made my own costume save data code. If you'd like to know how to make your own then take a look inside.)\n> Platform code by @04tmoody.\n-----------------------------------------------------------------\nMore projects here: https://scratch.mit.edu/users/Whiteout12/\n-----------------------------------------------------------------\nMusic from Avengers Battle Clicker (song really owned by Marvel), https://scratch.mit.edu/projects/306894231/\n-----------------------------------------------------------------\n#All #Marvel #Games #Platformer \n-----------------------------------------------------------------

@Stage\n\nwhen I receive [start game v]\nswitch backdrop to (mansion v)\nforever\n    if <([costume name v] of [platformer v]) = [14]> then\n        switch backdrop to (sky v)\n    end\n    if <([costume name v] of [platformer v]) = [21]> then\n        switch backdrop to (the malinio v)\n    end\n    if <([costume name v] of [platformer v]) = [29]> then\n        switch backdrop to (the city v)\n    end\nend\n\nwhen I receive [start le v]\nswitch backdrop to (le v)\n\n@Thanos\n\ndefine Move X (xv)\nchange x by (xv)\nrepeat until <not <touching color (#000000)?>>\n    set [xv v] to [0]\n    change x by (() - ((xv) / ([abs v] of (xv) )))\nend\nchange x by (() - ((xv) / ([abs v] of (xv) )))\n\ndefine Move Y (yv)\nchange y by (yv)\nrepeat until <not <touching color (#000000)?>>\n    if <(yv) < [0]> then\n        set [can jump v] to [1]\n    end\n    set [yv v] to [0]\n    change y by (() - ((yv) / ([abs v] of (yv) )))\nend\nchange y by (() - ((yv) / ([abs v] of (yv) )))\n\nwhen [r v] key pressed\ngo to x: (-200) y: (0)\nset [xv v] to [0]\nset [yv v] to [0]\n\nwhen flag clicked\nset [☁ level v] to [0]\nhide variable [☁ level v]\nforever\n    if <<(can jump) = [1]> and <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <key (space v) pressed?>>>> then\n        if <(costume [name v]) = [Flying]> then\n            set [yv v] to [20]\n        else\n            set [yv v] to [15]\n        end\n    end\n    if <(Touch) = [1]> then\n        forever\n            if <<(can jump) = [1]> and <<mouse down?> and <(mouse y) > [0]>>> then\n                if <(costume [name v]) = [Flying]> then\n                    set [yv v] to [20]\n                else\n                    set [yv v] to [15]\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n        change [xv v] by (-1)\n    end\n    if <(Touch) = [1]> then\n        forever\n            if <<mouse down?> and <(mouse x) < [0]>> then\n                change [xv v] by (-1)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n        change [xv v] by (1)\n    end\n    if <(Touch) = [1]> then\n        forever\n            if <<mouse down?> and <(mouse x) > [0]>> then\n                change [xv v] by (1)\n            end\n        end\n    end\nend\n\nwhen I receive [reposition v]\ngo to x: (-200) y: (0)\nset [xv v] to [0]\nset [yv v] to [0]\n\nwhen flag clicked\nhide variable [health v]\nset [health v] to [10]\nhide\nforever\n    go to [front v] layer\n    if <<touching color (#69e6ff)?> or <touching color (#a6f0ff)?>> then\n        change x by (150)\n    end\n    if <touching color (#ff5dde)?> then\n        change [yv v] by (20)\n    end\n    if <touching color (#2ec4ff)?> then\n        change x by (10)\n    end\n    if <touching color (#9ae6ff)?> then\n        change y by (7)\n    end\n    if <touching color (#7affb0)?> then\n        change y by (-15)\n    end\n    if <(Health) < [1]> then\n        broadcast (Game Over v)\n        show variable [☁ level v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (iron-man v)?> or <touching (plasma v)?>> then\n        wait (0.7) seconds\n        change [health v] by (-1)\n    end\n    if <touching (star-lord v)?> then\n        wait (0.7) seconds\n        change [health v] by (-1)\n    end\n    if <touching (webbing v)?> then\n        wait (1) seconds\n        change [health v] by (-1)\n    end\nend\n\nwhen I receive [next level v]\nwait (1) seconds\nif <([costume name v] of [platformer v]) = [27]> then\n    broadcast (Thanos Talk 2 v)\n    say [Yes! The place where the mind stone is.] for (3) seconds\nend\nif <([costume name v] of [platformer v]) = [28]> then\n    broadcast (Thanos Talk 3 v)\n    wait (1) seconds\n    say [The mind stone, I must get it.] for (3) seconds\nend\nif <([costume name v] of [platformer v]) = [29]> then\n    broadcast (Thanos Talk 4 v)\n    say [The last stone is here....Somewhere.] for (3) seconds\nend\n\nwhen I receive [thanos talk 1 v]\nset voice to (giant v)::tts\nspeak (join [Welcome] (join (username) [!]))::tts\nspeak [Gather the infinity stones so that I may destroy the Avengers.]::tts\n\nwhen I receive [thanos talk 2 v]\nset voice to (giant v)::tts\nspeak [Yes! The place where the mind stone is.]::tts\n\nwhen I receive [thanos talk 3 v]\nset voice to (giant v)::tts\nspeak [The mind stone, I must get it]::tts\n\nwhen I receive [thanos talk 4 v]\nset voice to (giant v)::tts\nspeak [The last stone is here......somewhere.]::tts\n\nwhen I receive [super jump v]\nif <(costume [name v]) = [Still]> then\n    switch costume to (flying v)\n    set [animation ability v] to [1]\nelse\n    switch costume to (still v)\n    set [animation ability v] to [0]\nend\n\nwhen I receive [x out v]\nhide\n\nwhen I receive [change size v]\nwait (0.3) seconds\nif <(costume [name v]) = [Still]> then\n    switch costume to (sneak v)\n    set [animation ability v] to [1]\nelse\n    switch costume to (still v)\n    set [animation ability v] to [0]\nend\n\ndefine Animate Right\nrepeat until <not <<<(Touch) = [1]> and <<mouse down?> and <(mouse x) > [0]>>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>>>\n    wait (0.2) seconds\n    switch costume to (walk right 1 v)\n    wait (0.2) seconds\n    switch costume to (walk right 2 v)\nend\n\ndefine Animate Left\nrepeat until <not <<<(Touch) = [1]> and <<mouse down?> and <(mouse x) < [0]>>> or <<key (a v) pressed?> or <key (left arrow v) pressed?>>>>\n    wait (0.2) seconds\n    switch costume to (walk left 1 v)\n    wait (0.2) seconds\n    switch costume to (walk left 2 v)\nend\n\nwhen flag clicked\nset [animation ability v] to [0]\nforever\n    if <(Animation Ability) = [0]> then\n        if <<<(Touch) = [1]> and <<mouse down?> and <(mouse x) > [0]>>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>> then\n            Animate Right\n        else\n            switch costume to (still v)\n        end\n        if <<<(Touch) = [1]> and <<mouse down?> and <(mouse x) < [0]>>> or <<key (a v) pressed?> or <key (left arrow v) pressed?>>> then\n            Animate Left\n        else\n            switch costume to (still v)\n        end\n    end\nend\n\nwhen I receive [play le v]\nbroadcast (Reposition v)\nshow\nset [xv v] to [0]\nset [yv v] to [0]\nset [le playing ability v] to [1]\nrepeat until <(LE Playing Ability) = [0]>\n    set [xv v] to ((xv) * (0.9))\n    Move X (round (xv))\n    change [yv v] by (-1)\n    set [can jump v] to [0]\n    Move Y (yv)\n    if <<[-190] > (y position)> or <touching color (#ff8600)?>> then\n        repeat (10)\n            change [ghost v] effect by (10)\n            change [whirl v] effect by (10)\n        end\n        go to x: (-200) y: (0)\n        set [xv v] to [0]\n        set [yv v] to [0]\n        repeat (10)\n            change [ghost v] effect by (-10)\n            change [whirl v] effect by (-10)\n        end\n    end\n    if <color (#b18abe) is touching (#000000)?> then\n        go to x: (-200) y: (0)\n        set [xv v] to [0]\n        set [yv v] to [0]\n    end\n    if <touching color (#a077f5)?> then\n        play sound [Teleport v] until done\n        broadcast (Stop LE v)\n        repeat (10)\n            change [ghost v] effect by (10)\n            change [color v] effect by (10)\n        end\n        go to x: (-200) y: (0)\n        set [xv v] to [0]\n        set [yv v] to [0]\n        repeat (10)\n            change [ghost v] effect by (-10)\n            change [color v] effect by (-10)\n        end\n    end\nend\nstop [this script v]\n\nwhen I receive [stop le v]\nset [le playing ability v] to [0]\nbroadcast (Reposition v)\nhide\n\nwhen I receive [start game v]\nset [whirl v] effect to (0)\nset [ghost v] effect to (0)\ngo to [back v] layer\nset [☁ level v] to [1]\npoint in direction (90)\nset rotation style [all around v]\nswitch costume to (still v)\nset size to (13) %\nshow\ngo to x: (-200) y: (0)\nbroadcast (Thanos Talk 1 v)\nsay (join (join [Welcome ] (username)) [!]) for (2) seconds\nsay [Gather the stones so that I may destroy the Avengers.] for (4) seconds\nshow variable [health v]\nset [health v] to [10]\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    set [xv v] to ((xv) * (0.9))\n    Move X (round (xv))\n    change [yv v] by (-1)\n    set [can jump v] to [0]\n    Move Y (yv)\n    if <<[-190] > (y position)> or <touching color (#ff8600)?>> then\n        repeat (10)\n            change [ghost v] effect by (10)\n            change [whirl v] effect by (10)\n        end\n        go to x: (-200) y: (0)\n        set [xv v] to [0]\n        set [yv v] to [0]\n        repeat (10)\n            change [ghost v] effect by (-10)\n            change [whirl v] effect by (-10)\n        end\n    end\n    if <color (#b18abe) is touching (#000000)?> then\n        go to x: (-200) y: (0)\n        set [xv v] to [0]\n        set [yv v] to [0]\n    end\n    if <touching color (#2efff0)?> then\n        play sound [Teleport v] until done\n        change [☁ level v] by (1)\n        broadcast (Next Level v)\n        repeat (10)\n            change [ghost v] effect by (10)\n            change [color v] effect by (10)\n        end\n        go to x: (-200) y: (0)\n        set [xv v] to [0]\n        set [yv v] to [0]\n        repeat (10)\n            change [ghost v] effect by (-10)\n            change [color v] effect by (-10)\n        end\n        erase all\n    end\nend\n\n@Title\n\nwhen flag clicked\ngo to [front v] layer\nswitch costume to (logo v)\nset size to (113) %\nshow\nset [ghost v] effect to (10)\ngo to x: (-24) y: (4)\nset [color v] effect to (0)\nrepeat (35)\n    change [color v] effect by (5)\nend\nrepeat (35)\n    change [color v] effect by (-5)\nend\nset [ghost v] effect to (0)\n\nwhen I receive [start v]\nset [ghost v] effect to (50)\nswitch costume to (modes v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [end v]\ngo to x: (-4) y: (9)\nshow\nset size to (105) %\nswitch costume to (end v)\nhide variable [xp v]\nwait (2) seconds\nstop [all v]\n\nwhen I receive [game over v]\nset [ghost v] effect to (0)\nshow\nswitch costume to (death v)\ngo to [front v] layer\nhide variable [iron man v]\nhide variable [health v]\n\nwhen I receive [mobile choice v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nswitch costume to (mobile options v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [start game v]\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nswitch costume to (failer v)\nset [ghost v] effect to (100)\nforever\n    if <(Health) < [1]> then\n        switch costume to (death v)\n        broadcast (X out v)\n        hide variable [heal time v]\n        hide variable [health v]\n        hide variable [xp v]\n    end\n    set drag mode [not draggable v]\n    if <([costume name v] of [platformer v]) = [End]> then\n        switch costume to (logo v)\n    end\nend\n\nwhen I receive [start le v]\nset [ghost v] effect to (0)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Start\n\nwhen flag clicked\ngo to x: (-150) y: (-125)\nhide\nset size to (75) %\nwait (2) seconds\ncreate clone of (_myself_ v)\ngo to [front v] layer\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nforever\n    if <([costume name v] of [title v]) = [Logo]> then\n        if <touching (mouse-pointer v)?> then\n            switch costume to (2 v)\n        else\n            switch costume to (1 v)\n        end\n    end\nend\n\nwhen this sprite clicked\nplay drum (11 v) for (0.25) beats\nif <(costume [name v]) = [2]> then\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    broadcast (Start v)\n    hide\nend\n\nwhen I start as a clone\nswitch costume to (1a v)\ngo to [front v] layer\nshow\ngo to x: (5) y: (-125)\nforever\n    if <([costume name v] of [title v]) = [Logo]> then\n        if <touching (mouse-pointer v)?> then\n            switch costume to (1b v)\n        else\n            switch costume to (1a v)\n        end\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            play drum (11 v) for (0.25) beats\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            broadcast (Start LE v)\n            hide\n            delete this clone\n        end\n    end\n    if <([costume name v] of [title v]) = [Modes]> then\n        hide\n        delete this clone\n    end\nend\n\nwhen I receive [start le v]\nhide\n\n@Mobile\n\nwhen flag clicked\nswitch costume to (1 v)\ngo to x: (-32) y: (-48)\nhide\nforever\n    if <([costume name v] of [title v]) = [Modes]> then\n        if <touching (mouse-pointer v)?> then\n            switch costume to (2 v)\n        else\n            switch costume to (1 v)\n        end\n    end\n    if <([costume name v] of [title v]) = [Mobile Options]> then\n        if <touching (mouse-pointer v)?> then\n            switch costume to (4 v)\n        else\n            switch costume to (3 v)\n        end\n    end\nend\n\nwhen I receive [start v]\nwait (0.5) seconds\ngo to [front v] layer\nshow\n\nwhen this sprite clicked\nif <(costume [name v]) = [2]> then\n    play drum (11 v) for (0.25) beats\n    broadcast (Mobile Choice v)\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    switch costume to (3 v)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    stop [this script v]\nend\nif <(costume [name v]) = [4]> then\n    play drum (11 v) for (0.25) beats\n    broadcast (Start Game v)\n    broadcast (Mobile Mode v)\nend\n\nwhen I receive [start game v]\nhide\n\n@Keyboard\n\nwhen flag clicked\nset [touch v] to [0]\nswitch costume to (1 v)\ngo to x: (170) y: (-73)\nhide\nforever\n    if <([costume name v] of [title v]) = [Modes]> then\n        if <touching (mouse-pointer v)?> then\n            switch costume to (2 v)\n        else\n            switch costume to (1 v)\n        end\n    end\n    if <([costume name v] of [title v]) = [Mobile Options]> then\n        if <touching (mouse-pointer v)?> then\n            switch costume to (4 v)\n        else\n            switch costume to (3 v)\n        end\n    end\nend\n\nwhen I receive [start v]\nwait (0.5) seconds\ngo to [front v] layer\nshow\n\nwhen this sprite clicked\nif <(costume [name v]) = [2]> then\n    play drum (11 v) for (0.25) beats\n    broadcast (Start Game v)\nend\nif <(costume [number v]) = [4]> then\n    play drum (11 v) for (0.25) beats\n    broadcast (Start Game v)\n    broadcast (Show Stones v)\n    broadcast (Add the tools v)\n    set [touch v] to [1]\nend\n\nwhen I receive [start game v]\nhide\n\nwhen I receive [mobile choice v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nswitch costume to (3 v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\n@Bar\n\nwhen flag clicked\nswitch costume to (0 v)\nhide\n\nwhen I receive [mobile mode v]\nshow\n\nwhen I receive [add stone v]\nnext costume\n\nwhen I receive [show stones v]\nshow\n\nwhen I receive [x out v]\nhide\n\n@Platformer\n\nwhen I receive [next level v]\nnext costume\n\nwhen I receive [start game v]\nshow\nswitch costume to (1 v)\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\nswitch costume to (0 v)\ngo to [back v] layer\n\nwhen I receive [start le v]\nhide\n\n@Pointer\n\nwhen flag clicked\nhide\nforever\n    go to (mouse-pointer v)\nend\n\nwhen I receive [start game v]\nforever\n    if <mouse down?> then\n        if <touching color (#ff2e2e)?> then\n            wait (0.15) seconds\n            wait until <mouse down?>\n            broadcast (Reality Mist v)\n        end\n        if <touching color (#2e92ff)?> then\n            broadcast (Space Portal v)\n        end\n        if <touching color (#28dd70)?> then\n            if <(Heal Time) = [100]> then\n                set [heal time v] to [0]\n                change [health v] by (5)\n            end\n        end\n        if <touching color (#9c28de)?> then\n            broadcast (Power Shield v)\n        end\n        if <touching color (#fcf203)?> then\n            broadcast (Level Store v)\n        end\n        if <touching color (#fca203)?> then\n            broadcast (Soul Burst v)\n        end\n        if <<touching color (#7e7e7e)?> or <touching color (#2b2b2b)?>> then\n            broadcast (Exit Store v)\n        end\n        if <<touching color (#ff9e9e)?> or <touching color (#c80000)?>> then\n            if <(XP) > [0]> then\n                wait (0.3) seconds\n                change [xp v] by (-1)\n                broadcast (Store Buy Chair v)\n                broadcast (New Item v)\n            end\n        end\n        if <<touching color (#678da7)?> or <touching color (#9ed8ff)?>> then\n            if <(XP) > [1]> then\n                wait (0.3) seconds\n                change [xp v] by (-2)\n                broadcast (Store Buy Sneak v)\n                broadcast (New Item v)\n            end\n        end\n        if <<touching color (#ffe49e)?> or <touching color (#c0ab77)?>> then\n            if <(XP) > [1]> then\n                wait (0.3) seconds\n                set [mist speed v] to [1]\n                change [xp v] by (-2)\n                broadcast (New Item v)\n            end\n        end\n    end\nend\n\n@Jump\n\nwhen flag clicked\nhide\n\nwhen I receive [mobile mode v]\ngo to x: (128) y: (-104)\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\n    if <touching (mouse-pointer v)?> then\n        if <mouse down?> then\n            set [yv v] to [15]\n            wait (1) seconds\n        end\n    end\nend\n\nwhen I receive [x out v]\nhide\n\n@Left\n\nwhen flag clicked\nhide\n\nwhen I receive [mobile mode v]\ngo to x: (-238) y: (-105)\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\n    if <touching (mouse-pointer v)?> then\n        if <mouse down?> then\n            change [xv v] by (-1)\n        end\n    end\nend\n\nwhen I receive [x out v]\nhide\n\n@Right\n\nwhen flag clicked\nhide\n\nwhen I receive [mobile mode v]\ngo to x: (-175) y: (-105)\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\n    if <touching (mouse-pointer v)?> then\n        if <mouse down?> then\n            change [xv v] by (1)\n        end\n    end\nend\n\nwhen I receive [x out v]\nhide\n\n@Reposition\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nbroadcast (Reposition v)\n\nwhen I receive [mobile mode v]\ngo to x: (135) y: (-123)\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [add the tools v]\ngo to x: (-169) y: (-140)\nshow\n\nwhen I receive [x out v]\nhide\n\n@Sound\n\nwhen this sprite clicked\nwait (0.4) seconds\nif <(costume [name v]) = [1]> then\n    switch costume to (2 v)\nelse\n    switch costume to (1 v)\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [1]> then\n        set volume to (50) %\n    end\n    if <(costume [name v]) = [2]> then\n        set volume to (0) %\n    end\nend\n\nwhen flag clicked\nhide\nswitch costume to (1 v)\nset [ghost v] effect to (40)\ngo to x: (220) y: (-160)\nforever\n    play sound [AVENGERS ENDGAME \(Trap Remix\) v] until done\n    play sound [Music v] until done\nend\n\nwhen I receive [start game v]\nshow\n\nwhen I receive [x out v]\nhide\n\n@Deleter\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nbroadcast (Delete Portal v)\n\nwhen I receive [mobile mode v]\ngo to x: (82) y: (-123)\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [add the tools v]\ngo to x: (-115) y: (-140)\nshow\n\nwhen I receive [x out v]\nhide\n\n@Blade Button\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nbroadcast (MAD TITAN v)\n\nwhen I receive [show titan button v]\nshow\ngo to x: (257) y: (-83)\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [x out v]\nhide\n\n@Boost\n\nwhen flag clicked\nhide\n\nwhen I receive [store buy chair v]\ngo to x: (214) y: (-32)\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen this sprite clicked\nbroadcast (Super Jump v)\n\nwhen I receive [x out v]\nhide\n\n@Sneak\n\nwhen flag clicked\nhide\n\nwhen I receive [store buy sneak v]\nshow\ngo to x: (214) y: (23)\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (2 v)\n    else\n        switch costume to (1 v)\n    end\nend\n\nwhen this sprite clicked\nbroadcast (Change Size v)\n\nwhen I receive [x out v]\nhide\n\n@Remote\n\nwhen flag clicked\nhide\n\nwhen I receive [mobile mode v]\nshow\n\nwhen I receive [x out v]\nhide\n\n@Iron-Man\n\nwhen I receive [next level v]\nwait (1) seconds\nif <([costume name v] of [platformer v]) = [10]> then\n    show variable [iron man v]\n    show\nelse\n    hide variable [iron man v]\n    hide\nend\n\nwhen flag clicked\nhide variable [iron man v]\nforever\n    if <([costume name v] of [platformer v]) = [10]> then\n        repeat until <(Iron Man) < [1]>\n            wait (1) seconds\n            change [iron man v] by (-1)\n        end\n        change [xp v] by (1)\n        hide variable [iron man v]\n        broadcast (Thanos Talk Iron Man 1 v)\n        switch costume to (2 v)\n        say [Oh no! My batteries ran out.] for (3) seconds\n        hide\n        broadcast (Next Level v)\n        broadcast (Reposition v)\n    end\nend\n\nwhen I receive [start game v]\nswitch costume to (1 v)\ngo to x: (43) y: (21)\nset size to (13) %\nhide\nset [iron man v] to [50]\n\nwhen flag clicked\nforever\n    if <touching (mist v)?> then\n        wait (0.4) seconds\n        change [iron man v] by (-1)\n    end\nend\n\nwhen flag clicked\nforever\n    if <([costume name v] of [platformer v]) = [10]> then\n        set rotation style [left-right v]\n        point towards (thanos v)\n        move (1) steps\n    end\nend\n\nwhen I receive [start game v]\nset pen size to (25)\nset pen color to (#45f3e1)\nforever\n    if <([costume name v] of [platformer v]) = [10]> then\n        pen down\n        wait (1) seconds\n        erase all\n    else\n        erase all\n    end\nend\n\nwhen I receive [thanos talk iron man 1 v]\nset voice to (tenor v)::tts\nspeak [Oh no! My batteries ran out.]::tts\n\n@Malinio\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\nset [malinio v] to [10]\nhide\n\nwhen I receive [next level v]\nwait (1) seconds\nif <([costume name v] of [platformer v]) = [20]> then\n    show variable [malinio v]\n    show\nelse\n    hide variable [malinio v]\n    hide\nend\n\nwhen flag clicked\nforever\n    if <([costume name v] of [platformer v]) = [20]> then\n        set rotation style [left-right v]\n        point towards (thanos v)\n        move (1) steps\n    end\nend\n\nwhen flag clicked\nhide variable [malinio v]\nforever\n    if <(Malinio) < [1]> then\n        hide variable [malinio v]\n        repeat until <(y position) < [175]>\n            change y by (-2)\n        end\n        switch costume to (costume2 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (mist v)?> then\n        wait (0.4) seconds\n        change [malinio v] by (-1)\n    end\nend\n\n@Star-Lord\n\nwhen flag clicked\nset [star-lord v] to [10]\nhide variable [star-lord v]\nhide\nset size to (35) %\ngo to x: (3) y: (95)\nforever\n    if <([costume name v] of [platformer v]) = [27]> then\n        show variable [star-lord v]\n        set [star-lord v] to [50]\n        show\n        switch costume to (1 v)\n        go to x: (0) y: (0)\n        wait (1) seconds\n        set rotation style [left-right v]\n        forever\n            point towards (thanos v)\n            move (1) steps\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#000000)?> then\n        change y by (2)\n    end\n    if <not <touching color (#000000)?>> then\n        change y by (-2)\n    end\n    if <touching (mist v)?> then\n        change [star-lord v] by (-1)\n    end\n    if <touching (the mad titan's blade v)?> then\n        wait (0.5) seconds\n        change [star-lord v] by (-1)\n    end\n    if <touching (mist v)?> then\n        wait (0.6) seconds\n        change [star-lord v] by (-1)\n    end\n    if <touching (power force v)?> then\n        wait (0.5) seconds\n        change [star-lord v] by (-1)\n    end\n    if <(Star-Lord) < [1]> then\n        hide variable [star-lord v]\n        broadcast (Thanos Talk Star-Lord 1 v)\n        say [Whatever you do... Don't scratch the Malinio! I'll get even with you! Here's the stone.] for (4) seconds\n        hide\n        broadcast (Next Level v)\n        broadcast (Reposition v)\n        broadcast (Show Mind Stone v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [thanos talk star-lord 1 v]\nset voice to (tenor v)::tts\nspeak [Whatever you do.... Don't scratch the Malinio! I'll get even with you! Here's the stone.]::tts\n\nwhen flag clicked\nforever\n    if <([costume name v] of [platformer v]) = [27]> then\n        show variable [star-lord v]\n        show\n    else\n        hide variable [star-lord v]\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <([costume name v] of [platformer v]) = [27]> then\n        wait (10) seconds\n        next costume\n    end\nend\n\n@Spider-Man\n\nwhen flag clicked\ngo to [front v] layer\nhide\nhide variable [spider-man v]\nset [spider-man v] to [10]\nset size to (50) %\ngo to x: (7) y: (75)\nforever\n    if <([costume name v] of [platformer v]) = [33]> then\n        set [spider-man v] to [40]\n        show variable [spider-man v]\n        set rotation style [left-right v]\n        go to x: (7) y: (75)\n        show\n        set [spider position v] to [0]\n        forever\n            set [spider position v] to (pick random (1) to (3))\n            if <(Spider Position) = [1]> then\n                wait (15) seconds\n                glide (1) secs to x: (-115) y: (75)\n            end\n            if <(Spider Position) = [2]> then\n                wait (15) seconds\n                glide (1) secs to x: (7) y: (75)\n            end\n            if <(Spider Position) = [3]> then\n                wait (15) seconds\n                glide (1) secs to x: (115) y: (75)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <([costume name v] of [platformer v]) = [33]> then\n        show variable [spider-man v]\n        show\n    else\n        hide variable [spider-man v]\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (mist v)?> or <<touching (the mad titan's blade v)?> or <touching (power force v)?>>> then\n        wait (0.75) seconds\n        change [spider-man v] by (-1)\n    end\n    if <(Spider-Man) < [1]> then\n        hide variable [spider-man v]\n        broadcast (Thanos Talk Spider-Man 1 v)\n        say [Aww, I was beginning to enjoy this.] for (3) seconds\n        hide\n        broadcast (Hide Webbing v)\n        broadcast (Next Level v)\n        broadcast (Reposition v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [thanos talk spider-man 1 v]\nset voice to (tenor v)::tts\nspeak [Aww, I was beginning to enjoy this.]::tts\n\n@The Mad Titan's Blade\n\nwhen flag clicked\nhide\nwait until <([costume name v] of [platformer v]) = [25]>\ngo to x: (128) y: (95)\npoint in direction (90)\nshow\nwait until <touching (thanos v)?>\nsay [You have the Mad Titan's Blade. Press the action button or v to use.] for (4) seconds\nbroadcast (Next Level v)\nbroadcast (Show Titan Button v)\nbroadcast (Reposition v)\nhide\nforever\n    go to (thanos v)\n    if <key (v v) pressed?> then\n        broadcast (MAD TITAN v)\n    end\nend\n\nwhen I receive [mad titan v]\ngo to [front v] layer\nshow\npoint in direction (105)\nrepeat (3)\n    turn right (15) degrees\nend\npoint in direction (180)\ngo to [back v] layer\nhide\n\n@Reality Stone\n\nwhen flag clicked\nhide\ngo to x: (96) y: (120)\nforever\n    if <([costume name v] of [platformer v]) = [5]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [start game v]\nforever\n    if <touching (thanos v)?> then\n        if <([costume name v] of [platformer v]) = [5]> then\n            say [The reality stone is MINE! Press one to use reality mist. Use the pointer for direction. On mobile, touch thé red on the infinity stones bar then drag for location.] for (6) seconds\n            hide\n            broadcast (Add Stone v)\n            broadcast (Next Level v)\n            broadcast (Reposition v)\n            forever\n                if <key (1 v) pressed?> then\n                    wait (0.3) seconds\n                    broadcast (Reality Mist v)\n                end\n            end\n        end\n    end\nend\n\n@Space Stone\n\nwhen flag clicked\nhide\ngo to x: (-175) y: (28)\n\nwhen I receive [next level v]\nwait (1) seconds\nif <([costume name v] of [platformer v]) = [6]> then\n    show\nelse\n    hide\nend\n\nwhen I receive [start game v]\nforever\n    if <touching (thanos v)?> then\n        if <([costume name v] of [platformer v]) = [6]> then\n            say [The space stone is mine. Press 2 to use it. Use your pointer to drag it anywhere, then press C or hold down your pointer to create. On mobile press the infinity stones box then drag to place.] for (6) seconds\n            hide\n            broadcast (Add Stone v)\n            forever\n                if <key (2 v) pressed?> then\n                    broadcast (Space Portal v)\n                end\n            end\n        end\n    end\nend\n\n@Time Stone\n\nwhen flag clicked\nhide\ngo to x: (220) y: (60)\nhide variable [heal time v]\nset [heal time v] to [100]\nforever\n    if <([costume name v] of [platformer v]) = [15]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Heal Time) < [100]> then\n        repeat until <(Heal Time) = [100]>\n            wait (1) seconds\n            change [heal time v] by (1)\n        end\n    end\nend\n\nwhen I receive [start game v]\nforever\n    if <touching (thanos v)?> then\n        if <([costume name v] of [platformer v]) = [15]> then\n            say [I have got the time stone. Press 3 to use healing. \(you have to wait before using again.\)] for (4) seconds\n            hide\n            broadcast (Add Stone v)\n            broadcast (Next Level v)\n            broadcast (Reposition v)\n            show variable [heal time v]\n            forever\n                if <key (3 v) pressed?> then\n                    if <(Heal Time) = [100]> then\n                        set [heal time v] to [0]\n                        change [health v] by (5)\n                    end\n                end\n            end\n        end\n    end\nend\n\n@Power Stone\n\nwhen flag clicked\nhide\ngo to x: (-99) y: (127)\nforever\n    if <([costume name v] of [platformer v]) = [18]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [start game v]\nforever\n    if <touching (thanos v)?> then\n        if <([costume name v] of [platformer v]) = [18]> then\n            say [The power stone is in my hands. Press 4 to use a short protective shield.] for (4) seconds\n            hide\n            broadcast (Add Stone v)\n            broadcast (Next Level v)\n            broadcast (Reposition v)\n            forever\n                if <key (4 v) pressed?> then\n                    broadcast (Power Shield v)\n                end\n            end\n        end\n    end\nend\n\n@Mind Stone\n\nwhen I receive [show mind stone v]\nshow\ngo to x: (215) y: (-23)\n\nwhen flag clicked\nset size to (50) %\nhide\n\nwhen I receive [start game v]\nforever\n    if <touching (thanos v)?> then\n        if <([costume name v] of [platformer v]) = [28]> then\n            say [Press 5 or the Infinity Stones box to use. This will lead you to your upgrade hall.] for (5) seconds\n            hide\n            broadcast (Add Stone v)\n            broadcast (Next Level v)\n            broadcast (Reposition v)\n            forever\n                if <key (5 v) pressed?> then\n                    broadcast (Level Store v)\n                end\n            end\n        end\n    end\nend\n\n@Soul Stone\n\nwhen flag clicked\nhide\ngo to x: (17) y: (-13)\nforever\n    if <<([costume name v] of [platformer v]) = [33]> or <([costume name v] of [platformer v]) = [34]>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [start game v]\nforever\n    if <touching (thanos v)?> then\n        if <([costume name v] of [platformer v]) = [34]> then\n            say [the soul stone is mine! Press 2 or the orange button on mobile to use.] for (4) seconds\n            hide\n            broadcast (Add Stone v)\n            broadcast (Next Level v)\n            broadcast (Reposition v)\n            forever\n                if <key (6 v) pressed?> then\n                    broadcast (Soul Burst v)\n                end\n            end\n        end\n    end\nend\n\n@Mist\n\nwhen flag clicked\nset [mist speed v] to [0]\nhide\nforever\n    wait (2) seconds\n    hide\n    delete this clone\nend\n\nwhen I receive [reality mist v]\nwait (0.5) seconds\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nwait (0.1) seconds\ngo to (thanos v)\nshow\npoint towards (mouse-pointer v)\nif <(Mist Speed) = [0]> then\n    switch costume to (1 v)\nend\nif <(Mist Speed) = [1]> then\n    switch costume to (2 v)\nend\nrepeat until <touching (_edge_ v)?>\n    if <(Mist Speed) = [0]> then\n        move (8) steps\n    end\n    if <(Mist Speed) = [1]> then\n        move (13) steps\n    end\nend\nhide\ndelete this clone\n\n@Portal\n\nwhen flag clicked\nhide\n\nwhen I receive [space portal v]\nwait (1) seconds\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\npoint in direction (90)\nrepeat until <<mouse down?> or <key (c v) pressed?>>\n    go to (mouse-pointer v)\nend\n\nwhen this sprite clicked\nstop [other scripts in sprite v]\n\nwhen [x v] key pressed\ndelete this clone\n\nwhen I receive [next level v]\nhide\ndelete this clone\n\nwhen I receive [delete portal v]\ndelete this clone\n\n@Power Force\n\nwhen I receive [power shield v]\nshow\nwait (0.5) seconds\nhide\n\nwhen flag clicked\nset size to (90) %\nhide\nforever\n    go to (thanos v)\n    if <touching (plasma v)?> then\n        broadcast (Block v)\n        if <touching (malinio v)?> then\n            change [malinio v] by (-1)\n        end\n    end\nend\n\n@Plasma\n\nwhen flag clicked\ngo to x: (19) y: (6)\nhide\nforever\n    if <<([costume name v] of [platformer v]) = [19]> or <([costume name v] of [platformer v]) = [20]>> then\n        wait (5) seconds\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nshow\nif <([costume name v] of [platformer v]) = [20]> then\n    go to (malinio v)\nend\nif <([costume name v] of [platformer v]) = [27]> then\n    go to (star-lord v)\nend\npoint towards (thanos v)\nrepeat until <touching (_edge_ v)?>\n    move (2) steps\nend\nhide\ndelete this clone\n\nwhen flag clicked\nforever\n    if <touching (power force v)?> then\n        delete this clone\n    end\nend\n\nwhen I receive [block v]\nhide\ndelete this clone\n\n@Store\n\nwhen flag clicked\nhide variable [xp v]\nset [xp v] to [0]\nswitch costume to (1 v)\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [level store v]\nbroadcast (Reposition v)\ngo to [front v] layer\nshow\n\nwhen I receive [exit store v]\ngo to [back v] layer\nhide\n\nwhen I receive [new item v]\nwait (0.5) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nnext costume\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [start game v]\nshow variable [xp v]\n\n@Soul Floor\n\nwhen flag clicked\nhide\n\nwhen I receive [delete portal v]\ndelete this clone\n\nwhen I receive [next level v]\nhide\ndelete this clone\n\nwhen [x v] key pressed\ndelete this clone\n\nwhen this sprite clicked\nstop [other scripts in sprite v]\n\nwhen I receive [soul burst v]\nwait (1) seconds\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nswitch costume to (1 v)\nshow\nrepeat until <<mouse down?> or <key (c v) pressed?>>\n    go to (mouse-pointer v)\nend\nswitch costume to (2 v)\n\n@Webbing\n\nwhen flag clicked\nhide\nforever\n    if <<([costume name v] of [platformer v]) = [33]> and <(Spider-Man) > [1]>> then\n        go to [front v] layer\n        set size to (100) %\n        show\n        wait (3) seconds\n        repeat (10000)\n            change size by (2)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    go to (spider-man v)\nend\n\nwhen I receive [hide webbing v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [start game v]\nset size to (100) %\nhide\ngo to x: (0) y: (0)\nforever\n    wait (7.5) seconds\n    set size to (100) %\nend\n\n@Coin\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\nset [ghost v] effect to (0)\nhide\nwait (1) seconds\nif <<([costume name v] of [platformer v]) = [26]> or <([costume name v] of [platformer v]) = [29]>> then\n    show\n    if <([costume name v] of [platformer v]) = [26]> then\n        go to x: (-186) y: (150)\n    end\n    if <([costume name v] of [platformer v]) = [29]> then\n        go to x: (205) y: (-20)\n    end\n    repeat until <<touching (thanos v)?> or <touching color (#b18abe)?>>\n        repeat (10)\n            change y by (-2)\n        end\n        repeat (10)\n            change y by (2)\n        end\n    end\n    change [xp v] by (2)\n    repeat (25)\n        change [ghost v] effect by (4)\n    end\n    hide\nelse\n    hide\nend\n\n@Full Power\n\nwhen flag clicked\nhide\n\nwhen I receive [start game v]\nset [ghost v] effect to (40)\nset size to (100) %\nforever\n    if <([costume name v] of [platformer v]) = [35]> then\n        forever\n            show\n            go to (thanos v)\n            turn right (2) degrees\n        end\n    else\n        hide\n    end\nend\n\n@The SNAP\n\nwhen flag clicked\ngo to x: (-16) y: (3)\nset [ghost v] effect to (0)\nhide\nforever\n    if <([costume name v] of [platformer v]) = [End]> then\n        show\n    end\n    if <touching (mouse-pointer v)?> then\n        switch costume to (2 v)\n    else\n        switch costume to (1 v)\n    end\nend\n\nwhen this sprite clicked\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nbroadcast (SNAP! v)\nhide\n\n@End Sign\n\nwhen flag clicked\nset [ghost v] effect to (0)\ngo to x: (1) y: (-8)\nhide\n\nwhen I receive [snap! v]\nswitch costume to (1 v)\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nwait (1) seconds\nswitch costume to (2 v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (3) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Tiles (LE)\n\ndefine Snap To Grid\nset x to ((round ((x position) / (48))) * (48))\nset y to ((round ((y position) / (48))) * (48))\n\nwhen [right arrow v] key pressed\nnext costume\n\nwhen [left arrow v] key pressed\nswitch costume to ((costume [number v]) - (1))\n\nwhen this sprite clicked\nstamp\nadd (costume [number v]) to [placed block costume value v]\nadd (x position) to [placed block x values v]\nadd (y position) to [placed block y values v]\n\nwhen flag clicked\nshow list [load data 2 v]\nshow list [load data 1 v]\nshow list [save data 2 v]\nshow list [save data v]\nshow list [placed block costume value v]\nshow list [placed block x values v]\nshow list [placed block y values v]\ndelete all of [placed block costume value v]\ndelete all of [placed block x values v]\ndelete all of [placed block y values v]\ndelete all of [placed block costume value v]\ndelete all of [placed block x values v]\ndelete all of [placed block y values v]\nerase all\nhide\n\nwhen I receive [start le v]\nset [le playing ability v] to [0]\nset [follow pointer \(le\) ability v] to [0]\nswitch costume to (1 v)\ngo to [front v] layer\nshow\nforever\n    if <(Follow Pointer \(LE\) Ability) = [0]> then\n        go to (mouse-pointer v)\n    end\n    Snap To Grid\n    if <(LE Playing Ability) = [0]> then\n        if <(y position) > [100]> then\n            hide\n        else\n            show\n        end\n    end\nend\n\nwhen I receive [play le v]\nhide\n\nwhen I receive [stop le v]\nset [le playing ability v] to [0]\nswitch costume to (1 v)\nshow\n\nwhen I receive [load data v]\nshow\ndelete all of [placed block costume value v]\ndelete all of [placed block x values v]\ndelete all of [placed block y values v]\nerase all\nset [follow pointer \(le\) ability v] to [1]\ngo to x: (0) y: (0)\nset [block number v] to (length of [load data 1 v])\nrepeat until <(Block Number) = [0]>\n    wait (0.2) seconds\n    add (item (1) of [load data 1 v]) to [placed block costume value v]\n    add (item (3) of [load data 1 v]) to [placed block x values v]\n    add (item (2) of [load data 1 v]) to [placed block y values v]\n    delete (1) of [load data 1 v]\n    delete (1) of [load data 1 v]\n    delete (1) of [load data 1 v]\n    change [block number v] by (-3)\nend\nshow\nset [block number v] to (length of [placed block costume value v])\nrepeat (Block Number)\n    wait (0.1) seconds\n    switch costume to (item (1) of [placed block costume value v])\n    set x to (item (1) of [placed block x values v])\n    set y to (item (1) of [placed block y values v])\n    wait (0.1) seconds\n    stamp\n    delete (1) of [placed block costume value v]\n    delete (1) of [placed block x values v]\n    delete (1) of [placed block y values v]\n    change [1 v] by (-1)\nend\nset [follow pointer \(le\) ability v] to [0]\n\n@Menu (LE)\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\ngo to [front v] layer\nset size to (100) %\n\nwhen I receive [start le v]\nset [le start options v] to [0]\nrepeat (3)\n    wait (0.1) seconds\n    create clone of (_myself_ v)\n    change [le start options v] by (1)\nend\n\nwhen I start as a clone\nif <(LE Start Options) = [1]> then\n    show\n    go to x: (-212) y: (157)\n    forever\n        if <touching (mouse-pointer v)?> then\n            switch costume to (1b v)\n        else\n            switch costume to (1a v)\n        end\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            wait (0.3) seconds\n            broadcast (Reposition v)\n            broadcast (Stop LE v)\n        end\n    end\nend\nif <(LE Start Options) = [2]> then\n    show\n    go to x: (-179) y: (157)\n    forever\n        if <touching (mouse-pointer v)?> then\n            switch costume to (2b v)\n        else\n            switch costume to (2a v)\n        end\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            wait (0.3) seconds\n            broadcast (Play LE v)\n        end\n    end\nend\nif <(LE Start Options) = [3]> then\n    show\n    go to x: (212) y: (157)\n    forever\n        if <touching (mouse-pointer v)?> then\n            switch costume to (3b v)\n        else\n            switch costume to (3a v)\n        end\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            wait (0.3) seconds\n            erase all\n            delete all of [placed block costume value v]\n            delete all of [placed block x values v]\n            delete all of [placed block y values v]\n            delete all of [placed block costume value v]\n            delete all of [placed block x values v]\n            delete all of [placed block y values v]\n        end\n    end\nend\n\n@Save (LE)\n\nwhen flag clicked\nshow list [save data v]\nhide\ngo to x: (-190) y: (-150)\nset [data 1 v] to [0]\nforever\n    set [data 1 v] to [0]\nend\n\ndefine Save\nset [block number v] to [1]\ndelete all of [save data v]\ndelete all of [save data 2 v]\nrepeat (length of [placed block costume value v])\n    add (join (item (Block Number) of [placed block costume value v]) (join [,] (join (item (Block Number) of [placed block y values v]) (join [,] (join (item (Block Number) of [placed block x values v]) [,]))))) to [save data 2 v]\n    change [block number v] by (1)\nend\nhide list [save data v]\nadd (Save Data 2) to [save data v]\nadd [Please copy this code. \(Ctrl + c\)] to [save data v]\nadd [Space to close.] to [save data v]\nwait until <key (space v) pressed?>\nshow list [save data v]\n\ndefine Load\nask [Paste your code here. \(Ctrl + v\) Delete the copied "2" at the end of the code.] and wait\ndelete all of [placed block costume value v]\ndelete all of [placed block x values v]\ndelete all of [placed block y values v]\ndelete all of [load data 1 v]\ndelete all of [load data 2 v]\nset [1 v] to [1]\nrepeat (length of (answer))\n    if <(letter (1) of (answer)) = [,]> then\n        add (Load Data 2) to [load data 1 v]\n        delete all of [load data 2 v]\n        change [1 v] by (1)\n    end\n    add (letter (1) of (answer)) to [load data 2 v]\n    change [1 v] by (1)\nend\nset [1 v] to [1]\nset [data 1 v] to (item (1) of [load data 1 v])\nset [multiplier ability \(le\) v] to (length of [load data 1 v])\nbroadcast (Load Data v)\n\nwhen I receive [start le v]\nset [save/load clones v] to [0]\nhide\nrepeat (2)\n    wait (0.2) seconds\n    create clone of (_myself_ v)\n    change [save/load clones v] by (1)\nend\n\nwhen I start as a clone\nif <(Save/Load Clones) = [1]> then\n    switch costume to (save 1 v)\n    show\n    go to x: (92) y: (156)\n    forever\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            wait (0.3) seconds\n            Save\n        end\n        if <touching (mouse-pointer v)?> then\n            switch costume to (save 2 v)\n        else\n            switch costume to (save 1 v)\n        end\n    end\nend\nif <(Save/Load Clones) = [2]> then\n    switch costume to (load 1 v)\n    show\n    go to x: (140) y: (156)\n    forever\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            wait (0.3) seconds\n            Load\n        end\n        if <touching (mouse-pointer v)?> then\n            switch costume to (load 2 v)\n        else\n            switch costume to (load 1 v)\n        end\n    end\nend\n\n