Twins || A platformer || #games #art #music

Instructions: Arrow keys - Blue\nWASD - Red\n––\nAᴄᴄᴏᴜɴᴛꜱ:\nMain: @jindalsargun\nAlt: @sargunjindal\n––\nMusic: Ticking\n––\nYou might like this one :)\nhttps://scratch.mit.edu/projects/645837822/\n––\n@ᴘɪᴢᴢᴀʀᴜꜱʜ for the intro\nRest all by me :)\n––\nTᴀɢꜱ:\n#all #game #games #art #music #stories\n#jindalsargun #sargunjindal #platformer #platformers #pizzarush #madrid2030 #contest #entry #level #levels #player #spikes #music #green #purple #red #black #spike #spikes #lava #water #tampoline #trampolines #bounce #pads #moving #key #lock #trend #trending #portals #portal #teleportal #fun #cool #teleporters #ground  #arrowkeys #ungeneric #WASD #explore #thumbnail #backdrop #sprite #twins #2\n#be #happy #and #do #not #look #at #tags\n––\nNot my best platformer but I kind of like it xD\nVery nice ratio there is. Likes to views XD 

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop2 v)\n\nwhen I receive [start v]\nswitch backdrop to (backdrop1 v)\nforever\n    play sound [Ticking v] until done\nend\n\n@Intro \n\ndefine 🎥 Disable from Cam Control? <disable?>\nif <disable?> then\n    set [enabled? v] to [0]\nelse\n    set [enabled? v] to [1]\nend\n\ndefine Play Intro\nSet size to [100] %\npoint in direction (90)\ngo to x: (0) y: (0)\nset rotation style [all around v]\nhide\ndelete all of [\[intro\] cam x/y/z/r v]\nrepeat (4)\n    add [0] to [\[intro\] cam x/y/z/r v]\nend\nset [costume v] to [blank]\nset [\[intro\] keyframe v] to [1]\n🎥 Move cam to [0] [0] [0] [0]\n🎥 Transition x/y/z/s/r [0] [0] [1] [100] [90] speed: [1]\n🎥 Disable from Cam Control? \n🖼 Set effects c/b/g [0] [0] [0]\nClone same sprite [controller] spec: [0] [0] [0]\nClone sprites [1] [1]\nClone same sprite [100] [1]\nClone same sprite [SF] spec: [0] [0] [100]\nswitch costume to (text v)\nbroadcast (\[Intro\] listen for keyframes v)\nreset timer\nclear sound effects\nplay sound [Kudasai - Technicolor v] until done\nbroadcast (\[Intro\] delete clones v)\nwait (1) seconds\nbroadcast (Start v)\nstop [other scripts in sprite v]\n\ndefine Set pos zrot: (x) (y) rot: (r) trans: (tx) (ty) scalar: (c)\nset [x v] to ((tx) + ((c) * ((([cos v] of (r) ) * (x)) - (([sin v] of (r) ) * (y)))))\nset [y v] to ((ty) + ((c) * ((([sin v] of (r) ) * (x)) + (([cos v] of (r) ) * (y)))))\n\ndefine 🎥 Cam set x/y/z/r (item) to: (val)\nreplace item (item) of [\[intro\] cam x/y/z/r v] with (val)\n\ndefine ⏱ Keyframe (keyframe)\nif <(\[Intro\] Keyframe) > (keyframe)> then\n\ndefine 🎥 Transition x/y/z/s/r (x) (y) (z) (s) (r) speed: (t)\nchange [x v] by (((round (x)) - (round (x))) / (t))\nchange [y v] by (((round (y)) - (round (y))) / (t))\nchange [z v] by (((round (z)) - (round (z))) / (t))\nchange [size v] by (((round (s)) - (round (size))) / (t))\nTransition direction (r) speed: (t)\n\nwhen I start as a clone\nif <(clone_id) = [controller]> then\n    🖼 Set effects c/b/g [0] [0] [100]\n    set [_v1 v] to [0]\n    set [_v2 v] to [0]\n    set [_v3 v] to [0]\n    set [_v4 v] to [8]\n    set [_v5 v] to [0]\n    \n        🎥 Cam set x/y/z/r [1] to: ((_v1) * ([sin v] of (_v2) ))\n        🎥 Cam set x/y/z/r [2] to: ((_v1) * ([cos v] of (_v3) ))\n        set [_v1 v] to ((_v1) * (.85))\n        change [_v2 v] by (40)\n        change [_v3 v] by (30)\n    end\nend\n\ndefine Clone sprites (id) (count)\nset [clone_id v] to (id)\nrepeat (count)\n    create clone of (_myself_ v)\n    change [clone_id v] by (1)\nend\nset [clone_id v] to [0]\n\ndefine Clone same sprite (id) (count)\nset [clone_val v] to [1]\nset [clone_id v] to (id)\nrepeat (count)\n    create clone of (_myself_ v)\n    change [clone_val v] by (1)\nend\nset [clone_id v] to [0]\n\nwhen I receive [\[intro\] keyframe signal v]\nif <(clone_id) = [controller]> then\n    set [_v1 v] to [0]\nend\n\nwhen I receive [\[intro\] listen for keyframes v]\nif <(clone_id) = [0]> then\n    repeat until <(\[Intro\] Keyframe) > (length of [keyframes v])>\n        wait until <(timer) > ((-.25) + (item (\[Intro\] Keyframe) of [keyframes v]))>\n        broadcast (\[Intro\] keyframe signal v)\n        change [\[intro\] keyframe v] by (1)\n    end\nend\n\ndefine 💥 Gradient shockwave\nClone same sprite [GS] [1]\n\ndefine 💥 Shockwave (x) (y) (s) (speed)\nset [_v1 v] to (s)\nset [_v3 v] to (speed)\nClone same sprite [S] spec: (x) (y) [0]\n\nwhen I start as a clone\nif <(clone_id) = [SF]> then\n    set [_v1 v] to [0]\n    \n        🖼 Set effects c/b/g [0] [100] ((100) - (_v1))\n        set [_v1 v] to ((_v1) * (.85))\n    end\nend\n\nwhen I receive [\[intro\] keyframe signal v]\nif <(clone_id) = [SF]> then\n    switch costume to (screen v)\n    Transition positions [0] [0] [100] speed: [1]\n    Transition direction [90] speed: [1]\n    go to [front v] layer\n    set [_v1 v] to [30]\n    delete this clone\nend\n\ndefine 🎥 Move cam to (x) (y) (z) (r)\nreplace item (1) of [\[intro\] cam x/y/z/r v] with (x)\nreplace item (2) of [\[intro\] cam x/y/z/r v] with (y)\nreplace item (3) of [\[intro\] cam x/y/z/r v] with (z)\nreplace item (4) of [\[intro\] cam x/y/z/r v] with (r)\n\nwhen I start as a clone\nif <(clone_id) = [SW]> then\n    Transition direction (direction) speed: [1]\n    Set size to [5000] %\n    switch costume to (join [shockwave1/] ((360) / (_v2)))\n    Transition positions (x) (y) (size) speed: [1]\n    set [_v1 v] to [0]\n    repeat ((3.2) * (costume))\n        Transition positions (x) (y) (_v5) speed: (_v3)\n        Transition direction ((direction) + (_v4)) speed: (_v3)\n        set [fisheye v] effect to (([ceiling v] of (([tan v] of (_v1) ) * (68.6)) ) * (_v1))\n        change [_v1 v] by (((round (90)) - (round (_v1))) / ((5) * (costume)))\n    end\n    repeat ((.8) * (costume))\n        Transition positions (x) (y) (_v5) speed: (_v3)\n        Transition direction ((direction) + (_v4)) speed: (_v3)\n        change [ghost v] effect by ((5) * (costume))\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(clone_id) = [CE]> then\n    switch costume to (join [circle] [explosion])\n    set [_v2 v] to [0]\n    repeat ((3.6) * (costume))\n        Transition positions ((x) + ((_v2) * ([sin v] of (direction) ))) ((y) + ((_v2) * ([cos v] of (direction) ))) (size) speed: [1]\n        Transition direction ((_v4) + (direction)) speed: (_v3)\n        change [_v2 v] by (((_v5) - (_v2)) / (_v3))\n        change [size v] by (((0) - (size)) / ((1.7) * (_v3)))\n    end\n    repeat ((.8) * (costume))\n        Transition positions ((x) + ((_v2) * ([sin v] of (direction) ))) ((y) + ((_v2) * ([cos v] of (direction) ))) (size) speed: [1]\n        Transition direction ((_v4) + (direction)) speed: (_v3)\n        change [_v2 v] by (((_v5) - (_v2)) / (_v3))\n        change [size v] by (((0) - (size)) / (_v3))\n        change [ghost v] effect by ((125) / (_v3))\n    end\n    delete this clone\nend\n\ndefine Change size by: (s) costume ph: (ph)\nSet size to ((size) + (s)) %\nswitch costume to (ph)\n\nwhen I start as a clone\nhide\ngo to [front v] layer\nif <(clone_id) = ((clone_id) * (1))> then\n    forever\n        if <(enabled?) = [1]> then\n            Set size to [99999999999] %\n            set x to (((x) - (item (1) of [\[intro\] cam x/y/z/r v])) * (((item (3) of [\[intro\] cam x/y/z/r v]) / (z)) + (1)))\n            set y to (((y) - (item (2) of [\[intro\] cam x/y/z/r v])) * (((item (3) of [\[intro\] cam x/y/z/r v]) / (z)) + (1)))\n            Set size to ((size) * (((item (3) of [\[intro\] cam x/y/z/r v]) / (z)) + (1))) %\n            switch costume to (costume)\n        else\n            Set size to [99999999999] %\n            set x to (x)\n            set y to (y)\n            Set size to (size) %\n            switch costume to (costume)\n        end\n        🖼 Set effects c/b/g (color) (brightness) (ghost)\n    end\nelse\n    Transition positions (x) (y) (size) speed: [1]\n    Transition direction (direction) speed: [1]\n    🖼 Set effects c/b/g (color) (brightness) (ghost)\n    🎥 Disable from Cam Control? \n    go [backward v] (3) layers\n    show\nend\n\ndefine Transition direction (r) speed: (t)\nturn right (((round (r)) - (round (direction))) / (t)) degrees\n\ndefine Set size to (size) %\nif <[100] > (size)> then\n    switch costume to (screen v)\nelse\n    switch costume to (blank v)\nend\nset size to (size) %\nswitch costume to (screen v)\n\ndefine Clone same sprite (id) spec: (x) (y) (s)\nset [clone_id v] to (id)\nset [x v] to (x)\nset [y v] to (y)\nset [size v] to (s)\ncreate clone of (_myself_ v)\nset [clone_id v] to [0]\n\ndefine 💥 Line explosion (x) (y) (s) (r) (zrot) (spread) (speed) (framespeed) (rot) (count)\nset [_v5 v] to (r)\nset [direction v] to (zrot)\nset [_v4 v] to (rot)\nset [_v3 v] to (speed)\nset [costume v] to (framespeed)\nrepeat (count)\n    Clone same sprite [LE] spec: (x) (y) (s)\n    change [direction v] by ((spread) / (count))\nend\n\nwhen I start as a clone\nif <(clone_id) = [LE]> then\n    set [_v1 v] to [1]\n    set [_v2 v] to [0]\n    repeat ((3.6) * (costume))\n        switch costume to (join [lineexplosion] (round (_v1)))\n        Transition positions ((x) + ((_v2) * ([sin v] of (direction) ))) ((y) + ((_v2) * ([cos v] of (direction) ))) (size) speed: [1]\n        Transition direction ((_v4) + (direction)) speed: (_v3)\n        change [_v2 v] by (((_v5) - (_v2)) / (_v3))\n        change [_v1 v] by (((round (11)) - (round (_v1))) / (costume))\n    end\n    repeat ((.8) * (costume))\n        switch costume to (join [lineexplosion] (round (_v1)))\n        Transition positions ((x) + ((_v2) * ([sin v] of (direction) ))) ((y) + ((_v2) * ([cos v] of (direction) ))) (size) speed: [1]\n        Transition direction ((_v4) + (direction)) speed: (_v3)\n        change [_v2 v] by (((_v5) - (_v2)) / (_v3))\n        change [_v1 v] by (((round (11)) - (round (_v1))) / (costume))\n        change [ghost v] effect by ((125) / (_v3))\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(clone_id) = [SE]> then\n    set [_v1 v] to [1]\n    set [_v2 v] to [0]\n    repeat until <(round (_v1)) = [22]>\n        switch costume to (join [splineexplosion] (round (_v1)))\n        Transition positions ((x) + ((_v2) * ([sin v] of (direction) ))) ((y) + ((_v2) * ([cos v] of (direction) ))) (size) speed: [1]\n        Transition direction ((_v4) + (direction)) speed: (_v3)\n        change [_v1 v] by ((5) / (costume))\n        change [_v2 v] by (((_v5) - (_v2)) / (_v3))\n    end\n    delete this clone\nend\n\ndefine 💥 Spline explosion (x) (y) (s) (r) (zrot) (spread) (speed) (framespeed) (rot) (count)\nset [_v5 v] to (r)\nset [direction v] to (zrot)\nset [_v4 v] to (rot)\nset [_v3 v] to (speed)\nset [costume v] to (framespeed)\nrepeat (count)\n    Clone same sprite [SE] spec: (x) (y) ((s) / (5))\n    change [direction v] by ((spread) / (count))\nend\n\ndefine 🖼 Set effects c/b/g (c) (b) (g)\nset [color v] to (c)\nset [brightness v] to (b)\nset [ghost v] to (g)\nset [color v] effect to (color)\nset [brightness v] effect to (brightness)\nset [ghost v] effect to (ghost)\n\ndefine 💥 Circle explosion (x) (y) (s) (r) (zrot) (spread) (speed) (framespeed) (rot) (count)\nset [_v5 v] to (r)\nset [direction v] to (zrot)\nset [_v4 v] to (rot)\nset [_v3 v] to (speed)\nset [costume v] to (framespeed)\nrepeat (count)\n    Clone same sprite [CE] spec: (x) (y) (s)\n    change [direction v] by ((spread) / (count))\nend\n\ndefine Transition positions (x) (y) (z) speed: (t)\nchange x by (((round (x)) - (round (x position))) / (t))\nchange y by (((round (y)) - (round (y position))) / (t))\nChange size by: (((round (z)) - (round (size))) / (t)) costume ph: (costume [name v])\n\ndefine 💥 Shockwave (x) (y) (s) (r) (zrot) (spread) (speed) (framespeed) (rot) (count)\nset [_v5 v] to (r)\nset [direction v] to (zrot)\nset [_v4 v] to (rot)\nset [_v3 v] to (speed)\nset [_v2 v] to (spread)\nset [costume v] to (framespeed)\nrepeat (count)\n    Clone same sprite [SW] spec: (x) (y) (s)\n    change [direction v] by ((360) / (count))\nend\n\nwhen I start as a clone\nif <(clone_id) = [GS]> then\n    🖼 Set effects c/b/g (color) [50] [0]\n    Transition positions [0] [0] [0] speed: [1]\n    switch costume to (gradientshock v)\n    repeat (25)\n        change [ghost v] effect by (4)\n        Transition positions [0] [0] [575] speed: [7]\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(clone_id) = [S]> then\n    switch costume to (shock v)\n    repeat until <(ghost) > [99]>\n        set [ghost v] effect to (ghost)\n        change [ghost v] by (((100) - (round (ghost))) / (_v3))\n        Transition positions (x) (y) (_v1) speed: (_v3)\n    end\n    delete this clone\nend\n\ndefine 💥 Sparkle explosion (x) (y) (s) (r) (zrot) (spread) (speed) (framespeed) (rot) (count)\nrepeat (count)\n    set [_v3 v] to (pick random (5) to (speed))\n    set [_v4 v] to (pick random (20) to (40))\n    set [costume v] to (pick random (10) to (30))\n    Clone same sprite [SP] spec: (pick random ((0) - (x)) to (x)) (pick random ((0) - (y)) to (y)) (pick random ((s) / (2.5)) to ((s) * (1.1)))\nend\n\nwhen I start as a clone\nif <(clone_id) = [SP]> then\n    Transition positions [0] [0] (size) speed: [1]\n    Transition direction [90] speed: [1]\n    switch costume to (sparkle v)\n    set [_v1 v] to [10]\n    set [_v2 v] to [0]\n    set [_v5 v] to [0]\n    set [z v] to [.9]\n    repeat until <[1] > (_v1)>\n        set [fisheye v] effect to ((5) * (round (((-45) + ((-45) * ([abs v] of ([sin v] of (_v2) ) ))) / (5))))\n        change [_v1 v] by (((0) - (round (_v1))) / (costume))\n        change [_v2 v] by (_v4)\n        Transition positions (x) (y) (((size) / (100)) * (((50) * ([sin v] of (_v2) )) + ([abs v] of (([sin v] of (_v2) ) * ((_v1) * (costume))) ))) speed: (_v3)\n    end\n    delete this clone\nend\n\nwhen I receive [\[intro\] delete clones v]\ndelete this clone\n\ndefine Setup\nstop [other scripts in sprite v]\nrepeat (1)\n    delete this clone\nend\n🖼 Set effects c/b/g [0] [0] [100]\nshow\nreset timer\nSet size to ([tan v] of (90) ) %\ngo to x: (-050000000000) y: (0)\nSet size to [1000] %\nswitch costume to (round (65))\nrepeat until <(costume [number v]) = [1]>\n    next costume\nend\nhide\n\ndefine 💥 Scattered shockwave explosion\nrepeat (10)\n    💥 Shockwave [0] [0] [50] (pick random (190) to (280)) (pick random (-180) to (180)) [45] (pick random (5) to (7)) (pick random (7) to (10)) [0] [1]\nend\n\nwhen I receive [\[intro\] listen for keyframes v]\nif <(clone_id) = [0]> then\n    ⏱ Keyframe [1]\n    🖼 Set effects c/b/g [0] [-100] [0]\nend\n\nwhen I start as a clone\nif <(clone_id) = [100]> then\n    🎥 Transition x/y/z/s/r [0] [0] [1] [1000] [90] speed: [1]\n    🎥 Disable from Cam Control? <>\n    🖼 Set effects c/b/g ((1) / (0)) [0] [100]\n    set [costume v] to [text]\n    ⏱ Keyframe [1]\n    show\n    set [_v1 v] to [0]\n    set [_v2 v] to [0]\n    set [_v3 v] to [0]\n    set [_v4 v] to [0]\n    set [_v5 v] to [40]\n    repeat until <(\[Intro\] Keyframe) > [5]>\n        set [x v] to ((_v5) * ([sin v] of (_v2) ))\n        set [y v] to ((_v5) * ([cos v] of (_v2) ))\n        change [size v] by (((round (110)) - (round (size))) / (5))\n        change [_v5 v] by (((_v3) - (_v5)) / (4))\n        set [_v3 v] to ((_v3) * (.85))\n        set [_v1 v] to ((_v1) * (.9))\n        change [_v2 v] by (40)\n        change [ghost v] by (-4)\n    end\n    ⏱ Keyframe [5]\n    set [ghost v] to [0]\n    \n        change [y v] by (((y) - (2)) / (5))\n        change [ghost v] by (5)\n    end\nend\n\ndefine Clone radial (x) (y) (s) (r) (fisheye) (frame)\nset [x v] to (x)\nset [y v] to (y)\nset [size v] to (s)\nset [direction v] to (r)\nset [_v4 v] to (f)\nset [_v5 v] to (frame)\nClone same sprite [2] [1]\n\nwhen I start as a clone\nif <(clone_id) = [1]> then\n    🎥 Transition x/y/z/s/r [0] [0] [1] [100] [90] speed: [1]\n    🎥 Disable from Cam Control? \n    🖼 Set effects c/b/g [0] [0] [100]\n    set [costume v] to [bg]\n    wait (.5) seconds\n    show\n    repeat (20)\n        change [ghost v] by (-5)\n    end\n    🎥 Transition x/y/z/s/r [0] [0] [1] [100] [90] speed: [1]\n    ⏱ Keyframe [2]\n    wait (.1) seconds\n    repeat until <(\[Intro\] Keyframe) > [3]>\n        change [brightness v] by (((round (-100)) - (round (brightness))) / (10))\n    end\n    wait (.1) seconds\n    repeat until <(\[Intro\] Keyframe) > [4]>\n        change [brightness v] by (((round (0)) - (round (brightness))) / (10))\n    end\n    ⏱ Keyframe [5]\n    \n        change [y v] by (((y) - (2)) / (5))\n        change [ghost v] by (1)\n    end\nend\n\nwhen I receive [\[intro\] listen for keyframes v]\nif <(clone_id) = [controller]> then\n    ⏱ Keyframe [1]\n    set [_v4 v] to [0]\n    set [_v5 v] to [0]\n    repeat until <(\[Intro\] Keyframe) > [2]>\n        change [_v5 v] by ((1) / (-200))\n        🎥 Cam set x/y/z/r [3] to: ((_v4) + (_v5))\n    end\n    repeat (5)\n        change [_v4 v] by ((1) / (50))\n        🎥 Cam set x/y/z/r [3] to: ((_v4) + (_v5))\n    end\n    repeat until <(\[Intro\] Keyframe) > [3]>\n        change [_v4 v] by (((.6) - (_v4)) / (7))\n        change [_v5 v] by ((1) / (200))\n        🎥 Cam set x/y/z/r [3] to: ((_v4) + (_v5))\n    end\n    repeat (5)\n        change [_v4 v] by ((1) / (-25))\n        🎥 Cam set x/y/z/r [3] to: ((_v4) + (_v5))\n    end\n    repeat until <(\[Intro\] Keyframe) > [4]>\n        change [_v4 v] by (((-.2) - (_v4)) / (8))\n        change [_v5 v] by ((1) / (-200))\n        🎥 Cam set x/y/z/r [3] to: ((_v4) + (_v5))\n    end\n    repeat (5)\n        change [_v4 v] by ((1) / (30))\n        🎥 Cam set x/y/z/r [3] to: ((_v4) + (_v5))\n    end\n    repeat until <(\[Intro\] Keyframe) > [5]>\n        change [_v4 v] by (((.1) - (_v4)) / (9))\n        change [_v5 v] by ((1) / (200))\n        🎥 Cam set x/y/z/r [3] to: ((_v4) + (_v5))\n    end\nend\n\nwhen I receive [\[intro\] keyframe signal v]\nif <(clone_id) = [100]> then\n    set [_v3 v] to [10]\nend\n\nwhen I start as a clone\nif <(clone_id) = [100]> then\n    ⏱ Keyframe [2]\n    repeat until <(\[Intro\] Keyframe) > [3]>\n        change [brightness v] by (((round (100)) - (round (brightness))) / (10))\n    end\n    repeat until <(\[Intro\] Keyframe) > [4]>\n        change [brightness v] by (((round (-100)) - (round (brightness))) / (10))\n    end\nend\n\nwhen I start as a clone\nif <(clone_id) = [100]> then\n    repeat until <(\[Intro\] Keyframe) > [4]>\n        point in direction ((90) + ((_v5) * ([sin v] of (_v4) )))\n        change [_v4 v] by (10)\n    end\n    set [_v4 v] to [0]\n    repeat (24)\n        turn right (_v4) degrees\n        change [_v4 v] by (1)\n    end\n    \n        turn right (((round (90)) - (direction)) / (7)) degrees\n    end\nend\n\nwhen flag clicked\nSetup\nPlay Intro\n\n@Player 1\n\nwhen I receive [start v]\nforever\n    if <(Level) = [2]> then\n        broadcast (lock and key v)\n        wait until <not <(Level) = [2]>>\n    end\n    if <(Level) = [3]> then\n        broadcast (lock and key v)\n        wait until <not <(Level) = [3]>>\n    end\n    if <(Level) = [4]> then\n        broadcast (lock and key v)\n        wait until <not <(Level) = [4]>>\n    end\n    if <(Level) = [5]> then\n        broadcast (lock and key v)\n        wait until <not <(Level) = [5]>>\n    end\n    if <(Level) = [6]> then\n        broadcast (lock and key v)\n        wait until <not <(Level) = [6]>>\n    end\n    if <(Level) = [7]> then\n        broadcast (lock and key v)\n        wait until <not <(Level) = [7]>>\n    end\n    if <(Level) = [8]> then\n        broadcast (lock and key v)\n        wait until <not <(Level) = [8]>>\n    end\n    if <(Level) = [9]> then\n        broadcast (lock and key v)\n        wait until <not <(Level) = [9]>>\n    end\n    if <(Level) = [10]> then\n        broadcast (lock and key v)\n        wait until <not <(Level) = [10]>>\n    end\n    if <(Level) = [11]> then\n        broadcast (lock and key v)\n        wait until <not <(Level) = [11]>>\n    end\n    if <(Level) = [12]> then\n        broadcast (lock and key v)\n        wait until <not <(Level) = [12]>>\n    end\n    if <(Level) = [13]> then\n        broadcast (lock and key v)\n        wait until <not <(Level) = [13]>>\n    end\n    if <(Level) = [14]> then\n        broadcast (lock and key v)\n        wait until <not <(Level) = [14]>>\n    end\n    if <(Level) = [15]> then\n        broadcast (lock and key v)\n        wait until <not <(Level) = [15]>>\n    end\nend\n\nwhen I receive [start v]\nshow\nset [xv v] to [0]\nset [yv v] to [0]\ngo to x: (-220) y: (150)\ngo to [front v] layer\nforever\n    if <key (d v) pressed?> then\n        change [xv v] by (1)\n    end\n    if <key (a v) pressed?> then\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if  then\n        change y by (1)\n        if  then\n            change y by (1)\n            if  then\n                change y by (1)\n                if  then\n                    change y by (1)\n                    if  then\n                        change y by (1)\n                        if  then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                            if <key (w v) pressed?> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\n                                end\n                                set [yv v] to [10]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if  then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if  then\n        if <key (w v) pressed?> then\n            set [yv v] to [15]\n        end\n    end\n    change y by (1)\n    if <<touching (spikes v)?> or <touching (lava v)?>> then\n        broadcast (Restart v)\n    end\n    if <touching (water v)?> then\n        set [yv v] to [-1]\n        if <key (w v) pressed?> then\n            set [yv v] to [5]\n        end\n        if <key (s v) pressed?> then\n            set [yv v] to [-5]\n        end\n    end\n    if <touching (trampoline v)?> then\n        set [yv v] to [20]\n    end\nend\n\nwhen flag clicked\nset [level v] to [1]\nhide\n\nwhen I receive [next level v]\ngo to x: (-220) y: (150)\ngo to [front v] layer\n\nwhen I receive [restart v]\ngo to x: (-220) y: (150)\nset [xv v] to [0]\nset [yv v] to [0]\n\nwhen I receive [restart v]\nbroadcast (lock and key v)\n\nwhen I receive [portal v]\ngo to (portal 2 v)\n\n@Player 2\n\nwhen I receive [start v]\nshow\nset [xv v] to [0]\nset [yv v] to [0]\ngo to x: (-220) y: (-50)\ngo to [front v] layer\nforever\n    if <key (right arrow v) pressed?> then\n        change [xv v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if  then\n        change y by (1)\n        if  then\n            change y by (1)\n            if  then\n                change y by (1)\n                if  then\n                    change y by (1)\n                    if  then\n                        change y by (1)\n                        if  then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                            if <key (up arrow v) pressed?> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\n                                end\n                                set [yv v] to [10]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if  then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if  then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [15]\n        end\n    end\n    change y by (1)\n    if <<touching (spikes v)?> or <touching (lava v)?>> then\n        broadcast (Restart v)\n    end\n    if <touching (water v)?> then\n        set [yv v] to [-1]\n        if  then\n            set [yv v] to [5]\n        end\n        if  then\n            set [yv v] to [-5]\n        end\n    end\n    if <touching (trampoline v)?> then\n        set [yv v] to [20]\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\nchange [level v] by (1)\ngo to x: (-220) y: (-50)\ngo to [front v] layer\n\nwhen I receive [restart v]\ngo to x: (-220) y: (-50)\nset [xv v] to [0]\nset [yv v] to [0]\n\nwhen I receive [portal 2 v]\ngo to (portal 2 v)\n\n@Ground\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (1 v)\n\nwhen I receive [start v]\ngo to [front v] layer\ngo [backward v] (1) layers\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\nbroadcast (Illusions v)\n\nwhen I receive [start v]\nforever\n    if <(fLAg) = [1]> then\n        set [flag v] to [0]\n        broadcast (Next Level v)\n    end\nend\n\nchange [level v] by (1)\n\n@Flag\n\nwhen I receive [start v]\ngo to [back v] layer\ngo [backward v] (1) layers\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (1 v)\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nset [flag v] to [0]\nforever\n    if <<touching (player 1 v)?> and <touching (player 2 v)?>> then\n        change [flag v] by (1)\n        wait until <not <<touching (player 1 v)?> and <touching (player 2 v)?>>>\n    end\nend\n\n@Spikes\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (1 v)\ngo to [back v] layer\n\nwhen I receive [start v]\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\n@Lava\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    repeat (20)\n        change y by (-0.4)\n    end\n    repeat (20)\n        change y by (0.4)\n    end\nend\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (1 v)\nforever\n    go to [back v] layer\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\n@Water\n\nwhen flag clicked\nset [level v] to [0]\nhide\n\nwhen I receive [start v]\nset [level v] to [1]\ngo to x: (0) y: (0)\nshow\nswitch costume to (1 v)\nforever\n    go to [back v] layer\n    switch costume to (Level)\nend\n\nwhen flag clicked\nwait (0.5) seconds\ngo to x: (0) y: (0)\nforever\n    repeat (20)\n        change y by (-0.4)\n    end\n    repeat (20)\n        change y by (0.4)\n    end\nend\n\n@Trampoline\n\nwhen I receive [start v]\ngo to [back v] layer\ngo to x: (0) y: (0)\nshow\nswitch costume to (1 v)\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\n@Portal 1\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nset [sine v] to [0]\npoint in direction (90)\nset size to (100) %\nforever\n    change [sine v] by (5)\n    point in direction ((([sin v] of (sine) ) * (100)) + (0))\n    set size to ((([sin v] of ((sine) * (2)) ) * (5)) + (50)) %\n    go to [front v] layer\nend\n\nwhen I receive [start v]\nforever\n    switch costume to (Level)\n    if  then\n        broadcast (Portal v)\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Level) = [1]> then\n        hide\n    end\n    if <(Level) = [5]> then\n        go to x: (15) y: (140)\n        show\n    end\n    if <(Level) = [6]> then\n        hide\n    end\n    if <(Level) = [8]> then\n        go to x: (47) y: (25)\n        show\n    end\n    if <(Level) = [9]> then\n        hide\n    end\n    if <(Level) = [12]> then\n        go to x: (-7) y: (65)\n        show\n    end\n    if <(Level) = [13]> then\n        go to x: (-20) y: (145)\n        show\n    end\n    if <(Level) = [14]> then\n        go to x: (75) y: (-40)\n        show\n    end\nend\n\nwhen I receive [start v]\nforever\n    switch costume to (Level)\n    if  then\n        broadcast (Portal 2 v)\n    end\nend\n\n@Key\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [start v]\nforever\n    if <<touching (player 2 v)?> or <touching (player 1 v)?>> then\n        broadcast (Key v)\n        hide\n    end\nend\n\nwhen I receive [lock and key v]\nshow\n\n@Lock\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nforever\n    go [forward v] (888888888888888888888888888888888888888888888888888888888888888888888888888888888888888) layers\n    go to [front v] layer\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [key v]\nhide\n\nwhen I receive [start v]\nshow\n\nwhen I receive [lock and key v]\nshow\n\n@2nd Key\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [start v]\nforever\n    if <<touching (player 2 v)?> or <touching (player 1 v)?>> then\n        broadcast (2nd key v)\n        hide\n    end\nend\n\nwhen I receive [lock and key v]\nshow\n\n@2nd Lock\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nforever\n    go to [front v] layer\n    switch costume to (Level)\n    go [backward v] (1) layers\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [2nd key v]\nhide\n\nwhen I receive [lock and key v]\nshow\n\n@Portal 2\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\nset [sine v] to [0]\npoint in direction (90)\nset size to (100) %\nforever\n    change [sine v] by (5)\n    point in direction ((([sin v] of (sine) ) * (100)) + (0))\n    set size to ((([sin v] of ((sine) * (2)) ) * (5)) + (50)) %\n    go to [front v] layer\nend\n\nwhen I receive [start v]\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [start v]\nforever\n    if <(Level) = [1]> then\n        hide\n    end\n    if <(Level) = [5]> then\n        go to x: (110) y: (-15)\n        show\n    end\n    if <(Level) = [6]> then\n        hide\n    end\n    if <(Level) = [8]> then\n        go to x: (200) y: (-130)\n        show\n    end\n    if <(Level) = [9]> then\n        hide\n    end\n    if <(Level) = [12]> then\n        go to x: (200) y: (150)\n        show\n    end\n    if <(Level) = [13]> then\n        go to x: (200) y: (-130)\n        show\n    end\n    if <(Level) = [14]> then\n        go to x: (200) y: (130)\n        show\n    end\nend\n\n@THE END\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    if <(Level) = [14]> then\n        show\n    end\nend\n\n@TN\n\nwhen flag clicked\nshow\nswitch costume to (tn v)\nset [ghost v] effect to (100)\ngo to [front v] layer\ngo to x: (0) y: (0)\nset volume to (100) %\n\n