Minimalistic - Platformer
@Stage\n\nwhen I receive [tick v]\ndelete all of [items v]\nadd (join (join [Mouse: \(] ((*SCROLL X) + (mouse x))) (join [, ] (join (mouse y) [\)]))) to [items v]\nadd (join (join [Player: \(] ([x v] of [platformer script v])) (join [, ] (join ([y v] of [platformer script v]) [\)]))) to [items v]\n\nwhen I receive [stop music v]\nstop [other scripts in sprite v]\n\nwhen flag clicked\nif <key (space v) pressed?> then\n    set volume to (0) %\nelse\n    set volume to (100) %\nend\nforever\n    play sound [Chrisopoeia_Lena Raine2 v] until done\n    play sound [Chrisopoeia_Lena Raine3 v] until done\n    play sound [Chrisopoeia_Lena Raine4 v] until done\nend\n\nwhen flag clicked\nshow list [items v]\nforever\n    wait until <not <key (1 v) pressed?>>\n    wait until <key (1 v) pressed?>\n    hide list [items v]\n    wait until <not <key (1 v) pressed?>>\n    wait until <key (1 v) pressed?>\n    show list [items v]\nend\n\n@Blank\n\n@Level\n\nwhen I receive [tick v]\nPosition ((x) - (*SCROLL X))\n\nwhen I receive [set up v]\nshow\nset [x v] to [-480]\nswitch costume to (1 v)\nClone\n\ndefine Position (x)\nset [costume v] to (costume [number v])\nswitch costume to (1 v)\nset size to ((1) / ()) %\ngo to x: (x) y: (0)\nswitch costume to (costume)\nset size to (100) %\nif <([abs v] of (x position) ) > [480]> then\n    hide\nelse\n    show\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\ndefine Clone\nrepeat (14)\n    Clone at x: [480] y: [0]\nend\n\n@Platformer Script\n\nwhen flag clicked\nhide\ngo to [front v] layer\nbroadcast (Play Game v) and wait\n\nwhen I receive [play game v]\nset [level v] to [1]\nif <(First) = [0]> then\n    Load\n    repeat (75)\n        broadcast (Tick v) and wait\n    end\n    set [first v] to [1]\nend\nforever\n    Load\n    repeat until <(EXIT) > []>\n        Tick\n        broadcast (Tick v) and wait\n    end\n    if <(EXIT) = [Win]> then\n        broadcast (Win Screen v)\n    else\n        Game - Die\n    end\nend\n\ndefine Game On\nset [*scroll x v] to [0]\nset [x v] to [-150]\nset [y v] to [-76]\nset [sx v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset [health v] to [20]\nset [player knockback v] to [0]\nset [invisibility v] to [0]\nset [start run? v] to [0]\nset [*heal v] to [0]\nset [*attack strength v] to [6]\nPosition\npoint in direction (90)\nset volume to (100) %\nset size to (40) %\nclear graphic effects\nshow\n\ndefine Tick\nswitch costume to (1 v)\nset rotation style [don't rotate v]\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(Player Knockback) = [0]>> then\n    change [taylor swift v] by (1)\nelse\n    set [taylor swift v] to [0]\nend\nif <(Start Run?) = [0]> then\n    reset timer\nend\nif <(Player Knockback) = [0]> then\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        point in direction (90)\n        change [sx v] by (2)\n        set [start run? v] to [1]\n        set [*movement? v] to (timer)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        point in direction (-90)\n        change [sx v] by (-2)\n        set [start run? v] to [1]\n        set [*movement? v] to (timer)\n    end\n    set [sx v] to ((sx) * (0.8))\nend\nif <([attack v] of [sword v]) = [1]> then\n    set [*movement? v] to (timer)\nend\nif <([abs v] of (sx) ) > [0.9]> then\n    Change Player x by (round (sx))\nend\nif <(Player Knockback) = [0]> then\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(Taylor Swift) < [5]>> then\n        set [start run? v] to [1]\n        set [*movement? v] to (timer)\n        if <(in air) < [4]> then\n            set [sy v] to [16]\n        end\n    end\nend\nif <(sy) > [-20]> then\n    change [sy v] by (-2)\nend\nChange player y by (sy)\nPosition\nif <(*SCROLL X) < [6240]> then\n    set [*scroll x v] to (x)\nend\nif <(*SCROLL X) < [0]> then\n    set [*scroll x v] to [0]\nend\nif <(*SCROLL X) > ((480) * (13))> then\n    set [*scroll x v] to ((480) * (13))\nend\nif <(x) < [-240]> then\n    set [x v] to [-240]\nend\nif <(*SCROLL X) = [6240]> then\n    if <(x) < [6000]> then\n        set [x v] to [6000]\n    end\nend\nif <(x) > [6480]> then\n    set [x v] to [6480]\nend\nset rotation style [left-right v]\nPosition\nif <<(y) < [-180]> or <<(Health) < [1]> or <touching (lava v)?>>> then\n    set [exit v] to [Die]\nend\nif <<<touching (entities v)?> or <touching (arrow v)?>> and <<(Player Knockback) = [0]> and <(Invisibility) = [0]>>> then\n    set [player knockback v] to [1]\n    set [invisibility v] to [1]\n    set [sy v] to [10]\n    set [sx v] to ((Hit) / (15))\nend\nif <(timer) > ((*Movement?) + (1))> then\n    change [*heal v] by (1)\n    if <<((*Heal) mod (10)) = [0]> and <(Health) < [20]>> then\n        change [health v] by (2)\n    end\nelse\n    set [*heal v] to [0]\nend\nif <<(in air) > [0]> and <(sy) < [0]>> then\n    set [*attack strength v] to [8]\nelse\n    set [*attack strength v] to [6]\nend\nif <(Player Knockback) = [1]> then\n    if <(sy) < [0]> then\n        set [player knockback v] to [0]\n    end\nend\nif <(Invisibility) > [0]> then\n    set [ghost v] effect to (20)\n    if <(Invisibility) = [2]> then\n        broadcast (Hurt v)\n        start sound [Hurt v]\n        change [health v] by ((*Enemy Attack) * (-1))\n    end\n    change [invisibility v] by (1)\n    if <(Invisibility) > [50]> then\n        set [invisibility v] to [0]\n    end\nelse\n    set [ghost v] effect to (0)\nend\nif <<touching (fire v)?> and <(Invisibility) = [0]>> then\n    start sound [Fire v]\n    set [invisibility v] to [40]\n    change [health v] by (-2)\nend\nif <touching (fire v)?> then\n    switch costume to (3 v)\nend\nif <(Player Knockback) = [0]> then\n    switch costume to (2 v)\nelse\n    switch costume to (3 v)\nend\nif <<(-Love Project) = [1]> and <(-Favorite Project) = [1]>> then\n    switch costume to ((costume [number v]) + (2))\nend\n\ndefine Change player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (level v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\ndefine Position\ngo to x: ((x) - (*SCROLL X)) y: (y)\n\ndefine Change Player x by (sx)\nchange [x v] by (sx)\nPosition\nif <touching (level v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (level v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    repeat until <not <touching (level v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Game - Die\nbroadcast (Dead v)\nset [exit v] to []\nrepeat (5)\n    hide\n    wait (0.1) seconds\n    show\n    wait (0.1) seconds\nend\nhide\nwait (0.5) seconds\n\ndefine Game Win\nrepeat (50)\n    point towards (exit v)\n    turn right (65) degrees\n    move ((distance to [exit v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nhide\nchange [level v] by (1)\nwait (1) seconds\n\nwhen I receive [win screen v]\nstop [other scripts in sprite v]\n\ndefine Load\nGame On\nbroadcast (Reset v) and wait\nbroadcast (Set up v) and wait\nbroadcast (Setup 2 v)\nbroadcast (Tick v) and wait\n\nset [first v] to [0]\n\nset [x v] to [6100]\nset [y v] to [50]\n\n@Background\n\nwhen I receive [grenn flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (*SCROLL X))\n\nwhen I receive [set up v]\nshow\nset [x v] to [-480]\nset [y v] to [0]\nswitch costume to (1 v)\nClone\n\ndefine Position (x)\nset [costume v] to (costume [number v])\nswitch costume to (1 v)\nset size to ((1) / ()) %\ngo to x: (x) y: (0)\nswitch costume to (costume)\nset size to (100) %\nset [brightness v] effect to (-12)\nif <([abs v] of (x position) ) > [480]> then\n    hide\nelse\n    show\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\ndefine Clone\nrepeat (15)\n    Clone at x: [480] y: [0]\nend\n\n@Sword\n\nwhen I receive [tick v]\nif <([direction v] of [platformer script v]) = [90]> then\n    go to x: (([x position v] of [platformer script v]) + (44)) y: (([y position v] of [platformer script v]) + ((7) + ((Direction) / (-3))))\n    point in direction ((Direction) + (90))\n    switch costume to (1 v)\nelse\n    go to x: (([x position v] of [platformer script v]) + (-44)) y: (([y position v] of [platformer script v]) + ((7) + ((Direction) / (-3))))\n    point in direction ((90) - (Direction))\n    switch costume to (2 v)\nend\nif <([invisibility v] of [platformer script v]) > [0]> then\n    set [ghost v] effect to (20)\nelse\n    set [ghost v] effect to (0)\nend\n\nwhen I receive [set up v]\nshow\n\nwhen flag clicked\nshow\nset size to (30) %\nset [direction v] to [0]\nforever\n    if <<key (space v) pressed?> or <<key (x v) pressed?> or <key (m v) pressed?>>> then\n        set [attack v] to [1]\n        repeat (5)\n            change [direction v] by (12)\n        end\n        repeat (2)\n            change [direction v] by (-24)\n        end\n        set [attack v] to [0]\n        set [direction v] to [0]\n        wait (0.4) seconds\n        wait until <not <<key (space v) pressed?> or <<key (x v) pressed?> or <key (m v) pressed?>>>>\n    end\nend\n\nwhen I receive [dead v]\nrepeat (5)\n    hide\n    wait (0.1) seconds\n    show\n    wait (0.1) seconds\nend\nhide\nwait (0.5) seconds\n\n@Entities\n\ndefine Clone (clone) X (x) Y (y) Bound 1 (bound 1) Bound 2 (bound 2)\nset [clone v] to (clone)\nset [x v] to (x)\nset [y v] to (y)\nset [bound 1 v] to (bound 1)\nset [bound 2 v] to (bound 2)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nReset\n\nwhen I receive [tick v]\nset [costume v] to (costume [number v])\nswitch costume to (bypass v)\nset size to ((1) / ()) %\ngo to x: ((x) - (*SCROLL X)) y: (y)\nswitch costume to (costume)\nset size to (110) %\nif <([abs v] of (x position) ) > [480]> then\n    hide\nelse\n    show\nend\nif <([abs v] of (x position) ) < [280]> then\n    Clone AI\nend\nif <(x) > [6480]> then\n    set [x v] to [6480]\nend\n\nwhen I receive [delete clones v]\ndelete this clone\n\ndefine Reset\nset [knockback v] to [0]\nset [y velocity v] to [0]\nif <(clone) = [1]> then\n    set [health v] to [40]\nelse\n    set [health v] to [20]\nend\nset [invisibility v] to [1]\n\nwhen I receive [dead v]\nstop [other scripts in sprite v]\n\ndefine Clone AI\nif <(clone) = [1]> then\n    Move Script Costume 1 [1] Costume 2 [2] Speed [1] Strength [6]\nend\nif <(clone) = [2]> then\n    Move Script Costume 1 [3] Costume 2 [4] Speed [0.8] Strength [4]\nend\nif <(clone) = [3]> then\n    Move Script Costume 1 [9] Costume 2 [10] Speed [1] Strength [8]\nend\nif <(clone) = [4]> then\n    set size to (90) %\n    if <(Knockback) = [0]> then\n        switch costume to (7 v)\n        if <(x position) > ([x position v] of [platformer script v])> then\n            point in direction (-90)\n        else\n            point in direction (90)\n        end\n        if <(x) > [6235]> then\n            change [x velocity v] by (-1)\n        end\n        if <(x) < [6230]> then\n            change [x velocity v] by (1)\n        end\n        set [x velocity v] to ((x velocity) * (0.8))\n        change [x v] by (x velocity)\n        if <touching (hitbox v)?> then\n            set [knockback v] to [1]\n            set [y velocity v] to [5]\n            set [x velocity v] to (([direction v] of [platformer script v]) / (10))\n            change [health v] by ((*Attack Strength) * (-1))\n            if <(Health) < [1]> then\n                start sound [Blaze Death v]\n                change [*enemies defeated v] by (1)\n                if <(*SCROLL X) = [6240]> then\n                    change [*progress v] by (1)\n                end\n            else\n                start sound (pick random (5) to (7))\n            end\n            if <([sy v] of [platformer script v]) < [0]> then\n                start sound [Critical v]\n            end\n        end\n    end\n    if <(Knockback) = [1]> then\n        switch costume to (8 v)\n        change [x v] by (x velocity)\n        if <(direction) = [-90]> then\n            change [x velocity v] by (-1)\n        else\n            change [x velocity v] by (1)\n        end\n        if <(x velocity) = [0]> then\n            set [knockback v] to [0]\n        end\n    end\n    if <(Health) < [1]> then\n        delete this clone\n    end\n    if <(Arrow Tick) > [50]> then\n        set [arrow tick v] to [0]\n        replace item (1) of [arrow v] with (x)\n        replace item (2) of [arrow v] with (y)\n        replace item (3) of [arrow v] with (direction)\n        replace item (4) of [arrow v] with [2]\n        create clone of (arrow v)\n    end\n    change [arrow tick v] by (1)\nend\n\nwhen I receive [reset v]\nset [*enemies defeated v] to [0]\nset [*progress v] to [0]\nbroadcast (Delete Clones v)\ndelete all of [arrow v]\nrepeat (4)\n    add [0] to [arrow v]\nend\nswitch costume to (bypass v)\nClone [1] X [1540] Y [-33] Bound 1 [1240] Bound 2 [1540]\nClone [1] X [2140] Y [-33] Bound 1 [1715] Bound 2 [2140]\nClone [1] X [2615] Y [-33] Bound 1 [2315] Bound 2 [2615]\nClone [2] X [3860] Y [-30] Bound 1 [3660] Bound 2 [3910]\nClone [2] X [4160] Y [-30] Bound 1 [3990] Bound 2 [4240]\nClone [3] X [4900] Y [-33] Bound 1 [4615] Bound 2 [4900]\nClone [2] X [5205] Y [-33] Bound 1 [4920] Bound 2 [5205]\nClone [3] X [5510] Y [-33] Bound 1 [5225] Bound 2 [5510]\nClone [2] X [5815] Y [-33] Bound 1 [5530] Bound 2 [5815]\nset [x v] to [-9999]\nset [y v] to [-9999]\n\ndefine Move Script Costume 1 (costume 1) Costume 2 (costume 2) Speed (speed) Strength (strength)\nswitch costume to (costume 1)\nif <(Knockback) = [0]> then\n    if <(x position) > ([x position v] of [platformer script v])> then\n        if <(x) > (bound 1)> then\n            change [x velocity v] by ((speed) * (-1))\n            point in direction (-90)\n        end\n    else\n        if <(x) < (bound 2)> then\n            change [x velocity v] by (speed)\n            point in direction (90)\n        end\n    end\n    set [x velocity v] to ((x velocity) * (0.8))\n    if <touching (hitbox v)?> then\n        set [knockback v] to [1]\n        set [y velocity v] to [5]\n        set [x velocity v] to (([direction v] of [platformer script v]) / (30))\n        change [health v] by ((*Attack Strength) * (-1))\n        if <([sy v] of [platformer script v]) < [0]> then\n            start sound [Critical v]\n        end\n        if <(Health) < [1]> then\n            if <(clone) = [1]> then\n                start sound [Enderman 5 v]\n                change [*enemies defeated v] by (1)\n            else\n                start sound [skeletondeath v]\n                if <(*SCROLL X) = [6240]> then\n                    change [*progress v] by (1)\n                end\n            end\n        else\n            if <(clone) = [1]> then\n                start sound (pick random (9) to (12))\n            else\n                start sound [skeletonhurt2 v]\n            end\n        end\n    end\nend\nchange [x v] by (x velocity)\nif <touching (platformer script v)?> then\n    set [*enemy attack v] to (strength)\n    set [hit v] to (direction)\nend\nif <(Knockback) = [1]> then\n    switch costume to (costume 2)\n    change [y v] by (y velocity)\n    change [y velocity v] by (-1)\n    if <<<touching (level v)?> or <touching (lava v)?>> and <(y velocity) < [0]>> then\n        set [knockback v] to [0]\n        change [y v] by (10)\n        if <<(clone) = [1]> and <(y) < [-80]>> then\n            set [x v] to (bound 2)\n            set [y v] to [-33]\n        end\n    end\nend\nif <(Health) < [1]> then\n    delete this clone\nend\nif <(clone) = [2]> then\n    if <(Arrow Tick) > [50]> then\n        start sound [Arrow v]\n        set [arrow tick v] to [0]\n        replace item (1) of [arrow v] with (x)\n        replace item (2) of [arrow v] with (y)\n        replace item (3) of [arrow v] with (direction)\n        replace item (4) of [arrow v] with [1]\n        create clone of (arrow v)\n    end\n    change [arrow tick v] by (1)\nend\n\nwhen I receive [setup 2 v]\nwait until <(*SCROLL X) = [6240]>\nbroadcast (Delete Clones v)\nClone [4] X [6480] Y [60] Bound 1 [0] Bound 2 [0]\nClone [3] X [6480] Y [-33] Bound 1 [6015] Bound 2 [6480]\nset [x v] to [-9999]\nset [y v] to [-9999]\nwait until <(*Progress) = [2]>\nwait (0.5) seconds\nset [exit v] to [Win]\n\n@Hitbox\n\nwhen I receive [tick v]\nset size to (25) %\nif <([direction v] of [platformer script v]) = [90]> then\n    go to x: (([x position v] of [platformer script v]) + (44)) y: (([y position v] of [platformer script v]) + (3))\nelse\n    go to x: (([x position v] of [platformer script v]) + (-44)) y: (([y position v] of [platformer script v]) + (3))\nend\nif <([attack v] of [sword v]) = [0]> then\n    hide\nelse\n    show\nend\nset [ghost v] effect to (100)\n\n@Health\n\nwhen I receive [tick v]\nswitch costume to ((([health v] of [platformer script v]) / (2)) + (1))\nif <([health v] of [platformer script v]) < [5]> then\n    set y to (pick random (-147) to (-152))\nelse\n    set y to (-150)\nend\n\nwhen I receive [hurt v]\nset [brightness v] effect to (100)\nwait (0.1) seconds\nset [brightness v] effect to (0)\n\nwhen I receive [dead v]\ngo to x: (0) y: (-150)\nif <([health v] of [platformer script v]) > [0]> then\n    start sound [hurt v]\nend\nset [brightness v] effect to (100)\nwait (0.1) seconds\nswitch costume to (health0 v)\nset [brightness v] effect to (0)\n\nwhen I receive [win screen v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\ngo to x: (0) y: (-150)\n\n@Thumbnail\n\nwhen flag clicked\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\nend\n\n@Arrow\n\nwhen I start as a clone\nshow\nset size to (25) %\nset [extra time v] to [0]\nswitch costume to (item (4) of [arrow v])\nif <(costume [number v]) = [1]> then\n    set [arrow x v] to (item (1) of [arrow v])\n    set [arrow y v] to (item (2) of [arrow v])\n    Position\nelse\n    go to x: ([floor v] of ((item (1) of [arrow v]) - (*SCROLL X)) ) y: (item (2) of [arrow v])\nend\nif <(costume [number v]) = [1]> then\n    set [arrow direction v] to (item (3) of [arrow v])\nelse\n    start sound [Fireball v]\n    point towards (platformer script v)\n    set [dir v] to (direction)\nend\nset [arrow travel x v] to [0]\n\nwhen I receive [delete clones v]\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [tick v]\nif <(costume [number v]) = [1]> then\n    if <(arrow direction) = [-90]> then\n        change [arrow travel x v] by (-20)\n        point in direction (90)\n    else\n        change [arrow travel x v] by (20)\n        point in direction (-90)\n    end\n    Position\n    if <<([abs v] of (x position) ) > [240]> or <touching (platformer script v)?>> then\n        change [extra time v] by (1)\n        if <(Extra Time) > [3]> then\n            delete this clone\n        end\n    end\n    if <touching (platformer script v)?> then\n        set [hit v] to (direction)\n        set [*enemy attack v] to [4]\n    end\nend\nif <(costume [number v]) = [2]> then\n    change x by (([sin v] of (dir) ) * (15))\n    change y by (([cos v] of (dir) ) * (15))\n    if <touching (platformer script v)?> then\n        set [hit v] to (direction)\n        set [*enemy attack v] to [4]\n        change [extra time v] by (1)\n        if <(Extra Time) > [3]> then\n            delete this clone\n        end\n    end\n    if <<touching (level v)?> or <([abs v] of (x position) ) > [235]>> then\n        delete this clone\n    end\nend\n\ndefine Position\ngo to x: (((arrow x) - (*SCROLL X)) + (arrow travel x)) y: (arrow y)\n\n@Win Screen\n\nwhen flag clicked\nhide\n\nwhen I receive [win screen v]\nshow\nswitch costume to (3 v)\nset [ghost v] effect to (100)\ngo to [front v] layer\ncreate clone of (_myself_ v)\nrepeat (10)\n    change [ghost v] effect by (-3)\nend\n\nwhen I start as a clone\nshow\nif <(*Enemies Defeated) < [4]> then\n    switch costume to (1 v)\nelse\n    switch costume to (2 v)\nend\nset [ghost v] effect to (100)\ngo to [front v] layer\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [win screen v]\nchange [☁ completed platformer v] by (1)\nif <(*Enemies Defeated) > [4]> then\n    change [☁ beat the game v] by (1)\nend\nplay sound [Win v] until done\n\n@Text:\n\ndefine Write Text (text)\ngo to x: (-150) y: (153)\nset [i v] to [1]\nrepeat (length of (text))\n    switch costume to (letter (i) of (text))\n    change [i v] by (1)\n    create clone of (_myself_ v)\n    change x by (20)\nend\n\nwhen I start as a clone\nshow\n\nwhen I receive [delete text v]\ndelete this clone\n\nwhen I receive [tick v]\nbroadcast (Delete Text v)\nWrite Text (timer)\ngo to x: (-197) y: (153)\nif <([first v] of [platformer script v]) = [1]> then\n    switch costume to (time v)\nelse\n    switch costume to (load v)\n    broadcast (Delete Text v)\nend\n\n@Lava\n\nwhen I receive [tick v]\nPosition ((x) - (*SCROLL X))\n\nwhen I receive [set up v]\nshow\nset [x v] to [-480]\nswitch costume to (1 v)\nClone\n\ndefine Position (x)\nset [costume v] to (costume [number v])\nswitch costume to (1 v)\nset size to ((1) / ()) %\ngo to x: (x) y: (0)\nswitch costume to (costume)\nset size to (100) %\nif <([abs v] of (x position) ) > [480]> then\n    hide\nelse\n    show\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\ndefine Clone\nrepeat (8)\n    Clone at x: [480] y: [0]\nend\n\n@Fire\n\nwhen I receive [tick v]\nPosition ((x) - (*SCROLL X)) y (y)\nset [color v] effect to (80)\nswitch costume to (([floor v] of (((timer) * (12)) mod (3)) ) + (2))\n\nwhen I receive [set up v]\nset [x v] to [0]\nClone at x: [3557] y: [-102]\nClone at x: [4250] y: [-38]\nClone at x: [4500] y: [-38]\n\ndefine Position (x) y (y)\nset [costume v] to (costume [number v])\nswitch costume to (1 v)\nset size to ((1) / ()) %\ngo to x: (x) y: (y)\nswitch costume to (costume)\nset size to (100) %\nif <([abs v] of (x position) ) > [480]> then\n    hide\nelse\n    show\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\nset [costume v] to [2]\ncreate clone of (_myself_ v)\n\n@Love and Favorite\n\nwhen flag clicked\nhide\nif <<(-Love Project) = [1]> and <(-Favorite Project) = [1]>> then\n    stop [this script v]\nend\nset [-favorite project v] to [0]\nset [-love project v] to [0]\nset [-detector clone v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [-detector clone v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(-Love Project) = [1]> and <(-Favorite Project) = [1]>>\nshow\nswitch costume to (1 v)\ngo to x: (-180) y: (124)\nstart sound [Collect v]\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (2) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I start as a clone\nif <(-Detector Clone) = [0]> then\n    go to x: (-15) y: (0)\n    switch costume to (love v)\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [-love project v] to [1]\n        end\n    end\nend\nif <(-Detector Clone) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (fave v)\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [-favorite project v] to [1]\n        end\n    end\nend\n\nset [-favorite project v] to [0]\nset [-love project v] to [0]\n\n@Text\n\nwhen flag clicked\ngo to x: (129) y: (137)\nif <<(-Love Project) = [1]> and <(-Favorite Project) = [1]>> then\n    stop [this script v]\nend\nshow\nwait (2) seconds\nif <([first v] of [platformer script v]) = [0]> then\n    wait (3) seconds\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n
02/15/2020: bug fix\n10/03/2019: 33,000+ views and 1,250+ loves! Thanks!\n09/21/2019: #6 on explore page\n09/20/2019: What the community is remixing\n09/20/2019: 10,000+ views!\n09/19/2019: What the community is loving\n09/15/2019: Project published\n\nHOW TO PLAY\nWelcome to Cavern, a mobile friendly platformer with 20 levels. Use the arrow keys or tap to move and reach the portal in every level. Avoid spikes. Be careful on ice - it's very glitchy. Jump on the yellow booster to jump higher. Maybe you'll find a way out of the cave? Well, let's see.\nIf you want to restart the game, click green flag.\n\nCREDITS\nthe code and the art was completely made by me (I used the scratch vector editor). It was very very hard to made it so PLEASE credit me if you want to use my scripts and art. If you enjoyed, don't forget to love and fave.\nThe music is Main Title (The cave) from "The Octopus Project"\n\ndid you enjoyed? then don't forget to love and fave and check out the following game next: https://scratch.mit.edu/projects/327944839/\n\nLOVED BY ...\n- @eunice0913\n- @noodlebot743\n- @-imagineer-\n@TimMcCool\nand a lot of other (famous) people\n\nNOTE\nadvertisments will be deleted\nthat was my fist popular project\n\nTAGS\n#cavern #cave #platformer #platformer #art #vector