Lava - Platformer

Instructions: Sequel for my game https://scratch.mit.edu/projects/358908469/\n\npretty self explanitary.\nArrow keys, or mobile controls \nSPACE TO USE SWORD\nget the portion of the planespheric disk\nI watch scooby doo\nthere will be a sequel if this gets top loved\nI worked hard on this :3\nAdvertising gets reported

@Stage\n\nwhen I receive [reset v]\nswitch backdrop to (backdrop1 v)\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [dark v]\nswitch backdrop to (backdrop2 v)\n\nwhen I receive [transition to white v]\nwait (0.2) seconds\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [end v]\nswitch backdrop to (backdrop2 v)\n\n@blank\n\nwhen flag clicked\nwait until <key (r v) pressed?>\nif <key (r v) pressed?> then\n    wait (0.1) seconds\n    if <key (r v) pressed?> then\n        wait (0.1) seconds\n        if <key (r v) pressed?> then\n            wait (0.1) seconds\n            if <key (r v) pressed?> then\n                wait (0.1) seconds\n                if <key (r v) pressed?> then\n                    wait (0.1) seconds\n                    if <key (r v) pressed?> then\n                        wait (0.1) seconds\n                        if <key (r v) pressed?> then\n                            wait (0.1) seconds\n                            if <key (r v) pressed?> then\n                                wait (0.1) seconds\n                                if <key (r v) pressed?> then\n                                    wait (0.1) seconds\n                                    if <key (r v) pressed?> then\n                                        broadcast (hard reset v)\n                                        wait until <not <key (r v) pressed?>>\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nbroadcast (hard reset v)\n\nbroadcast (hard reset v)\n\n@intro\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\nif <(first time?) = [1]> then\n    wait (1) seconds\n    show\n    repeat until < (costume [name v]) contains [stop]?>\n        next costume\n        wait (0.13) seconds\n    end\n    wait (3) seconds\n    next costume\n    repeat until < (costume [name v]) contains [stop]?>\n        next costume\n        wait (0.13) seconds\n    end\n    wait (4) seconds\n    next costume\n    repeat until < (costume [name v]) contains [stop]?>\n        next costume\n        wait (0.13) seconds\n    end\n    wait (4) seconds\n    next costume\n    repeat until < (costume [name v]) contains [stop]?>\n        next costume\n        wait (0.13) seconds\n    end\n    wait (1) seconds\n    next costume\n    repeat until < (costume [name v]) contains [stop]?>\n        next costume\n        wait (0.13) seconds\n    end\n    wait (0) seconds\n    next costume\n    repeat until < (costume [name v]) contains [stop]?>\n        next costume\n        wait (0.13) seconds\n    end\n    hide\n    set [first time? v] to [0]\nend\nbroadcast (reset v)\n\nwhen flag clicked\nwait (0.03) seconds\nif <(first time?) = [1]> then\n    wait until <mouse down?>\n    stop [other scripts in sprite v]\n    repeat until <[28] < (costume [number v])>\n        switch costume to ((costume [number v]) + (2))\n        wait (0.07) seconds\n    end\n    repeat until < (costume [name v]) contains [stop]?>\n        next costume\n        wait (0.13) seconds\n    end\n    wait (1) seconds\n    next costume\n    repeat until <[48] < (costume [number v])>\n        next costume\n        wait (0.13) seconds\n    end\n    hide\n    set [first time? v] to [0]\n    broadcast (reset v)\nend\n\nwhen I receive [hard reset v]\nset [first time? v] to [1]\n\n@player\n\ndefine yay\nif <(delay) = [0]> then\n    if <(y) < [0]> then\n        repeat until <not <touching color (#000000)?>>\n            change y by (1)\n        end\n        set [y v] to [0]\n    else\n        repeat until <not <touching color (#000000)?>>\n            change y by ((y) * (-1))\n        end\n        set [y v] to [0]\n    end\nend\n\nwhen I receive [reset v]\nbroadcast (startdetecting v)\nset [ghost v] effect to (0)\nshow\nswitch costume to (1 v)\nset [y v] to [0]\nset [x v] to [0]\ngo to x: (-214) y: (-100)\nforever\n    go to [front v] layer\n    if <(delay) = [0]> then\n        change [y v] by (-1)\n        if <(mirror?) = [0]> then\n            if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n                change [x v] by (-1.1)\n            end\n            if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n                change [x v] by (1.1)\n            end\n        else\n            if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n                change [x v] by (1.1)\n            end\n            if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n                change [x v] by (-1.1)\n            end\n        end\n        set [x v] to ((x) * (0.85))\n        change x by (x)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (1)\n                        if <touching color (#000000)?> then\n                            change y by (1)\n                            if <touching color (#000000)?> then\n                                change y by (1)\n                                if <touching color (#000000)?> then\n                                    if <touching color (#000000)?> then\n                                        change y by (1)\n                                        if <touching color (#000000)?> then\n                                            change y by (1)\n                                            if <touching color (#000000)?> then\n                                                change y by (-8)\n                                                change x by ((x) * (-1))\n                                                set [x v] to [0]\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change y by (y)\n        if <touching color (#000000)?> then\n            yay\n        end\n        change y by (-1)\n        if <<touching color (#000000)?> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n            set [y v] to [11]\n        end\n        change y by (1)\n        if <(y position) < [-178]> then\n            if <(do not die) = [0]> then\n                wait (0.1) seconds\n                start sound [pop v]\n                repeat (5)\n                    change [ghost v] effect by (20)\n                end\n                hide\n                broadcast (reset v)\n            end\n        end\n    end\nend\n\nchange y by ((y) * (-1))\nset [y v] to [0]\n\nwhen flag clicked\nset [delay v] to [0]\nhide\n\nwhen I receive [reset v]\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\n    wait (0.01) seconds\nend\n\nwhen I receive [reset v]\nforever\n    if <(do not die) = [0]> then\n        if <touching color (#0e0000)?> then\n            wait (0.1) seconds\n            if <touching color (#0e0000)?> then\n                start sound [pop v]\n                repeat (5)\n                    change [ghost v] effect by (20)\n                end\n                hide\n                wait (0.5) seconds\n                broadcast (reset v)\n            end\n        end\n    end\nend\n\nwhen I receive [in staff room v]\nrepeat (20)\n    change x by (((210) - (x position)) / (5))\nend\n\nwhen I receive [reset v]\nforever\n    if <touching color (#ff0000)?> then\n        set [red button touched :o v] to [1]\n        stop [this script v]\n    else\n        set [red button touched :o v] to [0]\n    end\nend\n\nwhen I receive [escape scroll v]\nset [delay v] to [1]\nrepeat (30)\n    change x by (((220) - (x position)) / (4))\nend\nset [delay v] to [0]\n\nwhen I receive [reset v]\nforever\n    set [player x v] to (x position)\n    set [player y v] to (y position)\nend\n\nwhen I receive [dark v]\nset y to (0)\n\nwhen I receive [transition to white v]\nset [delay v] to [1]\nhide\n\nwhen I receive [fail v]\nset [delay v] to [1]\nhide\n\n@tutorial\n\nwhen I receive [startdetecting v]\nset [mirror? v] to [0]\nhide\nset [cloneid v] to [1]\nswitch costume to (1 v)\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [cloneid v] to [2]\nset [ghost v] effect to (0)\nswitch costume to (2 v)\ngo to x: (0) y: (-1000)\ncreate clone of (_myself_ v)\nwait until <<[-200] < (player x)> or <<(player x) < [-237]> and <(tutorial complete?) = [1]>>>\nif <<(player x) < [-237]> and <(tutorial complete?) = [1]>> then\n    broadcast (in staff room v)\n    stop [this script v]\nend\nset [cloneid v] to [3]\nswitch costume to (3 v)\ngo to x: (0) y: (-1000)\ncreate clone of (_myself_ v)\nwait until <<[180] < (player x)> and <(player y) < [-20]>>\nset [cloneid v] to [4]\nswitch costume to (4 v)\ngo to x: (10000) y: (0)\ncreate clone of (_myself_ v)\nwait (0.3) seconds\nbroadcast (cutscene \(interesting\) v) and wait\nif <not <[175] < (player x)>> then\n    set [cloneid v] to [5]\n    switch costume to (5 v)\n    go to x: (0) y: (-1000)\n    create clone of (_myself_ v)\n    wait until <[175] < (player x)>\n    wait (0.3) seconds\nend\nwait (0.1) seconds\nset [cloneid v] to [5]\nswitch costume to (5 v)\nrepeat (4)\n    change [cloneid v] by (1)\n    next costume\n    go to x: (0) y: (1000)\n    create clone of (_myself_ v)\n    wait (0.1) seconds\nend\nreset timer\nwait until <<<[0.8] < (timer)> and <[131] < (player x)>> or <<<[20] < (player x)> and <(player x) < [131]>> and <(player y) < [-60]>>>\nif <<[0.8] < (timer)> and <[131] < (player x)>> then\n    switch costume to (10 v)\n    set [cloneid v] to [10]\n    go to x: (0) y: (1000)\n    create clone of (_myself_ v)\nelse\n    switch costume to (11 v)\n    set [cloneid v] to [11]\n    go to x: (0) y: (-50)\n    create clone of (_myself_ v)\nend\nwait until <(player x) < [-50]>\nswitch costume to (12 v)\nset [cloneid v] to [12]\ngo to x: (-1000) y: (0)\ncreate clone of (_myself_ v)\nwait until <<(player x) < [-181]> and <[-10] < (player y)>>\nwait (1.5) seconds\nswitch costume to (13 v)\nset [cloneid v] to [13]\ngo to x: (1000) y: (0)\ncreate clone of (_myself_ v)\nswitch costume to (14 v)\nset [cloneid v] to [14]\ngo to x: (1000) y: (0)\ncreate clone of (_myself_ v)\nswitch costume to (15 v)\nset [cloneid v] to [15]\ngo to x: (1000) y: (0)\ncreate clone of (_myself_ v)\nwait until <[-30] < (player x)>\nreset timer\nwait until <<[5] < (timer)> or <[200] < (player x)>>\nswitch costume to (16 v)\nset [cloneid v] to [16]\ngo to x: (-1000) y: (0)\ncreate clone of (_myself_ v)\nswitch costume to (17 v)\nset [cloneid v] to [17]\ngo to x: (-1000) y: (0)\ncreate clone of (_myself_ v)\nwait until <<[0] < (player y)> and <(player x) < [-169]>>\nwait (0.5) seconds\nset [mirror? v] to [1]\nswitch costume to (18 v)\nset [cloneid v] to [18]\ngo to x: (1000) y: (0)\ncreate clone of (_myself_ v)\nwait until <<<key (right arrow v) pressed?> or <key (left arrow v) pressed?>> or <<key (a v) pressed?> or <key (d v) pressed?>>>\nwait (0.5) seconds\nswitch costume to (19 v)\nset [cloneid v] to [19]\ngo to x: (0) y: (-1000)\ncreate clone of (_myself_ v)\nwait until <<[15] < (player y)> and <[0] < (player x)>>\nset [mirror? v] to [0]\nwait (0.3) seconds\nswitch costume to (20 v)\nset [cloneid v] to [20]\ngo to x: (0) y: (-1000)\ncreate clone of (_myself_ v)\nwait until <<[30] < (player y)> and <[159] < (player x)>>\nswitch costume to (21 v)\nset [cloneid v] to [21]\ngo to x: (1000) y: (0)\ncreate clone of (_myself_ v)\nwait until <(player y) < [-100]>\nswitch costume to (22 v)\nset [cloneid v] to [22]\ngo to x: (1000) y: (0)\ncreate clone of (_myself_ v)\nwait (0.8) seconds\nbroadcast (cutscene \(end?\) v)\n\nwhen I start as a clone\nshow\nif <(cloneID) = [1]> then\n    go to [front v] layer\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    wait until <<[180] < (player x)> and <(player y) < [-20]>>\n    wait (1) seconds\n    delete this clone\nelse\n    if <(cloneID) = [2]> then\n        repeat (20)\n            change y by (((0) - (y position)) / (5))\n        end\n        wait until <<[-200] < (player x)> or <<(player x) < [-237]> and <(tutorial complete?) = [1]>>>\n        if <[-200] < (player x)> then\n            change y by (-1)\n            repeat (30)\n                change y by (((0) - (y position)) / (-5))\n            end\n            delete this clone\n        else\n            repeat (30)\n                change x by (((440) - (x position)) / (5))\n            end\n            delete this clone\n        end\n    else\n        if <(cloneID) = [3]> then\n            repeat (60)\n                change y by (((0) - (y position)) / (5))\n            end\n            wait until <<[180] < (player x)> and <(player y) < [-20]>>\n            repeat (35)\n                change y by (((-30) - (y position)) / (5))\n            end\n            delete this clone\n        else\n            if <(cloneID) = [4]> then\n                go to [front v] layer\n                repeat (10)\n                    change x by (((0) - (x position)) / (5))\n                end\n                repeat until <[175] < (player x)>\n                    change x by (((0) - (x position)) / (5))\n                end\n                repeat (30)\n                    change x by (((0) - (x position)) / (5))\n                end\n                go to x: (0) y: (0)\n                wait until <<(player x) < [-181]> and <[-10] < (player y)>>\n                set x to (0.5)\n                repeat (5)\n                    change x by (((0) - (x position)) / (-2))\n                end\n                repeat (20)\n                    change x by (((500) - (x position)) / (5))\n                end\n                delete this clone\n            else\n                if <(cloneID) = [5]> then\n                    repeat (30)\n                        change y by (((0) - (y position)) / (5))\n                    end\n                    wait until <[175] < (player x)>\n                    repeat (30)\n                        change y by (((0) - (y position)) / (-5))\n                    end\n                    delete this clone\n                else\n                    if <(cloneID) = [6]> then\n                        go to [front v] layer\n                        repeat (40)\n                            change y by (((0) - (y position)) / (5))\n                        end\n                        wait until <<(player x) < [-181]> and <[-10] < (player y)>>\n                        repeat (30)\n                            change y by (((215) - (y position)) / (5))\n                        end\n                        delete this clone\n                    else\n                        if <(cloneID) = [7]> then\n                            go to [front v] layer\n                            repeat (30)\n                                change y by (((0) - (y position)) / (5))\n                            end\n                            wait until <<(player x) < [-181]> and <[-10] < (player y)>>\n                            wait (0.5) seconds\n                            delete this clone\n                        else\n                            if <(cloneID) = [8]> then\n                                go to [front v] layer\n                                repeat (30)\n                                    change y by (((0) - (y position)) / (5))\n                                end\n                                wait until <(player x) < [-50]>\n                                repeat (20)\n                                    change x by (((-170) - (x position)) / (5))\n                                end\n                                delete this clone\n                            else\n                                if <(cloneID) = [9]> then\n                                    go to [front v] layer\n                                    repeat (30)\n                                        change y by (((0) - (y position)) / (5))\n                                    end\n                                    wait until <<(player x) < [-181]> and <[-10] < (player y)>>\n                                    wait (0.5) seconds\n                                    set y to (-0.5)\n                                    repeat (10)\n                                        change y by (((0) - (y position)) / (-2))\n                                    end\n                                    repeat (30)\n                                        change y by (((-100) - (y position)) / (5))\n                                    end\n                                    wait (1) seconds\n                                    wait until <[-187] < (player x)>\n                                    set x to (-0.5)\n                                    repeat (8)\n                                        change x by (((0) - (x position)) / (-2))\n                                    end\n                                    repeat (30)\n                                        change x by (((-60) - (x position)) / (5))\n                                    end\n                                    delete this clone\n                                else\n                                    if <(cloneID) = [10]> then\n                                        go to [front v] layer\n                                        repeat (30)\n                                            change y by (((0) - (y position)) / (5))\n                                        end\n                                    else\n                                        if <(cloneID) = [11]> then\n                                            go to [front v] layer\n                                            repeat (30)\n                                                change y by (((0) - (y position)) / (5))\n                                            end\n                                            wait until <<(player x) < [-181]> and <[-10] < (player y)>>\n                                            repeat (20)\n                                                change y by (((-40) - (y position)) / (5))\n                                            end\n                                            delete this clone\n                                        else\n                                            if <(cloneID) = [12]> then\n                                                go to [front v] layer\n                                                repeat (40)\n                                                    change x by (((0) - (x position)) / (5))\n                                                end\n                                                wait until <<(player x) < [-181]> and <[-10] < (player y)>>\n                                                repeat (20)\n                                                    change y by (((-190) - (y position)) / (5))\n                                                end\n                                                delete this clone\n                                            else\n                                                if <(cloneID) = [13]> then\n                                                    go to [front v] layer\n                                                    repeat (40)\n                                                        change x by (((0) - (x position)) / (5))\n                                                    end\n                                                    wait until <[-30] < (player x)>\n                                                    wait (0.5) seconds\n                                                    wait until <<[5] < (timer)> or <[200] < (player x)>>\n                                                    set y to (-0.5)\n                                                    repeat (10)\n                                                        change y by (((0) - (y position)) / (-2))\n                                                    end\n                                                    if <[5] < (timer)> then\n                                                        repeat (15)\n                                                            change y by (((-120) - (y position)) / (5))\n                                                        end\n                                                        delete this clone\n                                                    end\n                                                    repeat (30)\n                                                        change y by (((-480) - (y position)) / (5))\n                                                    end\n                                                else\n                                                    if <(cloneID) = [14]> then\n                                                        set rotation style [left-right v]\n                                                        go to [front v] layer\n                                                        repeat (40)\n                                                            change x by (((0) - (x position)) / (5))\n                                                        end\n                                                        wait until <[-30] < (player x)>\n                                                        wait (0.1) seconds\n                                                        wait until <<[5] < (timer)> or <[200] < (player x)>>\n                                                        turn left (180) degrees\n                                                        wait until <<[0] < (player y)> or <(player x) < [-149]>>\n                                                        wait (0.8) seconds\n                                                        repeat (3)\n                                                            change y by (((100) - (y position)) / (5))\n                                                        end\n                                                        turn left (180) degrees\n                                                        repeat (20)\n                                                            change y by (((100) - (y position)) / (5))\n                                                        end\n                                                        wait until <<[30] < (player y)> and <[40] < (player x)>>\n                                                        set x to (-0.5)\n                                                        repeat (20)\n                                                            change x by (((0) - (x position)) / (-2))\n                                                        end\n                                                        delete this clone\n                                                    else\n                                                        if <(cloneID) = [15]> then\n                                                            go to [front v] layer\n                                                            repeat (40)\n                                                                change x by (((0) - (x position)) / (5))\n                                                            end\n                                                            wait until <[-30] < (player x)>\n                                                            wait (0.5) seconds\n                                                            wait until <<[5] < (timer)> or <[200] < (player x)>>\n                                                            if <[200] < (player x)> then\n                                                                wait (5) seconds\n                                                            end\n                                                            set x to (0.5)\n                                                            repeat (15)\n                                                                change x by (((0) - (x position)) / (-2))\n                                                            end\n                                                            delete this clone\n                                                        else\n                                                            if <(cloneID) = [16]> then\n                                                                go to [front v] layer\n                                                                repeat (40)\n                                                                    change x by (((0) - (x position)) / (5))\n                                                                end\n                                                                wait until <<[0] < (player y)> or <(player x) < [-149]>>\n                                                                wait (0.7) seconds\n                                                                repeat (40)\n                                                                    change y by (((50) - (y position)) / (5))\n                                                                end\n                                                                wait until <<[30] < (player y)> and <[40] < (player x)>>\n                                                                set x to (-0.5)\n                                                                repeat (20)\n                                                                    change x by (((0) - (x position)) / (-2))\n                                                                end\n                                                                delete this clone\n                                                            else\n                                                                if <(cloneID) = [17]> then\n                                                                    go to [front v] layer\n                                                                    repeat (40)\n                                                                        change x by (((0) - (x position)) / (5))\n                                                                    end\n                                                                    wait until <<[30] < (player y)> and <[40] < (player x)>>\n                                                                    set x to (-0.5)\n                                                                    repeat (20)\n                                                                        change x by (((0) - (x position)) / (-2))\n                                                                    end\n                                                                    delete this clone\n                                                                else\n                                                                    if <(cloneID) = [18]> then\n                                                                        wait (0.4) seconds\n                                                                        go to [front v] layer\n                                                                        repeat (40)\n                                                                            change x by (((0) - (x position)) / (5))\n                                                                        end\n                                                                        wait until <<[30] < (player y)> and <[159] < (player x)>>\n                                                                        set x to (-0.5)\n                                                                        repeat (20)\n                                                                            change x by (((0) - (x position)) / (-2))\n                                                                        end\n                                                                        delete this clone\n                                                                    else\n                                                                        if <(cloneID) = [19]> then\n                                                                            go to [front v] layer\n                                                                            repeat (20)\n                                                                                change y by (((0) - (y position)) / (5))\n                                                                            end\n                                                                            wait (0.5) seconds\n                                                                            set y to (-0.5)\n                                                                            repeat (10)\n                                                                                change y by (((0) - (y position)) / (-2))\n                                                                            end\n                                                                            repeat (20)\n                                                                                change y by (((-120) - (y position)) / (5))\n                                                                            end\n                                                                            delete this clone\n                                                                        else\n                                                                            if <(cloneID) = [20]> then\n                                                                                go to [front v] layer\n                                                                                repeat (40)\n                                                                                    change y by (((0) - (y position)) / (5))\n                                                                                end\n                                                                                wait (0.5) seconds\n                                                                                set y to (-0.5)\n                                                                                repeat (10)\n                                                                                    change y by (((0) - (y position)) / (-2))\n                                                                                end\n                                                                                repeat (20)\n                                                                                    change y by (((-120) - (y position)) / (5))\n                                                                                end\n                                                                                delete this clone\n                                                                            else\n                                                                                if <(cloneID) = [21]> then\n                                                                                    go to [front v] layer\n                                                                                    repeat (40)\n                                                                                        change x by (((0) - (x position)) / (5))\n                                                                                    end\n                                                                                else\n                                                                                    if <(cloneID) = [22]> then\n                                                                                        go to [front v] layer\n                                                                                        repeat (40)\n                                                                                            change x by (((0) - (x position)) / (5))\n                                                                                        end\n                                                                                    end\n                                                                                end\n                                                                            end\n                                                                        end\n                                                                    end\n                                                                end\n                                                            end\n                                                        end\n                                                    end\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [startdetecting v]\ndelete this clone\n\nwhen I start as a clone\nif <(cloneID) = [2]> then\n    wait until <<[-200] < (player x)> or <<(player x) < [-237]> and <(tutorial complete?) = [1]>>>\n    repeat (33)\n        change [ghost v] effect by (3)\n    end\nend\n\nwhen I start as a clone\nif <(cloneID) = [5]> then\n    wait until <[175] < (player x)>\n    repeat (33)\n        change [ghost v] effect by (3)\n    end\nend\n\nwait until <[175] < (player x)>\n\n\n\nrepeat (30)\n    change y by (((0) - (y position)) / (5))\nend\n\nrepeat (30)\n    change y by (((215) - (y position)) / (5))\nend\ndelete this clone\n\nreset timer\n\nwait (2) seconds\n\nwait (2) seconds\n\nwait (2) seconds\n\n@cutscene (interesting)\n\nwhen I receive [cutscene \(interesting\) v]\nif <(first time?) = [1]> then\n    wait (1) seconds\n    show\n    switch costume to (costume2 v)\n    repeat until < (costume [name v]) contains [stop]?>\n        next costume\n        wait (0.1) seconds\n    end\n    wait (1) seconds\n    next costume\n    wait (0.1) seconds\n    repeat until < (costume [name v]) contains [stop]?>\n        next costume\n        wait (0.1) seconds\n    end\n    wait (1) seconds\n    next costume\n    wait (0.1) seconds\n    repeat until < (costume [name v]) contains [stop]?>\n        next costume\n        wait (0.1) seconds\n    end\n    wait (1) seconds\n    next costume\n    wait (0.1) seconds\n    repeat until < (costume [name v]) contains [stop]?>\n        next costume\n        wait (0.1) seconds\n    end\n    hide\n    set [first time? v] to [0]\nend\n\nwhen I receive [reset v]\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [hard reset v]\nset [first time? v] to [1]\n\n@cutscene (end?)\n\nwhen I receive [cutscene \(end?\) v]\nset [tutorial complete? v] to [1]\nswitch costume to (costume1 v)\nwait (1) seconds\ngo to [front v] layer\nshow\nrepeat (14)\n    repeat until < (costume [name v]) contains [stop]?>\n        next costume\n        wait (0.1) seconds\n    end\n    wait (1.2) seconds\n    next costume\n    wait (0.1) seconds\nend\n\nwhen I receive [reset v]\nhide\n\nwhen I receive [hard reset v]\nset [tutorial complete? v] to [0]\n\nbroadcast (hard reset v)\n\n@staff room\n\nwhen I receive [in staff room v]\nswitch costume to (transition v)\ngo to x: (-1000000) y: (0)\nshow\nrepeat (30)\n    change x by (((0) - (x position)) / (4))\nend\nswitch costume to (standard v)\nwait (0.3) seconds\nbroadcast (cutscene \(staff\) v) and wait\nwait until <(red button touched :O) = [1]>\nbroadcast (red button touched :O v) and wait\nwait until <(player x) < [-235]>\nbroadcast (escape v)\nhide\n\nwhen I receive [reset v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [in staff room v]\nwait until <(red button touched :O) = [1]>\nswitch costume to (red button activated v)\n\n@cutscene (staff room)\n\nwhen I receive [cutscene \(staff\) v]\nif <(first time?) = [1]> then\n    switch costume to (costume1 v)\n    show\n    repeat (8)\n        repeat until < (costume [name v]) contains [stop]?>\n            next costume\n            wait (0.1) seconds\n        end\n        wait (1.5) seconds\n        next costume\n        wait (0.1) seconds\n    end\n    set [first time? v] to [0]\nend\n\nwhen I receive [reset v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [hard reset v]\nset [first time? v] to [1]\n\n@cutscene (red button)\n\nwhen I receive [cutscene \(red button\) v]\nif <(first time?) = [1]> then\n    switch costume to (costume2 v)\n    show\n    repeat (15)\n        repeat until < (costume [name v]) contains [stop]?>\n            next costume\n            wait (0.1) seconds\n        end\n        wait (0.3) seconds\n        next costume\n        wait (0.1) seconds\n    end\n    set [first time? v] to [0]\nend\n\nwhen flag clicked\nhide\n\nwhen [x v] key pressed\n\nwhen I receive [reset v]\nhide\n\nwhen I receive [hard reset v]\nset [first time? v] to [1]\n\n@self destruct\n\nwhen I receive [red button touched :o v]\nset [ghost v] effect to (100)\nswitch costume to (costume1 v)\ngo to x: (0) y: (1000)\nshow\nrepeat (25)\n    change y by (((0) - (y position)) / (5))\n    change [ghost v] effect by (-4)\nend\nwait (0.5) seconds\nrepeat (25)\n    change y by (((0) - (y position)) / (-5))\n    change [ghost v] effect by (4)\nend\nbroadcast (cutscene \(red button\) v) and wait\nbroadcast (countdown v)\n\nwhen I receive [reset v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [countdown v]\nset [ghost v] effect to (100)\nswitch costume to (costume32 v)\ngo to x: (0) y: (1000)\nshow\nrepeat (25)\n    change y by (((0) - (y position)) / (5))\n    change [ghost v] effect by (-4)\nend\nwait (0.3) seconds\nrepeat (10)\n    next costume\n    wait (1) seconds\nend\nrepeat (25)\n    change y by (((0) - (y position)) / (-5))\n    change [ghost v] effect by (4)\nend\nhide\nwait (39) seconds\nbroadcast (fail v)\n\nwhen I receive [countdown v]\nforever\n    go to [front v] layer\nend\n\n@escape\n\nwhen I receive [escape v]\nset [brightness v] effect to (0)\nset [do not die v] to [1]\nswitch costume to (level 1 v)\ngo to x: (-480) y: (0)\ngo to [front v] layer\nshow\nbroadcast (escape scroll v)\nrepeat (30)\n    change x by (((0) - (x position)) / (4))\nend\nwait until <(player x) < [-235]>\nbroadcast (escape scroll v)\ngo to x: (-480) y: (0)\nswitch costume to (level 2 transition v)\nrepeat (30)\n    change x by (((0) - (x position)) / (4))\nend\ncreate clone of (_myself_ v)\nswitch costume to (level 2 v)\nwait until <(player y) < [-175]>\nrepeat (10)\n    change y by (((60) - (y position)) / (2))\n    change [brightness v] effect by (-7)\nend\nbroadcast (dark v)\nswitch costume to (dark 1 v)\nset [brightness v] effect to (0)\ngo to x: (0) y: (0)\nwait (0.1) seconds\ngo to [front v] layer\nwait until <(player x) < [-235]>\nswitch costume to (dark 2 v)\nbroadcast (escape scroll v)\ngo to x: (-480) y: (0)\nrepeat (30)\n    change x by (((0) - (x position)) / (4))\nend\nwait until <(player x) < [-235]>\nswitch costume to (dark 3 v)\nbroadcast (escape scroll v)\ngo to x: (-480) y: (0)\nrepeat (30)\n    change x by (((0) - (x position)) / (4))\nend\nwait until <(player x) < [-235]>\nswitch costume to (dark 4 v)\nbroadcast (escape scroll v)\ngo to x: (-480) y: (0)\nrepeat (30)\n    change x by (((0) - (x position)) / (4))\nend\nwait until <<(player x) < [-158]> and <[170] < (player y)>>\nbroadcast (transition to white v)\nswitch costume to (transition v)\ngo to x: (0) y: (812)\nrepeat (20)\n    change y by (((0) - (y position)) / (5))\nend\nhide\nbroadcast (cutscene \(ending 1\) v)\n\nwhen I receive [reset v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nswitch costume to (falling platform v)\ngo to [front v] layer\nwait until <<(player x) < [-111]> and <[-20] < (player y)>>\nchange y by (-0.5)\nrepeat (15)\n    change y by (((0) - (y position)) / (-2))\nend\ndelete this clone\n\nwhen I receive [reset v]\nset [do not die v] to [0]\n\n@light\n\nwhen I receive [dark v]\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\nwait (0.5) seconds\nrepeat (25)\n    go to x: (player x) y: (player y)\n    change [ghost v] effect by (-4)\nend\nforever\n    go to x: (player x) y: (player y)\nend\n\nwhen I receive [reset v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [dark v]\nset size to (100) %\nset [var v] to [0]\nforever\n    repeat (314)\n        change size by ((0.1) * ([sin v] of (var) ))\n        change [var v] by (1)\n    end\n    set size to (100) %\n    set [var v] to [0]\nend\n\nwhen I receive [transition to white v]\nhide\n\n@cutscene (ending 1)\n\nwhen I receive [cutscene \(ending 1\) v]\nset [ended v] to [1]\ngo to [front v] layer\nset [brightness v] effect to (0)\ngo to x: (0) y: (-10000)\nswitch costume to (costume1 v)\nshow\nrepeat (30)\n    change y by (((0) - (y position)) / (5))\nend\nwait (1) seconds\nrepeat until < (costume [name v]) contains [stop]?>\n    next costume\n    wait (0.05) seconds\nend\nwait (0.5) seconds\nnext costume\nwait (0.05) seconds\nrepeat until < (costume [name v]) contains [stop]?>\n    next costume\n    wait (0.05) seconds\nend\nwait (2) seconds\nnext costume\nwait (0.05) seconds\nstart sound [explode v]\nrepeat until < (costume [name v]) contains [stop]?>\n    next costume\n    wait (0.1) seconds\nend\nwait (2) seconds\nbroadcast (end v)\nwait (5) seconds\nhide\n\nwhen I receive [reset v]\nset [ended v] to [0]\nhide\n\nwhen flag clicked\nset [ended v] to [0]\nhide\n\nwhen I receive [fail v]\nif <(ended) = [0]> then\n    go to [front v] layer\n    set [brightness v] effect to (0)\n    go to x: (0) y: (-100000)\n    switch costume to (stop 4 v)\n    show\n    repeat (30)\n        change y by (((0) - (y position)) / (5))\n    end\n    wait (1) seconds\n    if <(ended) = [0]> then\n        next costume\n        wait (0.05) seconds\n        start sound [explode v]\n        repeat until < (costume [name v]) contains [stop]?>\n            next costume\n            wait (0.1) seconds\n        end\n        set [brightness v] effect to (-100)\n        wait (0.5) seconds\n        switch costume to (costume31 v)\n        repeat (10)\n            change [brightness v] effect by (10)\n            wait (0.05) seconds\n        end\n    end\nend\n\nrepeat (30)\n    change y by (((0) - (y position)) / (5))\nend\nwait (1) seconds\nrepeat until < (costume [name v]) contains [stop]?>\n    next costume\n    wait (0.05) seconds\nend\nwait (0.5) seconds\nnext costume\nwait (0.05) seconds\nrepeat until < (costume [name v]) contains [stop]?>\n    next costume\n    wait (0.05) seconds\nend\nwait (2) seconds\nnext costume\nwait (0.05) seconds\nstart sound [explode v]\nrepeat until < (costume [name v]) contains [stop]?>\n    next costume\n    wait (0.1) seconds\nend\nwait (2) seconds\nbroadcast (end v)\nwait (5) seconds\nhide\n\n@end\n\nwhen I receive [end v]\ngo to [front v] layer\ngo to x: (0) y: (-10000)\nswitch costume to (costume1 v)\nshow\nrepeat (30)\n    change y by (((0) - (y position)) / (5))\nend\nrepeat (10)\n    wait until <mouse down?>\n    wait until <not <mouse down?>>\n    set x to (-0.5)\n    repeat (20)\n        change x by (((0) - (x position)) / (-2))\n    end\n    next costume\n    set x to (1000000)\n    repeat (40)\n        change x by (((0) - (x position)) / (5))\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [reset v]\nhide\n\n@bg music\n\nwhen flag clicked\nset volume to (100) %\nforever\n    play sound [Nighttime Strol v] until done\nend\n\nwhen I receive [in staff room v]\nrepeat (10)\n    change volume by (-10)\n    wait (0.2) seconds\nend\nset volume to (0) %\n\nwhen I receive [dark v]\nstop [other scripts in sprite v]\nset volume to (50) %\nplay sound [Nyoko - Flowing Into The Darkness v] until done\n\nwhen I receive [fail v]\nrepeat (10)\n    change volume by (-10)\n    wait (0.2) seconds\nend\nset volume to (0) %\nstop [other scripts in sprite v]\n\nwhen I receive [cutscene \(ending 1\) v]\nrepeat (10)\n    change volume by (-10)\n    wait (0.2) seconds\nend\nset volume to (0) %\nstop [other scripts in sprite v]\n\n@tn\n\nwhen flag clicked\nhide\n\ngo to [front v] layer\nclear graphic effects\nshow\n\n