Entry ☁Scratch Cat Platformer☁

Instructions: @Villeolof made the original, https://scratch.mit.edu/projects/628988104!\nPlease make me some fanart/intro/oc/anything!\nPlease propose my projects here:\nWeekly shoutouts: @Pichu-codeur\n\nDear @GentleX, you are awesome and I love all of your projects! Especially, your epic game, Blocky! I hope you like this and thank you for you're intro I used too!\n\nRead the instructions before playing! ⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️\nFull? Server 2: \nhttps://scratch.mit.edu/projects/713581559\nPart 2 is out : \nhttps://scratch.mit.edu/projects/648028673\npart 3 is out:\nhttps://scratch.mit.edu/projects/670498597 \n\nFollow @Nexoad and @Holyhamster123\n10 000 views!!!\nMobile friendly!\n\nThe chat is safe!\n\nInstructions:\nW,A,S,D or arrow keys to move. (Joystick on phone)\nSpace to throw sword and to throw ninja stars (Click anywhere expect for the joystick and other buttons on phone)\n"S" to change weapon\nyour swords size depends on how many coins you have collected. \nT to chat (Click chat button on mobile)\nX to toggle names on and off\nZ to switch between the opponents to hide when they are on a different Scene or to be shown as a ball when they are on a different Scene\nMouse to the Left Up corner to see the Names variable\nMouse to the Left Down corner to see the opponent hide/ball variable\n\nPlease love, fav and follow for more, this is a AMAZING platform game, with vertical levels, springs, wall jump and moving spikes, ninja stars, lava and platforms, collect coins, collect lives, enemis, weapons, fall through platforms, moving platforms, rotating platforms, checkpoints and a very special key to unlock the door and in the end to beat the boss fight! It is MULTIPLAYER WITH AN SAFE CHAT!!!\n\nLess lag:\nhttps://turbowarp.org/718499104/fullscreen?interpolate&hqpen&clones=Infinity&limitless&offscreen\n\nCan you beat the highscore???\nWrite in the comments if you have any suggestions.\nI will do the next part when I reach 100 loves.\nThank you SOOOO much for 15 000 views, 50 remix, 1164 loves and 1055 favorites!\nChangelog:\nJan 22 2022,Added springs\nJan 23 2022, Fixed bug with the collectables\nJan 29 2022, Made the platforms slower\nFeb 1 2022, Added a sword\nFeb 1 2022, Added ninja stars\nFeb 4 2022, Changed the levels\nFeb 13 2022, Made it mobile friendly\nFeb 17 2022, I change the play button\nMar 4 2022, I made a joystick\nMar 19 2022, Added rotating platforms and edited the levels\nMar 27 2022, Made health bar instead of lives\nMar 27 2022, Added a boss fight by @Holyhamster123\nApr 30 2022, Made it multiplayer with a chat, the chat is safe!!! Thank you @Stunt7 for the safe chat\nMay 1 2022, I edited the costumes and sounds, thank you @uniquegames007 for some sounds and costumes!\nMay 18 2022 (Day before my birthday) Added outro by AWESOME @Nexoad and @NexoadFX!\nMay 25 2022, Edited sounds (By freesound.com)!\nMay 29 2022, Added intro by @will_wam! (Edited by me)\nMay 6 2022, added fall through platforms by @griffpatch's tutorial!\nJune 22 2022, changed intro to amazing intro by @Nexoad!\nJuly 31 2022, added pause and play button by @GamesLibrary!\nAugust 7 2022, @Stunt7 fixed chat (again)\nAugust 13 2022, Added Instructions by @hern1!\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n#trending #animations #all #trending #animations #all #trending #animations #all #trending #animations #all #trending #animations #all #trending #animations #all #trending #animations #all #trending #animations #all #trending #animations #all #trending #animations #all #trending #animations #all #trending #animations #all #trending #animations #trending #trending #trending #trending #trending #trending #trending #trending #trending #trending #games #games #games #games #games #games #games #games #games #games

@Stage\n\nwhen flag clicked\nset [mobilsteuerung? v] to [0]\nswitch backdrop to (blank v)\n\nwhen I receive [start now! v]\nforever\n    play sound [Vexento - Tevo \(Original Mix\) v] until done\nend\n\nset volume to (100) %\n\nwhen I receive [end boss v]\nstop [other scripts in sprite v]\n\nwhen I receive [start now! v]\nforever\n    if <key (x v) pressed?> then\n        if <(Names) = [0]> then\n            wait until <not <key (x v) pressed?>>\n            set [names v] to [1]\n        else\n            wait until <not <key (x v) pressed?>>\n            set [names v] to [0]\n        end\n    end\n    if <key (z v) pressed?> then\n        if <(Opp hide) = [0]> then\n            wait until <not <key (z v) pressed?>>\n            set [opp hide v] to [1]\n        else\n            wait until <not <key (z v) pressed?>>\n            set [opp hide v] to [0]\n        end\n    end\n    if <<(mouse x) < [-96]> and <(mouse y) > [133]>> then\n        show variable [names v]\n    else\n        hide variable [names v]\n    end\n    if <<(mouse x) < [-95]> and <(mouse y) < [-134]>> then\n        show variable [opp hide v]\n    else\n        hide variable [opp hide v]\n    end\nend\n\n@B L A N K\n\n@Cloud \n\ndefine set cloud # (player) to (value)\nif <(player) = [1]> then\n    set [☁ p1 v] to (value)\nelse\n    if <(player) = [2]> then\n        set [☁ p2 v] to (value)\n    else\n        if <(player) = [3]> then\n            set [☁ p3 v] to (value)\n        else\n            if <(player) = [4]> then\n                set [☁ p4 v] to (value)\n            else\n                if <(player) = [5]> then\n                    set [☁ p5 v] to (value)\n                else\n                    if <(player) = [6]> then\n                        set [☁ p6 v] to (value)\n                    else\n                        if <(player) = [7]> then\n                            set [☁ p7 v] to (value)\n                        else\n                            set [☁ p8 v] to (value)\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Send Cloud Data\nif <(MY PLAYER #) < [1]> then\n    stop [this script v]\nend\nset [encoded v] to []\nwrite (Chat) to encoded\nwrite (username) to encoded\nwrite (round ((timer) * (10))) to encoded\nwrite ([x position v] of [player v]) to encoded\nwrite ([y position v] of [player v]) to encoded\nwrite ([costume # v] of [player v]) to encoded\nwrite ([direction v] of [player v]) to encoded\nwrite ([costume # v] of [level v]) to encoded\nwrite (Leben \(Herzen\) :) to encoded\nset cloud # (MY PLAYER #) to (encoded)\n\nwhen I receive [cloud verbunden v]\nforever\n    if <(MY PLAYER #) > [0]> then\n        Send Cloud Data\n    end\nend\n\nwhen flag clicked\nset [max players v] to [4]\nset [my player # v] to [0]\nbroadcast (setup - opponents v) and wait\nswitch backdrop to (joining v)\nbroadcast (Join Game v) and wait\nif <(MY PLAYER #) > [0]> then\n    switch backdrop to (joined v)\nelse\n    switch backdrop to (full v)\nend\nbroadcast (Cloud verbunden v)\n\ndefine write (val) to encoded\nset [letter # v] to [1]\nrepeat (length of (val))\n    set [encoded v] to (join (encoded) (item # of (letter (letter #) of (val)) in [code v]))\n    change [letter # v] by (1)\nend\nset [encoded v] to (join (encoded) [00])\n\n​​breakpoint​​\n\n@Player\n\nwhen I receive [tick - first v]\nsay (item (Chat) of [chat: v])\n\nif  then\n    change x by (-6)\nend\nif  then\n    change x by (6)\nend\n\nwhen flag clicked\nhide\n\ndefine move - in steps (steps)\nchange [falling v] by (1)\nrepeat (steps)\n    set [last value v] to (x position)\n    change x by ((speed x) / (steps))\n    Check Touching Solid\n    if <(Touching) > [0]> then\n        Collide X-Slope or Wall?\n    end\n    set [last value v] to (y position)\n    change y by ((speed y) / (steps))\n    Check Touching Solid\n    if <(Touching) > [0]> then\n        Collide Y- Celling or Floor\n    end\nend\n\nwhen I receive [next level v]\ngo to x: (-150) y: (50)\n\ndefine Check Touching Solid\nif <<touching (level v)?> or <touching (platform v)?>> then\n    set [touching v] to [1]\n    stop [this script v]\nend\nset [touching v] to [0]\nif <touching (jump throuht v)?> then\n    if <(Jump through) < [1]> then\n        change y by (-6)\n        if <touching (jump throuht v)?> then\n            set [touching v] to [1]\n        else\n            set [jump through v] to [1]\n        end\n        change y by (6)\n    end\nelse\n    set [jump through v] to [0]\nend\n\nset [touching v] to [1]\n\nwhen I receive [tick-player v]\nMoved by moving platform\nswitch backdrop to <touching (level v)?>\nControls-Up and Down\nControls-Left and Right\nmove - in steps (([abs v] of (speed y) ) + ([abs v] of (speed y) ))\nSet Costume\n\ndefine Controls-Up and Down\nif <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <(STICK Y) > [0.5]>> and <(Pause) = [0]>> then\n    if <<(Wall slide) > [0]> and <(jumping) = [0]>> then\n        start sound [Jump v]\n        set [jumping v] to [1]\n        set [falling v] to [3]\n        set [wall slide v] to [0]\n        turn right (180) degrees\n        set [speed x v] to (((direction) / (90)) * (7))\n        set [long jump v] to [12]\n    end\n    if <<(Falling) < [3]> and <(jumping) = [0]>> then\n        start sound [Jump v]\n        set [jumping v] to [1]\n        set [falling v] to [3]\n    end\n    if <<(jumping) > [0]> and <(jumping) < (JUMP DURATION)>> then\n        change [jumping v] by (1)\n        set [speed y v] to (JUMP FORCE)\n    end\nelse\n    set [jumping v] to [0]\nend\nchange [speed y v] by (GRAVITY)\nif <(Wall slide) > [0]> then\n    Check Can Wall Slide\n    if <(speed y) < [0]> then\n        set [speed y v] to ((speed y) * (0.6))\n    end\nend\n\ndefine Controls-Left and Right\nif <(long jump) > [0]> then\n    change [long jump v] by (-1)\n    stop [this script v]\nend\nif <(Pause) = [0]> then\n    set [key x v] to (<<key (right arrow v) pressed?> or <(STICK X) > [0.5]>> - <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <(STICK X) < [-0.5]>>)\nelse\n    set [key x v] to [0]\nend\nif <(KEY X) = [0]> then\n    if <<(Falling) > [2]> and <(Wall slide) < [1]>> then\n        set [speed x v] to ((speed x) * (0.9))\n        stop [this script v]\n    end\n    if <([abs v] of (speed x) ) < [1]> then\n        set [frame v] to [0]\n        set [speed x v] to [0]\n    else\n        change [frame v] by (0.5)\n    end\nelse\n    change [speed x v] by ((KEY X) * (ACCELERATION))\n    if <not <(direction) = ((KEY X) * (90))>> then\n        set [wall slide v] to [0]\n    end\n    point in direction ((KEY X) * (90))\n    change [frame v] by (1)\nend\nset [speed x v] to ((speed x) * (RESISTANCE))\n\nchange [speed x v] by ((KEY X) * (ACCELERATION))\npoint in direction ((KEY X) * (90))\nchange [frame v] by (1)\n\nwhen I receive [game loop v]\nset [ghost v] effect to (0)\nforever\n    if <(Pause) = [0]> then\n        broadcast (Tick - First v)\n        broadcast (Tick - Platforms v)\n        broadcast (Tick-Player v)\n        broadcast (Tick - Last v)\n        Show Health (LIVES) of (max health) offset y [40]\n    end\nend\n\ndefine Reset and Begin Level\nset [invulnerable v] to [0]\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [falling v] to [99]\nset [wall slide v] to [0]\nset [jumping v] to [0]\nset [long jump v] to [0]\nset [scene # v] to [1]\npoint in direction (90)\nBegin Scene # (SPAWN SCENE) Go to x, y: (SPAWN X) (SPAWN Y)\n\nwhen I receive [tick - last v]\nif <(x position) > [235]> then\n    Begin Scene # ((SCENE #) + (1)) Go to x, y: [-235] []\nend\nif <(x position) < [-235]> then\n    Begin Scene # ((SCENE #) + (-1)) Go to x, y: [235] []\nend\nif <(y position) > [180]> then\n    Begin Scene # ((SCENE #) + (100)) Go to x, y: [] [-160]\nend\nif <(y position) < [-180]> then\n    Begin Scene # ((SCENE #) + (-100)) Go to x, y: [] [180]\nend\nif <touching (danger v)?> then\n    broadcast (Lose Life v)\nend\n\ndefine Begin Scene # (scene #) Go to x, y: (x) (y)\nset [scene # v] to (scene #)\nif <(x) > []> then\n    set x to (x)\nend\nif <(y) > []> then\n    set y to (y)\nend\nbroadcast (About to Change Scene v)\nbroadcast (Change Scene v)\nstop [other scripts in sprite v]\nwait (0) seconds\nswitch costume to (hitbox v)\nset rotation style [don't rotate v]\nif <(x) > []> then\n    Fix Collisions in Direction [0]\nelse\n    Fix Collisions in Direction [90]\nend\nSet Costume\nbroadcast (Game Loop v)\n\ndefine Fix Collisions in Direction (dir)\nset [temp v] to (direction)\nset [distance v] to [1]\npoint in direction (dir)\nrepeat (128)\n    Check Touching Solid\n    if <(Touching) < [1]> then\n        point in direction (Temp)\n        stop [this script v]\n    end\n    move (Distance) steps\n    turn right (180) degrees\n    change [distance v] by (1)\nend\n\nwhen I receive [tick - first v]\nswitch costume to (hitbox v2 v)\nset rotation style [don't rotate v]\nset [platform dx v] to []\nset [platform dy v] to []\n\ndefine Set Costume\nset rotation style [left-right v]\nif <(Wall slide) > [0]> then\n    switch costume to (hangon01 v)\n    stop [this script v]\nend\nif <(Falling) > [1]> then\n    if <(speed y) > [0]> then\n        switch costume to (jump01 v)\n    else\n        switch costume to (run_j2 v)\n    end\n    stop [this script v]\nend\nif <(frame) > [0]> then\n    switch costume to ((1) + ([floor v] of ((frame) mod (16)) ))\nelse\n    switch costume to (hit angle 0 v)\n    repeat (5)\n        Check Touching Solid\n        if <(Touching) < [1]> then\n            switch costume to ((costume [number v]) + (5))\n            stop [this script v]\n        end\n        next costume\n    end\n    switch costume to (stand v)\nend\n\ndefine Collide X-Slope or Wall?\nCheck Can Wall Slide\nchange y by (1)\nCheck Touching Solid\nif <(Touching) > [0]> then\n    change y by (1)\n    Check Touching Solid\n    if <(Touching) > [0]> then\n        change y by (-2)\n        set x to (last value)\n        set [speed x v] to [0]\n        stop [this script v]\n    end\n    set [speed x v] to ((speed x) * (0.8))\nend\nset [speed x v] to ((speed x) * (0.95))\nSlip\n\ndefine Collide Y- Celling or Floor\nset y to (last value)\nif <(speed y) > [0]> then\n    set [speed y v] to [0]\n    stop [this script v]\nend\nif <(Falling) > [0]> then\n    set [falling v] to [0]\n    Slip\nend\nset [speed y v] to ((speed y) * (0.8))\n\ndefine Slip\nchange y by (-2)\nchange x by (1)\nCheck Touching Solid\nif <(Touching) < [1]> then\n    set [falling v] to [9]\n    change [speed x v] by (1)\n    stop [this script v]\nend\nchange x by (-2)\nCheck Touching Solid\nif <(Touching) < [1]> then\n    set [falling v] to [9]\n    change [speed x v] by (-1)\n    stop [this script v]\nend\nchange y by (2)\nchange x by (1)\n\ndefine Check Can Wall Slide\nif <(Falling) < [2]> then\n    set [wall slide v] to [0]\n    stop [this script v]\nend\nswitch costume to (hitbox wallslide v)\nset rotation style [left-right v]\nCheck Touching Solid\nset [wall slide v] to (Touching)\nswitch costume to (hitbox v2 v)\nset rotation style [don't rotate v]\n\nwhen flag clicked\nset size to (40) %\n\nwhen I receive [lose life v]\nif <(SCENE #) = [408]> then\n    start sound [Oops v]\n    if <(LIVES) = [0]> then\n        broadcast (Game Over v)\n        stop all sounds\n        start sound [Game over v]\n    end\nelse\n    switch costume to (die v)\n    set [invulnerable v] to [1]\n    stop [other scripts in sprite v]\n    start sound [Oops v]\n    wait (1) seconds\n    repeat (40)\n        change [ghost v] effect by (2.5)\n    end\n    wait (0.5) seconds\n    change [lives v] by (-1)\n    if <(LIVES) > [0]> then\n        Reset and Begin Level\n    else\n        broadcast (Game Over v)\n        stop all sounds\n        start sound [Game over v]\n    end\nend\n\ndefine Moved by moving platform\nchange x by (PLATFORM DX)\nchange y by (PLATFORM DY)\nCheck Touching Solid\nif <(Touching) > [0]> then\n    Find Closest Space to (x position) (y position) max [16]\n    if <(Touching) > [0]> then\n        broadcast (Lose Life v)\n    end\nend\n\ndefine Find Closest Space to (x) (y) max (max)\nset [temp v] to (direction)\nset [distance v] to [1]\npoint in direction (0)\nrepeat (max)\n    repeat (16)\n        go to x: (x) y: (y)\n        move (Distance) steps\n        Check Touching Solid\n        if <(Touching) < [1]> then\n            point in direction (Temp)\n            stop [this script v]\n        end\n        turn right (22.5) degrees\n    end\n    change [distance v] by (1)\nend\ngo to x: (x) y: (y)\npoint in direction (Temp)\n\nwhen flag clicked\nshow list [collected v]\n\nwhen I receive [start now! v]\nshow\nset [gravity v] to [-1.5]\nset [acceleration v] to [1.5]\nset [jump duration v] to [6]\nset [resistance v] to [0.8]\nset [jump force v] to [12]\nbroadcast (Reset Game v) and wait\nbroadcast (Setup v)\nif <(Game mode) = [Hardcore]> then\n    set [lives v] to [1]\nelse\n    set [lives v] to [6]\nend\nset [spawn scene v] to [1]\nset [spawn x v] to [-150]\nset [spawn y v] to [55]\nset [max health v] to [7]\nset [health v] to [6]\nReset and Begin Level\n\nset [lives v] to [100]\n\nwhen I receive [player - bounce v]\nset [speed y v] to [15]\n\nset [lives v] to [5]\n\nadd [Key 1] to [collected v]\n\nset [lives v] to [4]\n\nbroadcast (Start NOW! v)\n\nwhen I receive [trampoline v]\nset [speed y v] to [20]\n\nwhen flag clicked\n\nforever\n\nset [☁ player x v] to (x position)\nset [☁ player y v] to (y position)\ngo to x: (0) y: (0)\n\nwhen I receive [start v]\nset [scene # v] to [1]\n\nwhen I receive [start now! v]\nset [scene # v] to [1]\n\nwait (1) seconds\nset [scene # v] to [1]\n\nwhen flag clicked\nset [scene # v] to [1]\n\nwhen I receive [start now! v]\n\ndefine Show Health (health) of (max) offset y (y)\nadd (x position) to [heaths v]\nadd ((y position) + (y)) to [heaths v]\nadd ((health) / (max)) to [heaths v]\ncreate clone of (health bar v)\n\nwhen I receive [end boss v]\nrepeat (100)\n    change [brightness v] effect by (1)\nend\nstop [other scripts in sprite v]\n\nstart sound [Game over v]\n\nstart sound [Game over v]\n\nset [spawn scene v] to [409]\n\nset [touching v] to [1]\n\nstop [this script v]\n\nchange x by (10)\n\nset [spawn scene v] to [409]\n\nset [spawn scene v] to [409]\n\nif <(Pause) = [0]> then\nend\n\nwhen flag clicked\nhide variable [lives v]\n\n@Level\n\ndefine Stamp Outline\nset rotation style [don't rotate v]\nset [brightness v] effect to (-50)\nrepeat (8)\n    move (3) steps\n    stamp\n    move (-3) steps\n    turn right (45) degrees\nend\nclear graphic effects\n\ndefine Stamp Shadow\nset [brightness v] effect to (-100)\nset [ghost v] effect to (80)\nchange y by (-20)\nstamp\nchange y by (20)\nclear graphic effects\n\nwhen flag clicked\nshow\nset [☁ timer v] to [0]\nset [scene # v] to (SPAWN SCENE)\nswitch costume to (scene1 v)\nshow list [scores v]\ndelete all of [collected v]\ngo to x: (0) y: (0)\ngo to [back v] layer\n\nwhen I receive [reset game v]\nset [☁ timer v] to [0]\nclear graphic effects\n\nwhen I receive [boss v]\nswitch costume to (costume2 v)\nrepeat (100)\n    change [brightness v] effect by (-0.5)\nend\n\nwhen I receive [end boss v]\nrepeat (100)\n    change [brightness v] effect by (2)\nend\n\nwhen I receive [change scene v]\nswitch costume to (join [Scene] (SCENE #))\nStamp Outline\nStamp Shadow\n\nwhen I receive [about to change scene v]\nerase all\n\n@Opponents\n\nwhen [x v] key pressed\n\nwhen I receive [setup - opponents v]\nsetup players\n\nwhen I receive [cloud verbunden v]\nforever\n    if <(MY PLAYER #) = (player #)> then\n        set [offline v] to [100]\n        hide\n    else\n        tick\n    end\nend\n\nhide\n\ndefine value = cloud # (player)\nif <(player) = [1]> then\n    set [value v] to (☁ P1)\nelse\n    if <(player) = [2]> then\n        set [value v] to (☁ P2)\n    else\n        if <(player) = [3]> then\n            set [value v] to (☁ P3)\n        else\n            if <(player) = [4]> then\n                set [value v] to (☁ P4)\n            else\n                if <(player) = [5]> then\n                    set [value v] to (☁ P5)\n                else\n                    if <(player) = [6]> then\n                        set [value v] to (☁ P6)\n                    else\n                        if <(player) = [7]> then\n                            set [value v] to (☁ P7)\n                        else\n                            set [value v] to (☁ P8)\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine setup players\nclear graphic effects\nset [color v] effect to (90)\nset [offline v] to [100]\nhide\nset [player # v] to [1]\nrepeat ((MAX PLAYERS) - (1))\n    create clone of (_myself_ v)\n    change [player # v] by (1)\nend\n\ndefine tick\nvalue = cloud # (player #)\nif <(join [A] (value)) = (last value)> then\n    change [offline v] by (1)\n    if <(offline) = [100]> then\n        replace item (player #) of [online players v] with [0]\n        hide\n    end\nelse\n    set [last value v] to (join [A] (value))\n    if <[99] > (offline)> then\n        replace item (player #) of [online players v] with [1]\n        show\n    end\n    set [offline v] to [0]\nend\nbegin decode of (value)\nvalue = read from encoded\nif <not <(value) = []>> then\n    say (item (value) of [chat: v])\n    value = read from encoded\nelse\n    value = read from encoded\n    if <(Names) = [1]> then\n        say (join (player #) (join [: ] (value)))\n    else\n        say []\n    end\nend\nvalue = read from encoded\nvalue = read from encoded\nset x to (value)\nvalue = read from encoded\nset y to (value)\nvalue = read from encoded\nswitch costume to (value)\nvalue = read from encoded\npoint in direction (value)\nvalue = read from encoded\nif <<(value) = ([costume # v] of [level v])> and <[99] > (offline)>> then\n    show\n    value = read from encoded\n    Show Health-Bar (value) of [10] offset y [35]\nelse\n    if <(Opp hide) = [1]> then\n        hide\n    else\n        switch costume to (guy v)\n    end\nend\n\nsay (item (Chat) of [chat: v])\n\nif  then\nend\n\nhide\n\nif <not <(value) = [0]>> then\n    say (item (value) of [z chat v])\nend\n\nwhen I receive [join game v]\nvalue = cloud # (player #)\nset [last value v] to (join [A] (value))\nwait (3) seconds\nvalue = cloud # (player #)\nif <(join [A] (value)) = (last value)> then\n    set [my player # v] to (player #)\nend\n\ndefine begin decode of (encoded)\nset [encoded v] to (encoded)\nset [letter # v] to [1]\n\ndefine value = 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\nwhen I receive [begin v]\ngo to [front v] layer\n\ndefine Show Health-Bar (health) of (max.) offset y (y)\nadd (x position) to [healths v]\nadd ((y position) + (y)) to [healths v]\nadd ((health) / (max.)) to [healths v]\ncreate clone of (health-bar v)\n\nswitch costume to (guy v)\n\nShow Health-Bar [] of [] offset y []\n\nsay (item (Chat) of [chat: v])\n\nsay [Hallo!]\nvalue = read from encoded\n\nwhen I receive [start now! v]\nset [names v] to [1]\n\nwhen flag clicked\nset [names v] to [1]\n\nwhen [z v] key pressed\n\nset [names v] to [0]\n\nwhen flag clicked\nset [opp hide v] to [0]\n\nwhen I receive [start now! v]\nset [opp hide v] to [0]\n\nif  then\nend\n\nsay (join (player #) (join [: ] (value)))\n\n\nend\n\nwhen flag clicked\nhide variable [names v]\nhide variable [opp hide v]\n\n@Health bar\n\nwhen flag clicked\nhide\ndelete all of [heaths v]\n\nwhen I start as a clone\nset x to (item (1) of [heaths v])\nset y to (item (2) of [heaths v])\nswitch costume to ((10) * (item (3) of [heaths v]))\nif <<(LIVES) = (max health)> or <(LIVES) > (max health)>> then\n    switch costume to (h10 v)\nend\ndelete (1) of [heaths v]\ndelete (1) of [heaths v]\ndelete (1) of [heaths v]\nif <<not <touching (_edge_ v)?>> and <(sh) = []>> then\n    go to [front v] layer\n    show\n    wait (0) seconds\nend\ndelete this clone\n\ndefine Show Health (health) of (max) offset y (y)\nadd (x position) to [heaths v]\nadd ((y position) + (y)) to [heaths v]\nadd ((health) / (max)) to [heaths v]\ncreate clone of (health bar v)\n\nwhen I receive [hide health v]\nhide\nset [sh v] to [1]\n\nwhen I receive [start now! v]\nset [sh v] to []\n\n@Sprite4\n\nwhen I receive [end boss v]\nrepeat (50)\n    change [ghost v] effect by (-2)\n    go to [front v] layer\nend\nwait (0.5) seconds\nbroadcast (Done intro v)\nhide\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\n\n@Control stick\n\nwhen flag clicked\ngo to [front v] layer\nset [control stick: myself v] to [Control stick]\nset size to (100) %\nset [max stick v] to ((size) / (4))\nswitch costume to (base v)\nset [ghost v] effect to (60)\ngo to [front v] layer\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nswitch costume to (stick v)\ngo [forward v] (1) layers\nset [ghost v] effect to (25)\nforever\n    set [stick power v] to []\n    set [stick x v] to [0]\n    set [stick y v] to [0]\n    repeat until <mouse down?>\n        set [~controll stick touching? v] to [0]\n        go to (Control stick: myself)\n    end\n    if <(distance to [mouse-pointer v]) < ((size) * (0.6))> then\n        set [~controll stick touching? v] to [1]\n        Stick Drag\n    else\n        wait until <not <mouse down?>>\n    end\nend\n\nwhen flag clicked\nset [stick power v] to [0]\n\ndefine Stick Drag\nrepeat until <not <mouse down?>>\n    go to (mouse-pointer v)\n    point towards (Control stick: myself)\n    turn right (180) degrees\n    set [stick direction v] to (direction)\n    set [stick power v] to (distance to [(Control stick: myself) v])\n    if <(STICK POWER) > (max stick)> then\n        move ((max stick) - (STICK POWER)) steps\n        set [stick power v] to (max stick)\n    end\n    set [stick power v] to ((STICK POWER) / (max stick))\n    set [stick x v] to ((STICK POWER) * ([sin v] of (STICK DIRECTION) ))\n    set [stick y v] to ((STICK POWER) * ([cos v] of (STICK DIRECTION) ))\nend\n\nwhen I start as a clone\nforever\n    if <<<<mouse down?> and <not <touching (mouse-pointer v)?>>> and <(~Controll stick touching?) = [0]>> and <(Switch weapon button touching?) = [0]>> then\n        set [~sword_hit? v] to [1]\n    else\n        set [~sword_hit? v] to [0]\n    end\nend\n\n@Detector Boosts\n\nwhen flag clicked\n\nwhen I start as a clone\nif <(clone id2) = [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 id2) = [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 [start now! v]\nhide\nset [clone id2 v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone id2 v] to [1]\ncreate clone of (_myself_ v)\nforever\n    set [timer v] to [0]\n    wait until <<(LOVED__) = [1]> and <(FAVED___) = [1]>>\n    wait (1) seconds\n    if <[lovenfave? v] contains (username)?> then\n        set [timer v] to [0]\n        delete (item # of (username) in [lovenfave? v]) of [lovenfave? v]\n        set [loved__ v] to [0]\n        set [faved___ v] to [0]\n        go to [front v] layer\n        show\n        go to x: (0) y: (-100)\n        set [timer v] to [0]\n        switch costume to (:\( v)\n        set [ghost v] effect to (100)\n        change [acceleration v] by (-0.7)\n        change [jump force v] by (-1.5)\n        set [lovenfavejump v] to [0]\n        set [lovenfavespeed v] to [0]\n        repeat until <(Timer) > [3.5]>\n            change y by ((y position) / (-15))\n            change [ghost v] effect by (-3)\n        end\n        set [timer v] to [0]\n        repeat until <(Timer) > [3.5]>\n            change y by (((y position) - (-100)) / (-15))\n            change [ghost v] effect by (10)\n        end\n    else\n        add (username) to [lovenfave? v]\n        set [loved__ v] to [0]\n        set [faved___ v] to [0]\n        go to [front v] layer\n        show\n        go to x: (0) y: (-100)\n        set [timer v] to [0]\n        switch costume to (:\) v)\n        set [ghost v] effect to (100)\n        change [acceleration v] by (0.7)\n        change [jump force v] by (1.5)\n        set [lovenfavejump v] to [0.5]\n        set [lovenfavespeed v] to [0.1]\n        repeat until <(Timer) > [3.5]>\n            change y by ((y position) / (-15))\n            change [ghost v] effect by (-3)\n        end\n        set [timer v] to [0]\n        repeat until <(Timer) > [3.5]>\n            change y by (((y position) - (-100)) / (-15))\n            change [ghost v] effect by (10)\n        end\n    end\nend\n\nwhen I receive [start now! v]\nforever\n    set [check v] to (Timer)\nend\n\nwhen I receive [start now! v]\nset [timer v] to [0]\nforever\n    change [timer v] by (.0297)\nend\n\nwhen I receive [start now! v]\n\n@Love and fave reminder\n\nwhen I receive [intro v]\n\nwhen flag clicked\nhide\ngo to x: (-6) y: (105)\n\nwhen flag clicked\n\nwhen I receive [start now! v]\nhide\ngo to [front v] layer\nforever\n    wait (pick random (50) to (100)) seconds\n    switch costume to (costume1 v)\n    go to x: (0) y: (105)\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 (3)\n    end\n    repeat (5)\n        change y by (-1)\n    end\n    wait (2) seconds\n    repeat (15)\n        change y by (7)\n    end\n    hide\nend\n\n@Safe Zones\n\nwhen flag clicked\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\ngo to [back v] layer\n\nwhen I receive [change scene v]\nset [ghost v] effect to (100)\nswitch costume to (blank v)\nswitch costume to (join [Scene] (SCENE #))\n\nset y to (0)\n\n@GentleX?\n\nwhen I receive [start now! v]\ngo to x: (0) y: (0)\nhide\nset [ghost v] effect to (0)\nforever\n    if <(username) = [GentleX]> then\n        change [☁ gentlex v] by (1)\n        broadcast (Griffpatch v)\n        stop [this script v]\n    end\nend\n\nif <(username) = [Will_Wam]> then\n    change [☁ gentlex v] by (1)\n    stop [this script v]\nend\n\nwait until <not <<(username) = [griffpatch_tutor]> or <(username) = [griffpatch]>>>\n\nwhen I receive [griffpatch v]\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\nshow\nwait (3) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nset [ghost v] effect to (0)\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nhide\nset [ghost v] effect to (0)\n\nwait until <not <(username) = [Will_Wam]>>\n\n@Sprite2\n\nwhen I receive [start now! v]\ngo to x: (-124) y: (151)\nhide\nforever\n    if <not <<(ninja star?) = [1]> or <(sword?) = [1]>>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [start now! v]\nforever\n    if <<(ninja star?) = [1]> and <(weapon) = [ninja star]>> then\n        switch costume to (ninja star v)\n    end\n    if <<(sword?) = [1]> and <(weapon) = [sword]>> then\n        switch costume to (sword v)\n    end\nend\n\nwhen I receive [start now! v]\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        if <<(ninja star?) = [1]> and <(weapon) = [ninja star]>> then\n            set [weapon v] to [sword]\n            set [sword? v] to [1]\n        else\n            if <<(sword?) = [1]> and <(weapon) = [sword]>> then\n                set [weapon v] to [ninja star]\n                set [ninja star? v] to [1]\n            end\n        end\n        wait until <not <mouse down?>>\n    end\nend\n\nwhen I receive [start now! v]\nforever\n    if <touching (mouse-pointer v)?> then\n        set [switch weapon button touching? v] to [1]\n    else\n        set [switch weapon button touching? v] to [0]\n    end\nend\n\n@Text\n\nwhen flag clicked\nhide\n\nwhen I receive [change scene v]\ngo to [front v] layer\ngo to x: (0) y: (0)\nshow\nswitch costume to (blank v)\nswitch costume to (join [Scene] (SCENE #))\n\nset y to (0)\n\nset [ghost v] effect to (0)\n\nwhen I receive [start now! v]\nset [ghost v] effect to (0)\ngo to x: (0) y: (0)\ngo to [front v] layer\n\nwhen I receive [done intro v]\nhide\n\n@Thanks\n\nwhen flag clicked\nswitch costume to (- v)\nhide\n\nwhen I start as a clone\nset [ghost v] effect to (100)\nshow\nset size to (0) %\nrepeat until <(size) > [119]>\n    change size by (((120) - (size)) / (8))\n    change [ghost v] effect by (-25)\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [thx fav v]\nif <(costume [name v]) = [-]> then\n    go to x: (0) y: (-150)\n    switch costume to (fav v)\n    create clone of (_myself_ v)\n    switch costume to (- v)\nend\n\nwhen I receive [thx love v]\nif <(costume [name v]) = [-]> then\n    go to x: (0) y: (-100)\n    switch costume to (love v)\n    create clone of (_myself_ v)\n    switch costume to (- v)\nend\n\n@Detector\n\ndefine Touching love or fav button?\nswitch costume to (love v)\nif <touching (mouse-pointer v)?> then\n    if <<(mouse x) < [-88]> and <(mouse x) > [-240]>> then\n        switch costume to (fav v)\n        if <touching (mouse-pointer v)?> then\n            set [touching fav button? v] to [true]\n            set [touching love button? v] to [false]\n        else\n            set [touching fav button? v] to [false]\n            set [touching love button? v] to [true]\n        end\n    else\n        set [touching fav button? v] to [false]\n        set [touching love button? v] to [false]\n    end\nelse\n    set [touching fav button? v] to [false]\n    set [touching love button? v] to [false]\nend\n\nwhen I receive [start now! v]\nset size to (0) %\ngo to x: (0) y: (0)\nset size to (100) %\nforever\n    Touching love or fav button?\nend\n\nwhen I receive [start now! v]\nset [countdown love v] to [20]\nforever\n    if <(touching love button?) = [true]> then\n        change [countdown love v] by (-1)\n        if <(Countdown love) = [0]> then\n            broadcast (thx love v)\n            stop [this script v]\n        end\n    else\n        if <<(touching love button?) = [false]> and <(Countdown love) < [12]>> then\n            broadcast (thx love v)\n            stop [this script v]\n        end\n        set [countdown love v] to [20]\n    end\nend\n\nwhen I receive [start now! v]\nset [touching fav button? v] to [20]\nforever\n    if <(touching fav button?) = [true]> then\n        change [countdown fav v] by (-1)\n        if <(Countdown fav) = [0]> then\n            broadcast (thx fav v)\n            stop [this script v]\n        end\n    else\n        if <<(touching fav button?) = [false]> and <(Countdown fav) < [12]>> then\n            broadcast (thx fav v)\n            stop [this script v]\n        end\n        set [countdown fav v] to [20]\n    end\nend\n\n@Background stuff\n\nwhen I start as a clone\nshow\ngo to [back v] layer\npoint in direction (pick random (-70) to (-100))\ngo to x: (300) y: (pick random (-180) to (180))\nset size to (pick random (10) to (15)) %\nset [ghost v] effect to (pick random (60) to (70))\ngo to [back v] layer\nrepeat until <<(x position) < [-220]> or <touching (sprite4 v)?>>\n    move (10) steps\nend\ndelete this clone\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\nforever\n    hide\n    create clone of (_myself_ v)\nend\n\nif <(y position) < [-18-]> then\n    delete this clone\nend\n\n@loadning\n\nwhen flag clicked\ngo to x: (0) y: (100)\nset size to (300) %\ngo to [front v] layer\nhide\n\n@Sprite6\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I start as a clone\n\nrepeat (20)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\nwhen I receive [4 v]\n\nstart sound [pop v]\n\nwhen I receive [loadning v]\n\nshow\nswitch backdrop to (backdrop1 v)\nrepeat (30)\n    turn right (15) degrees\n    move (5) steps\n    create clone of (_myself_ v)\nend\nhide\nswitch backdrop to (pick random (1) to (10))\n\nrepeat (pick random (10) to (50))\nend\n\n@SCORE\n\nwhen flag clicked\nsetup\n\nwhen I start as a clone\nshow\n\ndefine setup\nhide\n\ndefine change costume to (costume)\nif <not <(costume) = (costume [name v])>> then\n    switch costume to (costume)\n    set size to (50) %\nend\n\n@Assests\n\n@Transitions\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nset [layers - background v] to [5]\ngo to [front v] layer\n\ngo to x: (0) y: (0)\ngo to [front v] layer\nswitch costume to (mini v)\nset size to (1116) %\nswitch costume to (mask #5 v)\nshow\nrepeat (4)\n    switch costume to (mini v)\n    set size to ((size) / (1.2)) %\n    switch costume to (mask #5 v)\nend\nrepeat (3)\n    switch costume to (mini v)\n    set size to ((size) / (1.2)) %\n    switch costume to (mask #4 v)\nend\nrepeat (2)\n    switch costume to (mini v)\n    set size to ((size) / (1.2)) %\n    switch costume to (mask #3 v)\nend\nrepeat (2)\n    switch costume to (mini v)\n    set size to ((size) / (1.2)) %\n    switch costume to (mask #2 v)\nend\nswitch costume to (mini v)\nset size to (250) %\nrepeat (5)\n    switch costume to (mini v)\n    set size to ((size) / (1.2)) %\n    switch costume to (mask #1 v)\nend\nswitch costume to (black v)\nset size to (100) %\nwait (0.5) seconds\nbroadcast (Start v)\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\ngo to [front v] layer\nswitch costume to (black v)\nset size to (100) %\nshow\nrepeat (5)\n    switch costume to (mini v)\n    set size to ((size) * (1.2)) %\n    switch costume to (mask #1 v)\nend\nset size to ((size) * (0.5)) %\nrepeat (2)\n    switch costume to (mini v)\n    set size to ((size) * (1.2)) %\n    switch costume to (mask #2 v)\nend\nrepeat (2)\n    switch costume to (mini v)\n    set size to ((size) * (1.2)) %\n    switch costume to (mask #3 v)\nend\nrepeat (3)\n    switch costume to (mini v)\n    set size to ((size) * (1.2)) %\n    switch costume to (mask #4 v)\nend\nrepeat (5)\n    switch costume to (mini v)\n    set size to ((size) * (1.2)) %\n    switch costume to (mask #5 v)\nend\nhide\n\nwhen I receive [start game v]\n\ngo to [front v] layer\nbroadcast (Start v)\n\n@Chat\n\ndefine Set Chat\ndelete all of [chat: v]\nadd [Hi!] to [chat: v]\nadd [How are you?] to [chat: v]\nadd [Good!] to [chat: v]\nadd [How did you do that?] to [chat: v]\nadd [You are good!] to [chat: v]\nadd [Have a nice day!] to [chat: v]\nadd [Follow me! \(In the game\)] to [chat: v]\nadd [Cool!] to [chat: v]\nadd [I won!] to [chat: v]\nadd [I die!] to [chat: v]\nadd [NOOO!] to [chat: v]\nadd [I love this game!] to [chat: v]\nadd [Villeolof is the best!] to [chat: v]\nadd [Griffpatch is the best!] to [chat: v]\nadd [T to chat!] to [chat: v]\nadd [Yesss!] to [chat: v]\nadd [No] to [chat: v]\nadd [You are the best!] to [chat: v]\nadd [I want more Updates!] to [chat: v]\nadd [That Game is so cool!] to [chat: v]\nadd [God!] to [chat: v]\nadd [=D] to [chat: v]\nadd [lol] to [chat: v]\nadd [xD] to [chat: v]\nadd [xDD] to [chat: v]\nadd [;D] to [chat: v]\nadd [;\)] to [chat: v]\nadd [<3] to [chat: v]\nadd [:-\)] to [chat: v]\nadd [:\)] to [chat: v]\nadd [Hahaha!] to [chat: v]\nadd [Hehe!] to [chat: v]\nadd [Is this possible?] to [chat: v]\nadd [Same!] to [chat: v]\nadd [Make the Map bigger!!! :\)] to [chat: v]\nadd [The Boss fight is epic!] to [chat: v]\nadd [EPIC!!] to [chat: v]\nadd [Nice!] to [chat: v]\nadd [Amazing!] to [chat: v]\nadd [I try it.] to [chat: v]\nadd [Ok.] to [chat: v]\nadd [Hello :\)] to [chat: v]\nadd [Which language do you speak?] to [chat: v]\nadd [English.] to [chat: v]\nadd [Deutsch \(German\).] to [chat: v]\nadd [I don't know.] to [chat: v]\nadd [I don't beat ist :D] to [chat: v]\nadd [Are you on full life?] to [chat: v]\nadd [Do you have the Ninja-Stars?] to [chat: v]\nadd [Stunt7 is just too awesome! He made the multiplayer!] to [chat: v]\nadd [Never Gona give you up...] to [chat: v]\n\nwhen flag clicked\ngo to x: (184) y: (159)\nhide\nSet Chat\n\nadd [I will win!] to [chat: v]\n\nwhen flag clicked\nshow list [chat: v]\nset [chat v] to []\nforever\n    go to [front v] layer\n    if <not <(Chat) = []>> then\n        wait (5) seconds\n        set [chat v] to []\n    end\nend\n\nwhen I receive [start now! v]\nshow\nforever\n    if <<key (t v) pressed?> or <<mouse down?> and <touching (mouse-pointer v)?>>> then\n        hide list [chat: v]\n        hide\n        ask [What do you want to write \(Enter the number of the respective sentence...\)] and wait\n        set [chat v] to (answer)\n        show list [chat: v]\n        show\n        wait until <<not <key (t v) pressed?>> and <not <mouse down?>>>\n    end\nend\n\n@Outro by @Nexoad!\n\nwhen I receive [done intro v]\nstop all sounds\nforever\n    play sound [Bensound  - Dreams - Chill Royalty Free Music v] until done\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nif <(Clone ID Outro) = [OC]> then\n    switch costume to (oc v)\n    go to [front v] layer\n    forever\n        show\n        go to x: (0) y: (0)\n        change size by (((100) - (size)) / (2))\n        point in direction (((90) + (([sin v] of ((timer) * (200)) ) * (10))) + ())\n    end\nend\n\ndefine Clone (id)\nset [clone id outro v] to (id)\ncreate clone of (_myself_ v)\n\nwhen I receive [done intro v]\nClone [OC]\nwait (0) seconds\nClone [BG]\nwait (0) seconds\nClone [1]\nwait (0) seconds\nClone [2]\n\nwhen I start as a clone\nif <(Clone ID Outro) = [BG]> then\n    switch costume to (bg v)\n    forever\n        show\n        go to x: (0) y: (0)\n        change size by (((100) - (size)) / (2))\n    end\nend\n\nwhen I start as a clone\nif <(Clone ID Outro) = [1]> then\n    switch costume to (1 v)\n    go to [front v] layer\n    forever\n        set size to (75) %\n        show\n        go to x: (-150) y: (-100)\n        change size by (((100) - (size)) / (2))\n        point in direction (((90) + (([sin v] of ((timer) * (200)) ) * (10))) + ())\n    end\nend\n\nwhen I start as a clone\nif <(Clone ID Outro) = [2]> then\n    switch costume to (2 v)\n    go to [front v] layer\n    forever\n        set size to (75) %\n        show\n        go to x: (150) y: (-100)\n        change size by (((100) - (size)) / (2))\n        point in direction (((90) + (([sin v] of ((timer) * (200)) ) * (10))) + ())\n    end\nend\n\n@Splash Screen\n\nwhen flag clicked\nhide\nswitch costume to (main menu v)\n\nwhen I receive [game over v]\ngo to x: (0) y: (0)\nswitch costume to (game over v)\ngo to [front v] layer\nshow\nbroadcast (Main Menu v)\n\nwhen I receive [start v]\nhide\n\nwhen I receive [main menu v]\nshow\ngo to x: (0) y: (0)\ngo to [front v] layer\n\n@Main Menu\n\nwhen I receive [main menu v]\nwait (0.1) seconds\nset [brightness v] effect to (0)\ngo to [front v] layer\nshow\ngo to x: (-110) y: (-120)\nset size to (10) %\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (40)\n        point in direction ((([sin v] of ((timer) * (250)) ) * (10)) + (90))\n        change size by ((0.2) * ((130) - (size)))\n    else\n        change size by ((0.2) * ((100) - (size)))\n        point in direction (((direction) - ((direction) / (10))) + (9))\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nbroadcast (Start v)\nbroadcast (Start NOW! v)\nbroadcast (Reset Game v)\nhide\n\nwait (5) seconds\n\npoint in direction ((([sin v] of ((timer) * (250)) ) * (10)) + (90))\npoint in direction (((direction) - ((direction) / (10))) + (9))\n\npoint in direction (90)\n\n@Sprite7\n\nwhen I start as a clone\npoint in direction (90)\ngo to (player v)\nclear graphic effects\nshow\nif <([direction v] of [player v]) = [90]> then\n    change x by (10)\n    repeat until <<touching (level v)?> or <touching (_edge_ v)?>>\n        turn right (20) degrees\n        change x by (8)\n    end\n    change x by (10)\nelse\n    change x by (-10)\n    repeat until <<touching (level v)?> or <touching (_edge_ v)?>>\n        turn right (-20) degrees\n        change x by (-8)\n    end\n    change x by (-10)\nend\nwait (0.5) seconds\nrepeat (50)\n    change [ghost v] effect by (2)\n    if <not <touching (level v)?>> then\n        change y by (-4)\n    end\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [level change v]\ndelete this clone\n\nwhen I receive [start now! v]\nset [weapon v] to [sword]\nset [ninja star? v] to [0]\nforever\n    if <<key (space v) pressed?> or <(~Sword_hit?) = [1]>> then\n        if <(ninja star?) = [1]> then\n            if <(weapon) = [ninja star]> then\n                create clone of (_myself_ v)\n                change [ninja stars v] by (-1)\n                start sound [High Whoosh v]\n                wait until <<not <key (space v) pressed?>> and <(~Sword_hit?) = [0]>>\n            end\n        end\n    end\nend\n\nwhen I receive [start now! v]\nset [apples v] to [0]\nforever\n    if <key (s v) pressed?> then\n        if <(weapon) = [ninja star]> then\n            set [weapon v] to [sword]\n            wait until <not <key (s v) pressed?>>\n        else\n            set [weapon v] to [ninja star]\n            wait until <not <key (s v) pressed?>>\n        end\n    end\nend\n\n@sword\n\nwhen I receive [start now! v]\nset [sword? v] to [0]\nhide\nforever\n    if <(sword?) = [1]> then\n        go to (player v)\n        if <<key (space v) pressed?> or <(~Sword_hit?) = [1]>> then\n            if <(weapon) = [sword]> then\n                start sound [Slash v]\n                if <([direction v] of [player v]) = [90]> then\n                    go to (player v)\n                    show\n                    set [ghost v] effect to (0)\n                    point in direction (0)\n                    repeat (24)\n                        turn right (15) degrees\n                    end\n                    hide\n                else\n                    go to (player v)\n                    if <([direction v] of [player v]) = [-90]> then\n                        go to (player v)\n                        show\n                        set [ghost v] effect to (0)\n                        point in direction (0)\n                        repeat (24)\n                            turn left (15) degrees\n                        end\n                        hide\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [start now! v]\nforever\n    set size to (((APPLES) * (3)) + (100)) %\nend\n\nwhen I receive [start now! v]\nforever\n    go to (player v)\nend\n\nwhen I receive [reset game v]\nset size to (100) %\n\n@Platform\n\nwhen I receive [change scene v]\nhide\nif <(SCENE #) = [4]> then\n    if <(Pause) = [0]> then\n        set size to (100) %\n        Spawn [Key 1] at [96] [84] dir [90] turn []\n    end\nend\nif <(SCENE #) = [0]> then\n    if <(Pause) = [0]> then\n        set size to (100) %\n        Spawn [plank] at [104] [-9] dir [90] turn [5]\n        Spawn [plank] at [-52] [-9] dir [90] turn [-5]\n    end\nend\nif <(SCENE #) = [104]> then\n    set size to (100) %\n    Spawn [platform2] at [-180] [-70] dir [90] turn []\nend\nif <(SCENE #) = [206]> then\n    if <(Pause) = [0]> then\n        set size to (100) %\n        Spawn [platform2] at [0] [70] dir [90] turn []\n    end\nend\nif <(SCENE #) = [205]> then\n    if <(Pause) = [0]> then\n        set size to (100) %\n        Spawn [platform1] at [-70] [100] dir [90] turn []\n    end\nend\nif <(SCENE #) = [3]> then\n    if <(Pause) = [0]> then\n        set size to (100) %\n        Spawn [plank] at [60] [-9] dir [90] turn [2]\n    end\nend\nif <(SCENE #) = [204]> then\n    if <(Pause) = [0]> then\n        set size to (100) %\n        Spawn [platform] at [-105] [-50] dir [90] turn []\n    end\nend\nif <(SCENE #) = [307]> then\n    if <(Pause) = [0]> then\n        set size to (100) %\n        Spawn [Key 2] at [118] [103] dir [90] turn []\n    end\nend\nif <(SCENE #) = [206]> then\n    if <(Pause) = [0]> then\n        set size to (100) %\n        Spawn [platform] at [0] [70] dir [90] turn []\n    end\nend\nif <(SCENE #) = [-1]> then\n    if <(Pause) = [0]> then\n        set size to (100) %\n        Spawn [Wheel] at [-77] [-21] dir [90] turn [3]\n    end\nend\nif <(SCENE #) = [-2]> then\n    if <(Pause) = [0]> then\n        set size to (100) %\n        Spawn [maze] at [0] [0] dir [90] turn [4]\n    end\nend\nif <(SCENE #) = [104]> then\n    if <(Pause) = [0]> then\n        set size to (100) %\n        Spawn [platform] at [-180] [-70] dir [90] turn [0]\n    end\nend\n\nwhen I receive [tick - platforms v]\nTick (x position) (y position)\nset [last x v] to (x position)\nset [last y v] to (y position)\n\ndefine Tick (new x) (new y)\nif <(turn) > []> then\n    change y by (4)\n    if <touching (player v)?> then\n        rotaion maths ccw ((0) - (turn))\n    end\nelse\n    if <(new y) > (last y)> then\n        change y by (1)\n    else\n        set y to ((last y) + (1))\n    end\n    if <touching (player v)?> then\n        set [platform dx v] to ((new x) - (last x))\n        set [platform dy v] to ((new y) - (last y))\n    end\nend\ngo to x: (new x) y: (new y)\n\ndefine Door at (x) (y) key (key name)\nshow\nswitch costume to (key name)\ngo to [back v] layer\ngo to x: (x) y: (y)\nforever\n    if <(Pause) = [0]> then\n        wait until <touching (player v)?>\n        if <[collected v] contains (key name)?> then\n            if <(Pause) = [0]> then\n                start sound [open door v]\n                repeat (25)\n                    change y by (4)\n                end\n                wait (1) seconds\n                start sound [Door Open v]\n                repeat (25)\n                    change y by (-4)\n                end\n                start sound [Door smash v]\n            end\n        else\n            start sound [Closed v]\n        end\n        wait until <not <touching (player v)?>>\n    end\nend\n\nwhen flag clicked\nhide\nset rotation style [left-right v]\n\nwhen I receive [about to change scene v]\ndelete this clone\n\ndefine Spawn (type) at (x) (y) dir (dir) turn (digrees)\nif <(Pause) = [0]> then\n    set [turn v] to (digrees)\n    go to x: (x) y: (y)\n    point in direction (dir)\n    switch costume to (type)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(Pause) = [0]> then\n    go to [back v] layer\n    if < (costume [name v]) contains [Key]?> then\n        Door at (x position) (y position) key (costume [name v])\n    end\n    if <(turn) > []> then\n        if <(Pause) = [0]> then\n            show\n            set rotation style [all around v]\n            forever\n                if <(Pause) = [0]> then\n                    turn right (turn) degrees\n                end\n            end\n        end\n    end\n    if <(SCENE #) = [3]> then\n        Animate Platform\n    end\n    if <(SCENE #) = [204]> then\n        animate platform 5\n    end\n    if <(SCENE #) = [206]> then\n        Animate platform3\n    end\n    if <(SCENE #) = [104]> then\n        Animate platform1\n    end\n    if <(SCENE #) = [205]> then\n        animate platform 4\n    end\nend\n\ndefine rotaion maths ccw (ccw)\nset [dx v] to (([x position v] of [player v]) - (x position))\nset [dy v] to (([y position v] of [player v]) - (y position))\nset [sin v] to ([sin v] of (ccw) )\nset [cos v] to ([cos v] of (ccw) )\nset [platform dx v] to ((((dx) * (cos)) - ((dy) * (sin))) - (dx))\nset [platform dy v] to ((((dx) * (sin)) + ((dy) * (cos))) - (dy))\n\ndefine Animate 2\n\ndefine Animate Platform\nshow\npoint in direction (90)\nforever\n    if <(Pause) = [0]> then\n        glide (2) secs to x: (x position) y: ((y position) - (90))\n        wait (1) seconds\n        glide (1) secs to x: (x position) y: ((y position) + (90))\n        wait (1) seconds\n    end\nend\n\ndefine Animate 3\n\ndefine Animate platform\n\ndefine Animate platform3\nset size to (100) %\nshow\nswitch costume to (platform v)\nforever\n    if <(Pause) = [0]> then\n        glide (0.5) secs to x: (-22) y: (4)\n        wait (0.5) seconds\n        glide (1) secs to x: (162) y: (29)\n        wait (0.5) seconds\n        glide (1) secs to x: (0) y: (70)\n        wait (0.5) seconds\n    end\nend\n\ndefine Animate platform 2\nset size to (100) %\nshow\nswitch costume to (platform v)\npoint in direction (90)\ngo to x: (6) y: (-106)\nforever\n    if <(Pause) = [0]> then\n        glide (1) secs to x: (6) y: (82)\n        glide (1) secs to x: (6) y: (-106)\n    end\nend\n\ndefine Animate platform1\nset size to (100) %\nshow\npoint in direction (90)\nforever\n    if <(Pause) = [0]> then\n        glide (1) secs to x: (x position) y: ((y position) + (200))\n        glide (1) secs to x: (x position) y: ((y position) - (200))\n    end\nend\n\ndefine animate platform 4\nswitch costume to (platform1 v)\ngo to [back v] layer\nset size to (100) %\nshow\npoint in direction (90)\nforever\n    if <(Pause) = [0]> then\n        wait (0.5) seconds\n        glide (0.1) secs to x: (x position) y: ((y position) - (100))\n        start sound [Door smash v]\n        glide (1) secs to x: (x position) y: ((y position) + (100))\n    end\nend\n\ndefine animate platform 5\nset size to (100) %\nshow\nswitch costume to (platform v)\nforever\n    if <(Pause) = [0]> then\n        glide (1.5) secs to x: (180) y: (-50)\n        wait (0.8) seconds\n        glide (1.5) secs to x: (-105) y: (-50)\n        wait (0.8) seconds\n    end\nend\n\ndefine Animate platform 6\nset size to (100) %\nshow\nswitch costume to (platform v)\ngo to [back v] layer\nforever\n    if <(Pause) = [0]> then\n        glide (1) secs to x: (x position) y: ((y position) + (167))\n        glide (1) secs to x: (x position) y: ((y position) - (167))\n    end\nend\n\nwhen I receive [change scene v]\nswitch costume to (key 1 v)\ngo to [back v] layer\nhide\n\ndefine Animate 4\n\ndefine Animate platform\n\nset size to (100) %\nSpawn [platform1] at [-70] [100] dir [90] turn []\n\nif <(Pause) = [0]> then\nend\n\nglide (1) secs to x: (x position) y: ((y position) + (200))\nglide (1) secs to x: (x position) y: ((y position) - (200))\n\nshow\nset rotation style [all around v]\nforever\n    turn right (turn) degrees\nend\n\n@Collectable\n\nwhen I receive [change scene v]\nif <(SCENE #) = (My scene)> then\n    show\nelse\n    hide\nend\n\nwhen I start as a clone\nif <(Pause) = [0]> then\n    repeat until <touching (player v)?>\n        if <(Pause) = [0]> then\n            change y by ((0.5) * ([sin v] of (frame) ))\n            change [frame v] by (5)\n        end\n    end\n    set [my scene v] to []\n    if <(costume [name v]) = [apple]> then\n        change [apples v] by (1)\n        start sound [Collect v]\n    else\n        if <(costume [name v]) = [Green Flag]> then\n            start sound [Flag v]\n            set [spawn scene v] to (SCENE #)\n            set [spawn x v] to (x position)\n            set [spawn y v] to (y position)\n        else\n            if <(costume [name v]) = [heart]> then\n                change [lives v] by (1)\n                start sound [Diamond v]\n            else\n                if <(costume [name v]) = [sword]> then\n                    set [sword? v] to [1]\n                    set [weapon v] to [sword]\n                    start sound [Collect2 v]\n                else\n                    if <(costume [name v]) = [BIG apple]> then\n                        start sound [Collect2 v]\n                        change [apples v] by (10)\n                    else\n                        if <(costume [name v]) = [ninja star]> then\n                            set [ninja star? v] to [1]\n                            set [weapon v] to [ninja star]\n                            start sound [Collect2 v]\n                        else\n                            if <(costume [name v]) = [Key 1]> then\n                                start sound [Key v]\n                                add (costume [name v]) to [collected v]\n                            else\n                                if <(costume [name v]) = [Key 2]> then\n                                    start sound [Key v]\n                                    add (costume [name v]) to [collected v]\n                                else\n                                    start sound [Collect v]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    repeat (20)\n        change y by (2)\n        change [ghost v] effect by (5)\n    end\n    hide\nend\n\nwhen I receive [reset game v]\ndelete all of [collected v]\nset [apples v] to [0]\nset [frame v] to [0]\nhide\nPlace [BIG apple] scene [5] xy [20] [-15]\nPlace [Key 1] scene [103] xy [200] [-15]\nPlace [Key 2] scene [206] xy [-103] [0]\nPlace [Green Flag] scene [4] xy [155] [86]\nPlace [Green Flag] scene [205] xy [6] [-3]\nPlace [apple] scene [105] xy [43] [-21]\nPlace [apple] scene [105] xy [-220] [0]\nPlace [apple] scene [104] xy [182] [-155]\nPlace [apple] scene [104] xy [-200] [-57]\nPlace [apple] scene [204] xy [152] [-165]\nPlace [apple] scene [204] xy [58] [-122]\nPlace [heart] scene [205] xy [200] [-60]\nPlace [heart] scene [409] xy [-9] [-53]\nPlace [heart] scene [409] xy [-20] [-53]\nPlace [sword] scene [1] xy [55] [77]\nPlace [apple] scene [206] xy [191] [118]\nPlace [apple] scene [205] xy [184] [-4]\nPlace [apple] scene [205] xy [184] [20]\nPlace [apple] scene [205] xy [184] [40]\nPlace [apple] scene [205] xy [184] [60]\nPlace [ninja star] scene [3] xy [0] [0]\nPlace [apple] scene [2] xy [-103] [116]\nPlace [apple] scene [2] xy [-20] [114]\nPlace [apple] scene [2] xy [-20] [63]\nPlace [apple] scene [103] xy [-128] [74]\nPlace [Green Flag] scene [3] xy [0] [145]\nPlace [apple] scene [1] xy [0] [-51]\nPlace [apple] scene [1] xy [173] [119]\nPlace [heart] scene [409] xy [-30] [-53]\nPlace [heart] scene [409] xy [-40] [-53]\nPlace [heart] scene [409] xy [-50] [-53]\nPlace [heart] scene [409] xy [-60] [-53]\nPlace [heart] scene [409] xy [0] [-53]\nPlace [heart] scene [409] xy [-10] [-53]\nPlace [heart] scene [409] xy [-20] [-53]\nPlace [heart] scene [409] xy [-30] [-53]\nbroadcast (Change Scene v)\n\nwhen I receive [reset game v]\ndelete this clone\n\nwhen I receive [start v]\ngo [backward v] (1) layers\n\ndefine Place (costume name) scene (scene) xy (x) (y)\nset [my scene v] to (scene)\nswitch costume to (costume name)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\nset [my scene v] to []\n\n@attacks\n\ndefine attack type (type) (x) (y) (dir) (life)\ngo to x: (x) y: (y)\npoint in direction (dir)\nif <(type) = [spike]> then\n    switch costume to (spike v)\n    set [life v] to (life)\n    create clone of (_myself_ v)\nend\nif <(type) = [fall]> then\n    switch costume to (fall v)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset size to (100) %\nset [color v] effect to (0)\n\ndefine damage\nif <touching (player v)?> then\n    change [lives v] by (-1)\n    broadcast (Lose Life v)\n    delete this clone\nend\n\nwhen I receive [boss v]\nshow variable [lives v]\nset [enemycount v] to [0]\nset [ghost v] effect to (100)\nbroadcast (Hide health v)\nwait (5) seconds\nrepeat (2)\n    repeat (10)\n        attack type [spike] ([x position v] of [player v]) [] [0] [0.5]\n        wait (1) seconds\n    end\n    wait (1) seconds\n    attack type [spike] ((([x position v] of [player v]) / ([abs v] of ([x position v] of [player v]) )) * (220)) [] [0] [0.5]\n    attack type [spike] ((([x position v] of [player v]) / ([abs v] of ([x position v] of [player v]) )) * (190)) [] [0] [0.5]\n    attack type [spike] ((([x position v] of [player v]) / ([abs v] of ([x position v] of [player v]) )) * (160)) [] [0] [0.5]\n    attack type [spike] ((([x position v] of [player v]) / ([abs v] of ([x position v] of [player v]) )) * (130)) [] [0] [0.5]\n    attack type [spike] ((([x position v] of [player v]) / ([abs v] of ([x position v] of [player v]) )) * (100)) [] [0] [0.5]\n    attack type [spike] ((([x position v] of [player v]) / ([abs v] of ([x position v] of [player v]) )) * (70)) [] [0] [0.5]\n    attack type [spike] ((([x position v] of [player v]) / ([abs v] of ([x position v] of [player v]) )) * (40)) [] [0] [0.5]\n    wait (1) seconds\nend\nwait (1) seconds\nstart sound [BOO! v]\nrepeat (15)\n    attack type [fall] (pick random (-200) to (200)) [180] [] []\n    wait (0.15) seconds\nend\nbroadcast (boss-right v)\nset [x_c v] to [220]\nrepeat (22)\n    change [x_c v] by (-20)\n    attack type [spike] (X_c) [] [0] [0.1]\nend\nbroadcast (boss-mid v)\nwait (1) seconds\nstart sound [BOO! v]\nrepeat (15)\n    attack type [fall] (pick random (-200) to (200)) [180] [] []\n    wait (0.15) seconds\nend\nbroadcast (boss-left v)\nset [x_c v] to [-220]\nrepeat (22)\n    change [x_c v] by (20)\n    attack type [spike] (X_c) [] [0] [0.1]\nend\nbroadcast (boss-mid v)\nrepeat (2)\n    repeat (20)\n        attack type [spike] ([x position v] of [player v]) [] [0] [0.5]\n        wait (0.5) seconds\n    end\n    wait (0.5) seconds\n    attack type [spike] ((([x position v] of [player v]) / ([abs v] of ([x position v] of [player v]) )) * (220)) [] [0] [0.5]\n    attack type [spike] ((([x position v] of [player v]) / ([abs v] of ([x position v] of [player v]) )) * (190)) [] [0] [0.5]\n    attack type [spike] ((([x position v] of [player v]) / ([abs v] of ([x position v] of [player v]) )) * (160)) [] [0] [0.5]\n    attack type [spike] ((([x position v] of [player v]) / ([abs v] of ([x position v] of [player v]) )) * (130)) [] [0] [0.5]\n    attack type [spike] ((([x position v] of [player v]) / ([abs v] of ([x position v] of [player v]) )) * (100)) [] [0] [0.5]\n    attack type [spike] ((([x position v] of [player v]) / ([abs v] of ([x position v] of [player v]) )) * (70)) [] [0] [0.5]\n    attack type [spike] ((([x position v] of [player v]) / ([abs v] of ([x position v] of [player v]) )) * (40)) [] [0] [0.5]\n    wait (0.5) seconds\nend\nwait (1) seconds\nbroadcast (end boss v)\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\nwhen I start as a clone\nset size to (100) %\nset [ghost v] effect to (0)\nif <(costume [name v]) = [spike]> then\n    set [ghost v] effect to (70)\n    go to [back v] layer\n    set y to (-100)\n    wait (1) seconds\n    set y to (-200)\n    set [ghost v] effect to (0)\n    repeat (10)\n        change y by (10)\n        damage\n    end\n    repeat (life)\n        wait (0) seconds\n        damage\n    end\n    repeat (10)\n        change y by (-10)\n        damage\n    end\n    delete this clone\nend\nif <(costume [name v]) = [fall]> then\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    set [turn v] to (pick random (-7) to (7))\n    repeat (10)\n        turn right (turn) degrees\n        change [ghost v] effect by (-10)\n        change y by (-8)\n        damage\n    end\n    repeat until <touching (_edge_ v)?>\n        turn right (turn) degrees\n        change y by (-8)\n        damage\n    end\n    delete this clone\nend\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [start now! v]\nhide variable [lives v]\n\n@Sprite3\n\nwhen I receive [start v]\ngo to x: (0) y: (-50)\nforever\n    if <(SCENE #) = [408]> then\n        if <touching (player v)?> then\n            broadcast (boss v)\n            hide\n            stop [this script v]\n        end\n        set y to (([cos v] of ((cos1) * (5)) ) * (5))\n        change [cos1 v] by (1)\n        show\n    else\n        hide\n    end\nend\n\nbroadcast (boss v)\n\nhide\nstop [this script v]\n\nbroadcast (boss v)\nhide\nstop [this script v]\n\n@Danger\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\n\nwhen I receive [change scene v]\nswitch costume to (blank v)\nswitch costume to (join [Scene] (SCENE #))\nhide\ngo to x: (0) y: (0)\nif <(SCENE #) = [2]> then\n    go to [back v] layer\n    switch costume to (scene2 v)\n    show\n    go to x: (0) y: (0)\nend\nif <(SCENE #) = [3]> then\n    forever\n        show\n        set y to ((5) * ([sin v] of ((timer) * (360)) ))\n    end\nend\nif <(SCENE #) = [101]> then\n    forever\n        show\n        set y to ((5) * ([sin v] of ((timer) * (360)) ))\n    end\nend\nif <(SCENE #) = [104]> then\n    go to [back v] layer\n    switch costume to (scene106 v)\n    show\n    go to x: (0) y: (0)\n    forever\n        set y to ((5) * ([sin v] of ((timer) * (360)) ))\n    end\nend\nif <(SCENE #) = [206]> then\n    go to [back v] layer\n    switch costume to (scene206 v)\n    show\n    go to x: (0) y: (0)\n    forever\n        set y to ((5) * ([sin v] of ((timer) * (360)) ))\n    end\nend\nif <(SCENE #) = [205]> then\n    go to [back v] layer\n    switch costume to (scene205 v)\n    show\n    go to x: (0) y: (0)\nend\nif <(SCENE #) = [105]> then\n    go to [back v] layer\n    switch costume to (scene105 v)\n    show\n    go to x: (0) y: (0)\nend\n\nset y to (0)\n\nforever\n    set y to ((5) * ([sin v] of ((timer) * (360)) ))\nend\n\nset y to ((5) * ([sin v] of ((timer) * (360)) ))\n\nforever\n    show\nend\n\nif <(SCENE #) = [2]> then\n    go to [back v] layer\n    switch costume to (scene205 v)\n    show\n    go to x: (0) y: (0)\nend\n\n@Trampoline\n\nwhen flag clicked\nset [apples v] to [0]\ngo to x: (0) y: (0)\ngo to [back v] layer\nset size to (75) %\nhide\n\nwhen I receive [change scene v]\nswitch costume to (scene1 v)\nswitch costume to (join [Scene] (SCENE #))\nforever\n    if <(SCENE #) = [2]> then\n        show\n        go to x: (-100) y: (-8)\n        if <touching (player v)?> then\n            if <([speed y v] of [player v]) < [-3]> then\n                start sound [Jump v]\n                broadcast (trampoline v)\n                repeat (14)\n                    set costume trampoline\n                end\n                switch costume to (1 v)\n            end\n        end\n    else\n        if <(SCENE #) = [1]> then\n            show\n            go to x: (54) y: (-62)\n            if <touching (player v)?> then\n                if <([speed y v] of [player v]) < [-3]> then\n                    start sound [Jump v]\n                    broadcast (trampoline v)\n                    repeat (14)\n                        set costume trampoline\n                    end\n                    switch costume to (1 v)\n                end\n            end\n        else\n            if <(SCENE #) = [103]> then\n                show\n                go to x: (124) y: (-149)\n                if <touching (player v)?> then\n                    if <([speed y v] of [player v]) < [-3]> then\n                        start sound [Jump v]\n                        broadcast (trampoline v)\n                        repeat (14)\n                            set costume trampoline\n                        end\n                        switch costume to (1 v)\n                    end\n                end\n            else\n                hide\n            end\n        end\n    end\nend\n\nhide\n\nset y to (0)\n\nforever\n    set y to ((5) * ([sin v] of ((timer) * (360)) ))\nend\n\ndefine set costume trampoline\nnext costume\n\nwait (0.0001) seconds\n\nif <(SCENE #) = [2]> then\n    show\n    go to x: (-100) y: (-80)\n    if <touching (player v)?> then\n        if <([speed y v] of [player v]) < [-3]> then\n            start sound [Jump v]\n            broadcast (trampoline v)\n            repeat (4)\n                set costume trampoline\n            end\n        end\n    end\nelse\n    hide\nend\n\n@Enemy\n\nwhen flag clicked\nset rotation style [left-right v]\nhide\ngo to [back v] layer\nset size to (100) %\n\nwhen I receive [change scene v]\nif <(SCENE #) = [1]> then\n    if <([x position v] of [player v]) < [0]> then\n        Spawn [Red] at [220] [82] dir [-90]\n    else\n        Spawn [Red] at [120] [82] dir [90]\n    end\nend\nif <(SCENE #) = [105]> then\n    if <([x position v] of [player v]) < [0]> then\n        Spawn [Red] at [-15] [-70] dir [-90]\n        Spawn [Red] at [5] [-70] dir [-90]\n        Spawn [Red] at [-35] [-70] dir [-90]\n    else\n        Spawn [Red] at [-220] [-70] dir [90]\n        Spawn [Red] at [-200] [-70] dir [90]\n        Spawn [Red] at [-180] [-70] dir [90]\n    end\nend\nif <(SCENE #) = [307]> then\n    if <([x position v] of [player v]) < [0]> then\n        Spawn [Red] at [211] [54] dir [-90]\n    else\n        Spawn [Red] at [177] [54] dir [-90]\n    end\nend\nif <(SCENE #) = [308]> then\n    if <([x position v] of [player v]) < [0]> then\n        Spawn [Red] at [205] [37] dir [-90]\n    else\n        Spawn [Red] at [-205] [37] dir [90]\n    end\nend\nif <(SCENE #) = [5]> then\n    if <([x position v] of [player v]) < [0]> then\n        Spawn [Red] at [192] [-63] dir [-90]\n    else\n        Spawn [Red] at [-20] [-63] dir [90]\n    end\nend\n\nwhen I start as a clone\nset [ghost v] effect to (0)\nshow\nset [speed y v] to [0]\nset [frame v] to [0]\nforever\n    switch costume to (red1 v)\n    set rotation style [don't rotate v]\n    Move - Left or Right\n    Move - Down\n    change [frame v] by (0.33)\n    if <(Pause) = [0]> then\n        switch costume to ((1) + (([floor v] of (frame) ) mod (4)))\n    end\n    set rotation style [left-right v]\n    if <<(INVULNERABLE) = [0]> and <touching (player v)?>> then\n        Touching Player\n    end\n    if <<touching (sword v)?> or <touching (sprite7 v)?>> then\n        repeat (5)\n            change [ghost v] effect by (20)\n        end\n        hide\n    end\nend\n\nwhen I receive [about to change scene v]\ndelete this clone\n\ndefine Move - Down\nchange [speed y v] by (-1)\nchange y by (speed y)\nrepeat until <not <touching (level v)?>>\n    change y by (1)\n    set [speed y v] to [0]\nend\n\nwhen flag clicked\ncreate clone of (_myself_ v)\n\ndefine Move - Left or Right\nif <(Pause) = [0]> then\n    move (2) steps\n    repeat (4)\n        if <not <<touching (level v)?> or <touching (_edge_ v)?>>> then\n            if <not <<touching (safe zones v)?> or <touching (doors v)?>>> then\n                stop [this script v]\n            end\n        end\n        change y by (1)\n    end\n    change y by (-4)\n    move (-2) steps\n    turn right (180) degrees\nend\n\ndefine Touching Player\nif <([speed y v] of [player v]) < [-3]> then\n    broadcast (Player - Bounce v)\n    start sound [Squish Pop v]\n    switch costume to (red squish v)\n    wait (0.3) seconds\n    repeat (10)\n        change [ghost v] effect by (25)\n    end\n    delete this clone\nend\nbroadcast (Lose Life v)\n\ndefine Spawn (type) at (x) (y) dir (dir)\ngo to x: (x) y: (y)\npoint in direction (dir)\ncreate clone of (_myself_ v)\n\nwhen I receive [start now! v]\nforever\n\n@Jump throuht\n\nwhen flag clicked\ndelete all of [collected v]\ngo to x: (0) y: (0)\ngo to [back v] layer\n\ndefine Stamp Outline\nset rotation style [don't rotate v]\nset [brightness v] effect to (-50)\nrepeat (8)\n    move (3) steps\n    stamp\n    move (-3) steps\n    turn right (45) degrees\nend\nclear graphic effects\n\ndefine Stamp Shadow\nset [brightness v] effect to (-100)\nset [ghost v] effect to (80)\nchange y by (-10)\nstamp\nchange y by (10)\nclear graphic effects\n\nset [scene # v] to [1]\n\nwhen flag clicked\nswitch costume to (scene1 v)\nshow list [scores v]\n\nwhen flag clicked\nset [☁ timer v] to [0]\nset [scene # v] to (SPAWN SCENE)\n\nforever\n\nwhen I receive [start now! v]\n\nif <not <(costume [number v]) = [18]>> then\nif <(costume [number v]) = [18]> then\nset [lives v] to [9999999]\n\nstop [other scripts in sprite v]\nwait (1.5) seconds\nhide list [scores v]\nstop [all v]\n\nwhen I receive [reset game v]\nset [☁ timer v] to [0]\nclear graphic effects\n\nset [scene # v] to [308]\n\nhide\n\nwhen flag clicked\nshow\n\nset [☁ timer v] to [0]\ndelete all of [scores v]\ninsert (username) at (1) of [scores v] \nforever\n    wait (1) seconds\n    change [☁ timer v] by (1)\nend\n\nwhen I receive [boss v]\nswitch costume to (costume2 v)\nrepeat (100)\n    change [brightness v] effect by (-0.5)\nend\n\nwhen I receive [reset game v]\n\nwhen I receive [end boss v]\nrepeat (100)\n    change [brightness v] effect by (2)\nend\n\nwhen I receive [change scene v]\nswitch costume to (blank v)\nswitch costume to (join [Scene] (SCENE #))\nStamp Outline\nStamp Shadow\n\nerase all\n\n@Boss\n\nwhen I start as a clone\nif <(costume [name v]) = [eyes]> then\n    point in direction (90)\n    go to [front v] layer\n    forever\n        change [ghost v] effect by (-10)\n        go to x: ((([x position v] of [player v]) / (25)) + (bossX)) y: ((([cos v] of ((cos1) * (5)) ) * (12)) + (bossY))\n        change [cos1 v] by (1)\n    end\nend\nif <(costume [name v]) = [lower jaw]> then\n    go to [back v] layer\n    forever\n        change [ghost v] effect by (-10)\n        point in direction (([cos v] of ((cos1) * (5)) ) - (90))\n        go to x: ((bossX) + (Myx)) y: (((0) - ((([cos v] of ((cos1) * (5)) ) * (3)) + (10))) + (bossY))\n        change [cos1 v] by (1)\n    end\nend\nif <(costume [name v]) = [lower jaw2]> then\n    go to [back v] layer\n    forever\n        change [ghost v] effect by (-10)\n        point in direction ((0) - ((([cos v] of ((cos1) * (5)) ) * (3)) + (90)))\n        go to x: ((bossX) + (Myx)) y: (((0) - ((([cos v] of ((cos1) * (5)) ) * (3)) + (10))) + (bossY))\n        change [cos1 v] by (1)\n    end\nend\n\nwhen I receive [end boss v]\nforever\n    hide\n    delete this clone\nend\n\nwhen I receive [end boss v]\nforever\n    hide\n    delete this clone\nend\n\nwhen flag clicked\nset [cos1 v] to [0]\nset [ghost v] effect to (100)\n\nwhen I receive [boss v]\nset [bossx v] to [0]\nset [bossy v] to [50]\nshow\nstart sound [Evel laugh v]\nwait (3) seconds\nset size to (400) %\nset [cos1 v] to [0]\nswitch costume to (eyes v)\ncreate clone of (_myself_ v)\nset [myx v] to [0]\nswitch costume to (lower jaw v)\ncreate clone of (_myself_ v)\nswitch costume to (lower jaw2 v)\ncreate clone of (_myself_ v)\nswitch costume to (upper jaw v)\nforever\n    change [ghost v] effect by (-10)\n    go to x: (bossX) y: ((([cos v] of ((cos1) * (5)) ) * (12)) + (bossY))\n    set [bossx v] to (([cos v] of ((cos1) * (2.5)) ) * (70))\n    change [cos1 v] by (1)\nend\n\nwhen I receive [end boss v]\nforever\n    hide\n    delete this clone\nend\n\nwhen I receive [game over v]\nset [ghost v] effect to (100)\nstop [other scripts in sprite v]\ndelete this clone\n\n@pause\n\nwhen flag clicked\nhide variable [my player # v]\nset [pause v] to [0]\nhide\n\nwhen I receive [start now! v]\nshow\nswitch costume to (pause  v)\nforever\n    go to [front v] layer\n    if <(Pause) = [1]> then\n        switch costume to (resume v)\n        stop all sounds\n    else\n        switch costume to (pause  v)\n    end\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n        if <(Pause) = [1]> then\n            set [pause v] to [0]\n        else\n            set [pause v] to [1]\n        end\n    end\nend\n\nset [pause v] to [0]\n\n@Instruction\n\nwhen flag clicked\nhide\n\nwhen I receive [instruction v]\nshow\nswitch costume to (move v)\ngo to [front v] layer\n\nwhen I receive [tutorial - next slide v]\nrepeat (20)\n    change [brightness v] effect by (-5)\nend\nnext costume\nrepeat (20)\n    change [brightness v] effect by (5)\nend\n\nwhen I receive [tutorial - back one slide v]\nrepeat (20)\n    change [brightness v] effect by (-5)\nend\nswitch costume to ((costume [number v]) - (1))\nrepeat (20)\n    change [brightness v] effect by (5)\nend\n\nwhen I receive [tutorial - next slide v]\nif <(costume [number v]) = [13]> then\n    broadcast (Main Menu v)\nend\n\nwhen I receive [main menu v]\nhide\ngo to [back v] layer\n\n@?\n\nwhen I receive [start now! v]\nhide\n\nwhen this sprite clicked\nstart sound [Click v]\nwait until <mouse down?>\nrepeat (2)\n    change size by (-5)\nend\nwait until <not <mouse down?>>\nrepeat (2)\n    change size by (5)\nend\nbroadcast (instruction v)\n\nwhen I receive [main menu v]\nwait (0.1) seconds\ngo to [front v] layer\ngo [forward v] (99999) layers\nshow\nset size to (10) %\ngo to x: (193) y: (-135)\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by ((0.2) * ((110) - (size)))\n    else\n        change size by ((0.2) * ((100) - (size)))\n    end\nend\n\nwhen I receive [instruction v]\nhide\n\n@Left\n\nwhen I receive [instruction v]\ngo [forward v] (99999999999999999999999999999999999999999999999999999999) layers\ngo to x: (-199) y: (-139)\nswitch costume to (> v)\npoint in direction (90)\nset size to (100) %\nclear graphic effects\nshow\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nbroadcast (Tutorial - Back one slide v)\n\nwhen I receive [tutorial - next slide v]\nrepeat (20)\n    change [brightness v] effect by (-5)\nend\nnext costume\nrepeat (20)\n    change [brightness v] effect by (5)\nend\n\nwhen I receive [tutorial - back one slide v]\nrepeat (20)\n    change [brightness v] effect by (-5)\nend\nswitch costume to ((costume [number v]) - (1))\nrepeat (20)\n    change [brightness v] effect by (5)\nend\n\nwhen I receive [main menu v]\nhide\ngo to [back v] layer\n\n@Right\n\nwhen I receive [instruction v]\ngo [forward v] (999999999999999999999999) layers\ngo to x: (199) y: (-139)\nswitch costume to (> v)\npoint in direction (90)\nset size to (100) %\nclear graphic effects\nshow\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nbroadcast (Tutorial - Next Slide v)\n\nwhen I receive [tutorial - next slide v]\nrepeat (20)\n    change [brightness v] effect by (-5)\nend\nnext costume\nrepeat (20)\n    change [brightness v] effect by (5)\nend\n\nwhen I receive [tutorial - back one slide v]\nrepeat (20)\n    change [brightness v] effect by (-5)\nend\nswitch costume to ((costume [number v]) - (1))\nrepeat (20)\n    change [brightness v] effect by (5)\nend\n\nwhen I receive [main menu v]\nhide\ngo to [back v] layer\n\n@Intro\n\nwhen flag clicked\nset [modus v] to [intro]\ngo to x: (0) y: (0)\nswitch backdrop to (intro v)\nset size to (0) %\nhide\nwait (0.2) seconds\nClone\nswitch costume to (costume1 v)\nshow\nset volume to (20) %\nstart sound [Intro v]\nset [ghost v] effect to (100)\npoint in direction (-165)\nset [bounce_3_vel v] to [0]\nrepeat (50)\n    turn right (((direction) - (90)) / (-3)) degrees\n    change [ghost v] effect by (-10)\n    set [bounce_3_vel v] to (((bounce_3_vel) * (0.7)) + (((size) - (70)) * (-0.15)))\n    change size by (bounce_3_vel)\nend\nset [bounce_3_vel v] to [0]\nbroadcast (\[intro\]stop v)\n\ndefine Clone\nset [target raidus v] to [bg]\ncreate clone of (_myself_ v)\nset [target raidus v] to [skip]\ncreate clone of (_myself_ v)\nrepeat (20)\n    if <(pick random (1) to (4)) = [2]> then\n        switch costume to (costume3 v)\n    else\n        if <(pick random (1) to (2)) = [2]> then\n            switch costume to (costume2 v)\n        else\n            switch costume to (costume4 v)\n        end\n    end\n    set [target raidus v] to (pick random (100) to (200))\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(target raidus) = [bg]> then\n    go to x: (0) y: (0)\n    show\n    set [ghost v] effect to (85)\n    set size to (0) %\n    forever\n        switch costume to (costume1 v)\n        change size by (((size) - (100)) / (-3.5))\n        change [ghost v] effect by (0.5)\n        switch costume to (costume5 v)\n    end\nelse\n    if <(target raidus) = [skip]> then\n        point in direction (90)\n        switch costume to (costume7 v)\n        go to x: (0) y: (0)\n        show\n        set [ghost v] effect to (50)\n        set size to (100) %\n        wait (1) seconds\n        forever\n            change [ghost v] effect by (10)\n        end\n    else\n        go to x: (0) y: (20)\n        show\n        set [ghost v] effect to (pick random (30) to (50))\n        set size to (pick random (10) to (50)) %\n        set [direction v] to (pick random (1) to (360))\n        set [target x v] to (([sin v] of (direction) ) * (target raidus))\n        set [target y v] to (([cos v] of (direction) ) * (target raidus))\n        repeat (5)\n            change x by (((x position) - (target x)) / (-4))\n            change y by (((y position) - (target y)) / (-4))\n        end\n        set [xspeed v] to (((x position) - (target x)) / (-6))\n        set [yvel v] to (((y position) - (target y)) / (-4))\n        forever\n            change [ghost v] effect by (1.2)\n            change y by (yvel)\n            change [yvel v] by (-0.5)\n            change x by (xspeed)\n            turn right (xspeed) degrees\n        end\n    end\nend\n\nwhen I receive [\[intro\]stop v]\ndelete this clone\n\nwhen I start as a clone\nif <(target raidus) = [skip]> then\n    forever\n        if <mouse down?> then\n            broadcast (\[intro\]stop v)\n        end\n    end\nend\n\nwhen I receive [\[intro\]stop v]\nstop [other scripts in sprite v]\nrepeat (25)\n    change [bounce_3_vel v] by (6)\n    change [ghost v] effect by (10)\n    turn right (((direction) - (-90)) / (-4)) degrees\n    change size by (((direction) - (0)) / (-4))\nend\nbroadcast (// Start v)\n\nwhen I receive [// start v]\nswitch backdrop to (false v)\nbroadcast (Main menu v)\n\n