Psyker (Pixel Platformer)

Instructions: NOTE: Aim telekinesis with mouse!\nThe official studio: https://scratch.mit.edu/studios/5075667/ \nThe teaser trailer for the next one (Psyker II): https://scratch.mit.edu/projects/222174709/\nLink to the next one (Psyker II): https://scratch.mit.edu/projects/222564166/\nPysker - My first battle oriented platformer...\nIn the game, you take on the role of a Psyker (Someone who can control psychic energy) who is on a quest to save the world from the evil pyromancer (fire controller), Nika. Throughout the game you encounter various enemies and challenges you have to tackle with your skills. \n\nInstructions:\nUse the arrow keys to move *WASD support added!\nZ key to switch skills\nSpace to use a skill

@Stage\n\nwhen I receive [next level v]\nnext backdrop\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen flag clicked\n\nstop all sounds\n\n@Mika\n\nwhen flag clicked\nset [level v] to [1]\nset size to (300) %\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [xv v] by (1)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (1)\n                        if <touching color (#000000)?> then\n                            change x by ((Xv) * (-1))\n                            change y by (-1)\n                            change y by (-5)\n                            change y by (1)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    if <not <touching color (#00ffff)?>> then\n        change [yv v] by (-1)\n    else\n        change [yv v] by (-0.3)\n    end\n    change y by (Yv)\n    if <touching color (#000000)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#000000)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [yv v] to [15]\n        end\n    end\n    change y by (1)\n    if <touching color (#00ffff)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            change [yv v] by (1.2)\n        end\n        if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n            change [yv v] by (-0.6)\n        end\n        set [yv v] to ((Yv) * (0.8))\n    end\nend\n\nwhen flag clicked\ngo to x: (-230) y: (-50)\nforever\n    if <[235] < (x position)> then\n        broadcast (next level v)\n        change [level v] by (1)\n        go to x: (-230) y: (-50)\n    end\n    if <<<(y position) < [-179]> or <<touching color (#ff0000)?> and <not <(level) = [24]>>>> or <touching (water boomerangs v)?>> then\n        go to x: (-230) y: (-50)\n        broadcast (death v)\n    end\nend\n\nwhen backdrop switches to [backdrop4 v]\ngo to x: (-222) y: (62)\n\nwhen [o v] key pressed\nbroadcast (next level v)\nchange [level v] by (1)\ngo to x: (-230) y: (-50)\n\nwhen backdrop switches to [backdrop9 v]\ngo to x: (-225) y: (120)\n\nwhen [space v] key pressed\nif <(curr_power) = [2]> then\n    broadcast (light laser v)\nend\nwait (1) seconds\n\nwhen backdrop switches to [backdrop24 v]\ngo to x: (-189) y: (-134)\n\nwhen backdrop switches to [backdrop12 v]\ngo to x: (-221) y: (84)\n\nwhen I receive [death v]\nif <(level) = [4]> then\n    go to x: (-222) y: (62)\nend\nif <(level) = [9]> then\n    go to x: (-225) y: (120)\nend\nif <(level) = [12]> then\n    go to x: (-221) y: (84)\nend\nif <(level) = [24]> then\n    go to x: (-189) y: (-134)\nend\n\nwhen I receive [boss battle v]\nforever\n    if <touching (fireballs v)?> then\n        change [mikahp v] by (-1)\n        wait (0.15) seconds\n    end\n    if <touching (fire boomerang v)?> then\n        change [mikahp v] by (-1.5)\n        wait (0.15) seconds\n    end\nend\n\nwhen I receive [boss battle v]\ngo to x: (-189) y: (-134)\nset [mikahp v] to [50]\nset [nikahp v] to [100]\n\n@Moving Objects\n\nwhen flag clicked\nset [whirl v] to [0]\nset size to (300) %\nhide\nswitch costume to (box v)\n\nwhen backdrop switches to [backdrop3 v]\ngo to x: (-171) y: (-111)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nforever\n    if <<not <touching (mika v)?>> and <(y position) > [-150]>> then\n        set [xv v] to ((Xv) * (0.9))\n        change x by (Xv)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (1)\n                        if <touching color (#000000)?> then\n                            change y by (1)\n                            if <touching color (#000000)?> then\n                                change x by ((Xv) * (-1))\n                                change y by (-5)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        if <not <touching color (#00ffff)?>> then\n            change [yv v] by (-1)\n        else\n            change [yv v] by (-0.3)\n            set [yv v] to ((Yv) * (0.8))\n        end\n        change y by (Yv)\n        if <touching color (#000000)?> then\n            change y by ((Yv) * (-1))\n            set [yv v] to [0]\n        end\n    end\nend\n\nwhen I receive [next level v]\ndelete this clone\n\nwhen backdrop switches to [backdrop4 v]\ngo to x: (-123) y: (64)\ncreate clone of (_myself_ v)\ngo to x: (-191) y: (64)\ncreate clone of (_myself_ v)\n\nwhen backdrop switches to [backdrop5 v]\nswitch costume to (evil statue v)\ngo to x: (19) y: (-119)\ncreate clone of (_myself_ v)\ngo to x: (-43) y: (-119)\ncreate clone of (_myself_ v)\ngo to x: (45) y: (-119)\ncreate clone of (_myself_ v)\nswitch costume to (box v)\n\nwhen I start as a clone\nforever\n    if <(whirl) = [100]> then\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        delete this clone\n    end\nend\n\nwhen backdrop switches to [backdrop6 v]\nswitch costume to (box v)\ngo to x: (-174) y: (-109)\ncreate clone of (_myself_ v)\nswitch costume to (evil statue v)\ngo to x: (-45) y: (-87)\ncreate clone of (_myself_ v)\ngo to x: (64) y: (-90)\ncreate clone of (_myself_ v)\n\nwhen backdrop switches to [backdrop7 v]\nswitch costume to (box v)\ngo to x: (-144) y: (-121)\ncreate clone of (_myself_ v)\nswitch costume to (evil statue v)\ngo to x: (63) y: (-75)\ncreate clone of (_myself_ v)\ngo to x: (161) y: (-20)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nforever\n    if <touching (telekin v)?> then\n        point towards (mouse-pointer v)\n        move (5) steps\n        change [xv v] by (((x position) - (oldx)) / (8))\n        change [yv v] by (((y position) - (oldy)) / (8))\n        if <(costume [number v]) = [2]> then\n            change [whirl v] effect by (10)\n            change [whirl v] by (10)\n        end\n    end\n    set [oldx v] to (x position)\n    set [oldy v] to (y position)\nend\n\nwhen backdrop switches to [backdrop8 v]\nswitch costume to (box v)\ngo to x: (-134) y: (-100)\ncreate clone of (_myself_ v)\n\nwhen backdrop switches to [backdrop9 v]\nswitch costume to (box v)\ngo to x: (-112) y: (119)\ncreate clone of (_myself_ v)\ngo to x: (113) y: (119)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nforever\n    if <touching (ai v)?> then\n        if <[3] < ([abs v] of (Yv) )> then\n            broadcast (hit v)\n        end\n    end\nend\n\nwhen backdrop switches to [backdrop11 v]\nswitch costume to (box v)\ngo to x: (-148) y: (-110)\ncreate clone of (_myself_ v)\nswitch costume to (evil statue v)\ngo to x: (-148) y: (-73)\ncreate clone of (_myself_ v)\n\nwhen backdrop switches to [backdrop15 v]\ngo to x: (-51) y: (65)\ncreate clone of (_myself_ v)\nrepeat (2)\n    change x by (30)\n    create clone of (_myself_ v)\nend\n\nwhen backdrop switches to [backdrop18 v]\nswitch costume to (box v)\ngo to x: (-127) y: (-132)\ncreate clone of (_myself_ v)\ngo to x: (154) y: (-135)\ncreate clone of (_myself_ v)\n\n@Selected Power\n\nwhen flag clicked\nswitch costume to (1 v)\nhide\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\nwhen [z v] key pressed\nif <[9] < (level)> then\n    next costume\n    if <(level) < [22]> then\n        if <(costume [number v]) = [3]> then\n            switch costume to (1 v)\n        end\n    end\n    set [curr_power v] to (costume [number v])\nend\nwait (0.25) seconds\n\n@Telekin\n\nwhen flag clicked\nset size to (150) %\nset [tele_on v] to [0]\nset [curr_power v] to [0]\nhide\n\nwhen backdrop switches to [backdrop3 v]\nset [curr_power v] to [1]\nforever\n    if <(curr_power) = [1]> then\n        if <key (space v) pressed?> then\n            set [tele_on v] to [1]\n            generate telekenisis\n        else\n            set [tele_on v] to [0]\n        end\n    end\nend\n\nwhen I start as a clone\nwait (0.02) seconds\ndelete this clone\n\ndefine generate telekenisis\ngo to (mika v)\nrepeat (15)\n    if <touching color (#999900)?> then\n        stop [this script v]\n    end\n    if <touching (nika v)?> then\n        if <(pick random (1) to (2)) = [2]> then\n            stop [this script v]\n        end\n    end\n    show\n    create clone of (_myself_ v)\n    hide\n    change x by (((mouse x) - (x position)) / (15))\n    change y by (((mouse y) - (y position)) / (15))\nend\n\n@AI\n\nwhen backdrop switches to [backdrop8 v]\ngo to x: (27) y: (-113)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    set [xv v] to ((Xv) * (0.8))\n    change x by (Xv)\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (1)\n                        if <touching color (#000000)?> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    if <not <touching color (#00ffff)?>> then\n        change [yv v] by (-1)\n    else\n        change [yv v] by (-0.3)\n        set [yv v] to ((Yv) * (0.8))\n    end\n    change y by (Yv)\n    if <touching color (#000000)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(immo) = [0]> then\n        if <(distance to [mika v]) > [100]> then\n            change [xv v] by ((((x position) - ([x position v] of [mika v])) / (300)) * (-1))\n            if <(Yv) < [8]> then\n                change [yv v] by ((((y position) - ([y position v] of [mika v])) / (900)) * (-1))\n            else\n                set [yv v] to [-4]\n            end\n        end\n    end\nend\n\nwhen I receive [next level v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <touching (telekin v)?> then\n        point towards (mouse-pointer v)\n        move (5) steps\n        change [xv v] by (((x position) - (oldx)) / (8))\n        change [yv v] by (((y position) - (oldy)) / (8))\n    end\n    set [oldx v] to (x position)\n    set [oldy v] to (y position)\nend\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [1]> then\n        wait (pick random (0.8) to (1.5)) seconds\n        set [sendx v] to (x position)\n        set [sendy v] to (y position)\n        broadcast (fireball v)\n    end\n    if <(costume [number v]) = [2]> then\n        wait (pick random (1) to (1.5)) seconds\n        set [sendx v] to (x position)\n        set [sendy v] to (y position)\n        broadcast (waterball v)\n    end\nend\n\nwhen I start as a clone\nforever\n    if <<<touching (moving objects v)?> and <(tele_on) = [1]>> or <(y position) < [-170]>> then\n        stop [other scripts in sprite v]\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        delete this clone\n    end\nend\n\nwhen backdrop switches to [backdrop9 v]\ngo to x: (27) y: (-113)\ncreate clone of (_myself_ v)\ngo to x: (-55) y: (-115)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [hp v] to (pick random (2) to (3))\nforever\n    if <touching (light lasers v)?> then\n        change [hp v] by (-1)\n        change [brightness v] effect by (50)\n        wait (0.5) seconds\n        change [brightness v] effect by (-50)\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(HP) < [1]> then\n        stop [other scripts in sprite v]\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        delete this clone\n    end\nend\n\nwhen I receive [hit v]\nif <touching (moving objects v)?> then\n    stop [other scripts in sprite v]\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\nwhen backdrop switches to [backdrop11 v]\ngo to x: (36) y: (28)\ncreate clone of (_myself_ v)\ngo to x: (123) y: (-52)\ncreate clone of (_myself_ v)\n\nwhen backdrop switches to [backdrop10 v]\ngo to x: (64) y: (-116)\ncreate clone of (_myself_ v)\n\nwhen backdrop switches to [backdrop12 v]\ngo to x: (-186) y: (-115)\ncreate clone of (_myself_ v)\ngo to x: (191) y: (-114)\ncreate clone of (_myself_ v)\n\nwhen backdrop switches to [backdrop13 v]\nset [immo v] to [1]\ngo to x: (14) y: (-115)\ncreate clone of (_myself_ v)\ngo to x: (216) y: (-114)\ncreate clone of (_myself_ v)\nset [immo v] to [0]\n\nwhen backdrop switches to [backdrop16 v]\nswitch costume to (water v)\ngo to x: (-41) y: (-135)\ncreate clone of (_myself_ v)\n\nwhen backdrop switches to [backdrop17 v]\nset [immo v] to [1]\ngo to x: (-64) y: (87)\ncreate clone of (_myself_ v)\ngo to x: (171) y: (46)\ncreate clone of (_myself_ v)\ngo to x: (86) y: (-45)\ncreate clone of (_myself_ v)\nset [immo v] to [0]\n\nwhen backdrop switches to [backdrop18 v]\ngo to x: (-48) y: (-136)\ncreate clone of (_myself_ v)\ngo to x: (208) y: (-138)\ncreate clone of (_myself_ v)\n\nwhen backdrop switches to [backdrop19 v]\ngo to x: (-120) y: (-137)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [1]> then\n        if <touching color (#00ffff)?> then\n            stop [other scripts in sprite v]\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            delete this clone\n        end\n    end\n    if <(costume [number v]) = [2]> then\n        if <not <touching color (#00ffff)?>> then\n            stop [other scripts in sprite v]\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            delete this clone\n        end\n    end\nend\n\nwhen backdrop switches to [backdrop20 v]\nswitch costume to (pyro v)\ngo to x: (-120) y: (-137)\ncreate clone of (_myself_ v)\n\nwhen backdrop switches to [backdrop21 v]\nswitch costume to (water v)\ngo to x: (0) y: (-44)\ncreate clone of (_myself_ v)\ngo to x: (155) y: (49)\ncreate clone of (_myself_ v)\n\nwhen backdrop switches to [backdrop23 v]\nswitch costume to (pyro v)\ngo to x: (62) y: (92)\ncreate clone of (_myself_ v)\ngo to x: (-19) y: (1)\ncreate clone of (_myself_ v)\ngo to x: (169) y: (-64)\ncreate clone of (_myself_ v)\n\nwhen I receive [pyro appear v]\nif <(clone?) = [0]> then\n    go to x: (-7) y: (80)\n    switch costume to (pyro v)\n    set [clone? v] to [1]\n    create clone of (_myself_ v)\n    set [clone? v] to [0]\nend\n\nwhen flag clicked\nset [immo v] to [0]\nset [clone? v] to [0]\nset size to (300) %\nswitch costume to (pyro v)\nhide\n\nwhen I receive [boss battle v]\ndelete this clone\n\nwhen I receive [way out v]\ndelete this clone\n\n@Fireballs\n\nwhen flag clicked\nhide\nset size to (200) %\nset [clone? v] to [0]\nset [whirl v] to [0]\n\nwhen I receive [fireball v]\nif <(clone?) = [0]> then\n    go to x: (sendx) y: (sendy)\n    set [clone? v] to [1]\n    create clone of (_myself_ v)\n    set [clone? v] to [0]\nend\n\nwhen I start as a clone\nshow\npoint towards (mika v)\nrepeat (5)\n    move (10) steps\nend\nrepeat until <<<<touching color (#000000)?> or <touching (_edge_ v)?>> or <touching (moving objects v)?>> or <touching (force field v)?>>\n    move (10) steps\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <<touching (mika v)?> or <touching (light lasers v)?>> then\n        wait (0.1) seconds\n        delete this clone\n    end\nend\n\nwhen I receive [next level v]\ndelete this clone\n\nwhen I receive [next level v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <touching color (#00ffff)?> then\n        change [whirl v] effect by (10)\n        change [whirl v] by (10)\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(whirl) > [99]> then\n        delete this clone\n    end\nend\n\n@Light Lasers\n\nwhen flag clicked\nhide\nset size to (200) %\nset [clone? v] to [0]\n\nwhen I receive [light laser v]\nif <(clone?) = [0]> then\n    go to (mika v)\n    set [clone? v] to [1]\n    create clone of (_myself_ v)\n    set [clone? v] to [0]\nend\n\nwhen I start as a clone\nshow\npoint towards (mouse-pointer v)\nrepeat (5)\n    move (10) steps\nend\nrepeat until <<<<touching color (#000000)?> or <touching (_edge_ v)?>> or <touching (moving objects v)?>> or <touching (force field v)?>>\n    move (10) steps\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <<touching (ai v)?> or <touching (fireballs v)?>> then\n        wait (0.1) seconds\n        delete this clone\n    end\nend\n\n@Water Boomerangs\n\nwhen flag clicked\nhide\nset size to (200) %\nset [whirl v] to [0]\nset [clone? v] to [0]\n\nwhen I receive [waterball v]\nif <(clone?) = [0]> then\n    go to x: (sendx) y: (sendy)\n    set [clone? v] to [1]\n    create clone of (_myself_ v)\n    set [clone? v] to [0]\nend\n\nwhen I start as a clone\nforever\n    if <<touching (mika v)?> or <touching (light lasers v)?>> then\n        wait (0.1) seconds\n        delete this clone\n    end\nend\n\nwhen I receive [next level v]\ndelete this clone\n\nwhen I start as a clone\nshow\npoint towards (mika v)\nrepeat (5)\n    turn right (5) degrees\n    move (10) steps\n    change [whirl v] by (1)\nend\nrepeat until <<<<touching color (#000000)?> or <touching (_edge_ v)?>> or <touching (moving objects v)?>> or <[24] < (whirl)>>\n    turn right (5) degrees\n    move (10) steps\n    change [whirl v] by (1)\nend\nrepeat (whirl)\n    move (-10) steps\n    turn left (5) degrees\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\n@Force Field\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop22 v]\nforever\n    if <<key (space v) pressed?> and <(curr_power) = [3]>> then\n        switch costume to (costume1 v)\n        go to (mika v)\n        show\n        repeat (15)\n            go to (mika v)\n            next costume\n            wait (0.33) seconds\n        end\n        hide\n        wait (2) seconds\n    end\nend\n\n@Nika\n\nwhen flag clicked\nset size to (300) %\ngo to x: (-17) y: (-44)\nhide\nset [xv v] to [0]\nset [yv v] to [0]\nset [jumped? v] to [30]\n\nwhen I receive [boss battle v]\nforever\n    if <<(y position) < (([y position v] of [mika v]) - (100))> or <(([y position v] of [mika v]) - (-100)) < (y position)>> then\n        if <(jumped?) < [1]> then\n            set [yv v] to [15]\n            set [jumped? v] to [30]\n        end\n    end\nend\n\nwhen I receive [boss battle v]\ngo to x: (-17) y: (-44)\nforever\n    change [jumped? v] by (-1)\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (1)\n                        if <touching color (#000000)?> then\n                            change x by ((Xv) * (-1))\n                            change y by (-1)\n                            change y by (-5)\n                            change y by (1)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    if <not <touching color (#00ffff)?>> then\n        change [yv v] by (-1)\n    else\n        change [yv v] by (-0.3)\n    end\n    change y by (Yv)\n    if <touching color (#000000)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\nend\n\nwhen backdrop switches to [backdrop24 v]\nshow\n\nwhen I receive [boss battle v]\nforever\n    if <(distance to [mika v]) > [50]> then\n        change [xv v] by ((((x position) - ([x position v] of [mika v])) / (300)) * (-1))\n    end\nend\n\nwhen I receive [boss battle v]\nforever\n    if <touching (telekin v)?> then\n        change [nikahp v] by (-0.05)\n    end\n    if <touching (light lasers v)?> then\n        change [nikahp v] by (-1)\n    end\nend\n\nwhen I receive [boss battle v]\nforever\n    wait (pick random (3.9) to (5)) seconds\n    repeat (2)\n        set [sendx v] to (x position)\n        set [sendy v] to (y position)\n        broadcast (fireball v)\n        wait (0.2) seconds\n    end\nend\n\nwhen I receive [boss battle v]\nforever\n    wait (pick random (1.9) to (3)) seconds\n    repeat (3)\n        broadcast (fire boomerang v)\n        wait (0.2) seconds\n    end\nend\n\nwhen I receive [boss battle v]\nrepeat (2)\n    wait (pick random (4.1) to (7)) seconds\n    broadcast (summon pyro v)\nend\n\nwhen I receive [boss battle v]\nwait (1) seconds\nforever\n    if <(nikahp) < [1]> then\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        hide\n        broadcast (way out v)\n    end\nend\n\nwhen I receive [way out v]\nstop [other scripts in sprite v]\nstop [this script v]\n\n@Boss Text\n\nwhen flag clicked\ngo to x: (-10) y: (153)\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [boss battle v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen backdrop switches to [backdrop24 v]\nshow\nforever\n    wait until <key (v v) pressed?>\n    repeat (10)\n        change [whirl v] effect by (10)\n    end\n    next costume\n    repeat (10)\n        change [whirl v] effect by (-10)\n    end\n    if <(costume [number v]) = [4]> then\n        wait (0.75) seconds\n        broadcast (boss battle v)\n    end\nend\n\n@render \n\nwhen I receive [boss battle v]\nforever\n    erase all\n    mika health\n    nika health\nend\n\ndefine mika health\ngo to x: (([x position v] of [mika v]) - (15)) y: (([y position v] of [mika v]) + (30))\nset pen size to (5)\nset pen color to (#dddede)\npen down\nchange x by (30)\npen up\ngo to x: (([x position v] of [mika v]) - (15)) y: (([y position v] of [mika v]) + (30))\nset pen size to (1)\nset pen color to (#5cb712)\npen down\nchange x by ((mikahp) / (1.66))\npen up\n\nwhen flag clicked\nerase all\n\ndefine nika health\ngo to x: (([x position v] of [nika v]) - (15)) y: (([y position v] of [nika v]) + (30))\nset pen size to (5)\nset pen color to (#dddede)\npen down\nchange x by (30)\npen up\ngo to x: (([x position v] of [nika v]) - (15)) y: (([y position v] of [nika v]) + (30))\nset pen size to (1)\nset pen color to (#5cb712)\npen down\nchange x by ((nikahp) / (3.33))\npen up\n\nwhen I receive [way out v]\nstop [other scripts in sprite v]\nstop [this script v]\n\n@Fire Boomerang\n\nwhen flag clicked\nhide\nset size to (200) %\nset [whirl v] to [0]\nset [clone? v] to [0]\n\nwhen I receive [fire boomerang v]\nif <(clone?) = [0]> then\n    go to (nika v)\n    set [clone? v] to [1]\n    create clone of (_myself_ v)\n    set [clone? v] to [0]\nend\n\nwhen I receive [next level v]\ndelete this clone\n\nwhen I start as a clone\nshow\npoint towards (mika v)\nrepeat (5)\n    turn right (5) degrees\n    move (10) steps\n    change [whirl v] by (1)\nend\nrepeat until <<<<touching color (#000000)?> or <touching (_edge_ v)?>> or <touching (moving objects v)?>> or <[24] < (whirl)>>\n    turn right (5) degrees\n    move (10) steps\n    change [whirl v] by (1)\nend\nrepeat (whirl)\n    move (-10) steps\n    turn left (5) degrees\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <<<touching (mika v)?> or <touching (light lasers v)?>> or <touching (force field v)?>> then\n        wait (0.1) seconds\n        delete this clone\n    end\nend\n\n@orb\n\nwhen flag clicked\nhide\nset size to (300) %\n\nwhen I receive [summon pyro v]\nclear graphic effects\ngo to (nika v)\nshow\nglide (1) secs to x: (-7) y: (80)\nrepeat (10)\n    change size by (10)\n    change [ghost v] effect by (10)\nend\nbroadcast (pyro appear v)\nhide\n\nwhen I receive [way out v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\n@Blackness\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nset [ghost v] effect to (100)\n\nwhen I receive [boss battle v]\nforever\n    if <(mikahp) < [1]> then\n        show\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n        broadcast (boss battle v)\n        set [ghost v] effect to (100)\n        hide\n    end\nend\n\n@Way out\n\nwhen flag clicked\ngo to x: (224) y: (59)\nhide\nset [ghost v] effect to (100)\ngo [backward v] (100000) layers\n\nwhen I receive [way out v]\nerase all\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen backdrop switches to [backdrop25 v]\nhide\n\n@Thumbnail\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\n