orb - a platformer (mobile & cpu)


@Stage\n\nwhen flag clicked\nforever\n    play sound [TA-OpeningTheme v] until done\nend\n\nwhen flag clicked\nforever\n    set volume to (((3) - (music_settings)) * (50)) %\nend\n\n@player\n\ndefine reset\nif <<(world) = [3]> and <(level) = [1]>> then\n    change [starty v] by (50)\nend\ngo to x: (startx) y: (starty)\nset [ys v] to [0]\nset [xs v] to [0]\n\ndefine stay up\nset [n v] to [0]\nrepeat (25)\n    if <touching (ground v)?> then\n        change y by (1)\n        change [n v] by (1)\n    end\nend\nif <(n) = [25]> then\n    change y by (-25)\n    set [ys v] to [-2]\n    set [xs v] to (((0) - (xs)) * (2))\nend\nif <(xs) > [5]> then\n    set [xs v] to [5]\nend\nif <[-5] > (xs)> then\n    set [xs v] to [-5]\nend\n\nwhen I receive [game v]\ngo to [front v] layer\nshow\nif <(world) = [3]> then\n    change [starty v] by (50)\nend\nreset\nset size to (30) %\nforever\n    switch costume to (costume3 v)\n    if <(water?) = [true]> then\n        change [ys v] by (-0.2)\n    else\n        if <<(ys) < [4]> or <<<<([costume # v] of [mobile v]) = [5]> or <key (up arrow v) pressed?>> or <([costume # v] of [mobile v]) = [4]>> or <<key (w v) pressed?> or <([costume # v] of [mobile v]) = [3]>>>> then\n            change [ys v] by (-1)\n        else\n            change [ys v] by (-2)\n        end\n    end\n    if <(y position) < [-170]> then\n        reset\n    end\n    if <touching (ground v)?> then\n        set [ys v] to [0]\n        if <<<<([costume # v] of [mobile v]) = [5]> or <key (up arrow v) pressed?>> or <([costume # v] of [mobile v]) = [4]>> or <<key (w v) pressed?> or <([costume # v] of [mobile v]) = [3]>>> then\n            set [ys v] to [13]\n        end\n        stay up\n    end\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<([costume # v] of [mobile v]) = [5]> or <([costume # v] of [mobile v]) = [6]>>> then\n        change [xs v] by (-0.5)\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<([costume # v] of [mobile v]) = [2]> or <([costume # v] of [mobile v]) = [3]>>> then\n        change [xs v] by (0.5)\n    end\n    set [xs v] to ((xs) / (1.1))\n    change y by (ys)\n    change x by (xs)\n    switch costume to (character)\n    if <touching (obstacles v)?> then\n        reset\n    end\n    if <[230] < (x position)> then\n        broadcast (next v)\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        reset\n        repeat (20)\n            change [ghost v] effect by (-5)\n        end\n    end\n    if <<<touching color (#0092de)?> or <touching color (#0098ea)?>> or <<touching color (#009ff4)?> or <touching color (#00a6ff)?>>> then\n        set [water? v] to [true]\n    else\n        set [water? v] to [false]\n    end\nend\n\nwhen I receive [title screen v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [game v]\nforever\n    set volume to (((3) - (sfx_settings)) * (50)) %\nend\n\nwait (1) seconds\n\ngo to x: (134) y: (-45)\n\nbroadcast (next v)\n\nbroadcast (next v) and wait\n\nset [ys v] to [10]\n\nwhen I receive [game v]\nforever\n    if <<<<([costume # v] of [mobile v]) = [5]> or <key (up arrow v) pressed?>> or <([costume # v] of [mobile v]) = [4]>> or <<key (w v) pressed?> or <([costume # v] of [mobile v]) = [3]>>> then\n        if <(water?) = [true]> then\n            set [ys v] to [5]\n        end\n        set [pitch v] effect to (-50)\n        play sound [Jump v] until done\n    end\nend\n\nchange [pitch v] effect by (10)\n\nwhen I receive [refresh v]\nreset\n\n@ground\n\nwhen I receive [next v]\nswitch costume to ((((world) * (5)) - (4)) + ((level) - (1)))\n\nwhen I receive [game v]\nswitch costume to (((world) * (5)) - (4))\nshow\n\nwhen I receive [title screen v]\nhide\n\nwhen I receive [refresh v]\nswitch costume to ((((world) * (5)) - (4)) + ((level) - (1)))\n\n@obstacles\n\nwhen I receive [next v]\npoint in direction (90)\ndel\nchange [level v] by (1)\nAHHHHHHHHHHHHH\n\ndefine del\ndelete this clone\n\nwhen I receive [game v]\npoint in direction (90)\nif <(world) = [1]> then\n    switch costume to (costume1 v)\n    set [level v] to [1]\n    go to [front v] layer\n    show\n    go to x: (210) y: (26)\n    create clone of (_myself_ v)\n    go to x: (-72) y: (-55)\n    create clone of (_myself_ v)\n    go to x: (237) y: (99)\n    create clone of (_myself_ v)\n    hide\nelse\n    if <(world) = [2]> then\n        switch costume to (costume2 v)\n        set [level v] to [1]\n        go to [front v] layer\n        show\n        go to x: (-119) y: (110)\n        create clone of (_myself_ v)\n        go to x: (232) y: (114)\n        create clone of (_myself_ v)\n        go to x: (67) y: (-31)\n        create clone of (_myself_ v)\n        hide\n    else\n        if <(world) = [3]> then\n            switch costume to (costume3 v)\n            set [level v] to [1]\n            show\n            go to x: (9) y: (-33)\n            create clone of (_myself_ v)\n            go to x: (80) y: (40)\n            create clone of (_myself_ v)\n            go to x: (146) y: (-157)\n            create clone of (_myself_ v)\n            go to x: (190) y: (-157)\n            create clone of (_myself_ v)\n            go to x: (233) y: (-157)\n            create clone of (_myself_ v)\n            hide\n        else\n            switch costume to (costume5 v)\n            set [level v] to [1]\n            show\n            point in direction (60)\n            go to x: (118) y: (-2)\n            create clone of (_myself_ v)\n            point in direction (90)\n            go to x: (69) y: (79)\n            create clone of (_myself_ v)\n            go to x: (-76) y: (9)\n            create clone of (_myself_ v)\n            go to x: (-64) y: (149)\n            create clone of (_myself_ v)\n            hide\n        end\n    end\nend\n\nwhen I receive [game v]\nhide\n\nwhen I start as a clone\nif <(costume [number v]) = [4]> then\n    forever\n        set size to (size) %\n    end\nend\n\nwhen I receive [game v]\nif <(world) = [3]> then\n    set [size v] to [80]\n    set [cos v] to [0]\n    forever\n        change [cos v] by (1)\n        change [size v] by ([cos v] of (cos) )\n    end\nend\n\ndefine AHHHHHHHHHHHHH\ngo to [front v] layer\nif <(world) = [1]> then\n    if <(level) = [1]> then\n        switch costume to (costume1 v)\n        set [level v] to [1]\n        go to [front v] layer\n        show\n        go to x: (210) y: (26)\n        create clone of (_myself_ v)\n        go to x: (-72) y: (-55)\n        create clone of (_myself_ v)\n        go to x: (237) y: (99)\n        create clone of (_myself_ v)\n        hide\n    end\n    if <(level) = [2]> then\n        switch costume to (costume1 v)\n        show\n        go to x: (172) y: (106)\n        create clone of (_myself_ v)\n        go to x: (-189) y: (91)\n        create clone of (_myself_ v)\n        go to x: (-71) y: (15)\n        create clone of (_myself_ v)\n        go to x: (-206) y: (-39)\n        create clone of (_myself_ v)\n        go to x: (-100) y: (-122)\n        hide\n    end\n    if <(level) = [3]> then\n        switch costume to (costume1 v)\n        show\n        go to x: (-98) y: (-119)\n        create clone of (_myself_ v)\n        go to x: (-4) y: (-57)\n        create clone of (_myself_ v)\n        go to x: (-204) y: (15)\n        create clone of (_myself_ v)\n        go to x: (61) y: (83)\n        create clone of (_myself_ v)\n        go to x: (-203) y: (167)\n        create clone of (_myself_ v)\n        go to x: (212) y: (171)\n        create clone of (_myself_ v)\n        hide\n    end\n    if <(level) = [4]> then\n        switch costume to (costume1 v)\n        show\n        go to x: (217) y: (95)\n        create clone of (_myself_ v)\n        hide\n    end\n    if <(level) = [5]> then\n        switch costume to (costume1 v)\n        show\n        go to x: (27) y: (-125)\n        create clone of (_myself_ v)\n        go to x: (-144) y: (3)\n        create clone of (_myself_ v)\n        point in direction (75)\n        go to x: (-47) y: (60)\n        create clone of (_myself_ v)\n        point in direction (90)\n        go to x: (143) y: (-126)\n        create clone of (_myself_ v)\n        go to x: (229) y: (-123)\n        create clone of (_myself_ v)\n        hide\n    end\n    if <(level) = [6]> then\n        broadcast (world complete v)\n    end\nelse\n    if <(world) = [2]> then\n        if <(level) = [1]> then\n            switch costume to (costume2 v)\n            set [level v] to [1]\n            go to [front v] layer\n            show\n            go to x: (-119) y: (90)\n            create clone of (_myself_ v)\n            go to x: (232) y: (114)\n            create clone of (_myself_ v)\n            go to x: (67) y: (-31)\n            create clone of (_myself_ v)\n            hide\n        end\n        if <(level) = [2]> then\n            show\n            switch costume to (costume2 v)\n            go to [front v] layer\n            go to x: (211) y: (143)\n            create clone of (_myself_ v)\n            go to x: (-119) y: (90)\n            create clone of (_myself_ v)\n            hide\n        end\n        if <(level) = [3]> then\n            show\n            switch costume to (costume2 v)\n            go to [front v] layer\n            go to x: (-143) y: (-103)\n            create clone of (_myself_ v)\n            go to x: (-29) y: (-27)\n            create clone of (_myself_ v)\n            go to x: (91) y: (45)\n            create clone of (_myself_ v)\n            go to x: (226) y: (139)\n            create clone of (_myself_ v)\n            go to x: (237) y: (-85)\n            create clone of (_myself_ v)\n            hide\n        end\n        if <(level) = [4]> then\n            show\n            switch costume to (costume2 v)\n            go to [front v] layer\n            go to x: (247) y: (-85)\n            create clone of (_myself_ v)\n            go to x: (169) y: (-100)\n            create clone of (_myself_ v)\n            go to x: (18) y: (-38)\n            create clone of (_myself_ v)\n            go to x: (41) y: (124)\n            create clone of (_myself_ v)\n            hide\n        end\n        if <(level) = [5]> then\n            show\n            switch costume to (costume2 v)\n            go to [front v] layer\n            go to x: (-134) y: (-108)\n            create clone of (_myself_ v)\n            go to x: (-12) y: (9)\n            create clone of (_myself_ v)\n            go to x: (-129) y: (100)\n            create clone of (_myself_ v)\n            go to x: (5) y: (120)\n            create clone of (_myself_ v)\n            hide\n        end\n        if <(level) = [6]> then\n            broadcast (world complete v)\n        end\n    else\n        if <(world) = [3]> then\n            if <(level) = [1]> then\n                switch costume to (costume3 v)\n                set [level v] to [1]\n                show\n                go to x: (9) y: (-33)\n                create clone of (_myself_ v)\n                go to x: (80) y: (40)\n                create clone of (_myself_ v)\n                go to x: (146) y: (-157)\n                create clone of (_myself_ v)\n                go to x: (190) y: (-157)\n                create clone of (_myself_ v)\n                go to x: (233) y: (-157)\n                create clone of (_myself_ v)\n                hide\n            end\n            if <(level) = [2]> then\n                show\n                go to [front v] layer\n                switch costume to (costume4 v)\n                go to x: (-10) y: (51)\n                create clone of (_myself_ v)\n                go to x: (94) y: (-155)\n                create clone of (_myself_ v)\n                go to x: (206) y: (13)\n                create clone of (_myself_ v)\n                hide\n            end\n            if <(level) = [3]> then\n                show\n                go to [front v] layer\n                switch costume to (costume4 v)\n                go to x: (-36) y: (38)\n                create clone of (_myself_ v)\n                go to x: (156) y: (73)\n                create clone of (_myself_ v)\n                go to x: (156) y: (-101)\n                create clone of (_myself_ v)\n                go to x: (-116) y: (-151)\n                create clone of (_myself_ v)\n                switch costume to (costume3 v)\n                go to x: (-6) y: (-129)\n                create clone of (_myself_ v)\n                hide\n            end\n            if <(level) = [4]> then\n                show\n                go to [front v] layer\n                switch costume to (costume4 v)\n                go to x: (-119) y: (144)\n                create clone of (_myself_ v)\n                go to x: (25) y: (-162)\n                create clone of (_myself_ v)\n                go to x: (25) y: (-66)\n                create clone of (_myself_ v)\n                go to x: (171) y: (72)\n                create clone of (_myself_ v)\n                switch costume to (costume3 v)\n                go to x: (-121) y: (-99)\n                create clone of (_myself_ v)\n                go to x: (-91) y: (-99)\n                create clone of (_myself_ v)\n                go to x: (-121) y: (6)\n                create clone of (_myself_ v)\n                go to x: (-84) y: (6)\n                create clone of (_myself_ v)\n                go to x: (188) y: (49)\n                create clone of (_myself_ v)\n                set rotation style [all around v]\n                point in direction (-90)\n                go to x: (152) y: (156)\n                create clone of (_myself_ v)\n                hide\n            end\n            if <(level) = [5]> then\n                show\n                go to [front v] layer\n                switch costume to (costume4 v)\n                go to x: (-108) y: (-48)\n                create clone of (_myself_ v)\n                go to x: (109) y: (66)\n                create clone of (_myself_ v)\n                switch costume to (costume3 v)\n                go to x: (3) y: (50)\n                create clone of (_myself_ v)\n                hide\n            end\n            if <(level) = [6]> then\n                broadcast (world complete v)\n            end\n        else\n            if <(level) = [1]> then\n                switch costume to (costume5 v)\n                set [level v] to [1]\n                show\n                point in direction (60)\n                go to x: (118) y: (-2)\n                create clone of (_myself_ v)\n                point in direction (90)\n                go to x: (69) y: (79)\n                create clone of (_myself_ v)\n                go to x: (-76) y: (9)\n                create clone of (_myself_ v)\n                go to x: (-64) y: (149)\n                create clone of (_myself_ v)\n                hide\n            end\n            if <(level) = [2]> then\n                show\n                switch costume to (costume5 v)\n                go to [front v] layer\n                go to x: (-156) y: (-104)\n                create clone of (_myself_ v)\n                go to x: (-148) y: (36)\n                create clone of (_myself_ v)\n                go to x: (-206) y: (100)\n                create clone of (_myself_ v)\n                go to x: (-85) y: (151)\n                create clone of (_myself_ v)\n                hide\n            end\n            if <(level) = [3]> then\n                show\n                switch costume to (costue6 v)\n                go to [front v] layer\n                go to x: (-26) y: (-105)\n                set size to (20) %\n                point in direction (-90)\n                create clone of (_myself_ v)\n                set size to (30) %\n                switch costume to (costume5 v)\n                point in direction (90)\n                go to x: (108) y: (-43)\n                create clone of (_myself_ v)\n                go to x: (-202) y: (72)\n                create clone of (_myself_ v)\n                go to x: (-29) y: (102)\n                create clone of (_myself_ v)\n                go to x: (46) y: (103)\n                create clone of (_myself_ v)\n                hide\n            end\n            if <(level) = [4]> then\n                show\n                switch costume to (costume5 v)\n                go to [front v] layer\n                point in direction (-90)\n                go to x: (-187) y: (-43)\n                create clone of (_myself_ v)\n                go to x: (-86) y: (-46)\n                create clone of (_myself_ v)\n                point in direction (90)\n                go to x: (-147) y: (-114)\n                create clone of (_myself_ v)\n                go to x: (-92) y: (-113)\n                create clone of (_myself_ v)\n                go to x: (7) y: (-113)\n                create clone of (_myself_ v)\n                go to x: (174) y: (70)\n                create clone of (_myself_ v)\n                go to x: (-69) y: (75)\n                create clone of (_myself_ v)\n                go to x: (-146) y: (121)\n                create clone of (_myself_ v)\n                hide\n            end\n            if <(level) = [5]> then\n                show\n                switch costume to (costume5 v)\n                go to [front v] layer\n                point in direction (-90)\n                go to x: (-62) y: (48)\n                create clone of (_myself_ v)\n                go to x: (111) y: (46)\n                create clone of (_myself_ v)\n                point in direction (90)\n                go to x: (13) y: (0)\n                create clone of (_myself_ v)\n                go to x: (198) y: (-50)\n                create clone of (_myself_ v)\n                go to x: (-118) y: (-76)\n                create clone of (_myself_ v)\n                go to x: (-207) y: (-6)\n                create clone of (_myself_ v)\n                hide\n            end\n            if <(level) = [6]> then\n                broadcast (world complete v)\n            end\n        end\n    end\nend\n\nwhen I receive [refresh v]\nAHHHHHHHHHHHHH\nif <(world) = [3]> then\n    set [size v] to [80]\n    set [cos v] to [0]\n    forever\n        change [cos v] by (1)\n        change [size v] by ([cos v] of (cos) )\n    end\nend\n\nwhen I receive [title screen v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@ground bg\n\nwhen I receive [title screen v]\nhide\n\nwhen I receive [game v]\ngo to [back v] layer\nswitch costume to (((world) * (5)) - (4))\nshow\n\nwhen I receive [next v]\nswitch costume to ((((world) * (5)) - (4)) + ((level) - (1)))\n\nwhen I receive [refresh v]\nswitch costume to ((((world) * (5)) - (4)) + ((level) - (1)))\n\n@title\n\nwhen flag clicked\nbroadcast (title screen v)\n\nwhen I receive [title screen v]\ngo to x: (0) y: (80)\nshow\npoint in direction (-90)\nrepeat (20)\n    turn right (((90) - (direction)) / (5)) degrees\nend\npoint in direction (90)\nset [tan v] to [0]\nforever\n    change [tan v] by (2)\n    set x to ((([tan v] of (tan) ) * (15)) - (0))\nend\n\nwhen I receive [lvl selection v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [shop v]\nstop [other scripts in sprite v]\nhide\n\n@play\n\nwhen I receive [lvl selection v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [title screen v]\nshow\nset size to (80) %\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((80) - (size)) / (4))\n        if <mouse down?> then\n            wait until <not <mouse down?>>\n            if <touching (mouse-pointer v)?> then\n                broadcast (lvl selection v)\n            end\n        end\n    else\n        change size by (((70) - (size)) / (4))\n    end\nend\n\nwhen I receive [shop v]\nhide\nstop [other scripts in sprite v]\n\n@level\n\ndefine type (text)\nshow\nset [n v] to [1]\nset [l v] to []\nbroadcast (del v)\nrepeat (length of (text))\n    set [l v] to (letter (n) of (text))\n    repeat until <(costume [name v]) = (l)>\n        next costume\n    end\n    create clone of (_myself_ v)\n    change [n v] by (1)\n    change x by (22)\nend\nhide\n\nwhen I receive [del v]\ndelete this clone\n\nwhen flag clicked\nset [world v] to [1]\n\nwhen I receive [game v]\nif <(world) = [1]> then\n    wait (0.1) seconds\n    wait until <mouse down?>\n    wait until <not <mouse down?>>\nend\nforever\n    go to x: (-130) y: (140)\n    go to [front v] layer\n    type (join (join [l] (world)) (join [-] (level)))\nend\n\nwhen I receive [title screen v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@s. button\n\nwhen I receive [lvl selection v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [title screen v]\nshow\nset size to (80) %\nforever\n    if <touching (mouse-pointer v)?> then\n        go to [front v] layer\n        change size by (((80) - (size)) / (4))\n        if <mouse down?> then\n            wait until <not <mouse down?>>\n            if <touching (mouse-pointer v)?> then\n                if <(on?) = [1]> then\n                    broadcast (stop v)\n                    set [on? v] to [0]\n                else\n                    broadcast (settings v)\n                    set [on? v] to [1]\n                end\n            end\n        end\n    else\n        change size by (((70) - (size)) / (4))\n    end\nend\n\nwhen I receive [shop v]\nhide\nset [on? v] to [0]\nstop [other scripts in sprite v]\n\nif <(on?) = [1]> then\n\n@settings\n\ndefine clone (#)\nset [clone# v] to [0]\nrepeat (#)\n    change [clone# v] by (1)\n    create clone of (_myself_ v)\n    wait (0) seconds\nend\n\nwhen I start as a clone\nshow\nif <(clone#) = [1]> then\n    go to [front v] layer\n    switch costume to (join [sound-] (music_settings))\n    repeat (20)\n        go to x: (130) y: (-97)\n    end\n    forever\n        switch costume to (join [sound-] (music_settings))\n        if <touching (mouse-pointer v)?> then\n            go to [front v] layer\n            change size by (((140) - (size)) / (4))\n            if <mouse down?> then\n                wait until <not <mouse down?>>\n                change [music_settings v] by (1)\n                if <[3] < (music_settings)> then\n                    set [music_settings v] to [1]\n                end\n            end\n        else\n            change size by (((120) - (size)) / (4))\n        end\n    end\nelse\n    if <(clone#) = [2]> then\n        switch costume to (join [sfx-] (sfx_settings))\n        repeat (20)\n            change x by (((205) - (x position)) / (4))\n        end\n        set x to (205)\n        forever\n            switch costume to (join [sfx-] (sfx_settings))\n            if <touching (mouse-pointer v)?> then\n                go to [front v] layer\n                change size by (((140) - (size)) / (4))\n                if <mouse down?> then\n                    wait until <not <mouse down?>>\n                    change [sfx_settings v] by (1)\n                    if <[3] < (sfx_settings)> then\n                        set [sfx_settings v] to [1]\n                    end\n                end\n            else\n                change size by (((120) - (size)) / (4))\n            end\n        end\n    else\n        switch costume to (join [mobil/cpu-] (device_settings))\n        repeat (20)\n            change x by (((280) - (x position)) / (4))\n        end\n        set x to (280)\n        forever\n            switch costume to (join [mobil/cpu-] (device_settings))\n            if <touching (mouse-pointer v)?> then\n                go to [front v] layer\n                change size by (((140) - (size)) / (4))\n                if <mouse down?> then\n                    wait until <not <mouse down?>>\n                    change [device_settings v] by (1)\n                    if <[2] < (device_settings)> then\n                        set [device_settings v] to [1]\n                    end\n                end\n            else\n                change size by (((120) - (size)) / (4))\n            end\n        end\n    end\nend\n\ndefine reset\nset [device_settings v] to [2]\nset [music_settings v] to [1]\nset [sfx_settings v] to [1]\n\nwhen I receive [settings v]\ngo to x: (110) y: (-97)\nclone [3]\nhide\n\nwhen flag clicked\nreset\n\nwhen I receive [stop v]\ngo to [back v] layer\nstop [other scripts in sprite v]\nrepeat (20)\n    change x by (((80) - (x position)) / (4))\nend\ndelete this clone\n\nwhen I receive [lvl selection v]\nhide\ndelete this clone\n\nwhen I receive [shop v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@mobile\n\nwhen I receive [game v]\nset drag mode [draggable v]\nswitch costume to (costume1 v)\nif <(device_settings) = [1]> then\n    show\n    go to [front v] layer\n    forever\n        point towards (mouse-pointer v)\n        set rotation style [don't rotate v]\n        if <mouse down?> then\n            if <<(direction) < [180]> and <(direction) > [60]>> then\n                switch costume to (costume2 v)\n            end\n            if <<(direction) < [60]> and <(direction) > [26]>> then\n                switch costume to (costume3 v)\n            end\n            if <<(direction) < [26]> and <(direction) > [-13]>> then\n                switch costume to (costume4 v)\n            end\n            if <<(direction) < [-13]> and <(direction) > [-58]>> then\n                switch costume to (costume5 v)\n            end\n            if <<(direction) < [-58]> and <(direction) > [-180]>> then\n                switch costume to (costume6 v)\n            end\n        else\n            switch costume to (costume1 v)\n        end\n    end\nelse\n    hide\nend\n\nwhen I receive [title screen v]\nhide\nstop [other scripts in sprite v]\n\n@wld selection\n\ndefine clone (#)\nset [clone#3 v] to [0]\nrepeat (#)\n    change [clone#3 v] by (1)\n    create clone of (_myself_ v)\n    wait (0) seconds\nend\n\nwhen I receive [game v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [lvl selection v]\nhide\nclone [4]\n\nwhen I receive [title screen v]\nhide\nstop [other scripts in sprite v]\n\nwhen I start as a clone\nshow\nset size to (0) %\nif <(clone#3) = [1]> then\n    go to x: (-100) y: (100)\n    if <(item (1) of [unlocked v]) = [1]> then\n        switch costume to (costume1 v)\n    else\n        switch costume to (costume5 v)\n    end\n    forever\n        if <touching (mouse-pointer v)?> then\n            change size by (((150) - (size)) / (4))\n            if <<mouse down?> and <(item (1) of [unlocked v]) = [1]>> then\n                wait until <not <mouse down?>>\n                if <touching (mouse-pointer v)?> then\n                    set [world v] to [1]\n                    broadcast (story v)\n                end\n            end\n        else\n            change size by (((130) - (size)) / (4))\n        end\n    end\nelse\n    if <(clone#3) = [2]> then\n        if <(item (2) of [unlocked v]) = [1]> then\n            switch costume to (costume2 v)\n        else\n            switch costume to (costume5 v)\n        end\n        go to x: (100) y: (100)\n        forever\n            if <touching (mouse-pointer v)?> then\n                change size by (((150) - (size)) / (4))\n                if <<mouse down?> and <(item (2) of [unlocked v]) = [1]>> then\n                    wait until <not <mouse down?>>\n                    if <touching (mouse-pointer v)?> then\n                        set [world v] to [2]\n                        broadcast (game v)\n                    end\n                end\n            else\n                change size by (((130) - (size)) / (4))\n            end\n        end\n    else\n        if <(clone#3) = [3]> then\n            if <(item (3) of [unlocked v]) = [1]> then\n                switch costume to (costume3 v)\n            else\n                switch costume to (costume5 v)\n            end\n            go to x: (-100) y: (-90)\n            forever\n                if <touching (mouse-pointer v)?> then\n                    change size by (((150) - (size)) / (4))\n                    if <<mouse down?> and <(item (3) of [unlocked v]) = [1]>> then\n                        wait until <not <mouse down?>>\n                        if <touching (mouse-pointer v)?> then\n                            set [world v] to [3]\n                            broadcast (game v)\n                        end\n                    end\n                else\n                    change size by (((130) - (size)) / (4))\n                end\n            end\n        else\n            if <(item (4) of [unlocked v]) = [1]> then\n                switch costume to (costume4 v)\n            else\n                switch costume to (costume5 v)\n            end\n            go to x: (100) y: (-90)\n            forever\n                if <touching (mouse-pointer v)?> then\n                    change size by (((150) - (size)) / (4))\n                    if <<mouse down?> and <(item (4) of [unlocked v]) = [1]>> then\n                        wait until <not <mouse down?>>\n                        if <touching (mouse-pointer v)?> then\n                            set [world v] to [4]\n                            broadcast (game v)\n                        end\n                    end\n                else\n                    change size by (((130) - (size)) / (4))\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\ndelete all of [unlocked v]\nadd [1] to [unlocked v]\nadd [0] to [unlocked v]\nadd [0] to [unlocked v]\nadd [0] to [unlocked v]\n\nwhen I receive [story v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@W. complete\n\nwhen flag clicked\n\nwhen I receive [world complete v]\ngo to x: (-465) y: (0)\ngo to [front v] layer\nif <not <(world) = [4]>> then\n    replace item ((world) + (1)) of [unlocked v] with [1]\nend\nshow\nrepeat (20)\n    change x by (((0) - (x position)) / (8))\nend\nset x to (0)\nwait (1) seconds\nbroadcast (title screen v)\nrepeat (20)\n    change x by (((600) - (x position)) / (8))\nend\nhide\n\n@coins\n\nwhen I receive [next v]\nwait (0) seconds\nk dis is epic\n\nwhen I receive [game v]\nswitch costume to (costume1 v)\ngo to [front v] layer\nshow\nif <(world) = [1]> then\n    go to x: (-138) y: (-66)\n    create clone of (_myself_ v)\n    go to x: (25) y: (15)\n    create clone of (_myself_ v)\n    go to x: (134) y: (53)\n    create clone of (_myself_ v)\n    go to x: (-19) y: (105)\n    create clone of (_myself_ v)\n    hide\nelse\n    if <(world) = [2]> then\n        switch costume to (costume2 v)\n        go to [front v] layer\n        show\n        go to x: (121) y: (156)\n        create clone of (_myself_ v)\n        go to x: (64) y: (147)\n        create clone of (_myself_ v)\n        go to x: (-166) y: (-102)\n        create clone of (_myself_ v)\n        go to x: (-123) y: (-102)\n        create clone of (_myself_ v)\n        go to x: (-84) y: (-101)\n        create clone of (_myself_ v)\n        go to x: (10) y: (-32)\n        create clone of (_myself_ v)\n        go to x: (-41) y: (93)\n        create clone of (_myself_ v)\n        go to x: (77) y: (17)\n        create clone of (_myself_ v)\n        hide\n    else\n        if <(world) = [3]> then\n            switch costume to (costume2 v)\n            go to [front v] layer\n            show\n            go to x: (-166) y: (-62)\n            create clone of (_myself_ v)\n            go to x: (-121) y: (-99)\n            create clone of (_myself_ v)\n            go to x: (-61) y: (-40)\n            create clone of (_myself_ v)\n            go to x: (15) y: (21)\n            create clone of (_myself_ v)\n            go to x: (106) y: (18)\n            create clone of (_myself_ v)\n            go to x: (131) y: (-58)\n            create clone of (_myself_ v)\n            go to x: (150) y: (-93)\n            create clone of (_myself_ v)\n            go to x: (199) y: (-95)\n            create clone of (_myself_ v)\n            hide\n        else\n            switch costume to (costume2 v)\n            go to [front v] layer\n            show\n            go to x: (-155) y: (-106)\n            create clone of (_myself_ v)\n            go to x: (-110) y: (-106)\n            create clone of (_myself_ v)\n            go to x: (-63) y: (-106)\n            create clone of (_myself_ v)\n            go to x: (17) y: (-61)\n            create clone of (_myself_ v)\n            go to x: (-55) y: (2)\n            create clone of (_myself_ v)\n            go to x: (8) y: (73)\n            create clone of (_myself_ v)\n            go to x: (-33) y: (142)\n            create clone of (_myself_ v)\n            go to x: (54) y: (174)\n            create clone of (_myself_ v)\n            go to x: (165) y: (174)\n            create clone of (_myself_ v)\n            hide\n        end\n    end\nend\n\ndefine del\ndelete this clone\n\nwhen I receive [game v]\nhide\n\nwhen I start as a clone\nforever\n    next costume\n    if <touching (player v)?> then\n        change [coins v] by (1)\n        start sound [\[Super Mario Bros\] Coin Sound Effect \[Free Ringtone Download\] v]\n        delete this clone\n    end\nend\n\nwhen flag clicked\nset [coins v] to [0]\n\nwhen I receive [game v]\nforever\n    set volume to (((3) - (sfx_settings)) * (50)) %\nend\n\ndefine k dis is epic\ndel\ngo to [front v] layer\nif <(world) = [1]> then\n    if <(level) = [1]> then\n        switch costume to (costume1 v)\n        go to [front v] layer\n        show\n        go to x: (-138) y: (-66)\n        create clone of (_myself_ v)\n        go to x: (25) y: (15)\n        create clone of (_myself_ v)\n        go to x: (134) y: (53)\n        create clone of (_myself_ v)\n        go to x: (-19) y: (105)\n        create clone of (_myself_ v)\n        hide\n    end\n    if <(level) = [2]> then\n        switch costume to (costume1 v)\n        go to [front v] layer\n        show\n        go to x: (-137) y: (-126)\n        create clone of (_myself_ v)\n        go to x: (-183) y: (-46)\n        create clone of (_myself_ v)\n        go to x: (-133) y: (6)\n        create clone of (_myself_ v)\n        go to x: (-175) y: (81)\n        create clone of (_myself_ v)\n        go to x: (-35) y: (93)\n        create clone of (_myself_ v)\n        go to x: (190) y: (139)\n        create clone of (_myself_ v)\n        hide\n    end\n    if <(level) = [3]> then\n        switch costume to (costume1 v)\n        go to [front v] layer\n        show\n        go to x: (-189) y: (-131)\n        create clone of (_myself_ v)\n        go to x: (-124) y: (-64)\n        create clone of (_myself_ v)\n        go to x: (-164) y: (8)\n        create clone of (_myself_ v)\n        go to x: (-50) y: (76)\n        create clone of (_myself_ v)\n        go to x: (-146) y: (160)\n        create clone of (_myself_ v)\n        go to x: (34) y: (158)\n        create clone of (_myself_ v)\n        hide\n    end\n    if <(level) = [4]> then\n        show\n        switch costume to (costume2 v)\n        go to [front v] layer\n        go to x: (-149) y: (-102)\n        create clone of (_myself_ v)\n        go to x: (-113) y: (-69)\n        create clone of (_myself_ v)\n        go to x: (-56) y: (-15)\n        create clone of (_myself_ v)\n        go to x: (-16) y: (18)\n        create clone of (_myself_ v)\n        go to x: (-85) y: (-41)\n        create clone of (_myself_ v)\n        hide\n    end\n    if <(level) = [5]> then\n        switch costume to (costume2 v)\n        go to [front v] layer\n        show\n        go to x: (-134) y: (-109)\n        create clone of (_myself_ v)\n        go to x: (-28) y: (-138)\n        create clone of (_myself_ v)\n        go to x: (28) y: (-65)\n        create clone of (_myself_ v)\n        go to x: (-85) y: (-29)\n        create clone of (_myself_ v)\n        go to x: (-216) y: (-9)\n        create clone of (_myself_ v)\n        go to x: (-29) y: (62)\n        create clone of (_myself_ v)\n        go to x: (161) y: (-137)\n        create clone of (_myself_ v)\n        hide\n    end\nelse\n    if <(world) = [2]> then\n        if <(level) = [1]> then\n            switch costume to (costume2 v)\n            go to [front v] layer\n            show\n            go to x: (121) y: (156)\n            create clone of (_myself_ v)\n            go to x: (64) y: (147)\n            create clone of (_myself_ v)\n            go to x: (-166) y: (-102)\n            create clone of (_myself_ v)\n            go to x: (-123) y: (-102)\n            create clone of (_myself_ v)\n            go to x: (-84) y: (-101)\n            create clone of (_myself_ v)\n            go to x: (10) y: (-32)\n            create clone of (_myself_ v)\n            go to x: (-41) y: (93)\n            create clone of (_myself_ v)\n            go to x: (77) y: (17)\n            create clone of (_myself_ v)\n            hide\n        end\n        if <(level) = [2]> then\n            switch costume to (costume1 v)\n            go to [front v] layer\n            show\n            go to x: (-136) y: (-55)\n            create clone of (_myself_ v)\n            go to x: (-73) y: (-49)\n            create clone of (_myself_ v)\n            go to x: (-12) y: (-16)\n            create clone of (_myself_ v)\n            go to x: (21) y: (53)\n            create clone of (_myself_ v)\n            go to x: (-76) y: (82)\n            create clone of (_myself_ v)\n            go to x: (11) y: (160)\n            create clone of (_myself_ v)\n            go to x: (103) y: (157)\n            create clone of (_myself_ v)\n            hide\n        end\n        if <(level) = [3]> then\n            switch costume to (costume1 v)\n            go to [front v] layer\n            show\n            go to x: (-122) y: (-97)\n            create clone of (_myself_ v)\n            go to x: (-102) y: (-25)\n            create clone of (_myself_ v)\n            go to x: (-8) y: (-35)\n            create clone of (_myself_ v)\n            go to x: (19) y: (46)\n            create clone of (_myself_ v)\n            go to x: (119) y: (37)\n            create clone of (_myself_ v)\n            go to x: (148) y: (122)\n            create clone of (_myself_ v)\n            go to x: (156) y: (-94)\n            create clone of (_myself_ v)\n            hide\n        end\n        if <(level) = [4]> then\n            switch costume to (costume1 v)\n            go to [front v] layer\n            show\n            go to x: (-158) y: (-97)\n            create clone of (_myself_ v)\n            go to x: (-81) y: (-27)\n            create clone of (_myself_ v)\n            go to x: (-114) y: (58)\n            create clone of (_myself_ v)\n            go to x: (-173) y: (85)\n            create clone of (_myself_ v)\n            go to x: (-48) y: (128)\n            create clone of (_myself_ v)\n            go to x: (61) y: (104)\n            create clone of (_myself_ v)\n            go to x: (188) y: (-96)\n            create clone of (_myself_ v)\n            hide\n        end\n        if <(level) = [5]> then\n            switch costume to (costume1 v)\n            go to [front v] layer\n            show\n            go to x: (-135) y: (-58)\n            create clone of (_myself_ v)\n            go to x: (-96) y: (6)\n            create clone of (_myself_ v)\n            go to x: (-118) y: (78)\n            create clone of (_myself_ v)\n            go to x: (55) y: (114)\n            create clone of (_myself_ v)\n            go to x: (170) y: (143)\n            create clone of (_myself_ v)\n            go to x: (219) y: (143)\n            create clone of (_myself_ v)\n            hide\n        end\n    else\n        if <(world) = [3]> then\n            if <(level) = [1]> then\n                switch costume to (costume2 v)\n                go to [front v] layer\n                show\n                go to x: (-166) y: (-62)\n                create clone of (_myself_ v)\n                go to x: (-121) y: (-99)\n                create clone of (_myself_ v)\n                go to x: (-61) y: (-40)\n                create clone of (_myself_ v)\n                go to x: (15) y: (21)\n                create clone of (_myself_ v)\n                go to x: (106) y: (18)\n                create clone of (_myself_ v)\n                go to x: (131) y: (-58)\n                create clone of (_myself_ v)\n                go to x: (150) y: (-93)\n                create clone of (_myself_ v)\n                go to x: (199) y: (-95)\n                create clone of (_myself_ v)\n                hide\n            end\n            if <(level) = [2]> then\n                switch costume to (costume1 v)\n                go to [front v] layer\n                show\n                go to x: (-186) y: (12)\n                create clone of (_myself_ v)\n                go to x: (-120) y: (52)\n                create clone of (_myself_ v)\n                go to x: (-51) y: (6)\n                create clone of (_myself_ v)\n                go to x: (-10) y: (-73)\n                create clone of (_myself_ v)\n                go to x: (52) y: (-105)\n                create clone of (_myself_ v)\n                go to x: (128) y: (-52)\n                create clone of (_myself_ v)\n                go to x: (128) y: (26)\n                create clone of (_myself_ v)\n                go to x: (194) y: (68)\n                create clone of (_myself_ v)\n                hide\n            end\n            if <(level) = [3]> then\n                switch costume to (costume1 v)\n                go to [front v] layer\n                show\n                go to x: (-208) y: (33)\n                create clone of (_myself_ v)\n                go to x: (-208) y: (-130)\n                create clone of (_myself_ v)\n                go to x: (-146) y: (-106)\n                create clone of (_myself_ v)\n                go to x: (-71) y: (-104)\n                create clone of (_myself_ v)\n                go to x: (-39) y: (-56)\n                create clone of (_myself_ v)\n                go to x: (-13) y: (-5)\n                create clone of (_myself_ v)\n                go to x: (44) y: (-5)\n                create clone of (_myself_ v)\n                go to x: (144) y: (-5)\n                create clone of (_myself_ v)\n                go to x: (212) y: (76)\n                create clone of (_myself_ v)\n                hide\n            end\n            if <(level) = [4]> then\n                switch costume to (costume1 v)\n                go to [front v] layer\n                show\n                go to x: (-204) y: (-28)\n                create clone of (_myself_ v)\n                go to x: (-204) y: (43)\n                create clone of (_myself_ v)\n                go to x: (-125) y: (121)\n                create clone of (_myself_ v)\n                go to x: (-53) y: (71)\n                create clone of (_myself_ v)\n                go to x: (-53) y: (21)\n                create clone of (_myself_ v)\n                go to x: (-53) y: (-44)\n                create clone of (_myself_ v)\n                go to x: (16) y: (-81)\n                create clone of (_myself_ v)\n                go to x: (95) y: (-81)\n                create clone of (_myself_ v)\n                go to x: (102) y: (11)\n                create clone of (_myself_ v)\n                go to x: (70) y: (35)\n                create clone of (_myself_ v)\n                go to x: (163) y: (81)\n                create clone of (_myself_ v)\n                hide\n            end\n            if <(level) = [5]> then\n                switch costume to (costume1 v)\n                go to [front v] layer\n                show\n                go to x: (-110) y: (35)\n                create clone of (_myself_ v)\n                go to x: (-34) y: (94)\n                create clone of (_myself_ v)\n                go to x: (28) y: (49)\n                create clone of (_myself_ v)\n                go to x: (81) y: (-11)\n                create clone of (_myself_ v)\n                go to x: (190) y: (61)\n                create clone of (_myself_ v)\n                hide\n            end\n        else\n            if <(level) = [1]> then\n                switch costume to (costume2 v)\n                go to [front v] layer\n                show\n                go to x: (-155) y: (-106)\n                create clone of (_myself_ v)\n                go to x: (-110) y: (-106)\n                create clone of (_myself_ v)\n                go to x: (-63) y: (-106)\n                create clone of (_myself_ v)\n                go to x: (17) y: (-61)\n                create clone of (_myself_ v)\n                go to x: (-55) y: (2)\n                create clone of (_myself_ v)\n                go to x: (8) y: (73)\n                create clone of (_myself_ v)\n                go to x: (-33) y: (142)\n                create clone of (_myself_ v)\n                go to x: (54) y: (174)\n                create clone of (_myself_ v)\n                go to x: (165) y: (174)\n                create clone of (_myself_ v)\n                hide\n            end\n            if <(level) = [2]> then\n                switch costume to (costume1 v)\n                go to [front v] layer\n                show\n                go to x: (-134) y: (-62)\n                create clone of (_myself_ v)\n                go to x: (-77) y: (-62)\n                create clone of (_myself_ v)\n                go to x: (-16) y: (-62)\n                create clone of (_myself_ v)\n                go to x: (30) y: (-3)\n                create clone of (_myself_ v)\n                go to x: (-47) y: (33)\n                create clone of (_myself_ v)\n                go to x: (-95) y: (33)\n                create clone of (_myself_ v)\n                go to x: (-187) y: (93)\n                create clone of (_myself_ v)\n                go to x: (-13) y: (168)\n                create clone of (_myself_ v)\n                go to x: (82) y: (168)\n                create clone of (_myself_ v)\n                go to x: (168) y: (168)\n                create clone of (_myself_ v)\n                hide\n            end\n            if <(level) = [3]> then\n                switch costume to (costume1 v)\n                go to [front v] layer\n                show\n                go to x: (-151) y: (-82)\n                create clone of (_myself_ v)\n                go to x: (-107) y: (-62)\n                create clone of (_myself_ v)\n                go to x: (-50) y: (-100)\n                create clone of (_myself_ v)\n                go to x: (-5) y: (-142)\n                create clone of (_myself_ v)\n                go to x: (21) y: (-97)\n                create clone of (_myself_ v)\n                go to x: (52) y: (-58)\n                create clone of (_myself_ v)\n                go to x: (-184) y: (64)\n                create clone of (_myself_ v)\n                go to x: (-82) y: (91)\n                create clone of (_myself_ v)\n                go to x: (-8) y: (91)\n                create clone of (_myself_ v)\n                go to x: (68) y: (91)\n                create clone of (_myself_ v)\n                go to x: (173) y: (130)\n                create clone of (_myself_ v)\n                hide\n            end\n            if <(level) = [4]> then\n                switch costume to (costume1 v)\n                go to [front v] layer\n                show\n                go to x: (-64) y: (-129)\n                create clone of (_myself_ v)\n                go to x: (17) y: (-85)\n                create clone of (_myself_ v)\n                go to x: (43) y: (-38)\n                create clone of (_myself_ v)\n                go to x: (67) y: (3)\n                create clone of (_myself_ v)\n                go to x: (-48) y: (65)\n                create clone of (_myself_ v)\n                go to x: (-4) y: (65)\n                create clone of (_myself_ v)\n                go to x: (-128) y: (108)\n                create clone of (_myself_ v)\n                go to x: (-200) y: (108)\n                create clone of (_myself_ v)\n                go to x: (-18) y: (150)\n                create clone of (_myself_ v)\n                go to x: (64) y: (164)\n                create clone of (_myself_ v)\n                hide\n            end\n            if <(level) = [5]> then\n                switch costume to (costume1 v)\n                go to [front v] layer\n                show\n                go to x: (-185) y: (-20)\n                create clone of (_myself_ v)\n                go to x: (-71) y: (-17)\n                create clone of (_myself_ v)\n                go to x: (-31) y: (-17)\n                create clone of (_myself_ v)\n                go to x: (100) y: (-62)\n                create clone of (_myself_ v)\n                go to x: (141) y: (-62)\n                create clone of (_myself_ v)\n                hide\n            end\n        end\n    end\nend\n\nwhen I receive [refresh v]\nwait (0) seconds\nk dis is epic\n\nwhen I receive [title screen v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@coin amount\n\ndefine type (text) (spacing)\nshow\nset [n v] to [1]\nset [l v] to []\nbroadcast (del2 v)\nrepeat (length of (text))\n    set [l v] to (letter (n) of (text))\n    repeat until <(costume [name v]) = (l)>\n        next costume\n    end\n    create clone of (_myself_ v)\n    change [n v] by (1)\n    change x by (spacing)\nend\nhide\n\nwhen I receive [del2 v]\ndel\ndelete this clone\n\nwhen flag clicked\nset [world v] to [1]\n\nwhen I receive [game v]\nif <(world) = [1]> then\n    wait (0.1) seconds\n    wait until <mouse down?>\n    wait until <not <mouse down?>>\nend\nforever\n    set size to (100) %\n    go to x: (120) y: (140)\n    go to [front v] layer\n    type (join (coins) [c]) [28]\n    set [brightness v] effect to (0)\nend\n\nwhen I receive [title screen v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [shop v]\nforever\n    set size to (200) %\n    go to x: (-200) y: (-110)\n    go to [front v] layer\n    type (join (coins) [c]) [55]\n    set [brightness v] effect to (0)\nend\n\nwhen I receive [title screen v]\ndel\nstop [other scripts in sprite v]\nbroadcast (del2 v)\n\ndefine del\ndelete this clone\n\n@shop button\n\nwhen I receive [lvl selection v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [title screen v]\nstop [other scripts in sprite v]\nshow\nset size to (80) %\nswitch costume to (costume1 v)\nwait (1) seconds\nforever\n    if <touching (mouse-pointer v)?> then\n        go to [front v] layer\n        change size by (((80) - (size)) / (4))\n        if <mouse down?> then\n            wait until <not <mouse down?>>\n            if <touching (mouse-pointer v)?> then\n                broadcast (shop v)\n            end\n        end\n    else\n        change size by (((70) - (size)) / (4))\n    end\n    if <([on? v] of [s. button v]) = [1]> then\n        hide\n        wait until <([on? v] of [s. button v]) = [0]>\n        show\n    end\nend\n\nwhen I receive [shop v]\nhide\nstop [other scripts in sprite v]\n\n@shop\n\nwhen I receive [shop v]\ndel\nset [current character v] to [1]\nshow\nclone [3]\nforever\n    set size to (350) %\n    go to x: (-10) y: (50)\n    switch costume to (join [ball-] (current character))\nend\n\ndefine clone (#)\nset [clone#2 v] to [0]\nrepeat (#)\n    change [clone#2 v] by (1)\n    create clone of (_myself_ v)\n    wait (0) seconds\nend\n\nwhen I start as a clone\nshow\nif <(clone#2) = [1]> then\n    go to x: (200) y: (20)\n    set size to (100) %\n    switch costume to (arrow v)\n    point in direction (90)\n    forever\n        wait until <<touching (mouse-pointer v)?> and <mouse down?>>\n        wait until <not <mouse down?>>\n        if <touching (mouse-pointer v)?> then\n            change [current character v] by (1)\n            if <(current character) > [5]> then\n                set [current character v] to [1]\n            end\n        end\n    end\nelse\n    if <(clone#2) = [2]> then\n        set size to (100) %\n        set rotation style [left-right v]\n        switch costume to (arrow v)\n        go to x: (-200) y: (20)\n        point in direction (-90)\n        forever\n            wait until <<touching (mouse-pointer v)?> and <mouse down?>>\n            wait until <not <mouse down?>>\n            if <touching (mouse-pointer v)?> then\n                change [current character v] by (-1)\n                if <[1] > (current character)> then\n                    set [current character v] to [5]\n                end\n            end\n        end\n    else\n        set size to (80) %\n        set rotation style [left-right v]\n        go to x: (-50) y: (-164)\n        point in direction (90)\n        forever\n            switch costume to (item (current character) of [shop v])\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                wait until <not <mouse down?>>\n                if <touching (mouse-pointer v)?> then\n                    if <(item (current character) of [shop v]) = [3]> then\n                        replace item (current character) of [shop v] with [2]\n                    else\n                        if <(item (current character) of [shop v]) = [2]> then\n                            check\n                            replace item (current character) of [shop v] with [3]\n                            set [character v] to (current character)\n                        else\n                            if <(item (current character) of [prices v]) < ((coins) + (1))> then\n                                change [coins v] by ((0) - (item (current character) of [prices v]))\n                                replace item (current character) of [shop v] with [2]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [title screen v]\ndel\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\ndefine reset\ndelete all of [shop v]\nadd [3] to [shop v]\nadd [1] to [shop v]\nadd [1] to [shop v]\nadd [1] to [shop v]\nadd [1] to [shop v]\ndelete all of [prices v]\nadd [0] to [prices v]\nadd [15] to [prices v]\nadd [15] to [prices v]\nadd [25] to [prices v]\nadd [30] to [prices v]\n\nwhen flag clicked\nset [character v] to [1]\nreset\n\ndefine check\nif <(item (1) of [shop v]) = [3]> then\n    replace item (1) of [shop v] with [2]\nend\nif <(item (2) of [shop v]) = [3]> then\n    replace item (2) of [shop v] with [2]\nend\nif <(item (3) of [shop v]) = [3]> then\n    replace item (3) of [shop v] with [2]\nend\nif <(item (4) of [shop v]) = [3]> then\n    replace item (4) of [shop v] with [2]\nend\n\ndefine del\ndelete this clone\n\n@cost\n\ndefine type (text) (spacing)\nshow\nset [n v] to [1]\nset [l v] to []\nbroadcast (del3 v)\nrepeat (length of (text))\n    set [l v] to (letter (n) of (text))\n    repeat until <(costume [name v]) = (l)>\n        next costume\n    end\n    create clone of (_myself_ v)\n    change [n v] by (1)\n    change x by (spacing)\nend\nhide\n\nwhen I receive [del3 v]\ndelete this clone\n\nwhen flag clicked\nset [world v] to [1]\n\nwhen I receive [title screen v]\ndel\nstop [other scripts in sprite v]\nbroadcast (del3 v)\n\nwhen I receive [shop v]\nforever\n    set size to (200) %\n    go to x: (-200) y: (-170)\n    go to [front v] layer\n    type (join (item (current character) of [prices v]) [s]) [55]\n    set [brightness v] effect to (0)\nend\n\ndefine del\ndelete this clone\n\n@back\n\nwhen I receive [lvl selection v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [shop v]\nstop [other scripts in sprite v]\nshow\nset size to (80) %\nswitch costume to (costume2 v)\nwait (1) seconds\nforever\n    if <touching (mouse-pointer v)?> then\n        go to [front v] layer\n        change size by (((80) - (size)) / (4))\n        if <mouse down?> then\n            wait until <not <mouse down?>>\n            if <touching (mouse-pointer v)?> then\n                broadcast (title screen v)\n            end\n        end\n    else\n        change size by (((70) - (size)) / (4))\n    end\nend\n\nwhen I receive [title screen v]\nhide\nstop [other scripts in sprite v]\n\n@checkpoint\n\nwhen I receive [game v]\nshow\nwait (0.1) seconds\nif <(world) = [1]> then\n    go to x: (134) y: (45)\n    while <<(x position) = [134]> and <(y position) = [45]>>\n        if <touching (player v)?> then\n            set [startx v] to (x position)\n            set [starty v] to (y position)\n        end\n    end\nelse\n    if <(world) = [2]> then\n        show\n        go to x: (63) y: (5)\n        while <<(x position) = [63]> and <(y position) = [5]>>\n            if <touching (player v)?> then\n                set [startx v] to (x position)\n                set [starty v] to (y position)\n            end\n        end\n    else\n        if <(world) = [3]> then\n            show\n            go to x: (93) y: (20)\n            while <<(x position) = [93]> and <(y position) = [20]>>\n                if <touching (player v)?> then\n                    set [startx v] to (x position)\n                    set [starty v] to (y position)\n                end\n            end\n        else\n            show\n            go to x: (-48) y: (-4)\n            while <<(x position) = [-48]> and <(y position) = [-4]>>\n                if <touching (player v)?> then\n                    set [startx v] to (x position)\n                    set [starty v] to (y position)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [next v]\nwait (0) seconds\nwejkrjksfjdr\n\nwhen I receive [lvl selection v]\nset [startx v] to [-204]\nset [starty v] to [-113]\n\nif  then\nend\n\ndefine wejkrjksfjdr\nset [startx v] to [-204]\nset [starty v] to [-113]\nif <(world) = [1]> then\n    if <(level) = [1]> then\n        go to x: (134) y: (45)\n        while <<(x position) = [134]> and <(y position) = [45]>>\n            if <touching (player v)?> then\n                set [startx v] to (x position)\n                set [starty v] to (y position)\n            end\n        end\n    end\n    if <(level) = [2]> then\n        go to x: (-130) y: (0)\n        while <<(x position) = [-130]> and <(y position) = [0]>>\n            if <touching (player v)?> then\n                set [startx v] to (x position)\n                set [starty v] to (y position)\n            end\n        end\n    end\n    if <(level) = [3]> then\n        go to x: (-49) y: (69)\n        while <<(x position) = [-49]> and <(y position) = [69]>>\n            if <touching (player v)?> then\n                set [startx v] to (x position)\n                set [starty v] to (y position)\n            end\n        end\n    end\n    if <(level) = [4]> then\n        go to x: (163) y: (80)\n        while <<(x position) = [163]> and <(y position) = [80]>>\n            if <touching (player v)?> then\n                set [startx v] to (x position)\n                set [starty v] to (y position)\n            end\n        end\n    end\n    if <(level) = [5]> then\n        go to x: (-98) y: (29)\n        while <<(x position) = [-98]> and <(y position) = [29]>>\n            if <touching (player v)?> then\n                set [startx v] to (x position)\n                set [starty v] to (y position)\n            end\n        end\n    end\nelse\n    if <(world) = [2]> then\n        if <(level) = [1]> then\n            go to x: (134) y: (45)\n            while <<(x position) = [134]> and <(y position) = [45]>>\n                if <touching (player v)?> then\n                    set [startx v] to (x position)\n                    set [starty v] to (y position)\n                end\n            end\n        end\n        if <(level) = [3]> then\n            show\n            go to x: (21) y: (34)\n            while <<(x position) = [21]> and <(y position) = [34]>>\n                if <touching (player v)?> then\n                    set [startx v] to (x position)\n                    set [starty v] to (y position)\n                end\n            end\n        end\n        if <(level) = [4]> then\n            show\n            go to x: (191) y: (-98)\n            wait (1) seconds\n            while <<(x position) = [191]> and <(y position) = [-98]>>\n                if <touching (player v)?> then\n                    set [startx v] to (x position)\n                    set [starty v] to (y position)\n                end\n            end\n        end\n        if <(level) = [5]> then\n            show\n            go to x: (-115) y: (72)\n            while <<(x position) = [-115]> and <(y position) = [72]>>\n                if <touching (player v)?> then\n                    set [startx v] to (x position)\n                    set [starty v] to (y position)\n                end\n            end\n        end\n        if <(level) = [2]> then\n            hide\n        end\n    else\n        if <(world) = [3]> then\n            if <(level) = [1]> then\n                show\n                go to x: (93) y: (20)\n                while <<(x position) = [93]> and <(y position) = [20]>>\n                    if <touching (player v)?> then\n                        set [startx v] to (x position)\n                        set [starty v] to (y position)\n                    end\n                end\n            end\n            if <(level) = [2]> then\n                hide\n            end\n            if <(level) = [3]> then\n                show\n                go to x: (61) y: (-10)\n                while <<(x position) = [61]> and <(y position) = [-10]>>\n                    if <touching (player v)?> then\n                        set [startx v] to (x position)\n                        set [starty v] to (y position)\n                    end\n                end\n            end\n            if <(level) = [4]> then\n                show\n                go to x: (66) y: (27)\n                while <<(x position) = [66]> and <(y position) = [27]>>\n                    if <touching (player v)?> then\n                        set [startx v] to (x position)\n                        set [starty v] to (y position)\n                    end\n                end\n            end\n            if <(level) = [5]> then\n                show\n                go to x: (14) y: (40)\n                while <<(x position) = [14]> and <(y position) = [40]>>\n                    if <touching (player v)?> then\n                        set [startx v] to (x position)\n                        set [starty v] to (y position)\n                    end\n                end\n            end\n        else\n            if <(level) = [1]> then\n                show\n                go to x: (-48) y: (-4)\n                while <<(x position) = [-48]> and <(y position) = [-4]>>\n                    if <touching (player v)?> then\n                        set [startx v] to (x position)\n                        set [starty v] to (y position)\n                    end\n                end\n            end\n            if <(level) = [2]> then\n                show\n                go to x: (-196) y: (86)\n                while <<(x position) = [-196]> and <(y position) = [86]>>\n                    if <touching (player v)?> then\n                        set [startx v] to (x position)\n                        set [starty v] to (y position)\n                    end\n                end\n            end\n            if <(level) = [3]> then\n                show\n                go to x: (-115) y: (20)\n                while <<(x position) = [-115]> and <(y position) = [20]>>\n                    if <touching (player v)?> then\n                        set [startx v] to (x position)\n                        set [starty v] to (y position)\n                    end\n                end\n            end\n            if <(level) = [4]> then\n                show\n                go to x: (104) y: (7)\n                while <<(x position) = [104]> and <(y position) = [7]>>\n                    if <touching (player v)?> then\n                        set [startx v] to (x position)\n                        set [starty v] to (y position)\n                    end\n                end\n            end\n            if <(level) = [5]> then\n                show\n                go to x: (-79) y: (-25)\n                while <<(x position) = [-79]> and <(y position) = [-25]>>\n                    if <touching (player v)?> then\n                        set [startx v] to (x position)\n                        set [starty v] to (y position)\n                    end\n                end\n            end\n        end\n    end\nend\n\nshow\ngo to x: (63) y: (5)\nwhile <<(x position) = [63]> and <(y position) = [5]>>\n    if <touching (player v)?> then\n        set [startx v] to (x position)\n        set [starty v] to (y position)\n    end\nend\n\nwhen I receive [refresh v]\nwait (0) seconds\nwejkrjksfjdr\n\nwhen I receive [title screen v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@save\n\ndefine encrypt\nif <(level) = [1]> then\n    set [l1 v] to [z]\nend\nif <(level) = [2]> then\n    set [l1 v] to [t]\nend\nif <(level) = [3]> then\n    set [l1 v] to [£]\nend\nif <(level) = [4]> then\n    set [l1 v] to [&]\nend\nif <(level) = [5]> then\n    set [l1 v] to [₺]\nend\nset [l2 v] to (l1)\nif <(world) = [1]> then\n    set [l1 v] to [|]\nend\nif <(world) = [2]> then\n    set [l1 v] to [~]\nend\nif <(world) = [3]> then\n    set [l1 v] to [€]\nend\nif <(world) = [4]> then\n    set [l1 v] to [`]\nend\nset [l2 v] to (join (l2) (l1))\ndelete all of [save code v]\nadd [copy the code below with double tap & select \(mobile\)/triple click + ctrl c] to [save code v]\nadd [ \(computer\). v v v v v v] to [save code v]\nadd (l2) to [save code v]\nadd [Store it somewhere and when you come back again, you can paste it into the] to [save code v]\nadd [game! <click/tap outside of list to close>] to [save code v]\nhide list [save code v]\nwait until <not <mouse down?>>\nwait until <mouse down?>\nwait until <not <mouse down?>>\nshow list [save code v]\n\ndefine decrypt (encripted)\nif <(letter (1) of (encripted)) = [z]> then\n    set [level v] to [1]\nend\nif <(letter (1) of (encripted)) = [t]> then\n    set [level v] to [2]\nend\nif <(letter (1) of (encripted)) = [£]> then\n    set [level v] to [3]\nend\nif <(letter (1) of (encripted)) = [&]> then\n    set [level v] to [4]\nend\nif <(letter (1) of (encripted)) = [₺]> then\n    set [level v] to [5]\nend\nif <(letter (2) of (encripted)) = [|]> then\n    set [world v] to [1]\n    delete all of [unlocked v]\n    add [1] to [unlocked v]\n    add [0] to [unlocked v]\n    add [0] to [unlocked v]\n    add [0] to [unlocked v]\nend\nif <(letter (2) of (encripted)) = [~]> then\n    set [world v] to [2]\n    delete all of [unlocked v]\n    add [1] to [unlocked v]\n    add [1] to [unlocked v]\n    add [0] to [unlocked v]\n    add [0] to [unlocked v]\nend\nif <(letter (2) of (encripted)) = [€]> then\n    set [world v] to [3]\n    delete all of [unlocked v]\n    add [1] to [unlocked v]\n    add [1] to [unlocked v]\n    add [1] to [unlocked v]\n    add [0] to [unlocked v]\nend\nif <(letter (2) of (encripted)) = [`]> then\n    set [world v] to [4]\n    delete all of [unlocked v]\n    add [1] to [unlocked v]\n    add [1] to [unlocked v]\n    add [1] to [unlocked v]\n    add [1] to [unlocked v]\nend\nbroadcast (refresh v)\n\nwhen I receive [game v]\ndel\nset y to (-50)\nshow\ncreate clone of (_myself_ v)\nset y to (-150)\nforever\n    go to [front v] layer\n    if <(mouse x) > [150]> then\n        change x by (((180) - (x position)) / (4))\n        change [ghost v] effect by (-15)\n    else\n        change x by (((275) - (x position)) / (4))\n        change [ghost v] effect by (15)\n    end\n    if <<[200] > (x position)> and <<touching (mouse-pointer v)?> and <mouse down?>>> then\n        wait until <not <mouse down?>>\n        if <touching (mouse-pointer v)?> then\n            encrypt\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    go to [front v] layer\n    switch costume to (costume2 v)\n    if <(mouse x) > [150]> then\n        change x by (((180) - (x position)) / (4))\n        change [ghost v] effect by (-15)\n    else\n        change x by (((275) - (x position)) / (4))\n        change [ghost v] effect by (15)\n    end\n    if <<[200] > (x position)> and <<touching (mouse-pointer v)?> and <mouse down?>>> then\n        wait until <not <mouse down?>>\n        if <touching (mouse-pointer v)?> then\n            ask [Put your save code here. Leave blank if you clicked this by accident.] and wait\n            if <not <(answer) = []>> then\n                decrypt (answer)\n            end\n        end\n    end\nend\n\ndefine del\ndelete this clone\n\nwhen I receive [title screen v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [encrypt v]\nencrypt\nbroadcast (title screen v)\n\n@Menu\n\nwhen I receive [game v]\nset y to (60)\nshow\nswitch costume to (costume1 v)\ncreate clone of (_myself_ v)\nset y to (150)\nforever\n    go to [front v] layer\n    if <(mouse x) > [150]> then\n        change x by (((180) - (x position)) / (4))\n        change [ghost v] effect by (-15)\n    else\n        change x by (((275) - (x position)) / (4))\n        change [ghost v] effect by (15)\n    end\n    if <<[200] > (x position)> and <<touching (mouse-pointer v)?> and <mouse down?>>> then\n        wait until <not <mouse down?>>\n        if <touching (mouse-pointer v)?> then\n            change [level v] by (1)\n            broadcast (refresh v)\n        end\n    end\nend\n\nwhen I start as a clone\ngo to x: (275) y: (60)\nswitch costume to (costume2 v)\ngo to [front v] layer\nhide\nwait (0.1) seconds\nshow\nforever\n    switch costume to (costume2 v)\n    go to [front v] layer\n    if <(mouse x) > [150]> then\n        change x by (((180) - (x position)) / (4))\n        change [ghost v] effect by (-15)\n    else\n        change x by (((275) - (x position)) / (4))\n        change [ghost v] effect by (15)\n    end\n    if <<[200] > (x position)> and <<touching (mouse-pointer v)?> and <mouse down?>>> then\n        wait until <not <mouse down?>>\n        if <touching (mouse-pointer v)?> then\n            go to x: (0) y: (0)\n            switch costume to (just one question for u v)\n            forever\n                switch costume to (just one question for u2 v)\n                if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                    create clone of (_myself_ v)\n                    delete this clone\n                end\n                switch costume to (just one question for u3 v)\n                if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                    broadcast (encrypt v)\n                    delete this clone\n                end\n                switch costume to (just one question for u4 v)\n                if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                    broadcast (title screen v)\n                end\n                switch costume to (just one question for u v)\n            end\n        end\n    end\nend\n\nwhen I receive [title screen v]\nhide\nstop [other scripts in sprite v]\n\n@Tutorial\n\nwhen I receive [title screen v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [game v]\ngo to [front v] layer\nif <<(level) = [1]> and <(world) = [1]>> then\n    go to [front v] layer\n    show\n    repeat (10)\n        go to [front v] layer\n    end\n    wait until <mouse down?>\n    wait until <not <mouse down?>>\n    hide\nend\n\n@story\n\ndefine story (start)\nset size to (50) %\nbroadcast (delstory v)\nset [ghost v] effect to (0)\nswitch costume to (start)\nshow\ngo to x: (-123) y: (89)\nnext costume\ncreate clone of (_myself_ v)\ngo to x: (113) y: (89)\nnext costume\ncreate clone of (_myself_ v)\nnext costume\ngo to x: (-123) y: (-89)\ncreate clone of (_myself_ v)\nnext costume\ngo to x: (113) y: (-89)\ncreate clone of (_myself_ v)\nhide\n\nwhen I receive [delstory v]\ngo to [front v] layer\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I receive [story v]\nstory [0]\nwait until <mouse down?>\nwait until <not <mouse down?>>\nstory [4]\nwait until <mouse down?>\nwait until <not <mouse down?>>\nset size to (100) %\nbroadcast (delstory v)\nstop [other scripts in sprite v]\nshow\ngo to x: (0) y: (0)\nclear graphic effects\nswitch costume to (costume9 v)\ncreate clone of (_myself_ v)\nswitch costume to (costume11 v)\nwait until <mouse down?>\nwait until <not <mouse down?>>\nbroadcast (delstory v)\nhide\nbroadcast (game v)\n\n@Sprite1\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nforever\n    reset timer\nend\n\nwhen [timer v] > (1)\nshow\n\n