Stone Age || A Mobile Scrolling Platformer - APT Entry
@Stage\n\nwhen I receive [home screen v]\nset [ghost v] effect to (40)\nswitch backdrop to (background v)\n\nwhen I receive [home screen is gone. >:\) mission start the game is initiated v]\nclear graphic effects\nswitch backdrop to (blue v)\nforever\n    play sound [Ancient Music - Stone Age v] until done\nend\n\nwhen flag clicked\nset [which weapon? v] to [Club]\nswitch backdrop to (intro v)\nforever\n    if <(username) = [Polarbear_17]> then\n        set volume to (0) %\n    else\n        set volume to (100) %\n    end\nend\n\nwhen flag clicked\nset [secret found? v] to [No]\nforever\n    wait until <key (f v) pressed?>\n    wait until <key (i v) pressed?>\n    wait until <key (r v) pressed?>\n    wait until <key (e v) pressed?>\n    set [secret found? v] to [Yes]\nend\n\nset [level v] to [5]\n\n@Sprite1\n\n@Platforms\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1.1 v)\n    Clone at x: [500] y: [0]\n    Clone at x: [500] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2.1 v)\n        Clone at x: [500] y: [0]\n        Clone at x: [1000] y: [0]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 3.1 v)\n            Clone at x: [500] y: [0]\n            switch costume to (costume1 v)\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (level 4.1 v)\n                Clone at x: [500] y: [0]\n                Clone at x: [900] y: [0]\n                Clone at x: [500] y: [0]\n                switch costume to (costume1 v)\n            else\n                if <(LEVEL) = [5]> then\n                    switch costume to (level 5.1 v)\n                    Clone at x: [500] y: [0]\n                    switch costume to (costume1 v)\n                end\n            end\n        end\n    end\nend\n\nswitch costume to (costume1 v)\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\ngo [forward v] (1) layers\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\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\nClone at x: [500] y: [0]\nClone at x: [500] y: [0]\n\nif <(LEVEL) = [4]> then\n    switch costume to (level 4 v)\n    Clone at x: [900] y: [0]\n    Clone at x: [650] y: [0]\nelse\n    if <(LEVEL) = [5]> then\n        switch costume to (level 5 v)\n        Clone at x: [400] y: [0]\n        Clone at x: [400] y: [0]\n        Clone at x: [400] y: [0]\n        Clone at x: [400] y: [0]\n        Clone at x: [400] y: [0]\n    else\n        if <(LEVEL) = [6]> then\n            switch costume to (level 6 acural 6 v)\n            Clone at x: [600] y: [400]\n            Clone at x: [600] y: [-400]\n            Clone at x: [600] y: [0]\n        else\n            if <(LEVEL) = [7]> then\n                switch costume to (level 7 v)\n                Clone at x: [400] y: [0]\n                Clone at x: [400] y: [0]\n            else\n                if <(LEVEL) = [8]> then\n                    switch costume to (gaming v)\n                    Clone at x: [400] y: [0]\n                    Clone at x: [400] y: [0]\n                else\n                    if <(LEVEL) = [9]> then\n                        switch costume to (pizza v)\n                        Clone at x: [400] y: [0]\n                        Clone at x: [400] y: [0]\n                    else\n                        if <(LEVEL) = [10]> then\n                            switch costume to (level 9 acural 5 v)\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\nClone at x: [0] y: [100]\n\nClone at x: [250] y: [700]\n\ngo to [front v] layer\n\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    if <(LEVEL) = [5]> then\n        broadcast (loading v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [iq show. \(delete all clones\) v]\nforever\n    hide\n    go to [back v] layer\n    delete this clone\nend\n\nwhen I receive [home screen is gone. >:\) mission start the game is initiated v]\n\nwhen I start as a clone\nforever\n    if <touching (loading iq... v)?> then\n        set [ghost v] effect to (100)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\n@Exit\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <<touching (player hitbox v)?> and <(portal open?) = [1]>> then\n    set [exit v] to [win]\n    broadcast (transition thingy v)\nend\n\nwhen I receive [setup v]\nhide\nset [portal open? v] to [0]\nset [brightness v] effect to (-10)\nset [collected v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    Clone at x: [1100] y: [175]\nelse\n    if <(LEVEL) = [2]> then\n        Clone at x: [1400] y: [150]\n    else\n        if <(LEVEL) = [3]> then\n            Clone at x: [0] y: [800]\n        else\n            if <(LEVEL) = [4]> then\n                Clone at x: [1850] y: [150]\n            else\n                if <(LEVEL) = [5]> then\n                    Clone at x: [5000] y: [5000]\n                end\n            end\n        end\n    end\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\ngo to [front v] layer\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\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)\n\nwhen I receive [open portal v]\nset [brightness v] effect to (5)\nset [ghost v] effect to (0)\nset [portal open? v] to [1]\n\nwhen flag clicked\nforever\n    next costume\nend\n\nif <(LEVEL) = [3]> then\n    Clone at x: [1600] y: [0]\nelse\n    if <(LEVEL) = [4]> then\n        Clone at x: [2200] y: [100]\n    else\n        if <(LEVEL) = [5]> then\n            Clone at x: [2000] y: [50]\n        else\n            if <(LEVEL) = [6]> then\n                Clone at x: [2600] y: [200]\n            else\n                if <(LEVEL) = [7]> then\n                    Clone at x: [1200] y: [100]\n                else\n                    if <(LEVEL) = [8]> then\n                        Clone at x: [1125] y: [350]\n                    else\n                        if <(LEVEL) = [9]> then\n                            broadcast (Open Portal v)\n                            set [portal open? v] to [1]\n                            Clone at x: [1200] y: [100]\n                        else\n                            if <(LEVEL) = [10]> then\n                                Clone at x: [1200] y: [100]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [iq show. \(delete all clones\) v]\nforever\n    delete this clone\nend\n\n@Spikes\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2.1 v)\n        Clone at x: [500] y: [0]\n        Clone at x: [500] y: [0]\n        Clone at x: [500] y: [0]\n        switch costume to (costume1 v)\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 3.1 v)\n            Clone at x: [0] y: [0]\n            Clone at x: [0] y: [500]\n            switch costume to (costume1 v)\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (level 4.1 v)\n                Clone at x: [500] y: [0]\n            end\n        end\n    end\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\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\nwhen flag clicked\nset [lava rise v] to [5]\n\nwhen flag clicked\nhide\n\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\n\nClone at x: [0] y: [500]\n\ngo to [front v] layer\n\nwhen I receive [iq show. \(delete all clones\) v]\nforever\n    delete this clone\nend\n\n@Player Hitbox\n\nwhen I receive [lol v]\nset [ghost v] effect to (100)\nwait (0.1) seconds\nset size to (100) %\n\nwhen I receive [play game v]\nset [level v] to [1]\nforever\n    show\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    Game On\n    repeat until <(EXIT) > []>\n        Tick\n        broadcast (Tick v)\n    end\n    if <(EXIT) = [win]> then\n        Game - Win\n    else\n        Game - Die\n    end\nend\n\ndefine Game On\nset [y v] to [0]\nset [x v] to [0]\nset [sx v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nbroadcast (lol v)\n\ndefine Tick\nif <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <(left) = [1]>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    change [sx v] by (-2)\n    point in direction (-90)\nend\nif <<<mouse down?> and <(x position) < (mouse x)>> or <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <(right) = [1]>>> then\n    change [sx v] by (2)\n    point in direction (90)\nend\nset [sx v] to ((sx) * (0.8))\nif <([abs v] of (sx) ) > [0.9]> then\n    Change Player x by (round (sx))\nend\nif <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <(up) = [1]>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n    if <(in air) < [4]> then\n        set [sy v] to [16]\n    end\nend\nif <(sy) > [-20]> then\n    change [sy v] by (-2)\nend\nChange Player y by (sy)\nTest - Die\nset [scroll x v] to (x)\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(y) < [-180]> then\n    set [exit v] to [die]\n    change [deaths v] by (1)\n    wait (1) seconds\nend\n\nCostume Selection\n\ndefine Change Player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <<touching (platforms v)?> or <touching (stuff in the way 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) - (SCROLL Y))\n\ndefine Change Player x by (sx)\nchange [x v] by (sx)\nPosition\nif <<touching (platforms v)?> or <touching (stuff in the way v)?>> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <<touching (platforms v)?> or <touching (stuff in the way v)?>>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <(up) = [1]>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n        if <(sx) > [0]> then\n            set [sx v] to [-16]\n        else\n            set [sx v] to [16]\n        end\n        set [in air v] to [0]\n    else\n        set [sx v] to [0]\n    end\n    repeat until <not <<touching (platforms v)?> or <touching (stuff in the way 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\n\ndefine Test - Die\nif <<touching (lava v)?> or <touching (spikes v)?>> then\n    set [exit v] to [die]\n    change [deaths v] by (1)\n    wait (1) seconds\nend\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)\npoint in direction (90)\nwait (1) seconds\n\nwhen flag clicked\nhide\n\nwhen flag clicked\npoint in direction (90)\n\nwhen I receive [lol v]\nwait (0.1) seconds\nset [ghost v] effect to (100)\nset size to (100) %\n\nwhen I receive [home screen is gone. >:\) mission start the game is initiated v]\nhide\nbroadcast (Green Flag v) and wait\nbroadcast (Play Game v) and wait\nwait (4) seconds\nshow\n\nswitch costume to (caveman jump v)\n\nswitch costume to (caveman 1 v)\n\nwhen flag clicked\n\n\n\nif <(swinging club?) = [Yes]> then\n\nbroadcast (die v)\nset [exit v] to []\nhide\nwait until <(respawn) = [1]>\nwait (0.1) seconds\nset [ghost v] effect to (100)\n\ndefine Costume Selection\n\nforever\n\nif <(swinging club?) = [Yes]> then\n    switch costume to (caveman idle2 v)\nelse\n    if <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> and <not <<key (up arrow v) pressed?> or <key (w v) pressed?>>>> then\n        if <not <(costume [number v]) = [5]>> then\n            wait (0.1) seconds\n            next costume\n        else\n            switch costume to (caveman 2 v)\n        end\n    else\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>>>> then\n            switch costume to (caveman jump v)\n        else\n            switch costume to (caveman idle v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (hitbox v)\n    set [ghost v] effect to (100)\n    set [hitbox direction v] to (direction)\nend\n\nwhen flag clicked\n\nset [level v] to [3]\n\nwhen flag clicked\nset [deaths v] to [0]\n\nwhen flag clicked\nset volume to (10) %\nforever\n    if <<<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <(left) = [1]>> or <<mouse down?> and <(mouse x) < (x position)>>> and <not <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <(up) = [1]>> or <<mouse down?> and <(mouse y) > (y position)>>>>> then\n        play sound [thunk v] until done\n    end\n    if <<<<mouse down?> and <(x position) < (mouse x)>> or <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <(right) = [1]>>> and <not <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <(up) = [1]>> or <<mouse down?> and <(mouse y) > (y position)>>>>> then\n        play sound [thunk v] until done\n    end\nend\n\nwhen flag clicked\nforever\n    if <(username) = [Polarbear_17]> then\n        set volume to (0) %\n    else\n        set volume to (100) %\n    end\nend\n\n@Grass + Trees\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (costume1 v)\n    Clone at x: [0] y: [0]\n    Clone at x: [500] y: [0]\n    Clone at x: [500] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2.1 v)\n        Clone at x: [0] y: [0]\n    end\nend\n\nClone at x: [800] y: [0]\n\nif <(LEVEL) = [2]> then\n    switch costume to (level 2 1 v)\n    Clone at x: [400] y: [0]\n    Clone at x: [400] y: [0]\n    Clone at x: [400] y: [0]\nelse\n    if <(LEVEL) = [3]> then\n        switch costume to (3 v)\n        Clone at x: [500] y: [0]\n        Clone at x: [500] y: [0]\n        Clone at x: [500] y: [0]\n    else\n        if <(LEVEL) = [4]> then\n            switch costume to (level 4 v)\n            Clone at x: [900] y: [0]\n            Clone at x: [650] y: [0]\n        else\n            if <(LEVEL) = [5]> then\n                switch costume to (level 5 v)\n                Clone at x: [400] y: [0]\n                Clone at x: [400] y: [0]\n                Clone at x: [400] y: [0]\n                Clone at x: [400] y: [0]\n                Clone at x: [400] y: [0]\n            else\n                if <(LEVEL) = [6]> then\n                    switch costume to (level 6 acural 6 v)\n                    Clone at x: [600] y: [200]\n                    Clone at x: [600] y: [-400]\n                    Clone at x: [600] y: [0]\n                    Clone at x: [600] y: [200]\n                else\n                    if <(LEVEL) = [7]> then\n                        switch costume to (level 8 acural 7 v)\n                        Clone at x: [400] y: [0]\n                        Clone at x: [400] y: [0]\n                    else\n                        if <(LEVEL) = [8]> then\n                            switch costume to (gaming v)\n                            Clone at x: [600] y: [100]\n                        else\n                            if <(LEVEL) = [9]> then\n                                switch costume to (pizza v)\n                                Clone at x: [600] y: [100]\n                            else\n                                if <(LEVEL) = [10]> then\n                                    switch costume to (level 7 acural 5 v)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ngo to [front v] layer\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\nwhen flag clicked\nhide\n\nClone at x: [500] y: [0]\nClone at x: [500] y: [0]\n\nwhen I receive [iq show. \(delete all clones\) v]\nforever\n    delete this clone\nend\n\n@Thumbnail\n\nwhen flag clicked\nhide\n\nshow\ngo to [front v] layer\nwait (1) seconds\n\n@Clouds\n\nwhen I start as a clone\nset [ghost v] effect to (75)\ngo to [back v] layer\nshow\nif <(pick random (1) to (2)) = [1]> then\n    go to x: (-300) y: (pick random (50) to (150))\n    repeat until <[270] < (x position)>\n        change x by (3)\n    end\nelse\n    go to x: (300) y: (pick random (50) to (150))\n    repeat until <(x position) < [-290]>\n        change x by (-3)\n    end\nend\ndelete this clone\n\nwhen I receive [home screen is gone. >:\) mission start the game is initiated v]\nforever\n    wait (3) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nforever\n    go to [back v] layer\nend\n\nwhen I receive [iq show. \(delete all clones\) v]\nforever\n    delete this clone\nend\n\n@Lava\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2 1 v)\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 2 2 v)\n        end\n    end\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: ((y) + (lava rise))\nif <<(x) = (x position)> and <((y) + (lava rise)) = (y position)>> then\n    show\nelse\n    hide\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\nwhen flag clicked\nset [lava rise v] to [5]\nforever\n    repeat (8)\n        change [lava rise v] by (1)\n    end\n    wait (0.1) seconds\n    repeat (8)\n        change [lava rise v] by (-1)\n    end\n    wait (0.1) seconds\nend\n\nif <(LEVEL) = [2]> then\n    switch costume to (level 2 1 v)\n    Clone at x: [630] y: [-30]\nelse\n    if <(LEVEL) = [3]> then\n        switch costume to (level 3 v)\n    else\n        if <(LEVEL) = [4]> then\n            switch costume to (4 v)\n            Clone at x: [1800] y: [0]\n        else\n            if <(LEVEL) = [5]> then\n                switch costume to (costume1 v)\n                Clone at x: [2000] y: [-100]\n            else\n                if <(LEVEL) = [6]> then\n                    switch costume to (6 v)\n                else\n                    if <(LEVEL) = [7]> then\n                        switch costume to (7 v)\n                    else\n                        if <(LEVEL) = [8]> then\n                            switch costume to (7 v)\n                        else\n                            if <(LEVEL) = [9]> then\n                                switch costume to (2 v)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\n\nwhen flag clicked\nhide\n\nwhen I receive [iq show. \(delete all clones\) v]\nforever\n    delete this clone\nend\n\n@Mountains/Hills\n\nClone at x: [400] y: [0]\nClone at x: [400] y: [0]\nClone at x: [400] y: [0]\nClone at x: [400] y: [0]\n\nwhen flag clicked\nhide\n\nif <(LEVEL) = [1]> then\n    Clone at x: [0] y: [0]\nend\n\nif <(LEVEL) = [2]> then\n    switch costume to (level 2 1 v)\n    Clone at x: [0] y: [0]\n    Clone at x: [100] y: [0]\nelse\n    if <(LEVEL) = [3]> then\n        switch costume to (3 v)\n        Clone at x: [500] y: [0]\n        Clone at x: [500] y: [0]\n    else\n        if <(LEVEL) = [4]> then\n            switch costume to (level 4 v)\n            Clone at x: [900] y: [0]\n            Clone at x: [650] y: [0]\n        else\n            if <(LEVEL) = [5]> then\n                switch costume to (level 5 v)\n                Clone at x: [400] y: [0]\n                Clone at x: [400] y: [0]\n                Clone at x: [400] y: [0]\n                Clone at x: [400] y: [0]\n                Clone at x: [400] y: [0]\n            else\n                if <(LEVEL) = [6]> then\n                    switch costume to (level 6 acural 6 v)\n                    Clone at x: [600] y: [400]\n                    Clone at x: [600] y: [-400]\n                    Clone at x: [600] y: [0]\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition (((x) - (SCROLL X)) / (10)) (((y) - (SCROLL Y)) / (5))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (level 1 1 v)\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\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\nwhen I receive [iq show. \(delete all clones\) v]\nforever\n    delete this clone\nend\n\n@Collectables2\n\nwhen I receive [setup v]\nhide\nset [collected max v] to [0]\nset [collected v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    Clone at x: [400] y: [150]\n    Clone at x: [700] y: [220]\nelse\n    if <(LEVEL) = [2]> then\n        Clone at x: [800] y: [100]\n        Clone at x: [-150] y: [100]\n    else\n        if <(LEVEL) = [3]> then\n            Clone at x: [0] y: [600]\n            Clone at x: [0] y: [225]\n            Clone at x: [300] y: [0]\n        else\n            if <(LEVEL) = [4]> then\n                Clone at x: [250] y: [0]\n                Clone at x: [550] y: [0]\n                Clone at x: [1250] y: [175]\n                Clone at x: [1050] y: [-75]\n            end\n        end\n    end\nend\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <touching (player hitbox v)?> then\n    change [collected v] by (1)\n    if <(COLLECTED) = (COLLECTED MAX)> then\n        broadcast (Open Portal v)\n    end\n    delete this clone\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\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)\nchange [collected max v] by (1)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nswitch costume to (costume7 v)\n\nwhen I receive [iq show. \(delete all clones\) v]\nforever\n    delete this clone\nend\n\n@Player2\n\nwhen I receive [die v]\nswitch costume to ([costume # v] of [player hitbox v])\nshow\npoint in direction (90)\ngo to (player hitbox v)\nrepeat (8)\n    change y by (12)\nend\nrepeat until <(y position) < [-179]>\n    change y by (-15)\n    turn right (20) degrees\nend\npoint in direction (90)\nhide\nset [respawn v] to [1]\nwait (0.01) seconds\nset [respawn v] to [0]\n\nturn right (15) degrees\n\nwhen flag clicked\nhide\nset [respawn v] to [0]\n\nwait (0.01) seconds\n\nif <(costume [number v]) = [1]> then\n\nrepeat (10)\n    change y by (10)\n    turn right (-15) degrees\nend\nrepeat until <(y position) < [-179]>\n    change y by (-7)\n    turn right (-15) degrees\nend\npoint in direction (90)\nhide\nset [respawn v] to [1]\nwait (0.01) seconds\nset [respawn v] to [0]\n\nif <(no need) = [0]> then\n\nrepeat (2)\n    change y by (-6)\nend\n\ngo to (random position v)\n\n@Play Button\n\nwhen flag clicked\nset [play button clicked? v] to [No]\nhide\n\nwhen I receive [home screen v]\nshow\ngo to x: (0) y: (-100)\n\nwhen this sprite clicked\nset [play button clicked? v] to [Yes]\nbroadcast (home screen is gone. >:\) Mission start the game is initiated v)\nhide\n\nwhen I receive [home screen v]\ngo to x: (0) y: (-100)\nset size to (100) %\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        repeat until <(size) = [110]>\n            change size by (2)\n            set [brightness v] effect to (-3)\n        end\n    else\n        repeat until <(size) = [100]>\n            change size by (-2)\n            set [brightness v] effect to (0)\n        end\n    end\nend\n\nwhen I receive [home screen v]\nshow\nforever\n    point in direction ((90) + (([cos v] of (((timer) - (3)) * (400)) ) * (10)))\nend\n\n@Intro\n\nwhen I receive [end v]\nrepeat (50)\n    change volume by (-2)\nend\nstop all sounds\nwait (1) seconds\nclear sound effects\nset volume to (100) %\n\nwhen flag clicked\nswitch costume to (logo v)\nhide\nwait (1) seconds\nclear graphic effects\npoint in direction (90)\nset size to (60) %\ngo to x: (0) y: (345)\nshow\nrepeat (50)\n    change y by (((-1) - (y position)) / (9))\nend\nwait (1) seconds\nrepeat (50)\n    change y by (((-1) + (y position)) / (9))\n    change [ghost v] effect by (2)\nend\nhide\ngo to x: (0) y: (0)\nwait (2) seconds\nset size to (0) %\nshow\nrepeat (25)\n    change y by (((0) - (y position)) * (0.25))\n    change size by (((60) - (size)) * (0.25))\n    change [ghost v] effect by (-10)\nend\nwait (1) seconds\nrepeat (10)\n    change size by (-3)\nend\nrepeat (10)\n    change size by (3)\nend\nrepeat (5)\n    change size by (-1)\nend\nrepeat (5)\n    change size by (1)\nend\nwait (1) seconds\nrepeat (50)\n    change x by (((-1) + (x position)) / (9))\n    change [ghost v] effect by (2)\nend\nhide\ngo to x: (0) y: (345)\nset size to (100) %\nclear graphic effects\nswitch costume to (slide screen v)\nwait (1) seconds\nshow\nrepeat (50)\n    change y by (((-1) - (y position)) / (9))\nend\nbroadcast (End v)\nwait (1) seconds\nrepeat (10)\n    change y by (((500) - (y position)) / (9))\nend\nhide\nbroadcast (home screen v)\n\nwhen flag clicked\nclear sound effects\nplay sound [Lost Sky - Dreams pt v] until done\n\nset volume to (100) %\n\nwhen flag clicked\nforever\n    if <(username) = [Polarbear_17]> then\n        set volume to (0) %\n    else\n        set volume to (100) %\n    end\nend\n\n@Club/Stone?\n\nwhen flag clicked\nforever\n    go to x: (-195) y: (-70)\nend\n\ndefine Swing\nshow\nif <(hmmmm) = [90]> then\n    set size to (110) %\n    point in direction (30)\n    repeat (7)\n        set [swinging club? v] to [Yes]\n        turn right (20) degrees\n        switch costume to (swing v)\n        go to (player hitbox v)\n        broadcast (switch costume v)\n    end\n    broadcast (scb v)\n    set [swinging club? v] to [No]\nelse\n    set size to (110) %\n    point in direction (150)\n    repeat (7)\n        set [swinging club? v] to [Yes]\n        turn left (20) degrees\n        switch costume to (swing2 v)\n        go to (player hitbox v)\n        broadcast (switch costume v)\n    end\n    broadcast (scb v)\n    set [swinging club? v] to [No]\nend\nhide\n\nwhen I start as a clone\nforever\n    show\n    point in direction (90)\n    switch costume to (swing3 v)\n    set size to (200) %\n    repeat (10)\n        change y by (1)\n    end\n    repeat (20)\n        change y by (-1)\n    end\n    repeat (10)\n        change y by (1)\n    end\n    go to x: (-45) y: (19)\nend\n\nwhen I receive [flash v]\nif <(Weapon Number) = [1]> then\n    Swing\nend\n\nwhen flag clicked\nset [is the umbrella open? v] to [No]\nforever\n    set [hmmmm v] to ([direction v] of [player hitbox v])\n    go [forward v] (1) layers\nend\n\ngo to [front v] layer\n\nwhen I receive [home screen is gone. >:\) mission start the game is initiated v]\nforever\n    if <(Which Weapon?) = [Club]> then\n        if <key (m v) pressed?> then\n            Swing\n            wait until <not <key (m v) pressed?>>\n        end\n    end\nend\n\nwhen I receive [le swing v]\nif <(Which Weapon?) = [Club]> then\n    Swing\n    wait until <not <key (m v) pressed?>>\nend\n\nwhen I receive [start the platformer v]\n\nwait until <not <key (f v) pressed?>>\n\ndefine Open Umbrella (Glide)\nshow\nif <(hmmmm) = [90]> then\n    show\n    set size to (35) %\n    point in direction (90)\n    switch costume to (open umbrella v)\n    broadcast (switch costume \(open umbrella\) v)\nelse\n    show\n    set size to (35) %\n    point in direction (90)\n    switch costume to (open umbrella v)\n    broadcast (switch costume \(open umbrella\) v)\nend\nhide\n\nwhen I receive [start the platformer v]\nforever\n    if <not <key (f v) pressed?>> then\n        set [is the umbrella open? v] to [No]\n    else\n        if <key (f v) pressed?> then\n            set [is the umbrella open? v] to [Yes]\n        end\n    end\nend\n\nwhen I receive [le open umbrella \(glide\) v]\nOpen Umbrella (Glide)\n\nforever\n    if <key (f v) pressed?> then\n        Open Umbrella (Glide)\n    end\nend\n\n@Name Thing\n\nwhen flag clicked\nhide\nset [timer v] to [0]\nforever\n    change [timer v] by (0.01)\nend\n\nwhen I receive [home screen v]\nshow\nforever\n    point in direction ((90) + (([cos v] of (((timer) - (-3)) * (100)) ) * (6)))\nend\n\nwhen I receive [home screen v]\ngo to x: (0) y: (45)\nset size to (100) %\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        repeat until <(size) = [110]>\n            change size by (2)\n            set [brightness v] effect to (-3)\n        end\n    else\n        repeat until <(size) = [100]>\n            change size by (-2)\n            set [brightness v] effect to (0)\n        end\n    end\nend\n\nwhen I receive [home screen is gone. >:\) mission start the game is initiated v]\nhide\n\n@Player Looks/Moving Animations\n\nwhen flag clicked\nhide\nforever\n    if <(Which Weapon?) = [Club]> then\n        if <(swinging club?) = [Yes]> then\n            switch costume to (caveman idle \(armless\) v)\n        else\n            if <<<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> or <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>>> and <not <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>>>> then\n                if <not <(costume [number v]) = [5]>> then\n                    wait (0.1) seconds\n                    next costume\n                else\n                    switch costume to (caveman 2 v)\n                end\n            else\n                if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> or <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> and <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> or <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>>>>> then\n                    switch costume to (caveman jump v)\n                else\n                    switch costume to (caveman idle v)\n                end\n            end\n        end\n    else\n        if <(Which Weapon?) = [Rock]> then\n            if <<<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> or <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>>> and <not <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>>>> then\n                if <not <(costume [number v]) = [10]>> then\n                    wait (0.1) seconds\n                    next costume\n                else\n                    switch costume to (caveman 4 v)\n                end\n            else\n                if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> or <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> and <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> or <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>>>>> then\n                    switch costume to (caveman jump2 v)\n                else\n                    switch costume to (caveman idle \(rock\) v)\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    go to (player hitbox v)\n    go to [front v] layer\nend\n\nhide\n\nshow\n\nwhen flag clicked\nforever\n    set rotation style [left-right v]\n    point in direction (Hitbox Direction)\n    go to [front v] layer\nend\n\nset [which weapon? v] to [Club]\n\nset [which weapon? v] to [Rock]\n\nwhen I receive [home screen is gone. >:\) mission start the game is initiated v]\nshow\n\nwhen I receive [home screen is gone. >:\) mission start the game is initiated v]\nforever\n    if <<touching (transition thingy v)?> or <touching (loading iq... v)?>> then\n        set [ghost v] effect to (100)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\n@Throwing Rock\n\nwhen flag clicked\nforever\n    hide\nend\n\nwhen I receive [die v]\n\nwhen I receive [home screen is gone. >:\) mission start the game is initiated v]\nforever\n    if <(Which Weapon?) = [Rock]> then\n        if <key (n v) pressed?> then\n            create clone of (_myself_ v)\n            wait until <not <key (n v) pressed?>>\n        end\n    else\n    end\nend\n\nwhen I start as a clone\npoint in direction (90)\nset [ghost v] effect to (0)\ngo to (player hitbox v)\nshow\nif <(Hitbox Direction) = [90]> then\n    repeat until <<touching (platforms v)?> or <touching (_edge_ v)?>>\n        change x by (10)\n    end\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nelse\n    if <(Hitbox Direction) = [-90]> then\n        repeat until <<touching (platforms v)?> or <touching (_edge_ v)?>>\n            change x by (-10)\n        end\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nforever\n    change y by (-2)\nend\n\npoint in direction (60)\nmove (10) steps\n\npoint in direction (-60)\nmove (10) steps\n\nset [which weapon? v] to [Rock]\n\nif <(Which Weapon?) = [Rock]> then\n    set [which weapon? v] to [Club]\nend\n\nif <(Which Weapon?) = [Club]> then\nend\n\nwhen I receive [throw stone v]\ncreate clone of (_myself_ v)\n\n@Background Home Screen Animation\n\nwhen I receive [home screen v]\n\nshow\nforever\n    go to [back v] layer\n    switch costume to (right v)\n    set size to (100) %\n    go to x: (600) y: (0)\n    glide (1) secs to x: (0) y: (0)\n    switch costume to (costume1 v)\n    repeat (10)\n        next costume\n    end\n    broadcast (next background for intro v)\n    go to [back v] layer\n    switch costume to (right3 v)\n    set size to (100) %\n    go to x: (600) y: (0)\n    glide (1) secs to x: (0) y: (0)\n    switch costume to (right4 v)\n    repeat (10)\n        next costume\n    end\n    broadcast (green background v)\n    go to [back v] layer\n    switch costume to (right5 v)\n    set size to (100) %\n    go to x: (600) y: (0)\n    glide (1) secs to x: (0) y: (0)\n    switch costume to (right6 v)\n    repeat (10)\n        next costume\n    end\n    broadcast (grey background v)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [home screen is gone. >:\) mission start the game is initiated v]\nforever\n    hide\n    stop [other scripts in sprite v]\nend\n\n@Background Home Screen Animation2\n\nshow\n\nset [color v] effect to (0)\n\nset [brightness v] effect to (-20)\n\nset [brightness v] effect to (-30)\n\nset [color v] effect to (0)\n\nchange [color v] effect by (25)\n\nbroadcast (next background for intro v)\n\nchange [color v] effect by (25)\n\nwhen flag clicked\nhide\n\n@Home Screen Clubs\n\nwhen flag clicked\nhide\nset [timer v] to [0]\nforever\n    change [timer v] by (0.01)\nend\n\nwhen I receive [home screen v]\nhide\nswitch costume to (costume1 v)\ncreate clone of (_myself_ v)\nswitch costume to (stone age name thing 1 v)\ncreate clone of (_myself_ v)\n\ngo to x: (0) y: (45)\nset size to (100) %\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        repeat until <(size) = [110]>\n            change size by (2)\n            set [brightness v] effect to (-3)\n        end\n    else\n        repeat until <(size) = [100]>\n            change size by (-2)\n            set [brightness v] effect to (0)\n        end\n    end\nend\n\nwhen I receive [home screen v]\n\nwhen I start as a clone\nif <(costume [number v]) = [1]> then\n    show\n    repeat until <(play button clicked?) = [Yes]>\n        go to [front v] layer\n        show\n        set size to (90) %\n        go to x: (-100) y: (-100)\n        point in direction ((([tan v] of ((timer) * (-75)) ) * (5)) + (90))\n    end\n    delete this clone\nelse\n    if <(costume [number v]) = [2]> then\n        show\n        repeat until <(play button clicked?) = [Yes]>\n            go to [front v] layer\n            show\n            set size to (90) %\n            go to x: (100) y: (-100)\n            point in direction ((([tan v] of ((timer) * (75)) ) * (5)) + (90))\n        end\n        delete this clone\n    end\nend\n\n@Swing Button\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nbroadcast (le swing v)\n\nwhen I receive [home screen is gone. >:\) mission start the game is initiated v]\nshow\nforever\n    go to [front v] layer\n    point in direction ((90) + (([cos v] of (((timer) - (3)) * (200)) ) * (10)))\nend\n\nwhen flag clicked\nforever\n    set y to (-150)\n    if <(hmmmm) = [90]> then\n        set x to (175)\n    else\n        if <(hmmmm) = [-90]> then\n            set x to (-175)\n        end\n    end\nend\n\nwhen flag clicked\n\nwhen I receive [home screen is gone. >:\) mission start the game is initiated v]\nforever\n    if <<touching (transition thingy v)?> or <touching (loading iq... v)?>> then\n        set [ghost v] effect to (100)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\n@Swing Button2\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nif <(Which Weapon?) = [Club]> then\n    set [which weapon? v] to [Rock]\nelse\n    if <(Which Weapon?) = [Rock]> then\n        set [which weapon? v] to [Club]\n    end\nend\n\nwhen I receive [home screen is gone. >:\) mission start the game is initiated v]\nshow\nforever\n    go to [front v] layer\n    point in direction ((90) + (([cos v] of (((timer) - (3)) * (200)) ) * (10)))\nend\n\nwhen flag clicked\nforever\n    set y to (-150)\n    if <(hmmmm) = [90]> then\n        set x to (220)\n    else\n        if <(hmmmm) = [-90]> then\n            set x to (-220)\n        end\n    end\nend\n\nif <(Which Weapon?) = [Club]> then\n    set [which weapon? v] to [Rock]\nelse\n    if <(Which Weapon?) = [Rock]> then\n        set [which weapon? v] to [Club]\n    end\nend\n\nwhen I receive [home screen is gone. >:\) mission start the game is initiated v]\nforever\n    if <<touching (transition thingy v)?> or <touching (loading iq... v)?>> then\n        set [ghost v] effect to (100)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (b v) pressed?> then\n        if <(Which Weapon?) = [Club]> then\n            set [which weapon? v] to [Rock]\n        else\n            if <(Which Weapon?) = [Rock]> then\n                set [which weapon? v] to [Club]\n            end\n        end\n        wait (0.25) seconds\n    end\nend\n\n@Swing Button3\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nif <(Which Weapon?) = [Rock]> then\n    broadcast (throw stone v)\nend\n\nwhen I receive [home screen is gone. >:\) mission start the game is initiated v]\nshow\nforever\n    go to [front v] layer\n    point in direction ((90) + (([cos v] of (((timer) - (3)) * (200)) ) * (10)))\nend\n\nwhen flag clicked\nforever\n    set y to (-150)\n    if <(hmmmm) = [90]> then\n        set x to (130)\n    else\n        if <(hmmmm) = [-90]> then\n            set x to (-130)\n        end\n    end\nend\n\nwhen I receive [home screen is gone. >:\) mission start the game is initiated v]\nforever\n    if <<touching (transition thingy v)?> or <touching (loading iq... v)?>> then\n        set [ghost v] effect to (100)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\n@Shadows\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2 1 v)\n        Clone at x: [0] y: [0]\n        Clone at x: [750] y: [0]\n    end\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\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\nwhen flag clicked\nset [lava rise v] to [5]\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (75)\nend\n\nwhen I start as a clone\nforever\n    set [ghost v] effect to (75)\nend\n\n@Sun\n\nwhen I start as a clone\nswitch costume to (glow v)\nforever\n    repeat (30)\n        change size by (2)\n    end\n    wait (0.1) seconds\n    repeat (30)\n        change size by (-2)\n    end\n    wait (0.1) seconds\nend\n\nwhen flag clicked\nhide\ngo to x: (207) y: (150)\nforever\n    go to [back v] layer\n    switch costume to (normal v)\nend\n\nwhen I start as a clone\nforever\n    go [backward v] (1) layers\nend\n\nwhen I receive [home screen is gone. >:\) mission start the game is initiated v]\ncreate clone of (_myself_ v)\nshow\nwait (1) seconds\nswitch costume to (normal v)\nset size to (90) %\n\nwhen I receive [home screen is gone. >:\) mission start the game is initiated v]\ncreate clone of (_myself_ v)\nshow\n\n@Stuff in the way\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (1.1 v)\n    Clone at x: [0] y: [0]\n    switch costume to (costume1 v)\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (2.1 v)\n        Clone at x: [1150] y: [133]\n        switch costume to (costume1 v)\n    end\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nchange [x v] by (x)\nchange [y v] by (y)\ncreate clone of (_myself_ v)\nnext costume\n\nwhen flag clicked\nforever\n    hide\nend\n\nwhen flag clicked\nset [damage to break v] to []\n\nwhen I receive [destroyed v]\ndelete this clone\n\nwhen I start as a clone\nset [damage to break v] to [10]\nforever\n    if <(Damage To Break) = [0]> then\n        Random Wood Break Sound Effect\n        delete this clone\n    else\n        if <<<touching (club/stone? v)?> or > or <touching (throwing rock v)?>> then\n            change [damage to break v] by (-1)\n            wait until <not <<<touching (club/stone? v)?> or > or <touching (throwing rock v)?>>>\n        end\n    end\nend\n\nrepeat (10)\n    repeat (3)\n        change x by (1)\n    end\n    repeat (3)\n        change x by (-1)\n    end\n    change y by (-10)\nend\n\ndefine Random Wood Break Sound Effect\nif <(pick random (1) to (3)) = [1]> then\n    start sound [Wood Break v]\nelse\n    if <(pick random (1) to (3)) = [2]> then\n        start sound [Wood Break 2 v]\n    else\n        if <(pick random (1) to (3)) = [3]> then\n            start sound [Wood Break 3 v]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(username) = [Polarbear_17]> then\n        set volume to (0) %\n    else\n        set volume to (100) %\n    end\nend\n\n@Transition Thingy\n\nwhen flag clicked\nhide\n\nwhen I receive [transition thingy v]\n\nset [ghost v] effect to (0)\nshow\nswitch costume to (costume5 v)\nset size to (100) %\ngo to x: (300) y: (-300)\nshow\ngo to [front v] layer\nglide (0.1) secs to x: (0) y: (0)\nrepeat (6)\n    next costume\nend\nwait (1.5) seconds\nset [ghost v] effect to (0)\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [transition thingy v]\nif <<(LEVEL) = [4]> or <(LEVEL) = [5]>> then\n    forever\n        set [ghost v] effect to (100)\n        hide\n    end\nelse\n    set [ghost v] effect to (0)\n    show\n    switch costume to (costume5 v)\n    set size to (100) %\n    go to x: (300) y: (-300)\n    show\n    go to [front v] layer\n    glide (0.1) secs to x: (0) y: (0)\n    repeat (6)\n        next costume\n    end\n    wait (0.25) seconds\n    set [brightness v] effect to (0)\n    repeat (20)\n        change [brightness v] effect by (5)\n    end\n    set [brightness v] effect to (100)\n    switch costume to (costume2 v)\n    wait (0.25) seconds\n    repeat (20)\n        change [brightness v] effect by (-5)\n    end\n    set [brightness v] effect to (0)\n    wait (1.5) seconds\n    set [ghost v] effect to (0)\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    set [ghost v] effect to (100)\n    broadcast (end transition to show sign v)\n    hide\nend\n\nhide\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    go [forward v] (1) layers\n    go to [front v] layer\n    go [forward v] (1) layers\n    go to [front v] layer\n    go [forward v] (1) layers\n    go to [front v] layer\n    go [forward v] (1) layers\nend\n\n@IG Wooden Board thing\n\nwhen flag clicked\nhide\n\nwhen I receive [home screen is gone. >:\) mission start the game is initiated v]\nrepeat (10)\n    show\nend\nforever\n    go to [front v] layer\n    go to x: (-170) y: (142)\n    set size to (100) %\n    point in direction ((90) + (([cos v] of (((timer) - (3)) * (250)) ) * (5)))\nend\n\nwhen flag clicked\nforever\n    if <<(LEVEL) = [1]> or <(LEVEL) = [2]>> then\n        if <(COLLECTED) = [0]> then\n            switch costume to (0/2 v)\n        else\n            if <(COLLECTED) = [1]> then\n                switch costume to (1/2 v)\n            else\n                if <(COLLECTED) = [2]> then\n                    switch costume to (2/2 v)\n                end\n            end\n        end\n    else\n        if <(LEVEL) = [3]> then\n            if <(COLLECTED) = [0]> then\n                switch costume to (0/3 v)\n            else\n                if <(COLLECTED) = [1]> then\n                    switch costume to (1/3 v)\n                else\n                    if <(COLLECTED) = [2]> then\n                        switch costume to (2/3 v)\n                    else\n                        if <(COLLECTED) = [3]> then\n                            switch costume to (3/3 v)\n                        end\n                    end\n                end\n            end\n        else\n            if <(LEVEL) = [4]> then\n                if <(COLLECTED) = [0]> then\n                    switch costume to (0/4 v)\n                else\n                    if <(COLLECTED) = [1]> then\n                        switch costume to (1/4 v)\n                    else\n                        if <(COLLECTED) = [2]> then\n                            switch costume to (2/4 v)\n                        else\n                            if <(COLLECTED) = [3]> then\n                                switch costume to (3/4 v)\n                            else\n                                if <(COLLECTED) = [4]> then\n                                    switch costume to (4/4 v)\n                                end\n                            end\n                        end\n                    end\n                end\n            else\n                hide\n            end\n        end\n    end\nend\n\nif <(COLLECTED) = [0]> then\n    switch costume to (0/2 v)\nelse\n    if <(COLLECTED) = [1]> then\n        switch costume to (1/2 v)\n    end\nend\n\nswitch costume to (2/2 v)\n\nwhen I receive [end transition to show sign v]\nshow\n\nwhen I receive [transition thingy v]\nhide\n\nwhen I receive [home screen is gone. >:\) mission start the game is initiated v]\nforever\n    if <<touching (transition thingy v)?> or <touching (loading iq... v)?>> then\n        set [ghost v] effect to (100)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\n@loading IQ...\n\nwhen flag clicked\nset [level v] to [0]\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [loading v]\nswitch costume to (costume1 v)\nset [ghost v] effect to (100)\nshow\ngo to [front v] layer\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nbroadcast (IQ show. \(delete all clones\) v)\nrepeat (84)\n    if <(costume [number v]) = [6]> then\n        switch costume to (costume1 v)\n    else\n        go to [front v] layer\n        next costume\n        start sound [Jab2 v]\n        wait (0.15) seconds\n    end\nend\nswitch costume to (costume1 v)\ncreate clone of (_myself_ v)\nset [ghost v] effect to (0)\nshow\ngo to [front v] layer\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I start as a clone\ngo to x: (0) y: (0)\nif <(secret found?) = [Yes]> then\n    switch costume to (background3 v)\nelse\n    if <(DEATHS) > [25]> then\n        switch costume to (background v)\n    else\n        switch costume to (background2 v)\n    end\nend\ngo [backward v] (1) layers\nforever\n    go to [front v] layer\nend\n\n
Welcome to Stone Age || A Mobile Scrolling Platformer!\n\n==================Controls=================\n\n» Arrow Keys or WASD to move.\n» Press the M key to swing the club or the club button.\n» Press the N key to throw a rock or the rock button.\n» Press the switch weapon button or the B key to switch your weapon. Use your weapons to knock down obstacles in your way.\n» You need to collect the lightbulbs to proceed to the next level. :)\n» Make it to the portal to proceed to the next level! (only if you have collected all of the lightbulbs)\n\n==========================================\n