Cyber Quest 2 | A Platformer | v2.1
@Stage\n\nwhen flag clicked\nforever\n    broadcast (Tick v)\nend\n\nwhen [b v] key pressed\nif <<(username) = [Pavan2007]> or <(username) = [player0882]>> then\n    show variable [mousexy v]\n    set [mousexy v] to (join (mouse x) (join [ , ] (mouse y)))\nend\n\nwhen [h v] key pressed\nhide variable [mousexy v]\n\nwhen I receive [startgame v]\nclear graphic effects\nforever\n    switch backdrop to (Level)\nend\n\nwhen flag clicked\nset [brightness v] effect to (100)\nset [muted v] to [false]\nset [prompt v] to [true]\n\nwhen I receive [hideall v]\nstop [other scripts in sprite v]\nswitch backdrop to (22 v)\n\nwhen I receive [startgame v]\nset volume to (100) %\nforever\n    play sound [Amadeus Legendary EDM Release v] until done\n    play sound [Disfigure - Blank.mp3 v] until done\nend\n\nwhen I receive [stopallsounds v]\nrepeat (50)\n    change volume by (-2)\nend\n\nwhen I receive [startallsounds v]\nrepeat (50)\n    change volume by (2)\nend\n\nwhen [m v] key pressed\nif <(Muted) = [true]> then\n    broadcast (StartAllSounds v)\n    set [muted v] to [false]\nelse\n    broadcast (StopAllSounds v)\n    set [muted v] to [true]\nend\n\nwhen [q v] key pressed\nif <(Prompt) = [true]> then\n    set [prompt v] to [false]\nelse\n    set [prompt v] to [true]\nend\n\n@Player\n\nwhen I receive [deathdifferent v]\nswitch costume to (death v)\nset [color v] effect to (10)\nstart sound [Robot Dismantled v]\nrepeat (15)\n    change [brightness v] effect by (2)\n    change [ghost v] effect by (7)\n    change size by (3)\nend\n\nwhen I receive [startgame v]\ngo to [front v] layer\nset size to (100) %\nswitch costume to (player right v)\nclear graphic effects\nshow\nset [size v] to [100]\nset [x v] to [0]\nset [level v] to [1]\nset [directionofplayer v] to [90]\nset [y v] to [0]\ngo to x: (-215) y: (-74)\nforever\n    if <(BossSpeaking) = [false]> then\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            change [x v] by (1)\n            set [directionofplayer v] to [90]\n            if <(username) = [SypTitan]> then\n                switch costume to (player syptitan right v)\n            else\n                if <(username) = [anpadoma]> then\n                    switch costume to (player anpadoma right v)\n                else\n                    if <(username) = [jcps-1701129]> then\n                        switch costume to (player  jcps-1701129 right v)\n                    else\n                        if <(username) = [Gboiii20]> then\n                            switch costume to (player gboiii20 right v)\n                        else\n                            if <[d3f4ult0s v] contains (username)?> then\n                                switch costume to (player defaultos right v)\n                            else\n                                if <<(current [hour v]) < [18]> and <(current [hour v]) > [6]>> then\n                                    if <(current [month v]) = [10]> then\n                                        switch costume to (player halloween right v)\n                                    else\n                                        switch costume to (player right v)\n                                    end\n                                else\n                                    switch costume to (player night mode right v)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            change [x v] by (-1)\n            set [directionofplayer v] to [-90]\n            if <(username) = [SypTitan]> then\n                switch costume to (player syptitan right v)\n            else\n                if <(username) = [anpadoma]> then\n                    switch costume to (player  anpadoma left2 v)\n                else\n                    if <(username) = [jcps-1701129]> then\n                        switch costume to (player  jcps-1701129 left v)\n                    else\n                        if <(username) = [Gboiii20]> then\n                            switch costume to (player gboiii20 left v)\n                        else\n                            if <[d3f4ult0s v] contains (username)?> then\n                                switch costume to (player defaultos left v)\n                            else\n                                if <<(current [hour v]) < [18]> and <(current [hour v]) > [6]>> then\n                                    if <(current [month v]) = [10]> then\n                                        switch costume to (player halloween left v)\n                                    else\n                                        switch costume to (player left v)\n                                    end\n                                else\n                                    switch costume to (player night mode left v)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        set [x v] to ((X) * (.9))\n        change x by (X)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change y by (1)\n                            if <touching (level v)?> then\n                                change x by ((X) * (-1))\n                                change y by (-5)\n                                if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                    if <(X) > [0]> then\n                                        set [x v] to [-5]\n                                    else\n                                        set [x v] to [-5]\n                                    end\n                                    set [y v] to [10]\n                                else\n                                    set [x v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change [y v] by (-1)\n        change y by (Y)\n        if <touching (level v)?> then\n            change y by ((Y) * (-1))\n            set [y v] to [0]\n        end\n        change y by (-1)\n        if <touching (level v)?> then\n            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                start sound [Jump v]\n                change [y v] by (15)\n            end\n        end\n        change y by (1)\n        if <(x position) > [230]> then\n            if <not <[donotteleportinlevels v] contains (Level)?>> then\n                broadcast (Level Analyse v)\n                set [y v] to [0]\n                set [x v] to [0]\n                broadcast (NextLevelTransition v)\n                wait (1.5) seconds\n                broadcast (CheckLazerBlade v)\n                go to x: (-215) y: (-74)\n            end\n        end\n        if <touching (spikes v)?> then\n            change [deaths ☠ v] by (1)\n            broadcast (Death v) and wait\n            go to x: (-215) y: (-74)\n            clear graphic effects\n            switch costume to (player right v)\n            set size to (100) %\n        end\n        if <touching (saw v)?> then\n            change [deaths ☠ v] by (1)\n            broadcast (Death v) and wait\n            go to x: (-215) y: (-74)\n            clear graphic effects\n            switch costume to (player right v)\n            set size to (100) %\n        end\n        if <touching (lava v)?> then\n            change [deaths ☠ v] by (1)\n            broadcast (Death v) and wait\n            go to x: (-215) y: (-74)\n            clear graphic effects\n            switch costume to (player right v)\n            set size to (100) %\n        end\n        if <touching (trampoline v)?> then\n            set [y v] to [24]\n        end\n        if <<touching (lazerblade v)?> and <(WeaponActive) = []>> then\n            set [weaponactive v] to [true]\n        end\n        if <touching (minion kua v)?> then\n            change [deaths ☠ v] by (1)\n            broadcast (Death v) and wait\n            go to x: (-215) y: (-74)\n            clear graphic effects\n            switch costume to (player right v)\n            set size to (100) %\n        end\n        if <touching (cyber minion kua v)?> then\n            change [deaths ☠ v] by (1)\n            broadcast (Death v) and wait\n            go to x: (-215) y: (-74)\n            clear graphic effects\n            switch costume to (player right v)\n            set size to (100) %\n        end\n        if <touching (bullet v)?> then\n            change [deaths ☠ v] by (1)\n            broadcast (Death v) and wait\n            go to x: (-215) y: (-74)\n            clear graphic effects\n            switch costume to (player right v)\n            set size to (100) %\n        end\n        if <<touching (lazerblade v)?> and <not <(WeaponActive) = [LazerBlade]>>> then\n            set [lazerbladeinuse v] to [true]\n            set [weaponactive v] to [LazerBlade]\n        end\n        if <<touching (lazer 1 v)?> and <([costume name v] of [lazer 1 v]) = [Lazer]>> then\n            change [deaths ☠ v] by (1)\n            broadcast (Death v) and wait\n            go to x: (-215) y: (-74)\n            clear graphic effects\n            switch costume to (player right v)\n            set size to (100) %\n        end\n        if <<touching (lazer 2 v)?> and <([costume name v] of [lazer 2 v]) = [Lazer]>> then\n            change [deaths ☠ v] by (1)\n            broadcast (Death v) and wait\n            go to x: (-215) y: (-74)\n            clear graphic effects\n            switch costume to (player right v)\n            set size to (100) %\n        end\n        if <<touching (lazer 3 v)?> and <([costume name v] of [lazer 3 v]) = [Lazer]>> then\n            change [deaths ☠ v] by (1)\n            broadcast (Death v) and wait\n            go to x: (-215) y: (-74)\n            clear graphic effects\n            switch costume to (player right v)\n            set size to (100) %\n        end\n        if <<touching (lazer 4 v)?> and <([costume name v] of [lazer 4 v]) = [Lazer]>> then\n            change [deaths ☠ v] by (1)\n            broadcast (Death v) and wait\n            go to x: (-215) y: (-74)\n            clear graphic effects\n            switch costume to (player right v)\n            set size to (100) %\n        end\n        if <<touching (lazer 5 v)?> and <([costume name v] of [lazer 5 v]) = [Lazer]>> then\n            change [deaths ☠ v] by (1)\n            broadcast (Death v) and wait\n            go to x: (-215) y: (-74)\n            clear graphic effects\n            switch costume to (player right v)\n            set size to (100) %\n        end\n        if <<touching (lazer 6 v)?> and <([costume name v] of [lazer 6 v]) = [Lazer]>> then\n            change [deaths ☠ v] by (1)\n            broadcast (Death v) and wait\n            go to x: (-215) y: (-74)\n            clear graphic effects\n            switch costume to (player right v)\n            set size to (100) %\n        end\n        if <touching (cyber kua v)?> then\n            change [deaths ☠ v] by (1)\n            broadcast (Death v) and wait\n            go to x: (-215) y: (-74)\n            clear graphic effects\n            switch costume to (player right v)\n            set size to (100) %\n        end\n        if <touching (skull v)?> then\n            change [deaths ☠ v] by (1)\n            broadcast (Death v) and wait\n            go to x: (-215) y: (-74)\n            clear graphic effects\n            switch costume to (player right v)\n            set size to (100) %\n        end\n        if <<touching (cyber kua attack i v)?> and <not <([costume name v] of [cyber kua attack i v]) = [Warning]>>> then\n            change [deaths ☠ v] by (1)\n            broadcast (Death v) and wait\n            go to x: (-215) y: (-74)\n            clear graphic effects\n            switch costume to (player right v)\n            set size to (100) %\n        end\n        if <<touching (cyber kua attack ii v)?> and <not <([costume name v] of [cyber kua attack ii v]) = [Warning]>>> then\n            change [deaths ☠ v] by (1)\n            broadcast (Death v) and wait\n            go to x: (-215) y: (-74)\n            clear graphic effects\n            switch costume to (player right v)\n            set size to (100) %\n        end\n        if <<touching (skull attack v)?> and <not <([costume name v] of [cyber kua attack ii v]) = [Warning]>>> then\n            change [deaths ☠ v] by (1)\n            broadcast (Death v) and wait\n            go to x: (-215) y: (-74)\n            clear graphic effects\n            switch costume to (player right v)\n            set size to (100) %\n        end\n        if <touching color (#2796ff)?> then\n            change [deaths ☠ v] by (1)\n            broadcast (DeathDifferent v) and wait\n            go to x: (-215) y: (-74)\n            clear graphic effects\n            switch costume to (player right v)\n            set size to (100) %\n        end\n    end\nend\n\nwhen I receive [startgame v]\nforever\n    wait until <(Y) = [15]>\n    wait (1) seconds\n    wait until <(Y) = [0]>\n    start sound [Land v]\nend\n\nwhen I receive [startgame v]\nforever\n    if <touching color (#47fff5)?> then\n        if <(BossHealth) < [20]> then\n            change [bosshealth v] by (1)\n        else\n            set [bosshealth v] to [20]\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [giveshockwave v]\nif <not <(WeaponActive) = [Shockwave]>> then\n    set [shockwaveinuse v] to [true]\n    set [weaponactive v] to [Shockwave]\nend\n\nwhen I receive [nextleveltransition v]\ngo to x: (-215) y: (-74)\n\nwhen I receive [specialnextleveltransition v]\nchange [level v] by (1)\ngo to x: (-215) y: (-74)\n\nwhen I receive [death v]\nswitch costume to (death v)\nset [color v] effect to (10)\nstart sound [Robot Dismantled v]\nrepeat (15)\n    change [brightness v] effect by (2)\n    change [ghost v] effect by (7)\n    change size by (3)\nend\n\nwhen I receive [resetplayerposition v]\ngo to x: (-215) y: (-74)\n\nwhen I receive [changeplrposition v]\ngo to x: (-215) y: (-74)\n\nwhen I receive [halloweenbossfightlevel v]\nset [level v] to [22]\ngo to x: (-215) y: (-74)\n\nwhen I receive [exithalloweenboss v]\nset [level v] to [13]\ngo to x: (-215) y: (-74)\n\nwhen I receive [startgame v]\nforever\n    if <touching color (#47fff5)?> then\n        if <<(SkullHealth) < [20]> and <<((SkullHealth) + (5)) < [20]> or <((SkullHealth) + (5)) = [20]>>> then\n            change [skullhealth v] by (5)\n        else\n            if <<(SkullHealth) < [20]> and <<((SkullHealth) + (5)) > [20]> or <((SkullHealth) + (5)) > [20]>>> then\n                change [skullhealth v] by (1)\n            end\n        end\n    end\nend\n\nwhen I receive [hideall v]\nhide\nstop [other scripts in sprite v]\n\n@Level\n\nwhen I receive [startgame v]\nshow\nclear graphic effects\nforever\n    go to [back v] layer\n    go [forward v] (30) layers\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [hideall v]\nhide\nstop [other scripts in sprite v]\n\n@Spikes\n\nwhen I receive [startgame v]\nshow\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\n    go to [back v] layer\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [hideall v]\nhide\nstop [other scripts in sprite v]\n\n@Saw\n\nwhen flag clicked\nshow\nforever\n    go to [back v] layer\n    switch costume to (Level)\nend\n\nwhen flag clicked\nforever\n    turn right (7) degrees\nend\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    if <(Level) = [4]> then\n        go to [back v] layer\n        go to x: (5) y: (-93)\n    end\nend\n\nwhen I receive [hideall v]\nhide\nstop [other scripts in sprite v]\n\n@CQ23034\n\nwhen I receive [nextleveltransition v]\nif <(Prompt) = [true]> then\n    hide\n    wait (2) seconds\n    set size to (80) %\n    switch costume to (Level)\n    go to x: (-43) y: (97)\n    show\n    go to [front v] layer\n    repeat (9)\n        change y by (-6)\n    end\n    repeat (5)\n        change y by (1)\n    end\n    repeat (5)\n        change y by (-1)\n    end\n    wait until <key (z v) pressed?>\n    repeat (15)\n        change y by (7)\n    end\n    hide\nend\n\nwhen I receive [specialnextleveltransition v]\nif <(Prompt) = [true]> then\n    hide\n    wait (1) seconds\n    set size to (80) %\n    switch costume to (Level)\n    go to x: (-43) y: (97)\n    show\n    go to [front v] layer\n    repeat (9)\n        change y by (-6)\n    end\n    repeat (5)\n        change y by (1)\n    end\n    repeat (5)\n        change y by (-1)\n    end\n    wait until <key (z v) pressed?>\n    repeat (15)\n        change y by (7)\n    end\n    hide\nend\n\nwhen I receive [startgame v]\nif <(Prompt) = [true]> then\n    set size to (80) %\n    hide\n    wait (0.2) seconds\n    set size to (80) %\n    hide\n    wait (0.5) seconds\n    set size to (80) %\n    switch costume to (Level)\n    go to x: (-43) y: (97)\n    show\n    go to [front v] layer\n    repeat (9)\n        change y by (-6)\n    end\n    repeat (5)\n        change y by (1)\n    end\n    repeat (5)\n        change y by (-1)\n    end\n    wait until <key (z v) pressed?>\n    repeat (15)\n        change y by (7)\n    end\n    hide\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [hideall v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [hideall v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [startgame v]\nforever\n    if <touching (player v)?> then\n        set [ghost v] effect to (70)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\n@FlintAndSteel\n\nwhen flag clicked\nset [flintandsteel2? v] to [false]\ngo to x: (-181) y: (124)\nhide\n\nwhen flag clicked\nset size to (100) %\nswitch costume to (key v)\nforever\n    if <(Level) = [5]> then\n        show\n        change y by (([sin v] of ((timer) * (225)) ) * (0.5))\n        if <touching (player v)?> then\n            set [flintandsteel2? v] to [true]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(FlintAndSteel2?) = [true]> then\n        go to [front v] layer\n        set size to (50) %\n        go to (player v)\n        change x by (((DirectionOfPlayer) / (12)) - (((DirectionOfPlayer) / (12)) * (2.5)))\n        if <touching (portal v)?> then\n            broadcast (PortalActivate v)\n            stop [other scripts in sprite v]\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [portalactivate v]\nhide\n\n@Portal\n\nwhen I receive [portalactivate v]\nswitch costume to (open v)\nwait (0.5) seconds\nbroadcast (WhiteScreen v)\n\nwhen flag clicked\nhide\nswitch costume to (closed v)\n\nwhen flag clicked\nforever\n    if <(Level) = [5]> then\n        show\n        turn right (5) degrees\n        go to x: (186) y: (94)\n    end\nend\n\nwhen I receive [hideportal v]\nhide\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        if <(FlintAndSteel2?) = [true]> then\n            play sound [Portal Enter v] until done\n            wait until <not <touching (player v)?>>\n        end\n    end\nend\n\n@Transition\n\nwhen I start as a clone\nshow\ngo to [front v] layer\ngo to x: (-435) y: (455)\nGlide to x: [-205] y: [240] Speed: (TransitionSpeed)\nGlide to x: [-435] y: [455] Speed: (TransitionSpeed)\nset [trsn v] to [n]\ndelete this clone\n\nwhen flag clicked\nset [done? v] to [y]\nhide\nset [transition in progress v] to [false]\nset [transitionspeed v] to [0.2]\nset [trsn v] to [n]\npoint in direction (53)\n\ndefine Glide to x: (x) y: (y) Speed: (s)\nrepeat until <<(round (x position)) = (x)> and <(round (y position)) = (y)>>\n    change x by (((x) - (x position)) * (s))\n    change y by (((y) - (y position)) * (s))\nend\nwait (0.2) seconds\nset [done? v] to [y]\n\nwhen I receive [nextleveltransition v]\nset [transition in progress v] to [true]\nshow\nset [trsn v] to [y]\ngo to [front v] layer\ngo to x: (435) y: (-455)\ncreate clone of (_myself_ v)\nGlide to x: [205] y: [-240] Speed: (TransitionSpeed)\nchange [level v] by (1)\nGlide to x: [435] y: [-455] Speed: (TransitionSpeed)\nset [transition in progress v] to [false]\nhide\n\n@WhiteScreenTransition\n\nwhen flag clicked\nhide\nset [ghost v] effect to (100)\n\nwhen I receive [whitescreen v]\nbroadcast (HideInfo v)\nshow\nswitch costume to (screen v)\nrepeat (20)\n    go to [front v] layer\n    change [ghost v] effect by (-5)\nend\nwait (3) seconds\nbroadcast (SpecialNextLevelTransition v)\nbroadcast (HidePortal v)\nrepeat (20)\n    go to [front v] layer\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I receive [specialblacktransition v]\nbroadcast (HideInfo v)\nbroadcast (StopAllSounds v)\nshow\nswitch costume to (screen yeeyeejuice v)\nrepeat (20)\n    go to [front v] layer\n    change [ghost v] effect by (-5)\nend\nwait (2.5) seconds\nbroadcast (SpecialNextLevelTransition v)\nbroadcast (HidePortal v)\nrepeat (20)\n    go to [front v] layer\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I receive [halloweenevent v]\nbroadcast (HideInfo v)\nbroadcast (StopAllSounds v)\ngo to x: (0) y: (0)\nshow\nswitch costume to (mwahhahahah v)\nrepeat (50)\n    go to [front v] layer\n    change [ghost v] effect by (-2)\nend\nwait (3) seconds\nbroadcast (HalloweenBossFightLevel v)\nbroadcast (HidePortal v)\nrepeat (20)\n    go to [front v] layer\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I receive [ooohhh v]\nbroadcast (HideInfo v)\ngo to x: (0) y: (0)\nshow\nswitch costume to (screen v)\nrepeat (50)\n    go to [front v] layer\n    change [ghost v] effect by (-2)\nend\nwait (3) seconds\nbroadcast (ExitHalloweenBoss v)\nbroadcast (HidePortal v)\nrepeat (20)\n    go to [front v] layer\n    change [ghost v] effect by (5)\nend\nhide\n\n@Lava\n\nwhen flag clicked\nforever\n    glide (1) secs to x: (0) y: (15)\n    glide (1) secs to x: (0) y: (0)\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    go to [back v] layer\n    switch costume to (Level)\nend\n\n@LazerBlade\n\nwhen I receive [tick v]\nif <(WeaponActive) = [LazerBlade]> then\n    if <(Throw) = [false]> then\n        show\n        go to (player v)\n        point in direction (DirectionOfPlayer)\n    else\n        show\n    end\nelse\n    if <(WeaponActive) = [Shockwave]> then\n        hide\n    end\nend\n\nwhen flag clicked\nswitch costume to (1 v)\ngo to x: (0) y: (0)\nhide\nset [lazerbladeinuse v] to [false]\nset [shockwaveinuse v] to [false]\nset [weaponactive v] to [None]\nset [throw v] to [false]\n\nwhen I receive [nextleveltransition v]\nwait (2) seconds\nif <not <(Level) = [1]>> then\nif <(Level) = [11]> then\n    show\n    go to x: (0) y: (200)\nelse\n    hide\nend\n\nwhen [s v] key pressed\nif <(BossSpeaking) = [true]> then\n    broadcast (Error404 v)\nelse\n    if <<(LazerBladeInUse) = [true]> and <(ShockwaveInUse) = [true]>> then\n        if <(WeaponActive) = [LazerBlade]> then\n            set [weaponactive v] to [Shockwave]\n        else\n            if <(WeaponActive) = [Shockwave]> then\n                set [weaponactive v] to [LazerBlade]\n            end\n        end\n    end\nend\n\nwhen [space v] key pressed\nif <(BossSpeaking) = [true]> then\n    broadcast (Error404 v)\nelse\n    if <not <(Transition In Progress) = [true]>> then\n        go to [front v] layer\n        if <(WeaponActive) = [LazerBlade]> then\n            switch costume to (1 v)\n            start sound [Lightsaber Sound Effect HQ - HD v]\n            repeat (7)\n                next costume\n            end\n            wait (0.5) seconds\n            repeat (7)\n                switch costume to ((costume [number v]) - (1))\n            end\n            switch costume to (1 v)\n            set [ghost v] effect to (0)\n            wait until <not <key (space v) pressed?>>\n        end\n    end\nend\n\nwhen flag clicked\nset size to (80) %\nforever\n    if <not <(Transition In Progress) = [true]>> then\n        set y to ((([sin v] of ((200) * (timer)) ) * (5)) + (-30))\n    end\n    if <(WeaponActive) = [LazerBlade]> then\n        start sound [Tennis Hit v]\n        go to [front v] layer\n        show\n        stop [this script v]\n    end\nend\n\nwhen I receive [hideall v]\nhide\nstop [other scripts in sprite v]\n\n@Minion Kua\n\ndefine Restart\nhide\nstop [other scripts in sprite v]\nset [enemy ai: x v] to [0]\nset [enemy ai: y v] to [0]\nbroadcast (Spawn v)\ndelete this clone\n\ndefine Physics\nif <(x position) < ([x position v] of [player v])> then\n    change [enemy ai: x v] by (0.2)\nend\nif <([x position v] of [player v]) < (x position)> then\n    change [enemy ai: x v] by (-0.2)\nend\nchange x by (Enemy AI: X)\nSlope Detection\n\n    change x by ((Enemy AI: X) * (-0.9))\nend\nif <touching (level v)?> then\n    change x by ((Enemy AI: X) * (-0.9))\n    if <(y position) < ([x position v] of [player v])> then\n        if <(Enemy AI: X) > [0]> then\n            set [enemy ai: x v] to [-10]\n            set [enemy ai: y v] to [10]\n        else\n            set [enemy ai: x v] to [10]\n            set [enemy ai: y v] to [10]\n        end\n    else\n        set [enemy ai: x v] to [0]\n    end\nelse\n    set [enemy ai: x v] to ((Enemy AI: X) * (.9))\nend\nchange y by (Enemy AI: Y)\nif <touching (level v)?> then\n    change y by ((Enemy AI: Y) * (-1))\n    set [enemy ai: y v] to [0]\n    if <((y position) - (25)) < ([x position v] of [player v])> then\n        if <(Jumping?) = [no]> then\n            set [enemy ai: y v] to [12]\n            set [jumping? v] to [yes]\n        end\n    end\nelse\n    change [enemy ai: y v] by (-1)\n    set [jumping? v] to [no]\nend\nif <[-179] > (y position)> then\n    delete this clone\nend\n\n    set [enemy ai: y v] to [20]\n    set [jumping? v] to [yes]\n    broadcast (bounce v)\nend\n\ndefine Slope Detection\nset [slope v] to [0]\nrepeat until <<(Slope) = [8]> or <not <touching (level v)?>>>\n    change y by (1)\n    change [slope v] by (1)\nend\nif <touching (level v)?> then\n    change y by (-8)\nend\n\nwhen I receive [death v]\nRestart\n\nwhen I start as a clone\nclear graphic effects\nif <<(current [month v]) = [12]> and <(current [date v]) = [25]>> then\n    switch costume to (now, that's scary lol for christmas v)\nelse\n    switch costume to (now, that's scary lol v)\nend\ngo to x: (pick random (0) to (226)) y: (pick random (180) to (180))\nrepeat until <<(distance to [player v]) > [100]> and <not <touching (level v)?>>>\n    go to x: (pick random (-30) to (200)) y: (pick random (180) to (10))\nend\nshow\nforever\n    Physics\n    if <(Help Showing) = [yes]> then\n        wait until <(Help Showing) = [no]>\n    end\n    if <<<<<touching (lazerblade v)?> or <touching (lava v)?>> or <touching (bullet v)?>> or <touching (shockwave v)?>> or <touching (&4q03 v)?>> then\n        set [xofenemywhendead v] to (x position)\n        set [yofenemywhendead v] to (y position)\n        broadcast (Enemy Dead v)\n        broadcast (FirstEnemyKill v)\n        start sound [Pew v]\n        switch costume to (death v)\n        set [color v] effect to (10)\n        repeat (15)\n            change [brightness v] effect by (2)\n            change [ghost v] effect by (7)\n            change size by (3)\n        end\n        delete this clone\n    end\nend\n\nwhen I receive [spawn v]\nwait (2) seconds\nif <[cyberbotshouldnotspawninlevels v] contains (Level)?> then\n    if <(Level) = [20]> then\n        repeat ((Level) - (15))\n            create clone of (_myself_ v)\n        end\n    end\nelse\n    repeat ((Level) - (9))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I receive [delete clones v]\ndelete this clone\n\ndefine Clone At: (x) (y)\ncreate clone of (_myself_ v)\nset x to (x)\nset y to (y)\n\nwhen I receive [kualingsattack! v]\nrepeat until <(BossHealth) = [0]>\n    create clone of (_myself_ v)\n    wait (1) seconds\nend\n\nwhen I receive [nextleveltransition v]\nRestart\n\nwhen I receive [startgame v]\ngo to [back v] layer\nRestart\nhide\n\nwhen I receive [hideall v]\nhide\nstop [other scripts in sprite v]\n\n@Information\n\nwhen flag clicked\nhide\n\nwhen I receive [nextleveltransition v]\nhide\nwait (2) seconds\nshow\n\nwhen I receive [lost v]\nhide\n\nwhen I receive [winner! v]\nhide\n\nwhen I receive [hideinfo v]\nhide\nwait (7) seconds\nshow\n\nwhen I receive [hideinfountilsaidnotto v]\nrepeat until <not <(BossSpeaking) = [true]>>\n    hide\nend\n\nwhen I receive [showinfo v]\nshow\n\nwhen I receive [startgame v]\nshow\ngo to x: (0) y: (0)\nforever\n    go to [front v] layer\n    if <touching (mouse-pointer v)?> then\n        if <(WeaponActive) = [LazerBlade]> then\n            switch costume to (already on - lazerblade v)\n        else\n            if <(WeaponActive) = [Shockwave]> then\n                switch costume to (already on - shockwave v)\n            else\n                switch costume to (info v)\n            end\n        end\n    else\n        if <(WeaponActive) = [LazerBlade]> then\n            switch costume to (lazerblade v)\n        else\n            if <(WeaponActive) = [Shockwave]> then\n                switch costume to (shockwave v)\n            else\n                switch costume to (noweapons v)\n            end\n        end\n    end\nend\n\nwhen I receive [hideall v]\nhide\nstop [other scripts in sprite v]\n\n@Cyber Minion Kua\n\ndefine Go to X: (x) Y: (y)\nset [cyberkuaactivated? v] to [true]\nshow\ngo to x: (x) y: (y)\n\nwhen flag clicked\nhide\nset [cyberkuaactivated? v] to [false]\nforever\n    if <<<<touching (lazerblade v)?> or <touching (bullet v)?>> or <touching (shockwave v)?>> or <touching (&4q03 v)?>> then\n        start sound [Pew v]\n        switch costume to (death v)\n        set [color v] effect to (10)\n        repeat (15)\n            change [brightness v] effect by (2)\n            change [ghost v] effect by (7)\n            change size by (3)\n        end\n        set [cyberkuaactivated? v] to [false]\n        hide\n        clear graphic effects\n        set size to (100) %\n        if <<(current [month v]) = [12]> and <(current [date v]) = [25]>> then\n            switch costume to (cyberkuachristmas v)\n        else\n            switch costume to (cyberkua v)\n        end\n    end\nend\n\nwhen I receive [nextleveltransition v]\nwait (2) seconds\nif <(Level) = [13]> then\n    Go to X: [204] Y: [112]\nend\nif <(Level) = [15]> then\n    Go to X: [173] Y: [163]\nend\nif <(Level) = [16]> then\n    Go to X: [214] Y: [139]\nend\n\nwhen flag clicked\nhide\nforever\n    if <(CyberKuaActivated?) = [true]> then\n        if <not <[malwarebotshouldnotspawninlevels v] contains (Level)?>> then\n            broadcast (ShootBullet v)\n            wait (0.1) seconds\n            broadcast (ShootBullet v)\n            wait (0.1) seconds\n            broadcast (ShootBullet v)\n            wait (2) seconds\n        end\n    end\nend\n\n@Bullet\n\nwhen I receive [shootbullet v]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nstart sound [Pew v]\ngo to (cyber minion kua v)\nchange x by (-40)\nshow\npoint towards (player v)\nrepeat until <<<touching (player v)?> or <touching (_edge_ v)?>> or <touching (level v)?>>\n    show\n    move (10) steps\n    if <<<touching (lazerblade v)?> or <touching (shockwave v)?>> or <touching (&4q03 v)?>> then\n        point towards (cyber minion kua v)\n        repeat until <<<touching (player v)?> or <touching (_edge_ v)?>> or <touching (level v)?>>\n            show\n            move (10) steps\n        end\n        move (10) steps\n        delete this clone\n    end\nend\nmove (10) steps\ndelete this clone\n\nwhen flag clicked\nhide\n\n@Jade\n\nwhen flag clicked\nset [jade? v] to [false]\ngo to x: (209) y: (118)\nhide\n\nwhen flag clicked\nset size to (100) %\nswitch costume to (key v)\nforever\n    if <(Level) = [13]> then\n        show\n        change y by (([sin v] of ((timer) * (225)) ) * (0.5))\n        if <touching (player v)?> then\n            set [jade? v] to [true]\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Jade?) = [true]> then\n        go to [front v] layer\n        set size to (70) %\n        go to (player v)\n        change x by (((DirectionOfPlayer) / (12)) - (((DirectionOfPlayer) / (12)) * (2)))\n        if <touching (jadeportal v)?> then\n            if <not <(MiseryJade) = [true]>> then\n                broadcast (JadePortalActivate v)\n                stop [other scripts in sprite v]\n                hide\n                stop [this script v]\n            else\n                ​​log​​ [Cannot Proceed.]\n            end\n        end\n    end\nend\n\nwhen I receive [portalactivate v]\nhide\n\nhide\n\n@JadePortal\n\nwhen I receive [jadeportalactivate v]\nswitch costume to (open v)\nwait (0.5) seconds\nbroadcast (WhiteScreen v)\n\nwhen flag clicked\nhide\nswitch costume to (closed v)\n\nwhen flag clicked\nforever\n    if <(Level) = [13]> then\n        show\n        turn right (5) degrees\n        go to x: (58) y: (76)\n    end\nend\n\nwhen I receive [hideportal v]\nhide\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        if <(Jade?) = [true]> then\n            if <not <(MiseryJade) = [true]>> then\n                play sound [Portal Enter v] until done\n                wait until <not <touching (player v)?>>\n            else\n                ​​log​​ [Player has two gems. Cannot proceed.]\n            end\n        end\n    end\nend\n\n@DestroyedCrystal\n\nwhen flag clicked\nhide\nforever\n    if <(Level) = [14]> then\n        show\n        go to x: (20) y: (-116)\n    else\n        hide\n    end\nend\n\nwhen I receive [specialnextleveltransition v]\nwait (2) seconds\nif <(Level) = [14]> then\n    show\n    broadcast (CreateCrystalSmokeEffect v)\nend\n\nwhen I receive [nextleveltransition v]\nwait (2) seconds\nif <(Level) = [15]> then\n    broadcast (DestroyCrystalSmokeEffect v)\n    hide\nend\n\nwhen flag clicked\nset [smokesourcex v] to [20]\nset [smokesourcey v] to [-99]\nset size to (75) %\nset [brightness v] effect to (10)\nhide\nswitch costume to (destroyed crystal v)\n\nwhen I receive [createcrystalsmokeeffect v]\nset [smoke lifetime v] to [2.5]\nset [myyvel v] to [1.5]\nforever\n    set [myxvel v] to (pick random (-1.5) to (1.5))\n    create clone of (_myself_ v)\n    wait (0.1) seconds\nend\n\nwhen I receive [destroycrystalsmokeeffect v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <<([abs v] of (x position) ) < [240]> and <([abs v] of (y position) ) < [180]>> then\n        show\n    else\n        hide\n    end\n    change size by (1)\nend\n\nwhen I start as a clone\nforever\n    go to x: ((SmokeSourceX) + (myX)) y: ((SmokeSourceY) + (myY))\n    change [myx v] by (myXvel)\n    change [myy v] by (myYvel)\nend\n\nwhen I start as a clone\nswitch costume to (smokeeffect v)\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (smoke lifetime) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\n@JS243567\n\nwhen flag clicked\nhide\n\nwhen I receive [specialnextleveltransition v]\nwait (1) seconds\nif <(Level) = [14]> then\n    show\n    go to x: (114) y: (-71)\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [14]> then\n        switch costume to (js243567 v)\n        if <touching (player v)?> then\n            switch costume to (e square v)\n            if <key (e v) pressed?> then\n                switch costume to (e square pressed v)\n                wait until <not <key (e v) pressed?>>\n                broadcast (JadeSamuraiTalk v)\n                broadcast (GiveShockwave v)\n            end\n        end\n    end\nend\n\nwhen I receive [nextleveltransition v]\nwait (2) seconds\nif <(Level) = [15]> then\n    hide\nend\n\n@Smoke Emitter\n\nwhen I start as a clone\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (smoke lifetime) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    go to x: ((SmokeSourceX) + (myX)) y: ((SmokeSourceY) + (myY))\n    change [myx v] by (myXvel)\n    change [myy v] by (myYvel)\nend\n\nwhen I start as a clone\nforever\n    if <<([abs v] of (x position) ) < [240]> and <([abs v] of (y position) ) < [180]>> then\n        show\n    else\n        hide\n    end\n    change size by (1)\nend\n\nwhen I receive [effect - delete smoke emitter v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [effect - create smoke emitter v]\nset [smoke lifetime v] to [2.5]\nset [myyvel v] to [2.5]\nforever\n    set [myxvel v] to (pick random (-1.5) to (1.5))\n    create clone of (_myself_ v)\n    wait (0.1) seconds\nend\n\nwhen flag clicked\nset size to (75) %\nset [brightness v] effect to (10)\nhide\n\n@JadeSpeech\n\nwhen I receive [jadesamuraitalk v]\nhide\nwait (0) seconds\nset size to (80) %\nswitch costume to (jade samurai's speech v)\ngo to x: (-43) y: (97)\nshow\ngo to [front v] layer\nrepeat (9)\n    change y by (-6)\nend\nrepeat (5)\n    change y by (1)\nend\nrepeat (5)\n    change y by (-1)\nend\nwait until <key (space v) pressed?>\nrepeat (15)\n    change y by (7)\nend\nhide\n\nwhen flag clicked\nhide\n\n@Cyber Portal 2\n\nwhen I receive [cyberportalactivate v]\nswitch costume to (open v)\nwait (0.5) seconds\nbroadcast (WhiteScreen v)\n\nwhen flag clicked\nhide\nswitch costume to (closed v)\n\nwhen flag clicked\nforever\n    if <(Level) = [16]> then\n        show\n        turn right (5) degrees\n        go to x: (202) y: (-44)\n    end\nend\n\nwhen I receive [hideportal v]\nhide\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        if <(FlintAndSteel?) = [true]> then\n            play sound [Portal Enter v] until done\n        end\n    end\nend\n\n@FloppyDisk\n\nwhen flag clicked\nset [flintandsteel? v] to [false]\ngo to x: (-181) y: (124)\nhide\n\nwhen flag clicked\nset size to (100) %\nswitch costume to (key v)\nforever\n    if <(Level) = [16]> then\n        show\n        change y by (([sin v] of ((timer) * (225)) ) * (0.5))\n        if <touching (player v)?> then\n            set [flintandsteel? v] to [true]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(FlintAndSteel?) = [true]> then\n        go to [front v] layer\n        set size to (50) %\n        go to (player v)\n        change x by (((DirectionOfPlayer) / (12)) - (((DirectionOfPlayer) / (12)) * (2.5)))\n        if <touching (cyber portal 2 v)?> then\n            broadcast (CyberPortalActivate v)\n            stop [other scripts in sprite v]\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [cyberportalactivate v]\nhide\n\n@Shockwave\n\ndefine (s) (spd)\nrepeat until <(round (size)) = (round (s))>\n    change size by (((s) - (size)) / (spd))\nend\n\nwhen I start as a clone\nshow\nclear graphic effects\nset size to (100) %\nrepeat (18)\n    change size by (((300) - (size)) / (5))\n    clear graphic effects\n    next costume\n    if <(costume [number v]) = [1]> then\n        next costume\n    end\n    wait ((Shockwave) / (100)) seconds\nend\n[300] [5]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    if <(BossSpeaking) = [true]> then\n        broadcast (Error404 v)\n    else\n        wait until <key (space v) pressed?>\n        if <(WeaponActive) = [Shockwave]> then\n            if <(BatteryPercentage) = [1]> then\n                go to (player v)\n                set [shockwave v] to [0]\n                create clone of (_myself_ v)\n                play sound [Explode v] until done\n                broadcast (Recharge v)\n                wait until <(BatteryPercentage) = [1]>\n            end\n        end\n    end\nend\n\nwhen I receive [hideall v]\nhide\nstop [other scripts in sprite v]\n\n@Battery\n\nwhen flag clicked\nset size to (70) %\nset [batterypercentage v] to [1]\n\nwhen I receive [recharge v]\nrepeat (5)\n    change [batterypercentage v] by (-1)\n    wait (1.5) seconds\nend\n\nwhen flag clicked\nforever\n    switch costume to (BatteryPercentage)\nend\n\nwhen flag clicked\nforever\n    if <(WeaponActive) = [Shockwave]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    go to x: (211) y: (162)\n    wait until <key (space v) pressed?>\n    wait (0.01) seconds\n    if <(WeaponActive) = [Shockwave]> then\n        if <(BatteryPercentage) = [1]> then\n            repeat (5)\n                change [batterypercentage v] by (1)\n                wait (0.2) seconds\n            end\n            wait until <(BatteryPercentage) = [1]>\n        end\n    end\nend\n\nwhen I receive [hideall v]\nhide\nstop [other scripts in sprite v]\n\n@Lazer 1\n\nwhen flag clicked\nforever\n    if <not <(Level) = [17]>> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [17]> then\n        show\n        switch costume to (lazer v)\n        wait (pick random (4) to (9)) seconds\n        switch costume to (nolazer v)\n        wait (pick random (3) to (4)) seconds\n    else\n        hide\n    end\nend\n\nwhen flag clicked\ngo to [back v] layer\ngo to x: (0) y: (0)\n\n@Lazer 2\n\nwhen flag clicked\nforever\n    if <not <(Level) = [17]>> then\n        hide\n    end\nend\n\nwhen flag clicked\ngo to [back v] layer\ngo to x: (0) y: (0)\n\nwhen flag clicked\nforever\n    if <(Level) = [17]> then\n        show\n        switch costume to (lazer v)\n        wait (pick random (6) to (10)) seconds\n        switch costume to (nolazer v)\n        wait (pick random (2) to (3)) seconds\n    else\n        hide\n    end\nend\n\n@Lazer 3\n\nwhen flag clicked\nforever\n    if <not <(Level) = [17]>> then\n        hide\n    end\nend\n\nwhen flag clicked\ngo to [back v] layer\ngo to x: (0) y: (0)\n\nwhen flag clicked\nforever\n    if <(Level) = [17]> then\n        show\n        switch costume to (lazer v)\n        wait (pick random (10) to (15)) seconds\n        switch costume to (nolazer v)\n        wait (pick random (1) to (3)) seconds\n    else\n        hide\n    end\nend\n\n@Lazer 4\n\nwhen flag clicked\nforever\n    if <not <(Level) = [18]>> then\n        hide\n    end\nend\n\nwhen flag clicked\ngo to [back v] layer\ngo to x: (0) y: (0)\n\nwhen flag clicked\nforever\n    if <(Level) = [18]> then\n        show\n        switch costume to (lazer v)\n        wait (pick random (5) to (10)) seconds\n        switch costume to (nolazer v)\n        wait (pick random (1) to (3)) seconds\n    else\n        hide\n    end\nend\n\n@Lazer 5\n\nwhen flag clicked\nforever\n    if <not <(Level) = [18]>> then\n        hide\n    end\nend\n\nwhen flag clicked\ngo to [back v] layer\ngo to x: (0) y: (0)\n\nwhen flag clicked\nforever\n    if <(Level) = [18]> then\n        show\n        switch costume to (lazer v)\n        wait (pick random (10) to (12)) seconds\n        switch costume to (nolazer v)\n        wait (pick random (4) to (5)) seconds\n    else\n        hide\n    end\nend\n\n@Lazer 6\n\nwhen flag clicked\nforever\n    if <not <(Level) = [19]>> then\n        hide\n    end\nend\n\nwhen flag clicked\ngo to [back v] layer\ngo to x: (0) y: (0)\n\nwhen flag clicked\nforever\n    if <(Level) = [19]> then\n        show\n        switch costume to (lazer v)\n        wait (pick random (6) to (10)) seconds\n        switch costume to (nolazer v)\n        wait (pick random (1) to (3)) seconds\n    else\n        hide\n    end\nend\n\n@Door\n\nwhen I receive [doorenter v]\nswitch costume to (open v)\nwait (0.5) seconds\nbroadcast (SpecialBlackTransition v)\n\nwhen flag clicked\nhide\nswitch costume to (closed v)\n\nwhen flag clicked\nforever\n    if <(Level) = [19]> then\n        show\n        go to x: (215) y: (108)\n    end\nend\n\nwhen I receive [hideportal v]\nhide\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        play sound [Portal Enter v] until done\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        broadcast (DoorEnter v) and wait\n        wait (60) seconds\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\n@Cyber Kua\n\nwhen flag clicked\ngo to x: (180) y: (-33)\nset [bosshealth v] to [100]\nset [bossdefeated v] to [false]\nclear graphic effects\nforever\n    if <(Level) = [20]> then\nend\n\nwhen I receive [specialnextleveltransition v]\nwait (2) seconds\nif <(Level) = [20]> then\n    broadcast (KuaKuaSpeak v)\nend\n\nwhen I receive [activatebossfight v]\nshow\nwait (0.5) seconds\nbroadcast (KualingsAttack! v)\n\ndefine TestBossFight\nset [lazerbladeinuse v] to [true]\nset [shockwaveinuse v] to [true]\nset [weaponactive v] to [LazerBlade]\nset [level v] to [19]\n\nwhen flag clicked\nset [bosshealth v] to [20]\nforever\n    if <key (g v) pressed?> then\n        if <<(username) = [Pavan2007]> or <(username) = [SypTitan]>> then\n            TestBossFight\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (BossHealth)\n    if <<touching (lazerblade v)?> or <touching (shockwave v)?>> then\n        change [bosshealth v] by (-1)\n        set [brightness v] effect to (-100)\n        wait until <not <<touching (lazerblade v)?> or <touching (shockwave v)?>>>\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [activatebossfight v]\nwait until <(BossHealth) < [20]>\nbroadcast (SelectLazerSpot v)\nwait (1) seconds\nbroadcast (DeployLazer v)\n\nwhen I receive [death v]\nchange [bosshealth v] by (2)\nif <<(BossHealth) = [20]> or <[20] < (BossHealth)>> then\n    set [bosshealth v] to [20]\nend\nswitch costume to (BossHealth)\n\nwhen I receive [activatebossfight v]\nwait until <(BossHealth) < [17]>\nbroadcast (SelectShockwaveSpot v)\nwait (1) seconds\nbroadcast (Deploy Shockwaves v)\n\nwhen I receive [activatebossfight v]\nwait until <(BossHealth) < [15]>\nbroadcast (HalfwayThrough! v)\nbroadcast (DeployLightning v)\n\nwhen I receive [activatebossfight v]\nwait until <(BossHealth) < [13]>\nbroadcast (ThreeQuarters v)\nbroadcast (DeployTazer v)\n\nwhen I receive [deathdifferent v]\nchange [bosshealth v] by (1)\nif <<(BossHealth) = [20]> or <[20] < (BossHealth)>> then\n    set [bosshealth v] to [20]\nend\nswitch costume to (BossHealth)\n\nwhen I receive [activatebossfight v]\nwait until <(BossHealth) < [1]>\nbroadcast (CyberKuaDefeated v)\n\nwhen I receive [cyberkuadefeated v]\nswitch costume to (err0r101 - defeated v)\nglide (5) secs to x: (180) y: (62)\nbroadcast (FadeAwayEffect v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nset [bossdefeated v] to [true]\nbroadcast (OpenPortalAccessKey v)\n\nwhen flag clicked\nset [bosshealth v] to [20]\nforever\n    if <key (n v) pressed?> then\n        if <<(username) = [Pavan2007]> or <(username) = [SypTitan]>> then\n            set [bosshealth v] to [2]\n        end\n    end\nend\n\nwhen I receive [activatebossfight v]\nwait (1) seconds\nset volume to (100) %\nrepeat until <(BossHealth) = [1]>\n    play sound [Cyber Kua Theme v] until done\nend\n\nwhen I receive [cyberkuadefeated v]\nchange volume by (-100)\nwait (1) seconds\nbroadcast (StartAllSounds v)\n\nwhen I receive [cyberkuadefeated v]\nchange [☁ bossdefeats v] by (1)\n\nwhen flag clicked\nchange [☁ greenflagclicked v] by (1)\n\n@Dialogue\n\nwhen flag clicked\nset [bossspeaking v] to [false]\nset [gamemode v] to [0]\ngo to x: (0) y: (0)\nhide\n\nwhen I start as a clone\nif <not < (costume [name v]) contains [Speaker]?>> then\n    if <(effect) = []> then\n        go [forward v] (1) layers\n        go to x: (((textpos) * (10)) - (190)) y: (((ty) * (-15)) - (105))\n        wait until <(TextDelay) = [0]>\n        wait until <key (z v) pressed?>\n        delete this clone\n    end\n    if <(effect) = [wavy]> then\n        set [effect v] to [0]\n        go [forward v] (1) layers\n        repeat until <(TextDelay) = [0]>\n            go to x: (((textpos) * (10)) - (190)) y: (((ty) * (-15)) - (105))\n            change x by (([cos v] of ((effect) * (15)) ) * (2))\n            change y by (([sin v] of ((effect) * (15)) ) * (2))\n            change [effect v] by (1)\n        end\n        repeat until <key (z v) pressed?>\n            go to x: (((textpos) * (10)) - (190)) y: (((ty) * (-15)) - (105))\n            change x by (([cos v] of ((effect) * (15)) ) * (2))\n            change y by (([sin v] of ((effect) * (15)) ) * (2))\n            change [effect v] by (1)\n        end\n        delete this clone\n    end\n    if <(effect) = [shaky]> then\n        go [forward v] (1) layers\n        repeat until <(TextDelay) = [0]>\n            go to x: (((textpos) * (10)) - (190)) y: (((ty) * (-15)) - (105))\n            change x by (pick random (1) to (-1))\n            change y by (pick random (1) to (-1))\n        end\n        repeat until <key (z v) pressed?>\n            go to x: (((textpos) * (10)) - (190)) y: (((ty) * (-15)) - (105))\n            change x by (pick random (1) to (-1))\n            change y by (pick random (1) to (-1))\n        end\n        delete this clone\n    end\nend\nif < (costume [name v]) contains [Speaker]?> then\n    go to x: (0) y: (0)\n    set [ghost v] effect to (100)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nend\n\nwhen I receive [deletespeaker v]\nif < (costume [name v]) contains [Speaker]?> then\n    delete this clone\nend\n\ndefine Dialogue (speaker) (expression) (text) (effect) (voice) (newspeaker?) (dialogueboxtype)\nset [t v] to [0]\nset [textpos v] to [0]\nset [textdelay v] to [1]\nset [ty v] to [0]\nset [effect v] to (effect)\nshow\nif <not <(speaker) = [none]>> then\n    switch costume to (join [Speaker] (join (speaker) (expression)))\n    if <(newspeaker?) = [1]> then\n        broadcast (DeleteSpeaker v)\n        create clone of (_myself_ v)\n    end\nend\nswitch costume to (dialogueboxtype)\nrepeat (length of (text))\n    change [t v] by (1)\n    if <(letter (t) of (text)) = [|]> then\n        change [ty v] by (1)\n        set [textpos v] to [0]\n    end\n    if <(letter (t) of (text)) = [\]> then\n        switch costume to (dialogueboxtype)\n        wait (0.5) seconds\n    end\n    if <not <<(letter (t) of (text)) = [|]> or <(letter (t) of (text)) = [\]>>> then\n        switch costume to (letter (t) of (text))\n        create clone of (_myself_ v)\n        if <not <(letter (t) of (text)) = [ ]>> then\n            start sound (voice)\n        end\n        if <[thin text v] contains (letter (t) of (text))?> then\n            change [textpos v] by (0.5)\n        else\n            change [textpos v] by (1)\n        end\n    end\n    switch costume to (dialogueboxtype)\nend\nwait until <not <key (z v) pressed?>>\nset [textdelay v] to [0]\nwait (0) seconds\nwait until <key (z v) pressed?>\nwait until <not <key (z v) pressed?>>\nhide\n\nwhen I receive [kuakuaspeak v]\nbroadcast (HideInfoUntilSaidNotTo v)\nbroadcast (ResetPlayerPosition v)\nset [bossspeaking v] to [true]\ngo to [front v] layer\nDialogue [CyberKua] [Shocked] [Huh? You got past all the traps I had|placed for you?] [] [2] [1] [DialogueDesignClassic]\nDialogue [CyberKua] [Normal] [Very well, you seem like a brave robot!] [wavy] [2] [1] [DialogueDesignClassic]\nDialogue [CyberKua] [Normal] [Good thing that this will be the last|time you see this world!] [] [2] [0] [DialogueDesignClassic]\nDialogue [CyberKua] [Normal] [You see, I have planned for many years|to take over this ungrateful place.] [] [2] [0] [DialogueDesignClassic]\nDialogue [CyberKua] [Angry] [The only problem was you! When I placed|my minion to destroy the world of the|internet, you destroyed him!] [] [2] [1] [DialogueDesignClassic]\nDialogue [CyberKua] [Angry] [After that, everytime I tried to destroy|you, you defeated my minions, escaped my|traps and listened to the fool who you|call your 'creator'!] [] [2] [0] [DialogueDesignClassic]\nDialogue [CyberKua] [Angry] [And now your creator has sent you|to destroy me! One of his own creations!|Don't you see? He will destroy you too!] [] [2] [0] [DialogueDesignClassic]\nDialogue [CyberKua] [Normal] [I will give you one last chance to|turn back! After that, you stand no|chance against my power! Turn back|little robot! Go home!] [wavy] [2] [1] [DialogueDesignClassic]\nDialogue [CyberKua] [Shocked] [So\.\.\.\ You won't go home huh? Very|well\.\.\.\ Time to face the wrath of|Cyber Kua!] [] [2] [1] [DialogueDesignClassic]\nDialogue [CyberKua] [Angry] [Kualings! Destroy the robot!] [shaky] [2] [1] [DialogueDesignClassic]\nDialogue [MysteryMan] [None] [Oh no! Looks like you have to defeat|Cyber Kua!] [] [2] [1] [DialogueDesignModern]\nDialogue [MysteryMan] [None] [Thankfully, since I made him, I can tell|you what to avoid!] [wavy] [2] [0] [DialogueDesignModern]\nDialogue [MysteryMan] [None] [He has four main attacks. The lazer|attack, the shockwave attack, the|lightning attack and the taser attack.] [] [2] [0] [DialogueDesignModern]\nDialogue [MysteryMan] [None] [Don't touch the lazer or shockwave|attack! They will kill you!] [] [2] [0] [DialogueDesignModern]\nDialogue [MysteryMan] [None] [The lightning attack sucks power|from you to regenerate the Boss.] [] [2] [0] [DialogueDesignModern]\nDialogue [MysteryMan] [None] [And finally, the taser attack kills you|by tasing you exactly where you are.|You cannot escape this!] [] [2] [0] [DialogueDesignModern]\nDialogue [MysteryMan] [None] [Everytime you die, Cyber Kua regenerates|two health! Do not die!] [wavy] [2] [0] [DialogueDesignModern]\nbroadcast (DeleteSpeaker v)\nbroadcast (ShowInfo v)\nset [bossspeaking v] to [false]\nbroadcast (ActivateBossFight v)\n\nwhen I receive [halfwaythrough! v]\nbroadcast (HideInfoUntilSaidNotTo v)\ngo to [front v] layer\nDialogue [CyberKua] [Depressed] [Why aren't you dying?! Die already!] [shaky] [2] [1] [DialogueDesignClassic]\nbroadcast (DeleteSpeaker v)\nbroadcast (ShowInfo v)\n\nwhen I receive [threequarters v]\nbroadcast (HideInfoUntilSaidNotTo v)\ngo to [front v] layer\nDialogue [CyberKua] [Sad] [How have you come this far? You will die|NOW!] [shaky] [2] [1] [DialogueDesignClassic]\nbroadcast (DeleteSpeaker v)\nbroadcast (ShowInfo v)\n\nwhen I receive [cyberkuadefeated v]\nbroadcast (HideInfoUntilSaidNotTo v)\ngo to [front v] layer\nDialogue [CyberKua] [Ded] [NOOOOOOOOOOO!!!|You will regret this young Robot!!] [shaky] [2] [1] [DialogueDesignClassic]\nbroadcast (DeleteSpeaker v)\nbroadcast (ShowInfo v)\n\nwhen I receive [skullspeak v]\nbroadcast (HideInfoUntilSaidNotTo v)\nbroadcast (ResetPlayerPosition v)\nset [bossspeaking v] to [true]\ngo to [front v] layer\nDialogue [Skull] [Normal] [Well,\ well, \well.\ Look who's here...] [] [2] [1] [DialogueDesignHalloween]\nDialogue [Skull] [Normal] [See what I look like now? \ You have|ruined my self esteem, reduced me|to bones and angered my master.] [] [2] [0] [DialogueDesignHalloween]\nDialogue [Skull] [Normal] [I will haunt you from now. \For ruining|my plans, making me look like a fool|and destroying me.] [] [2] [0] [DialogueDesignHalloween]\nDialogue [Skull] [Normal] [Every year,\ in the month of the Hallows, |I will be there.\ And since you have|come right into my trap, it's time to|finish you.] [] [2] [0] [DialogueDesignHalloween]\nDialogue [Skull] [Normal] [Master will be very pleased once I|finish you off...] [wavy] [2] [0] [DialogueDesignHalloween]\nDialogue [Skull] [Normal] [Time to DESTROY YOUR ESSENCE!] [shaky] [2] [0] [DialogueDesignHalloween]\nbroadcast (DeleteSpeaker v)\nbroadcast (ShowInfo v)\nset [bossspeaking v] to [false]\nbroadcast (ActivateSkullBoss v)\n\nwhen I receive [speakatlast v]\nbroadcast (HideInfoUntilSaidNotTo v)\ngo to [front v] layer\nDialogue [Skull] [Normal] [NO! I WON'T LET YOU DEFEAT ME AGAIN!] [shaky] [2] [1] [DialogueDesignClassic]\nbroadcast (DeleteSpeaker v)\nbroadcast (ShowInfo v)\n\n@Cyber Kua Attack I\n\nwhen I receive [selectlazerspot v]\nrepeat until <(BossHealth) < [1]>\n    wait (5) seconds\n    set [randomselectedspotforlazer - all sprites v] to (pick random (-154) to (209))\nend\n\nwhen I receive [deploylazer v]\nrepeat until <(BossHealth) < [1]>\n    if <(BossCanAttack?) = [true]> then\n        switch costume to (warning v)\n        forever\n            wait (pick random (5) to (7)) seconds\n            show\n            clear graphic effects\n            switch costume to (warning v)\n            repeat (5)\n                go to x: (RandomSelectedSpotForLazer - All Sprites) y: (0)\n                show\n                wait (0.1) seconds\n                hide\n                wait (0.1) seconds\n            end\n            switch costume to (lazer v)\n            show\n            go to [back v] layer\n            wait (1) seconds\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [cyberkuadefeated v]\nstop [other scripts in sprite v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [skulldefeated v]\nstop [other scripts in sprite v]\nhide\n\n@Cyber Kua Attack II\n\nwhen I receive [selectshockwavespot v]\nrepeat until <(BossHealth) < [1]>\n    wait (5) seconds\n    set [randomshockwavespotselect v] to (pick random (-100) to (209))\nend\n\nwhen I receive [deploy shockwaves v]\nrepeat until <(BossHealth) < [1]>\n    if <(BossCanAttack?) = [true]> then\n        switch costume to (warning v)\n        forever\n            set size to (100) %\n            wait (pick random (2) to (5)) seconds\n            go to x: (RandomShockwaveSpotSelect) y: (0)\n            clear graphic effects\n            show\n            switch costume to (warning v)\n            repeat (5)\n                show\n                wait (0.1) seconds\n                hide\n                wait (0.1) seconds\n            end\n            show\n            clear graphic effects\n            switch costume to (shockwave v)\n            set size to (100) %\n            repeat (18)\n                change size by (((300) - (size)) / (5))\n                clear graphic effects\n                wait ((Shockwave) / (100)) seconds\n            end\n            [450] [5]\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [cyberkuadefeated v]\nstop [other scripts in sprite v]\nhide\n\ndefine (s) (spd)\nrepeat until <(round (size)) = (round (s))>\n    change size by (((s) - (size)) / (spd))\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [skulldefeated v]\nstop [other scripts in sprite v]\nhide\n\n@Cyber Kua Attack III\n\nwhen I receive [bolt v]\nerase all\nBolt from ([x position v] of [cyber kua v]) ([y position v] of [cyber kua v]) to ([x position v] of [player v]) ([y position v] of [player v]) randomness [0.2] [1.8] segments [10]\n\nwhen flag clicked\nerase all\nset pen color to (#47fff5)\nset pen size to (3)\npen up\ndelete all of [xposes v]\ndelete all of [yposes v]\nset [ghost v] effect to (100)\nhide\n\ndefine Bolt from (x1) (y1) to (x2) (y2) randomness (min) (max) segments (s)\nCalculate lightning (x1) (y1) (x2) (y2) (min) (max) (s)\ngo to x: (x1) y: (y1)\nset [posenum v] to [1]\nshow\npen down\nrepeat ((calcLength) + (1))\n    go to x: (item (poseNum) of [xposes v]) y: (item (poseNum) of [yposes v])\n    change [posenum v] by (1)\nend\npen up\n\ndefine Calculate lightning (x1) (y1) (x2) (y2) (min) (max) (s)\nset [posenum v] to [1]\ndelete all of [xposes v]\ndelete all of [yposes v]\nadd (x1) to [xposes v]\nadd (y1) to [yposes v]\nset [boltlength v] to ([sqrt v] of ((((x2) - (x1)) * ((x2) - (x1))) + (((y2) - (y1)) * ((y2) - (y1)))) )\nset [calclength v] to ([ceiling v] of ((boltLength) / (s)) )\nrepeat ((calcLength) - (1))\n    change [posenum v] by (1)\n    add ((item ((poseNum) - (1)) of [xposes v]) + ((((x2) - (x1)) / (calcLength)) * (pick random (min) to (max)))) to [xposes v]\n    add ((item ((poseNum) - (1)) of [yposes v]) + ((((y2) - (y1)) / (calcLength)) * (pick random (min) to (max)))) to [yposes v]\nend\nadd (x2) to [xposes v]\nadd (y2) to [yposes v]\n\nwhen I receive [deploylightning v]\nforever\n    wait (5) seconds\n    repeat (1)\n        broadcast (Bolt v)\n    end\n    erase all\nend\n\nwhen I receive [cyberkuadefeated v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [skulldefeated v]\nstop [other scripts in sprite v]\nhide\n\n@Cyber Kua Attack IV\n\nwhen I receive [taser v]\nerase all\nBolt from ([x position v] of [cyber kua v]) ([y position v] of [cyber kua v]) to ([x position v] of [player v]) ([y position v] of [player v]) randomness [0] [0] segments [10]\n\nwhen flag clicked\nerase all\nset pen color to (#2796ff)\nset pen size to (5)\npen up\ndelete all of [xposes v]\ndelete all of [yposes v]\nset [ghost v] effect to (100)\nhide\n\ndefine Bolt from (x1) (y1) to (x2) (y2) randomness (min) (max) segments (s)\nCalculate lightning (x1) (y1) (x2) (y2) (min) (max) (s)\ngo to x: (x1) y: (y1)\nset [posenum v] to [1]\nshow\npen down\nrepeat ((calcLength) + (1))\n    go to x: (item (poseNum) of [xposes v]) y: (item (poseNum) of [yposes v])\n    change [posenum v] by (1)\nend\npen up\n\ndefine Calculate lightning (x1) (y1) (x2) (y2) (min) (max) (s)\nset [posenum v] to [1]\ndelete all of [xposes v]\ndelete all of [yposes v]\nadd (x1) to [xposes v]\nadd (y1) to [yposes v]\nset [boltlength v] to ([sqrt v] of ((((x2) - (x1)) * ((x2) - (x1))) + (((y2) - (y1)) * ((y2) - (y1)))) )\nset [calclength v] to ([ceiling v] of ((boltLength) / (s)) )\nrepeat ((calcLength) - (1))\n    change [posenum v] by (1)\n    add ((item ((poseNum) - (1)) of [xposes v]) + ((((x2) - (x1)) / (calcLength)) * (pick random (min) to (max)))) to [xposes v]\n    add ((item ((poseNum) - (1)) of [yposes v]) + ((((y2) - (y1)) / (calcLength)) * (pick random (min) to (max)))) to [yposes v]\nend\nadd (x2) to [xposes v]\nadd (y2) to [yposes v]\n\nwhen I receive [deploytazer v]\nforever\n    set pen size to (5)\n    repeat (10)\n        broadcast (Taser v)\n        change pen size by (-1)\n    end\n    erase all\n    wait (25) seconds\nend\n\nwhen I receive [cyberkuadefeated v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [skulldefeated v]\nstop [other scripts in sprite v]\nhide\n\n@Effect\n\nwhen flag clicked\nhide\nclear graphic effects\n\nwhen I receive [cyberkuadefeated v]\nshow\nclear graphic effects\nforever\n    go to [back v] layer\n    go to (cyber kua v)\n    turn right (2) degrees\nend\n\nwhen I receive [fadeawayeffect v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [skulldefeated v]\nshow\nclear graphic effects\nforever\n    go to [back v] layer\n    go to (skull v)\n    turn right (2) degrees\nend\n\n@Kua Portal\n\nwhen I receive [activatedimensionportal v]\nswitch costume to (open v)\nwait (0.5) seconds\nbroadcast (WhiteScreen v)\nstop [other scripts in sprite v]\nbroadcast (HidePortal v)\n\nwhen flag clicked\nhide\nswitch costume to (closed v)\n\nwhen flag clicked\nforever\n    if <(BossDefeated) = [true]> then\n        show\n        turn right (5) degrees\n        go to x: (202) y: (-44)\n    else\n        hide\n    end\nend\n\nwhen I receive [hideportal v]\nhide\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        if <(BossDefeated) = [true]> then\n            broadcast (ActivateDimensionPortal v)\n            play sound [Portal Enter v] until done\n            stop [this script v]\n        end\n    end\nend\n\n@Cutscene\n\nwhen flag clicked\nhide\n\nwhen I receive [startcutscene v]\nshow\nclear graphic effects\ngo to [front v] layer\nswitch costume to (1 v)\nset [ghost v] effect to (100)\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nwait until <key (p v) pressed?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nswitch costume to (2 v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait until <key (p v) pressed?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nswitch costume to (3 v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait until <key (p v) pressed?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nswitch costume to (4 v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait until <key (p v) pressed?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nswitch costume to (5 v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait until <key (p v) pressed?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nswitch costume to (6 v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait until <key (p v) pressed?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nswitch costume to (7 v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait until <key (p v) pressed?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nswitch costume to (8 v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait until <key (p v) pressed?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nbroadcast (StartGame v)\n\n@NewIntro\n\ndefine Make ripples\nset [counter v] to [0]\nrepeat (length of [desired size v])\n    change [counter v] by (1)\n    Make circle X (item (Counter) of [x v]) Y (item (Counter) of [y v]) Thickness (item (Counter) of [thickness v]) Size (item (Counter) of [size v])\n    replace item (Counter) of [size v] with ((item (Counter) of [size v]) + (((item (Counter) of [desired size v]) - (item (Counter) of [size v])) / (4)))\n    replace item (Counter) of [thickness v] with ((item (Counter) of [thickness v]) + (((item (Counter) of [desired thickness v]) - (item (Counter) of [thickness v])) / (7)))\nend\n\ndefine Add circle at X (x) Y (y) Thickness (thickness) Size (size) Desired thickness (desired thickness)\nadd [0] to [size v]\nadd (size) to [desired size v]\nadd [0] to [transparency v]\nadd (thickness) to [thickness v]\nadd (x) to [x v]\nadd (y) to [y v]\nadd (desired thickness) to [desired thickness v]\n\nwhen flag clicked\nstart sound [   v]\nreset timer\nerase all\nhide\ngo to x: (0) y: (0)\npoint in direction (90)\nclear graphic effects\nset size to (100) %\nset [_id v] to [circle1]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [_id v] to [circle2]\ncreate clone of (_myself_ v)\nwait until <(timer) > [0.75]>\ndelete all of [desired size v]\ndelete all of [size v]\ndelete all of [thickness v]\ndelete all of [x v]\ndelete all of [y v]\ndelete all of [transparency v]\ndelete all of [desired thickness v]\nset [counter v] to [1]\nAdd circle at X [300] Y [300] Thickness [0] Size [10000] Desired thickness [0]\nAdd circle at X [15] Y [15] Thickness [10] Size [30] Desired thickness [0]\nrepeat (4)\n    Ripple graphics\nend\nAdd circle at X [-30] Y [-10] Thickness [10] Size [40] Desired thickness [0]\nrepeat (4)\n    Ripple graphics\nend\nAdd circle at X [-50] Y [30] Thickness [10] Size [30] Desired thickness [0]\nrepeat (4)\n    Ripple graphics\nend\nset [_id v] to [effects]\ncreate clone of (_myself_ v)\nAdd circle at X [40] Y [-35] Thickness [10] Size [25] Desired thickness [0]\nAdd circle at X [0] Y [0] Thickness [40] Size [55] Desired thickness [4]\nset [_id v] to [logo]\ncreate clone of (_myself_ v)\nrepeat (10)\n    Ripple graphics\nend\nrepeat (20)\n    Ripple graphics\nend\nset [_id v] to [motto1]\ncreate clone of (_myself_ v)\nwait (0.5) seconds\nset [_id v] to [motto2]\ncreate clone of (_myself_ v)\nwait (0.5) seconds\nset [_id v] to [motto3]\ncreate clone of (_myself_ v)\nwait (2) seconds\nset [_id v] to [end]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nif < (_iD) contains [circle]?> then\n    switch costume to (sizehak big v)\n    set size to (0) %\n    repeat (20)\n        Find size\n        change size by (((-3) - (size)) / (-3))\n        if <(letter (7) of (_iD)) = [1]> then\n            switch costume to (circle 1 v)\n        else\n            switch costume to (circle 2 v)\n        end\n    end\n    repeat (50)\n        Find size\n        change size by (((1500) - (size)) / (20))\n        if <(letter (7) of (_iD)) = [1]> then\n            switch costume to (circle 1 v)\n        else\n            switch costume to (circle 2 v)\n        end\n    end\nend\nif <(_iD) = [logo]> then\n    hide\n    wait (0.2) seconds\n    show\n    switch costume to (new logo v)\n    set size to (0) %\n    go to x: (0) y: (0)\n    repeat (30)\n        change size by (((52) - (size)) / (5))\n    end\nend\nif < (_iD) contains [motto]?> then\n    set [brightness v] effect to (100)\n    set size to (110) %\n    switch costume to ((7) + (letter (6) of (_iD)))\n    go to x: (0) y: (-120)\n    set [ghost v] effect to (100)\n    repeat (30)\n        change [ghost v] effect by (-4)\n        change y by (((-90) - (y position)) / (7))\n    end\nend\nif <(_iD) = [effects]> then\n    point in direction (90)\n    set size to (60) %\n    switch costume to (pen v)\n    go to x: (-446) y: (-337)\n    set [ghost v] effect to (100)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nend\nif <(_iD) = [end]> then\n    show\n    point in direction (90)\n    switch costume to (sizehak blank v)\n    set size to (200) %\n    switch costume to (end v)\n    go to x: (465) y: (380)\n    repeat (50)\n        go to [front v] layer\n        change x by (((-50) - (x position)) / (15))\n        change y by (((-50) - (y position)) / (15))\n    end\n    broadcast (StartCutscene v)\n    repeat (50)\n        go to [front v] layer\n        change x by (((500) - (x position)) / (15))\n        change y by (((420) - (y position)) / (15))\n    end\n    delete this clone\nend\n\ndefine Find size\nif <(size) > [200]> then\n    switch costume to (sizehak small v)\nelse\n    if <(size) < [30]> then\n        switch costume to (sizehak big v)\n    else\n        switch costume to (sizehak normal v)\n    end\nend\n\ndefine Make circle X (x) Y (y) Thickness (thickness) Size (size)\nset pen (transparency v) to (item (Counter) of [transparency v])\nif <(Thickness) < [1]> then\n    go to x: (x) y: (y)\n    set pen size to (thickness)\n    repeat (360)\n        turn right (1) degrees\n        move (size) steps\n        pen down\n        pen up\n        move ((size) * (-1)) steps\n    end\n    if <(item (Counter) of [transparency v]) < [100]> then\n        if <(item (Counter) of [desired thickness v]) = [0]> then\n            replace item (Counter) of [transparency v] with ((item (Counter) of [transparency v]) + (((105) - (item (Counter) of [transparency v])) / (4)))\n        end\n    else\n        delete (Counter) of [desired size v]\n        delete (Counter) of [size v]\n        delete (Counter) of [thickness v]\n        delete (Counter) of [x v]\n        delete (Counter) of [y v]\n        delete (Counter) of [transparency v]\n        delete (Counter) of [desired thickness v]\n        change [counter v] by (-1)\n    end\nelse\n    go to x: (x) y: (y)\n    set pen size to (thickness)\n    repeat (((280) / (thickness)) + (80))\n        turn right ((360) / (((280) / (thickness)) + (80))) degrees\n        move (size) steps\n        pen down\n        pen up\n        move ((size) * (-1)) steps\n    end\nend\n\nwhen I start as a clone\nif < (_iD) contains [circle]?> then\n    wait until <(timer) > [0.8]>\n    delete this clone\nend\nif <not <(_iD) = [end]>> then\n    wait until <(timer) > [6.5]>\n    erase all\n    delete this clone\nend\n\ndefine Ripple graphics\nerase all\nif <(timer) > [0.75]> then\n    go to x: (0) y: (0)\n    set pen color to (#40a0cb)\n    set pen size to (999)\n    pen down\n    pen up\nend\nset pen color to (#ffffff)\nMake ripples\n\n@Cutscene Portal\n\nwhen I receive [activateportalcutscene v]\nswitch costume to (open v)\nwait (0.5) seconds\nbroadcast (ActivateCutscene v)\nstop [other scripts in sprite v]\nbroadcast (HidePortal v)\n\nwhen flag clicked\nhide\nswitch costume to (closed v)\n\nwhen I receive [hideportal v]\nhide\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        if <(CutsceneCodeEntered) = [true]> then\n            broadcast (ActivatePortalCutscene v)\n            set [level v] to [23]\n            play sound [Portal Enter v] until done\n            stop [this script v]\n        end\n    end\nend\n\nwhen flag clicked\nset [cutscenecodeentered v] to [false]\nwait until <key (7 v) pressed?>\nwait until <key (4 v) pressed?>\nwait until <key (5 v) pressed?>\nwait until <key (3 v) pressed?>\nwait until <key (0 v) pressed?>\nset [cutscenecodeentered v] to [true]\nswitch costume to (open v)\n\nwhen I receive [startgame v]\nforever\n    if <(Level) = [21]> then\n        show\n        turn right (100) degrees\n        go to x: (202) y: (-44)\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nhide\nset [level v] to [0]\n\n@JSCutscene\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nset [ghost v] effect to (100)\nset [deaths ☠ v] to [0]\nhide variable [deaths ☠ v]\n\nwhen I receive [activatecutscene v]\nshow\nbroadcast (HideAll v)\nswitch costume to (whitescreen v)\nwait (1) seconds\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\nend\nwait (4) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nswitch costume to (scene 1 v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait until <key (p v) pressed?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nswitch costume to (scene 2 v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait until <key (p v) pressed?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nswitch costume to (scene 3 v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait until <key (p v) pressed?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nswitch costume to (scene 4 v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait until <key (p v) pressed?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nswitch costume to (scene 5 v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait until <key (p v) pressed?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nswitch costume to (scene 6 v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait until <key (p v) pressed?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nswitch costume to (scene 7 v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait until <key (p v) pressed?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nswitch costume to (scene 8 v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait until <key (p v) pressed?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nswitch costume to (scene 9 v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait until <key (p v) pressed?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nswitch costume to (scene 10 v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait until <key (p v) pressed?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nswitch costume to (win screen v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nshow variable [deaths ☠ v]\nchange [☁ actuallybeatthegame v] by (1)\nwait (5) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nswitch costume to (scene 11 v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (60) seconds\nchange [☁ secretfinder v] by (1)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nstop [all v]\n\n@Thumbnail\n\nwhen flag clicked\nshow\nset x to (0)\nif <<(current [month v]) = [12]> and <(current [date v]) = [25]>> then\n    switch costume to (christmasthumbnail v)\nelse\n    if <(current [month v]) = [10]> then\n        switch costume to (halloween v)\n    else\n        switch costume to (thumbnail v)\n    end\nend\nrepeat until <(round (y position)) > [350]>\n    change y by (((500) - (y position)) / (7))\nend\nforever\n    show\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    set y to (0)\nend\n\n@SkipButton\n\nwhen flag clicked\nhide\n\nwhen I receive [startgame v]\ngo to x: (-214) y: (-154)\nset [skip v] to [3]\nswitch costume to (Skip)\nforever\n    show\n    switch costume to (Skip)\n    if <not <[cannotskipinlevels v] contains (Level)?>> then\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (-25)\n            change size by (((140) - (size)) / (4))\n            if <mouse down?> then\n                if <(Skip) < [1]> then\n                    switch costume to (err0r v)\n                else\n                    wait until <not <mouse down?>>\n                    change [skip v] by (-1)\n                    broadcast (NextLevelTransition v)\n                    set [brightness v] effect to (3)\n                    change size by (((100) - (size)) / (4))\n                    wait (3) seconds\n                end\n            end\n        else\n            set [brightness v] effect to (3)\n            change size by (((100) - (size)) / (4))\n        end\n    else\n        hide\n    end\nend\n\n@DeveloperNotice\n\nwhen flag clicked\nhide\nforever\n    if <(UpdateInProgress) = [true]> then\n        if <not <(username) = [Pavan2007]>> then\n            forever\n                go to [front v] layer\n                show\n                stop [all v]\n            end\n        end\n    else\n        go to [back v] layer\n        hide\n    end\nend\n\nwhen [t v] key pressed\nif <(username) = [Pavan2007]> then\n    set [updateinprogress v] to [true]\nend\n\nwhen [f v] key pressed\nif <(username) = [Pavan2007]> then\n    set [updateinprogress v] to [false]\nend\n\n@AdminCommandsTest\n\nwhen I receive [startgame v]\ngo to x: (0) y: (0)\nforever\n    if <[admins v] contains (username)?> then\n        if <key ((join [/] []) v) pressed?> then\n            go to [front v] layer\n            show\n            ask [Enter Command using Prefix / \(Type in /commands to see a list of commands!\)] and wait\n            if <(answer) = (join (Prefix) [levelChange])> then\n                ask [Which level do you wish to go to?] and wait\n                if <[numbers v] contains (answer)?> then\n                    set [level v] to (answer)\n                    broadcast (ChangePlrPosition v)\n                    hide\n                else\n                    say [Invalid Command. Try again] for (2) seconds\n                    hide\n                end\n            else\n                if <(answer) = (join (Prefix) [activateBossFight])> then\n                    ask [Are you sure you want to activate the boss fight?] and wait\n                    if <(answer) = [Yes]> then\n                        say [Activating Boss Fight. Stand Clear.] for (2) seconds\n                        broadcast (ActivateBossFight v)\n                        hide\n                    else\n                        if <(answer) = [No]> then\n                            say [Activate Boss Fight Command Rejected.] for (2) seconds\n                            hide\n                        end\n                    end\n                else\n                    if <(answer) = (join (Prefix) [giveLazerBlade])> then\n                        say [LazerBlade Loading.] for (0.5) seconds\n                        say [LazerBlade Loading..] for (0.5) seconds\n                        say [LazerBlade Loading...] for (0.5) seconds\n                        set [lazerbladeinuse v] to [true]\n                        set [weaponactive v] to [LazerBlade]\n                        hide\n                    else\n                        if <(answer) = (join (Prefix) [giveShockwave])> then\n                            say [Shockwave Loading.] for (0.5) seconds\n                            say [Shockwave Loading..] for (0.5) seconds\n                            say [Shockwave Loading...] for (0.5) seconds\n                            set [shockwaveinuse v] to [true]\n                            set [weaponactive v] to [Shockwave]\n                            say [Press S to Activate Shockwave] for (2) seconds\n                            hide\n                        else\n                            if <(answer) = (join (Prefix) [setBossHealth])> then\n                                ask [What do you want the BossHealth to be?] and wait\n                                if <[numbers v] contains (answer)?> then\n                                    set [bosshealth v] to (answer)\n                                    say [Boss Health Set] for (2) seconds\n                                    hide\n                                else\n                                    say [Invalid Command. Try again] for (2) seconds\n                                    hide\n                                end\n                            else\n                                if <(answer) = (join (Prefix) [commands])> then\n                                    say [There are a total of 6 commands to be used.] for (2) seconds\n                                    say [Commands: levelChange, setBossHealth, activateBossFight, giveLazerBlade, giveShockwave, commands, activateSkullFight. Press any key to proceed.]\n                                    wait until <key (any v) pressed?>\n                                    say [If you have access to these commands, you are either the developer or are a close friend of mine or you have earned it!] for (5) seconds\n                                    hide\n                                else\n                                    if <(answer) = (join (Prefix) [giveShield])> then\n                                        say [Shield Loading.] for (0.5) seconds\n                                        say [Shield Loading..] for (0.5) seconds\n                                        say [Shield Loading...] for (0.5) seconds\n                                        broadcast (ShieldCommandActivated v)\n                                        hide\n                                    else\n                                        if <(answer) = (join (Prefix) [giveAllWeapons])> then\n                                            say [Weapons Loading.] for (0.5) seconds\n                                            say [Weapons Loading..] for (0.5) seconds\n                                            say [Weapons Loading...] for (0.5) seconds\n                                            set [lazerbladeinuse v] to [true]\n                                            set [weaponactive v] to [LazerBlade]\n                                            set [shockwaveinuse v] to [true]\n                                            hide\n                                        else\n                                            if <(answer) = (join (Prefix) [skip])> then\n                                                say [Level Skip Loading.] for (0.5) seconds\n                                                say [Level Skip Loading..] for (0.5) seconds\n                                                say [Level Skip Loading...] for (0.5) seconds\n                                                broadcast (NextLevelTransition v)\n                                                hide\n                                            else\n                                                if <(answer) = (join (Prefix) [activateSkullFight])> then\n                                                    ask [Are you sure you want to activate the Skull boss fight?] and wait\n                                                    if <(answer) = [Yes]> then\n                                                        say [Activating Skull Boss Fight. Stand Clear.] for (2) seconds\n                                                        broadcast (HalloweenEvent v)\n                                                        hide\n                                                    else\n                                                        if <(answer) = [No]> then\n                                                            say [Activate Skull Boss Fight Command Rejected.] for (2) seconds\n                                                            hide\n                                                        end\n                                                    end\n                                                else\n                                                    say [No Command was recognised. Try Again] for (2) seconds\n                                                    hide\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nhide\nset [prefix v] to [/]\n\n@JadeOfMisery\n\nwhen flag clicked\nset [miseryjade v] to [false]\ngo to x: (0) y: (-66.5)\nhide\n\nwhen flag clicked\nset size to (100) %\nswitch costume to (key v)\nforever\n    if <(current [month v]) = [10]> then\n        if <(Level) = [13]> then\n            show\n            change y by (([sin v] of ((timer) * (225)) ) * (0.5))\n            if <touching (player v)?> then\n                set [miseryjade v] to [true]\n            end\n        else\n            hide\n        end\n    else\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(MiseryJade) = [true]> then\n        go to [front v] layer\n        set size to (70) %\n        go to (player v)\n        change x by (((DirectionOfPlayer) / (12)) - (((DirectionOfPlayer) / (12)) * (2)))\n        if <touching (jadeofmiseryportal v)?> then\n            broadcast (JadeOfMiseryPortalActivate v)\n            stop [other scripts in sprite v]\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [portalactivate v]\nhide\n\n@JadeOfMiseryPortal\n\nwhen I receive [jadeofmiseryportalactivate v]\nswitch costume to (open v)\nwait (0.5) seconds\nbroadcast (HalloweenEvent v)\n\nwhen flag clicked\nhide\nswitch costume to (closed v)\n\nwhen flag clicked\nforever\n    if <(SkullDefeated) = [false]> then\n        if <(current [month v]) = [10]> then\n            if <(Level) = [13]> then\n                show\n                turn right (5) degrees\n                go to x: (201) y: (-50)\n            end\n        else\n            stop [other scripts in sprite v]\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [hideportal v]\nhide\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        if <(MiseryJade) = [true]> then\n            play sound [Portal Enter v] until done\n            wait until <not <touching (player v)?>>\n        end\n    end\nend\n\n@Skull\n\ndefine Gravity of Skull: (gravity) Jump Height: (jump) Speed: (speed) Friction: (friction) SlopeOfEnemy: (slope)\nchange [yvelocity v] by (gravity)\nchange y by (YVelocity)\nif <touching (level v)?> then\n    repeat until <not <touching (level v)?>>\n        change y by ((([abs v] of (YVelocity) ) / (YVelocity)) * (-1))\n    end\n    set [yvelocity v] to (<<(y position) > (([y position v] of [player v]) - (500))> and <(([abs v] of (YVelocity) ) / (YVelocity)) = [-1]>> * (jump))\nend\nset [xvelocity v] to (((XVelocity) + ((() * ((speed) * (-1))) + (() * (speed)))) * (friction))\nchange x by (XVelocity)\nset [slopeofenemy v] to [0]\nrepeat until <<(SlopeOfEnemy) = ((slope) * (-1))> or <not <touching (level v)?>>>\n    change y by (1)\n    change [slopeofenemy v] by (-1)\nend\nif <touching (level v)?> then\n    change y by (SlopeOfEnemy)\n    repeat until <not <touching (level v)?>>\n        change x by ((([abs v] of (XVelocity) ) / (XVelocity)) * (-1))\n    end\nend\n\nwhen flag clicked\ngo to x: (180) y: (-33)\nset [skullhealth v] to [100]\nset [skulldefeated v] to [false]\nclear graphic effects\nforever\n    if <(Level) = [22]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [halloweenbossfightlevel v]\nwait (2) seconds\nif <(Level) = [22]> then\n    broadcast (SkullSpeak v)\nend\n\ndefine TestBossFight\nset [lazerbladeinuse v] to [true]\nset [shockwaveinuse v] to [true]\nset [weaponactive v] to [LazerBlade]\nset [level v] to [19]\n\nwhen flag clicked\nset [skullhealth v] to [20]\nforever\n    if <key (g v) pressed?> then\n        if <(username) = [Pavan2007]> then\n            TestBossFight\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (SkullHealth)\n    if <<touching (lazerblade v)?> or <touching (shockwave v)?>> then\n        change [skullhealth v] by (-1)\n        set [ghost v] effect to (50)\n        wait until <not <<touching (lazerblade v)?> or <touching (shockwave v)?>>>\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen I receive [activateskullboss v]\nwait until <(SkullHealth) < [20]>\nbroadcast (SelectLazerSpot v)\nwait (1) seconds\nbroadcast (DeployLazer v)\n\nwhen I receive [death v]\nchange [skullhealth v] by (7)\nif <<(SkullHealth) = [20]> or <[20] < (SkullHealth)>> then\n    set [skullhealth v] to [20]\nend\nswitch costume to (SkullHealth)\n\nwhen I receive [activateskullboss v]\nwait until <(SkullHealth) < [17]>\nbroadcast (SelectShockwaveSpot v)\nwait (1) seconds\nbroadcast (Deploy Shockwaves v)\n\nwhen I receive [activateskullboss v]\nwait until <(SkullHealth) < [15]>\nbroadcast (DeployLightning v)\n\nwhen I receive [activateskullboss v]\nwait until <(SkullHealth) < [13]>\nbroadcast (SelectBallSpot v)\nwait (1) seconds\nbroadcast (DeployBalls v)\nbroadcast (SpeakAtlast v)\n\nwhen I receive [deathdifferent v]\nchange [skullhealth v] by (1)\nif <<(SkullHealth) = [20]> or <[20] < (SkullHealth)>> then\n    set [skullhealth v] to [20]\nend\nswitch costume to (SkullHealth)\n\nwhen I receive [activateskullboss v]\nwait until <(SkullHealth) < [1]>\nbroadcast (SkullDefeated v)\n\nwhen I receive [skulldefeated v]\nswitch costume to (err0r101 - defeated v)\nglide (5) secs to x: (180) y: (62)\nbroadcast (FadeAwayEffect v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nset [skulldefeated v] to [true]\nbroadcast (OpenPortalAccessKey v)\n\nwhen flag clicked\nset [skullhealth v] to [20]\nforever\n    if <key (n v) pressed?> then\n        if <(username) = [Pavan2007]> then\n            set [skullhealth v] to [2]\n        end\n    end\nend\n\nwhen I receive [activateskullboss v]\nwait (1) seconds\nset volume to (100) %\nrepeat until <(SkullHealth) = [1]>\n    play sound [MadCity - Season 7 Boss v] until done\nend\n\nwhen I receive [skulldefeated v]\nchange volume by (-100)\nwait (1) seconds\nbroadcast (StartAllSounds v)\n\nwhen I receive [skulldefeated v]\nchange [☁ skulldefeats v] by (1)\n\nwhen I receive [skulldefeated v]\nforever\n    switch costume to (err0r101 - defeated v)\nend\n\nwhen I receive [skulldefeated v]\nset [miseryjade v] to [BossDefeated. Proceed.]\n\n\n\nwhen flag clicked\nforever\n    if <touching (skull attack v)?> then\n        change [skullhealth v] by (-1)\n        set [ghost v] effect to (50)\n        wait (0.001) seconds\n        set [ghost v] effect to (0)\n    end\nend\n\n@PortalSkull\n\nwhen I receive [activateportalskull v]\nswitch costume to (open v)\nwait (0.5) seconds\nbroadcast (Ooohhh v)\nstop [other scripts in sprite v]\nbroadcast (HidePortal v)\n\nwhen flag clicked\nhide\nswitch costume to (closed v)\n\nwhen flag clicked\nforever\n    if <(SkullDefeated) = [true]> then\n        show\n        turn right (5) degrees\n        go to x: (202) y: (-44)\n    else\n        hide\n    end\nend\n\nwhen I receive [hideportal v]\nhide\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        if <(SkullDefeated) = [true]> then\n            broadcast (ActivatePortalskull v)\n            play sound [Portal Enter v] until done\n            stop [this script v]\n        end\n    end\nend\n\n@Skull Attack\n\nwhen I receive [selectballspot v]\nrepeat until <(SkullHealth) < [1]>\n    wait (5) seconds\n    set [randomballspreadspot v] to (pick random (-100) to (92))\nend\n\nwhen I receive [deployballs v]\nrepeat until <(SkullHealth) < [1]>\n    if <(BossCanAttack?) = [true]> then\n        switch costume to (warning v)\n        point in direction (90)\n        forever\n            set size to (100) %\n            wait (pick random (1) to (2)) seconds\n            go to x: (RandomBallSpreadSpot) y: (0)\n            clear graphic effects\n            show\n            switch costume to (warning v)\n            repeat (5)\n                show\n                wait (0.1) seconds\n                hide\n                wait (0.1) seconds\n            end\n            show\n            clear graphic effects\n            hide\n            Clone [10]\n        end\n    else\n        hide\n    end\nend\n\ndefine (s) (spd)\nrepeat until <(round (size)) = (round (s))>\n    change size by (((s) - (size)) / (spd))\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [skulldefeated v]\nstop [other scripts in sprite v]\nhide\n\ndefine Clone (number of clones)\nrepeat (number of clones)\n    create clone of (_myself_ v)\n    point towards (player v)\nend\n\nwhen I start as a clone\nshow\nswitch costume to (ball v)\ngo to [front v] layer\nrepeat until <<touching (_edge_ v)?> or <touching (level v)?>>\n    move (7) steps\n    if <<touching (lazerblade v)?> or <touching (shockwave v)?>> then\n        point towards (skull v)\n    else\n        if <<touching (player v)?> or <touching (skull v)?>> then\n            wait (0.2) seconds\n            delete this clone\n        end\n    end\nend\ndelete this clone\n\n
Haven't played the first game yet? Play here:\nhttps://scratch.mit.edu/projects/413155756/\n\nPlay the story diversion here:\nhttps://scratch.mit.edu/projects/440911573/\n\nPlay in Full Screen for the best experience!\n\nThis project is not advertising friendly. You may get reported if you advertise. \n\nPlease report any bugs found in the game. I will try my best to fix it.\n\nI present to you... The sequel to Cyber Quest and the Jade Samurai... And a project that has been worked on for over 2 months...\n\n                  ⚔ Welcome to Cyber Quest 2 ⚔\n\nIn this game you will find out what happens after the incidents in Cyber Quest. You embark on a journey to defeat the CEO of the Cyber Hacking Headquarters. Will any secrets be revealed? Will you manage to defeat the CEO? Will you find out what happened to Jade Samurai? Will you emerge victorious? Play the game to find out!\n\nThis game was made by @Pavan2007.\n\nThanks to @HolyDogeWorks and @Cheese_Is_Cheesy for motivating me through stressful times.\n\nInstructions:\n - Use arrow keys or WASD to move.\n - Use Space to swing the Lazerblade or deploy the \n    shockwave.\n - Use S to switch weapons\n - Use M to Mute/Unmute\n - Use Q to Enable/Disable prompts\n - Use Z to close pop-ups and dialogue box.\n - Defeat the boss to prove you are a well- \n    programmed robot!\n\nCredits:\n - Huge thanks to @SmugLeaf2004 for creating \n   custom boss music for this game!\n - Thanks to @Quaxx for the Lazerblade code.\n - Thanks to @Solarz4scratch for the amazing intro!\n - Thanks to @SypTitan for lightning and taser scripts.\n - Thanks to @FireMayro for the dialogue box.\n - Thanks to @Jumper133 for the transition.\n - Thanks to @shinkansen for the smoke effects.\n - Thanks to @kirbyzaz for the shockwave code.\n - Thanks to @StratfordJames for Win Screen art.\n - Thanks to @MrL-Sigma, @SypTitan and \n    @Cheese_Is_Cheesy for Beta Testing my game!\n - Thanks to me for 95% code.\n - Thanks to me for all game art! Cyber Kua was \n   inspired by Mad City on Roblox.\n\nAfter Release Updates:\nv1.0.1 - Small fixes. Made the Lazerblade shorter.\n\nv1.1 - Skip Button Update! Now you can skip the hardest levels! Be warned! There are only 3 charges! You cannot skip portal levels and the boss fight!\n\nv1.2 - Admin Commands! Press '/' to activate! These commands are there mostly to help me out in testing new upgrades. You may get this if you have done something amazing for the Scratch Community or if you are a very kind and helpful person!\n\nv1.3 - Optimization Update! Many extra blocks were removed to provide you with the best experience! I hope lag and other experience breaking factors have died down now! Hope to update soon!\n\nv1.35 - Repositioned UI. Should be more accessible now! Much more visible too!\n\nv1.4 - Made the boss battle more possible to complete! Reduced the minion spawn rate to 5! Thanks @ButteryflyWings22 for pointing that out!\n\nv1.5 - Removed Secret Shield. That was a limited time only thing!\n\nv1.6 - Replaced Boss Music with custom made music by @SmugLeaf2004! Huge thanks to them!\n\nv1.7 - Made an update to the boss. The attacks do not spawn near spawn point now!\n\nv1.8 - The text does not vanish now! I have set it so that it only fades a bit when the player touches the text! Thanks to @Max-0 for the suggestion!\n\nv1.9 - Reduced Boss Regeneration by 3. Now it only regenerates 2 health every time you die! Hope that makes it easier!\n\nv1.9.5 - Minor UI Update. Keep the game a bit more clean ;)\n\nv2.0 - The final version of Cyber Quest 2! NEW Boss Fight, available for a limited time only, every October! NEW Attack: Spread Attack! Easter eggs, UI improvements and Bug Fixes were added! Can you beat the boss? More features tomorrow!\n\nv2.1 - I know I said v2.0 was the final version, but this was requested by my friend, so I couldn't refrain. I added a mute button and a prompt disable button! Press 'M' to mute/unmute. Press 'Q' to disable/enable story prompts. Thanks!\n\nFuture Updates:\n - Reward for Halloween Boss Fight\n - Secret Mode\n\nReduced to over 3200 blocks of code!\n\n#games #art #animations #stories #all\n\n\n\nComment 'Pol. I read this far.' if you read everything from top to bottom! Only a few do that...\n\n\n\n\n\nGet this to 200 loves and faves for Cyber Quest 3!