✦ Dark Cave || A platformer ✦
@Stage\n\n@Player\n\nwhen flag clicked\npoint in direction (90)\ngo to x: (0) y: (0)\nswitch costume to (2 v)\nswitch backdrop to (home v)\nhide\n\nwhen I receive [intro3 v]\ngo to [front v] layer\ngo [backward v] (1) layers\nshow\n\nwhen I receive [intro3 v]\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nswitch costume to (1 v)\nrepeat (10)\n    change size by (-6)\n    change [ghost v] effect by (8)\nend\ndelete this clone\n\nwhen I receive [play !!! v]\nstop all sounds\nforever\n    play sound [Mystery Spy v] until done\nend\n\nwhen I receive [play !!! v]\nswitch backdrop to (black could v)\n\nwhen I receive [play !!! v]\nshow\ngo to [front v] layer\nglide (0.25) secs to x: (-200) y: (0)\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <key (right arrow v) pressed?> then\n        point in direction (90)\n        change [xv v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        point in direction (-90)\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                        end\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 [yv v] to [0]\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 <touching (level v)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching (level v)?> 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 <(x position) > [220]> then\n        set [xv v] to [0]\n        set [yv v] to [0]\n        start sound [Magic Spell v]\n        broadcast (new v)\n        go to x: (-200) y: (0)\n    end\n    if <[-160] > (y position)> then\n        set [xv v] to [0]\n        set [yv v] to [0]\n        start sound [Oops v]\n        repeat (20)\n            change [ghost v] effect by (5)\n            change size by (.2)\n            change [pixelate v] effect by (8)\n        end\n        set size to (15) %\n        clear graphic effects\n        go to x: (-200) y: (0)\n        set size to (100) %\n    end\n    if <touching (spikes v)?> then\n        set [xv v] to [0]\n        set [yv v] to [0]\n        start sound [Oops v]\n        repeat (20)\n            change [ghost v] effect by (5)\n            change size by (.2)\n            change [pixelate v] effect by (8)\n        end\n        set size to (15) %\n        clear graphic effects\n        go to x: (-200) y: (0)\n        set size to (100) %\n    end\n    if <touching (toxic water v)?> then\n        set [xv v] to [0]\n        set [yv v] to [0]\n        start sound [Oops v]\n        repeat (20)\n            change [ghost v] effect by (5)\n            change size by (.2)\n            change [pixelate v] effect by (8)\n        end\n        set size to (15) %\n        clear graphic effects\n        go to x: (-200) y: (0)\n        set size to (100) %\n    end\n    if <touching (danger v)?> then\n        set [xv v] to [0]\n        set [yv v] to [0]\n        start sound [Oops v]\n        repeat (20)\n            change [ghost v] effect by (5)\n            change size by (.2)\n            change [pixelate v] effect by (8)\n        end\n        set size to (15) %\n        clear graphic effects\n        go to x: (-200) y: (0)\n        set size to (100) %\n    end\nend\n\nwhen I receive [change v]\n\nwhen I receive [change v]\nnext costume\n\nwhen I receive [end v]\nwait (1) seconds\nstop all sounds\nstop [other scripts in sprite v]\nswitch backdrop to (end v)\nglide (0.2) secs to x: (0) y: (0)\nforever\n    play sound [MountainSiffle v] until done\nend\n\n@SuperCookii\n\nwhen flag clicked\ngo to x: (0) y: (0)\nclear graphic effects\npoint in direction (90)\nswitch costume to (supercookii v)\nset size to (200) %\nchange [ghost v] effect by (10)\nshow\nrepeat (20)\n    change size by (-10)\n    change [ghost v] effect by (-5)\nend\nrepeat (24)\n    change size by (4)\nend\nset size to (125) %\nwait (0.2) seconds\nset size to (100) %\nbroadcast (intro1 v)\n\nwhen flag clicked\nplay sound [MountainSiffle v] until done\nstop [other scripts in sprite v]\nbroadcast (intro3 v)\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\n\nwhen I receive [intro2 v]\nset rotation style [all around v]\nrepeat (10)\n    turn right (5) degrees\n    change size by (1)\nend\nrepeat (10)\n    turn left (5) degrees\nend\nwait (0.2) seconds\nrepeat (10)\n    turn left (5) degrees\n    change size by (-1)\nend\nrepeat (10)\n    turn right (5) degrees\nend\nbroadcast (message1 v)\n\nwhen flag clicked\nrepeat until <(backdrop [name v]) = [Black Cloud]>\n    go to [front v] layer\n    go [backward v] (1) layers\nend\n\nwhen I receive [end v]\ngo to [front v] layer\nshow\ngo to x: (-200) y: (-150)\nset size to (20) %\n\n@SuperCookiiTitle\n\nwhen I receive [message1 v]\nclear graphic effects\nset size to (200) %\nset [pixelate v] effect to (100)\ngo to [front v] layer\nshow\nrepeat (25)\n    change size by (-2)\n    change [pixelate v] effect by (-4)\nend\nset size to (100) %\nwait (2) seconds\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [intro3 v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\n\n@Transitions\n\nwhen flag clicked\nhide\nclear graphic effects\nswitch costume to (2 v)\ngo to [back v] layer\nshow\n\nwhen I receive [intro1 v]\nswitch costume to (1 v)\nshow\ncreate clone of (_myself_ v)\nwait (0.5) seconds\nswitch costume to (3 v)\ncreate clone of (_myself_ v)\nwait (0.5) seconds\ngo to x: (0) y: (0)\nswitch costume to (2 v)\nbroadcast (intro2 v)\n\nwhen I start as a clone\ngo to [front v] layer\ngo [backward v] (1) layers\nchange [color v] effect by (50)\ngo to x: (500) y: (0)\nglide (0.6) secs to x: (-500) y: (0)\ndelete this clone\n\nrepeat (3)\n\nwhen I receive [intro3 v]\nswitch costume to (1 v)\nshow\ncreate clone of (_myself_ v)\nwait (0.6) seconds\nhide\n\nrepeat (5)\n    change [ghost v] effect by (20)\nend\n\nswitch costume to (3 v)\ncreate clone of (_myself_ v)\nwait (0.6) seconds\ngo to x: (0) y: (0)\nswitch costume to (2 v)\nbroadcast (intro2 v)\n\n@play\n\nwhen flag clicked\nset size to (150) %\npoint in direction (90)\nhide\n\nwhen I receive [intro3 v]\ngo to [back v] layer\nshow\nset rotation style [all around v]\nforever\n    repeat (10)\n        turn right (1) degrees\n        change size by (1)\n    end\n    repeat (10)\n        turn left (1) degrees\n    end\n    wait (1) seconds\n    repeat (10)\n        turn left (1) degrees\n        change size by (-1)\n    end\n    repeat (10)\n        turn right (1) degrees\n    end\nend\n\nwhen I receive [intro3 v]\nrepeat until <(backdrop [name v]) = [Black Could]>\n    play sound [... v] until done\nend\n\nwhen this sprite clicked\nbroadcast (PLAY !!! v)\nhide\n\n@change\n\nwhen flag clicked\nset size to (160) %\npoint in direction (90)\nhide\n\nwhen I receive [intro3 v]\ngo to [back v] layer\nshow\n\nwhen this sprite clicked\nbroadcast (change v)\n\nwhen I receive [play !!! v]\nhide\n\n@Sprite2\n\nwhen I receive [intro3 v]\nhide\nforever\n    create clone of (_myself_ v)\n    wait (0.2) seconds\nend\n\nwhen I start as a clone\nshow\ngo to [back v] layer\nset [ghost v] effect to (pick random (45) to (90))\nset size to (pick random (40) to (70)) %\ngo to x: (240) y: (pick random (-180) to (180))\nglide (pick random (1) to (3)) secs to x: (-240) y: (pick random (-180) to (180))\ndelete this clone\n\nwhen flag clicked\nhide\n\n@level\n\nwhen flag clicked\nswitch costume to (1 v)\nhide\n\nwhen I receive [play !!! v]\nshow\n\nwhen I receive [new v]\nif <(costume [name v]) = [20]> then\n    broadcast (end v)\nelse\n    next costume\nend\n\nwhen I receive [end v]\nswitch costume to (1 v)\nstop [other scripts in sprite v]\n\n@spikes\n\nwhen flag clicked\nswitch costume to (1 v)\nhide\n\nwhen I receive [play !!! v]\nshow\n\nwhen I receive [new v]\nnext costume\n\nwhen I receive [end v]\nhide\nstop [other scripts in sprite v]\n\n@Sprite4\n\nwhen flag clicked\nhide\n\nwhen I receive [intro3 v]\nshow\n\nwhen I receive [intro3 v]\nforever\n    go to [back v] layer\n    go to (player v)\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nforever\n    go to [back v] layer\n    go to (player v)\nend\n\n@Deco\n\nwhen I receive [play !!! v]\nshow\nforever\n    go to [back v] layer\nend\n\nwhen flag clicked\nswitch costume to (1 v)\nhide\n\nwhen I receive [new v]\nnext costume\n\nwhen I receive [end v]\nswitch costume to (1 v)\nstop [other scripts in sprite v]\n\n@toxic water\n\nwhen flag clicked\ngo to x: (0) y: (-10)\ngo to [back v] layer\nswitch costume to (1 v)\nhide\n\nwhen I receive [play !!! v]\nshow\n\nwhen I receive [new v]\nnext costume\n\nwhen I receive [play !!! v]\nwait until <(costume [name v]) = [3]>\nset size to (50) %\ngo to x: (0) y: (-10)\n\nwhen I receive [end v]\nhide\nstop [other scripts in sprite v]\n\n@danger\n\nwhen flag clicked\ngo to [back v] layer\nswitch costume to (1 v)\nhide\n\nwhen I receive [play !!! v]\nshow\nset rotation style [all around v]\nforever\n    turn right (3) degrees\nend\n\nwhen I receive [new v]\nnext costume\n\nwhen I receive [play !!! v]\nwait until <(costume [name v]) = [4]>\ngo to x: (0) y: (-90)\n\nwhen I receive [play !!! v]\nwait until <(costume [name v]) = [8]>\ngo to x: (160) y: (-90)\n\nwhen I receive [play !!! v]\nwait until <(costume [name v]) = [9]>\ngo to x: (-75) y: (-90)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(costume [name v]) = [9]> then\n    go to x: (175) y: (-90)\n    wait until <(costume [name v]) = [10]>\n    delete this clone\nelse\n    if <(costume [name v]) = [10]> then\n        go to x: (-175) y: (190)\n        wait until <(costume [name v]) = [11]>\n        delete this clone\n    else\n        go to x: (0) y: (180)\n        wait until <(costume [name v]) = [13]>\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nshow\nset rotation style [all around v]\nforever\n    turn right (3) degrees\nend\n\nwhen I receive [play !!! v]\nwait until <(costume [name v]) = [10]>\ngo to x: (160) y: (-90)\ncreate clone of (_myself_ v)\n\nwhen I receive [play !!! v]\nwait until <(costume [name v]) = [12]>\ngo to x: (0) y: (-90)\ncreate clone of (_myself_ v)\n\nwhen I receive [play !!! v]\nwait until <(costume [name v]) = [15]>\ngo to x: (110) y: (-90)\n\nwhen I receive [end v]\nhide\nstop [other scripts in sprite v]\n\n@Miniature\n\nwhen flag clicked\nhide\n\n
 ✦ Dark Cave || A platformer ✦\n\n✭ Use the arrows to advance or jump ;) !\n✭ Don't touch the spikes !\n✭ Win and have fun ;) !