The Hobbit - A Scrolling Platformer (Full Version)                        #games #animations
@Stage\n\nwhen flag clicked\nswitch backdrop to (white v)\n\nwhen I receive [play game v]\nclear graphic effects\nswitch backdrop to (1 v)\nrepeat (20)\n    change volume by (-5)\nend\nstop all sounds\nset volume to (70) %\nforever\n    play sound [2 v] until done\n    play sound [3 v] until done\nend\n\nwhen I receive [before start v]\nswitch backdrop to (backdrop2 v)\nwait (1) seconds\nset volume to (70) %\nstart sound [1 v]\n\nwhen I receive [troll animate v]\nset volume to (0) %\n\nwhen I receive [troll talk v]\nset volume to (100) %\n\n@Blank\n\n@poison\n\nwhen I start as a clone\ngo [backward v] (1) layers\nforever\n    set [y v] to (([sin v] of ((timer) * (100)) ) * (10))\nend\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\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 [setup v]\nset [y v] to [0]\nset [x v] to [0]\nrepeat (20)\n    Position x: [450] y: [0]\nend\n\ndefine Position 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\ngo to [back v] layer\n\nwhen I receive [reset v]\ndelete this clone\n\n@Background\n\ndefine heyo\nrepeat (2)\n    create clone of (_myself_ v)\n    next costume\nend\n\nwhen flag clicked\nset [ghost v] effect to (0)\nhide\n\nwhen I start as a clone\nshow\nforever\n    go to [back v] layer\n    go to x: ((((costume [number v]) - (1)) * (480)) + ((SCROLL X) / (-5))) y: ((SCROLL Y) / (-5))\n    Position ((((costume [number v]) - (1)) * (480)) + ((SCROLL X) / (-5))) ((SCROLL Y) / (-5))\nend\n\nwhen I receive [play game v]\nswitch costume to (1 v)\nheyo\nforever\n    go to [back v] layer\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\n@Transition Screen\n\nwhen I receive [play game v]\nset [situation v] to [1]\ncreate clone of (_myself_ v)\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nforever\n    broadcast (go to the front boiz v)\nend\n\nwhen I receive [ded boiz v]\nset [situation v] to [2]\ncreate clone of (_myself_ v)\n\nwhen I receive [win yoo xd v]\nset [situation v] to [3]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(SITUATION) = [1]> then\n    set [clickpossible v] to [0]\n    show\n    wait (0.8) seconds\n    set [clickpossible v] to [1]\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    hide\n    clear graphic effects\n    broadcast (coin reveal v)\n    delete this clone\nelse\n    if <(SITUATION) = [2]> then\n        set [clickpossible v] to [0]\n        show\n        wait (0.7) seconds\n        set [clickpossible v] to [1]\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        hide\n        clear graphic effects\n        delete this clone\n    else\n        if <(SITUATION) = [3]> then\n            if <(usedskip?) = [0]> then\n                set [clickpossible v] to [0]\n                wait (0.7) seconds\n                show\n                wait (0.8) seconds\n                set [clickpossible v] to [0]\n                repeat (10)\n                    change [ghost v] effect by (10)\n                end\n                hide\n                clear graphic effects\n                set [usedskip? v] to [0]\n                delete this clone\n            else\n                show\n                set [clickpossible v] to [0]\n                wait (0.8) seconds\n                set [clickpossible v] to [1]\n                repeat (10)\n                    change [ghost v] effect by (10)\n                end\n                hide\n                clear graphic effects\n                set [usedskip? v] to [0]\n                delete this clone\n            end\n        end\n    end\nend\n\nwhen I receive [go to the front boiz v]\ngo to [front v] layer\n\n@title\n\nwhen flag clicked\nhide\n\nwhen I receive [back v]\nshow\n\nwhen I receive [instructions v]\nhide\n\nwhen I receive [play game v]\nstop [other scripts in sprite v]\nrepeat until <(y position) > [320]>\n    change y by (((400) - (y position)) / (4))\n    change [ghost v] effect by (((0) - (size)) / (8))\nend\nhide\nstop [this script v]\n\nwhen I receive [before start v]\nshow\nset size to (100) %\ngo to x: (0) y: (0)\n\n@ur money\n\nwhen flag clicked\nset [your total coins v] to [0]\nset [equipped v] to [none]\nhide\n\nwhen I start as a clone\nif <(size) = [100]> then\n    forever\n        go to [front v] layer\n        go to x: (193) y: (156)\n        set size to (35) %\n        if <<((round ((YOUR TOTAL COINS) * (100))) / (100)) = [10]> or <((round ((YOUR TOTAL COINS) * (100))) / (100)) > [10]>> then\n            show\n            switch costume to (letter (1) of (YOUR TOTAL COINS))\n        else\n            hide\n        end\n        set [brightness v] effect to (100)\n    end\nend\n\nwhen I start as a clone\nif <(size) = [99]> then\n    wait () seconds\n    go to [front v] layer\n    set size to (35) %\n    switch costume to (0 v)\n    set [brightness v] effect to (100)\n    go to x: (263) y: (156)\n    show\n    repeat (10)\n        change x by (((193) - (x position)) / (3))\n    end\n    forever\n        go to [front v] layer\n        set size to (35) %\n        show\n        if <(YOUR TOTAL COINS) < [10]> then\n            go to x: (193) y: (156)\n            switch costume to (letter (1) of (YOUR TOTAL COINS))\n        else\n            go to x: (207) y: (156)\n            switch costume to (letter (2) of (YOUR TOTAL COINS))\n        end\n        set [brightness v] effect to (100)\n    end\nend\n\nwhen I receive [coin reveal v]\nset size to (100) %\ncreate clone of (_myself_ v)\nset size to (99) %\ncreate clone of (_myself_ v)\nset size to (98) %\ncreate clone of (_myself_ v)\nset size to (97) %\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(size) = [98]> then\n    wait () seconds\n    set size to (100) %\n    go to [front v] layer\n    switch costume to (money v)\n    go to x: (263) y: (157)\n    show\n    repeat (10)\n        change x by (((165) - (x position)) / (3))\n    end\n    forever\n        go to x: (165) y: (157)\n        set size to (100) %\n        show\n        switch costume to (money v)\n    end\nend\n\nwhen I start as a clone\nif <(size) = [97]> then\n    go to [front v] layer\n    go [backward v] (1) layers\n    wait () seconds\n    set size to (100) %\n    switch costume to (shading v)\n    go to x: (100) y: (0)\n    show\n    repeat (10)\n        change x by (((0) - (x position)) / (3))\n    end\n    forever\n        go to x: (0) y: (0)\n        set size to (100) %\n        show\n        switch costume to (shading v)\n        set [ghost v] effect to (0)\n    end\nend\n\n@tn\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    go to [front v] layer\n    show\n    set [ghost v] effect to (100)\nend\n\n@Sprite2\n\nwhen flag clicked\nhide\n\nwhen I receive [before start v]\nwait (3) seconds\nshow\ngo to x: (-629) y: (80)\ngo to [front v] layer\ngo [backward v] (20) layers\nstart sound [sword clank v]\nglide (0.15555) secs to x: (-158) y: (80)\n\nwhen I receive [play game v]\nhide\n\n@Play button\n\nwhen flag clicked\nhide\nset [ghost v] effect to (100)\n\nwhen I receive [play game v]\nhide\n\nwhen I receive [before start v]\nforever\n    if <touching (mouse-pointer v)?> then\n        wait until <not <touching (mouse-pointer v)?>>\n    end\nend\n\nwhen I receive [before start v]\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((120) - (size)) / (4))\n    else\n        change size by (((100) - (size)) / (4))\n    end\nend\n\nwhen I receive [before start v]\nreset timer\ngo to [front v] layer\ngo to x: (7) y: (-107)\nwait (3.6) seconds\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nshow\n\nwhen I receive [before start v]\nset size to (100) %\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        repeat until <not <mouse down?>>\n            change size by (((70) - (size)) / (4))\n        end\n        if <touching (mouse-pointer v)?> then\n            broadcast (Play game v)\n            stop [other scripts in sprite v]\n            repeat until <(size) < [6]>\n                change size by (((0) - (size)) / (4))\n                change [ghost v] effect by (((0) - (size)) / (8))\n                hide\n            end\n        end\n    end\nend\n\ngo to x: (6746574657) y: (7456745674567)\n\n@Backgroun 1\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine position (x) (y)\ngo to x: <<(x) = (x position)> and <(y) = (y position)>> y: (y)\n\n    show\nelse\n    hide\nend\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (1 v)\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    clone [450] [0]\nend\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 volume to (100) %\nhide\ngo to [back v] layer\ngo [backward v] (10) layers\n\ndefine clone (x) (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nswitch costume to (11 v)\n\n@Signs\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nhide\nset [ghost v] effect to (100)\ngo [backward v] (50) layers\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\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 [setup v]\nset [y v] to [0]\nset [x v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (sign v)\n    Position x: [450] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (2 2 v)\n        Position x: [900] y: [0]\n        Position x: [450] y: [0]\n        Position x: [450] y: [0]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (3 1 v)\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (4 1 v)\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n            else\n                if <(LEVEL) = [5]> then\n                    switch costume to (5 1 v)\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                else\n                    if <(LEVEL) = [6]> then\n                        switch costume to (6 v)\n                        Position x: [450] y: [0]\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Position x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I start as a clone\nset [ghost v] effect to (0)\ngo to [back v] layer\ngo [forward v] (20) layers\n\n@People\n\nwhen I receive [tick v]\nset size to (100) %\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and > then\n    show\nelse\n    hide\nend\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (1 v)\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    clone [450] [0]\nend\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\ngo [backward v] (200) layers\nhide\n\ndefine clone (x) (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nswitch costume to (11 v)\n\nwhen I receive [nighty night v]\nsay [Come my young Adventurer, we must start our Journey! Go!] for (4) seconds\nforever\n    if <<(costume [name v]) = [5]> or <<(costume [name v]) = [7]> or <(costume [name v]) = [8]>>> then\n        say [Attack!!] for (1000) seconds\n    end\nend\n\nwhen I receive [mountain v]\nforever\n    if <(costume [name v]) = [10]> then\n        say [ Our journey is not over yet. Come shelter in the mountains.] for (1000) seconds\n    end\nend\n\nwhen I receive [second speech v]\nforever\n    if <<(costume [name v]) = [13]> or <(costume [name v]) = [15]>> then\n        say [Bilbo Get down!! Kill them!] for (1000) seconds\n    end\nend\n\n@Trolls\n\nwhen I receive [setup v]\nhide\nset [y v] to [0]\nset [x v] to [0]\nset [badguysded v] to [0]\nset [badguymax v] to [0]\nwait (0) seconds\nif <(LEVEL) = [3]> then\n    set [badguysded v] to [0]\n    set [badguymax v] to [0]\nelse\n    if <(LEVEL) = [4]> then\n        Clone x: [600] y: [-50]\n        Clone x: [1290] y: [148]\n    else\n    end\nend\nset [y v] to [-99999999999]\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [reset v]\nchange [your total coins v] by ((guyskilledthislevel) * (-1))\nset [guyskilledthislevel v] to [0]\ndelete this clone\n\nwhen flag clicked\nhide\ngo to [back v] layer\nset [invincible v] to [0]\n\ndefine Clone x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\nchange [badguymax v] by (1)\nset [badguycos v] to [0]\ncreate clone of (_myself_ 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 start as a clone\nif <(size) = [100]> then\n    show\n    set rotation style [left-right v]\n    forever\n        point in direction (90)\n        set [badguycos v] to [1]\n        wait (1) seconds\n        set [badguycos v] to [2]\n        repeat (10)\n            if <not <touching (sword v)?>> then\n                change [x v] by (7)\n            end\n        end\n        set [badguycos v] to [1]\n        wait (1) seconds\n        set [badguycos v] to [3]\n        repeat (10)\n            if <not <touching (sword v)?>> then\n                change [x v] by (-10)\n            end\n        end\n        set [badguycos v] to [1]\n        wait (1) seconds\n        set [badguycos v] to [3]\n        repeat (10)\n            if <not <touching (sword v)?>> then\n                change [x v] by (3)\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(size) = [100]> then\n    forever\n        switch costume to (hitbox v)\n        if <touching (sword v)?> then\n            set [invincible v] to [1]\n            change [badguysded v] by (1)\n            if <<(Collect) = (Max Collect)> and <(badguysded) = (badguymax)>> then\n                broadcast (OPEN PORtAL v)\n            end\n            switch costume to (badguycos)\n            start sound [Coin v]\n            set size to (50) %\n            create clone of (_myself_ v)\n            set size to (100) %\n            change [guyskilledthislevel v] by (1)\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            set [invincible v] to [0]\n            delete this clone\n        end\n        switch costume to (badguycos)\n    end\nend\n\nwhen I start as a clone\nif <(size) = [50]> then\n    change [your total coins v] by (1)\n    switch costume to (coin v)\n    set size to (100) %\n    repeat (10)\n        change [y v] by (10)\n        change [ghost v] effect by (10)\n        change size by (((140) - (size)) / (2))\n    end\n    change [y v] by (-100)\n    delete this clone\nend\n\n@Peeps\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nhide\nset [ghost v] effect to (100)\ngo [backward v] (50) layers\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\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 [setup v]\nset [y v] to [0]\nset [x v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (1 1 v)\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (2 1 v)\n        Position x: [450] y: [0]\n        Position x: [450] y: [0]\n        Position x: [450] y: [0]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (3 1 v)\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (4 1 v)\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n            else\n                if <(LEVEL) = [5]> then\n                    switch costume to (5 1 v)\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                else\n                    if <(LEVEL) = [6]> then\n                        switch costume to (6 v)\n                        Position x: [450] y: [0]\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Position x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I start as a clone\nset [ghost v] effect to (0)\ngo to [back v] layer\ngo [forward v] (20) layers\n\n@Sun\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\nswitch costume to (sun v)\nforever\n    go to [back v] layer\n    show\n    go to x: (218) y: (160)\n    set size to (140) %\n    forever\n        repeat (40)\n            change size by (0.6)\n        end\n        repeat (40)\n            change size by (-0.6)\n        end\n    end\nend\n\nwhen I receive [troll animate v]\nswitch costume to (moon v)\n\n@Intro\n\nwhen flag clicked\nstart sound [Sh-Boom Cars v]\nswitch backdrop to (white v)\nerase all\nset size to (100) %\ngo to x: (0) y: (0)\nswitch costume to (intro-01 v)\nhide\nwait (0.5) seconds\nshow\nrepeat (9)\n    next costume\nend\nstamp\nswitch costume to (text v)\nset size to (100) %\ngo to x: (0) y: (-230)\nrepeat (20)\n    change y by (((-80) - (y position)) * (0.2))\nend\nerase all\nstamp\ngo to x: (0) y: (0)\nset size to (100) %\nswitch costume to (intro-10 v)\nwait (0.8) seconds\nstop all sounds\nstart sound [thunder v]\nswitch backdrop to (thunder v)\nswitch costume to (halloween v)\nwait (0.4) seconds\nswitch backdrop to (white v)\nswitch costume to (intro-10 v)\nwait (1.2) seconds\nrepeat (9)\n    switch costume to ((costume [number v]) - (1))\nend\nerase all\ngo to x: (0) y: (-81)\nset size to (100) %\nswitch costume to (text v)\nrepeat (20)\n    change y by (((y position) + (78)) * (0.2))\nend\nswitch backdrop to (black v)\nbroadcast (before start v)\nhide\n\n@Sword\n\nwhen flag clicked\nswitch costume to (1 v)\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [play game v]\nhide\nswitch costume to (1 v)\nset [sword v] to []\nforever\n    if <not <(Switch In Progress) = [yes]>> then\n        set y to ((([sin v] of ((200) * (timer)) ) * (5)) + (-30))\n        if <(LEVEL) = [4]> then\n            show\n        end\n    end\nend\n\nwhen I receive [tick v]\ngo to (player v)\n\nwhen [space v] key pressed\nif <(lastkeypressed) = [right]> then\n    point in direction (90)\n    go to [front v] layer\n    go [backward v] (20) layers\n    switch costume to (1 v)\n    start sound [slash v]\n    repeat (7)\n        next costume\n    end\n    repeat (5)\n        change [ghost v] effect by (20)\n    end\n    switch costume to (1 v)\n    set [ghost v] effect to (0)\n    wait until <not <key (space v) pressed?>>\nend\n\nwhen [space v] key pressed\nif <(lastkeypressed) = [left]> then\n    point in direction (-90)\n    go to [front v] layer\n    go [backward v] (20) layers\n    switch costume to (1 v)\n    start sound [slash v]\n    repeat (7)\n        next costume\n    end\n    repeat (5)\n        change [ghost v] effect by (20)\n    end\n    switch costume to (1 v)\n    set [ghost v] effect to (0)\n    wait until <not <key (space v) pressed?>>\nend\n\n@Levels\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nset [y v] to [0]\nset [x v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (1 1 v)\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\n    wait (0.5) seconds\n    broadcast (Win Talk v)\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (2 1 v)\n        Position x: [450] y: [0]\n        Position x: [450] y: [0]\n        Position x: [450] y: [0]\n        wait (0.7) seconds\n        broadcast (Gandalf lev 2 v)\n        switch backdrop to (2 v)\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (3 1 v)\n            switch backdrop to (3 v)\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n            wait (0.7) seconds\n            broadcast (Thorin lev3 v)\n        else\n            if <(LEVEL) = [4]> then\n                broadcast (Troll animate v)\n                switch costume to (4 1 v)\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n                switch backdrop to (3 v)\n            else\n                if <(LEVEL) = [5]> then\n                    switch costume to (5 1 v)\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                    broadcast (Mn Talk v)\n                else\n                    if <(LEVEL) = [6]> then\n                        switch costume to (6 v)\n                        Position x: [450] y: [0]\n                        broadcast (enjoy v)\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\nwhen I receive [reset v]\ndelete this clone\n\ndefine Position x: (x) y: (y)\nhide\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\nhide\n\n@Text\n\ndefine type (text) at x: (x) y: (y) size: (size)\nclear graphic effects\nswitch costume to (text box v)\nset size to (size) %\nshow\nset [# v] to [0]\nset [x v] to (x)\nset [y v] to (y)\nset [spacingx v] to ((size) / (14.28))\nset [spacingy v] to ((size) / (11.112))\nrepeat (length of (text))\n    change [# v] by (1)\n    if <(letter (#) of (text)) > []> then\n        set [asset v] to (letter (#) of (text))\n        start sound [C Elec Piano v]\n    else\n        set [asset v] to [TEXT BOX]\n    end\n    create clone of (_myself_ v)\nend\nset [# v] to [0]\nif <not < (text) contains [\(z\)]?>> then\n    wait until <key (z v) pressed?>\n    wait until <not <key (z v) pressed?>>\nelse\n    wait until <<key (z v) pressed?> or <<<key (x v) pressed?> or <key (c v) pressed?>> or <mouse down?>>>\n    if <<key (z v) pressed?> or <mouse down?>> then\n        set [output v] to [1]\n    else\n        if <<key (z v) pressed?> or <mouse down?>> then\n            set [output v] to [2]\n        else\n            set [output v] to [3]\n        end\n    end\n    wait until <not <<key (z v) pressed?> or <<<key (x v) pressed?> or <key (c v) pressed?>> or <mouse down?>>>>\nend\nbroadcast (Clear v) and wait\n\nwhen I start as a clone\ngo to x: (x) y: (y)\nswitch costume to (asset)\nif <(costume [number v]) = [1]> then\n    switch costume to ( v)\nend\nchange x by (-42)\nchange y by (22)\nset [org. x v] to (x position)\nclone setup\nshow\ngo to [front v] layer\n\nwhen I receive [clear v]\ndelete this clone\n\ndefine clone setup\nrepeat (#)\n    change x by (spacingX)\n    if <(x position) > [225]> then\n        set x to ((org. x) + (spacingX))\n        change y by ((0) - (spacingY))\n    end\nend\n\nwhen flag clicked\nhide\n\ndefine Intro\nset [move? v] to [0]\nclear graphic effects\nswitch costume to (text box v)\nset y to (-205)\nset size to (190) %\nshow\nrepeat (9)\n    change y by (6)\nend\nchange y by (1)\n\ndefine outro\nset [move? v] to [1]\nshow\nrepeat (9)\n    change y by (-6)\nend\nhide\n\nwhen I receive [old lady v]\nIntro\nif <[items v] contains [squirrel]?> then\n    type [You found my squirrel! Here, take this eye of newt. You'll need it!] at x: [-192] y: [-154] size: [190]\n    if <not <[items v] contains [eye of newt]?>> then\n        add [eye of newt] to [items v]\n    end\n    type [Good luck!] at x: [-192] y: [-162] size: [190]\nelse\n    type [Have you seen my squirrel?] at x: [-192] y: [-162] size: [190]\nend\noutro\n\nwhen I receive [statue v]\nIntro\nif <[items v] contains [rusty sword]?> then\n    delete (item # of [rusty sword] in [items v]) of [items v]\n    type [The statue started to talk!] at x: [-192] y: [-162] size: [190]\n    type [\(oh my, could it really be?\)] at x: [-192] y: [-162] size: [190]\n    type [\(my long lost sword! oh, thank you so much!\)] at x: [-192] y: [-154] size: [190]\n    type [\(How can I ever repay you?\)] at x: [-192] y: [-162] size: [190]\n    type [\( Oh, I  know! Wait here.\)] at x: [-192] y: [-162] size: [190]\n    broadcast (Move Da Statue v) and wait\n    type [\(This is an ancient staff my grandmother used to have.\)] at x: [-192] y: [-154] size: [190]\n    type [\(it'll certainly be more powerful than your fists!\)] at x: [-192] y: [-154] size: [190]\n    type [\(I hope you like it. Now I must   return to my statuely duties.\)] at x: [-192] y: [-154] size: [190]\n    add [staff] to [items v]\nelse\n    type [What a rusty old statue...] at x: [-192] y: [-162] size: [190]\n    type [the nameplate reads: mr. swordsman] at x: [-192] y: [-162] size: [190]\nend\noutro\n\nwhen I receive [tablet 2 v]\nIntro\ntype [You are approaching the master of dreams.] at x: [-192] y: [-154] size: [190]\ntype [If you wish to fight him there    will be no turning back.] at x: [-192] y: [-154] size: [190]\ntype [If you don't think you are strong enough, go back and buff up your  stats.] at x: [-192] y: [-146] size: [190]\noutro\n\nwhen flag clicked\nhide\n\ndefine ENEMY TURN\n\nwhen I receive [win talk v]\nwait (1.5) seconds\nIntro\ntype [Hello, young hobbit! click z ] at x: [-192] y: [-162] size: [190]\ntype [Ready to go on an adventure?] at x: [-192] y: [-162] size: [190]\ntype [Arrow Keys to Move!] at x: [-192] y: [-162] size: [190]\ntype [Watch out for Goblins, Trolls,    Mushrooms, so much more...] at x: [-192] y: [-162] size: [190]\ntype [You will not be able to move when the chat bar is talking!] at x: [-192] y: [-162] size: [190]\ntype [Collect all the coins to go to the next level!] at x: [-192] y: [-162] size: [190]\ntype [Lets Start! :D ] at x: [-192] y: [-162] size: [190]\noutro\n\nwhen I receive [sign talk v]\nIntro\ntype [It's a sign from Gandalf the Grey! \[Click z\]] at x: [-192] y: [-162] size: [190]\ntype [Hmm...  It says to meet him at the forest!] at x: [-192] y: [-162] size: [190]\ntype [Lets go to Gandalf!] at x: [-192] y: [-162] size: [190]\noutro\n\nwhen I receive [lady 1 1 v]\nIntro\ntype [Bilbo Baggins! What do you think  your doing?] at x: [-192] y: [-162] size: [190]\ntype [You can not go on an adventure!] at x: [-192] y: [-162] size: [190]\ntype [If you're still going, make sure  you don't die...] at x: [-192] y: [-162] size: [190]\noutro\n\nwhen I receive [gandalf lev 2 v]\nIntro\ntype [Come my young Adventurer, we must start our Journey!] at x: [-192] y: [-162] size: [190]\ntype [The dwarves will meet you soon!] at x: [-192] y: [-162] size: [190]\ntype [Good luck, my young Bilbo...] at x: [-192] y: [-162] size: [190]\noutro\n\nwhen I receive [gandalf secret v]\nIntro\ntype [What are you doing? Stop talking  to me and go!] at x: [-192] y: [-162] size: [190]\ntype [But...] at x: [-192] y: [-162] size: [190]\ntype [There are some secrets...] at x: [-192] y: [-162] size: [190]\ntype [Comment Bilbo Baggins in the      chat...] at x: [-192] y: [-162] size: [190]\ntype [Go!] at x: [-192] y: [-162] size: [190]\noutro\n\nwhen I receive [ooo a rock v]\nIntro\ntype [Oh look! It's a rock...] at x: [-192] y: [-162] size: [190]\ntype [Hmm...] at x: [-192] y: [-162] size: [190]\ntype [We must be getting close to the   Mountains!] at x: [-192] y: [-162] size: [190]\ntype [Comment I reached the Forest!] at x: [-192] y: [-162] size: [190]\noutro\n\nwhen I receive [thorin lev3 v]\nIntro\ntype [Thorin: Welcome Bilbo Baggins to  the company of Thorin Oakenshield.] at x: [-192] y: [-162] size: [190]\ntype [We are very tired and we need to  find shelter soon...] at x: [-192] y: [-162] size: [190]\ntype [There is a campfire up ahead, so  lets see they're a friend or foe...] at x: [-192] y: [-162] size: [190]\ntype [Onwards!] at x: [-192] y: [-162] size: [190]\noutro\n\nwhen I receive [kili/fili lev 3 v]\nIntro\ntype [Kili: Hello Bilbo Baggins!] at x: [-192] y: [-162] size: [190]\ntype [Kili: This is my brother Fili.] at x: [-192] y: [-162] size: [190]\ntype [Fili: Lets go Fili!] at x: [-192] y: [-162] size: [190]\ntype [Fili: We have to see who is at the campfire!] at x: [-192] y: [-162] size: [190]\noutro\n\nwhen I receive [troll talk v]\nIntro\ntype [The trolls are coming!] at x: [-192] y: [-162] size: [190]\ntype [Click space to use your weapon!] at x: [-192] y: [-162] size: [190]\ntype [Attack!] at x: [-192] y: [-162] size: [190]\noutro\n\nwhen I receive [troll thorin! v]\nIntro\ntype [Thorin: They're the trolls Bilbo!] at x: [-192] y: [-162] size: [190]\ntype [Thorin: Here is a sword, young one.] at x: [-192] y: [-162] size: [190]\ntype [Thorin: Try to run! We'll handle  the other trolls!] at x: [-192] y: [-162] size: [190]\ntype [Thorin: Go!] at x: [-192] y: [-162] size: [190]\noutro\n\nwhen I receive [mn talk v]\nIntro\ntype [We are getting close to the       mountains!] at x: [-192] y: [-162] size: [190]\ntype [We must find a resting point soon!] at x: [-192] y: [-162] size: [190]\ntype [Maybe there will be shelter in the mountains?] at x: [-192] y: [-162] size: [190]\ntype [\(Totally not gonna go in the      goblin caves...\) ] at x: [-192] y: [-162] size: [190]\noutro\n\nwhen I receive [enjoy v]\nIntro\ntype [Hope You Enjoyed!] at x: [-192] y: [-162] size: [190]\ntype [Part Two Coming soon!] at x: [-192] y: [-162] size: [190]\ntype [That is...] at x: [-192] y: [-162] size: [190]\ntype [If you want a part two? :D] at x: [-192] y: [-162] size: [190]\ntype [-yotacopaco out-] at x: [-192] y: [-162] size: [190]\noutro\n\n@Player\n\nwhen I receive [play game v]\nset [usedskip? v] to [0]\nset [mobileskip v] to [0]\nset [level v] to [1]\nshow\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    Game on\n    repeat until <<<(EXIT) > []> or <key (0 v) pressed?>> or <(mobileskip) = [1]>>\n        Tick\n        broadcast (Tick v)\n    end\n    if <<key (0 v) pressed?> and <not <(LEVEL) = [6]>>> then\n        set [exit v] to [A win win]\n        set [usedskip? v] to [1]\n    end\n    if <<(mobileskip) = [1]> and <not <(LEVEL) = [6]>>> then\n        set [exit v] to [A win win]\n        set [usedskip? v] to [1]\n    end\n    if <(EXIT) = [A win win]> then\n        broadcast (win YOO XD v)\n        GameWinYOO\n        set [mobileskip v] to [0]\n    else\n        Game - die boi boi I’m fed\n    end\nend\n\ndefine Game on\nswitch costume to (1 v)\nset rotation style [left-right v]\npoint in direction (-90)\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [x v] to [-180]\nset [y v] to [78]\nset [speedy v] to [0]\nset [sx v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset size to (100) %\nset [ghost v] effect to (0)\nshow\n\ndefine Tick\nswitch costume to (hitbox v)\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<<mouse down?> and <(mouse x) > (x position)>> and <<(touchingattack?) = [0]> and <(moveable) = [1]>>>> then\n    if <(Move?) = [1]> then\n        set [lastkeypressed v] to [right]\n        change [sx v] by (2)\n    end\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<<mouse down?> and <(mouse x) < (x position)>> and <(moveable) = [1]>>> then\n    if <(Move?) = [1]> then\n        set [lastkeypressed v] to [left]\n        change [sx v] by (-2)\n    end\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?>> then\n    if <(In air) < [4]> then\n        set [speedy v] to [16]\n    end\nend\nif <<<mouse down?> and <(y position) < (mouse y)>> and <(Move?) = [1]>> then\n    if <(In air) < [4]> then\n        set [speedy v] to [16]\n    end\nend\nif <(Speedy) > [-20]> then\n    change [speedy v] by (-1.5)\nend\nChange player y by (Speedy)\nDie? I think so\nchange [scroll x v] by (round (((x) - (SCROLL X)) / (8)))\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (6)))\nPosition\nif <touching (trampoline v)?> then\n    set [speedy v] to [30]\nend\npoint in direction (90)\nif <(Equipped) = [none]> then\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<<mouse down?> and <(mouse x) > (x position)>> and <(moveable) = [1]>>>> then\n        if <<(lastkeypressed) = [left]> and <<mouse down?> and <(mouse x) > (x position)>>> then\n            switch costume to (normalleft v)\n        else\n            switch costume to (normalright v)\n        end\n    else\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<<mouse down?> and <(mouse x) < (x position)>> and <(moveable) = [1]>>> then\n            switch costume to (normalleft v)\n        else\n            switch costume to (normalfront v)\n        end\n    end\nend\nif <(Equipped) = [hat]> then\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<<mouse down?> and <(mouse x) > (x position)>> and <(moveable) = [1]>>>> then\n        switch costume to (hatr v)\n    else\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<<mouse down?> and <(mouse x) < (x position)>> and <(moveable) = [1]>>> then\n            switch costume to (hatl v)\n        else\n            switch costume to (hat v)\n        end\n    end\nend\nif <(Equipped) = [agent]> then\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<<mouse down?> and <(mouse x) > (x position)>> and <(moveable) = [1]>>>> then\n        switch costume to (agentr v)\n    else\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<<mouse down?> and <(mouse x) < (x position)>> and <(moveable) = [1]>>> then\n            switch costume to (agentl v)\n        else\n            switch costume to (agent v)\n        end\n    end\nend\nif <(Equipped) = [dwarf]> then\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<<mouse down?> and <(mouse x) > (x position)>> and <(moveable) = [1]>>>> then\n        switch costume to (dwarfr v)\n    else\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<<mouse down?> and <(mouse x) < (x position)>> and <(moveable) = [1]>>> then\n            switch costume to (dwarfl v)\n        else\n            switch costume to (dwarf v)\n        end\n    end\nend\nif <(Equipped) = [elf]> then\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<<mouse down?> and <(mouse x) > (x position)>> and <(moveable) = [1]>>>> then\n        switch costume to (elfr v)\n    else\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<<mouse down?> and <(mouse x) < (x position)>> and <(moveable) = [1]>>> then\n            switch costume to (elfl v)\n        else\n            switch costume to (elf v)\n        end\n    end\nend\n\ndefine Change player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <<touching (levels v)?> or <touching (moving platforms 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 [speedy 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 (levels v)?> or <touching (moving platforms v)?>> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <<touching (levels v)?> or <touching (moving platforms v)?>>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    repeat until <not <<touching (levels v)?> or <touching (moving platforms 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 boi boi I’m fed\nset [dead? v] to [1]\nset [ghost v] effect to (0)\nstart sound [Bonk v]\nset [y v v] to [15]\nif <(Equipped) = [none]> then\n    switch costume to (normalfront v)\nend\nif <(Equipped) = [hat]> then\n    switch costume to (hat v)\nend\nif <(Equipped) = [agent]> then\n    switch costume to (agent v)\nend\nif <(Equipped) = [dwarf]> then\n    switch costume to (dwarf v)\nend\nif <(Equipped) = [elf]> then\n    switch costume to (elf v)\nend\nrepeat until <(y position) < [-90]>\n    set rotation style [all around v]\n    change [ghost v] effect by (5)\n    change y by (Y v)\n    change [y v v] by (-1)\nend\nrepeat until <(y position) < [-178]>\n    set rotation style [all around v]\n    change [ghost v] effect by (5)\n    change y by (Y v)\n    change [y v v] by (-1)\nend\nset [dead? v] to [0]\nbroadcast (ded boiz v)\nhide\nchange [your total coins v] by ((Collect) * (-1))\n\ndefine Die? I think so\nif <<touching (ouch v)?> or <<touching (poison v)?> or <<touching (trolls v)?> and <(invincible) = [0]>>>> then\n    broadcast (HIDEWHIP v)\n    set [exit v] to [Die \(other way\)]\nend\n\ndefine GameWinYOO\nif <<<key (p v) pressed?> or <(mobileskip) = [1]>> and <not <(LEVEL) = [6]>>> then\n    change [level v] by (1)\nelse\n    set rotation style [all around v]\n    repeat (20)\n        point towards (portal v)\n        turn right (65) degrees\n        move ((distance to [portal v]) / (2)) steps\n        change size by (-2)\n        change [ghost v] effect by (5)\n    end\n    change [level v] by (1)\n    set [guyskilledthislevel v] to [0]\n    hide\n    set [ghost v] effect to (0)\n    set size to (100) %\nend\n\nwhen flag clicked\nset [dead? v] to [0]\nhide\n\nwhen I receive [play game v]\nforever\n    if <<<([costume name v] of [signs v]) = [Sign2]> and <touching (signs v)?>> and <key (x v) pressed?>> then\n        broadcast (Sign talk v) and wait\n    else\n        if <<<([costume name v] of [peeps v]) = [2 1]> and <touching (peeps v)?>> and <key (x v) pressed?>> then\n            broadcast (Lady 1 1 v) and wait\n        else\n            if <<<([costume name v] of [peeps v]) = [2 4]> and <touching (peeps v)?>> and <key (x v) pressed?>> then\n                broadcast (Gandalf Secret v) and wait\n            else\n                if <<<([costume name v] of [signs v]) = [3 1]> and <touching (signs v)?>> and <key (x v) pressed?>> then\n                    broadcast (OoO a rock v) and wait\n                else\n                    if <<<([costume name v] of [signs v]) = [4 1]> and <touching (signs v)?>> and <key (x v) pressed?>> then\n                        broadcast (Kili/Fili lev 3 v) and wait\n                    else\n                        if <<<([costume # v] of [peeps v]) = [17]> and <touching (peeps v)?>> and <key (x v) pressed?>> then\n                            broadcast (troll thorin! v) and wait\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nhide\n\n@Shop\n\nwhen flag clicked\nset [shopshown? v] to [0]\nforever\n    if <<touching (mouse-pointer v)?> and <(costume [number v]) = [2]>> then\n        change size by (((90) - (size)) / (4))\n    else\n        change size by (((80) - (size)) / (4))\n    end\nend\n\nwhen I start as a clone\nif <(shopID) = [1]> then\n    set [suceededgetout v] to [0]\n    set [shopshown? v] to [1]\n    go [forward v] (1) layers\n    set size to (100) %\n    point in direction (90)\n    go to x: (0) y: (-150)\n    switch costume to (shop v)\n    repeat until <(y position) > [-1]>\n        change y by (((0) - (y position)) / (3))\n    end\n    go to x: (0) y: (0)\n    repeat until <<not <touching (mouse-pointer v)?>> and <mouse down?>>\n        set [moveable v] to [0]\n    end\n    wait until <not <mouse down?>>\n    if <not <touching (mouse-pointer v)?>> then\n        set [moveable v] to [1]\n        broadcast (shopclear v)\n        repeat until <(y position) < [-280]>\n            change y by (((-300) - (y position)) / (6))\n        end\n        set [shopshown? v] to [0]\n        broadcast (shopbacktogame v)\n        set [suceededgetout v] to [1]\n        delete this clone\n    else\n        repeat until <(suceededgetout) = [1]>\n            wait until <mouse down?>\n            wait until <not <mouse down?>>\n            if <touching (mouse-pointer v)?> then\n                set [suceededgetout v] to [0]\n                wait until <not <mouse down?>>\n            else\n                if <not <touching (mouse-pointer v)?>> then\n                    set [moveable v] to [1]\n                    broadcast (shopclear v)\n                    repeat until <(y position) < [-280]>\n                        change y by (((-300) - (y position)) / (6))\n                    end\n                    set [shopshown? v] to [0]\n                    broadcast (shopbacktogame v)\n                    set [suceededgetout v] to [1]\n                    delete this clone\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [shopbacktogame v]\nswitch costume to (shopbutton v)\npoint in direction (90)\nshow\ngo to x: (-200) y: (150)\n\nwhen I receive [play game v]\nset size to (100) %\ngo to x: (-195) y: (150)\nshow\nswitch costume to (shopbutton v)\nforever\n    point in direction ((([sin v] of ((timer) * (200)) ) * (5)) + (90))\nend\n\nwhen flag clicked\ndelete all of [skins you have v]\nhide\ngo to [front v] layer\n\nwhen I receive [play game v]\nforever\n    if <<touching (mouse-pointer v)?> and <(clickpossible) = [1]>> then\n        start sound [Wood Tap v]\n        wait until <not <touching (mouse-pointer v)?>>\n    end\nend\n\nwhen I start as a clone\nif <(shopID) = [2]> then\n    go to [front v] layer\n    set size to (100) %\n    point in direction (90)\n    switch costume to (hat v)\n    forever\n        go to x: (-130) y: (0)\n        if <not <[skins you have v] contains [hat]?>> then\n            if <touching (mouse-pointer v)?> then\n                set [brightness v] effect to (10)\n            else\n                set [brightness v] effect to (0)\n            end\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                set [brightness v] effect to (0)\n                wait until <not <mouse down?>>\n                if <touching (mouse-pointer v)?> then\n                    if <(YOUR TOTAL COINS) > [3]> then\n                        start sound [REGISTER v]\n                        add [hat] to [skins you have v]\n                        change [your total coins v] by (-4)\n                        switch costume to (wearinghat v)\n                        set [equipped v] to [hat]\n                    else\n                        start sound [Clang v]\n                    end\n                end\n            end\n        else\n            if <(Equipped) = [hat]> then\n                switch costume to (wearinghat v)\n                set [brightness v] effect to (15)\n            else\n                switch costume to (havehat v)\n                if <touching (mouse-pointer v)?> then\n                    set [brightness v] effect to (10)\n                else\n                    set [brightness v] effect to (0)\n                end\n                if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                    set [brightness v] effect to (0)\n                    wait until <not <mouse down?>>\n                    if <touching (mouse-pointer v)?> then\n                        set [equipped v] to [hat]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(shopID) = [3]> then\n    go to [front v] layer\n    set size to (100) %\n    point in direction (90)\n    switch costume to (agent v)\n    forever\n        go to x: (40) y: (0)\n        if <not <[skins you have v] contains [agent]?>> then\n            if <touching (mouse-pointer v)?> then\n                set [brightness v] effect to (10)\n            else\n                set [brightness v] effect to (0)\n            end\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                set [brightness v] effect to (0)\n                wait until <not <mouse down?>>\n                if <touching (mouse-pointer v)?> then\n                    if <(YOUR TOTAL COINS) > [5]> then\n                        start sound [REGISTER v]\n                        add [agent] to [skins you have v]\n                        change [your total coins v] by (-6)\n                        switch costume to (wearingagent v)\n                        set [equipped v] to [agent]\n                    else\n                        start sound [Clang v]\n                    end\n                end\n            end\n        else\n            if <(Equipped) = [agent]> then\n                switch costume to (wearingagent v)\n                set [brightness v] effect to (15)\n            else\n                switch costume to (haveagent v)\n                if <touching (mouse-pointer v)?> then\n                    set [brightness v] effect to (10)\n                else\n                    set [brightness v] effect to (0)\n                end\n                if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                    set [brightness v] effect to (0)\n                    wait until <not <mouse down?>>\n                    if <touching (mouse-pointer v)?> then\n                        set [equipped v] to [agent]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(shopID) = [4]> then\n    go to [front v] layer\n    set size to (100) %\n    point in direction (90)\n    switch costume to (dwarf v)\n    forever\n        go to x: (-130) y: (-100)\n        if <not <[skins you have v] contains [dwarf]?>> then\n            if <touching (mouse-pointer v)?> then\n                set [brightness v] effect to (10)\n            else\n                set [brightness v] effect to (0)\n            end\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                set [brightness v] effect to (0)\n                wait until <not <mouse down?>>\n                if <touching (mouse-pointer v)?> then\n                    if <(YOUR TOTAL COINS) > [7]> then\n                        start sound [REGISTER v]\n                        add [dwarf] to [skins you have v]\n                        change [your total coins v] by (-8)\n                        switch costume to (wearingdwarf v)\n                        set [equipped v] to [dwarf]\n                    else\n                        start sound [Clang v]\n                    end\n                end\n            end\n        else\n            if <(Equipped) = [dwarf]> then\n                switch costume to (wearingdwarf v)\n                set [brightness v] effect to (15)\n            else\n                switch costume to (havedwarf v)\n                if <touching (mouse-pointer v)?> then\n                    set [brightness v] effect to (10)\n                else\n                    set [brightness v] effect to (0)\n                end\n                if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                    set [brightness v] effect to (0)\n                    wait until <not <mouse down?>>\n                    if <touching (mouse-pointer v)?> then\n                        set [equipped v] to [dwarf]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(shopID) = [5]> then\n    go to [front v] layer\n    set size to (100) %\n    point in direction (90)\n    switch costume to (elf v)\n    forever\n        go to x: (40) y: (-100)\n        if <not <[skins you have v] contains [elf]?>> then\n            if <touching (mouse-pointer v)?> then\n                set [brightness v] effect to (10)\n            else\n                set [brightness v] effect to (0)\n            end\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                set [brightness v] effect to (0)\n                wait until <not <mouse down?>>\n                if <touching (mouse-pointer v)?> then\n                    if <(YOUR TOTAL COINS) > [9]> then\n                        start sound [REGISTER v]\n                        add [elf] to [skins you have v]\n                        change [your total coins v] by (-10)\n                        switch costume to (wearingagent v)\n                        set [equipped v] to [elf]\n                    else\n                        start sound [Clang v]\n                    end\n                end\n            end\n        else\n            if <(Equipped) = [elf]> then\n                switch costume to (wearingelf v)\n                set [brightness v] effect to (15)\n            else\n                switch costume to (haveelf v)\n                if <touching (mouse-pointer v)?> then\n                    set [brightness v] effect to (10)\n                else\n                    set [brightness v] effect to (0)\n                end\n                if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                    set [brightness v] effect to (0)\n                    wait until <not <mouse down?>>\n                    if <touching (mouse-pointer v)?> then\n                        set [equipped v] to [elf]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [shopclear v]\nif <not <<(costume [number v]) = [1]> or <(costume [number v]) = [2]>>> then\n    delete this clone\nend\n\nwhen I receive [reset v]\nbroadcast (shopbacktogame v)\ndelete this clone\n\ndefine shopfast\nset [shopid v] to [1]\nrepeat (4)\n    change [shopid v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nset [shopbeingtouched v] to [0]\nforever\n    if <touching (mouse-pointer v)?> then\n        set [shopbeingtouched v] to [1]\n        set [moveable v] to [0]\n    else\n        set [shopbeingtouched v] to [0]\n        if <<(shopshown?) = [0]> and <(skipbeingtouched) = [0]>> then\n            set [moveable v] to [1]\n        end\n    end\nend\n\nwhen I receive [play game v]\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        repeat until <not <mouse down?>>\n            change size by (((70) - (size)) / (4))\n        end\n        if <touching (mouse-pointer v)?> then\n            set [shopid v] to [1]\n            create clone of (_myself_ v)\n            broadcast (shop boiz v)\n            repeat until <(x position) < [-240]>\n                change x by (((-260) - (x position)) / (2))\n            end\n            shopfast\n            hide\n            go to x: (-24352345234) y: (-243524351)\n        end\n    end\nend\n\nwhen I receive [troll animate v]\nhide\n\nwhen I receive [troll talk v]\nshow\n\n@Coins\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <touching (player v)?> then\n    start sound [Coin v]\n    change [collect v] by (1)\n    change [your total coins v] by (1)\n    if <<(Collect) = (Max Collect)> and <(badguysded) = (badguymax)>> then\n        broadcast (OPEN PORtAL v)\n    end\n    delete this clone\nend\n\nwhen I receive [setup v]\nhide\nset [ghost v] effect to (0)\nset size to (100) %\nset [y v] to [0]\nset [x v] to [0]\nset [collect v] to [0]\nset [max collect v] to [0]\nif <(LEVEL) = [1]> then\n    wait (0) seconds\n    Clone x: [-20] y: [150]\n    Clone x: [-20] y: [360]\n    Clone x: [650] y: [100]\nelse\n    if <(LEVEL) = [2]> then\n        wait (0) seconds\n        Clone x: [180] y: [130]\n        Clone x: [1500] y: [150]\n    else\n        if <(LEVEL) = [3]> then\n            wait (0) seconds\n            Clone x: [740] y: [150]\n            change [max collect v] by (0)\n        else\n            if <(LEVEL) = [4]> then\n                wait (0) seconds\n                Clone x: [60] y: [180]\n                Clone x: [195] y: [75]\n                Clone x: [450] y: [-35]\n                Clone x: [-30] y: [-30]\n                Clone x: [1343] y: [-30]\n                Clone x: [1030] y: [-30]\n            else\n                if <(LEVEL) = [5]> then\n                    wait (0) seconds\n                    Clone x: [600] y: [300]\n                    Clone x: [450] y: [300]\n                    Clone x: [900] y: [0]\n                    Clone x: [1400] y: [50]\n                    change [max collect v] by (0)\n                else\n                    if <(LEVEL) = [6]> then\n                end\n            end\n        end\n    end\nend\nset [y v] to [-99999999999]\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 x: (x) y: (y)\nset [ghost v] effect to (0)\nset size to (100) %\nset [x v] to (x)\nset [y v] to (y)\nchange [max collect v] by (1)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [your total coins v] to [0]\nhide\n\n@Animation\n\nwhen I receive [troll animate v]\nset [move? v] to [no]\nset [sound v] to [0]\nset volume to (100) %\nshow\nswitch costume to (1 v)\npoint in direction (90)\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nwait (7) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nswitch costume to (2 v)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nstart sound [Trolls Captured Dwarfs ''The Hobbit An Unexpected Journey'' \(12\) \(2012\) v]\nrepeat (2)\n    repeat until <(costume [number v]) = [6]>\n        wait (0.2) seconds\n        next costume\n    end\nend\nrepeat until <(costume [number v]) = [10]>\n    wait (0.2) seconds\n    next costume\nend\nwait (2) seconds\nrepeat until <(costume [number v]) = [26]>\n    wait (0.2) seconds\n    next costume\nend\nwait (1) seconds\nrepeat until <(costume [number v]) = [34]>\n    wait (0.2) seconds\n    next costume\nend\nwait (1) seconds\nrepeat until <(costume [number v]) = [41]>\n    wait (0.2) seconds\n    next costume\nend\nwait (1.8) seconds\nrepeat until <(costume [number v]) = [58]>\n    wait (0.3) seconds\n    next costume\nend\nrepeat (2)\n    repeat until <(costume [number v]) = [78]>\n        wait (0.2) seconds\n        next costume\n    end\nend\nrepeat until <(costume [number v]) = [88]>\n    wait (0.35) seconds\n    next costume\nend\nwait (2.7) seconds\nrepeat until <(costume [number v]) = [92]>\n    wait (0.4) seconds\n    next costume\nend\nrepeat until <(costume [number v]) = [94]>\n    wait (0.3) seconds\n    next costume\nend\nrepeat (5)\n    switch costume to (93 v)\n    wait (0.4) seconds\n    switch costume to (94 v)\nend\nwait (0.5) seconds\nrepeat (5)\n    switch costume to (95 v)\n    wait (0.3) seconds\n    switch costume to (98 v)\nend\nwait (0.5) seconds\nrepeat (6)\n    switch costume to (100 v)\n    wait (0.3) seconds\n    switch costume to (99 v)\nend\nrepeat (5)\n    switch costume to (101 v)\n    wait (0.2) seconds\n    switch costume to (102 v)\nend\nwait (0.5) seconds\nrepeat (6)\n    switch costume to (100 v)\n    wait (0.3) seconds\n    switch costume to (99 v)\nend\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\nbroadcast (troll talk v)\nset [sound v] to [1]\n\nwhen flag clicked\nhide\n\n@Deco\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nhide\nset [ghost v] effect to (100)\ngo [backward v] (50) layers\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\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 [setup v]\nset [y v] to [0]\nset [x v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (1 1 v)\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (2 1 v)\n        Position x: [450] y: [0]\n        Position x: [450] y: [0]\n        Position x: [450] y: [0]\n        Position x: [450] y: [0]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (3 1 v)\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (4 1 v)\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n            else\n                if <(LEVEL) = [5]> then\n                    switch costume to (5 1 v)\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                else\n                    if <(LEVEL) = [6]> then\n                        switch costume to (6 v)\n                        Position x: [450] y: [0]\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Position x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I start as a clone\nset [ghost v] effect to (0)\ngo to [back v] layer\n\n@Ouch\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nhide\ngo to [back v] layer\ngo [backward v] (21) layers\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\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 [setup v]\nset [y v] to [0]\nset [x v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (1 1 v)\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (2 1 v)\n        Position x: [450] y: [0]\n        Position x: [450] y: [0]\n        Position x: [450] y: [0]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (3 1 v)\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (4 1 v)\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n            else\n                if <(LEVEL) = [5]> then\n                    switch costume to (5 1 v)\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                else\n                    if <(LEVEL) = [6]> then\n                        switch costume to (6 v)\n                        Position x: [450] y: [0]\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Position x: (x) y: (y)\nhide\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\n@Portal\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <<(costume [name v]) = [1]> and <touching (player v)?>> then\n    set [exit v] to [A win win]\nend\n\nwhen I receive [setup v]\nhide\nset [y v] to [0]\nset [x v] to [0]\nwait (0) seconds\nif <(LEVEL) = [1]> then\n    switch costume to (2 v)\n    Portal x: [1500] y: [50]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (2 v)\n        Portal x: [1700] y: [100]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (2 v)\n            Portal x: [1100] y: [50]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (2 v)\n                Portal x: [1485] y: [200]\n            else\n                if <(LEVEL) = [5]> then\n                    switch costume to (2 v)\n                    Portal x: [1750] y: [170]\n                else\n                    switch costume to (2 v)\n                    Portal x: [5634563456456345] y: [57345634563]\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\ndefine Portal x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I receive [open portal v]\nswitch costume to (1 v)\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\ngo to [back v] layer\nshow\n\n
Hello Everyone! It's Out! [EVERYTHING IS POSSIBLE]\n\nStory -  Bilbo Bagains(you) is going on an adventure with the dwarves and Gandalf the wizard. (I know I did not include all the dwarves from the movie/book.)\n\nHow To Play:\n-Arrow Keys to move\n-Z to continue the chat.\n-X to interact (You can interact with a lot of things)\n-Click the shop to buy things\n\nSorry about the bad quality animation! ;D\n\nImportant:\n-You can not advance to the next level if you do not collect all the coins and defeat the bad guys\n\nLag reducing:\nThis game is huge! To reduce lag:\n-Close all other tabs\n-Click that flag a bunch!\n\nNO ADVERTISING\n\nFirst Comment: @-Obelisk- (Artist!)\n\nPart two will be in the Goblin Cave! ;D\n\nCheck out this Among Us Animation: https://scratch.mit.edu/projects/437905693/ ;D\n\nMusic Credits:\n[House] Concerning Hobbits by Elvendork Music\nHobbit beginning music (from the movie)\nMisty mountains [no voices] (from the movie)\n\nCredits:\n@scratch_coco for the inspiration and forest trees\n@Griffpatch for the engine\n@HaltsApprentice12 for character art\n@xamuil2 for the text engine\n@Plant2 for the shop mechanics ;D\n\n\nI really suggest reading or watching the movie and book about this game! It is a great book/movie. \n(I read the book) \n\nHere is a link about the movie if you want to watch it! - https://www.youtube.com/watch?v=WGCGpOqEBTY\n\n\n\n\n\n\n\n\n\nOk stop scrolling...\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nI said stop...\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nNOW....\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nO-O\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nPLS NO MORE\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nDon't let the urge take over!!!\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nNOOOOOOOOOOOO\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nOk fin...\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nThere are some secrets! (well duh)\nCan you find them? ;D\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nHope you Enjoy!\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<======I'm going to fix the chat thing in part two...