Riddle || Mobile Platformer 


@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop2 v)\n\nwhen flag clicked\n\nwhen I receive [intro done v]\nswitch backdrop to (backdrop1 v)\nforever\n    set volume to (80) %\n    play sound [Alex Skrindo - Jumbo \[NCS Release\] v] until done\nend\n\nwhen [m v] key pressed\nif <(volume) = [80]> then\n    set volume to (0) %\nelse\n    set volume to (80) %\nend\n\n@Blank\n\n@Intro\n\nwhen flag clicked\nshow\nstart sound (pick random (1) to (1))\nset volume to (100) %\nset size to (100) %\npoint in direction (90)\nclear graphic effects\nset [ghost v] effect to (100)\nswitch costume to (bar v)\ngo to x: (0) y: (-150)\nrepeat (6)\n    create clone of (_myself_ v)\n    change y by (60)\n    wait (0) seconds\nend\nwait (0.2) seconds\ngo to x: (0) y: (-150)\nset [brightness v] effect to (100)\nrepeat (6)\n    create clone of (_myself_ v)\n    change y by (60)\n    wait (0) seconds\nend\ngo to x: (0) y: (0)\nswitch costume to (circle v)\nwait (0.5) seconds\nset [brightness v] effect to (20)\nrepeat (3)\n    create clone of (_myself_ v)\n    change [brightness v] effect by (-10)\n    wait (0.05) seconds\nend\nswitch costume to (square v)\nset [brightness v] effect to (20)\nrepeat (3)\n    create clone of (_myself_ v)\n    change [brightness v] effect by (-10)\n    wait (0.05) seconds\nend\nwait (0.4) seconds\nset [brightness v] effect to (100)\nset [i1 v] to [0]\nswitch costume to (name v)\ncreate clone of (_myself_ v)\nParticles [40]\nset size to (100) %\nwait (2) seconds\nswitch costume to (slide v)\nset [brightness v] effect to (100)\ngo to x: (0) y: (-300)\ncreate clone of (_myself_ v)\nset [i1 v] to [1]\ngo to x: (0) y: (0)\nwait (0.5) seconds\nset [brightness v] effect to (0)\nswitch costume to (name v)\ncreate clone of (_myself_ v)\nwait (0.5) seconds\nswitch costume to (bar v)\ngo to x: (0) y: (-150)\nrepeat (6)\n    create clone of (_myself_ v)\n    change y by (60)\n    wait (0) seconds\nend\nwait (0.5) seconds\nswitch costume to (slide v)\nset [brightness v] effect to (100)\npoint in direction (-90)\ngo to x: (0) y: (300)\ncreate clone of (_myself_ v)\nrepeat (10)\n    change volume by (-10)\nend\nbroadcast (Play Scene v)\n\nwhen I start as a clone\nif <(costume [number v]) = [1]> then\n    set size to (0) %\n    repeat (18)\n        change size by (((100) - (size)) / (4))\n        change [ghost v] effect by (-10)\n    end\nend\nif <(costume [number v]) = [2]> then\n    set [ghost v] effect to (0)\n    repeat (18)\n        switch costume to (blank v)\n        change size by ((size) / (4))\n        switch costume to (circle v)\n    end\nend\nif <(costume [number v]) = [4]> then\n    if <(i1) = [0]> then\n        set size to (0) %\n        set [ghost v] effect to (0)\n        repeat (37)\n            change size by (((100) - (size)) / (4))\n            point in direction ((90) + (([tan v] of (i1) ) * (7)))\n            change [i1 v] by (5)\n        end\n        set [i1 v] to [0]\n        repeat (30)\n            change [i1 v] by (1)\n            change x by ((i1) / (0.8))\n            change y by (i1)\n            turn right ((i1) / (1.5)) degrees\n            change [ghost v] effect by ((i1) / (5))\n        end\n    else\n        clear graphic effects\n        set size to (100) %\n        repeat (20)\n            change [ghost v] effect by (5)\n            change size by (-1)\n        end\n    end\nend\nif < (costume [name v]) contains [Particle]?> then\n    set [ghost v] effect to (0)\n    repeat until <(i3) > [100]>\n        change x by (i1)\n        change y by (i2)\n        change [i2 v] by (-1)\n        if <(i2) < [0]> then\n            change [i3 v] by ((i2) / (-2))\n            set [ghost v] effect to (i3)\n        end\n    end\n    delete this clone\nend\nif <(costume [number v]) = [7]> then\n    set [ghost v] effect to (0)\n    repeat (15)\n        change x by ((x position) / (-4))\n        change y by ((y position) / (-4))\n    end\nend\nif <(costume [number v]) = [8]> then\n    set [ghost v] effect to (0)\n    set size to (0) %\n    point in direction (45)\n    repeat (15)\n        turn right (((90) - (direction)) / (4)) degrees\n        switch costume to (blank v)\n        change size by (((600) - (size)) / (4))\n        switch costume to (square v)\n    end\nend\n\ndefine Particles (p)\nrepeat (p)\n    set size to (pick random (20) to (30)) %\n    switch costume to (pick random (5) to (6))\n    set [i1 v] to (pick random (-5) to (5))\n    set x to ((i1) * (5))\n    set [i2 v] to (pick random (10) to (15))\n    set [i3 v] to [0]\n    create clone of (_myself_ v)\nend\n\nwhen I receive [play scene v]\nwait (0.1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nbroadcast (Play Scene v)\n\n@Player\n\nwhen flag clicked\nset volume to (100) %\nset [level v] to [1]\nset [deaths v] to [0]\nhide\n\ndefine Platformer Physics (speed) (friction) (jump height)\nif <not <touching (water blue v)?>> then\n    if <not <touching (ladders v)?>> then\n        change [y velocity v] by (-1)\n    end\nend\nif <touching (ladders v)?> then\n    Ladders\nend\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <(R) = [1]>> then\n    change [x velocity v] by (speed)\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <(L) = [1]>> then\n    change [x velocity v] by ((0) - (speed))\nend\nset [x velocity v] to ((X Velocity) * (friction))\nchange x by (X Velocity)\nset [slope v] to [0]\nif <<touching (level v)?> or <<touching (locked v)?> or <<touching color (#ff5151)?> or <<touching color (#7bff58)?> or >>>> then\n    repeat until <<not <<touching (level v)?> or <<touching (locked v)?> or <<touching color (#ff5151)?> or <<touching color (#7bff58)?> or >>>>> or <(Slope) = [-8]>>\n        change [slope v] by (-1)\n        change y by (1)\n    end\nend\nif <<touching (level v)?> or <<touching (locked v)?> or <<touching color (#ff5151)?> or <<touching color (#7bff58)?> or >>>> then\n    change y by (Slope)\n    repeat until <not <<touching (level v)?> or <<touching (locked v)?> or <<touching color (#ff5151)?> or <<touching color (#7bff58)?> or >>>>>\n        change x by ((0) - (([abs v] of (X Velocity) ) / (X Velocity)))\n    end\n    set [x velocity v] to [0]\nend\nchange y by (Y Velocity)\nif <<touching (level v)?> or <<touching (locked v)?> or <<touching color (#ff5151)?> or <<touching color (#7bff58)?> or >>>> then\n    repeat until <not <<touching (level v)?> or <<touching (locked v)?> or <<touching color (#ff5151)?> or <<touching color (#7bff58)?> or >>>>>\n        change y by ((([abs v] of (Y Velocity) ) / (Y Velocity)) * (-1))\n    end\n    set [y velocity v] to [0]\nend\nchange y by (-1)\nif <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <(U) = [1]>> and <<touching (level v)?> or <<touching (locked v)?> or <<touching color (#ff5151)?> or <<touching color (#7bff58)?> or >>>>> then\n    if <not <touching (water blue v)?>> then\n        set [y velocity v] to (jump height)\n    end\nend\nchange y by (1)\nif <touching (water blue v)?> then\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <(U) = [1]>> then\n        change [y velocity v] by (0.8)\n    end\n    if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <(D) = [1]>> then\n        change [y velocity v] by (-0.8)\n    end\n    if <touching (water blue v)?> then\n        if <not <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <(D) = [1]>>> then\n            change [y velocity v] by (-0.2)\n        end\n    end\nend\n\ndefine Detection\nset drag mode [not draggable v]\nif <<<touching color (#9b74d4)?> or <touching (end v)?>> and <not <(Level) = [21]>>> then\n    broadcast (Next v)\n    broadcast (Reset Colors v)\n    start sound [Ding Sound Effect v]\n    set [level v] to ((Level) + (1))\n    set [x velocity v] to [0]\n    set [y velocity v] to [0]\n    go to x: (-228) y: (-145)\nend\nif <<<<<touching (danger v)?> or <touching (lava v)?>> or <<touching (lava v)?> or <touching (saws v)?>>> or <<(y position) = [-179]> or <<touching (movingsaws v)?> or >>> and <not <(CHEAT) = [1]>>> then\n    if <<(Level) = [7]> or <<(Level) = [8]> or < or <<(Level) = [10]> or <<(Level) = [12]> or <<(Level) = [13]> or <<(Level) = [14]> or <(Level) = [15]>>>>>>>> then\n        broadcast (Reset Colors v)\n    end\n    if <<<(Level) = [4]> or <<(Level) = [5]> or <(Level) = [6]>>> or <<(Level) = [8]> or <<(Level) = [10]> or <<(Level) = [12]> or <<(Level) = [13]> or <(Level) = [15]>>>>>> then\n        broadcast (Reset v)\n    end\n    start sound [Crunch v]\n    set [deaths v] to ((DEATHS) + (1))\n    create clone of (_myself_ v)\n    point in direction (90)\n    go to x: (-228) y: (-145)\n    set [x velocity v] to [0]\n    set [y velocity v] to [0]\nend\nif <touching (trampolines v)?> then\n    start sound [Big Boing v]\n    set [y velocity v] to [16]\nend\nif <touching (trampolines v)?> then\n    set [y velocity v] to [16]\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    point in direction (-90)\nend\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    point in direction (90)\nend\nset rotation style [left-right v]\n\nrepeat (3)\n    hide\n    wait (0.11) seconds\n    show\n    wait (0.11) seconds\nend\nhide\nwait (0.11) seconds\nshow\n\nwhen I receive [intro done v]\npoint in direction (90)\nset size to (100) %\nset [cheat v] to [0]\nwait (0.1) seconds\ngo to [front v] layer\nshow\nswitch costume to (player v)\ngo to x: (-228) y: (-145)\nset rotation style [left-right v]\ngo to [front v] layer\nset [level v] to [1]\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nforever\n    Platformer Physics [1.94] [0.8] [11.5]\n    Detection\nend\n\nwhen flag clicked\nforever\n    Cheats Menu\nend\n\ndefine Cheats Menu\nif <<<key (1 v) pressed?> and <<(username) = [-Scrumptious-]> or <(username) = [-Scrumptious-]>>> and <not <(CHEAT) = [1]>>> then\n    set [cheat v] to [1]\n    wait (0.3) seconds\nelse\n    if <<key (1 v) pressed?> and <(CHEAT) = [1]>> then\n        set [cheat v] to [0]\n        wait (0.3) seconds\n    end\nend\nif <<key (up arrow v) pressed?> and <(CHEAT) = [1]>> then\n    set [y velocity v] to [8]\nend\nif <<key (down arrow v) pressed?> and <(CHEAT) = [1]>> then\n    set [y velocity v] to [-6]\nend\n\nwhen flag clicked\nforever\n    set [x v] to (round (x position))\n    set [y v] to (round (y position))\nend\n\nwhen I receive [restart v]\nstart sound [Oops v]\nset [deaths v] to ((DEATHS) + (1))\nset [x velocity v] to [0]\nset [y velocity v] to [0]\ngo to x: (-228) y: (-145)\n\nwhen I receive [transition v]\npoint in direction (90)\ngo to x: (-215) y: (-70)\nset [x velocity v] to [0]\nset [y velocity v] to [0]\n\nwhen flag clicked\nwait until <(Level) = [7]>\ngo to x: (-215) y: (-56)\n\nwhen I start as a clone\nclear graphic effects\npoint in direction (90)\nset rotation style [all around v]\nrepeat (10)\n    change y by (6)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\nforever\n    if <(username) = [250119code2]> then\nend\n\nchange [level v] by (-1)\n\nwhen flag clicked\nforever\n    if <(username) = [250119code2]> then\nend\n\ndefine Ladders\nif <touching (ladders v)?> then\n    if <touching (ladders v)?> then\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <(U) = [1]>> then\n            if <not <touching (level v)?>> then\n                set [y velocity v] to [7]\n            end\n        end\n    end\n    if <touching (ladders v)?> then\n        if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <(D) = [1]>> then\n            if <not <touching (level v)?>> then\n                set [y velocity v] to [-7]\n            end\n        end\n    end\nend\nif <not <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <(U) = [1]>> or <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <(D) = [1]>>>> then\n    set [y velocity v] to [0]\nend\n\nwhen I receive [animation start v]\nhide\n\n@Level\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\nshow\ngo [backward v] (99) layers\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [animation start v]\nhide\n\n@Danger\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\nshow\ngo [backward v] (999) layers\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [animation start v]\nhide\n\n@Lava\n\nwhen I start as a clone\ngo [backward v] (1) layers\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [intro done v]\ngo to x: (0) y: (0)\nshow\ngo to [back v] layer\nforever\n    go [backward v] (3) layers\n    switch costume to (Level)\n    set y to (([sin v] of ((timer) * (100)) ) * (5))\nend\n\nwhen I receive [animation start v]\nhide\n\n@Locked\n\nwhen flag clicked\ngo [backward v] (97) layers\nhide\n\nwhen flag clicked\nwait until <(Level) = [4]>\ngo [backward v] (97) layers\nshow\nset [ghost v] effect to (0)\nswitch costume to (locked v)\n\nwhen I receive [reset v]\nshow\nset [ghost v] effect to (0)\n\nwhen I receive [open v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen flag clicked\nwait until <(Level) = [6]>\nhide\n\nwhen flag clicked\nwait until <(Level) = [5]>\nshow\nset [ghost v] effect to (0)\nswitch costume to (locked2 v)\n\nwhen flag clicked\nwait until <(Level) = [6]>\nshow\nset [ghost v] effect to (0)\nswitch costume to (locked3 v)\n\nwhen flag clicked\nwait until <(Level) = [8]>\nshow\nset [ghost v] effect to (0)\nswitch costume to (locked4 v)\n\nwhen flag clicked\nwait until <(Level) = [10]>\nshow\nset [ghost v] effect to (0)\nswitch costume to (locked5 v)\n\nwhen flag clicked\nwait until <(Level) = [11]>\nshow\nset [ghost v] effect to (0)\nswitch costume to (locked6 v)\n\nwhen flag clicked\nwait until <(Level) = [12]>\nshow\nset [ghost v] effect to (0)\ngo [backward v] (97) layers\nswitch costume to (locked7 v)\n\nwhen flag clicked\nwait until <(Level) = [13]>\nshow\nset [ghost v] effect to (0)\nswitch costume to (locked8 v)\n\nwhen I receive [animation start v]\nhide\n\nwhen flag clicked\nrepeat (2)\n    hide\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [7]> then\n        hide\n    end\nend\n\nwhen flag clicked\nwait until <(Level) = [15]>\nshow\nset [ghost v] effect to (0)\nswitch costume to (locked9 v)\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nforever\n    go [forward v] (5) layers\nend\n\nwhen I receive [show v]\nclear graphic effects\nstop [all v]\n\n@Key\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\ngo to [back v] layer\n\nwhen I receive [intro done v]\nswitch costume to (costume1 v)\nhide\nwait until <(Level) = [4]>\nshow\nwait until <touching color (#5ea9ff)?>\nbroadcast (Open v)\nstart sound [Magic Spell v]\nhide\n\nwhen flag clicked\nhide\nforever\n    set y to (([sin v] of ((timer) * (100)) ) * (5))\nend\n\nwhen I receive [reset v]\nshow\nwait until <touching color (#5ea9ff)?>\nbroadcast (Open v)\nstart sound [Magic Spell v]\nhide\n\nwhen flag clicked\nwait until <(Level) = [9]>\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [9]> then\n        hide\n    end\nend\n\nwhen I receive [intro done v]\nhide\nwait until <(Level) = [5]>\nswitch costume to (costume2 v)\nshow\nwait until <touching color (#5ea9ff)?>\nbroadcast (Open v)\nstart sound [Magic Spell v]\nhide\n\nwhen I receive [intro done v]\nhide\nwait until <(Level) = [6]>\nswitch costume to (costume3 v)\nshow\nwait until <touching color (#5ea9ff)?>\nbroadcast (Open v)\nstart sound [Magic Spell v]\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [7]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [7]> then\n        hide\n    end\nend\n\nwhen I receive [intro done v]\nhide\nwait until <(Level) = [8]>\nswitch costume to (costume4 v)\nshow\nwait until <touching color (#5ea9ff)?>\nbroadcast (Open v)\nstart sound [Magic Spell v]\nhide\n\nwhen I receive [intro done v]\nhide\nwait until <(Level) = [10]>\nswitch costume to (costume5 v)\nshow\nwait until <touching color (#5ea9ff)?>\nbroadcast (Open v)\nstart sound [Magic Spell v]\nhide\n\nwhen I receive [intro done v]\nhide\nwait until <(Level) = [11]>\nswitch costume to (costume6 v)\nshow\nwait until <touching color (#5ea9ff)?>\nbroadcast (Open v)\nstart sound [Magic Spell v]\nhide\n\nwhen flag clicked\nrepeat (2)\n    hide\nend\n\nwhen flag clicked\nwait until <(Level) = [7]>\nhide\n\nwhen I receive [intro done v]\nhide\nwait until <(Level) = [12]>\nswitch costume to (costume7 v)\nshow\nwait until <touching color (#5ea9ff)?>\nbroadcast (Open v)\nstart sound [Magic Spell v]\nhide\n\nwhen I receive [intro done v]\nhide\nwait until <(Level) = [13]>\nswitch costume to (costume8 v)\nshow\nwait until <touching color (#5ea9ff)?>\nbroadcast (Open v)\nstart sound [Magic Spell v]\nhide\n\nwhen I receive [intro done v]\nhide\nwait until <(Level) = [15]>\nswitch costume to (costume9 v)\nshow\nwait until <touching color (#5ea9ff)?>\nbroadcast (Open v)\nstart sound [Magic Spell v]\nhide\n\n@Water Blue\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\nshow\nforever\n    go [backward v] (999) layers\n    set y to (([sin v] of ((timer) * (100)) ) * (5))\n    set [ghost v] effect to (30)\n    switch costume to (Level)\nend\n\nset y to (([sin v] of ((timer) * (100)) ) * (5))\n\nwhen I receive [animation start v]\nhide\n\n@Saws\n\nwhen flag clicked\nhide\n\ndefine Clone At X: (x) (y) At Size: (size)\nset size to (size) %\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [next v]\nif  then\n    delete this clone\nend\nif <(Level) = [6]> then\n    Clone At X: [-166] [-157] At Size: [90]\n    Clone At X: [-195] [40] At Size: [90]\nend\nif <(Level) = [7]> then\n    Clone At X: [-120] [120] At Size: [90]\n    Clone At X: [133] [65] At Size: [90]\nend\nif <(Level) = [9]> then\n    Clone At X: [-15] [87] At Size: [90]\nend\nif <(Level) = [10]> then\n    Clone At X: [225] [-145] At Size: [90]\nend\nif <(Level) = [11]> then\n    Clone At X: [-206] [-27] At Size: [90]\nend\nif <(Level) = [12]> then\n    Clone At X: [220] [-145] At Size: [90]\nend\nif <(Level) = [13]> then\n    Clone At X: [56] [-141] At Size: [90]\n    Clone At X: [176] [-40] At Size: [80]\n    Clone At X: [193] [115] At Size: [115]\nend\nif <(Level) = [15]> then\n    Clone At X: [80] [140] At Size: [90]\nend\n\nwhen I start as a clone\nshow\ngo [forward v] (1) layers\nforever\n    turn right (4) degrees\nend\n\ngo to [back v] layer\n\nbroadcast (Next v)\n\nbroadcast (Next v)\n\nbroadcast (Next v)\n\n@TITLE\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\nset [screen v] to [1]\ngo [backward v] (99) layers\n\nwhen I receive [play scene v]\nshow\ngo [forward v] (4) layers\nforever\n    set y to (([sin v] of ((timer) * (100)) ) * (5))\n    if <(SCREEN) = [1]> then\n        change [titleturn v] by (1)\n    end\n    if <(SCREEN) = [1]> then\n        show\n    else\n        hide\n    end\n    if <(SCREEN) = [0]> then\n        go [backward v] (6) layers\n    end\nend\n\nset y to (([sin v] of ((timer) * (100)) ) * (5))\n\n@Play Button\n\nwhen I receive [play scene v]\nshow\nwait until <<<touching (mouse-pointer v)?> and <mouse down?>> and <not <(IN) = [1]>>>\nset [screen v] to [0]\nbroadcast (Transition v)\nbroadcast (Launch v)\n\nwhen I receive [play scene v]\nforever\n    if <touching (mouse-pointer v)?> then\n        if <<(SCREEN) = [1]> and <<not <(IN) = [1]>> or <not <(IN2) = [1]>>>> then\n            set volume to (100) %\n            start sound [click v]\n            wait until <not <touching (mouse-pointer v)?>>\n        end\n    end\nend\n\nwhen flag clicked\nset [screen v] to [1]\nhide\n\nwhen I receive [play scene v]\nshow\nforever\n    if <(SCREEN) = [1]> then\n        show\n    else\n        hide\n    end\n    if <touching (mouse-pointer v)?> then\n        change size by (((80) - (size)) / (5))\n        set [brightness v] effect to (5)\n        switch costume to (costume2 v)\n    else\n        change size by (((75) - (size)) / (5))\n        set [brightness v] effect to (0)\n        switch costume to (costume1 v)\n    end\nend\n\nwait until <<<touching (mouse-pointer v)?> and <mouse down?>> and <not <(IN) = [1]>>>\n\nchange size by (((80) - (size)) / (5))\n\nchange size by (((75) - (size)) / (5))\n\n@Instructions\n\nwhen I receive [play scene v]\nset [in v] to [0]\nshow\nwait until <<<touching (mouse-pointer v)?> and <mouse down?>> and <not <(IN) = [1]>>>\nbroadcast (IN v)\n\nwhen I receive [play scene v]\nforever\n    if <touching (mouse-pointer v)?> then\n        if <<(SCREEN) = [1]> and <<not <(IN) = [1]>> or <not <(IN2) = [1]>>>> then\n            set volume to (100) %\n            start sound [click v]\n            wait until <not <touching (mouse-pointer v)?>>\n        end\n    end\nend\n\nwhen flag clicked\nset [screen v] to [1]\nhide\n\nwhen I receive [play scene v]\nshow\nforever\n    if <(SCREEN) = [1]> then\n        show\n    else\n        hide\n    end\n    if <touching (mouse-pointer v)?> then\n        change size by (((80) - (size)) / (5))\n        switch costume to (costume3 v)\n        set [brightness v] effect to (5)\n        if <mouse down?> then\n            if <(IN) = [0]> then\n                broadcast (IN v)\n                set [in v] to [1]\n            end\n        end\n    else\n        switch costume to (costume1 v)\n        change size by (((75) - (size)) / (5))\n        set [brightness v] effect to (0)\n    end\nend\n\n@Transition\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\nwhen I receive [transition v]\nset [ghost v] effect to (0)\nwait (.2) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\n\n@title screen\n\nwhen flag clicked\nset [in v] to [0]\nhide\n\nwhen I receive [in v]\nset [in v] to [1]\nif <(SCREEN) = [1]> then\n    show\n    clear graphic effects\n    set size to (10) %\n    go to [front v] layer\n    repeat (20)\n        go to [front v] layer\n        change size by (((100) - (size)) / (5))\n    end\n    wait until <<mouse down?> and <touching (mouse-pointer v)?>>\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    hide\n    set [in v] to [0]\nend\n\nwhen flag clicked\nforever\n    if <(IN) = [0]> then\n        go [backward v] (5) layers\n    end\nend\n\n@Lasers\n\nwhen flag clicked\nset [laser? v] to [0]\nhide\ngo to x: (-106) y: (3)\ngo to [back v] layer\nwait until <(Level) = [12]>\nshow\nswitch costume to (1 v)\nrepeat until <not <(Level) = [12]>>\n    go to [back v] layer\n    set [laser? v] to [0]\n    switch costume to (1 v)\n    wait (2) seconds\n    set [laser? v] to [1]\n    switch costume to (1up v)\n    wait (2) seconds\nend\nhide\n\nwhen flag clicked\nforever\n    go [backward v] (2) layers\nend\n\nwhen flag clicked\nwait until <(Level) = [13]>\nhide\n\ngo to x: (-106) y: (3)\n\nchange [level v] by (1)\n\nwhen flag clicked\nrepeat (10)\n    hide\nend\n\n@End\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\nshow\nforever\n    change [size v] by (5)\n    set size to ((100) + (([cos v] of (size) ) * (10))) %\n    go to [back v] layer\nend\n\nwhen I receive [animation start v]\nhide\n\nwhen I receive [next v]\ngo to [back v] layer\nif <(Level) = [1]> then\n    go to x: (49) y: (8)\nend\nif <(Level) = [2]> then\n    go to x: (-10) y: (-12)\nend\nif <(Level) = [3]> then\n    go to x: (-219) y: (131)\nend\nif <(Level) = [4]> then\n    go to x: (57) y: (-135)\nend\nif <(Level) = [5]> then\n    go to x: (185) y: (90)\nend\nif <(Level) = [6]> then\n    go to x: (215) y: (-138)\nend\nif <(Level) = [7]> then\n    go to x: (201) y: (-135)\nend\nif <(Level) = [8]> then\n    go to x: (220) y: (-107)\nend\nif <(Level) = [9]> then\n    go to x: (130) y: (-153)\nend\nif <(Level) = [10]> then\n    go to x: (120) y: (-136)\nend\nif <(Level) = [11]> then\n    go to x: (142) y: (-10)\nend\nif <(Level) = [12]> then\n    go to x: (-216) y: (122)\nend\nif <(Level) = [13]> then\n    go to x: (-217) y: (138)\nend\nif <(Level) = [14]> then\n    go to x: (-217) y: (138)\nend\nif <(Level) = [15]> then\n    go to x: (-29) y: (162)\nend\n\nwhen flag clicked\ngo to x: (49) y: (8)\n\nwhen I receive [play scene v]\ngo to x: (49) y: (8)\n\ngo to x: (57) y: (-135)\n\nwhen flag clicked\nwait until <(Level) = [16]>\nhide\n\nwhen flag clicked\nwait until <(Level) = [16]>\nhide\n\n@Trampolines\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\nshow\nforever\n    switch costume to (Level)\n    go [backward v] (999) layers\nend\n\nwhen I receive [animation start v]\nhide\n\n@MovingSaws\n\nwhen flag clicked\nhide\n\ndefine Clone At X: (x) (y) At Size: (size)\nset size to (size) %\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [next v]\nif  then\n    delete this clone\nend\nif <(Level) = [6]> then\n    Clone At X: [-58] [14] At Size: [90]\nend\nif <(Level) = [8]> then\n    Clone At X: [126] [-156] At Size: [90]\nend\nif <(Level) = [9]> then\n    Clone At X: [15] [-147] At Size: [90]\nend\nif <(Level) = [11]> then\n    Clone At X: [-20] [-85] At Size: [90]\nend\nif <(Level) = [12]> then\n    Clone At X: [-96] [113] At Size: [90]\nend\nif <(Level) = [13]> then\n    Clone At X: [-3] [152] At Size: [90]\nend\n\nwhen I start as a clone\nshow\ngo to [back v] layer\nforever\n    turn right (4) degrees\nend\n\nbroadcast (Next v)\n\nwhen I start as a clone\nshow\ngo to [back v] layer\nforever\n    if <(Level) = [6]> then\n        repeat (35)\n            change x by (3)\n        end\n        wait (1) seconds\n        repeat (35)\n            change x by (-3)\n        end\n        wait (1) seconds\n    end\n    if <(Level) = [8]> then\n        repeat (55)\n            change x by (2)\n        end\n        wait (1) seconds\n        repeat (55)\n            change x by (-2)\n        end\n        wait (1) seconds\n    end\n    if <(Level) = [9]> then\n        repeat (55)\n            change y by (2)\n        end\n        wait (1) seconds\n        repeat (55)\n            change y by (-2)\n        end\n        wait (1) seconds\n    end\n    if <(Level) = [11]> then\n        repeat (25)\n            change y by (2)\n        end\n        wait (1) seconds\n        repeat (25)\n            change y by (-2)\n        end\n        wait (1) seconds\n    end\n    if <(Level) = [12]> then\n        repeat (45)\n            change x by (2)\n        end\n        wait (1) seconds\n        repeat (45)\n            change x by (-2)\n        end\n        wait (1) seconds\n    end\n    if <(Level) = [13]> then\n        repeat (25)\n            change y by (-2)\n        end\n        wait (1) seconds\n        repeat (25)\n            change y by (2)\n        end\n        wait (1) seconds\n    end\nend\n\nwhen flag clicked\n\nwhen [space v] key pressed\nset [mx v] to (mouse x)\nset [my v] to (mouse y)\n\nbroadcast (Next v)\n\n@RED \n\nwhen I receive [toggle red v]\nset [ghost v] effect to (0)\n\nwhen I receive [reset colors v]\nset [ghost v] effect to (50)\n\nwhen I receive [toggle green v]\nset [ghost v] effect to (50)\n\nwhen flag clicked\nswitch costume to (1 v)\n\nwhen flag clicked\nhide\nwait until <(Level) = [12]>\nset [ghost v] effect to (50)\nswitch costume to (6 v)\nshow\ngo to x: (0) y: (0)\n\nwhen flag clicked\nhide\nwait until <(Level) = [13]>\nset [ghost v] effect to (50)\nswitch costume to (7 v)\nshow\ngo to x: (0) y: (0)\n\nwhen flag clicked\nhide\nwait until <(Level) = [14]>\nset [ghost v] effect to (50)\nswitch costume to (8 v)\nshow\ngo to x: (0) y: (0)\n\nwhen flag clicked\nhide\nwait until <(Level) = [15]>\nset [ghost v] effect to (50)\nswitch costume to (9 v)\nshow\ngo to x: (0) y: (0)\n\nwhen flag clicked\nswitch costume to (1 v)\nhide\nwait until <(Level) = [7]>\nshow\ngo to x: (0) y: (0)\nset [ghost v] effect to (50)\n\nwhen flag clicked\nhide\nwait until <(Level) = [9]>\nswitch costume to (3 v)\nshow\ngo to x: (0) y: (0)\nset [ghost v] effect to (50)\n\nwhen flag clicked\nforever\n    if <(Level) = [2]> then\n        hide\n    end\nend\n\nwhen flag clicked\nhide\nwait until <(Level) = [10]>\nset [ghost v] effect to (50)\nswitch costume to (4 v)\nshow\ngo to x: (0) y: (0)\n\nwhen flag clicked\nhide\nwait until <(Level) = [11]>\nset [ghost v] effect to (50)\nswitch costume to (5 v)\nshow\ngo to x: (0) y: (0)\n\nwhen flag clicked\nhide\nwait until <(Level) = [8]>\nswitch costume to (2 v)\nshow\ngo to x: (0) y: (0)\nset [ghost v] effect to (50)\n\nwhen flag clicked\nwait until <(Level) = [16]>\nhide\n\n@RED UNLOCK\n\nwhen flag clicked\nhide\nwait until <(Level) = [9]>\nswitch costume to (costume3 v)\nshow\ngo to x: (0) y: (0)\n\nwhen flag clicked\nhide\nwait until <(Level) = [10]>\nswitch costume to (costume4 v)\nshow\ngo to x: (0) y: (0)\n\nwhen flag clicked\nwait until <(Level) = [12]>\nshow\ngo to x: (0) y: (0)\nswitch costume to (costume6 v)\n\nwhen flag clicked\nwait until <(Level) = [13]>\nshow\ngo to x: (0) y: (0)\nswitch costume to (costume7 v)\n\nwhen I receive [reset colors v]\nwait until <touching color (#5ea9ff)?>\nbroadcast (Toggle Red v)\n\nwhen flag clicked\nwait until <(Level) = [11]>\nshow\ngo to x: (0) y: (0)\nswitch costume to (costume5 v)\n\nwhen flag clicked\nhide\nwait until <(Level) = [14]>\nswitch costume to (costume8 v)\nshow\ngo to x: (0) y: (0)\n\nwhen flag clicked\nhide\nwait until <(Level) = [5]>\nswitch costume to (costume9 v)\nshow\ngo to x: (0) y: (0)\n\nwhen flag clicked\nwait until <(Level) = [7]>\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nswitch costume to (costume1 v)\nshow\ngo to [back v] layer\nwait until <touching color (#5ea9ff)?>\nbroadcast (Toggle Red v)\n\nwhen flag clicked\nwait until <(Level) = [15]>\nshow\ngo to x: (0) y: (0)\nswitch costume to (costume9 v)\n\nwhen flag clicked\nwait until <(Level) = [5]>\nhide\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen flag clicked\nhide\nwait until <(Level) = [8]>\nswitch costume to (costume2 v)\nshow\ngo to x: (0) y: (0)\n\nwhen flag clicked\nwait until <(Level) = [16]>\nhide\n\n@GREEN\n\nwhen I receive [toggle red v]\nset [ghost v] effect to (50)\n\nwhen I receive [reset colors v]\nset [ghost v] effect to (0)\n\nwhen flag clicked\nhide\nwait until <(Level) = [7]>\nswitch costume to (1 v)\nshow\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\n\nwhen I receive [toggle green v]\nset [ghost v] effect to (0)\n\nwhen flag clicked\nhide\nwait until <(Level) = [12]>\nset [ghost v] effect to (0)\nswitch costume to (6 v)\nshow\ngo to x: (0) y: (0)\n\nwhen flag clicked\nhide\nwait until <(Level) = [13]>\nset [ghost v] effect to (0)\nswitch costume to (7 v)\nshow\ngo to x: (0) y: (0)\n\nwhen flag clicked\nhide\nwait until <(Level) = [14]>\nset [ghost v] effect to (0)\nswitch costume to (8 v)\nshow\ngo to x: (0) y: (0)\n\nwhen flag clicked\nhide\nwait until <(Level) = [15]>\nset [ghost v] effect to (0)\nswitch costume to (9 v)\nshow\ngo to x: (0) y: (0)\n\nwhen flag clicked\nhide\nwait until <(Level) = [9]>\nswitch costume to (3 v)\nshow\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\n\nwhen flag clicked\nforever\n    if <(Level) = [2]> then\n        hide\n    end\nend\n\nwhen flag clicked\nhide\nwait until <(Level) = [10]>\nset [ghost v] effect to (0)\nswitch costume to (4 v)\nshow\ngo to x: (0) y: (0)\n\nwhen flag clicked\nhide\nwait until <(Level) = [11]>\nset [ghost v] effect to (0)\nswitch costume to (5 v)\nshow\ngo to x: (0) y: (0)\n\nwhen flag clicked\nhide\nwait until <(Level) = [8]>\nset [ghost v] effect to (0)\nswitch costume to (2 v)\nshow\ngo to x: (0) y: (0)\n\nwhen flag clicked\nwait until <(Level) = [16]>\nhide\n\n@GREEN UNLOCK\n\nwhen flag clicked\nwait until <(Level) = [9]>\nshow\ngo to x: (0) y: (0)\nswitch costume to (costume3 v)\n\nwhen flag clicked\nwait until <(Level) = [10]>\nshow\ngo to x: (0) y: (0)\nswitch costume to (costume4 v)\n\nwhen flag clicked\nwait until <(Level) = [12]>\nshow\ngo to x: (0) y: (0)\nswitch costume to (costume6 v)\n\nwhen flag clicked\nwait until <(Level) = [13]>\nshow\ngo to x: (0) y: (0)\nswitch costume to (costume7 v)\n\nwhen flag clicked\nhide\nwait until <(Level) = [14]>\nswitch costume to (costume8 v)\nshow\ngo to x: (0) y: (0)\n\nwhen flag clicked\nhide\nwait until <(Level) = [15]>\nswitch costume to (costume9 v)\nshow\ngo to x: (0) y: (0)\n\nwhen I receive [reset colors v]\nwait until <touching color (#5ea9ff)?>\nbroadcast (Reset Colors v)\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\nwait until <(Level) = [7]>\ngo to x: (0) y: (0)\nshow\ngo to [back v] layer\nwait until <touching color (#5ea9ff)?>\nbroadcast (Toggle Green v)\n\nwhen flag clicked\nwait until <(Level) = [11]>\nshow\ngo to x: (0) y: (0)\nswitch costume to (costume5 v)\n\nwhen flag clicked\nhide\nwait until <(Level) = [8]>\nswitch costume to (costume2 v)\nshow\ngo to x: (0) y: (0)\n\nwhen flag clicked\nwait until <(Level) = [16]>\nhide\n\n@Tester\n\nwhen I receive [launch v]\nshow\nforever\n    set y to (([sin v] of ((timer) * (100)) ) * (5))\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\nhide\n\n@Mobile\n\nwhen I receive [play scene v]\nforever\n    if <touching (mouse-pointer v)?> then\n        set volume to (100) %\n        wait until <not <touching (mouse-pointer v)?>>\n    end\nend\n\nwhen flag clicked\nset [screen v] to [1]\nhide\n\nwhen I receive [launch v]\nshow\nwait (1) seconds\nwait until <not <mouse down?>>\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((80) - (size)) / (5))\n        set [brightness v] effect to (5)\n        switch costume to (costume2 v)\n        if <mouse down?> then\n            if <(DID?) = [0]> then\n                set [device v] to [mobile]\n                broadcast (Transition v)\n                hide\n                broadcast (Intro Done v)\n                set [did? v] to [1]\n            end\n        end\n    else\n        change size by (((75) - (size)) / (5))\n        set [brightness v] effect to (0)\n        switch costume to (costume1 v)\n    end\nend\n\nhide\n\nwhen flag clicked\nset [did? v] to [0]\n\nwhen I receive [launch v]\n\nwhen I receive [intro done v]\nhide\n\n@Computer\n\nwhen I receive [play scene v]\nforever\n    if <touching (mouse-pointer v)?> then\n        set volume to (100) %\n        wait until <not <touching (mouse-pointer v)?>>\n    end\nend\n\nwhen flag clicked\nset [screen v] to [1]\nhide\n\nwhen I receive [launch v]\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((80) - (size)) / (5))\n        set [brightness v] effect to (5)\n        switch costume to (costume2 v)\n    else\n        change size by (((75) - (size)) / (5))\n        set [brightness v] effect to (0)\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [launch v]\nwait until <<touching (mouse-pointer v)?> and <mouse down?>>\nset [device v] to [pc]\nbroadcast (Transition v)\nhide\nbroadcast (Intro Done v)\nset [did? v] to [1]\n\nwhen I receive [intro done v]\nhide\n\n@LeftMobile\n\nwhen I receive [intro done v]\nif <(DEVICE) = [mobile]> then\n    show\n    set [ghost v] effect to (20)\n    go [forward v] (4) layers\nend\n\nwhen flag clicked\nhide\n\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        set [l v] to [1]\n    else\n        set [l v] to [0]\n    end\nend\n\n@RightMobile\n\nwhen I receive [intro done v]\nif <(DEVICE) = [mobile]> then\n    show\n    set [ghost v] effect to (20)\n    go [forward v] (4) layers\nend\n\nwhen flag clicked\nhide\n\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        set [r v] to [1]\n    else\n        set [r v] to [0]\n    end\nend\n\n@UpMobile\n\nwhen I receive [intro done v]\nif <(DEVICE) = [mobile]> then\n    show\n    set [ghost v] effect to (20)\n    go [forward v] (4) layers\nend\n\nwhen flag clicked\nhide\n\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        set [u v] to [1]\n    else\n        set [u v] to [0]\n    end\nend\n\n@DownMobile\n\nwhen I receive [intro done v]\nif <(DEVICE) = [mobile]> then\n    show\n    set [ghost v] effect to (20)\n    go [forward v] (4) layers\nend\n\nwhen flag clicked\nhide\n\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        set [d v] to [1]\n    else\n        set [d v] to [0]\n    end\nend\n\n@PinkBlock\n\nwhen flag clicked\nhide\n\ndefine Clone At X: (x) (y) At Size: (size)\nset size to (size) %\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [next v]\nif  then\n    delete this clone\nend\nif <(Level) = [11]> then\n    Clone At X: [-70] [-87] At Size: [90]\n    Clone At X: [30] [-87] At Size: [90]\n    Clone At X: [122] [92] At Size: [90]\nend\nif <(Level) = [12]> then\n    Clone At X: [93] [28] At Size: [90]\n    Clone At X: [-135] [91] At Size: [90]\nend\nif <(Level) = [13]> then\n    Clone At X: [-130] [-34] At Size: [90]\n    Clone At X: [44] [119] At Size: [90]\n    Clone At X: [-50] [119] At Size: [90]\nend\nif <(Level) = [14]> then\n    Clone At X: [14] [117] At Size: [90]\n    Clone At X: [-214] [85] At Size: [90]\nend\n\nwhen I start as a clone\npoint in direction (90)\nshow\ngo to [back v] layer\nforever\n    set [ghost v] effect to ((139) - (distance to [player v]))\nend\n\nbroadcast (Next v)\n\nbroadcast (Next v)\n\nbroadcast (Next v)\n\n@Lasers2\n\nwhen flag clicked\nset [laser? v] to [0]\nhide\ngo to x: (-106) y: (3)\ngo to [back v] layer\nwait until <(Level) = [13]>\nshow\nswitch costume to (1 v)\nrepeat until <not <(Level) = [13]>>\n    go [backward v] (1) layers\n    set [laser? v] to [0]\n    switch costume to (1 v)\n    wait (2) seconds\n    set [laser? v] to [1]\n    switch costume to (1up v)\n    wait (2) seconds\nend\nhide\n\nwhen flag clicked\nforever\n    go [backward v] (2) layers\nend\n\nwhen flag clicked\nwait until <(Level) = [14]>\nhide\n\ngo to x: (-106) y: (3)\n\nchange [level v] by (1)\n\nwhen flag clicked\nrepeat (10)\n    hide\nend\n\n@Ladders\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\nshow\nforever\n    switch costume to (Level)\n    go [backward v] (22) layers\nend\n\nwhen I receive [animation start v]\nhide\n\n@Lasers3\n\nwhen flag clicked\nset [laser? v] to [0]\nhide\ngo to x: (0) y: (0)\ngo to [back v] layer\nwait until <(Level) = [14]>\nshow\nswitch costume to (1 v)\nrepeat until <not <(Level) = [14]>>\n    go [backward v] (1) layers\n    set [laser? v] to [0]\n    switch costume to (1 v)\n    wait (2) seconds\n    set [laser? v] to [1]\n    switch costume to (1up v)\n    wait (2) seconds\nend\nhide\n\nwhen flag clicked\nforever\n    go [backward v] (2) layers\nend\n\nwhen flag clicked\nwait until <(Level) = [15]>\nhide\n\ngo to x: (-106) y: (3)\n\nchange [level v] by (1)\n\nwhen flag clicked\nrepeat (10)\n    hide\nend\n\n@Lasers4\n\nwhen flag clicked\nset [laser? v] to [0]\nhide\ngo to x: (0) y: (0)\ngo to [back v] layer\nwait until <(Level) = [15]>\nshow\nswitch costume to (1 v)\nrepeat until <not <(Level) = [15]>>\n    go [backward v] (1) layers\n    set [laser? v] to [0]\n    switch costume to (1 v)\n    wait (2) seconds\n    set [laser? v] to [1]\n    switch costume to (1up v)\n    wait (2) seconds\nend\nhide\n\nwhen flag clicked\nforever\n    go [backward v] (2) layers\nend\n\nwhen flag clicked\nwait until <(Level) = [16]>\nhide\n\ngo to x: (-106) y: (3)\n\nchange [level v] by (1)\n\nwhen flag clicked\nrepeat (10)\n    hide\nend\n\n