-Neon Platformer-   [ᴍᴏʙɪʟᴇ ꜰʀɪᴇɴᴅʟʏ ɢᴀᴍᴇ]

Instructions: ---------------------------------The Lab---------------------------\nTrapped in a futuristic lab, can you get the bottles of chemicals and escape? Watch out for the acid and spinning saws on the way!\n\nNote: Don't Worry about the intro, it says hi to everyone. XD\nNote: Down arrow to swim.\n\nCredits-\nThanks \n@Capt_Boanerges for art inspiration\n@Remix_and_Tests_Uni for my amazing PFP\n@twonerds_test for the intro\n@QuaXX for the engine\n@Griffpatch for some scripts\nand many other scratchers for inspiration!\n\nLove and Fave for a longer and harder part 2.\nCheck out- https://scratch.mit.edu/projects/442864411/\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nMy Record= 0:24\n#Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All\n#music #art #music #art #music #art #music #art #music #art #music #art #music #art #music #art #music #art #music #art #music #art #music #art 

@Stage\n\nwhen flag clicked\nset [credits v] to [0]\nset volume to (70) %\nforever\n    repeat until <(Credits) = [1]>\n        play sound [TheFatRat+-+Prelude+\(VIP+Edit+feat.+JJD\) v] until done\n    end\nend\n\nplay sound [Super Mario 3D L v] until done\n\nwhen I receive [soundcheck v]\nif <(volume) = [70]> then\n    set volume to (0) %\nelse\n    if <(volume) = [0]> then\n        set volume to (70) %\n    end\nend\n\nwhen I receive [credits v]\nset [credits v] to [1]\nstop all sounds\n\nplay sound [Collective Soul - The World I Know v] until done\n\n@Player\n\nwhen I receive [startgame v]\ngo to x: (-180) y: (0)\nset [y vel v] to [0]\nset [x vel v] to [0]\nforever\n    go to [front v] layer\n    next costume\n    wait (0) seconds\nend\n\ndefine Run\nchange y by (y vel)\nif <<<touching (level segments v)?> or <touching (locked doors v)?>> or <touching (locked doors2 v)?>> then\n    repeat ([abs v] of (y vel) )\n        if <<<touching (level segments v)?> or <touching (locked doors v)?>> or <touching (locked doors2 v)?>> then\n            change y by ((-1) * (([abs v] of (y vel) ) / (y vel)))\n        end\n    end\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<(mouse y) > [50]> and <mouse down?>>> and <not <(y vel) > [0]>>> then\n        set [y vel v] to [12]\n    else\n        set [y vel v] to [0]\n    end\nelse\n    change [y vel v] by (-1)\nend\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<(mouse x) > [50]> and <mouse down?>>> then\n    if <not <(Touching?) = [1]>> then\n        change [x vel v] by (1)\n    else\n        if <(Touching?) = [1]> then\n            change [x vel v] by (3)\n        end\n    end\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<[-50] > (mouse x)> and <mouse down?>>> then\n    if <not <(Touching?) = [1]>> then\n        change [x vel v] by (-1)\n    else\n        if <(Touching?) = [1]> then\n            change [x vel v] by (-3)\n        end\n    end\nend\nchange x by (x vel)\nif <<<touching (level segments v)?> or <touching (locked doors v)?>> or <touching (locked doors2 v)?>> then\n    set [old y v] to (y position)\n    repeat (([abs v] of (x vel) ) + (1))\n        if <<<touching (level segments v)?> or <touching (locked doors v)?>> or <touching (locked doors2 v)?>> then\n            change y by (1)\n        end\n    end\n    if <<<touching (level segments v)?> or <touching (locked doors v)?>> or <touching (locked doors2 v)?>> then\n        set y to (old y)\n        repeat ([ceiling v] of ([abs v] of (x vel) ) )\n            if <<<touching (level segments v)?> or <touching (locked doors v)?>> or <touching (locked doors2 v)?>> then\n                change x by ((-1) * (([abs v] of (x vel) ) / (x vel)))\n            end\n        end\n        set [x vel v] to [0]\n    end\nend\nif <<touching (moving spikes v)?> or <touching (gears v)?>> then\n    broadcast (Dead v)\nend\nif <touching (lvlend v)?> then\n    broadcast (LvlSetup v)\n    broadcast ((Lvl) + (1))\n    change [lvl v] by (1)\n    change [☁ total levels beaten v] by (1)\n    set [x vel v] to [0]\n    set [y vel v] to [0]\n    if <<(Lvl) = [6]> or <<(Lvl) = [8]> or >> then\n        go to x: (-200) y: (0)\n    else\n        go to x: (-180) y: (0)\n    end\nelse\n    if <<(y position) < [-179]> or <key (r v) pressed?>> then\n        broadcast (Dead v)\n    end\nend\nset [x vel v] to ((x vel) * (0.9))\n\nset [x vel v] to [0]\nset [y vel v] to [0]\ngo to x: (-180) y: (0)\n\n\n\nwhen I receive [startgame v]\nforever\n    Run\nend\n\nwhen flag clicked\nclear graphic effects\nset size to (100) %\ngo to x: (-180) y: (0)\n\nwhen I receive [dead v]\nset [x vel v] to [0]\ncreate clone of (_myself_ v)\nset [y vel v] to [0]\nif <<(Lvl) = [6]> or <<(Lvl) = [8]> or >> then\n    go to x: (-200) y: (0)\nelse\n    go to x: (-180) y: (0)\nend\nclear graphic effects\nset size to (100) %\n\nrepeat (15)\n    change x by (((-180) - (x position)) / (3))\n    change y by (((0) - (y position)) / (3))\nend\n\nrepeat (15)\n    change x by (((-180) - (x position)) / (3))\n    change y by (((0) - (y position)) / (3))\nend\ngo to x: (-180) y: (0)\n\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ngo to x: (-180) y: (-80)\nclear graphic effects\n\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ngo to x: (-180) y: (-80)\nclear graphic effects\n\nchange size by (((0) - (size)) / (3))\n\nwait until <not <<(y position) < [-179]> or <key (r v) pressed?>>>\n\nwhen I start as a clone\nshow\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen [s v] key pressed\nif <not <(Lvl) = [11]>> then\n    broadcast (LvlSetup v)\n    broadcast (Dead v)\n    broadcast ((Lvl) + (1))\n    change [lvl v] by (1)\n    set [x vel v] to [0]\n    set [y vel v] to [0]\nend\n\n@Level Segments\n\nwhen flag clicked\nset [lvl v] to [1]\nset [touchingsegment: v] to []\nhide\nbroadcast (1 v)\n\nwhen I start as a clone\nswitch costume to (join (Lvl) [-1-2])\nshow\nforever\n    switch costume to (lit v)\n    if <touching (sensor v)?> then\n        go to x: (0) y: (0)\n        switch costume to (join (join (join (Lvl) [-]) (join (ID) [-])) [1])\n        set [touchingsegment: v] to (costume [name v])\n        broadcast (Touch v)\n        start sound [On v]\n        set [brightness v] effect to (-3)\n        wait until <not <touching (sensor v)?>>\n        broadcast (TouchStopped v)\n        set [touchingsegment: v] to []\n    else\n        switch costume to (join (join (join (Lvl) [-]) (join (ID) [-])) [2])\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [1 v]\nset [id v] to [0]\nrepeat (3)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\ndelete all of [segment1 v]\nadd [1-1-2] to [segment1 v]\nadd [2-1-2] to [segment1 v]\nadd [3-1-2] to [segment1 v]\nadd [4-1-2] to [segment1 v]\nadd [5-1-2] to [segment1 v]\nadd [6-1-2] to [segment1 v]\nadd [7-1-2] to [segment1 v]\nadd [8-1-2] to [segment1 v]\nadd [9-1-2] to [segment1 v]\nadd [10-1-2] to [segment1 v]\nadd [11-1-2] to [segment1 v]\nadd [12-1-2] to [segment1 v]\nadd [13-1-2] to [segment1 v]\nadd [14-1-2] to [segment1 v]\nadd [15-1-2] to [segment1 v]\n\nwhen I receive [2 v]\nset [id v] to [0]\nrepeat (2)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [lvlsetup v]\ndelete this clone\n\nwhen I receive [3 v]\nset [id v] to [0]\nrepeat (3)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [4 v]\nset [id v] to [0]\nrepeat (3)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [5 v]\nset [id v] to [0]\nrepeat (3)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [6 v]\nset [id v] to [0]\nrepeat (3)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [7 v]\nset [id v] to [0]\nrepeat (1)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [8 v]\nset [id v] to [0]\nrepeat (3)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [9 v]\nset [id v] to [0]\nrepeat (4)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [10 v]\nset [id v] to [0]\nrepeat (4)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [11 v]\nset [id v] to [0]\nrepeat (3)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [12 v]\nset [id v] to [0]\nrepeat (0)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [13 v]\nset [id v] to [0]\nrepeat (0)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [14 v]\nset [id v] to [0]\nrepeat (0)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [15 v]\nset [id v] to [0]\nrepeat (0)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\n\n@Auora\n\nwhen flag clicked\nset size to (180) %\nset [sine v] to [0]\nforever\n    set [ghost v] effect to (70)\n    go to (player v)\n    change [sine v] by (5)\n    change size by ([sin v] of (Sine) )\nend\n\nset [ghost v] effect to (35)\n\n@Flash\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nforever\n    go to [back v] layer\nend\n\nwhen I receive [touch v]\n\nset [ghost v] effect to (100)\nset [brightness v] effect to (0)\nrepeat (5)\n    change [ghost v] effect by (-12)\n    set [brightness v] effect to (30)\nend\nset [ghost v] effect to (40)\nrepeat (20)\n    change [ghost v] effect by (5)\n    change [brightness v] effect by (-3)\nend\nset [ghost v] effect to (100)\nset [brightness v] effect to (0)\n\nchange [brightness v] effect by (5)\n\n@Simple Intro\n\ndefine Bounce to Size: (s) Speed: (sp)\nset [bounce v] to (((Bounce) * (0.7)) + (((s) - (size)) * (sp)))\nchange size by (Bounce)\n\nwhen flag clicked\nset [id2 v] to [0]\nrepeat (2)\n    change [id2 v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(ID2) = [1]> then\n    switch costume to (costume2 v)\n    show\n    go to [front v] layer\n    set size to (0) %\n    set [ghost v] effect to (80)\n    repeat (40)\n        Bounce to Size: [150] Speed: [0.2]\n        change [ghost v] effect by (-5)\n    end\n    wait (2) seconds\n    repeat (10)\n        change size by (((170) - (size)) / (7))\n    end\n    repeat (20)\n        change [ghost v] effect by (10)\n        Bounce to Size: [0] Speed: [0.2]\n    end\n    hide\n    delete this clone\nelse\n    if <(ID2) = [2]> then\n        switch costume to (costume3 v)\n        show\n        go to [front v] layer\n        go [backward v] (1) layers\n        set size to (0) %\n        set [ghost v] effect to (80)\n        repeat (40)\n            Bounce to Size: [150] Speed: [0.2]\n            change [ghost v] effect by (-5)\n        end\n        wait (2.1) seconds\n        repeat (10)\n            change size by (((170) - (size)) / (3))\n        end\n        repeat (20)\n            change [ghost v] effect by (10)\n            Bounce to Size: [0] Speed: [0.2]\n        end\n        hide\n        delete this clone\n    end\nend\n\nwhen I start as a clone\n\nif <(ID2) = [1]> then\n    switch costume to (costume2 v)\n    show\n    go to [front v] layer\n    set size to (0) %\n    set [ghost v] effect to (80)\n    repeat (40)\n        Bounce to Size: [150] Speed: [0.2]\n        change [ghost v] effect by (-5)\n    end\n    wait (2) seconds\n    repeat (20)\n        change [ghost v] effect by (10)\n        change size by (10)\n    end\n    hide\n    delete this clone\nelse\n    if <(ID2) = [2]> then\n        switch costume to (costume3 v)\n        show\n        go to [front v] layer\n        go [backward v] (1) layers\n        set size to (0) %\n        set [ghost v] effect to (80)\n        repeat (40)\n            Bounce to Size: [150] Speed: [0.2]\n            change [ghost v] effect by (-5)\n        end\n        wait (2.1) seconds\n        repeat (20)\n            change [ghost v] effect by (40)\n            change size by (20)\n        end\n        hide\n        delete this clone\n    end\nend\n\n@Backdrop\n\nwhen flag clicked\nshow\nclear graphic effects\nswitch costume to (costume5 v)\ngo to [front v] layer\ngo to x: (0) y: (0)\nwait (4.5) seconds\nbroadcast (Setup v)\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nclear graphic effects\nhide\n\n@Sensor\n\nwhen flag clicked\nforever\n    go to (player v)\n    set [ghost v] effect to (100)\nend\n\n@Box Indicators\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    show\n    switch costume to (Lvl)\n    if <<<(TouchingSegment:) = [1-3-1]> or <(TouchingSegment:) = [2-1-1]>> or <<(TouchingSegment:) = [3-2-1]> or <<(TouchingSegment:) = [4-2-1]> or <<(TouchingSegment:) = [6-1-1]> or <<(TouchingSegment:) = [7-1-1]> or <<(TouchingSegment:) = [8-2-1]> or <<(TouchingSegment:) = [9-1-1]> or <(TouchingSegment:) = [11-3-1]>>>>>>>> then\n        hide\n    else\n        show\n    end\nend\n\n@Play\n\nwhen I receive [setup v]\nset volume to (100) %\nshow\ngo to [front v] layer\ngo to x: (0) y: (55)\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (illuminated v)\n        start sound [On v]\n        broadcast (Touch v)\n        wait until <not <touching (mouse-pointer v)?>>\n    else\n        switch costume to (dark v)\n    end\nend\n\nwhen I receive [setup v]\nforever\n    point in direction ((90) + (([sin v] of (((timer) - (1)) * (150)) ) * (2.5)))\nend\n\nwhen this sprite clicked\nbroadcast (Startgame v)\nhide\nset volume to (0) %\nstop [other scripts in sprite v]\n\n@Audio\n\nwhen I receive [setup v]\nforever\n    point in direction ((90) + (([sin v] of (((timer) - (1)) * (150)) ) * (2.5)))\nend\n\nwhen I receive [setup v]\nshow\ngo to [front v] layer\ngo to x: (0) y: (-5)\nforever\n    if <touching (mouse-pointer v)?> then\n        if <(costume [number v]) = [1]> then\n            switch costume to (soundilluminated v)\n        else\n            if <(costume [number v]) = [2]> then\n                switch costume to (muteilluminated v)\n            end\n        end\n        start sound [On v]\n        broadcast (Touch v)\n        wait until <not <touching (mouse-pointer v)?>>\n    else\n        if <(costume [number v]) = [3]> then\n            switch costume to (sounddark v)\n        else\n            if <(costume [number v]) = [4]> then\n                switch costume to (mutedark v)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nswitch costume to (sounddark v)\nreset timer\n\nwhen this sprite clicked\nif <(costume [number v]) = [3]> then\n    switch costume to (muteilluminated v)\nelse\n    if <(costume [number v]) = [4]> then\n        switch costume to (soundilluminated v)\n    end\nend\nbroadcast (SoundCheck v)\n\nswitch costume to (soundilluminated v)\n\nwhen I receive [startgame v]\ngo to x: (200) y: (155)\nhide\n\n@Base Level Segment Types\n\n@LvlEnd\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (100)\n    go to x: (0) y: (0)\nend\n\n@Info Text\n\nwhen flag clicked\nset size to (100) %\nset [type v] to [Sprite]\nshow\nswitch costume to (illuminatedsign v)\ngo to x: (0) y: (0)\nforever\n    if <(Lvl) = [1]> then\n        show\n        go to x: (-60) y: (0)\n    else\n        if <(Lvl) = [2]> then\n            hide\n            go to x: (0) y: (0)\n        else\n            if <(Lvl) = [3]> then\n                show\n                go to x: (-120) y: (0)\n            else\n                if <(Lvl) = [4]> then\n                    hide\n                    go to x: (0) y: (0)\n                else\n                    if <(Lvl) = [5]> then\n                        show\n                        go to x: (-60) y: (-10)\n                    else\n                        if <(Lvl) = [6]> then\n                            hide\n                            go to x: (0) y: (0)\n                        else\n                            if <(Lvl) = [11]> then\n                                show\n                                go to x: (-120) y: (-8)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    go to [back v] layer\n    go [forward v] (1) layers\n    if <touching (player v)?> then\n        switch costume to (illuminatedsign v)\n        set [brightness v] effect to (-2)\n        create clone of (_myself_ v)\n        wait until <not <touching (player v)?>>\n    else\n        broadcast (delete v)\n        switch costume to (darksign v)\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I start as a clone\nset [type v] to [Clone]\nset [brightness v] effect to (-3)\nif <(Lvl) = [1]> then\n    show\n    go to x: (-30) y: (25)\nelse\n    if <(Lvl) = [2]> then\n        hide\n        go to x: (0) y: (0)\n    else\n        if <(Lvl) = [3]> then\n            show\n            go to x: (-90) y: (20)\n        else\n            if <(Lvl) = [4]> then\n                hide\n                go to x: (0) y: (0)\n            else\n                if <(Lvl) = [5]> then\n                    show\n                    go to x: (-30) y: (10)\n                else\n                    if <(Lvl) = [11]> then\n                        show\n                        go to x: (-90) y: (-5)\n                    end\n                end\n            end\n        end\n    end\nend\nset size to (0) %\nswitch costume to (Lvl)\nif <not <(Lvl) = [11]>> then\n    repeat (25)\n        change size by (((70) - (size)) / (5))\n    end\nelse\n    if <(Lvl) = [11]> then\n        repeat (25)\n            change size by (((50) - (size)) / (5))\n        end\n    end\nend\n\nwhen I receive [delete v]\nif <(Type) = [Clone]> then\n    repeat (5)\n        change [ghost v] effect by (20)\n        change size by (((0) - (size)) / (5))\n    end\nend\ndelete this clone\n\nif <(Type) = [Clone]> then\n    repeat (20)\nend\ndelete this clone\n\n@Confetti\n\ndefine Make confetti at (x) (y) with costume (cx) with size (s) number (n)\nrepeat (n)\n    go to x: (x) y: (y)\n    switch costume to (cx)\n    set size to (s) %\n    set [d \(1/-1\) v] to (pick random (-1.00) to (1.00))\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nhide\ngo to [back v] layer\ngo [forward v] (1) layers\n\nwhen I start as a clone\nshow\ngo to [front v] layer\ngo [forward v] (1) layers\nset [yv v] to (pick random (2) to (8))\nrepeat until <<(y position) = [-178]> or <(y position) < [-178]>>\n    change y by (Yv)\n    change [yv v] by (-1)\n    change x by ((5) * ((D \(1/-1\)) / (0.5)))\n    turn right ((5) * ((D \(1/-1\)) / (0.5))) degrees\n    if <<touching (level segments v)?> or <touching (_edge_ v)?>> then\n        set [d \(1/-1\) v] to ((D \(1/-1\)) * (-1))\n    end\nend\ndelete this clone\n\nwhen I receive [dead v]\n\nrepeat (7)\n    set [ghost v] effect to (0)\n    Make confetti at (CX) (CY) with costume (pick random (1) to (2)) with size (pick random (75) to (130)) number [1]\nend\n\nrepeat (10)\n    Make confetti at [0] [20] with costume [1] with size (pick random (160) to (210)) number []\n    set [ghost v] effect to (0)\nend\n\nwhen I receive [titlescreen v]\nforever\n    if <<<mouse down?> and <(Screen) = [TS]>> and <not <<(BTP?) = [1]> or <(BTS?) = [1]>>>> then\n        repeat (3)\n            Make confetti at (mouse x) (mouse y) with costume (pick random (1) to (4)) with size [400] number []\n        end\n        wait until <not <mouse down?>>\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(y position) > [175]> then\n        hide\n    else\n        show\n    end\nend\n\nset [cx v] to ([x position v] of [player v])\nset [cy v] to ([y position v] of [player v])\n\nwhen I receive [dead v]\ndelete this clone\n\n@Stuck Sensor\n\nwhen flag clicked\nforever\n    go to (player v)\n    set [ghost v] effect to (100)\n    if <touching (level segments v)?> then\n        broadcast (Dead v)\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\nhide\nset [ghost v] effect to (100)\nshow\ngo to [front v] layer\n\nforever\n    reset timer\n    go to x: (0) y: (-180)\nend\n\nwhen [timer v] > (0.1)\nrepeat (25)\n    change y by (((0) - (y position)) / (5))\nend\n\n@Buttons\n\nwhen flag clicked\nset size to (120) %\nhide\n\ndefine Button at (x) (y)\nswitch costume to (unpushed1 v)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nswitch costume to (unpushed1 v)\nshow\nforever\n    go to [back v] layer\n    go [forward v] (1) layers\n    if <touching (player v)?> then\n        repeat (3)\n            wait (0) seconds\n            next costume\n        end\n        broadcast (Unlock v)\n        delete this clone\n    end\nend\n\nwhen I receive [9 v]\nButton at [122] [110]\n\nwhen I receive [dead v]\nwait (0) seconds\nif <(Lvl) = [6]> then\n    Button at [-185] [116]\nend\nif <(Lvl) = [8]> then\n    Button at [32] [-75]\nend\nif <(Lvl) = [9]> then\n    Button at [122] [110]\nend\nif <(Lvl) = [10]> then\n    Button at [170] [-144]\nend\n\nwhen I receive [dead v]\ndelete this clone\n\nwhen I receive [6 v]\nButton at [-185] [116]\n\nwhen I receive [8 v]\nButton at [32] [-75]\n\nwhen I receive [10 v]\nButton at [170] [-144]\n\n@Locked Doors\n\ndefine Door at (x) (y) angle (・)\nswitch costume to (locked v)\ngo to x: (x) y: (y)\npoint in direction (・)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset size to (100) %\nhide\n\nwhen I start as a clone\nswitch costume to (locked v)\nshow\nforever\n    go to [back v] layer\n    go [forward v] (2) layers\nend\n\nwhen I receive [unlock v]\nswitch costume to (unlocked1 v)\nrepeat (3)\n    wait (0.08) seconds\n    next costume\nend\nwait (0.08) seconds\ndelete this clone\n\nwhen I receive [9 v]\nDoor at [106] [-50] angle [90]\n\nwhen I receive [dead v]\ndelete this clone\n\nwhen I receive [dead v]\nwait (0) seconds\nif <(Lvl) = [6]> then\n    Door at [195] [58] angle [90]\nend\nif <(Lvl) = [8]> then\n    Door at [93] [78] angle [90]\nend\nif <(Lvl) = [9]> then\n    Door at [106] [-50] angle [90]\nend\nif <(Lvl) = [10]> then\n    Door at [230] [42] angle [90]\nend\n\nwhen I receive [6 v]\nDoor at [195] [58] angle [90]\n\nwhen I receive [8 v]\nDoor at [93] [78] angle [90]\n\nif <(Lvl) = []> then\n    Door at [] [] angle [180]\nend\n\nwhen I receive [10 v]\nDoor at [230] [42] angle [90]\n\n@Warnings\n\nwhen flag clicked\nshow\ngo to [back v] layer\ngo [forward v] (1) layers\nforever\n    go to x: (0) y: (0)\n    switch costume to (Lvl)\n    set [ghost v] effect to (85)\nend\n\nset [ghost v] effect to (0)\n\n@Gears\n\ndefine Gear at (x) (y) costume (1/2) speed (turn) size (size) ghost (g)\ngo to x: (x) y: (y)\nswitch costume to (1/2)\nset [ghost v] effect to (g)\nset size to (size) %\nset [turnspeed v] to (turn)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nclear graphic effects\nhide\n\nwhen I start as a clone\nset [gcid v] to (costume [number v])\nshow\ngo to [back v] layer\ngo [forward v] (2) layers\nforever\n    turn right (TurnSpeed) degrees\nend\n\nif <touching color (#f7d100)?> then\n    switch costume to ((GCID) * (2))\nelse\n    switch costume to (GCID)\nend\n\nwhen I receive [lvlsetup v]\nclear graphic effects\ndelete this clone\n\nwhen I receive [1 v]\nGear at [25] [-190] costume [2] speed [2] size [100] ghost [55]\nGear at [90] [-180] costume [1] speed [-2] size [100] ghost [55]\n\nwhen I receive [8 v]\nGear at [-40] [-95] costume [2] speed [1] size [60] ghost [20]\nGear at [-40] [87] costume [2] speed [2] size [65] ghost [20]\nGear at [132] [-23] costume [2] speed [3] size [65] ghost [20]\n\nwhen I receive [3 v]\nGear at [55] [-175] costume [2] speed [2] size [80] ghost [55]\nGear at [110] [-190] costume [1] speed [-2] size [80] ghost [55]\nGear at [-22] [-185] costume [2] speed [-1] size [80] ghost [55]\n\nwhen I receive [5 v]\nGear at [-240] [-135] costume [2] speed [2] size [80] ghost [20]\nGear at [-300] [-80] costume [1] speed [-2] size [80] ghost [20]\n\nwhen I receive [4 v]\nGear at [70] [140] costume [1] speed [-1] size [100] ghost [20]\nGear at [70] [80] costume [2] speed [1] size [80] ghost [20]\n\nGear at [165] [-20] costume [2] speed [5] size [80] ghost [20]\n\nwhen I receive [2 v]\nGear at [100] [-100] costume [2] speed [5] size [65] ghost [20]\nGear at [-50] [42] costume [2] speed [5] size [65] ghost [20]\nGear at [70] [180] costume [1] speed [3] size [90] ghost [20]\n\nwhen I receive [9 v]\nGear at [-160] [70] costume [1] speed [5] size [100] ghost [20]\nGear at [160] [165] costume [2] speed [5] size [80] ghost [20]\n\nwhen I receive [7 v]\nGear at [200] [35] costume [2] speed [2] size [80] ghost [20]\nGear at [-132] [140] costume [2] speed [4] size [80] ghost [20]\n\nwhen I receive [6 v]\nGear at [-100] [82] costume [2] speed [3] size [100] ghost [20]\nGear at [175] [-130] costume [2] speed [5] size [100] ghost [20]\n\n@Restart\n\nwhen flag clicked\nhide\npoint in direction (90)\ngo to [front v] layer\nset size to (80) %\ngo to x: (-215) y: (155)\nset [move v] to [0]\nforever\n    change [move v] by (3.5)\n    if <touching (mouse-pointer v)?> then\n        switch costume to (restartlit v)\n        point in direction ((([sin v] of (Move) ) * (20)) + (90))\n    else\n        switch costume to (restartdark v)\n        turn right (((90) - (direction)) / (5)) degrees\n    end\nend\n\nwhen this sprite clicked\nbroadcast (Dead v)\n\nset x to (([tan v] of ((Move) / (2)) ) * (5))\nchange [color v] effect by (5)\nset y to (([sin v] of ((Move) * (1.5)) ) * (20))\nset size to ((([sin v] of ((Move) * (0.4)) ) * (10)) + (140)) %\n\nwhen I receive [startgame v]\nshow\n\n@Box Indicators2\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    show\n    switch costume to (Lvl)\n    if <<<(TouchingSegment:) = [1-3-1]> or <(TouchingSegment:) = [2-2-1]>> or <<(TouchingSegment:) = [3-2-1]> or <<(TouchingSegment:) = [4-2-1]> or <<(TouchingSegment:) = [6-2-1]> or <<(TouchingSegment:) = [9-4-1]> or >>>>> then\n        hide\n    else\n        show\n    end\nend\n\n@Moving Spikes\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\ndefine Spikes at (x) (y) length (length) timing (0/1/2) segment (as)\ngo to x: (x) y: (y)\nswitch costume to (length)\nset [assignedsegment v] to (as)\nset [spiketiming v] to (0/1/2)\ncreate clone of (_myself_ v)\n\nwhen I receive [lvlsetup v]\ndelete this clone\n\nwhen I start as a clone\nif <(length of (AssignedSegment)) = [5]> then\n    if <(letter (1) of (AssignedSegment)) = (Lvl)> then\n        show\n    else\n        hide\n    end\nelse\n    if <(length of (AssignedSegment)) = [6]> then\n        if <(join (letter (1) of (AssignedSegment)) (letter (2) of (AssignedSegment))) = (Lvl)> then\n            show\n        else\n            hide\n        end\n    end\nend\nwait (SpikeTiming) seconds\nforever\n    go to [back v] layer\n    if <(length of (AssignedSegment)) = [5]> then\n        if <(letter (1) of (AssignedSegment)) = (Lvl)> then\n            show\n        else\n            hide\n        end\n    else\n        if <(length of (AssignedSegment)) = [6]> then\n            if <(join (letter (1) of (AssignedSegment)) (letter (2) of (AssignedSegment))) = (Lvl)> then\n                show\n            else\n                hide\n            end\n        end\n    end\n    repeat (10)\n        change y by (-2)\n    end\n    wait (1.2) seconds\n    repeat (10)\n        change y by (2)\n    end\n    wait (0.1) seconds\nend\n\nwhen I receive [5 v]\nSpikes at [93] [-102] length [4] timing [0] segment [5-2-1]\nSpikes at [227] [-125] length [2] timing [1] segment [5-3-1]\n\nwhen I start as a clone\nforever\n    if <(TouchingSegment:) = (AssignedSegment)> then\n        switch costume to (letter (1) of (costume [name v]))\n        set [brightness v] effect to (-3)\n    else\n        switch costume to (join (letter (1) of (costume [name v])) [-2])\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [9 v]\nSpikes at [37] [-90] length [3] timing [0] segment [9-3-1]\nSpikes at [185] [-90] length [3] timing [1] segment [9-3-1]\n\nwhen I receive [6 v]\nSpikes at [-15] [-86] length [2] timing [0] segment [6-1-1]\nSpikes at [-108] [-86] length [2] timing [1] segment [6-1-1]\n\nwhen I receive [10 v]\nSpikes at [10] [-1] length [3] timing [0] segment [10-3-1]\nSpikes at [93] [-1] length [3] timing [1] segment [10-3-1]\nSpikes at [55] [-147] length [3] timing [0] segment [10-3-1]\n\n@BuildingBackground\n\nwhen flag clicked\nset [ghost v] effect to (100)\nhide\nwait (.2) seconds\nforever\n    show\n    go to [back v] layer\n    set [ghost v] effect to (85)\n    change x by (round (((([x position v] of [player v]) / (-5)) - (x position)) / (5)))\n    change y by (round (((([y position v] of [player v]) / (-5)) - (y position)) / (5)))\nend\n\nwhen I receive [end v]\nrepeat (25)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (100)\nhide\n\ngo to x: (0) y: (0)\n\n@Box Indicators3\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    show\n    switch costume to (Lvl)\n    if  then\n        hide\n    else\n        show\n    end\nend\n\n@Buttons2\n\nwhen flag clicked\nset size to (120) %\nhide\n\ndefine Button at (x) (y)\nswitch costume to (unpushed1 v)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nswitch costume to (unpushed1 v)\nshow\nforever\n    go to [back v] layer\n    go [forward v] (1) layers\n    if <touching (player v)?> then\n        repeat (3)\n            wait (0) seconds\n            next costume\n        end\n        broadcast (Unlock2 v)\n        delete this clone\n    end\nend\n\nwhen I receive [dead v]\nwait (0) seconds\nif <(Lvl) = [10]> then\n    Button at [170] [13]\nend\n\nwhen I receive [dead v]\ndelete this clone\n\nwhen I receive [10 v]\nButton at [170] [13]\n\n@Locked Doors2\n\ndefine Door at (x) (y) angle (・)\nswitch costume to (locked v)\ngo to x: (x) y: (y)\npoint in direction (・)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset size to (100) %\nhide\n\nwhen I start as a clone\nswitch costume to (locked v)\nshow\nforever\n    go to [back v] layer\n    go [forward v] (2) layers\nend\n\nwhen I receive [unlock2 v]\nswitch costume to (unlocked1 v)\nrepeat (3)\n    wait (0.08) seconds\n    next costume\nend\nwait (0.08) seconds\ndelete this clone\n\nwhen I receive [dead v]\ndelete this clone\n\nwhen I receive [dead v]\nwait (0) seconds\nif <(Lvl) = [10]> then\n    Door at [-93] [-39] angle [180]\nend\n\nwhen I receive [10 v]\nDoor at [-93] [-39] angle [180]\n\n@Skip\n\nwhen flag clicked\nhide\npoint in direction (90)\ngo to [front v] layer\nset size to (80) %\ngo to x: (215) y: (155)\nset [move v] to [0]\nforever\n    change [move v] by (3.5)\n    if <touching (mouse-pointer v)?> then\n        switch costume to (skiplit v)\n    else\n        switch costume to (skipdark v)\n    end\nend\n\nwhen this sprite clicked\nif <not <(Lvl) = [11]>> then\n    broadcast (LvlSetup v)\n    broadcast (Dead v)\n    broadcast ((Lvl) + (1))\n    change [lvl v] by (1)\n    set [x vel v] to [0]\n    set [y vel v] to [0]\nend\n\nset x to (([tan v] of ((Move) / (2)) ) * (5))\nchange [color v] effect by (5)\nset y to (([sin v] of ((Move) * (1.5)) ) * (20))\nset size to ((([sin v] of ((Move) * (0.4)) ) * (10)) + (140)) %\n\nwhen I receive [startgame v]\nshow\n\n@LOVE, FAVORITE, FOLLOW!\n\nwhen flag clicked\nhide\nforever\n    create clone of (_myself_ v)\n    wait (0.02) seconds\nend\n\nwhen I start as a clone\nset [lffpd v] to [0]\ngo to x: (pick random (-200) to (10)) y: (-110)\nset [ghost v] effect to (60)\nswitch costume to (pick random (1) to (3))\npoint in direction (pick random (-45) to (45))\nforever\n    if <<not <(Lvl) = [11]>> or <(LFFPD) > [90]>> then\n        delete this clone\n    else\n        show\n    end\n    move (1) steps\n    change [lffpd v] by (1)\n    change [ghost v] effect by (.5)\n    go to [back v] layer\nend\n\n@EndText\n\nwhen flag clicked\nset size to (80) %\ngo to x: (0) y: (35)\nhide\nforever\n    if <(Lvl) = [11]> then\n        show\n        set [brightness v] effect to (-5)\n    else\n        hide\n    end\nend\n\n