Fusion Platformer (100% Pen)
@Stage\n\nwhen I receive [stop v]\nstop all sounds\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [begin level v]\nforever\n    switch backdrop to (Level)\nend\n\nwhen flag clicked\nswitch backdrop to (1 v)\n\nwhen I receive [begin level v]\nwait (1) seconds\nforever\n    play sound [Chill v] until done\nend\n\nwhen I receive [level 24 - cutscene 1 v]\nstop [other scripts in sprite v]\n\nwhen I receive [spawn boss v]\nstop [other scripts in sprite v]\nforever\n    play sound [Juhani Junkala - Epic Boss Battle \[Seamlessly Looping\] \(online-audio-converter2 v] until done\nend\n\nwhen I receive [win v]\nstop [other scripts in sprite v]\nforever\n    play sound [715825_Beep-Beep v] until done\nend\n\n@hitbox\n\nwhen I receive [begin level v]\nshow\nset [ghost v] effect to (100)\nforever\n    change y by (-1)\n    if <<<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>> and <(jumpvar) < [3]>> then\n        set [status v] to [walk]\n    else\n        if <(round (yv)) > [0]> then\n            set [status v] to [jump]\n        else\n            change y by (-2)\n            if <<[-1] > (round (yv))> or <not <<touching (stage v)?> or <<touching (moving platform v)?> or <touching (moving platform 2 v)?>>>>> then\n                set [status v] to [fall]\n                if <<(round (yv)) = [-2]> and <<touching (moving platform v)?> or <touching (moving platform 2 v)?>>> then\n                    set [status v] to [still]\n                end\n            else\n                set [status v] to [still]\n            end\n            change y by (2)\n        end\n    end\n    change y by (1)\nend\n\nwhen I receive [begin level v]\nforever\n    if <(textgoingon?) = [0]> then\n        control\n    end\n    gravity\n    gravity\n    move y (yv)\n    move (xv)\n    set [xvglobal v] to (round (xv))\n    set [yvglobal v] to (yv)\n    set [xv v] to ((xv) * (0.65))\nend\n\ndefine control\nif <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n    change [xv v] by (-1.5)\nend\nif <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n    change [xv v] by (1.5)\nend\nchange y by (-3)\nif <<<(jumpvar) < [3]> and <(yv) < [1]>> and <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n    set [yv v] to [13]\n    change y by (10)\nend\nchange y by (3)\n\ndefine move (xv)\npoint in direction (90)\nset [slope v] to [0]\nif <(xv) > [0]> then\n    repeat (round (xv))\n        change x by (1)\n        if touching special, then\n        if <(output) = [1]> then\n            change y by (2)\n            if touching special, then\n            if <(output) = [1]> then\n                set [xv v] to [-3]\n                change x by (-5)\n            end\n            change y by (-2)\n        else\n            if <<<touching (stage v)?> or <touching (moving platform v)?>> or <touching (moving platform 2 v)?>> then\n                if <touching (moving platform v)?> then\n                    change y by (velocityy)\n                end\n                repeat until <<not <<<touching (stage v)?> or <touching (moving platform v)?>> or <touching (moving platform 2 v)?>>> or <(y position) > [175]>>\n                    change y by (1)\n                    change [slope v] by (1)\n                end\n                if <(slope) > [3]> then\n                    set [xv v] to [-3]\n                    change x by (-5)\n                    change y by (() - (slope))\n                end\n            end\n        end\n    end\nelse\n    repeat (round ([abs v] of (xv) ))\n        change x by (-1)\n        if touching special, then\n        if <(output) = [1]> then\n            change y by (2)\n            if touching special, then\n            if <(output) = [1]> then\n                set [xv v] to [3]\n                change x by (5)\n            end\n            change y by (-2)\n        else\n            if <<touching (stage v)?> or <<touching (moving platform 2 v)?> or <touching (moving platform v)?>>> then\n                if <touching (moving platform v)?> then\n                    change y by (velocityy)\n                end\n                repeat until <<not <<touching (stage v)?> or <<touching (moving platform 2 v)?> or <touching (moving platform v)?>>>> or <(y position) > [175]>>\n                    change y by (1)\n                    change [slope v] by (1)\n                end\n                if <(slope) > [3]> then\n                    set [xv v] to [3]\n                    change x by (5)\n                    change y by (() - (slope))\n                end\n            end\n        end\n    end\nend\n\ndefine gravity\nif <<<touching (moving platform 2 v)?> or <touching (moving platform v)?>> or <touching (stage v)?>> then\n\ndefine move y (yv)\nchange y by (() - (yv))\nif <<touching (moving platform v)?> and <(round (yv)) = [0]>> then\n    change y by (velocityy)\n    set [yv v] to [0]\nend\nchange y by (yv)\nif <(yv) > [0]> then\n    change [jumpvar v] by (1)\n    change y by (3)\n    if <<touching (stage v)?> or <touching (moving platform v)?>> then\n        set [jumpvar v] to [5]\n        set [yv v] to [0]\n    end\n    change y by (-3)\n    repeat (round (yv))\n        change y by (1)\n        if <<touching (moving platform v)?> or <touching (stage v)?>> then\n            repeat until <not <<<touching (moving platform 2 v)?> or <touching (moving platform v)?>> or <touching (stage v)?>>>\n                if <<touching (moving platform v)?> and <(velocityy) < (yv)>> then\n                    change y by (() - (yv))\n                    if <touching (moving platform v)?> then\n                        change y by (yv)\n                        change y by (-1)\n                        set [yv v] to [0]\n                    else\n                        set [yv v] to [0]\n                        repeat (5)\n                            change y by (velocityy)\n                        end\n                        change y by (yv)\n                        stop [this script v]\n                    end\n                end\n                change y by (-1)\n                set [yv v] to [0]\n            end\n        else\n            if touching special, then\n            if <(output) = [1]> then\n                stop [this script v]\n            end\n        end\n    end\nend\nif <[0] > (yv)> then\n    change y by (-3)\n    change [jumpvar v] by (1)\n    if <<<touching (stage v)?> or <touching (moving platform v)?>> and <(yv) < [1]>> then\n        set [jumpvar v] to [0]\n    end\n    change y by (3)\n    repeat (([abs v] of (round (yv)) ) + (0))\n        change y by (-1)\n        if <<touching (moving platform v)?> or <touching (stage v)?>> then\n            repeat until <not <<<touching (moving platform 2 v)?> or <touching (moving platform v)?>> or <touching (stage v)?>>>\n                set [yv v] to [0]\n                change y by (1)\n            end\n        else\n            if touching special, then\n            if <(output) = [1]> then\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I receive [die v]\nset [nolivesleft v] to [0]\nif <(lives) = [0]> then\n    change [level v] by (-1)\n    if <(Level) < [1]> then\n        set [level v] to [1]\n    end\n    set [lives v] to [7]\n    broadcast (stop v)\n    broadcast (long fade v) and wait\nend\nchange [lives v] by (-1)\nset [torches v] to [3]\nset [xv v] to [0]\nset [yv v] to [0]\nset [collected v] to [0]\nset [version v] to (pick random (1) to (item (Level) of [version v]))\ngo to x: (item (Level) of [spawnx v]) y: (item (Level) of [spawny v])\n\ndefine if touching special, then\nset [output v] to [1]\nif <<touching (death v)?> or <touching (enemy v)?>> then\n    broadcast (die v)\nelse\n    if <touching (spring v)?> then\n        if <<(status) = [walk]> or <(status) = [still]>> then\n    else\n        if <touching (trampoline v)?> then\n            if  then\n        else\n            set [output v] to [0]\n        end\n    end\nend\n\nwhen I receive [begin level v]\nforever\n    change y by (-2)\n    if <<<(status) = [walk]> or <(status) = [still]>> and <<key (space v) pressed?> and <not <<touching (moving platform v)?> or <touching (moving platform 2 v)?>>>>> then\n        if <(torches) > [0]> then\n            create clone of (placed torch glow v)\n            change [torches v] by (-1)\n            wait until <not <key (space v) pressed?>>\n        end\n    end\n    change y by (2)\nend\n\nwhen [m v] key pressed\nif <(Level) < [24]> then\n    broadcast (levelup v)\n    broadcast (activate scene  v)\nend\nif <(Level) = [24]> then\n    set [bosshp v] to [0]\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [begin level v]\nforever\n    if <(y position) < [-200]> then\n        broadcast (die v)\n    end\nend\n\nwhen I receive [begin level v]\nforever\n    change y by (-2)\n    if <touching (moving platform v)?> then\n        change x by (velocityx)\n    end\n    change y by (2)\nend\n\nwhen I receive [finale v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [spawn boss v]\nforever\n    if <<touching (boss v)?> and <touching color (#330000)?>> then\n        change [lives v] by (-1)\n        go to x: (-207) y: (999)\n    end\n    if <(lives) = [0]> then\n        broadcast (die v)\n    end\nend\n\nchange y by (-5)\n\nset x to (-3)\n\ngo to (random position v)\n\n@stage\n\nwhen I receive [begin level v]\nshow\nforever\n    go to [front v] layer\n    go [backward v] (14) layers\n    switch costume to (join (join (Level) [-]) (Version))\nend\n\nbroadcast (levelup v)\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [finale v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@death\n\nwhen I receive [begin level v]\nshow\nforever\n    go to [front v] layer\n    go [backward v] (15) layers\n    switch costume to (join (join (Level) [-]) (Version))\nend\n\nwhen [l v] key pressed\nif <<(username) = [-MCMaster2-]> or <(username) = [-MCMasterz-]>> then\n    ask [level] and wait\n    set [level v] to (answer)\n    ask [version] and wait\n    set [version v] to (answer)\nend\n\nwhen [p v] key pressed\nif <<(username) = [-MCMaster2-]> or <(username) = [-MCMasterz-]>> then\n    set [lives v] to [5]\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [finale v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@wqdw\n\nwhen I receive [begin level v]\nshow\nset [cloneidarm v] to [1]\ncreate clone of (_myself_ v)\nset [cloneidarm v] to [0]\nforever\n    go to [front v] layer\n    go [backward v] (11) layers\n    if <(direction) < [0]> then\n        switch costume to (arm3 v)\n    else\n        switch costume to (arm2 v)\n    end\nend\n\nwhen I receive [begin level v]\nset rotation style [all around v]\nswitch costume to (costume1 v)\nset size to (40) %\nswitch costume to (arm2 v)\nforever\n    point towards (mouse-pointer v)\nend\n\nwhen I start as a clone\nswitch costume to (costume1 v)\nset size to (40) %\nswitch costume to (arm v)\nforever\n    if <<(status) = [jump]> or <(status) = [fall]>> then\n        set [sine v] to [0]\n        point in direction ((([direction v] of [body v]) / (2)) + (-90))\n    else\n        point in direction ((([sin v] of (sine) ) * (20)) + (90))\n    end\nend\n\nwhen I start as a clone\nset rotation style [all around v]\nforever\n    wait until <(status) = [walk]>\n    repeat until <not <(status) = [walk]>>\n        change [sine v] by (12)\n    end\n    set [sine v] to [0]\n    repeat (10)\n        point in direction ((((direction) - (90)) * (0.7)) + (90))\n    end\n    point in direction (90)\nend\n\nwhen I receive [tickee v]\ngo to (body v)\nchange y by (25)\n\nwhen I start as a clone\nforever\n    go to [front v] layer\n    go [backward v] (17) layers\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [spawn boss v]\nif <(cloneIDarm) = [0]> then\n    stop [other scripts in sprite v]\n    broadcast (activate block mechanic v)\n    set rotation style [left-right v]\n    switch costume to (costume1 v)\n    set size to (40) %\n    switch costume to (arm4 v)\n    forever\n        point towards (mouse-pointer v)\n    end\nend\n\nwhen I receive [activate block mechanic v]\nif <(cloneIDarm) = [0]> then\n    show\n    forever\n        go to [front v] layer\n        go [backward v] (11) layers\n        if <(block) = [1]> then\n            switch costume to (arm4 v)\n        else\n            switch costume to (arm5 v)\n        end\n    end\nend\n\nwhen I receive [activate block mechanic v]\nset [block v] to [0]\nif <(cloneIDarm) = [0]> then\n    show\n    forever\n        wait until <key (q v) pressed?>\n        set [block v] to [1]\n        wait (1.5) seconds\n        set [block v] to [0]\n        wait (0.7) seconds\n    end\nend\n\nchange [block v] by (1)\n\nwhen I receive [finale v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@body\n\nwhen I receive [begin level v]\nshow\nset rotation style [left-right v]\ngo to [front v] layer\ngo [backward v] (0) layers\nforever\n    if <(status) = [walk]> then\n        switch costume to (walk.start v)\n        repeat (7)\n            next costume\n        end\n    end\n    if <(status) = [still]> then\n        switch costume to (stand v)\n    end\n    if <(status) = [jump]> then\n        switch costume to (jump v)\n    end\n    if <(status) = [fall]> then\n        switch costume to (fall v)\n    end\nend\n\nwhen I receive [begin level v]\nforever\n    go to [front v] layer\n    go [backward v] (12) layers\n    set [bodydir v] to (direction)\n    point towards (mouse-pointer v)\n    go to (hitbox v)\n    change y by (-2)\n    broadcast (tickee v)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [finale v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@goal\n\nwhen I receive [die v]\nforever\n    go to x: (item (Level) of [goalx v]) y: (item (Level) of [goaly v])\n    turn right (15) degrees\n    go to [front v] layer\n    go [backward v] (16) layers\nend\n\nwhen I receive [die v]\nforever\n    wait until <touching (hitbox v)?>\n    if <(Level) = [24]> then\n        hide\n        broadcast (Finale v)\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\n    stop [other scripts in sprite v]\n    clear sound effects\n    set volume to (100) %\n    start sound [Disconnect v]\n    broadcast (levelup v)\n    repeat (5)\n        change [ghost v] effect by (20)\n    end\n    hide\n    wait until <not <touching (hitbox v)?>>\nend\n\nwhen I receive [die v]\nforever\n    set [ghost v] effect to (100)\n    wait until <(collected) = [1]>\n    if <(Level) = [24]> then\n        set [bosshp v] to [10]\n        broadcast (Level 24 - Cutscene 1 v) and wait\n        broadcast (spawn boss v)\n        wait until <(bossHP) = [-1]>\n    end\n    show\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    clear graphic effects\n    repeat until <(collected) = [0]>\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nswitch costume to (costume2 v)\npoint in direction (pick random (0) to (359))\nrepeat (10)\n    change [ghost v] effect by (10)\n    move (5) steps\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [stop v]\nhide\nwait (0.05) seconds\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [die v]\nset [collected v] to [0]\nhide\n\nbroadcast (Level 24 - Cutscene 1 v) and wait\n\nwhen I receive [finale v]\n\nset [collected v] to [0]\nhide\n\n@spring\n\nwhen I receive [begin level v]\nshow\nforever\n    go to [front v] layer\n    go [backward v] (17) layers\n    switch costume to (join (join (Level) [-]) (Version))\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [finale v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@trampoline\n\nwhen I receive [begin level v]\nshow\nforever\n    go to [front v] layer\n    go [backward v] (18) layers\n    switch costume to (join (join (Level) [-]) (Version))\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [finale v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@underlay\n\nwhen I receive [begin level v]\nshow\nset [ghost v] effect to (50)\nforever\n    go to x: (0) y: (0)\n    go to [front v] layer\n    go [backward v] (22) layers\n    switch costume to (Level)\nend\n\nwhen flag clicked\nset [ghost v] effect to (50)\nshow\n\nwhen I receive [finale v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@placed torch glow\n\nwhen I start as a clone\nshow\ncreate clone of (placed torch v)\ngo to (hitbox v)\nforever\n    go to [back v] layer\n    go [backward v] (26) layers\n    switch costume to (costume2 v)\n    set size to (pick random (120) to (125)) %\n    switch costume to (costume1 v)\nend\n\nwhen I receive [die v]\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [finale v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@interface\n\nwhen I receive [begin level v]\nshow\nforever\n    switch costume to (torches)\n    go to [front v] layer\n    go [backward v] (10) layers\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [finale v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@interface2\n\nwhen I receive [begin level v]\nshow\nforever\n    switch costume to (lives)\n    go to [front v] layer\n    go [backward v] (9) layers\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [finale v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@handheld torch glow\n\nwhen I receive [tickee v]\ngo to (body v)\nchange y by (25)\npoint towards (mouse-pointer v)\nif <(direction) < [0]> then\n    switch costume to (arm2 v)\nelse\n    switch costume to (arm3 v)\nend\n\nwhen I receive [begin level v]\nshow\nforever\n    set size to (pick random (36) to (38)) %\n    go to [back v] layer\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [finale v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@crystal\n\nwhen I receive [begin level v]\nforever\n    repeat until <touching (hitbox v)?>\n        create clone of (_myself_ v)\n        show\n        next costume\n        if <(costume [number v]) = [18]> then\n            switch costume to (costume1 v)\n        end\n        go to [front v] layer\n        go [backward v] (14) layers\n    end\n    if <[10] > (lives)> then\n        change [lives v] by (1)\n    end\n    if <[10] > (lives)> then\n        change [lives v] by (1)\n    end\n    stop [other scripts in sprite v]\n    clear sound effects\n    set volume to (100) %\n    start sound [Connect v]\n    set [collected v] to [1]\n    hide\n    wait until <(collected) = [0]>\nend\n\nwhen I start as a clone\npoint in direction (pick random (0) to (359))\nswitch costume to (costume18 v)\nrepeat (10)\n    change [ghost v] effect by (10)\n    move (5) steps\nend\ndelete this clone\n\nwhen I receive [die v]\nforever\n    go to x: (item (Level) of [gemx v]) y: ((([sin v] of ((timer) * (200)) ) * (5)) + (item (Level) of [gemy v]))\n    set [pan left/right v] effect to (((x position) - ([x position v] of [hitbox v])) / (1.3))\n    set volume to ((4000) / ([e ^ v] of (([ln v] of ([sqrt v] of (((([y position v] of [hitbox v]) - (y position)) * (([y position v] of [hitbox v]) - (y position))) + ((([x position v] of [hitbox v]) - (x position)) * (([x position v] of [hitbox v]) - (x position)))) ) ) / (1)) )) %\n    set [brightness v] effect to (([sin v] of ((timer) * (75)) ) * (4))\nend\n\nrepeat until <touching (hitbox v)?>\n    create clone of (_myself_ v)\n    show\n    next costume\n    if <(costume [number v]) = [18]> then\n        switch costume to (costume1 v)\n    end\n    go to [front v] layer\n    go [backward v] (7) layers\nend\nstart sound [Connect v]\n\nset size to (100) %\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\nhide\nwait (0.05) seconds\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen flag clicked\n\nwhen I receive [die v]\nwait (2) seconds\nforever\n    play sound [Space Ambience v] until done\nend\n\nwhen I receive [finale v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@subunderlay\n\nwhen I receive [begin level v]\nshow\nforever\n    go to x: (0) y: (0)\n    go to [front v] layer\n    go [backward v] (22) layers\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [finale v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@start menu\n\nwhen I receive [stop v]\nshow\n\nwhen flag clicked\nswitch costume to (costume2 v)\ngo to [front v] layer\nclear graphic effects\nshow\nforever\n    go to x: (0) y: (0)\n    go to [front v] layer\n    go [backward v] (5) layers\nend\n\nwhen I receive [beginning animation v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [stop v]\n\nclear graphic effects\nshow\nswitch costume to (costume1 v)\n\nwhen I receive [begin level v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@howtoplay\n\nwhen I receive [stop v]\n\nclear graphic effects\nshow\ngo to [front v] layer\nshow\nforever\n    wait until <touching (mouse-pointer v)?>\n    repeat (10)\n        set size to ((((size) - (110)) / (2)) + (110)) %\n    end\n    wait until <not <touching (mouse-pointer v)?>>\n    repeat (10)\n        set size to ((((size) - (100)) / (2)) + (100)) %\n    end\nend\n\nwhen I receive [stop v]\n\nshow\n\nwhen flag clicked\nset size to (100) %\nclear graphic effects\ngo to [front v] layer\nshow\nforever\n    go to [front v] layer\n    go [backward v] (6) layers\nend\n\nwhen flag clicked\n\nwait (1) seconds\nset volume to (0) %\nrepeat (10)\n    change volume by (10)\nend\n\nwhen I receive [beginning animation v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [stop v]\n\nclear graphic effects\ngo to [front v] layer\nshow\nforever\n    wait until <<<mouse down?> and <touching (mouse-pointer v)?>> and <not <(instructions shown?) = [1]>>>\n    broadcast (Show Instructions v)\nend\n\nwhen I receive [begin level v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nstop [other scripts in sprite v]\nhide\n\nwhen flag clicked\nclear graphic effects\nshow\ngo to [front v] layer\nshow\nforever\n    wait until <touching (mouse-pointer v)?>\n    repeat (10)\n        set size to ((((size) - (110)) / (2)) + (110)) %\n    end\n    wait until <not <touching (mouse-pointer v)?>>\n    repeat (10)\n        set size to ((((size) - (100)) / (2)) + (100)) %\n    end\nend\n\nwhen flag clicked\nclear graphic effects\ngo to [front v] layer\nshow\nforever\n    wait until <<<mouse down?> and <touching (mouse-pointer v)?>> and <not <(instructions shown?) = [1]>>>\n    broadcast (Show Instructions v)\nend\n\n@moving platform\n\nwhen I receive [begin level v]\n\nwhen I receive [die v]\ndelete this clone\n\nwhen I receive [die v]\nset [pause1 v] to [1]\nset [pause2 v] to [1]\nif <(Level) = [5]> then\n    switch costume to (5-1.1 v)\n    set [length1 v] to [3]\n    set [length2 v] to [3]\n    set [x1 v] to [-170]\n    set [x2 v] to [160]\n    set [y1 v] to [0]\n    set [y2 v] to [0]\n    create clone of (_myself_ v)\nend\nif <(Level) = [6]> then\n    switch costume to (6-1.1 v)\n    set [length1 v] to [5]\n    set [length2 v] to [5]\n    set [x1 v] to [200]\n    set [x2 v] to [200]\n    set [y1 v] to [-160]\n    set [y2 v] to [160]\n    create clone of (_myself_ v)\nend\nif <(Level) = [10]> then\n    switch costume to (10-1.1 v)\n    set [length1 v] to [1.5]\n    set [length2 v] to [1.5]\n    set [x1 v] to [-170]\n    set [x2 v] to [-80]\n    set [y1 v] to [-10]\n    set [y2 v] to [-10]\n    create clone of (_myself_ v)\nend\nif <(Level) = [16]> then\n    switch costume to (16-1.1 v)\n    set [length1 v] to [2]\n    set [length2 v] to [2]\n    set [x1 v] to [-180]\n    set [x2 v] to [-55]\n    set [y1 v] to [100]\n    set [y2 v] to [100]\n    create clone of (_myself_ v)\n    set [x1 v] to [150]\n    set [x2 v] to [20]\n    create clone of (_myself_ v)\n    switch costume to (16-1.2 v)\n    set [length1 v] to [2]\n    set [length2 v] to [2]\n    set [x1 v] to [-55]\n    set [x2 v] to [-180]\n    set [y1 v] to [-10]\n    set [y2 v] to [-10]\n    create clone of (_myself_ v)\n    set [x1 v] to [20]\n    set [x2 v] to [150]\n    create clone of (_myself_ v)\nend\nif <(Level) = [18]> then\n    set [pause1 v] to [0]\n    set [pause2 v] to [0]\n    switch costume to (18-1.1 v)\n    set [length1 v] to [3]\n    set [length2 v] to [0]\n    set [x1 v] to [0]\n    set [x2 v] to [0]\n    set [y1 v] to [0]\n    set [y2 v] to [-116]\n    create clone of (_myself_ v)\n    switch costume to (18-1.2 v)\n    set [y1 v] to [0]\n    set [y2 v] to [116]\n    create clone of (_myself_ v)\nend\nif <(Level) = [20]> then\n    set [pause1 v] to [0]\n    set [pause2 v] to [0]\n    switch costume to (20-1.1 v)\n    set [length1 v] to [2]\n    set [length2 v] to [0]\n    set [x1 v] to [0]\n    set [x2 v] to [0]\n    set [y1 v] to [0]\n    set [y2 v] to [-116]\n    create clone of (_myself_ v)\n    switch costume to (20-1.2 v)\n    set [y1 v] to [0]\n    set [y2 v] to [116]\n    create clone of (_myself_ v)\nend\nif <(Level) = [22]> then\n    set [pause1 v] to [1]\n    set [pause2 v] to [1]\n    switch costume to (22-1.1 v)\n    set [length1 v] to [1.5]\n    set [length2 v] to [1.5]\n    set [x1 v] to [-80]\n    set [x2 v] to [-20]\n    set [y1 v] to [-100]\n    set [y2 v] to [-100]\n    create clone of (_myself_ v)\n    set [length1 v] to [1.5]\n    set [length2 v] to [1.5]\n    set [x1 v] to [80]\n    set [x2 v] to [20]\n    set [y1 v] to [-100]\n    set [y2 v] to [-100]\n    create clone of (_myself_ v)\nend\n\nwhen I receive [begin level v]\n\nwhen I start as a clone\nshow\ngo to x: (x1) y: (y1)\nforever\n    glide (length1) secs to x: (x2) y: (y2)\n    wait (pause1) seconds\n    glide (length2) secs to x: (x1) y: (y1)\n    wait (pause2) seconds\nend\n\nwhen I start as a clone\nforever\n    change y by (10)\n    if <touching (hitbox v)?> then\n        change y by (-10)\n        if <(costume [name v]) = [18-1.1]> then\n            set [velocityx v] to [0]\n            set [velocityy v] to [-1.3]\n        else\n            if <(costume [name v]) = [18-1.2]> then\n                set [velocityx v] to [0]\n                set [velocityy v] to [1.3]\n            else\n                if <(costume [name v]) = [20-1.1]> then\n                    set [velocityx v] to [0]\n                    set [velocityy v] to [-1.97]\n                else\n                    if <(costume [name v]) = [20-1.2]> then\n                        set [velocityx v] to [0]\n                        set [velocityy v] to [1.97]\n                    else\n                        set [velocityx v] to ((x position) - (oldx))\n                        set [velocityy v] to ((y position) - (oldy))\n                    end\n                end\n            end\n        end\n    else\n        change y by (-10)\n    end\n    go to [front v] layer\n    go [backward v] (20) layers\n    set [oldx v] to (x position)\n    set [oldy v] to (y position)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\nhide\ndelete this clone\n\nswitch costume to (14-1.1 v)\nset [length1 v] to [3]\nset [x1 v] to [-180]\nset [x2 v] to [180]\nset [y1 v] to [0]\nset [y2 v] to [0]\ncreate clone of (_myself_ v)\n\nset [length2 v] to [2]\n\nwhen flag clicked\n\nwhen I start as a clone\nwait until <(nolivesleft) = [1]>\ndelete this clone\n\nwhen I receive [finale v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@glowcrystal\n\nwhen I receive [begin level v]\nforever\n    go to (crystal v)\n    go to [back v] layer\n    go [backward v] (24) layers\n    set size to ((([sin v] of ((timer) * (100)) ) * (5)) + (100)) %\nend\n\nwhen I receive [begin level v]\nforever\n    wait until <(collected) = [0]>\n    clear graphic effects\n    show\n    wait until <(collected) = [1]>\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    hide\nend\n\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nset size to ((([sin v] of ((timer) * (150)) ) * (5)) + (100)) %\n\nset size to ((([sin v] of ((timer) * (100)) ) * (5)) + (100)) %\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [finale v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@glowgoal\n\nwhen I receive [begin level v]\nforever\n    wait until <(collected) = [0]>\n    hide\n    set [ghost v] effect to (100)\n    wait until <(collected) = [1]>\n    if <(Level) = [24]> then\n        set [bosshp v] to [10]\n        wait until <(bossHP) = [-1]>\n    end\n    show\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    clear graphic effects\nend\n\nclear graphic effects\n\nwhen I receive [begin level v]\nshow\nforever\n    go to (goal v)\n    go to [back v] layer\n    go [backward v] (25) layers\n    set size to ((([sin v] of ((timer) * (150)) ) * (5)) + (100)) %\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [finale v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@fade\n\nwhen I receive [levelup v]\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nchange [lives v] by (1)\nif <[11] > (lives)> then\n    change [lives v] by (1)\nend\nif <[11] > (lives)> then\n    change [lives v] by (1)\nend\nbroadcast (die v)\nchange [level v] by (1)\nset [torches v] to [3]\nset [collected v] to [0]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [die v]\ngo to [front v] layer\nshow\nclear graphic effects\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [begin level v]\nhide\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\n\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nif <[6] > (lives)> then\n    change [lives v] by (1)\nend\n\nwhen I receive [long fade v]\nstop [other scripts in sprite v]\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (0.5) seconds\nbroadcast (death ermkjg nfvcc' v) and wait\nwait (.5) seconds\nbroadcast (Begin Level v)\nbroadcast (die v)\nclear graphic effects\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nif <[6] > (lives)> then\n    change [lives v] by (1)\nend\n\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (1) seconds\n\nwhen I receive [long fade v]\nhide\nforever\n    go to [front v] layer\n    go [backward v] (1) layers\nend\n\nwhen I receive [long fade v]\nhide\nforever\n    go to [front v] layer\nend\n\n@placed torch\n\nwhen I start as a clone\nshow\ngo to (hitbox v)\nforever\n    go to [front v] layer\n    go [backward v] (10) layers\nend\n\nwhen I receive [die v]\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [finale v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@start menu torch glow\n\nwhen flag clicked\nclear graphic effects\nshow\nswitch costume to (costume1 v)\ncreate clone of (_myself_ v)\nforever\n    go to (mouse-pointer v)\n    go to [back v] layer\nend\n\nset [lives v] to [6]\nset [torches v] to [3]\nset [level v] to [1]\nset [ghost v] effect to (100)\nbroadcast (Begin Level v)\nbroadcast (die v)\n\nwhen I receive [beginning animation v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\ndelete this clone\n\nwhen I start as a clone\nswitch costume to (costume2 v)\nset size to (300) %\nswitch costume to (costume1 v)\nforever\n    go to x: (150) y: (120)\n    go to [back v] layer\nend\n\nwhen I receive [stop v]\n\nclear graphic effects\nshow\ncreate clone of (_myself_ v)\n\nwhen I receive [begin level v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [begin level v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\ndelete this clone\n\n@start menu crystal glow\n\nwhen I receive [stop v]\n\nwhen I receive [begin level v]\n\nwhen I receive [beginning animation v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nset size to ((([sin v] of ((timer) * (100)) ) * (5)) + (100)) %\n\nwhen flag clicked\nclear graphic effects\nshow\nforever\n    go to [back v] layer\n    go to (start gem v)\n    go to [back v] layer\n    go [backward v] (666) layers\n    set size to ((([sin v] of ((timer) * (100)) ) * (5)) + (100)) %\nend\n\nclear graphic effects\nshow\n\nwhen I receive [begin level v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\ndelete this clone\n\n@start gem\n\nwhen I start as a clone\nswitch costume to (costume18 v)\npoint in direction (pick random (0) to (359))\nrepeat (10)\n    go to [front v] layer\n    go [backward v] (4) layers\n    change [ghost v] effect by (10)\n    move (5) steps\nend\ndelete this clone\n\nwhen I receive [beginning animation v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nset size to (100) %\n\nwhen flag clicked\nshow\nforever\n    go to [front v] layer\n    go [backward v] (4) layers\n    create clone of (_myself_ v)\n    go to x: (-185) y: ((([sin v] of ((timer) * (200)) ) * (5)) + (100))\n    next costume\n    if <(costume [number v]) = [18]> then\n        switch costume to (costume1 v)\n    end\n    set [brightness v] effect to (([sin v] of ((timer) * (75)) ) * (4))\nend\n\nwhen I receive [stop v]\n\nclear graphic effects\nshow\n\nwhen I receive [begin level v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\ndelete this clone\n\n@start\n\nwhen flag clicked\ngo to [front v] layer\nset size to (100) %\nshow\nforever\n    wait until <touching (mouse-pointer v)?>\n    repeat (10)\n        set size to ((((size) - (110)) / (2)) + (110)) %\n    end\n    wait until <not <touching (mouse-pointer v)?>>\n    repeat (10)\n        set size to ((((size) - (100)) / (2)) + (100)) %\n    end\nend\n\nwhen flag clicked\nclear graphic effects\ngo to [front v] layer\nshow\nwait until <<<mouse down?> and <touching (mouse-pointer v)?>> and <not <(instructions shown?) = [1]>>>\nset [lives v] to [11]\nset [torches v] to [3]\nrepeat (10)\n    change volume by (-10)\n    change [ghost v] effect by (10)\nend\nstop [other scripts in sprite v]\nbroadcast (Beginning Animation v) and wait\nstop all sounds\nhide\n\nwhen flag clicked\ngo to [front v] layer\nset volume to (100) %\nshow\nforever\n    play sound [Dance Chill Out v] until done\nend\n\nwait (1) seconds\nset volume to (0) %\nrepeat (10)\n    change volume by (10)\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    go [backward v] (7) layers\nend\n\nwhen I receive [begin level v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@enemy\n\nwhen I start as a clone\nwait until <(nolivesleft) = [1]>\ndelete this clone\n\nwhen I receive [stop v]\nhide\ndelete this clone\n\nwhen I receive [begin level v]\n\nwhen I receive [die v]\ndelete this clone\n\nwhen I receive [die v]\nset [norotate v] to [0]\nif <(Level) = [7]> then\n    switch costume to (7-1.1 v)\n    set [length v] to [12]\n    set [x1 v] to [-150]\n    set [x2 v] to [150]\n    set [y1 v] to [-144]\n    set [y2 v] to [-144]\n    create clone of (_myself_ v)\n    set [length v] to [10]\n    create clone of (_myself_ v)\n    switch costume to (7-1.1 v)\n    set [length v] to [9]\n    set [x1 v] to [-150]\n    set [x2 v] to [100]\n    set [y1 v] to [-3]\n    set [y2 v] to [-3]\n    create clone of (_myself_ v)\n    set [length v] to [13]\n    create clone of (_myself_ v)\nend\nif <(Level) = [9]> then\n    switch costume to (9-1.1 v)\n    set [length v] to [12]\n    set [x1 v] to [-200]\n    set [x2 v] to [200]\n    set [y1 v] to [-160]\n    set [y2 v] to [-160]\n    create clone of (_myself_ v)\n    set [length v] to [15]\n    create clone of (_myself_ v)\n    set [x1 v] to [200]\n    set [x2 v] to [-200]\n    set [y1 v] to [-160]\n    set [y2 v] to [-160]\n    set [length v] to [18]\n    create clone of (_myself_ v)\n    set [length v] to [8]\n    create clone of (_myself_ v)\n    set [length v] to [14]\n    create clone of (_myself_ v)\nend\nif <(Level) = [13]> then\n    switch costume to (13-1.1 v)\n    set [length v] to [6]\n    set [x1 v] to [-185]\n    set [x2 v] to [155]\n    set [y1 v] to [-160]\n    set [y2 v] to [-160]\n    create clone of (_myself_ v)\n    set [x1 v] to [-133]\n    set [x2 v] to [104]\n    set [y1 v] to [-32]\n    set [y2 v] to [-32]\n    set [length v] to [9]\n    create clone of (_myself_ v)\n    set [length v] to [15]\n    create clone of (_myself_ v)\n    set [x1 v] to [-109]\n    set [x2 v] to [120]\n    set [y1 v] to [94]\n    set [y2 v] to [94]\n    set [length v] to [14]\n    create clone of (_myself_ v)\n    set [length v] to [8]\n    create clone of (_myself_ v)\n    set [x1 v] to [120]\n    set [x2 v] to [-109]\n    set [y1 v] to [94]\n    set [y2 v] to [94]\n    set [length v] to [9]\n    create clone of (_myself_ v)\n    set [length v] to [11]\n    create clone of (_myself_ v)\nend\nif <(Level) = [15]> then\n    switch costume to (15-1.1 v)\n    set [length v] to [6]\n    set [x1 v] to [-150]\n    set [x2 v] to [150]\n    set [y1 v] to [-165]\n    set [y2 v] to [-165]\n    create clone of (_myself_ v)\n    set [length v] to [7]\n    create clone of (_myself_ v)\n    set [length v] to [10]\n    create clone of (_myself_ v)\n    set [x1 v] to [150]\n    set [x2 v] to [-150]\n    set [length v] to [8]\n    create clone of (_myself_ v)\n    set [length v] to [9]\n    create clone of (_myself_ v)\nend\nset [norotate v] to [1]\nif <(Level) = [17]> then\n    switch costume to (17-1 v)\n    set [length v] to [1]\n    set [x1 v] to [0]\n    set [x2 v] to [-180]\n    set [y1 v] to [0]\n    set [y2 v] to [0]\n    create clone of (_myself_ v)\n    next costume\n    set [length v] to [1]\n    set [x1 v] to [180]\n    set [x2 v] to [0]\n    set [y1 v] to [0]\n    set [y2 v] to [0]\n    create clone of (_myself_ v)\n    next costume\n    set [norotate v] to [0]\n    set [length v] to [2]\n    set [x1 v] to [-50]\n    set [x2 v] to [98]\n    set [y1 v] to [32]\n    set [y2 v] to [32]\n    create clone of (_myself_ v)\n    set [length v] to [1.8]\n    set [x1 v] to [98]\n    set [x2 v] to [-50]\n    set [y1 v] to [32]\n    set [y2 v] to [32]\n    create clone of (_myself_ v)\n    set [length v] to [2.5]\n    set [x1 v] to [-106]\n    set [x2 v] to [70]\n    set [y1 v] to [-102]\n    set [y2 v] to [-102]\n    create clone of (_myself_ v)\n    set [length v] to [2.2]\n    set [x1 v] to [70]\n    set [x2 v] to [-106]\n    create clone of (_myself_ v)\n    set [length v] to [2.7]\n    create clone of (_myself_ v)\nend\nset [norotate v] to [1]\nif <(Level) = [18]> then\n    switch costume to (18-1.1 v)\n    set [length v] to [1]\n    set [x1 v] to [-172]\n    set [x2 v] to [-308]\n    set [y1 v] to [40]\n    set [y2 v] to [40]\n    create clone of (_myself_ v)\nend\nif <(Level) = [19]> then\n    switch costume to (22-1.1 v)\n    set [length v] to [4]\n    set [x1 v] to [2]\n    set [x2 v] to [133]\n    set [y1 v] to [-123]\n    set [y2 v] to [93]\n    create clone of (_myself_ v)\n    set [length v] to [6]\n    set [x1 v] to [133]\n    set [x2 v] to [2]\n    set [y1 v] to [93]\n    set [y2 v] to [-123]\n    create clone of (_myself_ v)\n    set [length v] to [7]\n    create clone of (_myself_ v)\nend\nif <(Level) = [22]> then\n    switch costume to (22-1.1 v)\n    set [length v] to [3]\n    set [x1 v] to [-201]\n    set [x2 v] to [-169]\n    set [y1 v] to [-129]\n    set [y2 v] to [37]\n    create clone of (_myself_ v)\n    switch costume to (22-1.2 v)\n    set [length v] to [4]\n    set [x1 v] to [169]\n    set [x2 v] to [201]\n    set [y1 v] to [37]\n    set [y2 v] to [-129]\n    create clone of (_myself_ v)\nend\nset [norotate v] to [0]\nif <(Level) = [23]> then\n    switch costume to (23-1.2 v)\n    set [length v] to [4]\n    set [x1 v] to [-139]\n    set [x2 v] to [-6]\n    set [y1 v] to [-149]\n    set [y2 v] to [-149]\n    create clone of (_myself_ v)\n    switch costume to (23-1.2 v)\n    set [length v] to [7]\n    set [x1 v] to [-6]\n    set [x2 v] to [-139]\n    create clone of (_myself_ v)\n    set [length v] to [3]\n    set [x1 v] to [-40]\n    set [x2 v] to [-120]\n    set [y1 v] to [-27]\n    set [y2 v] to [-27]\n    create clone of (_myself_ v)\n    set [length v] to [2]\n    set [x1 v] to [-80]\n    set [x2 v] to [0]\n    set [y1 v] to [85]\n    set [y2 v] to [85]\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\ngo to x: (x1) y: (y1)\nset rotation style [left-right v]\npoint in direction (90)\nforever\n    if <(norotate) = [0]> then\n        if <(x1) < (x2)> then\n            point in direction (90)\n        else\n            point in direction (-90)\n        end\n    end\n    glide (length) secs to x: (x2) y: (y2)\n    wait (1) seconds\n    if <(norotate) = [0]> then\n        if <(x1) < (x2)> then\n            point in direction (-90)\n        else\n            point in direction (90)\n        end\n    end\n    glide (length) secs to x: (x1) y: (y1)\n    wait (1) seconds\nend\n\nwhen I start as a clone\nforever\n    go to [front v] layer\n    go [backward v] (21) layers\nend\n\nif <(x1) < (x2)> then\n    point in direction (90)\nelse\n    point in direction (-90)\nend\n\nwhen I receive [stop v]\nhide\n\nset [length v] to [6]\n\nset [length v] to [7]\ncreate clone of (_myself_ v)\nset [length v] to [10]\ncreate clone of (_myself_ v)\n\nnext costume\nset [length v] to [1]\nset [x1 v] to [180]\nset [x2 v] to [0]\nset [y1 v] to [0]\nset [y2 v] to [0]\ncreate clone of (_myself_ v)\nnext costume\nset [norotate v] to [0]\nset [length v] to [2]\nset [x1 v] to [-50]\nset [x2 v] to [98]\nset [y1 v] to [32]\nset [y2 v] to [32]\ncreate clone of (_myself_ v)\nset [length v] to [1.8]\nset [x1 v] to [98]\nset [x2 v] to [-50]\nset [y1 v] to [32]\nset [y2 v] to [32]\ncreate clone of (_myself_ v)\nset [length v] to [2.5]\nset [x1 v] to [-106]\nset [x2 v] to [70]\nset [y1 v] to [-102]\nset [y2 v] to [-102]\ncreate clone of (_myself_ v)\nset [length v] to [2.2]\nset [x1 v] to [70]\nset [x2 v] to [-106]\ncreate clone of (_myself_ v)\nset [length v] to [2.7]\ncreate clone of (_myself_ v)\n\nwhen I receive [finale v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@instructionsheet\n\nwhen flag clicked\nhide\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\n    go [backward v] (1) layers\nend\n\nwhen I receive [show instructions v]\nset [instructions shown? v] to [1]\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait until <mouse down?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [instructions shown? v] to [0]\nhide\n\nwhen I receive [begin level v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [begin level v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nstop [other scripts in sprite v]\nhide\n\n@Animation-Start\n\ndefine Talk (delay frames) (input) (tone) (wait)\nset volume to (40) %\nset instrument to (20 v)\nset [nolivesleft v] to [1]\nset [\(talk\) say v] to []\nrepeat (length of (input))\n    set [\(talk\) say v] to (join (\(Talk\) Say) (letter (nolivesleft) of (input)))\n    say (\(Talk\) Say)\n    play note ((tone)) for ((delay frames) * (0.03)) beats\n    if <[\(talk\) punctuation v] contains (letter (nolivesleft) of (input))?> then\n        wait (0.3) seconds\n    end\n    change [nolivesleft v] by (1)\nend\nsay (input) for (wait) seconds\nset volume to (100) %\n\nwhen flag clicked\nhide\nforever\n    go to [front v] layer\n    go [backward v] (8) layers\nend\n\nwhen I receive [beginning animation v]\nset [skip v] to [1]\nwait (0.5) seconds\nshow\nstart sound [Space Ambience v]\nswitch costume to (stand v)\nrepeat (8)\n    go to [front v] layer\n    next costume\n    wait (0.065) seconds\nend\nstart sound [Minecraft-stone1 v]\nrepeat (7)\n    go to [front v] layer\n    next costume\n    wait (0.065) seconds\nend\nstart sound [Minecraft-stone1 v]\nrepeat (7)\n    go to [front v] layer\n    go [backward v] (8) layers\n    next costume\n    wait (0.065) seconds\nend\nstart sound [Minecraft-stone1 v]\nwait (1) seconds\nset [skip v] to [0]\nbroadcast (Cutscene 1 - Text 1 v) and wait\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nstop all sounds\nnext costume\nset [level v] to [1]\nbroadcast (Begin Level v)\nbroadcast (die v)\n\nwhen I receive [beginning animation v]\nwait (1) seconds\nrepeat until <(skip) = [0]>\n    if <key (s v) pressed?> then\n        stop [other scripts in sprite v]\n        stop all sounds\n        set [level v] to [1]\n        broadcast (Begin Level v)\n        broadcast (die v)\n        set [skip v] to [0]\n    end\nend\n\nwhen I receive [begin level v]\nhide\nforever\n    go to [front v] layer\n    go [backward v] (8) layers\nend\n\n@Text Box\n\nwhen I receive [show on screen v]\nset [clone? v] to [0]\nhide\nforever\n    switch costume to (text box 1 v)\n    go to x: (Text Box X) y: (Text Box Y)\nend\n\nwhen I receive [show on screen v]\nset [text box y v] to [-150]\nrepeat until <([abs v] of (Text Box Y) ) < [1]>\n    set [text box y v] to ((Text Box Y) * (0.9))\nend\nset [text box y v] to [0]\n\nwhen flag clicked\nset [textgoingon? v] to [0]\nset volume to (50) %\nhide\nforever\n    go to [front v] layer\n    go [backward v] (2) layers\nend\n\nwhen I start as a clone\nset [clone? v] to [1]\nswitch costume to (Letter ID)\ngo to [front v] layer\nforever\n    go to x: ((Letter X) + (Text Box X)) y: ((Letter Y) + (Text Box Y))\nend\n\ndefine Say: (what you gonna say?) (title of that?) (end key?) (lol)\nshow\nset [textend v] to [1]\nbroadcast (Show On Screen v)\nwait (0) seconds\nif <(lol) = [1]> then\n    start sound [Snort v]\nend\nshow\nswitch costume to (text box 1 v)\nclear graphic effects\nTitle: (title of that?)\nset instrument to (20 v)\nset [current letter v] to [0]\nset [letter x v] to [-220]\nset [letter y v] to [-100]\nrepeat (length of (what you gonna say?))\n    change [current letter v] by (1)\n    change [letter x v] by (8)\n    if <[220] < (Letter X)> then\n        set [letter x v] to [-220]\n        change [letter y v] by (-10)\n    else\n    end\n    set [letter id v] to (letter (Current Letter) of (what you gonna say?))\n    create clone of (_myself_ v)\n    if <(lol) = [1]> then\n        rest for (0.03) beats\n    else\n        play note (64) for (0.03) beats\n    end\n    if <<(Letter ID) = [,]> or <<(Letter ID) = [.]> or <<(Letter ID) = [!]> or >>> then\n        wait (0.4) seconds\n    end\nend\nwait until <key ((end key?) v) pressed?>\nset [textend v] to [0]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\ndefine Title: (title)\nset [current letter v] to [0]\nset [letter x v] to [-230]\nset [letter y v] to [-74]\nrepeat (length of (title))\n    change [current letter v] by (1)\n    change [letter x v] by (8)\n    set [letter id v] to (letter (Current Letter) of (title))\n    create clone of (_myself_ v)\nend\n\nwhen I receive [cutscene 1 - text 1 v]\nshow\nchange [textgoingon? v] by (1)\nSay: [what is that glow? \(x to continue\)] [you] [x] []\nSay: [maybe i should go look...] [you] [x] []\nset [textgoingon? v] to [0]\nhide\n\nwhen I start as a clone\nshow\nforever\n    go to [front v] layer\n    go [backward v] (0) layers\nend\n\nwhen I receive [begin level v]\ndelete this clone\n\nif <(Clone?) = [0]> then\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    hide\nend\n\nwhen I receive [level 2 - text 1 v]\nshow\nchange [textgoingon? v] by (1)\nSay: [i can't see the rest of the sign. maybe a torch will   help? \(press space to place a torch\)] [you] [ ] []\nSay: [that's much better. now i can see there was a trap!] [you] [x] []\nset [textgoingon? v] to [0]\nhide\n\nwhen I receive [level 3 - text 1 v]\nwait (1) seconds\nshow\nchange [textgoingon? v] by (1)\nSay: [where's the next pillar? \(place a torch\)] [you] [ ] []\nSay: [there it is!] [you] [x] []\nset [textgoingon? v] to [0]\nhide\n\nwhen I receive [level 7 - text 1 v]\nshow\nchange [textgoingon? v] by (1)\nSay: [there are creatures here. if i stay still while they   pass me, i should be okay.] [you] [x] []\nset [textgoingon? v] to [0]\nhide\n\nwhen I receive [level 1 - text 1 v]\nwait (1.5) seconds\nshow\nchange [textgoingon? v] by (1)\nSay: [oh look! it's a crystal!] [you] [x] []\nset [textgoingon? v] to [0]\nhide\n\nwhen I receive [level 1 - text 2 v]\nshow\nchange [textgoingon? v] by (1)\nSay: [i want to see if there are more!] [you] [x] []\nSay: [maybe the portal would lead me to another one?] [you] [x] []\nset [textgoingon? v] to [0]\nhide\n\nwhen I receive [level 4 - text 1 v]\nshow\nchange [textgoingon? v] by (1)\nSay: [what is that sign talking about?] [you] [x] []\nset [textgoingon? v] to [0]\nhide\n\nwhen I receive [level 4 - text 2 v]\nshow\nchange [textgoingon? v] by (1)\nSay: [better be wary about where the springs will lead to,   especially because there are two of them.] [you] [x] []\nset [textgoingon? v] to [0]\nhide\n\nwhen I receive [begin level v]\nstop [other scripts in sprite v]\nset [textgoingon? v] to [0]\nset volume to (50) %\nhide\nforever\n    go to [front v] layer\n    go [backward v] (3) layers\nend\n\nwhen I receive [beginning animation v]\n\nwhen I receive [level 24 - cutscene 1 v]\nshow\nchange [textgoingon? v] by (1)\nSay: [*growl*] [???] [x] [1]\nSay: [what... was... that?] [you] [x] []\nSay: [\(press q to block\)] [you] [x] []\nset [textgoingon? v] to [0]\nhide\n\nwhen I receive [cutscene 2 - text 1 v]\nshow\nchange [textgoingon? v] by (1)\nSay: [what even does this do...?] [you] [x] []\nset [textgoingon? v] to [0]\nhide\n\nwhen I start as a clone\nwait until <(textend) = [0]>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\ndelete this clone\n\nglide (1) secs to x: (0) y: (0)\n\nwhen [s v] key pressed\nstop [other scripts in sprite v]\nbroadcast (tooputh v)\nhide\ndelete this clone\n\nwhen [s v] key pressed\n\nwhen I receive [tooputh v]\nset [textgoingon? v] to [0]\nset volume to (50) %\nhide\nforever\n    go to [front v] layer\n    go [backward v] (3) layers\nend\n\nwhen I receive [death ermkjg nfvcc' v]\nshow\nSay: [oww... what happened?] [you] [x] []\n\nwhen I receive [levelup v]\nstop [other scripts in sprite v]\nbroadcast (tooputh v)\nhide\ndelete this clone\n\n@thumbnail\n\nwhen flag clicked\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\nend\n\nset [ghost v] effect to (0)\nwait (10) seconds\nset [ghost v] effect to (100)\n\n@textbox activator\n\nwhen I receive [begin level v]\n\nwhen I receive [begin level v]\nforever\n    go to [front v] layer\n    go [backward v] (5) layers\nend\n\nwhen flag clicked\nset [level v] to [0]\nhide\nwait until <(Level) = [1]>\nbroadcast (Level 1 - Text 1 v) and wait\nwait until <(collected) = [1]>\nbroadcast (Level 1 - Text 2 v) and wait\nwait until <(Level) = [2]>\nshow\nset [ghost v] effect to (100)\nswitch costume to (level 2 v)\nwait until <touching (hitbox v)?>\nhide\nbroadcast (Level 2 - Text 1 v) and wait\nwait until <(Level) = [3]>\nbroadcast (Level 3 - Text 1 v) and wait\nwait until <(Level) = [4]>\nshow\nset [ghost v] effect to (100)\nswitch costume to (level 4.1 v)\nwait until <touching (hitbox v)?>\nswitch costume to (level 4.2 v)\nbroadcast (Level 4 - Text 1 v) and wait\nwait until <not <touching (hitbox v)?>>\nwait until <touching (hitbox v)?>\nbroadcast (Level 4 - Text 2 v) and wait\nwait until <(Level) = [7]>\nbroadcast (Level 7 - Text 1 v) and wait\nhide\n\nwhen I receive [finale v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [activate scene  v]\nstop [other scripts in sprite v]\nif <[1] > (Level)> then\n    wait until <(Level) = [1]>\n    broadcast (Level 1 - Text 1 v) and wait\n    wait until <(collected) = [1]>\n    broadcast (Level 1 - Text 2 v) and wait\nend\nif <[2] > (Level)> then\n    wait until <(Level) = [2]>\n    show\n    set [ghost v] effect to (100)\n    switch costume to (level 2 v)\n    wait until <touching (hitbox v)?>\n    hide\n    broadcast (Level 2 - Text 1 v) and wait\nend\nif <[3] > (Level)> then\n    wait until <(Level) = [3]>\n    broadcast (Level 3 - Text 1 v) and wait\nend\nif <[4] > (Level)> then\n    wait until <(Level) = [4]>\n    show\n    set [ghost v] effect to (100)\n    switch costume to (level 4.1 v)\n    wait until <touching (hitbox v)?>\n    switch costume to (level 4.2 v)\n    broadcast (Level 4 - Text 1 v) and wait\n    wait until <not <touching (hitbox v)?>>\n    wait until <touching (hitbox v)?>\n    broadcast (Level 4 - Text 2 v) and wait\nend\nif <[7] > (Level)> then\n    wait until <(Level) = [7]>\n    broadcast (Level 7 - Text 1 v) and wait\nend\n\nwhen I receive [activate scene  v]\nforever\n    go to [front v] layer\n    go [backward v] (5) layers\nend\n\nwhen [m v] key pressed\nstop [other scripts in sprite v]\n\n@boss\n\nwhen I receive [spawn boss v]\nwait (1) seconds\nstart sound [Grunt2 v]\npoint in direction (90)\nset rotation style [left-right v]\nshow\ngo to x: (999) y: (-125)\nclear graphic effects\nglide (2) secs to x: (130) y: (-125)\nwait (1) seconds\nrepeat until <(bossHP) = [0]>\n    wait (((bossHP) - (1)) * (0.1)) seconds\n    start sound [Snort v]\n    set [bossyv v] to [12]\n    create clone of (projectile v)\n    repeat (25)\n        change y by (bossyv)\n        change [bossyv v] by (-1)\n        if <((x position) - ([x position v] of [hitbox v])) > [-3]> then\n            change x by (-3)\n            point in direction (90)\n        end\n        if <[3] > ((x position) - ([x position v] of [hitbox v]))> then\n            point in direction (-90)\n            change x by (3)\n        end\n    end\n    if <<[140] < (x position)> or <([x position v] of [hitbox v]) < (x position)>> then\n        glide (0.1) secs to x: ((x position) + (pick random (-100) to (0))) y: (-125)\n    else\n        if <<(x position) < [-140]> or <(x position) < ([x position v] of [hitbox v])>> then\n            glide (0.1) secs to x: ((x position) + (pick random (100) to (0))) y: (-125)\n        else\n            glide (0.1) secs to x: ((x position) + (pick random (100) to (-100))) y: (-125)\n        end\n    end\nend\nplay sound [Grunt v] until done\nbroadcast (Win v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [bosshp v] to [-1]\nhide\n\nwhen I receive [die v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I start as a clone\n\nwhen I start as a clone\n\n\n\nwhen I receive [spawn boss v]\nforever\n    go to [front v] layer\nend\n\nset [cloneid v] to [1]\ncreate clone of (_myself_ v)\n\nwhen I receive [finale v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen flag clicked\nclear graphic effects\nhide\n\nglide ((((bossHP) - (1)) * (0.1)) + (0.1)) secs to x: (49) y: (-50)\n\n@Sprite1\n\nwhen I receive [spawn boss v]\nwait (1) seconds\nclear graphic effects\nshow\nswitch costume to (costume2 v)\nforever\n    go to (boss v)\n    go to [back v] layer\nend\n\nwhen I receive [die v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [win v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [finale v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen flag clicked\nhide\n\n@Animation2\n\nwhen I receive [finale v]\nwait (1) seconds\ngo to [front v] layer\ngo [backward v] (4) layers\nswitch costume to (costume1 v)\nshow\nrepeat (5)\n    wait (0.03) seconds\n    next costume\nend\nwait (1) seconds\nbroadcast (Cutscene 2 - Text 1 v) and wait\nrepeat (6)\n    wait (0.03) seconds\n    next costume\nend\ncreate clone of (_myself_ v)\nwait (1) seconds\n\nwhen flag clicked\nhide\n\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nswitch costume to (costume7 v)\nshow\nset [ghost v] effect to (100)\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\nend\nrepeat (10)\n    go to [front v] layer\n    change [brightness v] effect by (10)\nend\nbroadcast (End Credits v)\ndelete this clone\n\nwhen I receive [end credits v]\nhide\n\n@Sprite2\n\nwhen I receive [end credits v]\nchange [☁ completions v] by (1)\nshow\n\nwhen flag clicked\nhide\n\n@projectile\n\nwhen I receive [die v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I start as a clone\ngo to (boss v)\nshow\npoint towards (hitbox v)\nswitch costume to (costume3 v)\nrepeat until <<touching (hitbox v)?> or <touching (_edge_ v)?>>\n    go to [front v] layer\n    move (15) steps\nend\nif <<touching (hitbox v)?> and <(block) = [1]>> then\n    turn right (180) degrees\n    repeat until <<touching (boss v)?> or <touching (_edge_ v)?>>\n        go to [front v] layer\n        move (15) steps\n    end\n    if <touching (boss v)?> then\n        change [bosshp v] by (-1)\n        start sound [Grunt2 v]\n        if <(lives) < [11]> then\n            change [lives v] by (1)\n        end\n    end\nelse\n    if <touching (hitbox v)?> then\n        if <(lives) = [0]> then\n            broadcast (die v)\n        end\n        if <(lives) > [0]> then\n            change [lives v] by (-1)\n        end\n    end\nend\nrepeat (10)\n    change size by (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I start as a clone\n\n\n\nwhen flag clicked\nhide\n\n
リア友（@puru01010）と対決！こっちも見ろよ( ͡° ͜ʖ ͡°)\n　今負けてて草生えた＼(^o^)／そのうち追い着くさ★\n↓↓↓↓↓↓↓↓【ONLINE広場2】↓↓↓↓↓↓↓↓↓\n　　https://scratch.mit.edu/projects/596280661\n\n　　　　　⚠旗は必ず2回押してください⚠\n■■■■■↓下まで読まないと損します↓■■■■■■\n　　　めっちゃ長ーいプラットフォーマー！\n　　めっちゃ難しいです。そして時間掛かります\n　根気がない方はプレイすることをおすすめしません\n\n・長さ★★★★★+a…        　　　　（作者のやる気）\n・クォリティー★★★☆☆　　　　（  ★★★☆☆  ）\n・難易度★★★★★+a…　　　　　　難易度高い！\n■■■■■■■■■■操作方法■■■■■■■■■■■\n　　　　　　　　　　　【pc】\n・十字キー操作　　　　しゃがみなし\n\n　　　　　　　　　　【モバイル】\n・タップで操作　　　　しゃがみなし\n\npキーで軽量化を隠す、表示させることができます！\n\n■■■■■■■■■■■■■■■■■■■■■■■■■\n　　　　　クリアしたら記録されます！\n　　　　あなたはクリアできるかな？( ͡° ͜ʖ ͡°)