Mincraft Platformer 2

Instructions: use arrows

@Stage\n\n@Ground\n\nwhen flag clicked\nforever\n    play sound [Game music.mp3 v] until done\nend\n\nwhen flag clicked\nswitch costume to (g1 v)\ngo to x: (0) y: (0)\nforever\n    if <(letter (1) of ([costume name v] of [ground v])) = [s]> then\n        set [brightness v] effect to (0)\n    else\n        if <(letter (1) of ([costume name v] of [ground v])) = [g]> then\n            set [brightness v] effect to (0)\n        else\n            if <(letter (1) of ([costume name v] of [ground v])) = [u]> then\n                set [brightness v] effect to (-44)\n            else\n                set [brightness v] effect to (-50)\n            end\n        end\n    end\nend\n\nwhen I receive [message1 v]\nswitch costume to (updates)\n\nwhen flag clicked\nchange [☁ view v] by (1)\n\n@BackGround\n\nwhen I start as a clone\nforever\n    go to x: (0) y: (0)\n    switch costume to (造型4 v)\n    set [brightness v] effect to (30)\n    if <([costume name v] of [ground v]) = [u4]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nshow\ncreate clone of (_myself_ v)\nforever\n    show\n    switch costume to (造型2 v)\n    go [backward v] (500) layers\n    go to x: (0) y: (0)\n    if <(letter (1) of ([costume name v] of [ground v])) = [s]> then\n        set [brightness v] effect to (10)\n    else\n        if <(letter (1) of ([costume name v] of [ground v])) = [g]> then\n            set [brightness v] effect to (0)\n        else\n            if <(letter (1) of ([costume name v] of [ground v])) = [u]> then\n                set [brightness v] effect to (-70)\n            else\n                set [brightness v] effect to (-92)\n            end\n        end\n    end\nend\n\n@Hitbox\n\nwhen flag clicked\nforever\n    show\n    go to x: (0) y: (0)\n    set [ghost v] effect to (100)\n    switch costume to ([costume # v] of [ground v])\nend\n\n@Hitbox2\n\nwhen flag clicked\nforever\n    show\n    set [ghost v] effect to (100)\n    go to x: (0) y: (0)\n    switch costume to ([costume # v] of [ground v])\nend\n\n@Player\n\nwhen flag clicked\nforever\n    if <key (r v) pressed?> then\n        set [updates v] to [g1]\n        broadcast (message1 v)\n        go to x: (-192) y: (-2)\n    end\nend\n\nwhen flag clicked\nforever\n    if <[-179] > (y position)> then\n        updates#2 [g3] [u3] [18]\n        updates#2 [g4] [u4] [110]\n        updates#2 [u5] [h5] [64]\n        updates#2 [g5] [u5] [126]\n        updates#2 [s4] [g4] (x position)\n        set y to (177)\n        rest\n        broadcast (message1 v)\n    end\nend\n\nwhen flag clicked\nshow\ngo to x: (-192) y: (-2)\nrest\ngo to [front v] layer\nforever\n    if <(show) = [0]> then\n        if <(ladder) = [1]> then\n            change [yv v] by (0)\n        else\n            change [yv v] by (-0.57)\n        end\n        set rotation style [left-right v]\n        if <<key (left arrow v) pressed?> or <<mouse down?> and <(x position) > (mouse x)>>> then\n            change [xv v] by (-1)\n            point in direction (-90)\n        end\n        if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n            change [xv v] by (1)\n            point in direction (90)\n        end\n        set [xv v] to ((xv) * (0.8))\n        change x by (xv)\n        if <touching (hitbox v)?> then\n            change y by (-1)\n            if <touching (hitbox v)?> then\n                change y by (-1)\n                if <touching (hitbox v)?> then\n                    change y by (-1)\n                    if <touching (hitbox v)?> then\n                        change y by (-1)\n                        if <touching (hitbox v)?> then\n                            change y by (-1)\n                        end\n                        if <touching (hitbox v)?> then\n                            change y by (5)\n                            change x by ((xv) * (-1))\n                            if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n                                if <(xv) < [0]> then\n                                    set [yv v] to [5]\n                                    set [xv v] to [5]\n                                else\n                                    set [yv v] to [5]\n                                    set [xv v] to [-5]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change y by (yv)\n        if <touching (hitbox v)?> then\n            change y by ((yv) * (-1))\n            set [yv v] to [0]\n        end\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (17))>>> then\n            if <not <touching (hitbox3 v)?>> then\n                change y by (-1)\n                if <touching (hitbox v)?> then\n                    change [yv v] by (8.5)\n                end\n                change y by (1)\n            end\n        end\n        if <<touching (hitbox2 v)?> or <touching (zombie v)?>> then\n            go to x: (sx) y: (sy)\n            rest\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <([costume name v] of [ground v]) = [g5]>> then\n        if <(y position) > [178]> then\n            updates#2 [u3] [g3] [-21]\n            updates#2 [g4] [s4] (x position)\n            updates#2 [h5] [u5] [64]\n            updates#2 [u5] [g5] [149]\n            set y to (-172)\n            rest\n            broadcast (message1 v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(x position) > [239]> then\n        updates#1 [g1] [g2] [-19]\n        updates#1 [g2] [g3] [-41]\n        updates#1 [g3] [g4] [-38]\n        updates#1 [u3] [u4] [-116]\n        updates#1 [u4] [u5] [-116]\n        set x to (-230)\n        rest\n        broadcast (message1 v)\n    end\nend\n\ndefine updates#1 (past ) (switch) (y)\nif <([costume name v] of [ground v]) = (past )> then\n    set [updates v] to (switch)\n    set y to (y)\nend\n\nwhen flag clicked\nforever\n    if <[-238] > (x position)> then\n        updates#1 [g2] [g1] [-23]\n        updates#1 [g3] [g2] [-19]\n        updates#1 [g4] [g3] [-41]\n        updates#1 [u4] [u3] [-107]\n        updates#1 [u5] [u4] [-116]\n        set x to (231)\n        rest\n        broadcast (message1 v)\n    end\nend\n\ndefine rest\nset [sx v] to (x position)\nset [sy v] to (y position)\nset [xv v] to [0]\nset [yv v] to [0]\n\nwhen this sprite clicked\nset [show v] to [1]\n\ndefine updates#2 (past) (switch) (x)\nif <([costume name v] of [ground v]) = (past)> then\n    set [updates v] to (switch)\n    set x to (x)\nend\n\nwhen flag clicked\nset [diamonds v] to [0]\nset [emeralds v] to [0]\nset [golds v] to [0]\nset [redstones v] to [0]\n\nwhen flag clicked\nforever\n    if <touching (hitbox3 v)?> then\n        set [ladder v] to [1]\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            set [yv v] to [3]\n        end\n        if <<key (down arrow v) pressed?> or <<mouse down?> and <(y position) > (mouse y)>>> then\n            set [yv v] to [-3]\n        end\n        set [yv v] to ((yv) * (0.8))\n    else\n        set [ladder v] to [0]\n    end\nend\n\n@Collections\n\ndefine clone (x) (y) (type) (level)\ngo to x: (x) y: (y)\nswitch costume to (type)\nset [level v] to (level)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [got v] to [0]\nshow\nforever\n    repeat (34)\n        if <(got) = [0]> then\n            change y by (-0.28)\n        end\n    end\n    repeat (34)\n        if <(got) = [0]> then\n            change y by (0.28)\n        end\n    end\nend\n\nwhen flag clicked\nhide\nclone [111] [-18] [4] [g1]\nclone [198] [-18] [2] [g1]\nclone [-137] [108] [4] [g1]\nclone [-109] [-13] [2] [g2]\nclone [44] [4] [4] [s4]\nclone [-11] [-73] [4] [u3]\nclone [-180] [-116] [4] [u4]\nclone [-150] [-116] [2] [u4]\nclone [-150] [32] [1] [g5]\nclone [25] [-37] [3] [h5]\nclone [-33] [-39] [4] [g4]\n\nwhen I start as a clone\nclear graphic effects\nset [got v] to [0]\nforever\n    if <([costume name v] of [ground v]) = (level)> then\n        show\n        if <touching (player v)?> then\n            set [got v] to [1]\n            repeat (25)\n                change [ghost v] effect by (4)\n                change y by (0.56)\n            end\n            if <(costume [number v]) = [1]> then\n                change [emeralds v] by (1)\n            else\n                if <(costume [number v]) = [2]> then\n                    change [redstones v] by (1)\n                else\n                    if <(costume [number v]) = [3]> then\n                        change [diamonds v] by (1)\n                    else\n                        change [golds v] by (1)\n                    end\n                end\n            end\n            delete this clone\n        end\n    else\n        hide\n    end\nend\n\ngo to [front v] layer\n\n@Things\n\nwhen flag clicked\nset [type v] to [1]\ncreate clone of (_myself_ v)\nset [type v] to [2]\ncreate clone of (_myself_ v)\nforever\n    if <([costume name v] of [ground v]) = [g1]> then\n        go to x: (-59) y: (-10)\n        show\n    else\n        if <([costume name v] of [ground v]) = [g5]> then\n            go to x: (-41) y: (14)\n            show\n            if <(distance to [player v]) < [100]> then\n                switch costume to (4 v)\n            else\n                switch costume to (3 v)\n            end\n            if <(distance to [player v]) < [100]> then\n                switch costume to (2 v)\n            else\n                switch costume to (1 v)\n            end\n        else\n            hide\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(type) = [1]> then\n        set rotation style [left-right v]\n        point towards (player v)\n        go to x: (60) y: (-23)\n        switch costume to (villager-face v)\n        if <([costume name v] of [ground v]) = [g5]> then\n            show\n            if <touching (player v)?> then\n                if <(emeralds) = [0]> then\n                    say [Hello, Most, welcome to my village, I have an emerald]\n                else\n                    say [Oh, Most, did you see my emerald? it disappeared!!]\n                end\n            else\n                say []\n            end\n        else\n            hide\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(type) = [2]> then\n        go to x: (-93) y: (-33)\n        switch costume to (sign v)\n        if <([costume name v] of [ground v]) = [g1]> then\n            show\n            if <touching (player v)?> then\n                say [Welcome to the world, Most. Press space to view the collections]\n            else\n                say []\n            end\n        else\n            hide\n        end\n    end\nend\n\n@Inventory\n\nwhen flag clicked\nforever\n    if <key (space v) pressed?> then\n        if <(show) = [1]> then\n            set [show v] to [0]\n        else\n            set [show v] to [1]\n        end\n        wait until <not <key (space v) pressed?>>\n        wait (0.3) seconds\n    end\nend\n\nwhen flag clicked\nhide\nset [show v] to [0]\nset [type v] to [0]\nrepeat (4)\n    change [type v] by (1)\n    create clone of (_myself_ v)\nend\nforever\n    go to [front v] layer\n    go to x: (0) y: (0)\n    if <<(diamonds) = [1]> and <<(emeralds) = [1]> and <<(redstones) = [3]> and <(golds) = [6]>>>> then\n        switch costume to (world-options2 v)\n    else\n        switch costume to (world-options v)\n    end\n    if <(show) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <mouse down?> then\n        if <(show) = [1]> then\n            set [show v] to [0]\n        end\n        wait (0.3) seconds\n    end\nend\n\nwhen I start as a clone\nforever\n    go to [front v] layer\nend\n\nwhen I start as a clone\nforever\n    if <(show) = [1]> then\n        show\n    else\n        hide\n    end\n    go to [front v] layer\n    if <(type) = [1]> then\n        go to x: (-43) y: (39)\n        switch costume to ((diamonds) - (-1))\n    else\n        if <(type) = [2]> then\n            go to x: (-43) y: (5)\n            switch costume to ((emeralds) - (-1))\n        else\n            if <(type) = [3]> then\n                go to x: (-43) y: (-28)\n                switch costume to ((redstones) - (-1))\n            else\n                go to x: (-43) y: (-63)\n                switch costume to ((golds) - (-1))\n            end\n        end\n    end\nend\n\n@Zombie\n\nwhen flag clicked\nset size to (35) %\nset [brightness v] effect to (-30)\nset rotation style [left-right v]\ngo to x: (-153) y: (-110)\nforever\n    wait (0.06) seconds\n    next costume\nend\n\nwhen flag clicked\nforever\n    repeat (120)\n        change x by (1.5)\n        point in direction (90)\n    end\n    repeat (120)\n        change x by (-1.5)\n        point in direction (-90)\n    end\nend\n\nwhen flag clicked\nforever\n    if <([costume name v] of [ground v]) = [u5]> then\n        show\n    else\n        hide\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\nforever\n    show\n    go to [front v] layer\n    go to x: (0) y: (0)\n    set [ghost v] effect to (100)\nend\n\n@Hitbox3\n\nwhen flag clicked\nforever\n    show\n    set [ghost v] effect to (100)\n    go to x: (0) y: (0)\n    switch costume to ([costume # v] of [ground v])\nend\n\n@Hitbox4\n\nwhen flag clicked\nforever\n    show\n    set [ghost v] effect to (100)\n    go to x: (0) y: (0)\n    switch costume to ([costume # v] of [ground v])\nend\n\n