Snowy 2 || Mobile Platformer
@Stage\n\nwhen flag clicked\nswitch backdrop to (before intro v)\n\nwhen I receive [start game v]\nswitch backdrop to (sky v)\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 (Start Game 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 [start game v]\nwait (0.1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Player\n\nwhen flag clicked\nswitch costume to (player v)\ngo [backward v] (99) layers\nhide\nset volume to (50) %\nset [level v] to [1]\nset [deaths v] to [0]\nhide\n\ndefine Platformer Physics (speed) (friction) (jump height)\nif <not <(Transition>) = [1]>> then\n    if <not <touching (water v)?>> then\n        if <not <touching (ladders v)?>> then\n            change [y velocity v] by (-1)\n        end\n    end\n    if <touching (ladders v)?> then\n        Ladder Detection\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x velocity v] by (speed)\n    end\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [x velocity v] by ((0) - (speed))\n    end\n    if <touching (iceparts v)?> then\n        set [x velocity v] to ((X Velocity) * (Times Lower))\n    else\n        set [x velocity v] to ((X Velocity) * (Times Lower))\n    end\n    change x by (X Velocity)\n    set [slope v] to [0]\n    if <<touching (level v)?> or > then\n        repeat until <<not <<touching (level v)?> or <touching (iceparts v)?>>> or <(Slope) = [-8]>>\n            change [slope v] by (-1)\n            change y by (1)\n        end\n    end\n    if <<touching (level v)?> or <touching (iceparts v)?>> then\n        change y by (Slope)\n        repeat until <not <<touching (level v)?> or <touching (iceparts v)?>>>\n            change x by ((0) - (([abs v] of (X Velocity) ) / (X Velocity)))\n        end\n        set [x velocity v] to [0]\n    end\n    change y by (Y Velocity)\n    if <<touching (level v)?> or <touching (iceparts v)?>> then\n        repeat until <not <<touching (level v)?> or <touching (iceparts v)?>>>\n            change y by ((([abs v] of (Y Velocity) ) / (Y Velocity)) * (-1))\n        end\n        set [y velocity v] to [0]\n    end\n    change y by (-1)\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> and <<touching (level v)?> or <touching (iceparts v)?>>> then\n        if <not <touching (water v)?>> then\n            set [y velocity v] to (jump height)\n        end\n    end\n    if <touching (iceparts v)?> then\n        set [times lower v] to [0.92]\n    else\n        set [times lower v] to [0.79]\n    end\n    change y by (1)\n    if <touching (water v)?> then\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            change [y velocity v] by (0.8)\n        end\n        if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<mouse down?> and <(y position) > (mouse y)>>> then\n            change [y velocity v] by (-0.8)\n        end\n        if <touching (water v)?> then\n            if <not <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<mouse down?> and <(y position) > (mouse y)>>>> then\n                change [y velocity v] by (-0.2)\n            end\n        end\n    end\nend\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n    if <touching (jump rings v)?> then\n        set [y velocity v] to [12]\n    end\nend\n\nwhen I receive [intro done v]\npoint in direction (90)\nset size to (95) %\nset [cheat v] to [0]\nwait (0.1) seconds\nshow\ngo to x: (-215) y: (-78)\nset rotation style [left-right v]\nset [level v] to [1]\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nforever\n    Platformer Physics [2] [0.79] [12.5]\n    Detection\nend\n\nwhen flag clicked\nforever\n    Cheats Menu\nend\n\ndefine Cheats Menu\nif <<<key (1 v) pressed?> and <<(username) = [250119code2]> or <(username) = [250119test2]>>> 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: (-215) y: (-70)\n\nwhen I receive [transition v]\ngo to x: (-215) y: (-70)\nset [x velocity v] to [0]\nset [y velocity v] to [0]\n\nwhen I receive [intro done v]\nset [transition> v] to [0]\n\nwhen I start as a clone\nrepeat (10)\n    set [ghost v] effect to (0)\nend\ndelete this clone\n\nwhen I receive [intro done v]\nwait (2) seconds\ngo [forward v] (55) layers\n\nwhen I receive [right v]\nnext costume\n\ndefine Detection\nif <<(x position) = [240]> and <not <(Level) = [16]>>> then\n    set [level v] to ((Level) + (1))\n    broadcast (Next level v)\n    broadcast (Create Clone v)\n    broadcast (Next v)\n    start sound [Ding Sound Effect v]\n    set [x velocity v] to [0]\n    set [y velocity v] to [0]\n    go to x: (-215) y: (-70)\nend\nif <<<<<<touching (danger v)?> or <touching (cold water v)?>> or <touching (saws v)?>> or <<<touching (leftsaws v)?> or <touching (upsaws v)?>> or <(y position) = [-179]>>> or <<touching (upsaws2 v)?> or <<touching (leftsaws2 v)?> or >>> and <not <(CHEAT) = [1]>>> then\n    start sound [Crunch v]\n    broadcast (died v)\n    set [deaths v] to ((DEATHS) + (1))\n    set [x velocity v] to [0]\n    set [y velocity v] to [0]\n    broadcast (Move v)\n    go to x: (-215) y: (-70)\nend\nif <touching (bounce pad 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\n\nwhen I receive [left v]\nswitch costume to ((costume [number v]) - (1))\n\ndefine Ladder Detection\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 [6.5]\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 [-6.5]\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\nif <touching (level v)?> then\n\nif <touching (water v)?> then\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n        change [y velocity v] by (0.8)\n    end\n    if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<mouse down?> and <(y position) > (mouse y)>>> then\n        change [y velocity v] by (-0.8)\n    end\n    if <touching (water v)?> then\n        if <not <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<mouse down?> and <(y position) > (mouse y)>>>> then\n            change [y velocity v] by (-0.2)\n        end\n    end\nend\n\n@Level\n\nwhen I receive [intro done v]\nshow\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\n@Danger\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\nglide (1) secs to x: (0) y: (0)\nglide (1) secs to x: (0) y: (0)\n\nwhen I receive [intro done v]\nshow\nforever\n    switch costume to (Level)\nend\n\n@Text/Timer\n\nwhen flag clicked\nhide variable [timer v]\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [st v]\nset [timer v] to [0]\nshow variable [timer v]\nwait until <<key (a v) pressed?> or <<key (b v) pressed?> or <<key (c v) pressed?> or <<key (d v) pressed?> or <<key (e v) pressed?> or <<key (f v) pressed?> or <<key (g v) pressed?> or <<key (any v) pressed?> or <mouse down?>>>>>>>>>\nreset timer\nrepeat until <(Level) = [21]>\n    set [timer v] to ((round ((timer) * (10))) / (10))\nend\n\nwait until <<key (a v) pressed?> or <<key (b v) pressed?> or <<key (c v) pressed?> or <<key (d v) pressed?> or <<key (e v) pressed?> or <<key (f v) pressed?> or <<key (g v) pressed?> or <<key (any v) pressed?> or <mouse down?>>>>>>>>>\n\nwait until <<key (a v) pressed?> or <<key (b v) pressed?> or <<key (c v) pressed?> or <<key (d v) pressed?> or <<key (e v) pressed?> or <<key (f v) pressed?> or <<key (g v) pressed?> or <<key (any v) pressed?> or <mouse down?>>>>>>>>>\nwait until <<key (a v) pressed?> or <<key (b v) pressed?> or <<key (c v) pressed?> or <<key (d v) pressed?> or <<key (e v) pressed?> or <<key (f v) pressed?> or <<key (g v) pressed?> or <<key (any v) pressed?> or <mouse down?>>>>>>>>>\nwait until <<key (a v) pressed?> or <<key (b v) pressed?> or <<key (c v) pressed?> or <<key (d v) pressed?> or <<key (e v) pressed?> or <<key (f v) pressed?> or <<key (g v) pressed?> or <<key (any v) pressed?> or <mouse down?>>>>>>>>>\nwait until <<key (a v) pressed?> or <<key (b v) pressed?> or <<key (c v) pressed?> or <<key (d v) pressed?> or <<key (e v) pressed?> or <<key (f v) pressed?> or <<key (g v) pressed?> or <<key (any v) pressed?> or <mouse down?>>>>>>>>>\nwait until <<key (a v) pressed?> or <<key (b v) pressed?> or <<key (c v) pressed?> or <<key (d v) pressed?> or <<key (e v) pressed?> or <<key (f v) pressed?> or <<key (g v) pressed?> or <<key (any v) pressed?> or <mouse down?>>>>>>>>>\nwait until <<key (a v) pressed?> or <<key (b v) pressed?> or <<key (c v) pressed?> or <<key (d v) pressed?> or <<key (e v) pressed?> or <<key (f v) pressed?> or <<key (g v) pressed?> or <<key (any v) pressed?> or <mouse down?>>>>>>>>>\n\nwhen I receive [intro done v]\nshow\nforever\n    switch costume to (Level)\n    if <touching (player v)?> then\n        set [ghost v] effect to (40)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen I receive [s v]\nstop [other scripts in sprite v]\nset [timer v] to [Skipped]\nforever\n    switch costume to (Level)\n    if <touching (player v)?> then\n        set [ghost v] effect to (40)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\n@Decoration\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nchange [level v] by (-1)\n\nwhen I receive [intro done v]\nshow\nforever\n    go [backward v] (6) layers\n    switch costume to (Level)\nend\n\n@Cold Water\n\nwhen I start as a clone\ngo [backward v] (1) layers\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\nhide\n\nset y to (([sin v] of ((timer) * (100)) ) * (5))\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [intro done v]\nshow\nforever\n    switch costume to (Level)\nend\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) = [4]> then\n    Clone At X: [92] [-113] At Size: [100]\nend\nif <(Level) = [5]> then\n    Clone At X: [231] [-59] At Size: [100]\nend\nif <(Level) = [7]> then\n    Clone At X: [-140] [-94] At Size: [100]\nend\nif <(Level) = [8]> then\n    Clone At X: [150] [72] At Size: [100]\nend\nif <(Level) = [9]> then\n    Clone At X: [205] [32] At Size: [100]\nend\nif <(Level) = [14]> then\n    Clone At X: [-45] [45] At Size: [90]\nend\nif <(Level) = [15]> then\n    Clone At X: [-165] [36] At Size: [90]\nend\n\nwhen I start as a clone\nswitch costume to (1 v)\nshow\ngo [backward v] (50) layers\nforever\n    turn right (3.5) degrees\nend\n\nwhen [m v] key pressed\nset [mx v] to (mouse x)\nset [my v] to (mouse y)\n\nbroadcast (Next v)\n\nbroadcast (Next v)\n\n@Water\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\nset [ghost v] effect to (30)\n\nwhen I receive [intro done v]\nshow\nforever\n    go [backward v] (4) layers\n    switch costume to (Level)\n    set [ghost v] effect to (40)\n    set y to (([sin v] of ((timer) * (100)) ) * (5))\nend\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@Skip Button\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\nshow\nswitch costume to (costume1 v)\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((80) - (size)) / (5))\n        switch costume to (costume2 v)\n    else\n        change size by (((75) - (size)) / (5))\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [intro done v]\nwait (0.8) seconds\n\nwhen this sprite clicked\nbroadcast (s v)\nbroadcast (Transition v)\nbroadcast (Next v)\nbroadcast (Create Clone v)\nchange [level v] by (1)\n\nwhen I receive [start game v]\nforever\n    if <touching (mouse-pointer v)?> then\n        set volume to (70) %\n        start sound [Touch v]\n        wait until <not <touching (mouse-pointer v)?>>\n    end\nend\n\nwhen flag clicked\nwait until <(Level) = [15]>\nhide\n\n@Skip Cooldown\n\nwhen I receive [transition v]\nshow\ngo to [front v] layer\ngo to [front v] layer\nwait (0.8) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nclear graphic effects\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nbroadcast (Transition v)\n\n@Clouds\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nset [side v] to (pick random (1) to (2))\nshow\nset [ghost v] effect to (pick random (20) to (25))\ngo to [back v] layer\nswitch costume to (pick random (1) to (2))\nif <(side) = [1]> then\n    go to x: (300) y: (pick random (150) to (100))\n    repeat until <(x position) < [-290]>\n        go to [back v] layer\n        change x by (-0.5)\n    end\n    delete this clone\nend\nif <(side) = [2]> then\n    go to x: (-300) y: (pick random (150) to (100))\n    repeat until <(x position) > [270]>\n        go to [back v] layer\n        change x by (0.5)\n    end\n    delete this clone\nend\n\nwhen I receive [start game v]\nforever\n    create clone of (_myself_ v)\n    wait (pick random (40) to (50)) seconds\nend\n\n@Snow\n\nwhen I start as a clone\nshow\nchange size by (pick random (1) to (20))\ngo to x: (pick random (-240) to (240)) y: (180)\nif <(Level) > [7]> then\n    glide (pick random (5) to (7)) secs to x: (pick random (-240) to (240)) y: (-180)\nelse\n    glide (pick random (4) to (5)) secs to x: (pick random (-240) to (240)) y: (-180)\nend\ndelete this clone\n\nwhen I receive [start game v]\nwait (0.5) seconds\nhide\ngo [backward v] (1) layers\nforever\n    if <(SCREEN) = [1]> then\n        create clone of (_myself_ v)\n        wait (0.03) seconds\n    else\n        if <(Level) > [7]> then\n            create clone of (_myself_ v)\n            wait (0.2) seconds\n            create clone of (_myself_ v)\n        else\n            create clone of (_myself_ v)\n            wait (0.06) seconds\n            create clone of (_myself_ v)\n        end\n    end\nend\n\ndefine Snow\nSnow\n\nwhen I start as a clone\ngo [backward v] (77) layers\nforever\n    go [backward v] (3) layers\n    if <touching (water v)?> then\n        delete this clone\n    end\n    if <<touching color (#fdfdfd)?> and <(SCREEN) = [1]>> then\n        delete this clone\n    end\n    if <(SCREEN) = [0]> then\nend\n\ngo [backward v] (1) layers\ndelete this clone\n\n@Bounce Pad\n\nwhen I receive [intro done v]\nshow\ngo to [back v] layer\ngo to x: (0) y: (0)\nforever\n    go [backward v] (5) layers\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\n@Level Shading\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\ngo to x: (0) y: (0)\nshow\nshow\nforever\n    go to [back v] layer\n    set [ghost v] effect to (46)\n    switch costume to (Level)\nend\n\nwhen I receive [intro done v]\nforever\n    go to [back v] layer\nend\n\n@Next Level\n\nwhen flag clicked\ngo to [front v] layer\nhide\n\nwhen I receive [next level v]\nset [transition> v] to [1]\ngo to [front v] layer\nclear graphic effects\nshow\ngo to x: (5000) y: (0)\nrepeat until <(round (x position)) = [0]>\n    go to [front v] layer\n    change x by (((0) - (x position)) / (4))\nend\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nset [transition> v] to [0]\n\n@Screen\n\nwhen flag clicked\nhide\n\nwhen I receive [start game v]\nset [screen v] to [1]\ngo [backward v] (11) layers\nshow\nforever\n    if <(SCREEN) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\n@Text\n\nwhen flag clicked\nhide\n\nwhen I receive [start game v]\nwait (0.1) seconds\nshow\ngo [forward v] (9) layers\nforever\n    point in direction ((90) + (([sin v] of ((titleturn) * (5)) ) * (1.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\n@Play Button\n\nwhen I receive [start game v]\nshow\nwait until <<<touching (mouse-pointer v)?> and <mouse down?>> and <<not <(IN) = [1]>> and <not <(Visuals?) = [0]>>>>\nset [screen v] to [0]\nbroadcast (Transition v)\nbroadcast (Intro Done v)\nbroadcast (st v)\n\nwhen I receive [start game v]\nforever\n    if <touching (mouse-pointer v)?> then\n        if <<(SCREEN) = [1]> and <<not <(IN) = [1]>> and <not <(Visuals?) = [0]>>>> then\n            set volume to (70) %\n            start sound [Touch 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 [start game v]\nshow\nforever\n    point in direction ((90) + (([sin v] of ((titleturn) * (5)) ) * (1.5)))\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 (costume2 v)\n    else\n        change size by (((75) - (size)) / (5))\n        switch costume to (costume1 v)\n    end\nend\n\n@Play Character\n\nnext costume\nbroadcast (Next cos v)\n\nwhen I receive [right v]\nswitch costume to ((costume [number v]) + (1))\n\nnext costume\nbroadcast (Next cos v)\n\nwhen I receive [start game v]\nshow\ngo [forward v] (6) layers\nforever\n    point in direction ((90) + (([sin v] of ((timer) * (200)) ) * (8)))\nend\n\nwhen I receive [start game v]\nforever\n    if <<touching (mouse-pointer v)?> and <not <(IN) = [1]>>> then\n        if <<(SCREEN) = [1]> and <not <(IN) = [1]>>> then\n            start sound [Touch v]\n            wait until <not <touching (mouse-pointer v)?>>\n        end\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [start game v]\nshow\ngo [forward v] (6) layers\nforever\n    if <(SCREEN) = [1]> then\n        show\n    else\n        hide\n    end\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume7 v)\n        change size by (((89) - (size)) / (5))\n        if <<mouse down?> and <not <(IN) = [1]>>> then\n            start sound [Low Boing v]\n            repeat (3)\n                change size by (-3)\n            end\n            repeat (3)\n                change size by (3)\n            end\n            wait until <not <mouse down?>>\n        end\n    else\n        change size by (((76) - (size)) / (5))\n    end\nend\n\nwhen I receive [left v]\nswitch costume to ((costume [number v]) - (1))\n\n@Left\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [start game v]\nshow\nforever\n    point in direction ((90) + (([sin v] of ((titleturn) * (5)) ) * (1.5)))\n    if <(SCREEN) = [1]> then\n        show\n    else\n        hide\n    end\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n        change size by (((90) - (size)) / (5))\n        if <<mouse down?> and <not <(IN) = [1]>>> then\n            broadcast (left v)\n            wait until <not <mouse down?>>\n        end\n    else\n        switch costume to (costume1 v)\n        change size by (((75) - (size)) / (5))\n    end\nend\n\nnext costume\n\nwhen I receive [start game v]\nforever\n    if <<touching (mouse-pointer v)?> and <not <(IN) = [1]>>> then\n        if <(SCREEN) = [1]> then\n            start sound [Touch v]\n            wait until <not <touching (mouse-pointer v)?>>\n        end\n    end\nend\n\n@Right\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [start game v]\nshow\nforever\n    point in direction ((90) + (([sin v] of ((titleturn) * (5)) ) * (1.5)))\n    if <(SCREEN) = [1]> then\n        show\n    else\n        hide\n    end\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n        change size by (((90) - (size)) / (5))\n        if <<mouse down?> and <not <(IN) = [1]>>> then\n            broadcast (right v)\n            wait until <not <mouse down?>>\n        end\n    else\n        switch costume to (costume1 v)\n        change size by (((75) - (size)) / (5))\n    end\nend\n\nnext costume\n\nwhen I receive [start game v]\nforever\n    if <<touching (mouse-pointer v)?> and <not <(IN) = [1]>>> then\n        if <(SCREEN) = [1]> then\n            start sound [Touch v]\n            wait until <not <touching (mouse-pointer v)?>>\n        end\n    end\nend\n\n@instructions\n\nwhen I receive [start game v]\nforever\n    if <touching (mouse-pointer v)?> then\n        if <<(SCREEN) = [1]> and <<not <(IN) = [1]>> and <not <(Visuals?) = [0]>>>> then\n            set volume to (70) %\n            start sound [Touch 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 [start game v]\nshow\nforever\n    point in direction ((90) + (([sin v] of ((titleturn) * (5)) ) * (1.5)))\n    if <(SCREEN) = [1]> then\n        show\n    else\n        hide\n    end\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n        change size by (((80) - (size)) / (5))\n        if <<<mouse down?> and <<not <(IN) = [1]>> and <not <(Visuals?) = [0]>>>> and <(SCREEN) = [1]>> then\n            broadcast (in v)\n        end\n    else\n        change size by (((75) - (size)) / (5))\n        switch costume to (costume1 v)\n    end\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]\nshow\nclear graphic effects\nset size to (10) %\ngo to [front v] layer\nrepeat (20)\n    change size by (((100) - (size)) / (5))\nend\nwait until <<mouse down?> and <touching (mouse-pointer v)?>>\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\nset [in v] to [0]\n\n@Lasers\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 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) = [15]>\nhide\n\ndefine Bug Fixing\nif <(Level) = [15]> then\n    hide\nend\n\nwhen flag clicked\nforever\n    Bug Fixing\nend\n\n@Transitions\n\nwhen I receive [died v]\ncreate clone of (_myself_ v)\n\ndefine thing\nswitch costume to (hax v)\nset size to (size) %\nchange size by (((4100) - (size)) / (4))\nset [size v] to (size)\nswitch costume to (thing v)\n\ndefine other thing\nswitch costume to (hax v)\nset size to (size) %\nchange size by (((410) - (size)) / (6))\nset [size v] to (size)\nswitch costume to (weird thing v)\n\nwhen flag clicked\nhide\nforever\n    go to [front v] layer\n    go to [front v] layer\nend\n\nwhen I start as a clone\nset [transition> v] to [1]\ngo to x: (0) y: (0)\nset size to (0) %\nshow\nset [size v] to [100]\nrepeat until <(size) > [4080]>\n    thing\nend\nset size to (10) %\nset [size v] to [10]\nrepeat until <(size) > [400]>\n    other thing\nend\nhide\nbroadcast (Move v)\nset [transition> v] to [0]\ndelete this clone\n\nset [color v] effect to ((1) / (0))\n\n@LeftSaws\n\ndefine Glide Smoothly to xy (x) (y) Speed (s) Round? (r) GhostFX (gfx)\nif <<<(x) = [0]> or <(x) < [0]>> or <(x) > [0]>> then\n    if <<<(y) = [0]> or <(y) < [0]>> or <(y) > [0]>> then\n        if <<<(s) = [0]> or <(s) < [0]>> or <(s) > [0]>> then\n            if <(r) = [1]> then\n                repeat until <<(round (x position)) = (x)> and <(round (y position)) = (y)>>\n                    change x by (((x) - (x position)) / ((7) - (([abs v] of (round (s)) ) mod (5))))\n                    change y by (((y) - (y position)) / ((7) - (([abs v] of (round (s)) ) mod (5))))\n                    change [ghost v] effect by (gfx)\n                end\n            else\n                if <(r) = [0]> then\n                    repeat until <<(x position) = (x)> and <(y position) = (y)>>\n                        change x by (((x) - (x position)) / ((7) - (([abs v] of (round (s)) ) mod (5))))\n                        change y by (((y) - (y position)) / ((7) - (([abs v] of (round (s)) ) mod (5))))\n                        change [ghost v] effect by (gfx)\n                    end\n                else\n                    stop [this script v]\n                end\n            end\n            go to x: (x) y: (y)\n            clear graphic effects\n        else\n            stop [this script v]\n        end\n    else\n        stop [this script v]\n    end\nelse\n    stop [this script v]\nend\nstop [this script v]\n\nwhen flag clicked\nhide\nwait until <(Level) = [5]>\ngo to [back v] layer\nshow\nswitch costume to (1 v)\nrepeat until <not <(Level) = [5]>>\n    Glide Smoothly to xy (-142) (-94) Speed (1) Round? (1) GhostFX (0)\n    Glide Smoothly to xy (-80) (-94) Speed (1) Round? (1) GhostFX (0)\nend\nhide\n\nwhen flag clicked\nforever\n    turn right (3.5) degrees\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [6]> then\n        hide\n    end\nend\n\ngo to x: (-30) y: (40)\n\n@UpSaws\n\ndefine Glide Smoothly to xy (x) (y) Speed (s) Round? (r) GhostFX (gfx)\nif <<<(x) = [0]> or <(x) < [0]>> or <(x) > [0]>> then\n    if <<<(y) = [0]> or <(y) < [0]>> or <(y) > [0]>> then\n        if <<<(s) = [0]> or <(s) < [0]>> or <(s) > [0]>> then\n            if <(r) = [1]> then\n                repeat until <<(round (x position)) = (x)> and <(round (y position)) = (y)>>\n                    change x by (((x) - (x position)) / ((7) - (([abs v] of (round (s)) ) mod (5))))\n                    change y by (((y) - (y position)) / ((7) - (([abs v] of (round (s)) ) mod (5))))\n                    change [ghost v] effect by (gfx)\n                end\n            else\n                if <(r) = [0]> then\n                    repeat until <<(x position) = (x)> and <(y position) = (y)>>\n                        change x by (((x) - (x position)) / ((7) - (([abs v] of (round (s)) ) mod (5))))\n                        change y by (((y) - (y position)) / ((7) - (([abs v] of (round (s)) ) mod (5))))\n                        change [ghost v] effect by (gfx)\n                    end\n                else\n                    stop [this script v]\n                end\n            end\n            go to x: (x) y: (y)\n            clear graphic effects\n        else\n            stop [this script v]\n        end\n    else\n        stop [this script v]\n    end\nelse\n    stop [this script v]\nend\nstop [this script v]\n\nwhen flag clicked\nhide\nwait until <(Level) = [5]>\ngo to [back v] layer\nshow\nswitch costume to (1 v)\nrepeat until <not <(Level) = [5]>>\n    Glide Smoothly to xy (55) (-79) Speed (1) Round? (1) GhostFX (0)\n    Glide Smoothly to xy (55) (-40) Speed (1) Round? (1) GhostFX (0)\nend\nhide\n\nwhen flag clicked\nforever\n    turn right (3.5) degrees\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [7]> then\n        hide\n    end\nend\n\ngo to x: (-30) y: (40)\n\n@Ladders\n\nwhen I receive [intro done v]\nshow\ngo to [back v] layer\ngo to x: (0) y: (0)\nforever\n    go [backward v] (5) layers\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\n@UpSaws2\n\ndefine Glide Smoothly to xy (x) (y) Speed (s) Round? (r) GhostFX (gfx)\nif <<<(x) = [0]> or <(x) < [0]>> or <(x) > [0]>> then\n    if <<<(y) = [0]> or <(y) < [0]>> or <(y) > [0]>> then\n        if <<<(s) = [0]> or <(s) < [0]>> or <(s) > [0]>> then\n            if <(r) = [1]> then\n                repeat until <<(round (x position)) = (x)> and <(round (y position)) = (y)>>\n                    change x by (((x) - (x position)) / ((7) - (([abs v] of (round (s)) ) mod (5))))\n                    change y by (((y) - (y position)) / ((7) - (([abs v] of (round (s)) ) mod (5))))\n                    change [ghost v] effect by (gfx)\n                end\n            else\n                if <(r) = [0]> then\n                    repeat until <<(x position) = (x)> and <(y position) = (y)>>\n                        change x by (((x) - (x position)) / ((7) - (([abs v] of (round (s)) ) mod (5))))\n                        change y by (((y) - (y position)) / ((7) - (([abs v] of (round (s)) ) mod (5))))\n                        change [ghost v] effect by (gfx)\n                    end\n                else\n                    stop [this script v]\n                end\n            end\n            go to x: (x) y: (y)\n            clear graphic effects\n        else\n            stop [this script v]\n        end\n    else\n        stop [this script v]\n    end\nelse\n    stop [this script v]\nend\nstop [this script v]\n\nwhen flag clicked\nhide\nwait until <(Level) = [9]>\ngo to [back v] layer\nshow\nswitch costume to (1 v)\nrepeat until <not <(Level) = [9]>>\n    Glide Smoothly to xy (230) (-122) Speed (1) Round? (1) GhostFX (0)\n    Glide Smoothly to xy (230) (-20) Speed (1) Round? (1) GhostFX (0)\nend\nhide\n\nwhen flag clicked\nforever\n    turn right (3.5) degrees\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [10]> then\n        hide\n    end\nend\n\ngo to x: (-30) y: (40)\n\n@Music\n\nwhen flag clicked\nset [screen v] to [1]\nhide\n\nwhen I receive [start game v]\nset volume to (50) %\nshow\nswitch costume to (costume1 v)\nforever\n    point in direction ((90) + (([sin v] of ((titleturn) * (5)) ) * (1.5)))\n    if <(SCREEN) = [1]> then\n        go to x: (-50) y: (-72)\n    else\n        go to x: (-142) y: (-156)\n    end\n    if <touching (mouse-pointer v)?> then\n        if <(volume) = [50]> then\n            switch costume to (costume4 v)\n        else\n            switch costume to (costume2 v)\n        end\n        if <(SCREEN) = [1]> then\n            change size by (((80) - (size)) / (5))\n        else\n            change size by (((73) - (size)) / (5))\n        end\n    else\n        switch costume to (costume1 v)\n        if <(volume) = [50]> then\n            switch costume to (costume1 v)\n        else\n            switch costume to (costume5 v)\n        end\n        if <(SCREEN) = [1]> then\n            change size by (((75) - (size)) / (5))\n        else\n            change size by (((63) - (size)) / (5))\n        end\n    end\nend\n\nwhen I receive [start game v]\nwait (2) seconds\nforever\n    play sound [RetroVision - Campfire \[NCS Release\] v] until done\nend\n\nwhen this sprite clicked\nif <(volume) = [50]> then\n    switch costume to (costume5 v)\n    set volume to (0) %\nelse\n    switch costume to (costume1 v)\n    set volume to (50) %\nend\n\nif <(SCREEN) = [1]> then\n    go to x: (-50) y: (-72)\nelse\n    go to x: (-142) y: (-156)\nend\n\nwhen flag clicked\nwait until <(Level) = [15]>\nhide\n\nwhen flag clicked\nwait until <(Level) = [15]>\nhide\n\n@Tracker\n\nwhen flag clicked\nset [screen v] to [1]\nhide\n\nwhen I receive [start game v]\nshow\nforever\n    if <(SCREEN) = [1]> then\n        set size to (75) %\n        go to x: (-50) y: (-72)\n    else\n        set size to (65) %\n        go to x: (-142) y: (-156)\n    end\nend\n\nwhen I receive [start game v]\nforever\n    if <touching (mouse-pointer v)?> then\n        if <<not <(IN) = [1]>> and <not <(Visuals?) = [0]>>> then\n            set volume to (70) %\n            start sound [Touch v]\n            wait until <not <touching (mouse-pointer v)?>>\n        end\n    end\nend\n\nwhen flag clicked\nwait until <(Level) = [15]>\nhide\n\n@VisualsButton\n\nwhen I receive [start game v]\nforever\n    if <touching (mouse-pointer v)?> then\n        if <<(SCREEN) = [1]> and <<not <(IN) = [1]>> and <not <(Visuals?) = [0]>>>> then\n            start sound [Touch 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 [start game v]\nset volume to (50) %\nshow\nswitch costume to (costume1 v)\nforever\n    point in direction ((90) + (([sin v] of ((titleturn) * (5)) ) * (1.5)))\n    if <(SCREEN) = [1]> then\n        show\n    else\n        hide\n    end\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n        change size by (((80) - (size)) / (5))\n        if <mouse down?> then\n            broadcast (Visuals v)\n        end\n    else\n        change size by (((75) - (size)) / (5))\n        switch costume to (costume1 v)\n    end\nend\n\n@Visuals\n\nwhen flag clicked\nset [visuals? v] to [1]\nhide\n\nwhen I receive [visuals v]\nset [visuals? v] to [0]\nshow\nclear graphic effects\nset size to (10) %\ngo to [front v] layer\nrepeat (20)\n    change size by (((100) - (size)) / (5))\nend\nwait until <<mouse down?> and <touching (mouse-pointer v)?>>\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\nset [visuals? v] to [1]\n\n@LeftSaws2\n\ndefine Glide Smoothly to xy (x) (y) Speed (s) Round? (r) GhostFX (gfx)\nif <<<(x) = [0]> or <(x) < [0]>> or <(x) > [0]>> then\n    if <<<(y) = [0]> or <(y) < [0]>> or <(y) > [0]>> then\n        if <<<(s) = [0]> or <(s) < [0]>> or <(s) > [0]>> then\n            if <(r) = [1]> then\n                repeat until <<(round (x position)) = (x)> and <(round (y position)) = (y)>>\n                    change x by (((x) - (x position)) / ((7) - (([abs v] of (round (s)) ) mod (5))))\n                    change y by (((y) - (y position)) / ((7) - (([abs v] of (round (s)) ) mod (5))))\n                    change [ghost v] effect by (gfx)\n                end\n            else\n                if <(r) = [0]> then\n                    repeat until <<(x position) = (x)> and <(y position) = (y)>>\n                        change x by (((x) - (x position)) / ((7) - (([abs v] of (round (s)) ) mod (5))))\n                        change y by (((y) - (y position)) / ((7) - (([abs v] of (round (s)) ) mod (5))))\n                        change [ghost v] effect by (gfx)\n                    end\n                else\n                    stop [this script v]\n                end\n            end\n            go to x: (x) y: (y)\n            clear graphic effects\n        else\n            stop [this script v]\n        end\n    else\n        stop [this script v]\n    end\nelse\n    stop [this script v]\nend\nstop [this script v]\n\nwhen flag clicked\nhide\nwait until <(Level) = [11]>\ngo to [back v] layer\nshow\nswitch costume to (1 v)\nrepeat until <not <(Level) = [11]>>\n    Glide Smoothly to xy (126) (-71) Speed (1) Round? (1) GhostFX (0)\n    Glide Smoothly to xy (220) (-71) Speed (1) Round? (1) GhostFX (0)\nend\nhide\n\nwhen flag clicked\nforever\n    turn right (3.5) degrees\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [12]> then\n        hide\n    end\nend\n\n@IceParts\n\nwhen I receive [intro done v]\nshow\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\n@Key\n\nwhen flag clicked\nclear graphic effects\nhide\nwait until <(Level) = [15]>\nshow\nwait until <touching (player v)?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Lasers2\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    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\ndefine Bug Fixing\nif <(Level) = [16]> then\n    hide\nend\n\nwhen flag clicked\nforever\n    Bug Fixing\nend\n\n