Platformer PvP

Instructions: { ＨＯＷ ＴＯ ＰＬＡＹ }\nUse arrow keys to move for the first player.\nFor the second player, use WASD keys.\nSpecial abilities can be used by pressing down arrow key or S key (for player two)\nSelect which mode of gameplay you would like, and you will have matches accordingly. You can change this setting later.

@Stage\n\nwhen flag clicked\nset volume to (100) %\nset [m/ v] to [0]\nswitch backdrop to (select v)\n\nwhen I receive [begin v]\nwait (5.01) seconds\nswitch backdrop to ((<M>) + (1))\nif <([costume # v] of [floor v]) = [3]> then\n    switch backdrop to (xy-grid v)\nend\nif <(<M>) = [2]> then\n    stop [other scripts in sprite v]\n    stop all sounds\n    forever\n        play sound [mania_adventures v] until done\n    end\nend\n\nwhen I receive [startup v]\nchange [m/ v] by (1)\nif <(m/) = [1]> then\n    broadcast (play v)\nend\n\nwhen I receive [knocked_out v]\nwait (2) seconds\nswitch backdrop to (select v)\n\nwhen I receive [play v]\nforever\n    play sound [cracking-the-code-16373 v] until done\nend\n\nwhen I receive [lockk v]\nset volume to (0) %\n\nwhen backdrop switches to [game v]\nset volume to (100) %\n\nwhen I receive [lockk v]\nset volume to (0) %\n\nwhen backdrop switches to [game v]\nset volume to (100) %\n\nwhen backdrop switches to [game2 v]\nset volume to (100) %\n\nwhen I receive [startup v]\nif <(<M>) = [2]> then\n    stop [other scripts in sprite v]\n    forever\n        play sound [cracking-the-code-16373 v] until done\n    end\nend\n\n@Bar\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nforever\n    show\n    if <(#) = [0]> then\n        Healthbar Sprite: [player] Variable: (Player HP) Max: [100]\n    else\n        if <(#) = [1]> then\n            Healthbar Sprite: [opponent] Variable: (Enemy HP) Max: [100]\n        else\n            Healthbar Sprite: [monster] Variable: (Monster HP) Max: [450]\n        end\n    end\nend\n\nwhen I receive [begin v]\nwait (5.3) seconds\nset [# v] to [0]\ncreate clone of (_myself_ v)\nset [# v] to [1]\ncreate clone of (_myself_ v)\nif <(<M>) = [2]> then\n    set [# v] to [2]\n    create clone of (_myself_ v)\nend\n\nwhen I receive [hide v]\nhide\ndelete this clone\n\nwhen I receive [k v]\nif <(#) = [1]> then\n    hide\n    delete this clone\nend\n\nwhen I receive [finessed v]\nif <(#) = [0]> then\n    hide\n    delete this clone\nend\n\ndefine Healthbar Sprite: (sprite) Variable: (var) Max: (max)\ngo to [front v] layer\nswitch costume to ((((1) + (([abs v] of ((max) - (var)) ) / ((max) / (6)))) * (5)) - (4))\ngo to (sprite)\nchange y by (50)\nif <(sprite) = [monster]> then\n    change y by (50)\nend\nif <(var) < [1]> then\n    delete this clone\nend\n\nset [monster hp v] to [100]\n\nwhen I receive [knocked_out v]\nhide\ndelete this clone\n\n@player\n\nwhen flag clicked\nhide\n\nwhen I receive [go v]\npoint in direction (90)\ncreate clone of (_myself_ v)\nforever\n    set rotation style [all around v]\n    turn right ((((direction) / (90)) * ([abs v] of (Yv) )) / (2.5)) degrees\nend\n\nwhen I start as a clone\nswitch costume to (cos)\nclear graphic effects\nshow\ngo to [back v] layer\nforever\n    go to (player v)\n    if <(cos) > [3]> then\n        turn right ((Xv) * (3)) degrees\n    else\n        if <(cos) = [7]> then\n            turn right (((Xv) / ([abs v] of (Xv) )) * (10)) degrees\n        else\n            if <<<touching (runplayer v)?> and <(<M>) = [2]>> or <<touching (floor v)?> and <(<M>) = [1]>>> then\n                point in direction (90)\n            else\n                turn right ([abs v] of (Yv) ) degrees\n            end\n        end\n    end\nend\n\nwhen I receive [res v]\nif <(costume [number v]) = [8]> then\n    if <(/N) = [7]> then\n        repeat ((((<M>) - (1)) * (4)) + (1))\n            set [kil v] to [opponent]\n            create clone of (pew v)\n            wait ((0.1) + ((0.1) / (frame_speed))) seconds\n        end\n        wait ((2) + ((0.1) / (frame_speed))) seconds\n        set [special v] to [1]\n    else\n        start sound [PowerUp10 v]\n        if <<(/N) = [1]> or <(/N) = [2]>> then\n            repeat (((20) - ((<(/N) = [2]> * (13)) - (((<M>) - (1)) * (2)))) * (((((<M>) - (1)) * (2)) + (3)) / (2.5)))\n                wait (((0.08) - (<(/N) = [2]> * (0.05))) + ((0.01) / (frame_speed))) seconds\n                set [kil v] to [opponent]\n                create clone of (pew v)\n            end\n            wait ((3) + ((0.1) / (frame_speed))) seconds\n            set [special v] to [1]\n        else\n            if <<(/N) = [3]> or <(/N) = [4]>> then\n                repeat ((((<M>) - (1)) * (4)) + (4))\n                    set [kil v] to [opponent]\n                    create clone of (pew v)\n                    wait ((0.35) + ((0.1) / (frame_speed))) seconds\n                end\n                wait ((1.5) + ((0.1) / (frame_speed))) seconds\n                set [special v] to [1]\n            else\n                if <(/N) = [5]> then\n                    repeat (<M>)\n                        set [kil v] to [opponent]\n                        create clone of (pew v)\n                        wait ((4) + ((0.1) / (frame_speed))) seconds\n                    end\n                    wait ((8) + ((0.1) / (frame_speed))) seconds\n                    set [special v] to [1]\n                else\n                    repeat (2)\n                        set [kil v] to [opponent]\n                        create clone of (slice v)\n                    end\n                    wait ((3) + ((0.1) / (frame_speed))) seconds\n                    set [special v] to [1]\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [finessed v]\nstop [other scripts in sprite v]\nset rotation style [all around v]\nstart sound [megaman-death-sound_114bpm_D_major v]\nset [yv v] to [20]\nset [player hp v] to [0]\nif <(<M>) = [2]> then\n    change y by (Yv)\nend\nrepeat until <(y position) < [-180]>\n    change [yv v] by (-1)\n    turn right (15) degrees\n    change y by (Yv)\n    change x by ((Xv) / (2))\nend\nhide\nwait (1) seconds\nset [cos v] to ([costume # v] of [opponent v])\nif <(costume [number v]) = [8]> then\n    if <<(<M>) = [1]> or <(Enemy HP) < [1]>> then\n        broadcast (Knocked_Out v)\n    end\nend\ndelete this clone\n\nwhen I receive [begin v]\nwait (5.12) seconds\ngo to x: (0) y: (150)\nswitch costume to (hitbox v)\nset [ghost v] effect to (100)\nerase all\ndelete all of [xv v]\nset [/sx v] to [0]\nset [player hp v] to [100]\nset [enemy hp v] to [100]\nset [xv v] to [0]\nif <(//) = [1]> then\n    set [cos v] to (item (1) of [/l v])\nelse\n    set [cos v] to ([costume # v] of [characters & effects v])\nend\nif <([costume # v] of [floor v]) > [1]> then\n    set size to (65) %\nelse\n    set size to (100) %\nend\nset [yv v] to [0]\nset [special v] to [1]\nbroadcast (go v)\nif <(<M>) = [2]> then\n    set x to (-10)\n    set size to (90) %\nend\nshow\nforever\n    if <key (right arrow v) pressed?> then\n        change [xv v] by (frame_speed)\n    end\n    if <key (left arrow v) pressed?> then\n        change [xv v] by ((-1) * (frame_speed))\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by ((Xv) * ((<(<M>) = [2]> * (0.9)) + (<(<M>) = [1]> * (1))))\n    if <<<touching (runplayer v)?> and <(<M>) = [2]>> or <<touching (floor v)?> and <(<M>) = [1]>>> then\n        change y by (1)\n        if <<<touching (runplayer v)?> and <(<M>) = [2]>> or <<touching (floor v)?> and <(<M>) = [1]>>> then\n            change y by (1)\n            if <<<touching (runplayer v)?> and <(<M>) = [2]>> or <<touching (floor v)?> and <(<M>) = [1]>>> then\n                change y by (1)\n                if <<<touching (runplayer v)?> and <(<M>) = [2]>> or <<touching (floor v)?> and <(<M>) = [1]>>> then\n                    change y by (1)\n                    if <<<touching (runplayer v)?> and <(<M>) = [2]>> or <<touching (floor v)?> and <(<M>) = [1]>>> then\n                        change y by (1)\n                        if <<<touching (runplayer v)?> and <(<M>) = [2]>> or <<touching (floor v)?> and <(<M>) = [1]>>> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                            if <(<M>) = [2]> then\n                                start sound [mixkit-player-jumping-in-a-video-game-2043 v]\n                                if <<touching (floor v)?> and <(x position) < [-230]>> then\n                                    change x by (100)\n                                end\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-20]\n                                else\n                                    set [xv v] to [20]\n                                end\n                                set [yv v] to [10]\n                                add (Xv) to [xv v]\n                                if <<((item (1) of [xv v]) / (item (2) of [xv v])) < [0]> and <((item (2) of [xv v]) / (item (3) of [xv v])) < [0]>> then\n                                    delete all of [xv v]\n                                    change y by (100)\n                                end\n                                if <(length of [xv v]) > [3]> then\n                                    delete all of [xv v]\n                                end\n                            else\n                                if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <(<M>) = [2]>> then\n                                    start sound [mixkit-player-jumping-in-a-video-game-2043 v]\n                                    if <(Xv) > [0]> then\n                                        set [xv v] to [-5]\n                                    else\n                                        set [xv v] to [5]\n                                    end\n                                    set [yv v] to [10]\n                                else\n                                    set [xv v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by ((-1) * (frame_speed))\n    change y by ((Yv) * (frame_speed))\n    if <<<touching (runplayer v)?> and <(<M>) = [2]>> or <<touching (floor v)?> and <(<M>) = [1]>>> then\n        change y by ((Yv) * ((-1) * (frame_speed)))\n        point in direction (90)\n        set [yv v] to [0]\n    end\n    if <touching (jump pad v)?> then\n        start sound [Jump v]\n        set [yv v] to ((20) + (<(<M>) = [2]> * (-10)))\n    end\n    if <touching (side pad v)?> then\n        start sound [Jump v]\n        set [xv v] to ((Xv) * (([direction v] of [side pad v]) / ((-36) * (frame_speed))))\n        change x by (Xv)\n    end\n    change y by (-1)\n    if <<<touching (runplayer v)?> and <(<M>) = [2]>> or <<touching (floor v)?> and <(<M>) = [1]>>> then\n        if <key (up arrow v) pressed?> then\n            start sound [mixkit-player-jumping-in-a-video-game-2043 v]\n            set [yv v] to [15]\n        end\n    end\n    change y by (1)\n    if <key (down arrow v) pressed?> then\n        if <(special) = [1]> then\n            set [special v] to [0]\n            broadcast (res v)\n        end\n    end\n    if <(Player HP) < [1]> then\n        broadcast (finessed v)\n    end\n    if <<touching (wall v)?> or <<(y position) < [-178]> or <touching (lava v)?>>> then\n        start sound [fall v]\n        set [yv v] to ((40) + (<(<M>) = [2]> * (-10)))\n        change [player hp v] by (-10)\n    end\nend\n\nwhen I receive [knocked_out v]\nstop [other scripts in sprite v]\nwait (2) seconds\ndelete this clone\n\nwhen I receive [tt v]\nif <(costume [number v]) = [8]> then\n    if <(T) = [player]> then\n        set [xv v] to ((Xv) * (() - ((s) / (1.5))))\n        set [yv v] to [5]\n    end\nend\n\nset [xv v] to [0]\n\nbroadcast (BEGIN v)\n\n@characters & effects\n\ndefine Glide (x) (y) (speed)\nrepeat until <<(round (x position)) = (x)> and <(round (y position)) = (y)>>\n    change x by (((x) - (x position)) / (speed))\n    change y by (((y) - (y position)) / (speed))\nend\n\nwhen flag clicked\npen up\nhide\n\nwhen I receive [jump v]\nif <(--) = [1]> then\n    set [h v] to (item (pick random (1) to (5)) of [x v])\n    set [f v] to [1]\n    repeat (70)\n        change y by (oY)\n        change [oy v] by (-1)\n        if <(y position) < [10]> then\n            change y by (((oY) * (-1)) / (2))\n            set [oy v] to (((oY) * (-1)) / (2))\n        end\n        set x to (0)\n        change x by (((mouse x) - (x position)) / (50))\n        turn right ((360) / (H)) degrees\n    end\n    set [f v] to [0]\nend\n\nwhen I receive [next v]\nnext costume\nset [/n v] to (costume [number v])\n\nwhen I receive [previous v]\nswitch costume to ((costume [number v]) - (1))\nset [/n v] to (costume [number v])\n\nwhen I receive [select_mode v]\nif  then\n    delete this clone\nend\nset [-- v] to [0]\nstop [other scripts in sprite v]\nswitch costume to (cos)\nhide\ngo to x: (-137) y: (300)\nset size to (75) %\npoint in direction (75)\nshow\ncreate clone of (_myself_ v)\nglide (0.6) secs to x: (-137) y: (76)\nforever\n    set size to ((item (1) of [size v]) - (5)) %\n    show\n    go to [front v] layer\n    go [backward v] (10) layers\nend\n\nwhen I start as a clone\nif <(--) = [0]> then\n    set size to (25) %\n    point in direction (115)\n    show\n    go to x: (165) y: (-3000)\n    glide (0.6) secs to x: (165) y: (-36)\n    if <(//) = [0]> then\n        set [brightness v] effect to (-75)\n    end\n    forever\n        set size to ((item (2) of [size v]) - (50)) %\n    end\nelse\n    erase all\n    point in direction (90)\n    switch costume to (costume1 v)\n    set size to (150) %\n    go to x: (0) y: (193)\n    set [oy v] to [0]\n    show\n    broadcast (jump v) and wait\n    forever\n        set x to (0)\n        change x by (((mouse x) - (x position)) / (50))\n        if <<<(pick random (1) to (50)) = [1]> or <<(mouse y) > [80]> and <mouse down?>>> and <(f) = [0]>> then\n            set [oy v] to [15]\n            broadcast (jump v)\n        end\n    end\nend\n\nwhen I receive [begin v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [startup v]\nif <[] = []> then\n    delete this clone\nend\nset [-- v] to [1]\ncreate clone of (_myself_ v)\nset [-- v] to [0]\n\nwhen I receive [win_char v]\nset size to (300) %\ngo to x: (0) y: (3000)\npoint in direction (45)\nif <<(Player HP) < [1]> and <(Enemy HP) < [1]>> then\nGlide [0] [50] [8]\n\nwhen I receive [hide v]\nshow\nGlide [0] [-270] [8]\nhide\n\nbroadcast (Knocked_Out v)\n\nwhen I start as a clone\nif <(--) = [1]> then\n    forever\n        set [cx v] to (x position)\n        set [cos v] to (costume [number v])\n        set [cy v] to (y position)\n    end\nend\n\nif <(//) = [0]> then\n    set [brightness v] effect to (-75)\nend\n\n@eye_ball\n\nwhen flag clicked\nhide\nerase all\n\nwhen I start as a clone\nif <(#?) = [0]> then\n    go to [front v] layer\n    if <(cos) = [5]> then\n        switch costume to (costume2 v)\n    else\n        if <(cos) = [6]> then\n            switch costume to (costume3 v)\n        else\n            if <(cos) > [2]> then\n                switch costume to (costume4 v)\n            else\n                switch costume to (costume1 v)\n            end\n        end\n    end\n    go [backward v] (1) layers\n    if <([costume # v] of [floor v]) > [1]> then\n        set size to (65) %\n    else\n        set size to (80) %\n    end\n    forever\n        go to (player v)\n        show\n        if <(cos) > [2]> then\n            turn right ((Xv) * (3)) degrees\n        else\n            if <(Enemy HP) < [1]> then\n                point towards (monster v)\n            else\n                point towards (opponent v)\n            end\n        end\n        move ((distance to [opponent v]) / (40)) steps\n    end\nelse\n    if <((#?) + (0)) = (#?)> then\n        go to [front v] layer\n        if <([costume # v] of [floor v]) > [1]> then\n            set size to (65) %\n        else\n            set size to (80) %\n        end\n        forever\n            go to (opponent v)\n            show\n            if <(Player HP) < [1]> then\n                point towards (monster v)\n            else\n                point towards (player v)\n            end\n            move ((distance to [player v]) / (40)) steps\n            if <(/P) = [5]> then\n                switch costume to (costume2 v)\n            else\n                if <(/P) = [6]> then\n                    switch costume to (costume3 v)\n                else\n                    if <(/P) > [2]> then\n                        switch costume to (costume4 v)\n                    else\n                        switch costume to (costume1 v)\n                    end\n                end\n            end\n        end\n    else\n        if <(#?) = [/]> then\n            if <(cos) = [5]> then\n                switch costume to (costume2 v)\n            else\n                if <(cos) = [6]> then\n                    switch costume to (costume3 v)\n                else\n                    if <(cos) > [2]> then\n                        switch costume to (costume4 v)\n                    else\n                        switch costume to (costume1 v)\n                    end\n                end\n            end\n            show\n            go to x: (165) y: (-3000)\n            if <(//) = [0]> then\n                set [brightness v] effect to (-75)\n            end\n            glide (0.3) secs to x: (165) y: (-36)\n            forever\n                point towards (mouse-pointer v)\n                set size to ((item (2) of [size v]) - (60)) %\n                go to x: (165) y: (-36)\n                move ((distance to [mouse-pointer v]) / (90)) steps\n            end\n        else\n            if <(#?) = [x]> then\n                switch costume to (costume1 v)\n                set size to (150) %\n                go to [front v] layer\n                show\n                forever\n                    go to x: (cx) y: (cy)\n                    point towards (mouse-pointer v)\n                    move ((distance to [mouse-pointer v]) / (40)) steps\n                    if <(cos) = [5]> then\n                        switch costume to (costume2 v)\n                    else\n                        if <(cos) = [6]> then\n                            switch costume to (costume3 v)\n                        else\n                            if <(cos) > [2]> then\n                                switch costume to (costume4 v)\n                            else\n                                switch costume to (costume1 v)\n                            end\n                        end\n                    end\n                end\n            else\n                if <(cos) = [5]> then\n                    switch costume to (costume2 v)\n                else\n                    if <(cos) = [6]> then\n                        switch costume to (costume3 v)\n                    else\n                        if <(cos) > [2]> then\n                            switch costume to (costume4 v)\n                        else\n                            switch costume to (costume1 v)\n                        end\n                    end\n                end\n                show\n                go to x: (-130) y: (3000)\n                glide (0.68) secs to x: (-131) y: (75)\n                forever\n                    point towards (mouse-pointer v)\n                    set size to ((item (1) of [size v]) - (10)) %\n                    go to x: (-131) y: (75)\n                    move ((distance to [mouse-pointer v]) / (50)) steps\n                end\n            end\n        end\n    end\nend\n\nset [player hp v] to [2]\nset [enemy hp v] to [2]\n\nwhen I receive [finessed v]\nif <(#?) = [0]> then\n    wait until <(y position) < [-170]>\n    delete this clone\nend\n\nwhen I receive [k v]\nif <(#?) = [1]> then\n    wait until <(y position) < [-170]>\n    delete this clone\nend\n\nwhen I receive [select_mode v]\nif  then\n    delete this clone\nend\nset size to (80) %\nset [#? v] to [/]\ncreate clone of (_myself_ v)\nset [#? v] to [?]\ncreate clone of (_myself_ v)\nforever\n    set size to (item (1) of [size v]) %\nend\n\nwhen I receive [begin v]\nif  then\n    stop [other scripts in sprite v]\n    hide\n    delete this clone\nend\nwait (5) seconds\nset [#? v] to [0]\ncreate clone of (_myself_ v)\nset [#? v] to [1]\ncreate clone of (_myself_ v)\n\nwhen I receive [startup v]\nset size to (150) %\nset [#? v] to [x]\ncreate clone of (_myself_ v)\n\nwhen I receive [win_char v]\nif <not <<(Player HP) < [1]> and <(Enemy HP) < [1]>>> then\n    wait (0.1) seconds\n    stop [other scripts in sprite v]\n    if <(#?) = [0]> then\n        delete this clone\n    end\n    go to x: (0) y: (3000)\n    clear graphic effects\n    go to [front v] layer\n    set size to (300) %\n    show\n    repeat (30)\n        go to [front v] layer\n        set y to ([y position v] of [characters & effects v])\n        if <(cos) = [5]> then\n            switch costume to (costume2 v)\n        else\n            if <(cos) = [6]> then\n                switch costume to (costume3 v)\n            else\n                if <(cos) > [2]> then\n                    switch costume to (costume4 v)\n                else\n                    switch costume to (costume1 v)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [hide v]\nrepeat (12)\n    set y to ([y position v] of [characters & effects v])\nend\nhide\ndelete this clone\n\nbroadcast (Knocked_Out v)\n\nset [enemy hp v] to [0]\n\n@floor\n\nwhen flag clicked\nhide\n\nwhen I receive [begin v]\nwait (5) seconds\nif <(<M>) = [1]> then\n    set [intensity v] to [1]\n    switch costume to (pick random (1) to (3))\n    go to [back v] layer\n    show\n    set size to (100) %\n    go to x: (0) y: (0)\n    forever\n        if <(costume [number v]) = [2]> then\n            create clone of (lava v)\n        end\n        if <(pick random (1) to (100)) = [10]> then\n            set [intensity v] to [5]\n        end\n        if <(pick random (1) to (100)) = [50]> then\n            set [intensity v] to [1]\n        end\n    end\nelse\n    hide\nend\n\nwhen I receive [knocked_out v]\nwait (2) seconds\nstop [other scripts in sprite v]\nswitch costume to (costume1 v)\nhide\n\n@opponent\n\nwhen flag clicked\nhide\n\nwhen I receive [k v]\nstop [other scripts in sprite v]\nstart sound [megaman-death-sound_114bpm_D_major v]\nshow\nset [enemy hp v] to [0]\nset [oy v] to [20]\nif <(<M>) = [2]> then\n    change y by ((oY) * (frame_speed))\nend\nrepeat until <(y position) < [-180]>\n    change [oy v] by ((-0.8) * (frame_speed))\n    turn right ((frame_speed) * (15)) degrees\n    change y by ((oY) * (frame_speed))\n    change x by (((oX) / (2)) * (frame_speed))\nend\nhide\nif <<(<M>) = [1]> or <(Player HP) < [1]>> then\n    wait (1) seconds\n    broadcast (Knocked_Out v)\nend\n\nwhen I receive [re v]\nif <(costume [number v]) = [8]> then\n    if <(/P) = [7]> then\n        repeat ((((<M>) - (1)) * (4)) + (1))\n            set [kil v] to [player]\n            create clone of (pew v)\n            wait ((0.1) + ((0.1) / (frame_speed))) seconds\n        end\n        wait ((2) + ((0.1) / (frame_speed))) seconds\n        set [sp v] to [1]\n    else\n        start sound [PowerUp10 v]\n        if <<(/P) = [1]> or <(/P) = [2]>> then\n            repeat (((20) - ((<(/P) = [2]> * (13)) - (((<M>) - (1)) * (5)))) * (((((<M>) - (1)) * (2)) + (3)) / (2)))\n                wait (((0.1) - (<(/P) = [2]> * (0.05))) + ((0.01) / (frame_speed))) seconds\n                set [kil v] to [player]\n                create clone of (pew v)\n            end\n            wait ((3) + ((0.1) / (frame_speed))) seconds\n            set [sp v] to [1]\n        else\n            if <<(/P) = [3]> or <(/P) = [4]>> then\n                repeat ((((<M>) - (1)) * (4)) + (4))\n                    set [kil v] to [player]\n                    create clone of (pew v)\n                    wait ((0.35) + ((0.1) / (frame_speed))) seconds\n                end\n                wait ((1.5) + ((0.1) / (frame_speed))) seconds\n                set [sp v] to [1]\n            else\n                if <(/P) = [5]> then\n                    repeat (<M>)\n                        set [kil v] to [player]\n                        create clone of (pew v)\n                        wait (((5) - (<(//) = [1]> * (5))) + ((0.1) / (frame_speed))) seconds\n                    end\n                    wait (((8) - (<(//) = [1]> * (5))) + ((0.1) / (frame_speed))) seconds\n                    set [sp v] to [1]\n                else\n                    repeat (2)\n                        set [kil v] to [player]\n                        create clone of (slice v)\n                    end\n                    wait ((3) + ((0.1) / (frame_speed))) seconds\n                    set [sp v] to [1]\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [begin v]\nwait (5) seconds\nif <(//) = [1]> then\n    set [/p v] to (/N)\nelse\n    set [/p v] to (pick random (1) to (7))\nend\nset [coss v] to (/P)\ndelete all of [ox v]\nswitch costume to (costume8 v)\npoint in direction (90)\ngo to x: (180) y: (150)\nif <([costume # v] of [floor v]) > [1]> then\n    set size to (65) %\nelse\n    set size to (100) %\nend\nif <(<M>) = [2]> then\n    set x to (0)\n    set y to (-60)\n    set size to (90) %\nend\nshow\ngo to [front v] layer\nset [ox v] to [5]\nset [oy v] to [0]\nset [enemy hp v] to [100]\nset [sp v] to [1]\nbroadcast (bo v)\nset [ghost v] effect to (100)\nwait (0.5) seconds\nif <(costume [number v]) = [8]> then\n    forever\n        set [n v] to (pick random (1) to (10))\n        if <(//) = [1]> then\n            set [/n v] to (item (1) of [/l v])\n            if <key (d v) pressed?> then\n                change [ox v] by (frame_speed)\n            end\n            if <key (a v) pressed?> then\n                change [ox v] by ((-1) * (frame_speed))\n            end\n        else\n            change [ox v] by (((([x position v] of [player v]) - (x position)) / (200)) * (frame_speed))\n        end\n        set [ox v] to ((oX) * (0.9))\n        change x by ((oX) * ((<(<M>) = [2]> * (0.9)) + (<(<M>) = [1]> * (1))))\n        if <<<touching (runopponent v)?> and <(<M>) = [2]>> or <<touching (floor v)?> and <(<M>) = [1]>>> then\n            change y by (1)\n            if <<<touching (runopponent v)?> and <(<M>) = [2]>> or <<touching (floor v)?> and <(<M>) = [1]>>> then\n                change y by (1)\n                if <<<touching (runopponent v)?> and <(<M>) = [2]>> or <<touching (floor v)?> and <(<M>) = [1]>>> then\n                    change y by (1)\n                    if <<<touching (runopponent v)?> and <(<M>) = [2]>> or <<touching (floor v)?> and <(<M>) = [1]>>> then\n                        change y by (1)\n                        if <<<touching (runopponent v)?> and <(<M>) = [2]>> or <<touching (floor v)?> and <(<M>) = [1]>>> then\n                            change y by (1)\n                            if <<<touching (runopponent v)?> and <(<M>) = [2]>> or <<touching (floor v)?> and <(<M>) = [1]>>> then\n                                change x by ((oX) * (-1))\n                                change y by (-5)\n                                if <(<M>) = [2]> then\n                                    if <(oX) > [0]> then\n                                        set [ox v] to [-10]\n                                    else\n                                        set [ox v] to [10]\n                                    end\n                                    set [oy v] to [10]\n                                    change x by ((oX) * (2))\n                                    add (oX) to [ox v]\n                                    if <<((item (1) of [ox v]) / (item (2) of [ox v])) < [0]> and <((item (2) of [ox v]) / (item (3) of [ox v])) < [0]>> then\n                                        delete all of [ox v]\n                                        change y by (100)\n                                    end\n                                    if <(length of [ox v]) > [3]> then\n                                        delete all of [ox v]\n                                    end\n                                else\n                                    if <(n) = [1]> then\n                                        if <(oX) > [0]> then\n                                            set [ox v] to [-5]\n                                        else\n                                            set [ox v] to [5]\n                                        end\n                                        set [oy v] to [10]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change [oy v] by (-1)\n        change y by ((oY) * (frame_speed))\n        if <<<touching (runopponent v)?> and <(<M>) = [2]>> or <<touching (floor v)?> and <(<M>) = [1]>>> then\n            change y by ((oY) * ((-1) * (frame_speed)))\n            point in direction (90)\n            set [oy v] to [0]\n        end\n        change y by (-1)\n        if <<<touching (runopponent v)?> and <(<M>) = [2]>> or <<touching (floor v)?> and <(<M>) = [1]>>> then\n            if <(//) = [1]> then\n                if <<<touching (runopponent v)?> and <(<M>) = [2]>> or <<touching (floor v)?> and <(<M>) = [1]>>> then\n                    if <key (w v) pressed?> then\n                        start sound [mixkit-player-jumping-in-a-video-game-2043 v]\n                        set [oy v] to [15]\n                    end\n                end\n            else\n                if <(n) = [1]> then\n                    start sound [mixkit-player-jumping-in-a-video-game-2043 v]\n                    set [oy v] to ((15) * (frame_speed))\n                end\n            end\n        end\n        change y by (1)\n        if <touching (side pad v)?> then\n            start sound [Jump v]\n            set [ox v] to ((oX) * (([direction v] of [side pad v]) / ((-36) * (frame_speed))))\n        end\n        if <touching (jump pad v)?> then\n            start sound [Jump v]\n            set [oy v] to ((20) + (<(<M>) = [2]> * (-10)))\n        end\n        if <(Enemy HP) < [1]> then\n            broadcast (k v)\n        end\n        if <<<(y position) < [-178]> or <touching (lava v)?>> or <touching (wall v)?>> then\n            start sound [fall v]\n            set [oy v] to ((40) + (<(<M>) = [2]> * (-10)))\n            change [enemy hp v] by (-10)\n        end\n        if <(//) = [1]> then\n            if <key (s v) pressed?> then\n                if <(sp) = [1]> then\n                    set [sp v] to [0]\n                    broadcast (RE v)\n                end\n            end\n        else\n            if <(n) > [6]> then\n                if <(sp) = [1]> then\n                    set [sp v] to [0]\n                    broadcast (RE v)\n                end\n            end\n        end\n        go to [back v] layer\n    end\nend\nset [ox v] to [0]\n\nwhen I receive [knocked_out v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [tt v]\nif <(costume [number v]) = [8]> then\n    if <(T) = [opponent]> then\n        set [ox v] to ((oX) * (() - ((s) / (1.5))))\n        set [oy v] to [5]\n    end\nend\n\nwhen flag clicked\nset [frame_speed v] to [1]\n\nset [frame_speed v] to [0.2]\n\nset [player hp v] to [200000000]\n\nset [enemy hp v] to [2]\n\nwhen I start as a clone\nswitch costume to (/P)\nclear graphic effects\ngo to [back v] layer\nshow\nforever\n    go to (opponent v)\n    if <(/P) > [3]> then\n        turn right ((/P) * (3)) degrees\n    else\n        if <(/P) = [7]> then\n            turn right (((oX) / ([abs v] of (oX) )) * (10)) degrees\n        else\n            if <<<touching (runopponent v)?> and <(<M>) = [2]>> or <<touching (floor v)?> and <(<M>) = [1]>>> then\n                point in direction (90)\n            else\n                turn right ([abs v] of (oY) ) degrees\n            end\n        end\n    end\nend\n\nwhen I receive [bo v]\npoint in direction (90)\ncreate clone of (_myself_ v)\nforever\n    set rotation style [all around v]\n    turn right ((((direction) / (90)) * ([abs v] of (oY) )) / (2.5)) degrees\nend\n\nwhen I receive [select_mode v]\ndelete this clone\n\nset [ox v] to [0]\n\nset [oy v] to [0]\nset y to (2000)\n\npoint in direction ([direction v] of [opponent v])\n\ndefine Set Condition\n\nchange y by (oY)\n\nset [<m> v] to [2]\n\nbroadcast (BEGIN v)\n\n@runplayer\n\nwhen flag clicked\nhide\n\nwhen I receive [begin v]\nwait (5) seconds\nif <(<M>) = [2]> then\n    set [ghost v] effect to (100)\n    show\n    set size to (100) %\n    point in direction (90)\n    go to x: (0) y: (-30)\n    switch costume to (costume1 v)\n    repeat (9)\n        go to [back v] layer\n    end\n    set [s v] to [0]\n    set [x1 v] to [0]\n    repeat (13)\n        create clone of (_myself_ v)\n        change [x1 v] by (480)\n        next costume\n    end\n    point in direction (-90)\n    repeat (13)\n        create clone of (_myself_ v)\n        change [x1 v] by (480)\n        next costume\n    end\n    point in direction (90)\n    turn left (10) degrees\n    repeat (13)\n        create clone of (_myself_ v)\n        change [x1 v] by (480)\n        next costume\n    end\n    hide\n    set [s v] to [0]\n    forever\n        change [s v] by (4)\n    end\nend\n\nwhen I receive [knocked_out v]\nwait (2) seconds\nhide\n\nwhen I start as a clone\nclear graphic effects\nforever\n    set x to ((X1) - (S))\n    set [ghost v] effect to ([abs v] of ((x position) / (5)) )\n    go to [back v] layer\n    if <((X1) - (S)) < [-430]> then\n        hide\n    else\n        if <((X1) - (S)) > [430]> then\n            hide\n        else\n            show\n        end\n    end\nend\n\nwait (0.01) seconds\n\nbroadcast (BEGIN v)\n\nwhen I receive [knocked_out v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@jump pad\n\nwhen flag clicked\nhide\n\nwhen I receive [begin v]\nif <(<M>) = [1]> then\n    wait (5.2) seconds\n    if <([costume # v] of [floor v]) = [1]> then\n        set size to (100) %\n        go to x: (53) y: (-120)\n        show\n    else\n        if <([costume # v] of [floor v]) = [2]> then\n            set size to (75) %\n            go to x: (78) y: (13)\n            show\n            create clone of (_myself_ v)\n            go to x: (-78) y: (13)\n        else\n            hide\n        end\n    end\nend\n\nwhen I receive [knocked_out v]\nwait (2) seconds\nhide\n\n@runopponent\n\nwhen flag clicked\nhide\n\nwhen I receive [begin v]\nwait (5) seconds\nif <(<M>) = [2]> then\n    set [ghost v] effect to (100)\n    show\n    set size to (100) %\n    go to x: (0) y: (-140)\n    point in direction (90)\n    switch costume to (costume1 v)\n    repeat (10)\n        go to [back v] layer\n    end\n    set [s v] to [0]\n    set [x1 v] to [0]\n    repeat (13)\n        create clone of (_myself_ v)\n        change [x1 v] by (480)\n        next costume\n    end\n    point in direction (-90)\n    repeat (13)\n        create clone of (_myself_ v)\n        change [x1 v] by (480)\n        next costume\n    end\n    point in direction (90)\n    turn left (10) degrees\n    repeat (13)\n        create clone of (_myself_ v)\n        change [x1 v] by (480)\n        next costume\n    end\n    hide\nend\n\nhide\n\nwhen I receive [knocked_out v]\nwait (2) seconds\nhide\n\nwhen I start as a clone\nclear graphic effects\nset [g v] to [1]\nforever\n    set x to ((X1) - (S))\n    go to [back v] layer\n    set [ghost v] effect to ([abs v] of ((x position) / (5)) )\n    if <((X1) - (S)) < [-430]> then\n        delete this clone\n    else\n        if <((X1) - (S)) > [430]> then\n            hide\n        else\n            show\n        end\n    end\nend\n\nbroadcast (BEGIN v)\n\nset [x1 v] to [400]\n\nwhen I receive [knocked_out v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@side pad\n\nwhen I receive [begin v]\nif <(<M>) = [1]> then\n    wait (5.1) seconds\n    if <([costume # v] of [floor v]) = [1]> then\n        point in direction (90)\n        set size to (100) %\n        go to x: (231) y: (58)\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [knocked_out v]\nwait (2) seconds\nhide\n\n@monster\n\ndefine Glide (x) (y) (speed) (size)\ngo to [front v] layer\nreset timer\nrepeat until <<<(round (x position)) = (x)> and <(round (y position)) = (y)>> or <(timer) > [3]>>\n    go to [front v] layer\n    change x by (((x) - (x position)) / (speed))\n    change y by (((y) - (y position)) / (speed))\n    change size by (((size) - (size)) / (speed))\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [begin v]\nif <(<M>) = [2]> then\n    wait (5) seconds\n    set [monster hp v] to [450]\n    set size to (100) %\n    point in direction (90)\n    switch costume to (costume1 v)\n    go to x: (-200) y: (0)\n    set [-/ v] to [0]\n    broadcast (GO\ v)\n    create clone of (_myself_ v)\n    show\n    point in direction (90)\n    forever\n        change y by (([cos v] of ((timer) * (50)) ) / (2))\n        if <(Monster HP) < [1]> then\n            stop [other scripts in sprite v]\n            broadcast (-kill v)\n            stop [this script v]\n        end\n        if <(Monster HP) < [100]> then\n            switch costume to (costume4 v)\n        else\n            if <(Monster HP) < [300]> then\n                switch costume to (costume3 v)\n            else\n                switch costume to (costume1 v)\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(-/) = [0]> then\n    show\n    forever\n        go to (monster v)\n        go to [front v] layer\n        clear graphic effects\n        switch costume to (eye v)\n        point towards (player v)\n        move (2) steps\n        set size to ([size v] of [monster v]) %\n    end\nend\n\nwhen I receive [go\ v]\nforever\n    wait (pick random (5) to (12)) seconds\n    point in direction (-90)\n    Glide [200] (pick random (100) to (-100)) [5] (pick random (20) to (200))\n    wait (pick random (5) to (12)) seconds\n    point in direction (90)\n    Glide [-200] (pick random (100) to (-100)) [5] (pick random (20) to (200))\nend\n\nwhen I receive [--- v]\nrepeat (20)\n    change x by (pick random (10) to (-10))\n    change y by (pick random (10) to (-10))\nend\n\nwhen I receive [knocked_out v]\nif <<<(Player HP) < [1]> and <(Enemy HP) < [1]>> and <(<M>) = [2]>> then\n    stop [other scripts in sprite v]\n    switch costume to (stare... v)\n    go to x: (0) y: (3000)\n    show\n    go to [front v] layer\n    Glide [0] [80] [5] [130]\n    wait (2) seconds\n    Glide [0] [-230] [5] [130]\n    hide\n    delete this clone\nend\n\nwhen I receive [-kill v]\nif <[] = []> then\n    delete this clone\nend\nstart sound [dead v]\nwait (0.5) seconds\nGlide (x position) [-181] [3] (size)\nhide\nbroadcast (Knocked_Out v)\n\n@pew\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\npoint in direction (90)\nset size to (100) %\nset [id v] to (pick random (-10) to (10))\nclear graphic effects\nset [---id v] to (pick random (5) to (1))\ngo to [back v] layer\nset [-k v] to (kil)\nif <(-k) = [opponent]> then\n    go to (player v)\n    change y by (<(/N) = [7]> * (10))\nelse\n    go to (opponent v)\nend\nif <<(<M>) = [2]> and <<(pick random (1) to (5)) > [1]> or <<<(-k) = [opponent]> and <(Enemy HP) < [1]>> or <<(-k) = [player]> and <(Player HP) < [1]>>>>> then\n    point towards (monster v)\n    set [chance v] to [1]\nelse\n    set [chance v] to [0]\n    point towards (-k)\nend\nshow\nset [-? v] to [0]\nif <<(-k) = [opponent]> and <not <(/N) = [6]>>> then\n    if <<(/N) = [1]> or <(/N) = [2]>> then\n        Bullet\n    else\n        if <<(/N) = [3]> or <(/N) = [4]>> then\n            Ball\n        else\n            if <(/N) = [5]> then\n                Laser\n            else\n                Saw\n            end\n        end\n    end\nelse\n    if <<(/P) = [1]> or <(/P) = [2]>> then\n        Bullet\n    else\n        if <<(/P) = [3]> or <(/P) = [4]>> then\n            Ball\n        else\n            if <(/P) = [5]> then\n                Laser\n            else\n                Saw\n            end\n        end\n    end\nend\nset size to (100) %\nclear graphic effects\nset [\cos v] to ([coss v] of [opponent v])\nif <<touching ((-k) v)?> or <touching (monster v)?>> then\n    go to (-k)\n    if <(-k) = [opponent]> then\n        if <<<(/N) = [3]> or <(/N) = [4]>> or <<(/N) = [1]> or <(/N) = [2]>>> then\n            if <<<(/N) = [3]> or <(/N) = [4]>> or <<(/N) = [2]> and <(pick random (1) to (3)) = [3]>>> then\n                set [kill v] to [-2]\n            else\n                set [kill v] to [-1]\n            end\n            if <<(/N) = [3]> or <(/N) = [4]>> then\n                start sound [mixkit-8-bit-lose-2031 v]\n                set [t v] to (-k)\n                broadcast (tt v)\n            else\n                start sound [mixkit-metal-hammer-hit-833 v]\n            end\n        else\n            if <(/N) = [5]> then\n                set [kill v] to [-10]\n                set [t v] to (-k)\n                broadcast (tt v)\n            else\n                if <(/N) = [7]> then\n                    set [kill v] to [-5]\n                    start sound [mixkit-8-bit-lose-2031 v]\n                    set [t v] to (-k)\n                    broadcast (tt v)\n                else\n                    if <(/N) = [6]> then\n                        if <<<(\cos) = [3]> or <(\cos) = [4]>> or <<(\cos) = [1]> or <(\cos) = [2]>>> then\n                            if <<<(\cos) = [3]> or <(\cos) = [4]>> or <<(\cos) = [2]> and <(pick random (1) to (3)) = [3]>>> then\n                                set [kill v] to [-2]\n                            else\n                                set [kill v] to [-1]\n                            end\n                            if <<(\cos) = [3]> or <(\cos) = [4]>> then\n                                start sound [mixkit-8-bit-lose-2031 v]\n                                set [t v] to (-k)\n                                broadcast (tt v)\n                            else\n                                start sound [mixkit-metal-hammer-hit-833 v]\n                            end\n                        else\n                            if <(\cos) = [5]> then\n                                set [kill v] to [-10]\n                                set [t v] to (-k)\n                                broadcast (tt v)\n                            else\n                                if <(\cos) = [7]> then\n                                    set [kill v] to [-5]\n                                    start sound [mixkit-8-bit-lose-2031 v]\n                                    set [t v] to (-k)\n                                    broadcast (tt v)\n                                else\n                                    if <(\cos) = [6]> then\n                                        set [kill v] to [-2]\n                                    else\n                                        set [kill v] to [-1]\n                                        start sound [mixkit-metal-hammer-hit-833 v]\n                                    end\n                                end\n                            end\n                        end\n                    else\n                        set [kill v] to [-1]\n                        start sound [mixkit-metal-hammer-hit-833 v]\n                    end\n                end\n            end\n        end\n    else\n        set [kill v] to [-1]\n        start sound [mixkit-metal-hammer-hit-833 v]\n        if <<<(/P) = [3]> or <(/P) = [4]>> or <<(/P) = [1]> or <(/P) = [2]>>> then\n            if <<<(/P) = [3]> or <(/P) = [4]>> or <<(/P) = [2]> and <(pick random (1) to (3)) = [3]>>> then\n                set [kill v] to [-2]\n            else\n                set [kill v] to [-1]\n            end\n            if <<(/P) = [3]> or <(/P) = [4]>> then\n                start sound [mixkit-8-bit-lose-2031 v]\n                set [t v] to (-k)\n                broadcast (tt v)\n            else\n                start sound [mixkit-metal-hammer-hit-833 v]\n            end\n        else\n            if <(/P) = [5]> then\n                set [kill v] to [-10]\n                set [t v] to (-k)\n                broadcast (tt v)\n            else\n                if <(/P) = [7]> then\n                    set [kill v] to [-5]\n                    start sound [mixkit-8-bit-lose-2031 v]\n                    set [t v] to (-k)\n                    broadcast (tt v)\n                else\n                    if <(/P) = [6]> then\n                        if <<<(cos) = [3]> or <(cos) = [4]>> or <<(cos) = [1]> or <(cos) = [2]>>> then\n                            if <<<(cos) = [3]> or <(cos) = [4]>> or <<(cos) = [2]> and <(pick random (1) to (3)) = [3]>>> then\n                                set [kill v] to [-2]\n                            else\n                                set [kill v] to [-1]\n                            end\n                            if <<(cos) = [3]> or <(cos) = [4]>> then\n                                start sound [mixkit-8-bit-lose-2031 v]\n                                set [t v] to (-k)\n                                broadcast (tt v)\n                            else\n                                start sound [mixkit-metal-hammer-hit-833 v]\n                            end\n                        else\n                            if <(cos) = [5]> then\n                                set [kill v] to [-10]\n                                set [t v] to (-k)\n                                broadcast (tt v)\n                            else\n                                if <(cos) = [7]> then\n                                    set [kill v] to [-5]\n                                    start sound [mixkit-8-bit-lose-2031 v]\n                                    set [t v] to (-k)\n                                    broadcast (tt v)\n                                else\n                                    if <(cos) = [6]> then\n                                        set [kill v] to [-2]\n                                    else\n                                        set [kill v] to [-1]\n                                        start sound [mixkit-metal-hammer-hit-833 v]\n                                    end\n                                end\n                            end\n                        end\n                    else\n                        set [kill v] to [-1]\n                        start sound [mixkit-metal-hammer-hit-833 v]\n                    end\n                end\n            end\n        end\n    end\n    if <(chance) = [1]> then\n        go to (monster v)\n        change [monster hp v] by (KILL)\n        change [points v] by ((() - (KILL)) * (pick random (1) to (10)))\n    else\n        if <(-k) = [opponent]> then\n            change [enemy hp v] by (KILL)\n            if <(cpu) = [1]> then\n                change [points v] by ((() - (KILL)) * (pick random (1) to (10)))\n            end\n        else\n            change [player hp v] by (KILL)\n        end\n    end\n    point in direction (90)\n    switch costume to (KILL)\n    repeat (20)\n        change [ghost v] effect by (5)\n        change y by (5)\n        change x by (id)\n    end\nend\ndelete this clone\n\nset [/n v] to (item (1) of [/l v])\n\ndefine Bullet\nclear sound effects\nstart sound [pew v]\nswitch costume to (bullet v)\ngo to [back v] layer\nshow\nif <(-k) = [opponent]> then\n    if <(/N) = [2]> then\n        switch costume to (bullet-2 v)\n    end\nelse\n    if <(/P) = [2]> then\n        switch costume to (bullet-2 v)\n    end\nend\nrepeat until <<<([abs v] of (x position) ) > [240]> or <([abs v] of (y position) ) > [170]>> or <<<touching (floor v)?> and <(<M>) = [1]>> or <<touching ((-k) v)?> or <touching (monster v)?>>>>\n    move (((15) + (<(/N) = [2]> * (7))) * (frame_speed)) steps\n    if <<<<touching (side pad v)?> or <touching (jump pad v)?>> or <<touching color (#000000)?> and <(<M>) = [1]>>> or <<touching (floor v)?> and <(<M>) = [2]>>> then\n        point in direction ((direction) + (-155))\n        move ((((15) + (<(/N) = [2]> * (7))) * (2)) * (frame_speed)) steps\n    end\n    if <(-?) = [0]> then\n        if <<<<touching (fireball v)?> and <(pick random (1) to (2)) = [2]>> or <<touching (slice v)?> and <not <touching color (#e60000)?>>>> or <<(-aura) = [1]> and <(pick random (1) to (15)) = [1]>>> then\n            start sound [PM_FN_Spawns_Portals_Teleports_37 v]\n            if <(-k) = [opponent]> then\n                set [-k v] to [player]\n            else\n                set [-k v] to [opponent]\n            end\n            set [-? v] to [1]\n            point towards (-k)\n            switch costume to (bullet-3 v)\n        end\n    end\nend\n\ndefine Saw\nclear sound effects\nswitch costume to (saw v)\nclear graphic effects\nset [s v] to (pick random (3) to (5))\nstart sound (s)\nrepeat (20)\n    move (((s) * (4)) * (frame_speed)) steps\n    if on edge, bounce\n    if <<<touching (side pad v)?> or <<touching (jump pad v)?> or <touching (_edge_ v)?>>> or <touching (floor v)?>> then\n        point in direction ((direction) + (155))\n        move (((s) * (10)) * (frame_speed)) steps\n    end\n    if <<touching ((-k) v)?> or <touching (monster v)?>> then\n        stop [this script v]\n    end\n    if <(-?) = [0]> then\n        if <<<touching (slice v)?> and <not <touching color (#e80000)?>>> or <<touching (fireball v)?> and <(pick random (1) to (2)) = [1]>>> then\n            start sound [PM_FN_Spawns_Portals_Teleports_37 v]\n            if <(-k) = [opponent]> then\n                set [-k v] to [player]\n            else\n                set [-k v] to [opponent]\n            end\n            set [-? v] to [1]\n            point towards (-k)\n            switch costume to (saw-2 v)\n        end\n    end\nend\nrepeat (5)\n    move (((s) * (4)) * (frame_speed)) steps\n    if <<<touching (side pad v)?> or <<touching (jump pad v)?> or <touching (_edge_ v)?>>> or <touching (floor v)?>> then\n        point in direction ((direction) + (155))\n        move (((s) * (10)) * (frame_speed)) steps\n    end\n    change [ghost v] effect by (20)\nend\n\nwhen I receive [select_mode v]\nrepeat (100)\n    set [/n v] to ([costume # v] of [characters & effects v])\nend\n\ndefine Ball\nstart sound [create v]\nclear graphic effects\nset [-bx v] to [0]\nset [-by v] to [0]\nset [s v] to (pick random (3) to (5))\nset [-t v] to [0]\nset [-cc v] to [0]\nset [-ugh v] to [true]\ngo to [front v] layer\nswitch costume to (glow_ball v)\nif <(-k) = [opponent]> then\n    if <(/N) = [4]> then\n        switch costume to (glow_ball-2 v)\n    end\nelse\n    if <(/P) = [4]> then\n        switch costume to (glow_ball-2 v)\n    end\nend\nrepeat until <<<<([abs v] of (x position) ) > [230]> or <([abs v] of (y position) ) > [180]>> and <not <(-UGH) = [false]>>> or <(-cc) > [99]>>\n    if <(-k) = [opponent]> then\n        set [-ugh v] to <not <(/N) = [4]>>\n    else\n        set [-ugh v] to <not <(/P) = [4]>>\n    end\n    change x by (-bx)\n    change y by (-by)\n    change [-bx v] by (((([x position v] of (-k)) - (x position)) / (200)) * (frame_speed))\n    change [-by v] by (((([y position v] of (-k)) - (y position)) / (200)) * (frame_speed))\n    if <<touching ((-k) v)?> or <touching (monster v)?>> then\n        change [-t v] by (1)\n        if <(-t) > [5]> then\n            stop [this script v]\n        end\n    else\n        if <(-k) = [opponent]> then\n            if <(/N) = [3]> then\n                set [-t v] to [0]\n            end\n        else\n            if <(/P) = [3]> then\n                set [-t v] to [0]\n            end\n        end\n    end\n    if <(-k) = [opponent]> then\n        if <(/N) = [4]> then\n            change [ghost v] effect by (1)\n            change [-cc v] by (1)\n            if <<([abs v] of (x position) ) > [240]> or <([abs v] of (y position) ) > [190]>> then\n                hide\n            else\n                show\n            end\n        end\n    else\n        if <(/P) = [4]> then\n            change [ghost v] effect by (1)\n            change [-cc v] by (1)\n            if <<([abs v] of (x position) ) > [240]> or <([abs v] of (y position) ) > [190]>> then\n                hide\n            else\n                show\n            end\n        end\n    end\n    if <(-?) = [0]> then\n        if <<<touching (slice v)?> and <not <touching color (#e80000)?>>> or <<touching (fireball v)?> and <(pick random (1) to (2)) = [2]>>> then\n            move (10) steps\n            start sound [PM_FN_Spawns_Portals_Teleports_37 v]\n            if <(-k) = [opponent]> then\n                set [-k v] to [player]\n            else\n                set [-k v] to [opponent]\n            end\n            set [-t v] to [0]\n            set [-? v] to [1]\n            switch costume to (glow_ball-3 v)\n        end\n    end\nend\n\ndefine Laser\nbroadcast (lockk v)\nset size to (125) %\nclear graphic effects\nhide\nset [-t v] to [0]\nset [frame_speed v] to (pick random (0.03) to (0.1))\nstart sound [cannon_blast v]\nswitch costume to (laser v)\nswitch backdrop to (special_game v)\nwait (1.55) seconds\nset [s v] to (pick random (20) to (40))\ngo to [front v] layer\nshow\nif <(-k) = [opponent]> then\n    go to (player v)\n    change y by (<(/N) = [7]> * (10))\n    if <(chance) = [1]> then\n        point towards (monster v)\n    else\n        point towards (mouse-pointer v)\n    end\nelse\n    go to (opponent v)\n    if <(chance) = [1]> then\n        point towards (monster v)\n    else\n        point towards (player v)\n    end\nend\nrepeat (75)\n    if <(-k) = [opponent]> then\n        go to (player v)\n        change y by (<(/N) = [7]> * (10))\n    else\n        go to (opponent v)\n    end\n    change [ghost v] effect by ((100) / (75))\n    if <<touching ((-k) v)?> or <touching (monster v)?>> then\n        change [-t v] by (1)\n        if <(-t) > [35]> then\n            switch backdrop to ((<M>) + (1))\n            set [frame_speed v] to [1]\n            stop [this script v]\n        end\n    end\n    if <(-?) = [0]> then\n        if <<touching (slice v)?> and <not <touching color (#e60000)?>>> then\n            start sound [PM_FN_Spawns_Portals_Teleports_37 v]\n            if <(-k) = [opponent]> then\n                set [-k v] to [player]\n                point towards (player v)\n            else\n                set [-k v] to [opponent]\n                point in direction ((360) - (direction))\n            end\n            set [-? v] to [1]\n        end\n    end\nend\nset [frame_speed v] to [1]\nswitch backdrop to ((<M>) + (1))\n\ngo to (random position v)\n\nbroadcast (- v)\n\nwhen I receive [- v]\ndelete this clone\n\nwhen I receive [select_mode v]\ndelete this clone\n\nwhen I receive [startup v]\ndelete this clone\n\npoint in direction (90)\n\npoint towards (monster v)\n\nset [-? v] to [0]\n\n@select\n\ndefine Glide (x) (y) (speed)\nreset timer\nrepeat until <<(timer) > [3]> or <<(round (x position)) = (x)> and <(round (y position)) = (y)>>>\n    change x by (((x) - (x position)) / (speed))\n    change y by (((y) - (y position)) / (speed))\nend\n\nwhen flag clicked\nerase all\ngo to [back v] layer\nset size to (100) %\nhide\nset [# v] to [select_screen]\ncreate clone of (_myself_ v)\nwait (2) seconds\nset [# v] to [vs_computer]\ncreate clone of (_myself_ v)\nset [# v] to [multiplayer]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nswitch costume to (#)\nif <(#) = [stand]> then\n    go to x: (0) y: (-300)\n    show\n    go to [back v] layer\n    glide (0.7) secs to x: (0) y: (-100)\nend\nif <(#) = [right]> then\n    go to x: (100) y: (0)\n    show\nend\nif <(#) = [left]> then\n    go to x: (-100) y: (0)\n    show\nend\nif <(#) = [play]> then\n    go to x: (0) y: (-90)\n    show\nend\nif <<(#) = [mode]> or <(#) = [select_screen]>> then\n    go to x: (467) y: (0)\n    show\n    glide (0.6) secs to x: (0) y: (0)\nend\nif <(#) = [single pvp]> then\n    set size to (80) %\n    go to x: (-50) y: (3000)\n    show\n    glide (0.6) secs to x: (-50) y: (100)\nend\nif <(#) = [monster chase]> then\n    set size to (80) %\n    go to x: (100) y: (-3000)\n    show\n    if <(//) = [1]> then\n        clear graphic effects\n    else\n        set [brightness v] effect to (-50)\n    end\n    glide (0.6) secs to x: (100) y: (-50)\nend\nif <(#) = [loading]> then\n    set size to (100) %\n    go to x: (0) y: (-100)\n    show\n    wait (4) seconds\n    repeat (10)\n        change y by (-10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\nif <(#) = [vs_computer]> then\n    go to x: (-100) y: (-3000)\n    set size to (85) %\n    show\n    glide (0.6) secs to x: (-100) y: (-50)\nend\nif <(#) = [multiplayer]> then\n    go to x: (125) y: (3000)\n    set size to (85) %\n    show\n    glide (0.6) secs to x: (125) y: (90)\nend\nif <(#) = [availb]> then\n    clear graphic effects\n    go to x: (0) y: (3000)\n    go to [front v] layer\n    set size to (85) %\n    show\n    Glide [0] [0] [6]\n    wait (2) seconds\n    glide (0.6) secs to x: (0) y: (-400)\n    delete this clone\nend\nif <<(#) = [singleplayer_mode]> or <(#) = [multiplayer_mode]>> then\n    go to [back v] layer\n    go to x: (0) y: (80)\n    switch costume to (#)\n    show\nend\nif <(#) = [item]> then\n    clear graphic effects\n    go to [front v] layer\n    go to x: (0) y: (0)\n    switch costume to (join (/N) [-])\n    show\nend\nif <(#) = [info]> then\n    go to [front v] layer\n    go to x: (162) y: (-102)\n    switch costume to (#)\n    show\nend\n\nwhen I start as a clone\nif << [leftrightplaysingle pvp monster chasemultiplayervs_computerbuysingleplayer_modemultiplayer_modeinfoitem] contains (#)?> and <not <(#) = [mode]>>> then\n    forever\n        if <touching (mouse-pointer v)?> then\n            change size by ((((120) - (<<(costume [number v]) > [5]> and <not <(costume [number v]) = [13]>>> * (30))) - (size)) / (5))\n            if <(#) = [item]> then\n                go to [front v] layer\n                say [Click to Return]\n            end\n            if <mouse down?> then\n                set [brightness v] effect to (-50)\n                play sound [click v] until done\n            end\n        else\n            say []\n            set [brightness v] effect to (0)\n            change size by ((((100) - (<<(costume [number v]) > [5]> and <not <(costume [number v]) = [13]>>> * (20))) - (size)) / (5))\n            if <(#) = [monster chase]> then\n                if <(//) = [1]> then\n                    set [brightness v] effect to (0)\n                else\n                    set [brightness v] effect to (-75)\n                end\n            end\n        end\n        if <(costume [number v]) = [6]> then\n            replace item (1) of [size v] with (size)\n        else\n            if <(costume [number v]) = [7]> then\n                replace item (2) of [size v] with (size)\n            end\n        end\n        if < [play] contains (#)?> then\n            if <not <[unlocked v] contains (/N)?>> then\n                go to x: (0) y: (-80)\n                switch costume to (buy v)\n                show\n            else\n                switch costume to (play v)\n                go to x: (0) y: (-80)\n                show\n            end\n        end\n    end\nend\n\nwhen this sprite clicked\nif <(#) = [right]> then\n    broadcast (Next v)\nend\nif <(#) = [left]> then\n    broadcast (Previous v)\nend\nif <(#) = [play]> then\n    if <(costume [number v]) = [13]> then\n        if  then\n            add (/N) to [unlocked v]\n            change [points v] by ((((/N) + (1)) * (/N)) * (-18))\n            say [Bought!] for (2) seconds\n        else\n            say (join (join [You need at least ] ((((/N) + (1)) * (/N)) * (35))) [ points to purchase that!]) for (2) seconds\n        end\n    else\n        if <<(//) = [1]> and <not <(length of [/l v]) > [0]>>> then\n            add (/N) to [/l v]\n            broadcast (STARTUP v)\n        else\n            broadcast (select_mode v)\n        end\n    end\nend\nif <(#) = [single pvp]> then\n    set [<m> v] to [1]\n    broadcast (BEGIN v)\nend\nif <(#) = [monster chase]> then\n    if <not <(//) = [0]>> then\n        set [<m> v] to [2]\n        broadcast (BEGIN v)\n    else\n        set [# v] to [availb]\n        create clone of (_myself_ v)\n        set [# v] to [monster chase]\n    end\nend\nif <<(#) = [vs_computer]> or <(#) = [singleplayer_mode]>> then\n    set [cpu v] to [1]\n    set [// v] to [0]\n    broadcast (STARTUP v)\nend\nif <<(#) = [multiplayer]> or <(#) = [multiplayer_mode]>> then\n    set [cpu v] to [0]\n    set [// v] to [1]\n    broadcast (STARTUP v)\nend\nif <(#) = [info]> then\n    set [# v] to [item]\n    create clone of (_myself_ v)\n    set [# v] to [info]\n    hide\nend\nif <(#) = [item]> then\n    start sound [click v]\n    broadcast (< v)\n    delete this clone\nend\n\nwhen I receive [select_mode v]\nif  then\n    delete this clone\nend\nstart sound [click v]\nset [# v] to [mode]\ncreate clone of (_myself_ v)\nset [# v] to [single pvp]\ncreate clone of (_myself_ v)\nset [# v] to [monster chase]\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [cpu v] to [1]\ndelete all of [size v]\nadd [thing] to [size v]\nadd [thing] to [size v]\n\nwhen I receive [begin v]\nif <(costume [number v]) = [6]> then\n    repeat (8)\n        change y by (20)\n        change [ghost v] effect by ((100) / (30))\n    end\n    delete this clone\nend\nif <(costume [number v]) = [7]> then\n    repeat (8)\n        change y by (-20)\n        change [ghost v] effect by ((100) / (30))\n    end\n    delete this clone\nend\nif <(costume [number v]) = [5]> then\n    repeat (15)\n        change x by (40)\n        change [ghost v] effect by ((100) / (30))\n    end\n    delete this clone\nend\nwait (1) seconds\npen up\nset [# v] to [loading]\ncreate clone of (_myself_ v)\nrepeat (3)\n    set [/ v] to [0]\n    repeat (9)\n        Load\n        wait (0.1) seconds\n    end\nend\nwait (0.5) seconds\nerase all\npen up\n\nwhen flag clicked\nerase all\npen up\n\ndefine Load\npen up\nerase all\ngo to x: (20) y: (60)\nset [ghost v] effect to (100)\nset pen color to (#a0a0a0)\nset pen size to (30)\nchange [/ v] by (1)\nset [c v] to [0]\npen down\nrepeat (9)\n    pen up\n    turn right (40) degrees\n    move (40) steps\n    change [c v] by (1)\n    if <(/) = (c)> then\n        set pen color to (#5a5a5a)\n    else\n        set pen color to (#a0a0a0)\n    end\n    pen down\nend\n\nchange pen size by (1)\n\nwhen I receive [startup v]\nstop [other scripts in sprite v]\nclear graphic effects\nif <[] = []> then\n    delete this clone\nend\nwait (0.1) seconds\nstart sound [click v]\nset [# v] to [stand]\ncreate clone of (_myself_ v)\nwait (2) seconds\nset [# v] to [right]\ncreate clone of (_myself_ v)\nset [# v] to [left]\ncreate clone of (_myself_ v)\nset [# v] to [play]\ncreate clone of (_myself_ v)\nif <(//) = [0]> then\n    set [# v] to [multiplayer_mode]\nelse\n    set [# v] to [singleplayer_mode]\nend\ncreate clone of (_myself_ v)\nset [# v] to [info]\ncreate clone of (_myself_ v)\nset [# v] to []\n\nwhen flag clicked\ndelete all of [/l v]\n\nwhen I receive [begin v]\nstart sound [click v]\nwait (1) seconds\ndelete this clone\n\nwhen I receive [< v]\nif <(#) = [info]> then\n    switch costume to (info v)\n    show\nend\n\n@Slice\n\nwhen flag clicked\nhide\n\ndefine Slice\nstart sound [PM_FN_Spawns_Portals_Teleports_5 v]\nchange [kc v] by (1)\nswitch costume to (kc)\nif <(costume [number v]) = [3]> then\n    switch costume to (costume2 v)\nend\nrepeat (50)\n    change [ghost v] effect by (2)\n    move (10) steps\n    if on edge, bounce\n    if <<touching ((-/) v)?> or <touching (fireball v)?>> then\n        wait (0.1) seconds\n        stop [this script v]\n    end\nend\n\nwhen I start as a clone\nshow\nset size to (125) %\nset [id v] to (pick random (-10) to (10))\nclear graphic effects\ngo to [back v] layer\nset [-/ v] to (kil)\nif <(-/) = [opponent]> then\n    go to (player v)\n    change y by (<(/N) = [7]> * (10))\nelse\n    go to (opponent v)\nend\npoint towards (-/)\nif <<(<M>) = [2]> and <<(pick random (1) to (5)) > [1]> or <<<(-/) = [opponent]> and <(Enemy HP) < [1]>> or <<(-/) = [player]> and <(Player HP) < [1]>>>>> then\n    set [-/ v] to [monster]\n    point towards (monster v)\n    set [chance v] to [1]\nelse\n    set [chance v] to [0]\n    point towards (-/)\nend\nSlice\nif <touching ((-/) v)?> then\n    point in direction (90)\n    clear graphic effects\n    start sound [mixkit-8-bit-lose-2031 v]\n    if <(-/) = [opponent]> then\n        switch costume to (costume3 v)\n        change [enemy hp v] by (-1)\n    else\n        if <(-/) = [monster]> then\n            switch costume to (costume3 v)\n            change [monster hp v] by (-2)\n        else\n            switch costume to (costume3 v)\n            change [player hp v] by (-1)\n        end\n    end\n    repeat (10)\n        change [ghost v] effect by (10)\n        change y by (5)\n        change x by (id)\n    end\nend\nset [kc v] to [0]\ndelete this clone\n\n@win_screen\n\ndefine Glide (x) (y) (speed)\nrepeat until <<(round (x position)) = (x)> and <(round (y position)) = (y)>>\n    change x by (((x) - (x position)) / (speed))\n    change y by (((y) - (y position)) / (speed))\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [knocked_out v]\ngo to [front v] layer\ngo to x: (0) y: (3000)\nswitch costume to (costume1 v)\nbroadcast (win_char v)\ncreate clone of (_myself_ v)\nshow\ndelete all of [/l v]\nGlide [0] [0] [8]\nwait (1) seconds\nbroadcast (Hide v)\nbroadcast (STARTUP v)\nGlide [0] [-345] [8]\nhide\n\nwhen I start as a clone\ngo to x: (0) y: (3000)\ngo to [front v] layer\nif <<(Player HP) < [1]> and <(Enemy HP) < [1]>> then\n    if <(<M>) = [1]> then\n        switch costume to (cool text - draw 412214487011097 v)\n    else\n        switch costume to (cool text - the monster wins 426575636104150 v)\n    end\nelse\n    if <(Player HP) < [1]> then\n        if <(cpu) = [1]> then\n            switch costume to (cool text - computer wins 412144861223655 v)\n        else\n            switch costume to (cool text - player 2 wins 412144907785246 v)\n        end\n    else\n        if <(cpu) = [1]> then\n            switch costume to (cool text - you win 412144845769557 v)\n        else\n            switch costume to (cool text - player 1 wins 412144898192128 v)\n        end\n    end\nend\nshow\nGlide [0] [-90] [8]\nwait (1) seconds\ndelete this clone\n\ngo to (monster v)\n\n@text\n\nwhen flag clicked\nset [points v] to [0]\nhide\n\ndefine render [] in size [] segoe ui\nbroadcast (dee v)\nset [count v] to [1]\nset [size v] to (size)\nclear graphic effects\ndelete (all) of [letters v]\nrepeat until <(count) = ((length of (string)) + (1))>\n    add (letter (count) of (string)) to [letters v]\n    change [count v] by (1)\nend\nswitch costume to (item (1) of [letters v])\nset [brightness v] effect to (100)\nset size to (size) %\nhide\nset [count v] to [1]\nrepeat ((length of [letters v]) - (1))\n    create clone of (_myself_ v)\n    move (((item (costume [number v]) of [length v]) + (2)) * ((size) / (100))) steps\n    change [count v] by (1)\n    switch costume to (item (count) of [letters v])\n    if <(x position) > [190]> then\n        set x to (-212)\n        change y by (-34)\n    end\nend\ncreate clone of (_myself_ v)\nhide\n\nwhen I start as a clone\ngo to [back v] layer\nset size to (150) %\nswitch costume to (a v)\nset size to (size) %\nswitch costume to (item (count) of [letters v])\nshow\n\nwhen I receive [clear text v]\ndelete this clone\n\ngo to x: (-212) y: (126)\nrender [Hi there!  :\)] in size (80) segoe ui\ngo to x: (-210) y: (87)\nrender [I'm a text renderer.] in size (100) segoe ui\n\nwhen I receive [dee v]\ndelete this clone\n\nwhen I receive [startup v]\nif <([abs v] of (Points) ) > [100000]> then\n    forever\n        broadcast (dee v)\n        go to x: (80) y: (160)\n        render (join [Points: ] (join [1e] ((round ([log v] of ([abs v] of (Points) ) )) * ((Points) / ([abs v] of (Points) ))))) in size (60) segoe ui\n    end\nelse\n    forever\n        broadcast (dee v)\n        go to x: ((130) - ((length of (Points)) * (12))) y: (160)\n        render (join [Points: ] (Points)) in size (60) segoe ui\n    end\nend\n\nwhen I receive [select_mode v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@lock\n\nwhen flag clicked\nset [/n v] to [1]\nhide\ndelete all of [unlocked v]\nadd [1] to [unlocked v]\n\nwhen I receive [startup v]\nforever\n    go to x: (30) y: (0)\n    if <not <[unlocked v] contains (/N)?>> then\n        go to [front v] layer\n        go [backward v] (1) layers\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [select_mode v]\nstop [other scripts in sprite v]\nhide\n\n@fire\n\nwhen flag clicked\nhide\n\nwhen I receive [begin v]\nwait (5) seconds\nif <(<M>) = [2]> then\n    go to x: (-200) y: (-143)\n    hide\n    repeat (12)\n        create clone of (_myself_ v)\n        change x by (40)\n    end\nend\n\nwhen I start as a clone\nshow\nforever\n    wait (pick random (0.05) to (0.06)) seconds\n    next costume\n    set [color v] effect to (pick random (-3) to (10))\n    set [ghost v] effect to (pick random (0) to (100))\nend\n\nwhen I receive [-kill v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [knocked_out v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@fireball\n\nwhen flag clicked\nhide\n\nwhen I receive [begin v]\nif <(<M>) = [2]> then\n    wait (5) seconds\n    forever\n        wait (pick random (1) to (11)) seconds\n        set size to (([size v] of [monster v]) / (1.6)) %\n        repeat ((200) / ([size v] of [monster v]))\n            create clone of (_myself_ v)\n            wait (1) seconds\n        end\n    end\nend\n\nwhen I start as a clone\nstart sound [short-fireball-woosh-6146 v]\nset [color v] effect to (150)\ngo to (monster v)\nshow\ngo to [back v] layer\npoint in direction ([direction v] of [monster v])\nchange y by ((pick random (-100) to (100)) / ((200) / (size)))\nset [trgt v] to [player]\nforever\n    next costume\n    wait (0.1) seconds\nend\n\nwhen I start as a clone\nforever\n    move ((200) / ((size) / (1.3))) steps\n    if <([abs v] of (x position) ) > [240]> then\n        delete this clone\n    end\n    if <(trgt) = [player]> then\n        if <touching (player v)?> then\n            start sound [mixkit-shot-light-explosion-1682 v]\n            change [player hp v] by (-15)\n            set [xv v] to ((direction) / (9))\n            set [yv v] to [15]\n            set [0x v] to (x position)\n            set [0y v] to (y position)\n            create clone of (explosion v)\n            delete this clone\n        end\n        if <touching (opponent v)?> then\n            start sound [mixkit-shot-light-explosion-1682 v]\n            change [enemy hp v] by (-15)\n            set [ox v] to ((direction) / (9))\n            set [oy v] to [15]\n            set [0x v] to (x position)\n            set [0y v] to (y position)\n            create clone of (explosion v)\n            delete this clone\n        end\n    end\n    if <(trgt) = [monster]> then\n        if <touching (monster v)?> then\n            start sound [mixkit-shot-light-explosion-1682 v]\n            change [monster hp v] by (-20)\n            set [0x v] to (x position)\n            set [0y v] to (y position)\n            create clone of (explosion v)\n            broadcast (--- v)\n            delete this clone\n        end\n    end\n    if <touching (slice v)?> then\n        start sound [reversed v]\n        set [color v] effect to (150)\n        turn right (180) degrees\n        set [trgt v] to [monster]\n        move (10) steps\n    end\nend\n\nwhen I receive [-kill v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [knocked_out v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@EXPLOSION\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nclear graphic effects\nset size to (75) %\ngo to x: (0X) y: (0Y)\nswitch costume to (623cdcca882db2d7efa8d32424a61d29_w200 v)\nshow\nrepeat (11)\n    go to [front v] layer\n    next costume\n    change [ghost v] effect by ((100) / (11))\n    wait (0.05) seconds\nend\ndelete this clone\n\n@lava\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nerase all\npen up\ngo to x: (pick random (-39) to (80)) y: (-182)\nset [y v] to (pick random (0.1) to (INTENSITY))\nshow\nset size to (pick random (5) to (100)) %\nrepeat (100)\n    change [ghost v] effect by (1)\n    change [y v] by (-0.03)\n    change y by (y)\n    if <(y position) < [-180]> then\n        set [y v] to (pick random (0.1) to (2))\n    end\n    if <<touching (player v)?> or <touching (opponent v)?>> then\n        delete this clone\n    end\nend\ndelete this clone\n\n@wall\n\nwhen flag clicked\nhide\n\nwhen I receive [begin v]\nwait (5.2) seconds\nif <([costume # v] of [floor v]) = [3]> then\n    go to x: (-75) y: (-107)\n    show\n    forever\n        repeat (20)\n            change y by (10)\n        end\n        repeat (20)\n            change y by (-10)\n        end\n    end\nend\n\nwhen I receive [knocked_out v]\nstop [other scripts in sprite v]\nhide\n\n@potion\n\nwhen flag clicked\nhide\n\nwhen I receive [begin v]\nwait (5) seconds\nif <(<M>) = [1]> then\n    forever\n        set size to (0) %\n        go to x: (pick random (-180) to (180)) y: (pick random (-115) to (164))\n        show\n        repeat (10)\n            change size by (((50) - (size)) / (5))\n        end\n        repeat (200)\n            change y by (([cos v] of ((timer) * (200)) ) / (2))\n            if <touching (player v)?> then\n                set [frame_speed v] to [0.08]\n                start sound [heal v]\n                repeat (10)\n                    change [player hp v] by (2)\n                    change size by (((0) - (size)) / (5))\n                    if <(Player HP) > [100]> then\n                        set [player hp v] to [100]\n                    end\n                end\n                hide\n                set [frame_speed v] to [1]\n            end\n            if <touching (opponent v)?> then\n                set [frame_speed v] to [0.08]\n                start sound [heal v]\n                repeat (10)\n                    change [enemy hp v] by (2)\n                    change size by (((0) - (size)) / (5))\n                    if <(Enemy HP) > [100]> then\n                        set [enemy hp v] to [100]\n                    end\n                end\n                hide\n                set [frame_speed v] to [1]\n            end\n        end\n        repeat (10)\n            change size by (((0) - (size)) / (5))\n        end\n        hide\n        wait (pick random (15) to (20)) seconds\n    end\nend\n\nwhen I receive [knocked_out v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@thumbnail\n\nwhen flag clicked\ngo to [front v] layer\ngo to x: (0) y: (0)\nshow\nwait (1) seconds\nglide (0.2) secs to x: (0) y: (-400)\nhide\n\n