Lost Ninja - A Platformer
@Stage\n\nwhen I receive [real end v]\nswitch backdrop to (black v)\n\nwhen I receive [cyclops dead v]\nwait (1) seconds\nswitch backdrop to (level 19 pt 2 v)\n\nwhen I receive [game over v]\nswitch backdrop to (game over v)\n\nwhen I receive [update level v]\nif <[2] < (backdrop [number v])> then\n    switch backdrop to (join [Level ] (Level))\nend\n\nwhen I receive [gameplay v]\nset [level v] to [1]\nswitch backdrop to (level 1 v)\n\nwhen I receive [main menu v]\nswitch backdrop to (main menu v)\nset [ghost v] effect to (100)\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\n\nwhen I receive [start v]\nbroadcast (Main Menu v)\n\nwhen I receive [intro v]\nswitch backdrop to (dark blue intro stage v)\n\n@Coding Sprite\n\nwhen flag clicked\nbroadcast (message1 v)\n\nwhen I receive [message1 v]\nbroadcast (Intro v)\n\ndefine // []\n// [This is a note.]\n\nwhen flag clicked\nset [shownversion v] to [0]\nset [version v] to [V 1.3.1]\nset [shownupdatelog v] to [0]\nshow list [updatelog v]\nset [lives v] to [2]\nset [gamestarted? v] to [0]\nswitch costume to (empty v)\nreplace item (length of [developers v]) of [developers v] with [Developer Access Only]\nif <[developers v] contains (username)?> then\n    replace item (length of [developers v]) of [developers v] with (username)\nend\n\nwhen [2 v] key pressed\nif <(item (length of [developers v]) of [developers v]) = (username)> then\n    change [lives v] by (1)\n    wait until <not <key (2 v) pressed?>>\nend\n\nwhen [3 v] key pressed\nif <(item (length of [developers v]) of [developers v]) = (username)> then\n    broadcast (Ninja Variables v)\n    wait until <not <key (3 v) pressed?>>\nend\n\nwhen [4 v] key pressed\nif <(item (length of [developers v]) of [developers v]) = (username)> then\n    if <(ShownVersion) = [0]> then\n        show variable [version v]\n        set [shownversion v] to [1]\n    else\n        hide variable [version v]\n        set [shownversion v] to [0]\n    end\n    wait until <not <key (4 v) pressed?>>\nend\n\nwhen I receive [ready menu v]\nif <(item (length of [developers v]) of [developers v]) = (username)> then\n    switch costume to (developer access v)\n    go to x: (12) y: (-242)\n    show\nend\n\nwhen I receive [gameplay v]\nset [lives v] to [3]\nset [gamestarted? v] to [1]\nswitch costume to (empty v)\n\nwhen [5 v] key pressed\nif <(item (length of [developers v]) of [developers v]) = (username)> then\n    if <(ShownUpdateLog) = [0]> then\n        hide list [updatelog v]\n        set [shownupdatelog v] to [1]\n    else\n        show list [updatelog v]\n        set [shownupdatelog v] to [0]\n    end\n    wait until <not <key (5 v) pressed?>>\nend\n\nwhen [1 v] key pressed\nif <(item (length of [developers v]) of [developers v]) = (username)> then\n    broadcast (Skip v)\n    wait until <not <key (1 v) pressed?>>\nend\n\nwhen [a v] key pressed\nif <<(item (length of [developers v]) of [developers v]) = (username)> and <(costume [number v]) = [2]>> then\n    create clone of (_myself_ v)\nend\n\nwhen I receive [backstory text v]\nif <(item (length of [developers v]) of [developers v]) = (username)> then\n    hide\nend\n\nwhen I receive [backstory text hide v]\nif <(item (length of [developers v]) of [developers v]) = (username)> then\n    show\nend\n\nwhen I start as a clone\ngo to x: (12) y: (-242)\nswitch costume to (dot v)\nrepeat until <(GameStarted?) = [1]>\n    say [Hey you currently have developer access. With this can you skip a level by pressing 1. Press 2 to change your lives for the boss battle. Press 3 to see the ninjas variables. 4 to see the version number. Finally 5 to see an update log!]\nend\ndelete this clone\n\nwhen [6 v] key pressed\nif <(item (length of [developers v]) of [developers v]) = (username)> then\n    broadcast (Developer Edits v)\nend\n\nwhen I receive [add text v]\nadd (answer) to [updatelog v]\n\nwhen I receive [edit text v]\nreplace item (Edit Value) of [updatelog v] with (answer)\n\n@Intro\n\nwhen I receive [intro music v]\nset volume to (100) %\nplay sound [Never Mind v] until done\n\nwhen I receive [change volume v]\nif <(volume) = [0]> then\n    set volume to (100) %\nelse\n    if <(volume) = [100]> then\n        set volume to (66) %\n    else\n        if <(volume) = [66]> then\n            set volume to (33) %\n        else\n            set volume to (0) %\n        end\n    end\nend\n\nwhen I receive [intro v]\nbroadcast (Intro Music v)\nclear graphic effects\nwait (1) seconds\nhide\nswitch costume to (shuriken v)\ngo to x: (-400) y: (-8)\nset [cloneid v] to [1]\nrepeat (2)\n    create clone of (_myself_ v)\n    change [cloneid v] by (1)\nend\nset [cloneid v] to [1]\nwait (0.75) seconds\nplay sound [Drawn Sword Sound Effect.mp3 v] until done\n\nwhen I start as a clone\nif <(timer) < [5]> then\n    set size to (100) %\n    if <(CloneID) = [1]> then\n        go to x: (320) y: (0)\n        show\n        repeat until <(x position) = [0]>\n            change x by (-10)\n            turn right (11.25) degrees\n        end\n        hide\n        delete this clone\n    else\n        go to x: (-320) y: (0)\n        show\n        repeat until <(x position) = [0]>\n            change x by (10)\n            turn left (11.25) degrees\n        end\n    end\n    wait (0.5) seconds\n    repeat (10)\n        change size by (5)\n    end\n    wait (0.5) seconds\n    repeat (25)\n        turn right (14.4) degrees\n        change size by (-6)\n    end\n    hide\n    switch costume to (ninja head v)\n    show\n    repeat (50)\n        change size by (5)\n    end\n    create clone of (intro v)\n    wait (7.5) seconds\n    repeat (50)\n        change [ghost v] effect by (2)\n    end\n    delete this clone\nelse\n    show\n    clear graphic effects\n    set size to (80) %\n    go to x: (0) y: (75)\n    repeat (1)\n        switch costume to (text v)\n        hide\n        wait (1.5) seconds\n    end\n    go to x: (0) y: (55)\n    show\n    switch costume to (text v)\n    clear graphic effects\n    set size to (150) %\n    set [ghost v] effect to (100)\n    show\n    repeat (25)\n        change [ghost v] effect by (-4)\n    end\n    wait (5) seconds\n    repeat (50)\n        change [ghost v] effect by (2)\n    end\nend\nwait until <[16.3] < (timer)>\nstop all sounds\nbroadcast (Start v)\nhide\n\n@Music Control\n\ndefine None\nif <(costume) = [1]> then\n    set volume to (100) %\nelse\n    if <(costume) = [2]> then\n        set volume to (66) %\n    else\n        if <(costume) = [3]> then\n            set volume to (33) %\n        else\n            set volume to (0) %\n        end\n    end\nend\n\nwhen I receive [stomp v]\nset [stomp? v] to [1]\nrepeat until <not <(Stomp?) = [1]>>\n    wait (pick random (2) to (4)) seconds\n    start sound [Stomp v]\nend\n\nwhen this sprite clicked\nbroadcast (Change Volume v)\nnext costume\nVolume According To (costume [number v])\n\nwhen I receive [main menu v]\nswitch costume to (high v)\nset [brightness v] effect to (100)\nset size to (100) %\ngo to x: (215) y: (162)\nshow\nrepeat (50)\n    change [brightness v] effect by (-2)\nend\n\nwhen I receive [boss battle music v]\nrepeat until <not <(Level) = [19]>>\n    play sound [Boss Music - Pokemon v] until done\nend\n\nwhen I receive [mysterious music v]\nrepeat until <not <(Level) = [20]>>\n    play sound [Haunting Mysterious Music - The Dusty Attic.mp3 v] until done\nend\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\nset [level v] to [21]\nhide\nforever\n    play sound [Haunting Mysterious Music - The Dusty Attic.mp3 v] until done\nend\n\nwhen I receive [exclaim v]\nstart sound [Exclaim v]\n\nwhen I receive [text v]\nstart sound (pick random (10) to (11))\n\nwhen I receive [real end v]\nset [level v] to [21]\nstop all sounds\nforever\n    play sound [Mission Impossible Theme\(full theme\).mp3 v] until done\nend\n\nwhen I receive [main menu v]\nset [stomp? v] to [0]\nset [level v] to [1]\nshow\nrepeat until <not <(Stomp?) = [0]>>\n    play sound [Waves v] until done\nend\n\nwhen I receive [update level v]\nif <(Level) = [17]> then\n    stop all sounds\n    broadcast (Stomp v)\nelse\n    if <(Level) = [19]> then\n        set [stomp? v] to [0]\n        stop all sounds\n        broadcast (Boss Battle Music v)\n    else\n        if <(Level) = [20]> then\n            stop all sounds\n            broadcast (Mysterious Music v)\n        end\n    end\nend\n\nwhen I receive [laser sound v]\nstart sound [laser1 v]\n\nwhen I receive [cyclops dead v]\nstart sound [Cyclops v]\n\nwhen flag clicked\nswitch costume to (high v)\nset volume to (100) %\n\nwhen I receive [hitlaser v]\nstart sound [zoop v]\n\n@Thumbnail\n\nwhen flag clicked\nhide\n\nswitch costume to (thumbnail v)\nclear graphic effects\ngo to [front v] layer\nshow\n\n@Play Button\n\nwhen I receive [gameplay v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [start v]\nset [ghost v] effect to (100)\nset size to (100) %\ngo to x: (-5) y: (-30)\nshow\nwait (0.5) seconds\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nbroadcast (Ready Menu v)\n\nwhen flag clicked\nhide\n\nwhen I receive [ready menu v]\nforever\n    if <touching (mouse-pointer v)?> then\n        if <not <[120] = (size)>> then\n            repeat (4)\n                change size by (5)\n            end\n        end\n        if <mouse down?> then\n            repeat (20)\n                change [ghost v] effect by (5)\n                change size by (4)\n            end\n            broadcast (Gameplay v)\n        end\n    else\n        if <not <touching (mouse-pointer v)?>> then\n            if <not <[100] = (size)>> then\n                repeat (4)\n                    change size by (-5)\n                end\n            end\n        end\n    end\nend\n\n@Help\n\nwhen I receive [ready menu v]\nforever\n    if <touching (mouse-pointer v)?> then\n        if <not <[140] = (size)>> then\n            repeat (8)\n                change size by (5)\n            end\n            broadcast (Backstory Text v)\n        end\n    else\n        if <not <touching (mouse-pointer v)?>> then\n            broadcast (Backstory Text Hide v)\n            if <not <[100] = (size)>> then\n                repeat (8)\n                    change size by (-5)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [start v]\nset [ghost v] effect to (100)\nset size to (100) %\ngo to x: (-205) y: (-150)\nshow\nwait (0.5) seconds\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [gameplay v]\nhide\nstop [other scripts in sprite v]\n\n@Help Text\n\nwhen I receive [backstory text hide v]\nstop [other scripts in sprite v]\nrepeat until <(ghost effect) = [100]>\n    change [ghost v] effect by (10)\n    change [ghost effect v] by (10)\nend\nhide\n\nwhen I receive [backstory text v]\nshow\nrepeat until <(ghost effect) = [0]>\n    change [ghost v] effect by (-10)\n    change [ghost effect v] by (-10)\nend\n\nwhen I receive [start v]\ngo to x: (54) y: (-196)\nhide\nset [ghost effect v] to [100]\nset [ghost v] effect to (100)\n\n@Lost Ninja\n\ndefine Controls - Jump, Crouch\nif <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n    if <<(jump key) = [0]> and <(falling?) < [3]>> then\n        set [speed y v] to [14]\n        set [falling? v] to [6]\n        set [jump key v] to [1]\n    end\nelse\n    set [jump key v] to [0]\nend\n\ndefine Set Costume\nif <(falling?) < [6]> then\n    if <(frame) = [0]> then\n        switch costume to (stand_1 v)\n    else\n        switch costume to ([floor v] of ((4) + ((frame) mod (8))) )\n    end\nelse\n    if <(speed y) > [0]> then\n        switch costume to (jump_1 v)\n    else\n        switch costume to (fall_1 v)\n    end\nend\n\ndefine Reset Level\nset [touch v] to [0]\nset [in platforrm v] to [1]\nSet Costume\nbroadcast (Update Level v)\nGo To Spawnpoint (Level)\nclear graphic effects\nset size to (25) %\nshow\n\ndefine None\nif <<(level) = [15]> or <(level) = [16]>> then\n    go to x: (-220) y: (11)\nelse\n    if <(level) = [19]> then\n        go to x: (-170) y: (-143)\n    else\n        go to x: (-220) y: (-143)\n    end\nend\n\ndefine Check Hit Ceiling / Floor <>\nGet Touching <not >\nif <(touch) = [0]> then\n    set [in platforrm v] to [1]\nelse\n    if <<up?> and <(touch) = [1]>> then\n        set [in platforrm v] to [2]\n    end\nend\nrepeat until <(touch) < (in platforrm)>\n    if <<(y position) = [172]> and <<(touch) = [9]> and <(in platforrm) = [1]>>> then\n        Reset Level\n    end\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    Get Touching <not <up?>>\n    set [speed y v] to [0]\nend\n\nwhen I receive [real end v]\nhide\n\nwhen I receive [skip v]\nset [level v] to ((Level) + (1))\nReset Level\n\nwhen I receive [ninja variables v]\nif <(Shown) = [0]> then\n    show variable [falling? v]\n    show variable [frame v]\n    show variable [in platforrm v]\n    show variable [jump key v]\n    show variable [slope v]\n    show variable [speed x v]\n    show variable [speed y v]\n    show variable [touch v]\n    show variable [wall jump v]\n    set [shown v] to [1]\nelse\n    hide variable [falling? v]\n    hide variable [frame v]\n    hide variable [in platforrm v]\n    hide variable [jump key v]\n    hide variable [slope v]\n    hide variable [speed x v]\n    hide variable [speed y v]\n    hide variable [touch v]\n    hide variable [wall jump v]\n    set [shown v] to [0]\nend\n\nwhen I receive [gameplay v]\nhide\nhide variable [falling? v]\nhide variable [frame v]\nhide variable [in platforrm v]\nhide variable [jump key v]\nhide variable [slope v]\nhide variable [speed x v]\nhide variable [speed y v]\nhide variable [touch v]\nhide variable [wall jump v]\nset [shown v] to [0]\nset [lives v] to [3]\nset [deaths v] to [0]\ngo to x: (0) y: (0)\nReset Level\ngo to x: (-220) y: (-143)\nclear graphic effects\ngo to [front v] layer\nshow\nforever\n    switch costume to (hitbox v)\n    Bounce\n    Controls - Jump, Crouch\n    Gravity\n    Check Hit Ceiling / Floor <(speed y) > [0]>\n    if <(wall jump) > [0]> then\n        change [wall jump v] by (-1)\n    else\n        Controls - Left and Right\n    end\n    if <(speed x) < [-0.5]> then\n        Walk (-90) (speed x) max step (([ceiling v] of ([abs v] of ((speed x) * (1.3)) ) ) + (1))\n    else\n        if <(speed x) > [0.5]> then\n            Walk (90) (speed x) max step (([ceiling v] of ([abs v] of ((speed x) * (1.3)) ) ) + (1))\n        else\n            set [frame v] to [0]\n        end\n    end\n    if <[230] < (x position)> then\n        change [level v] by (1)\n        set [deaths v] to [0]\n        Reset Level\n        wait until <not <[230] < (x position)>>\n    end\n    if <not <[-200] < (y position)>> then\n        change [deaths v] by (1)\n        Reset Level\n    end\n    if <touching (spikes v)?> then\n        change [deaths v] by (1)\n        Reset Level\n    end\n    if <<[14] < (Deaths)> and <not <(Skip) = [1]>>> then\n        broadcast (SkipDeaths v)\n    end\n    Set Costume\nend\n\nwhen flag clicked\nhide\n\nwhen [e v] key pressed\nif <not <(Level) = [16]>> then\n    if <touching color (#e6e61f)?> then\n        go to x: ((x position) + (150)) y: (y position)\n        wait until <not <key (e v) pressed?>>\n    end\nelse\n    if <touching color (#e6e61f)?> then\n        go to x: (200) y: (36)\n    end\nend\n\ndefine Bounce\nif <touching color (#01ae2c)?> then\n    set [speed y v] to [25]\nend\n\ndefine Controls - Left and Right\nset [speed x v] to ((speed x) * (0.7))\nif <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n    change [speed x v] by (-1.5)\nend\nif <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n    change [speed x v] by (1.5)\nend\n\ndefine None\npoint in direction (direction)\nchange x by (speed)\nchange [frame v] by (([abs v] of (speed) ) / (8))\nset [slope v] to [0]\nGet Touching <(in platforrm) = [1]>\nrepeat until <<(slope) = (step)> or <(touch) = [0]>>\n    change y by (1)\n    change [slope v] by (1)\n    Get Touching <(in platforrm) = [1]>\nend\nif <(slope) = (step)> then\n    change x by ((0) - (speed))\n    change y by ((0) - (slope))\n    if <<(touch) = [1]> and <(in platforrm) = [1]>> then\n        set [in platforrm v] to [2]\n        Walk (direction) (speed) max step (step)\n        if <(speed x) = [0]> then\n            set [in platforrm v] to [1]\n        end\n    else\n        if <<<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <([abs v] of (speed) ) > [3.5]>> and <(touch) > [1]>> then\n            set [speed x v] to ((-1.2) * (speed))\n            set [speed y v] to [11]\n            set [falling? v] to [6]\n            set [wall jump v] to [15]\n        else\n            set [speed x v] to [0]\n        end\n    end\nend\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [update level v]\nif <(Level) = [20]> then\n    wait until <[-1] < (x position)>\n    stop [other scripts in sprite v]\n    switch costume to (stand_1 v)\n    go to x: (0) y: (-143)\n    broadcast (Ending v)\nend\n\ndefine Get Touching <>\nif <<touching color (#4f4f4f)?> or <touching color (#b3b63f)?>> then\n    set [touch v] to [9]\nelse\n    set [touch v] to [0]\nend\n\nwhen [r v] key pressed\nif <<[1] < (Level)> and <not <[18] < (Level)>>> then\n    Reset Level\nend\n\ndefine Gravity\nif <<(speed y) < [4]> or <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n    change [speed y v] by (-1)\nelse\n    change [speed y v] by (-2)\nend\nchange y by (speed y)\nchange [falling? v] by (1)\n\n@Spikes\n\nwhen I receive [update level v]\nif <<[spikes v] contains (Level)?> and <[2] < ([backdrop # v] of [_stage_ v])>> then\n    if <[speical v] contains (Level)?> then\n        broadcast (join [Spikes ] (Level))\n    else\n        switch costume to (spikes short v)\n        clear graphic effects\n        go to x: (-45) y: (-133)\n        show\n    end\nelse\n    hide\nend\n\nwhen I receive [spikes 6 v]\nswitch costume to (spikes long v)\nclear graphic effects\ngo to x: (-91) y: (-133)\nshow\n\nwhen I receive [spikes 7 v]\nswitch costume to (spikes every other v)\nclear graphic effects\ngo to x: (-45) y: (-133)\nshow\n\nwhen I receive [spikes 12 v]\nswitch costume to (spikes medium v)\nclear graphic effects\ngo to x: (-25) y: (-133)\nshow\n\nwhen I receive [spikes 14 v]\nswitch costume to (spikes every other v)\nclear graphic effects\ngo to x: (-45) y: (-133)\nshow\n\nwhen I receive [spikes 15 v]\nswitch costume to (spikes long v)\nclear graphic effects\ngo to x: (-240) y: (-133)\nshow\n\nwhen flag clicked\nhide\n\n@Text\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [cyclops dead v]\nswitch costume to (text 10 v)\n\nwhen I receive [spear v]\nswitch costume to (text 19 pt 2 v)\n\nwhen I receive [update level v]\nswitch costume to (join [Text ] (Level))\n\nwhen I receive [start v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [gameplay v]\ngo to x: (10) y: (22)\nshow\nset [level v] to [1]\nswitch costume to (join [Text ] (Level))\n\n@Cyclops\n\nwhen flag clicked\nhide\n\nwhen I receive [boss battle begin v]\nswitch costume to (cyclops v)\nshow\ngo to x: (0) y: (-44)\n\nwhen I receive [update level v]\nif <(Level) = [19]> then\n    broadcast (Boss Battle Begin v)\nend\n\nwhen I receive [boss battle begin v]\nwait (1) seconds\nbroadcast (Laser Run v)\nrepeat until <not <(Level) = [19]>>\n    if <([x position v] of [lost ninja v]) < [-58]> then\n        switch costume to (cyclops left v)\n    else\n        if <[58] < ([x position v] of [lost ninja v])> then\n            switch costume to (cyclops right v)\n        else\n            switch costume to (cyclops below v)\n        end\n    end\n    if <not <touching color (#4f4f4f)?>> then\n        change y by (-1)\n    end\n    if <(Lives) < [0.9]> then\n        broadcast (Game Over v)\n        stop [other scripts in sprite v]\n        hide\n    end\nend\n\nwhen I receive [cyclops dead v]\nrepeat (100)\n    change [ghost v] effect by (1)\nend\nhide\nstop [other scripts in sprite v]\n\n@Heart\n\nwhen I receive [boss battle begin v]\nshow\nrepeat until <not <(Level) = [19]>>\n    switch costume to (((Lives) * (-1)) + (4))\nend\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\nhide\n\nwhen flag clicked\nhide\n\n@Laser\n\nwhen flag clicked\nhide\n\nwhen I receive [laser run v]\nrepeat (2)\n    Rest (pick random (1) to (2))\n    point towards (lost ninja v)\n    repeat (3)\n        Shoot (1)\n        wait (0.5) seconds\n    end\n    Rest (pick random (1) to (2))\n    point towards (lost ninja v)\n    repeat (3)\n        Shoot (1)\n        wait (0.5) seconds\n    end\nend\nRest (3)\nrepeat (2)\n    Rest (pick random (1) to (1.5))\n    point towards (lost ninja v)\n    repeat (3)\n        Shoot (2)\n        wait (0.5) seconds\n    end\n    Rest (pick random (1) to (1.5))\n    point towards (lost ninja v)\n    repeat (3)\n        Shoot (2)\n        wait (0.5) seconds\n    end\nend\nRest (3)\nrepeat (2)\n    Rest (pick random (1) to (1.5))\n    point towards (lost ninja v)\n    repeat (3)\n        Shoot (4)\n        wait (0.5) seconds\n    end\n    Rest (pick random (1) to (1.5))\n    point towards (lost ninja v)\n    repeat (3)\n        Shoot (4)\n        wait (0.5) seconds\n    end\nend\nbroadcast (Spear v)\n\ndefine None\nwait (time) seconds\n\nwhen I start as a clone\nshow\nrepeat until <<touching (lost ninja v)?> or <<(y position) < [-140]> or <<<[200] < (x position)> and <(x position) < [250]>> or <<[-250] < (x position)> and <(x position) < [-200]>>>>>\n    move ((Speed) * (3)) steps\nend\nif <touching (lost ninja v)?> then\n    change [lives v] by (-1)\n    broadcast (HitLaser v)\n    delete this clone\nelse\n    delete this clone\nend\n\ndefine None\nGo To Eye\nbroadcast (Laser Sound v)\nset [speed v] to (speed)\ncreate clone of (_myself_ v)\n\ndefine Go To Eye\nif <([costume # v] of [cyclops v]) = [2]> then\n    go to x: (0) y: (19)\nelse\n    if <([costume # v] of [cyclops v]) = [3]> then\n        go to x: (5) y: (15)\n    else\n        if <([costume # v] of [cyclops v]) = [4]> then\n            go to x: (15) y: (20)\n        end\n    end\nend\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\nhide\n\n@Spear\n\nwhen flag clicked\nhide\n\nwhen I receive [spear v]\ngo to x: (151) y: (-140)\npoint in direction (90)\nshow\nforever\n    if <<touching (lost ninja v)?> and <key (e v) pressed?>> then\n        point in direction (50)\n        glide (2) secs to x: (35) y: (-12)\n        hide\n        broadcast (Cyclops Dead v)\n        stop [this script v]\n    end\nend\n\n@Exclamation Mark\n\nwhen flag clicked\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [ending v]\nshow\ngo to x: (-95) y: (-29)\nbroadcast (Exclaim v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nbroadcast (Text Ending v)\n\n@Text Ending\n\nwhen flag clicked\nhide\n\nwhen I receive [text ending v]\nwait (0.5) seconds\nbroadcast (text v)\nswitch costume to (s v)\nshow\nwait (0.5) seconds\nbroadcast (text v)\nswitch costume to (so v)\nwait (0.5) seconds\nbroadcast (text v)\nswitch costume to (son v)\nwait (0.5) seconds\nbroadcast (text v)\nswitch costume to (son! v)\nwait (2) seconds\nbroadcast (Real End v)\nhide\n\nwhen I receive [real end v]\nhide\n\n@Dad\n\nwhen flag clicked\nhide\n\nwhen I receive [update level v]\nif <(Level) = [20]> then\n    show\n    go to x: (120) y: (-110)\nend\n\nwhen I receive [real end v]\nhide\n\n@End Credit\n\nwhen flag clicked\nhide\n\nwhen I receive [real end v]\ncreate clone of (_myself_ v)\nswitch costume to (credits v)\ngo to x: (0) y: (-500)\nwait (5) seconds\nswitch costume to (easter egg 1 v)\nset size to (100) %\nswitch costume to (credits v)\nshow\nglide (30) secs to x: (0) y: (620)\nhide\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nshow\nswitch costume to (easter egg 1 v)\ngo to [front v] layer\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nwait (5) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\n\nwhen I start as a clone\nset size to (63) %\ngo to [front v] layer\nswitch costume to (to be continued v)\nset [ghost v] effect to (100)\ngo to x: (49) y: (-47)\nshow\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\n\n@Moving Clouds\n\nwhen flag clicked\nset [c v] to [0]\nset [once v] to [0]\nhide\n\nwhen [c v] key pressed\nset [c v] to [1]\n\nwhen I receive [update level v]\nif <<(Level) = [3]> and <(Once) = [0]>> then\n    set [once v] to [1]\n    broadcast (Create Clouds v)\nend\n\nwhen I receive [create clouds v]\nrepeat until <<[18] < (Level)> or <[1] = (c)>>\n    create clone of (_myself_ v)\n    wait (pick random (4.1) to (8)) seconds\n    if <<[18] < (Level)> or <[1] = (c)>> then\n        stop [this script v]\n    end\nend\n\nwhen I start as a clone\nshow\nset size to (50) %\ngo [backward v] (1000) layers\ngo to x: (260) y: (pick random (160) to (75))\nswitch costume to (pick random (1) to (4))\nset [speed v] to (pick random (1.5) to (3))\nrepeat until <(x position) < [-260]>\n    change x by ((0) - (Speed))\n    if <<[18] < (Level)> or <[1] = (c)>> then\n        stop [other scripts in sprite v]\n        delete this clone\n    end\nend\ndelete this clone\n\n@Skip\n\nwhen flag clicked\nhide\nset [skip v] to [0]\nset [skip accepted v] to [2]\n\nwhen I receive [update level v]\nhide\nif <not <(Skip Accepted) = [1]>> then\n    set [skip v] to [0]\nend\n\nwhen I receive [skipdeaths v]\ngo to x: (237) y: (-160)\nif <<(Skip) = [0]> and <not <(Skip Accepted) = [1]>>> then\n    show\n    set [skip v] to [1]\n    set [skip accepted v] to [2]\n    Repeat\nend\n\ndefine Repeat\nrepeat until <(Skip Accepted) < [2]>\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        broadcast (Skip v)\n        set [skip accepted v] to [1]\n    end\nend\n\n@Developer Edits\n\nwhen I receive [developer edits v]\ngo to x: (250) y: (-150)\nask [Add Or Edit \( A / E \)] and wait\nif <(answer) = [A]> then\n    ask [Add:] and wait\n    if <(answer) = []> then\n        stop [this script v]\n    else\n        broadcast (Add Text v)\n    end\nelse\n    if <(answer) = [E]> then\n        ask [Choose Which To Edit \(1,2,3 etc:\)] and wait\n        if <(answer) = []> then\n            stop [this script v]\n        else\n            if <((answer) * (1)) = (answer)> then\n                set [edit value v] to (answer)\n                ask [Replace With:] and wait\n                if <(answer) = []> then\n                    stop [this script v]\n                else\n                    broadcast (Edit Text v)\n                end\n            else\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\n
------------------------------Fullscreen Recommended-------------------------\n-----------------Do Not Play In Turbo Mode Will Cause Bugs--------------\n\nStuck? Try decoding this message using\nhttps://scratch.mit.edu/projects/127165442/\n\niffm enhb nd pef zm cqqny pn kzgm ejlefq?\n\nPress the R key to reset a level\nWASD / Arrow Keys To Move\nE To Interact\nC to turn clouds off