The Jade Samurai | A Platformer v0.6.5

Instructions: Abandoned Game. Why do you even look at this? Go follow @Pavan2007 if you want to know what happened to Jade Samurai. [HINT]: It's in his game called Cyber Quest 2!\n\nThank You so much for #29 on trending for games!\n\nThis project isn't advertising friendly. You may get reported if you do advertise! Thank you.\n\nDevelopers:\n- @Pavan2007\n- @Rexylium\n- @Cheese_Is_Cheesy\n\n-- Want any features? Suggest them in the comments section of this project:  https://scratch.mit.edu/projects/459935237/\n\n-- Want to see if you set the next speed run record? Just check the data of cloud variables below the love and fave buttons!\n\n-- Please DO NOT change cloud variables or variables that go to the cloud variables. It takes a lot of time to fix these...\n\n-- Find any bugs? Report them to either @Pavan2007 or @Cheese_Is_Cheesy immediately! Any level problems? Please report this to @Rexylium ASAP!\n\n-- Reshared to fix huge Cloud Server bugs and added more features and Easter eggs. Can you find them all? Also fixed boss fight bug and Sword and Skip button bugs. \n\n -- Be sure to check this game out!\nhttps://scratch.mit.edu/projects/462369927/\n- Made by @SypTitan\n\n@Splatblox presents to you... A project that has been worked on for over 2 months...\n\n⚔Welcome to The Jade Samurai⚔\n\nIn this game you will find yourself starting a new life to become a life saving Samurai. Throughout your journey you will face obstacles that will train your ability to do good. Your guide will help you throughout your journey. Will you discover something that will change your life? Or will you save the world from destruction?\n\nThis game was made by Splat Studios on Scratch. \n\nRAGE WARNING!\n\nInstructions:\n - Use WASD or Arrow Keys to move around\n - Use Space to use Sword/Ninja Star\n - Use S to switch weapons\n - Collect all coins\n - Try and get all the achievements to prove you are the best samurai!\n\nCredits:\n - @Pavan2007 and @Cheese_Is_Cheesy for coding the game! Go follow them!\n - @Rexylium for doing all game art! Go and follow him too!\n - @Will_Wam and @-InfinityCode- for inspiration.\n - @Will_Wam for Ninja Star code.\n - @-InfinityCode- for Sword code.\n - @Sk0nk for intro. Taken permission from @Pavan2007 to use it. \n - Super Phantom Cat 2 for art inspiration\n - And you for playing, loving and favouriting this game!\n - Thanks to @StratfordJames for Win and Loose screen animation and art.\n - @SypTitan for helping us fix bugs!\n - @TimMcCool for turbo mode detector!\n\nFamous Loves, Faves or Comments:\n@20mock\n@OverheatedStudios\n@CobaltOcean\n@nampinanathali\n\nFirst 7 people to follow @Pavan2007, @Cheese_Is_Cheesy, @Rexylium and @Splatblox will get a special SKIN! Comment "I followed Everyone" to notify us!\n\nAfter Release:\nv0.4.1 - Bug fixes and Cloud Highscore! (Scratcher Status ACHIEVED!)\nv0.4.2 - Updated Cloud System. Encoding and Decoding added. Cloud will not work for new Scratchers and the developer team.\nv0.4.3 - More Bugs fixed. Sword and Particle bugs fixed thanks to @SypTitan. Thank you so much dude! \nv0.5 - Huge Cloud Improvements and bug fixes. Tiny easter eggs added and more achievements added.\nv0.5.1 - Speed Run Bug fixed.\nv0.5.2 - People were saying the level was too hard so @Rexylium has modified it a little bit.\nv0.5.3 - Skip Button Added!\nv0.5.4 - Portrait Changed. Easter Eggs implemented\nv0.5.5 - Turbo Mode Detector added.\nv0.5.6 - Skip button bugs fixed.\nv0.5.7 - Miniscule artistic changes\nv0.5.8 - Upgraded Shuriken Design! \nv0.5.9 - Faster Shuriken\nv0.6 - Updated Level 6 and Level 11. Easier.\nv0.6.1 - This game is going to receive small updates from now on. Small improvements added to reduce lag.\nv0.6.2 - NEW Weapons UI!\nv0.6.3 - Small UI changes and improvements to performance.\nv0.6.4 - Improvements to lag prevention. Clones reduced by 50%\nv0.6.5 - Skip Button Bug Fix.\n\nBefore Release:\nv0.1.0 - Void - Nothingness...\nv0.1.1 - Added Player with Player Scripts.\nv0.1.2 - Added Level with level functions\nv0.1.3 - Added Particle effects when walking on ground\nv0.1.4 - Added Clouds\nv0.1.5 - Added Randomized Stars!\nv0.1.6 - Added Sword - Press Space to use. Few glitches tho.\nv0.1.7 - 10 New Levels! New level designer @Rexylium\nv0.1.8 - Death Particles\nv0.1.9 - Added Saws\nv0.2 - Added Lava\nv0.2.1 - Added Working Enemy AI!\nv0.2.2 - Tons of NEW LEVELS!\nv0.2.3 - Added Coins\nv0.2.4 - Added Shop - Jump Boost and Speed Boost\nv0.2.5 - Added New Developer Ring - For testing purposes \nv0.2.6 - Redone Enemy Textures.\nv0.2.7 - Developer Skins Added\nv0.2.8 - New Background Art\nv0.2.9 - NEW Boss Fight!\nv0.3 - Transitions \nv0.3.1 - Laser Attack (Boss Fight)\nv0.3.2 - Shuriken Attack (Boss Fight)\nv0.3.3 - New Main Menu + Bug Fixes\nv0.3.4 - Speed Run Mode\nv0.3.5 - Ninja Attack III - Spike Attack\nv0.3.6 - Minor Bug Fixes\nv0.3.7 - Thumbnail\nv0.3.8 - Bug Fixes...Again\nv0.3.9 - Added Crystal\nv0.4 - Added Portal and Screen UI\n\n@Pavan2007's High Score = 3 mins and 9 seconds\n@Cheese_Is_Cheesy's High Score = 5 mins and 9 seconds\n\n#games #animation #music #all #art #stories #all 

@Stage\n\nwhen flag clicked\nforever\n    broadcast (Tick v)\nend\n\nwhen I receive [next level v]\nset [switchinprogress v] to [true]\nwait (0.5) seconds\nset [switchinprogress v] to [false]\n\nwhen flag clicked\nforever\n    switch backdrop to (Level)\nend\n\nwhen [m v] key pressed\nif <<<(username) = [Splatblox]> or <<(username) = [Rexylium]> or <(username) = [Pavan2007]>>> or <(username) = [Cheese_Is_Cheesy]>> then\n    show variable [mouse v]\n    set [mouse v] to (join (mouse x) (join [,] (mouse y)))\nend\n\nwhen [h v] key pressed\nif <<<(username) = [Splatblox]> or <<(username) = [Rexylium]> or <(username) = [Pavan2007]>>> or <(username) = [Cheese_Is_Cheesy]>> then\n    hide variable [mouse v]\n    set [mouse v] to [0]\nend\n\nwhen I receive [playgame! v]\nset volume to (100) %\nforever\n    play sound [Amadeus Legendary EDM Release v] until done\n    wait (2) seconds\n    play sound [Lost_Sky_-_Dreams_NCS_Release\[Youtubetomp3 v] until done\n    wait (2) seconds\n    play sound [Jim Yosef - Link \[NCS Release\] v] until done\n    wait (2) seconds\n    play sound [TheFatRat - Unity v] until done\n    wait (2) seconds\n    play sound [Undertale Megolovania v] until done\n    wait (2) seconds\nend\n\nwhen I receive [stopallothersounds v]\nset volume to (0) %\n\nwhen I receive [startupothersongs v]\nset volume to (100) %\n\nwhen flag clicked\nrepeat until <(Level) = [28]>\n    broadcast (Nothing v)\nend\nif <(SpeedRunMode) = [On]> then\n    if <<(username) = [Pavan2007]> or <<(username) = [Cheese_Is_Cheesy]> or <<(username) = [Rexylium]> or <(username) = []>>>> then\n        broadcast (Nothing v)\n    else\n        broadcast (Set HighScore v)\n    end\nelse\n    broadcast (Nothing v)\nend\n\nset [☁ highscore encoded v] to [30]\n\nwhen flag clicked\nset [weaponinuse v] to []\nset [ninjastaractive? v] to [0]\nset [swordactive? v] to [0]\n\n@Lag Reducer\n\n@Player\n\nwhen flag clicked\nhide\n\nwhen I receive [playgame! v]\nshow\nswitch costume to (costume1 v)\nbroadcast (Reset Enemy v)\nset [x v] to [0]\nset [y v] to [0]\nset [level v] to [1]\nset [swordactive? v] to [0]\nset [ninjastaractive? v] to [0]\ngo to x: (-210) y: (0)\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        if <<<(Level) = [12]> or <(Level) = [13]>> or <(Level) = [14]>> then\n            switch costume to (cyber samurai right v)\n        else\n            if <(username) = [Rexylium]> then\n                switch costume to (rexylium right v)\n            else\n                if <(username) = [Pavan2007]> then\n                    switch costume to (pavan2007 right v)\n                else\n                    if <(username) = [SplatBlox]> then\n                        switch costume to (splatblox right v)\n                    else\n                        if <(username) = [Cheese_Is_Cheesy]> then\n                            switch costume to (cheese_is_cheesy right v)\n                        else\n                            if <(username) = [bossiboi]> then\n                                switch costume to (bossiboi right v)\n                            else\n                                if <(username) = [SypTitan]> then\n                                    switch costume to (syptitan right v)\n                                else\n                                    if <(username) = [SypTest]> then\n                                        switch costume to (syptitan right v)\n                                    else\n                                        if <(username) = [Tadic_08]> then\n                                            switch costume to (tadic_08 right v)\n                                        else\n                                            if <(username) = [escapedec]> then\n                                                switch costume to (escapedec right v)\n                                            else\n                                                if <(username) = [dragonbaker00]> then\n                                                    switch costume to (dragonbaker00 right v)\n                                                else\n                                                    switch costume to (jade samurai right v)\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        if <(Speed Boost!) = [1]> then\n            change [x v] by (1.85)\n        else\n            change [x v] by (1)\n        end\n        set [directionofplayer v] to [90]\n        broadcast (Check v)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        if <<<(Level) = [12]> or <(Level) = [13]>> or <(Level) = [14]>> then\n            switch costume to (cyber samurai left v)\n        else\n            if <(username) = [Rexylium]> then\n                switch costume to (rexylium left v)\n            else\n                if <(username) = [Pavan2007]> then\n                    switch costume to (pavan2007 left v)\n                else\n                    if <(username) = [Splatblox]> then\n                        switch costume to (splatblox left v)\n                    else\n                        if <(username) = [Cheese_Is_Cheesy]> then\n                            switch costume to (cheese_is_cheesy left v)\n                        else\n                            if <(username) = [bossiboi]> then\n                                switch costume to (bossiboi left v)\n                            else\n                                if <(username) = [SypTitan]> then\n                                    switch costume to (syptitan left v)\n                                else\n                                    if <(username) = [SypTest]> then\n                                        switch costume to (syptitan left v)\n                                    else\n                                        if <(username) = [Tadic_08]> then\n                                            switch costume to (tadic_08 left v)\n                                        else\n                                            if <(username) = [escapedec]> then\n                                                switch costume to (escapedec left v)\n                                            else\n                                                if <(username) = [dragonbaker00]> then\n                                                    switch costume to (dragonbaker00 left v)\n                                                else\n                                                    switch costume to (jade samurai left v)\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        if <(Speed Boost!) = [1]> then\n            change [x v] by (-1.85)\n        else\n            change [x v] by (-1)\n        end\n        set [directionofplayer v] to [-90]\n        broadcast (Check v)\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 > then\n                                switch costume to (costume1 v)\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 > then\n            switch costume to (costume1 v)\n            change [#jumps v] by (1)\n            if <(Jump Boost!) = [1]> then\n                change [y v] by (19)\n            else\n                change [y v] by (15)\n            end\n        end\n    end\n    change y by (1)\n    if <<(x position) > [230]> and <(HealthPoints - NinjaKing) > [0]>> then\n    if <<key (d v) pressed?> or <key (down arrow v) pressed?>> then\n        switch costume to (costume3 v)\n    end\n    if <<touching (katana v)?> and <not <(WeaponInUse) = [Sword]>>> then\n        set [swordactive? v] to [1]\n        set [weaponinuse v] to [Sword]\n        broadcast (Check v)\n    end\n    if <<touching (shuriken show v)?> and <not <(WeaponInUse) = [NinjaStar]>>> then\n        set [ninjastaractive? v] to [1]\n        set [weaponinuse v] to [NinjaStar]\n    end\n    if <<<<<<<<touching (spikes v)?> or <touching (saw v)?>> or <touching (enemy ai v)?>> or <touching (lava v)?>> or <touching (ninja king attack i v)?>> or <touching (ninja king attack ii v)?>> or <touching (ninja king ii v)?>> or <touching (ninja king attack iii v)?>> then\n        set [xofplayerwhendead v] to (x position)\n        set [yofplayerwhendead v] to (y position)\n        change [#deaths v] by (1)\n        change [☠deaths☠ v] by (1)\n        go to x: (-210) y: (0)\n        broadcast (Dead v)\n        broadcast (Restart v)\n        start sound [Roblox Death Sound Effect.mp3 v]\n        broadcast (Reset Enemy v)\n    end\n    if <touching (coins v)?> then\n        change [coins v] by (10)\n        broadcast (Delete Coin Clone v)\n    end\n    if <touching (portal v)?> then\n        broadcast (Winner! v)\n    end\nend\n\nwhen flag clicked\nset [level v] to [1]\nset [#jumps v] to [0]\nset [speed run final time v] to []\nforever\n    set [xofplayer v] to (X)\n    set [yofplayer v] to (Y)\nend\n\nwhen I receive [nextlevelcomplete v]\nif <(Level) = [25]> then\n    broadcast (StartTalkingNinja v)\nend\n\nwhen I receive [battlestart v]\nset [isbattlestartworking? v] to [YEET]\nbroadcast (EnemyAttackStart! v)\n\nwhen I receive [next level v]\nrepeat until <(Level) = [25]>\n    set [healthpoints - ninjaking v] to [-1]\nend\n\nwhen flag clicked\nset [#deaths v] to [0]\n\nwhen I receive [next level v]\nif <(Level) = [26]> then\n    broadcast (CheckNoDeaths v)\n    broadcast (CheckLessthan10deaths v)\nend\n\nwhen I receive [checknodeaths v]\nforever\n    if <<not <[acheivements v] contains [NoDeaths!]?>> and <(#Deaths) = [0]>> then\n        add [NoDeaths!] to [acheivements v]\n    end\nend\n\nwhen I receive [begin v]\nrepeat until <(Level) = [25]>\n    set [healthpoints - ninjaking v] to [-1]\nend\n\nwhen I receive [playgame! v]\nrepeat until <(Level) = [25]>\n    set [healthpoints - ninjaking v] to [-1]\nend\n\nwhen flag clicked\nrepeat until <(Level) = [25]>\n    set [healthpoints - ninjaking v] to [-1]\nend\n\nwhen I receive [checklessthan10deaths v]\nforever\n    if <<not <[acheivements v] contains [LessThan10Deaths]?>> and <(#Deaths) < [10]>> then\n        add [LessThan10Deaths] to [acheivements v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <<not <[acheivements v] contains [JumpOnce]?>> and <(#Jumps) = [1]>> then\n        add [JumpOnce] to [acheivements v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <<not <[acheivements v] contains [Jump5Times]?>> and <(#Jumps) = [5]>> then\n        add [Jump5Times] to [acheivements v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <<not <[acheivements v] contains [Jump10Times]?>> and <(#Jumps) = [10]>> then\n        add [Jump10Times] to [acheivements v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <<not <[acheivements v] contains [Jump100Times]?>> and <(#Jumps) = [100]>> then\n        add [Jump100Times] to [acheivements v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <<not <[acheivements v] contains [Jump1000Times]?>> and <(#Jumps) = [1000]>> then\n        add [Jump1000Times] to [acheivements v]\n    end\nend\n\nset [#jumps v] to [999]\n\nwhen I receive [jadeinvertedskinactivated v]\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        switch costume to (inverted jade samurai right v)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        switch costume to (inverted jade samurai left v)\n    end\nend\n\n@Level\n\nwhen flag clicked\nhide\n\nwhen I receive [begin v]\nshow\nforever\n    switch costume to (Level)\n    go to x: (-40) y: (16)\nend\n\n@Effect\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\ngo to [back v] layer\nset [ghost v] effect to (0)\nset size to (pick random (20) to (80)) %\nshow\npoint in direction (pick random (-360) to (360))\ngo to (player v)\nchange x by (XOfPlayer)\nchange y by (-17)\nwait (0.075) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen flag clicked\nhide\nforever\n    if <(YOfPLayer) < [0]> then\n        wait until <(YOfPLayer) = [0]>\n        repeat until <(YOfPLayer) > [0]>\n            repeat (2)\n                move (0) steps\n            end\n            create clone of (_myself_ v)\n        end\n    end\nend\n\n@Katana\n\nwhen I receive [nextlevelcomplete v]\nif <not <(Level) = [1]>> then\nif <(Level) = [2]> then\n    show\n    go to x: (0) y: (200)\nelse\n    hide\nend\n\nrepeat (14)\n    move (0) steps\nend\n\nwhen flag clicked\nswitch backdrop to (1 v)\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [tick v]\nif <(WeaponInUse) = [Sword]> then\n    show\n    go to (player v)\n    point in direction ([direction v] of [player v])\nelse\n    if <(WeaponInUse) = [NinjaStar]> then\n        hide\n    end\nend\n\nwhen [space v] key pressed\nif <(SwitchInProgress) = [false]> then\n    go to [front v] layer\n    if <(WeaponInUse) = [Sword]> then\n        if <(DirectionOfPlayer) = [-90]> then\n            start sound [Low Whoosh v]\n            broadcast (SwordUse v)\n            switch costume to (9 v)\n            repeat (7)\n                next costume\n            end\n            wait (0.5) seconds\n            repeat until <(costume [number v]) = [9]>\n                switch costume to ((costume [number v]) - (1))\n            end\n            wait until <not <key (space v) pressed?>>\n        else\n            start sound [Low Whoosh v]\n            broadcast (SwordUse v)\n            switch costume to (1 v)\n            repeat (7)\n                next costume\n            end\n            wait (0.5) seconds\n            repeat until <(costume [number v]) = [1]>\n                switch costume to ((costume [number v]) - (1))\n            end\n            wait until <not <key (space v) pressed?>>\n        end\n    end\nend\n\nwhen [s v] key pressed\nif <<(SwordActive?) = [1]> and <(NinjaStarActive?) = [1]>> then\n    if <(WeaponInUse) = [Sword]> then\n        set [weaponinuse v] to [NinjaStar]\n    else\n        if <(WeaponInUse) = [NinjaStar]> then\n            if <(ThrowInProgress) = [false]> then\n                set [weaponinuse v] to [Sword]\n            end\n        end\n    end\nend\n\nwhen I receive [check v]\nif <(WeaponInUse) = [Sword]> then\n    if <(DirectionOfPlayer) = [-90]> then\n        switch costume to (9 v)\n    else\n        switch costume to (1 v)\n    end\nelse\n    switch costume to (2 v)\nend\n\nwhen flag clicked\nswitch backdrop to (1 v)\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [begin v]\nset size to (125) %\nhide\nswitch costume to (1 v)\nset [weaponinuse v] to []\nset [switchinprogress v] to [false]\nforever\n    if <(SwitchInProgress) = [false]> then\n        set y to ((([sin v] of ((200) * (timer)) ) * (5)) + (-50))\n        if <(WeaponInUse) = [Sword]> then\n            go to [front v] layer\n            show\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [hidesword v]\nhide\nwait (5) seconds\nshow\n\nset y to ((([sin v] of ((200) * (timer)) ) * (5)) + (-50))\n\n@Clouds\n\nwhen I start as a clone\nswitch costume to (pick random (1) to (4))\nset [ghost v] effect to (50)\ngo [forward v] (1) layers\nshow\nset size to (150) %\ngo to x: (350) y: (pick random (-30) to (165))\nrepeat (269)\n    change x by (-2)\nend\ndelete this clone\n\nwhen I receive [begin v]\nhide\nforever\n    create clone of (_myself_ v)\n    wait (pick random (1) to (4)) seconds\nend\n\n@Shuriken Show\n\nwhen I receive [nextlevelcomplete v]\nif <not <(Level) = [1]>> then\n    repeat (14)\n        move (0) steps\n    end\nend\nif <(Level) = [5]> then\n    go to x: (0) y: (50)\n    show\nelse\n    hide\nend\n\nwhen flag clicked\nswitch costume to (shuriken 3.0 v)\ngo to x: (0) y: (0)\nhide\n\nwhen flag clicked\nset size to (100) %\nhide\nswitch costume to (shuriken 3.0 v)\nset [ghost v] effect to (0)\nforever\n    change y by (([sin v] of ((timer) * (225)) ) * (0.5))\n    turn right (4) degrees\n    if <touching (player v)?> then\n        repeat (10)\n            change [ghost v] effect by (10)\n            change y by (5)\n            turn right (15) degrees\n        end\n        hide\n    end\nend\n\n@Shuriken Throw\n\nwhen I receive [next level v]\nif <not <(Level) = [1]>> then\n    repeat (14)\n        move (0) steps\n    end\nend\n\nwhen flag clicked\nswitch costume to (shuriken 3.0 v)\ngo to x: (0) y: (0)\nhide\n\nwhen flag clicked\nset size to (100) %\nhide\nswitch costume to (shuriken 3.0 v)\nset [throwinprogress v] to []\nwait (1) seconds\nset [throwinprogress v] to [false]\n\nwhen I receive [tick v]\nif <(WeaponInUse) = [NinjaStar]> then\n    show\n    if <not <(ThrowInProgress) = [true]>> then\n        go to [front v] layer\n        go [backward v] (4) layers\n        go to (player v)\n        change x by (((DirectionOfPlayer) / (12)) - (((DirectionOfPlayer) / (12)) * (2)))\n        change y by (0)\n    end\nelse\n    if <(WeaponInUse) = [Sword]> then\n        hide\n    end\nend\n\nwhen [space v] key pressed\nif <not <(SwitchInProgress) = [true]>> then\n    if <(WeaponInUse) = [NinjaStar]> then\n        set [ghost v] effect to (0)\n        go to [front v] layer\n        set [throwinprogress v] to [true]\n        set [ninjastardirectionofplayer v] to ((DirectionOfPlayer) / (4.5))\n        repeat until <<<touching (level v)?> or <touching (_edge_ v)?>> or <touching (ninja king attack i v)?>>\n            turn right (10) degrees\n            change x by (NinjaStarDirectionOfPlayer)\n        end\n        set [throwinprogress v] to [false]\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen I receive [hideninjastar v]\nhide\nwait (5) seconds\nshow\n\nwhen I receive [next level v]\nhide\n\nwhen I receive [end transition v]\nshow\n\nwhen I receive [end transition v]\nshow\n\n@Spikes\n\nwhen flag clicked\nhide\n\nwhen I receive [begin v]\nshow\nforever\n    go to x: (-17) y: (16)\n    switch costume to (Level)\n    go to [back v] layer\nend\n\n@Information\n\nwhen flag clicked\nhide\n\nwhen I receive [playgame! v]\nshow\ngo to x: (0) y: (0)\nforever\n    go to [front v] layer\n    go [backward v] (1) layers\n    if <touching (mouse-pointer v)?> then\n        switch costume to (press s to switch v)\n    else\n        if <(WeaponInUse) = []> then\n            switch costume to (noweapons v)\n        else\n            switch costume to (WeaponInUse)\n        end\n    end\nend\n\nwhen I receive [hide infor v]\nhide\nwait (5) seconds\nshow\n\nwhen I receive [activate shop v]\nif <(Shop Activation - All Sprites) = [On]> then\n    hide\nelse\n    show\nend\n\nwhen I receive [next level v]\nif <(SpeedRunActive?) = [true]> then\n\nwhen I receive [lost v]\nhide\nhide variable [speedruntime v]\n\nwhen I receive [winner! v]\nhide\nhide variable [speedruntime v]\n\n@Death Particles\n\ndefine ParticleEffect\nrepeat (5)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [dead v]\nif <not <(Clone ID for Particles) = [1]>> then\n    repeat (4)\n        ParticleEffect\n    end\nend\n\nwhen flag clicked\nset [clone id for particles v] to []\nhide\n\nwhen I start as a clone\nswitch costume to (pick random (1) to (4))\nset [color v] effect to (pick random (-5) to (5))\nset [brightness v] effect to (pick random (-20) to (0))\nset [ghost v] effect to (0)\nset [clone id for particles v] to [1]\nif <(NumberOfPlayerDeathParticleClones) > [150]> then\n    change [numberofplayerdeathparticleclones v] by (-1)\n    delete this clone\nend\ngo to x: (XofPlayerWhenDead) y: (YofPlayerWhenDead)\nshow\nset [xvelocity v] to (pick random (-10) to (10))\nset [yvelocity v] to (pick random (5) to (30))\nrepeat until <<touching (_edge_ v)?> or <touching (level v)?>>\n    change [yvelocity v] by (-2)\n    set [xvelocity v] to ((XVelocity) * (0.9))\n    set [yvelocity v] to ((YVelocity) * (0.9))\n    change x by (XVelocity)\n    change y by (YVelocity)\n    set x to (x position)\n    set y to (y position)\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 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 y by (1)\n                                                if <touching (level v)?> then\n                                                    change y by (1)\n                                                else\n                                                    change y by (-1)\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nset [clone id for particles v] to []\nchange [numberofplayerdeathparticleclones v] by (-1)\ndelete this clone\n\n@Saw\n\nwhen flag clicked\nset size to (160) %\nforever\n    go to [back v] layer\n    turn right (5) degrees\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [17]> then\n        go to x: (140) y: (-94)\n    end\n    if <(Level) = [16]> then\n        go to x: (19) y: (-94)\n    end\n    if <(Level) = [18]> then\n        go to x: (160) y: (-165)\n    end\n    if <(Level) = [19]> then\n        go to x: (-23) y: (-11)\n    end\n    if <(Level) = [21]> then\n        go to x: (60) y: (15)\n    end\nend\n\nwhen flag clicked\nshow\nforever\n    switch costume to (Level)\nend\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@Enemy AI\n\ndefine Restart\nhide\nstop [other scripts in sprite v]\nset [x v] to [0]\nset [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 [x v] by (0.2)\nend\nif <([x position v] of [player v]) < (x position)> then\n    change [x v] by (-0.2)\nend\nchange x by (X)\nSlope Detection\n\n    change x by ((X) * (-0.9))\nend\nif <touching (level v)?> then\n    change x by ((X) * (-0.9))\n    if <(y position) < ([x position v] of [player v])> then\n        if <(X) > [0]> then\n            set [x v] to [-10]\n            set [y v] to [10]\n        else\n            set [x v] to [10]\n            set [y v] to [10]\n        end\n    else\n        set [x v] to [0]\n    end\nelse\n    set [x v] to ((X) * (.9))\nend\nchange y by (Y)\nif <touching (level v)?> then\n    change y by ((Y) * (-1))\n    set [y v] to [0]\n    if <((y position) - (25)) < ([x position v] of [player v])> then\n        if <(Jumping?) = [no]> then\n            set [y v] to [12]\n            set [jumping? v] to [yes]\n        end\n    end\nelse\n    change [y v] by (-1)\n    set [jumping? v] to [no]\nend\nif <[-179] > (y position)> then\n    delete this clone\nend\n\n    set [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 [reset enemy v]\nRestart\n\nwhen I start as a clone\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 (shuriken throw v)?> or <touching (katana v)?>> or <touching (lava v)?>> or <touching (specialweaponfordevelopers 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 [Crunch v]\n        delete this clone\n    end\nend\n\nwhen I receive [spawn v]\nwait (.01) seconds\nif <<<<(Level) = [1]> or <(Level) = [2]>> or <(Level) = [5]>> or <<(Level) = [10]> or <(Level) = [25]>>> then\n\nwhen I receive [delete clones v]\ndelete this clone\n\nwhen I receive [green flag v]\ngo to [back v] layer\nRestart\nhide\nset [level v] to [1]\n\ndefine Clone At: (x) (y)\ncreate clone of (_myself_ v)\nset x to (x)\nset y to (y)\n\nwhen I receive [enemyattackstart! v]\nforever\n    if <(Level) = [25]> then\n        repeat until <(HealthPoints - NinjaKing) < [1]>\n            wait (1) seconds\n            create clone of (_myself_ v)\n        end\n    end\nend\n\nset [level v] to [24]\n\nwhen I receive [playertouchedninja v]\nforever\n    if <(Level) = [25]> then\n        repeat until <(HealthPoints - NinjaKing) < [1]>\n            wait (1) seconds\n            create clone of (_myself_ v)\n        end\n    end\nend\n\nwhen I receive [next level v]\n\nstop [other scripts in sprite v]\nwait (1.5) seconds\n\n@Death Particles for Enemy\n\ndefine ParticleEffect\nrepeat (5)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [enemy dead v]\nif <not <(Clone ID for EnemyParticles) = [1]>> then\n    repeat (4)\n        ParticleEffect\n    end\nend\n\nwhen flag clicked\nset [clone id for enemyparticles v] to []\nhide\n\nwhen I start as a clone\nswitch costume to (pick random (1) to (3))\nset [color v] effect to (pick random (-5) to (5))\nset [brightness v] effect to (pick random (-20) to (0))\nset [ghost v] effect to (0)\nset [clone id for enemyparticles v] to [1]\nchange [numberofdeathparticleclones v] by (1)\nif <(NumberOfDeathParticleClones) > [77]> then\n    change [numberofdeathparticleclones v] by (-1)\n    delete this clone\nend\ngo to x: (XOfEnemyWhenDead) y: (YOfEnemyWhenDead)\nshow\nset [xvelocity v] to (pick random (-10) to (10))\nset [yvelocity v] to (pick random (5) to (30))\nrepeat until <<touching (_edge_ v)?> or <touching (level v)?>>\n    change [yvelocity v] by (-2)\n    set [xvelocity v] to ((XVelocity) * (0.9))\n    set [yvelocity v] to ((YVelocity) * (0.9))\n    change x by (XVelocity)\n    change y by (YVelocity)\n    set x to (x position)\n    set y to (y position)\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 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 y by (1)\n                                                if <touching (level v)?> then\n                                                    change y by (1)\n                                                else\n                                                    change y by (-1)\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nset [clone id for enemyparticles v] to []\nchange [numberofdeathparticleclones v] by (-1)\ndelete this clone\n\n@SpecialWeaponForDevelopers\n\nwhen flag clicked\nhide\n\nwhen I receive [begin v]\nshow\nclear graphic effects\nforever\n    if <(username) = [Pavan2007]> then\n        switch costume to (pavan2007 v)\n        go to (player v)\n    else\n        if <(username) = [Rexylium]> then\n            switch costume to (rexylium v)\n            go to (player v)\n        else\n            if <(username) = [Cheese_Is_Cheesy]> then\n                switch costume to (cheese_is_cheesy v)\n                go to (player v)\n            else\n                if <(username) = [Splatblox]> then\n                    switch costume to (splatblox v)\n                    go to (player v)\n                else\n                    hide\n                end\n            end\n        end\n    end\nend\n\n@Coins\n\ndefine Create Clone at X: (x) Y: (y) Level (level)\nif <(Level) = (level)> then\n    set [x v] to (x)\n    set [y v] to (y)\n    create clone of (_myself_ v)\nelse\n    delete this clone\nend\n\nwhen I start as a clone\nshow\nset x to (X)\nset y to (Y)\n\nwhen I receive [next level v]\nCreate Clone at X: [-1] Y: [-46] Level [1]\nCreate Clone at X: [164] Y: [-14] Level [2]\nCreate Clone at X: [0] Y: [87] Level [3]\nCreate Clone at X: [211] Y: [-48] Level [4]\nCreate Clone at X: [133] Y: [130] Level [5]\nCreate Clone at X: [161] Y: [-46] Level [6]\nCreate Clone at X: [155] Y: [19] Level [7]\nCreate Clone at X: [160] Y: [77] Level [8]\nCreate Clone at X: [95] Y: [-47] Level [9]\nCreate Clone at X: [-33] Y: [23] Level [10]\nCreate Clone at X: [-33] Y: [11] Level [11]\nCreate Clone at X: [192] Y: [50] Level [12]\nCreate Clone at X: [61] Y: [50] Level [14]\nCreate Clone at X: [211] Y: [-45] Level [16]\n\nwhen flag clicked\nhide\n\nwhen I receive [delete coin clone v]\ndelete this clone\n\nwhen I receive [begin v]\nCreate Clone at X: [-1] Y: [-46] Level [1]\nset [coins v] to [0]\n\nchange [coins v] by (100)\n\nwhen I receive [next level v]\nrepeat (3)\n    if <not <(Level) = (level)>> then\n        delete this clone\n    end\nend\n\nwhen flag clicked\nshow list [acheivements v]\nhide\n\nwhen flag clicked\nset [#coins v] to [0]\nforever\n    if <<not <[acheivements v] contains [CoinsCollected]?>> and <(#Coins) = [13]>> then\n        add [CoinsCollected] to [acheivements v]\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        change [#coins v] by (1)\n    end\nend\n\n@Intro\n\nwhen flag clicked\n\nwhen I start as a clone\nif <<(letter (1) of (Clone)) = [L]> and <(length of (Clone)) = [2]>> then\n    point in direction (-135)\n    set [ghost v] effect to (100)\n    set size to (0) %\n    set y to (-1000)\n    switch costume to (letter (2) of (Clone))\n    set x to (((letter (2) of (Clone)) * (40)) - (120))\n    repeat until <(round (y position)) = [0]>\n        turn right (((90) - (direction)) * (.15)) degrees\n        change y by (((0) - (y position)) * (.15))\n        change [ghost v] effect by (-10)\n        change size by (((150) - (size)) * (.15))\n    end\n    set [xv v] to [8]\n    wait (.2) seconds\n    repeat until <(x position) < [-99]>\n        change x by (XV)\n        change [xv v] by (-1)\n    end\n    repeat (10)\n        change x by (XV)\n        change [xv v] by (-1)\n        change [ghost v] effect by (20)\n    end\n    set x to (200)\n    set [xv v] to [-10]\n    repeat until <(x position) < [-90]>\n        change [ghost v] effect by (-30)\n        change x by (XV)\n        change [xv v] by (-1)\n    end\n    repeat (10)\n        change x by (XV)\n        change [xv v] by (-1)\n        change [ghost v] effect by (20)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nshow\n\nwhen I start as a clone\nif <(Clone) = [Back]> then\n    go to x: (0) y: (0)\n    go to [back v] layer\n    switch costume to (back v)\nend\n\nwhen flag clicked\n\nwhen I start as a clone\nif <(Clone) = [Logo]> then\n    point in direction (-135)\n    set [ghost v] effect to (100)\n    set size to (0) %\n    set y to (0)\n    switch costume to (logo v)\n    set x to (0)\n    repeat until <(round (size)) = [450]>\n        turn right (((90) - (direction)) * (.15)) degrees\n        change y by (((0) - (y position)) * (.15))\n        change [ghost v] effect by (-20)\n        change size by (((450) - (size)) * (.15))\n    end\n    wait (.1) seconds\n    set [clone v] to [Transition1]\n    create clone of (_myself_ v)\n    set [clone v] to [Transition2]\n    create clone of (_myself_ v)\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Transition1]> then\n    go to [front v] layer\n    point in direction (-135)\n    set [ghost v] effect to (100)\n    set [ghost v] to [100]\n    set size to (100) %\n    set y to (0)\n    switch costume to (back v)\n    set x to (-1000)\n    repeat until <(round (Ghost)) = [35]>\n        go to [front v] layer\n        change [ghost v] by (((35) - (Ghost)) * (.2))\n        turn right (((90) - (direction)) * (.15)) degrees\n        change x by (((0) - (x position)) * (.15))\n        set [ghost v] effect to (Ghost)\n    end\n    broadcast (End v)\nend\n\nwhen I start as a clone\nif <(Clone) = [Transition2]> then\n    go to [front v] layer\n    point in direction (-135)\n    set [ghost v] effect to (100)\n    set [ghost v] to [100]\n    set size to (100) %\n    set y to (0)\n    switch costume to (back v)\n    set x to (1000)\n    repeat until <(round (Ghost)) = [35]>\n        go to [front v] layer\n        change [ghost v] by (((35) - (Ghost)) * (.2))\n        turn right (((90) - (direction)) * (.15)) degrees\n        change x by (((0) - (x position)) * (.15))\n        set [ghost v] effect to (Ghost)\n    end\nend\n\nwhen I receive [end v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I receive [introstart v]\nhide\nset [clone v] to [L1]\ncreate clone of (_myself_ v)\nwait (.05) seconds\nset [clone v] to [L2]\ncreate clone of (_myself_ v)\nwait (.05) seconds\nset [clone v] to [L3]\ncreate clone of (_myself_ v)\nwait (.05) seconds\nset [clone v] to [L4]\ncreate clone of (_myself_ v)\nwait (.05) seconds\nset [clone v] to [L5]\ncreate clone of (_myself_ v)\nwait (.05) seconds\nwait (3) seconds\nset [clone v] to [Logo]\ncreate clone of (_myself_ v)\nwait (2.2) seconds\nbroadcast (Begin v)\n\nwhen I receive [introstart v]\nset [clone v] to [Back]\ncreate clone of (_myself_ v)\nhide\n\n@Ninja King II\n\ndefine Say (text) At Speed (speed) With Pitch (pitch)\nset [pitch v] effect to ((80) + (((pitch) * (4)) - (5)))\ndelete all of [text v]\nset [text v] to []\nset [letter v] to []\nrepeat ((length of (text)) + (1))\n    add (letter ((Letter) + (1)) of (text)) to [text v]\n    set [text v] to (join (Text) (item (Letter) of [text v]))\n    say (Text)\n    start sound (pick random (1) to (2))\n    wait (speed) seconds\n    change [letter v] by (1)\nend\nwait ((speed) * (20)) seconds\nsay []\n\ndefine Gravity of Ninja King: (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 I receive [dead v]\nchange [healthpoints - ninjaking v] by (5)\nif <<(HealthPoints - NinjaKing) = [20]> or <[20] < (HealthPoints - NinjaKing)>> then\n    set [healthpoints - ninjaking v] to [20]\nend\nswitch costume to (HealthPoints - NinjaKing)\n\nwhen I receive [battlestart v]\nset volume to (100) %\nclear graphic effects\ngo to x: (183) y: (0)\nset rotation style [left-right v]\npoint in direction (90)\nshow\nswitch costume to (-1 v)\nset [fade v] to [0]\nset [xvelocity v] to [0]\nset [xvelocity v] to [0]\nset [healthpoints - ninjaking v] to [20]\nswitch costume to (HealthPoints - NinjaKing)\nforever\n    if <(HealthPoints - NinjaKing) > [0]> then\n        Gravity of Ninja King: [-0.9] Jump Height: [15] Speed: [100000] Friction: [3] SlopeOfEnemy: [0]\n        if <<touching (shuriken throw v)?> or <touching (katana v)?>> then\n            set [brightness v] effect to (-100)\n            start sound [pop v]\n            change [healthpoints - ninjaking v] by (-1)\n            switch costume to (HealthPoints - NinjaKing)\n            wait until <not <<touching (shuriken throw v)?> or <touching (katana v)?>>>\n            set [brightness v] effect to (0)\n        end\n    else\n        broadcast (NinjaWarHasEnded:\( v)\n        broadcast (ChangeFadeEffect v)\n        broadcast (DontHurtME! v)\n        broadcast (SoundGoAWASY v)\n        broadcast (StartupOtherSongs v)\n        broadcast (BossAcheivement v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\nhide\nrepeat until <(Level) = [25]>\n    set [healthpoints - ninjaking v] to [-1]\nend\n\nwhen I receive [vanish v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [donthurtme! v]\nforever\n    set [healthpoints - ninjaking v] to [-1]\nend\n\nwhen I receive [activate shop v]\n\nwhen flag clicked\nwait until <<(Level) = [25]> and <(HealthPoints - NinjaKing) = [15]>>\nbroadcast (LazerSpotSelect v)\nwait (1) seconds\nbroadcast (LazerAttack! v)\n\nwhen flag clicked\nwait until <<(Level) = [25]> and <(HealthPoints - NinjaKing) = [10]>>\nbroadcast (NinjaStarSpot v)\nwait (1) seconds\nbroadcast (attak v)\n\nwhen I receive [soundgoawasy v]\nrepeat (20)\n    change volume by (-5)\nend\nstop all sounds\n\nwhen I receive [ninjawarhasended:\( v]\nchange [brightness v] effect by (-10000)\n\nwhen flag clicked\nwait until <<(Level) = [25]> and <(HealthPoints - NinjaKing) = [5]>>\nbroadcast (Spike Spot Select v)\nwait (1) seconds\nbroadcast (Attack! v)\n\nwhen I receive [starttalkingninja v]\nset volume to (100) %\nbroadcast (StopAllOtherSounds v)\nshow\ngo to x: (183) y: (0)\nset rotation style [left-right v]\npoint in direction (90)\nSay [Well, hello there young Samurai!] At Speed [0.01] With Pitch [1]\nwait (2) seconds\nSay [I guess you have found me after all of the obstacles I had in store for you!] At Speed [0.01] With Pitch [1]\nwait (2) seconds\nSay [I guess you are quite strong to get past all those! Aren't you?] At Speed [0.01] With Pitch [1]\nwait (2) seconds\nSay [Well, let's see how strong you are when you face me! The crystal that powers me will obviously give me enough power to DESTROY YOU!] At Speed [0.01] With Pitch [1]\nwait (2) seconds\nSay [Ninjalings! DESTROY The Jade Samurai!] At Speed [0.01] With Pitch [1]\nwait (2) seconds\nbroadcast (BattleStart v)\nbroadcast (StartSound v)\n\nset [pitch v] effect to (0)\n\nwhen I receive [bossacheivement v]\nforever\n    if <<not <[acheivements v] contains [DefeatBoss]?>> and <(HealthPoints - NinjaKing) < [0]>> then\n        add [DefeatBoss] to [acheivements v]\n    end\nend\n\nwhen I receive [firstenemykill v]\nforever\n    if <not <[acheivements v] contains [EnemyKilled]?>> then\n        add [EnemyKilled] to [acheivements v]\n    end\nend\n\nwhen I receive [destroyedcrstal v]\nforever\n    if <not <[acheivements v] contains [DestroyedCrystal]?>> then\n        add [DestroyedCrystal] to [acheivements v]\n    end\nend\n\n@Level Recovery Sprite\n\nwhen flag clicked\nhide\n\n@ScreenUI\n\nwhen I receive [lost v]\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\nshow\nswitch costume to (blank v)\nset size to (150) %\nswitch costume to (loose screen v)\nrepeat until <(size) < [101]>\n    go to [front v] layer\n    switch costume to (blank v)\n    change size by (((100) - (size)) / (7))\n    switch costume to (loose screen v)\n    change [ghost v] effect by (-5)\n    set x to (((((pick random (0) to (1)) * (2)) - (1)) * ((size) - (100))) * (0.75))\n    set y to (((((pick random (0) to (1)) * (2)) - (1)) * ((size) - (100))) * (0.75))\nend\ngo to x: (0) y: (0)\nshow variable [☠deaths☠ v]\nstop [all v]\n\nwhen flag clicked\nhide\nhide variable [speed run final time v]\nhide variable [☠deaths☠ v]\nhide variable [highscoreshow v]\nhide variable [☁ highscore encoded v]\n\nwhen I receive [winner! v]\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\nshow\nswitch costume to (blank v)\nset size to (150) %\nswitch costume to (win screen! v)\nrepeat until <(size) < [101]>\n    go to [front v] layer\n    switch costume to (blank v)\n    change size by (((100) - (size)) / (7))\n    switch costume to (win screen! v)\n    change [ghost v] effect by (-5)\n    set x to (((((pick random (0) to (1)) * (2)) - (1)) * ((size) - (100))) * (0.75))\n    set y to (((((pick random (0) to (1)) * (2)) - (1)) * ((size) - (100))) * (0.75))\nend\ngo to x: (0) y: (0)\nif <(SpeedRunMode) = [On]> then\n    set [speed run final time v] to (SpeedRunTime)\n    show variable [speed run final time v]\n    show variable [☠deaths☠ v]\n    show variable [highscoreshow v]\n    hide variable [speedruntime v]\nelse\n    show variable [☠deaths☠ v]\n    show variable [highscoreshow v]\n    hide variable [speedruntime v]\nend\nstop [all v]\n\n@DeathEffect\n\nwhen I receive [do the thing v]\nshow\nclear graphic effects\ngo to [front v] layer\ngo to (ninja king ii v)\nrepeat until <(Fade) = [100]>\n    turn right (3) degrees\nend\nbroadcast (WhiteScreen v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nbroadcast (Vanish v)\n\nwhen I receive [changefadeeffect v]\nset [fade v] to [0]\nbroadcast (Do the thing v)\nrepeat (10)\n    wait (0.5) seconds\n    change [fade v] by (10)\nend\n\nwhen flag clicked\nhide\n\nset [level v] to [24]\n\nset [ninjastaractive? v] to [1]\n\nset [healthpoints - ninjaking v] to [15]\n\nset [healthpoints - ninjaking v] to [10]\n\nset [healthpoints - ninjaking v] to [5]\n\nadd [CoinsCollected] to [acheivements v]\n\nset [portal unlocked? v] to [true]\n\nset [swordactive? v] to [1]\n\ndelete (2) of [acheivements v]\n\nset [weaponinuse v] to [Sword]\n\n@Ninja King Attack I\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nswitch costume to (lazer v)\nshow\ngo to [front v] layer\ngo to x: (RandomLazer - All) y: (0)\nwait (1) seconds\ndelete this clone\n\nwhen I receive [lazerspotselect v]\nrepeat until <(HealthPoints - NinjaKing) < [0]>\n    wait (7) seconds\n    set [randomlazer - all v] to (pick random (-177) to (177))\nend\nstop [other scripts in sprite v]\nrepeat (100)\n    hide\nend\n\nwhen I receive [lazerattack! v]\nrepeat until <(HealthPoints - NinjaKing) < [0]>\n    show\n    forever\n        wait (pick random (1) to (6)) seconds\n        go to x: (RandomLazer - All) y: (0)\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        create clone of (_myself_ v)\n    end\nend\n\n@Ninja King Attack II\n\nwhen I receive [attak v]\nrepeat until <(HealthPoints - NinjaKing) < [0]>\n    show\n    forever\n        wait (pick random (3) to (7)) seconds\n        go to x: (228) y: (RandomNinjaStar)\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        create clone of (_myself_ v)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nswitch costume to (ninjastar v)\nshow\ngo to [front v] layer\ngo to x: (228) y: (RandomNinjaStar)\nwait (0) seconds\nrepeat (20)\n    change x by (-15)\n    turn right (15) degrees\nend\nrepeat until <<<<touching (_edge_ v)?> or <touching (katana v)?>> or <touching (shuriken throw v)?>> or <touching (specialweaponfordevelopers v)?>>\n    change x by (-15)\n    turn right (15) degrees\nend\nrepeat (3)\n    change x by (-15)\n    turn right (15) degrees\nend\ndelete this clone\n\nwhen I receive [ninjastarspot v]\nrepeat until <(HealthPoints - NinjaKing) < [0]>\n    wait (7) seconds\n    set [randomninjastar v] to (pick random (63) to (-72))\nend\nstop [other scripts in sprite v]\nrepeat (100)\n    hide\nend\n\n@Ninja King Attack III\n\nwhen I receive [attack! v]\nrepeat until <(HealthPoints - NinjaKing) < [0]>\n    show\n    forever\n        wait (0.5) seconds\n        go to x: (RandomSpike) y: (-55)\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        create clone of (_myself_ v)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nswitch costume to (notreallyalazer v)\nshow\ngo to [back v] layer\ngo to x: (RandomSpike) y: (-70)\nwait (1) seconds\ndelete this clone\n\nwhen I receive [spike spot select v]\nrepeat until <(HealthPoints - NinjaKing) < [0]>\n    wait (7) seconds\n    set [randomspike v] to (pick random (-167) to (118))\nend\nstop [other scripts in sprite v]\nrepeat (100)\n    hide\nend\n\n@WhiteScreen\n\nwhen flag clicked\nshow\nset [ghost v] effect to (0)\n\nwhen I receive [whitescreen v]\nbroadcast (HideShop v)\nbroadcast (HideNinjaStar v)\nbroadcast (HideSword v)\nbroadcast (Hide Infor v)\nshow\ngo to [front v] layer\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (2) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\n\nwhen I receive [introstart v]\nhide\nset [ghost v] effect to (100)\n\nwhen I receive [whitescreentransition2 v]\nbroadcast (HideShop v)\nbroadcast (HideNinjaStar v)\nbroadcast (HideSword v)\nbroadcast (Hide Infor v)\nshow\ngo to [front v] layer\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (2) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\n\n@Achievements Engine\n\nwhen flag clicked\ngo to x: (157) y: (-101)\nhide\nclear graphic effects\nset [ghost v] effect to (100)\ndelete all of [acheivements v]\nset [collectallcoins v] to [0]\nset [nodeaths! v] to [0]\nset [jump5 v] to [0]\nset [jump100 v] to [0]\nset [jump10 v] to [0]\nset [jumponce v] to [0]\nset [jump1000\(why would u do dis?\) v] to [0]\nset [bossdefeated? v] to [0]\nset [enemykilledonce v] to [0]\nset [crystaldestroyed? v] to [0]\nforever\n    go to [front v] layer\n    if <<[acheivements v] contains [CoinsCollected]?> and <(CollectAllCoins) = [0]>> then\n        switch costume to (achievement: collect all coins v)\n        wait (2) seconds\n        show\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n        wait (3) seconds\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        set [collectallcoins v] to [1]\n        hide\n    end\n    if <<[acheivements v] contains [NoDeaths!]?> and <(NoDeaths!) = [0]>> then\n        switch costume to (achievement: no deaths! v)\n        wait (2) seconds\n        show\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n        wait (3) seconds\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        set [nodeaths! v] to [1]\n        hide\n    end\n    if <<<[acheivements v] contains [LessThan10Deaths]?> and <(LessThan10Deaths) = [0]>> and <(NoDeaths!) = [0]>> then\n        switch costume to (achievement: less than 10 deaths! v)\n        wait (2) seconds\n        show\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n        wait (3) seconds\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        set [lessthan10deaths v] to [1]\n        hide\n    end\n    if <<[acheivements v] contains [JumpOnce]?> and <(JumpOnce) = [0]>> then\n        switch costume to (achievement:jump once v)\n        wait (2) seconds\n        show\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n        wait (3) seconds\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        set [jumponce v] to [1]\n        hide\n    end\n    if <<[acheivements v] contains [Jump5Times]?> and <(Jump5) = [0]>> then\n        switch costume to (achievement: jump 5 times v)\n        wait (2) seconds\n        show\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n        wait (3) seconds\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        set [jump5 v] to [1]\n        hide\n    end\n    if <<[acheivements v] contains [Jump10Times]?> and <(Jump10) = [0]>> then\n        switch costume to (achievement: jump 10 times v)\n        wait (2) seconds\n        show\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n        wait (3) seconds\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        broadcast (Change Played v)\n        set [jump10 v] to [1]\n        hide\n    end\n    if <<[acheivements v] contains [Jump100Times]?> and <(Jump100) = [0]>> then\n        switch costume to (achievement: jump 100 times v)\n        wait (2) seconds\n        show\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n        wait (3) seconds\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        set [jump100 v] to [1]\n        hide\n    end\n    if <<[acheivements v] contains [Jump1000Times]?> and <(Jump1000\(Why would u do dis?\)) = [0]>> then\n        switch costume to (achievement: jump 1000 times v)\n        wait (2) seconds\n        show\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n        wait (3) seconds\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        set [jump1000\(why would u do dis?\) v] to [1]\n        hide\n    end\n    if <<[acheivements v] contains [DefeatBoss]?> and <(BossDefeated?) = [0]>> then\n        switch costume to (achievement:boss defeated!' v)\n        wait (2) seconds\n        show\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n        wait (3) seconds\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        set [bossdefeated? v] to [1]\n        broadcast (BossDefeatsCloud v)\n        hide\n    end\n    if <<[acheivements v] contains [EnemyKilled]?> and <(EnemyKilledOnce) = [0]>> then\n        switch costume to (achievement: enemy killed once! v)\n        wait (2) seconds\n        show\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n        wait (3) seconds\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        set [enemykilledonce v] to [1]\n        hide\n    end\n    if <<[acheivements v] contains [DestroyedCrystal]?> and <(CrystalDestroyed?) = [0]>> then\n        switch costume to (achievement: crystal destroyed! v)\n        wait (2) seconds\n        show\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n        wait (3) seconds\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        set [crystaldestroyed? v] to [1]\n        broadcast (CrystalDefeatsCloud v)\n        hide\n    end\nend\n\n@Play Button\n\nwhen I receive [begin v]\nshow\nswitch costume to (playtext v)\ngo to x: (0) y: (45)\nrepeat (10)\n    go to [front v] layer\nend\nforever\n    point in direction ((90) + (([sin v] of ((Turn🔄) * (5)) ) * (10)))\n    if <(ScreenState) = [1]> then\n        change [turn🔄 v] by (1)\n    end\n    if <(ScreenState) = [1]> then\n        show\n    else\n        hide\n    end\n    if <touching (mouse-pointer v)?> then\n        change size by (((110) - (size)) / (4))\n        set [brightness v] effect to (20)\n    else\n        change size by (((80) - (size)) / (4))\n        set [brightness v] effect to (0)\n    end\nend\n\nif <touching (mouse-pointer v)?> then\n    change size by (((110) - (size)) / (4))\n    if <mouse down?> then\n        change size by (((140) - (size)) / (4))\n        broadcast (PlayGame! v)\n        set [screenstate v] to [0]\n    else\n        change size by (((90) - (size)) / (4))\n    end\nelse\n    change size by (((80) - (size)) / (4))\nend\n\nwhen I receive [playgame! v]\nhide\nstop [other scripts in sprite v]\nset [screenstate v] to [0]\nset [speedrunmode v] to [Off]\n\nwhen flag clicked\nset [screenstate v] to [1]\nhide\n\nwhen I receive [begin v]\nforever\n    if <touching (mouse-pointer v)?> then\n        if <<(ScreenState) = [1]> and <not <(InstructionsShow?) = [1]>>> then\n            start sound [Touch v]\n            wait until <not <touching (mouse-pointer v)?>>\n        end\n    end\nend\n\nwhen I receive [begin v]\nshow\nwait until <<<touching (mouse-pointer v)?> and <mouse down?>> and <not <(InstructionsShow?) = [1]>>>\nbroadcast (PlayGame! v)\nbroadcast (PlayButtonClucked v)\nset [screenstate v] to [0]\nset [speedrunmode v] to [Off]\n\n@SpeedRunActivation\n\nwhen I receive [begin v]\nshow\ngo to x: (0) y: (-10)\nswitch costume to (playtext v)\nrepeat (10)\n    go to [front v] layer\nend\nforever\n    point in direction ((90) + (([sin v] of ((Turn🔄) * (5)) ) * (5)))\n    if <touching (mouse-pointer v)?> then\n        change size by (((110) - (size)) / (4))\n        if <mouse down?> then\n            change size by (((140) - (size)) / (4))\n            set [speedrunmode v] to [On]\n            broadcast (PlayGame! v)\n            broadcast (SpeedRunModeOn v)\n        else\n            change size by (((90) - (size)) / (4))\n            set [speedrunactive? v] to [true]\n        end\n    else\n        change size by (((80) - (size)) / (4))\n    end\nend\n\nwhen I receive [speedrunmodeon v]\nhide\nstop [other scripts in sprite v]\nbroadcast (SpeedRunActivate! v)\nbroadcast (StartUpConting v)\n\nwhen I receive [startupconting v]\nset [speedrunmode v] to [On]\nforever\n    if <(SpeedRunMode) = [On]> then\n        set [speedruntime v] to (join (Minutes) (join [ minutes] (join [ and ] (join (Seconds) [ seconds]))))\n    end\nend\n\nwhen I receive [speedrunactivate! v]\nwait until <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<key (left arrow v) pressed?> or <key (space v) pressed?>>>>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>>\nforever\n    if <(SpeedRunMode) = [On]> then\n        show variable [speedruntime v]\n        wait (1) seconds\n        change [seconds v] by (1)\n        if <(Seconds) = [59]> then\n            set [seconds v] to [0]\n            change [minutes v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nhide\nset [seconds v] to [0]\nset [minutes v] to [0]\nset [speedruntime v] to [0]\nset [speedrunactive? v] to [false]\nhide variable [speedruntime v]\nset [speedrunmode v] to [Off]\n\nchange [minutes v] by (10)\n\nwhen I receive [fadeawayspeed v]\nhide\n\nwhen I receive [resetspeed v]\nshow\n\nwhen I receive [begin v]\nforever\n    if <touching (mouse-pointer v)?> then\n        start sound [Touch v]\n        wait until <not <touching (mouse-pointer v)?>>\n    end\nend\n\nwhen I receive [playbuttonclucked v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [begin v]\nshow\nwait until <<<touching (mouse-pointer v)?> and <mouse down?>> and <not <(InstructionsShow?) = [1]>>>\nset [screenstate v] to [0]\n\n@Instructions\n\nwhen I receive [playgame! v]\nhide\nstop [other scripts in sprite v]\n\nwhen flag clicked\nset [screenstate v] to [1]\nhide\n\nwhen I receive [begin v]\nshow\nswitch costume to (playtext v)\ngo to x: (0) y: (-57)\nrepeat (10)\n    go to [front v] layer\nend\nforever\n    point in direction ((90) + (([sin v] of ((Turn🔄) * (5)) ) * (1.5)))\n    if <(ScreenState) = [1]> then\n        show\n    else\n        hide\n    end\n    if <touching (mouse-pointer v)?> then\n        change size by (((110) - (size)) / (4))\n        set [brightness v] effect to (20)\n        if <<mouse down?> and <<(ScreenState) = [1]> and <not <(InstructionsShow?) = [1]>>>> then\n            broadcast (OpenInstructions v)\n        end\n    else\n        change size by (((80) - (size)) / (4))\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [begin v]\nforever\n    if <touching (mouse-pointer v)?> then\n        if <<(ScreenState) = [1]> and <not <(InstructionsShow?) = [1]>>> then\n            start sound [Touch v]\n            wait until <not <touching (mouse-pointer v)?>>\n        end\n    end\nend\n\nwhen I receive [begin v]\nshow\nwait until <<<touching (mouse-pointer v)?> and <mouse down?>> and <not <(InstructionsShow?) = [1]>>>\n\n@Instructions Page\n\nwhen flag clicked\nhide\nset [instructionsshow? v] to [0]\n\nwhen I receive [openinstructions v]\nset [instructionsshow? v] to [1]\nshow\nclear graphic effects\nset size to (10) %\nrepeat (3)\n    go to [front v] layer\nend\nrepeat (20)\n    change size by (((100) - (size)) / (5))\nend\nwait until <<mouse down?> and <touching (mouse-pointer v)?>>\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\nset [instructionsshow? v] to [0]\n\n@MenuBackgroundLayout\n\nwhen I receive [begin v]\nset [screenstate v] to [1]\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\nforever\n    if <(ScreenState) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [playgame! v]\nhide\n\nwhen I receive [resetbrightness v]\nrepeat (5)\n    change [brightness v] effect by (-20)\nend\n\nwhen I receive [setbrightnessforrest v]\nrepeat (10)\n    change [brightness v] effect by (10)\nend\n\n@NextLevelTransition og\n\nwhen flag clicked\nhide\n\nwhen flag clicked\n\nwhen I receive [next level v]\nif <(Level) = [25]> then\n    change [level v] by (1)\nelse\n    change [level v] by (1)\n    broadcast (NextlevelComplete v)\n    broadcast (Check v)\n    if <(SpeedRunMode) = [Off]> then\n        broadcast (Check v)\n        go [forward v] (10000) layers\n        switch costume to (transitionn3 v)\n        show\n        repeat (20)\n            change y by (((0) - (y position)) / (4))\n        end\n        wait (1) seconds\n        repeat (20)\n            change y by (((345) - (y position)) / (4))\n        end\n        hide\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nclear graphic effects\nset [color v] effect to (0)\n\nwhen I receive [speedrunactivate! v]\nforever\n    hide\nend\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nclear graphic effects\ngo to [front v] layer\nswitch costume to (official thumbnail v)\nshow\nwait (0.5) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\nbroadcast (IntroStart v)\n\n@Crystal \n\nwhen flag clicked\nforever\n    go to x: (2) y: (-75)\n    set y to ((([sin v] of ((200) * (timer)) ) * (5)) + (-50))\nend\n\nwhen flag clicked\nhide\nset [portal unlocked? v] to [false]\n\nwhen I receive [next level v]\nif <(Level) = [27]> then\n    show\n    broadcast (Check Requirements v)\nend\n\nwhen I receive [startsound v]\nset [pitch v] effect to (0)\nset volume to (100) %\nif <(Level) = [25]> then\n    forever\n        play sound [Electroman Adventures v] until done\n        wait (1) seconds\n        play sound [Roblox Mad City Starlord Theme Song v] until done\n        wait (1) seconds\n    end\nend\n\nwhen I receive [soundgoawasy v]\nrepeat (20)\n    change volume by (-5)\nend\nforever\n    set volume to (0) %\nend\n\nwhen I receive [check requirements v]\nforever\n    if <[acheivements v] contains [CoinsCollected]?> then\n        if <touching (katana v)?> then\n            broadcast (WhiteScreenTransition2 v)\n            hide\n            broadcast (DestroyedCrstal v)\n            set [portal unlocked? v] to [true]\n        end\n    else\n        if <touching (katana v)?> then\n            wait until <not <touching (katana v)?>>\n            broadcast (Lost v)\n            go to [back v] layer\n            set [portal unlocked? v] to [false]\n        end\n    end\nend\n\n@Portal\n\nwhen flag clicked\nhide\n\nwhen flag clicked\ngo to x: (186) y: (-19)\nforever\n    if <(Portal Unlocked?) = [false]> then\n        hide\n    else\n        if <(Level) = [28]> then\n            go to [back v] layer\n            show\n            if <touching (player v)?> then\n                broadcast (Winner! v) and wait\n                hide\n            end\n        end\n    end\nend\n\nbroadcast (Winner! v)\n\n@Portal Animation\n\nwhen flag clicked\nrepeat (100)\n    hide\nend\n\nwhen flag clicked\ngo to (portal v)\ngo to [front v] layer\ngo [backward v] (4) layers\nforever\n    if <(Portal Unlocked?) = [false]> then\nend\n\n@☁ Cloud Networks\n\ndefine Decode (value)\nset [encoded v] to (value)\nset [letter # v] to [1]\n\ndefine Read From Encoded\nset [value v] to []\nforever\n    set [idx v] to (join (letter (letter #) of (encoded)) (letter ((letter #) + (1)) of (encoded)))\n    change [letter # v] by (2)\n    if <(idx) < [1]> then\n        stop [this script v]\n    end\n    set [value v] to (join (value) (item (idx) of [code v]))\nend\n\ndefine Encode (value)\nset [letter # v] to [1]\nrepeat (length of (value))\n    set [encoded v] to (join (encoded) (item # of (letter (letter #) of (value)) in [code v]))\n    change [letter # v] by (1)\nend\nset [encoded v] to (join (encoded) [00])\n\nwhen I receive [set highscore v]\nset [highscoreshow v] to [Highscore is currently disabled. Fixing...]\n\nwhen flag clicked\nchange [☁ checkin v] by (1)\n\nwhen I receive [change played v]\nchange [☁ played? v] by (1)\n\nwhen I receive [bossdefeatscloud v]\nchange [☁ bossdefeats v] by (1)\n\nwhen I receive [crystaldefeatscloud v]\nchange [☁ crystaldestroy v] by (1)\n\nwhen I receive [set highscore v]\nset [highscoreshow v] to [High Score Disabled]\n\nset [encoded v] to []\nDecode (☁ Highscore Encoded)\nRead From Encoded\nset [highscoreshow v] to (value)\nset [minutes2 v] to (value)\nset [seconds2 v] to (value)\nif <(((Minutes2) * (60)) + (Seconds2)) < (((Minutes) * (60)) + (Seconds))> then\n    set [encoded v] to []\n    Encode (join (username) (join [ got: ] (SpeedRunTime)))\n    Encode (Minutes)\n    Encode (Seconds)\n    set [☁ highscore encoded v] to (encoded)\nend\nDecode (☁ Highscore Encoded)\nRead From Encoded\nset [highscoreshow v] to (value)\nset [minutes2 v] to (value)\nset [seconds2 v] to (value)\nshow variable [highscoreshow v]\n\n@Notifications\n\nwhen I receive [playgame! v]\nhide\nforever\n    wait (pick random (20) to (120)) seconds\n    set size to (80) %\n    switch costume to (pick random (1) to (13))\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 (pick random (4) to (7)) seconds\n    repeat (15)\n        change y by (7)\n    end\n    hide\nend\n\nwhen flag clicked\nhide\n\ngo to x: (36) y: (28)\n\n@Skip Button\n\nwhen flag clicked\ngo to x: (-216) y: (-153)\nhide\n\nwhen I receive [playbuttonclucked v]\nif <(Skip Button Active/Inactive) = [Active]> then\n    show\n    forever\n        if <not <<<<(Level) = [26]> or <(Level) = [27]>> or <(Level) = [28]>> or <(Level) = [25]>>> then\n            show\n            go to [front v] layer\n            go [backward v] (5) layers\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                    wait until <not <mouse down?>>\n                    broadcast (Next Level v)\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\n    end\nelse\n    hide\nend\n\nwhen I receive [playgame! v]\nset [skip button active/inactive v] to [Active]\n\nwhen I receive [next level v]\nif <<<<(Level) = [26]> or <(Level) = [27]>> or <(Level) = [28]>> or <(Level) = [25]>> then\n    set [skip button active/inactive v] to [Inactive]\nend\n\n@zturboModeDetector\n\nwhen flag clicked\nset [turbo v] to [false]\nforever\n    if <(Turbo) = [false]> then\n        hide\n    else\n        set [ghost v] effect to (100)\n        go to x: (0) y: (0)\n        show\n        switch costume to (blank v)\n        set size to (150) %\n        switch costume to (turboscreen v)\n        repeat until <(size) < [101]>\n            go to [front v] layer\n            switch costume to (blank v)\n            change size by (((100) - (size)) / (7))\n            switch costume to (turboscreen v)\n            change [ghost v] effect by (-5)\n            set x to (((((pick random (0) to (1)) * (2)) - (1)) * ((size) - (100))) * (0.75))\n            set y to (((((pick random (0) to (1)) * (2)) - (1)) * ((size) - (100))) * (0.75))\n        end\n        go to x: (0) y: (0)\n        stop [all v]\n    end\nend\n\nshow\nswitch costume to (not v)\nforever\n    if <(Turbo) = [true]> then\n        costume [true]\n    else\n        costume [not]\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nset [1 v] to [0]\nforever\n    set [2 v] to (Tick)\n    wait (0.01) seconds\n    set [1 v] to ((((Tick) - (2)) * (1)) * (1))\n    set [turbo v] to <((1) * (1)) > [100]>\nend\n\ndefine costume (check)\nif <not <(costume [name v]) = (check)>> then\n    repeat (4)\n        change [ghost v] effect by (25)\n    end\n    switch costume to (check)\n    repeat (4)\n        change [ghost v] effect by (-25)\n    end\nend\n\nwhen flag clicked\nset [tick v] to [0]\nforever\n    change [tick v] by (1)\nend\n\n@Love and Favourite Detector\n\nwhen I start as a clone\nif <(clone id) = [0]> then\n    go to x: (-15) y: (0)\n    set [loved__ v] to [0]\n    switch costume to (love v)\n    forever\n        set [love? v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [loved__ v] to [1]\n        end\n    end\nend\nif <(clone id) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (fave v)\n    set [faved___ v] to [0]\n    forever\n        set [fav v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [faved___ v] to [1]\n        end\n    end\nend\n\nwhen I receive [begin v]\nhide\nset [faved___ v] to [0]\nset [loved__ v] to [0]\nset [clone id v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone id v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(LOVED__) = [1]> and <(FAVED___) = [1]>>\nwait (1) seconds\nshow\ngo to x: (0) y: (50)\nreset timer\nswitch costume to (pick random (1) to (4))\nset [ghost v] effect to (100)\nrepeat until <(timer) > [3.5]>\n    change y by ((y position) / (-15))\n    change [ghost v] effect by (-3)\nend\nreset timer\nrepeat until <(timer) > [3.5]>\n    change y by (((y position) - (-100)) / (-15))\n    change [ghost v] effect by (10)\nend\nbroadcast (JadeInvertedSkinActivated v)\n\nwhen I receive [playgame! v]\nhide\nforever\n    go to [front v] layer\nend\n\n