Platformer Quest 2 (Demo)
@Stage\n\n@Music\n\nwhen flag clicked\nset [volume v] to [50]\nwait (3) seconds\nrepeat (pick random (0) to (1))\n    play sound [Vexento - Pixel Party v] until done\n    wait (5) seconds\nend\nforever\n    play sound [Vexento - Masked Heroes v] until done\n    wait (5) seconds\n    play sound [Vexento - Pixel Party v] until done\n    wait (5) seconds\nend\n\nwhen flag clicked\nset volume to (0) %\nwait (3) seconds\nrepeat (100)\n    change volume by ((Volume) / (100))\n    wait () seconds\n    wait () seconds\nend\nshow variable [volume v]\nforever\n    set volume to (Volume) %\nend\n\n@Player\n\nwhen flag clicked\nset [*in_game v] to [1]\nSetup Player\nwait (3) seconds\nshow\nEffect Player\ngo to x: (0) y: (-50)\nrepeat until <(Loading...) = [0]>\n    Normal [Game]\nend\nset [*in_game v] to [0]\n\ndefine Change xv (xv) (clone?)\nif <(clone?) = []> then\n    change [xv v] by (xv)\nend\n\ndefine Change yv (yv) (clone?)\nif <(clone?) = []> then\n    change [yv v] by (yv)\nend\n\ndefine Change y (y) (i_clone?)\n\ndefine Change x (x) (i_clone?)\n\nwhen flag clicked\nforever\n    if <key (p v) pressed?> then\n        next costume\n        wait until <not <key (p v) pressed?>>\n    end\nend\n\nwhen I receive [back - home v]\nCheck Player Power! [1]\nCheck Player Power! [2]\nCheck Player Power! [3]\nwait (0.1) seconds\nwait until <(Loading...) = [0]>\nNormal [Menu]\nrepeat until <(Loading...) = [1]>\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        wait until <not <<mouse down?> and <touching (mouse-pointer v)?>>>\n        point in direction (90)\n        repeat until <<(x position) > [-75]> or <(x position) = [-75]>>\n            change x by ([abs v] of (((x position) - (-74)) * (0.125)) )\n        end\n        point in direction (-90)\n        repeat until <<(x position) < [-230]> or <(x position) = [-230]>>\n            change x by (() - ([abs v] of (((x position) - (-231)) * (0.125)) ))\n        end\n        point in direction (90)\n        repeat until <<(x position) > [-150]> or <(x position) = [-150]>>\n            change x by ([abs v] of (((x position) - (-149)) * (0.125)) )\n        end\n    end\nend\n\ndefine Normal (warp)\nif <(warp) = [Menu]> then\n    show\n    point in direction (90)\n    set size to (300) %\n    go to x: (-150) y: (-100)\nend\nif <(warp) = [Game]> then\n    clear graphic effects\n    change x by (() - (x Changer))\n    change y by (() - (y Changer))\n    Button <<key (up arrow v) pressed?> or <key (space v) pressed?>> [1]\n    Button <key (down arrow v) pressed?> [2]\n    Button <key (right arrow v) pressed?> [3]\n    Button <key (left arrow v) pressed?> [4]\n    Button <<key (z v) pressed?> and <key (right arrow v) pressed?>> [5]\n    Button <<key (z v) pressed?> and <key (left arrow v) pressed?>> [6]\n    if <touching color (#ca00ff)?> then\n        set [mode v] to [jump]\n        set [yv v] to ((item (1) of [upgrades - player v]) * ((12) / (7)))\n    end\n    if <touching color (#00b0ff)?> then\n        set [ghost v] effect to (25)\n        if <(item (2) of [movement - player v]) = [1]> then\n            Change yv [-0.2] []\n        else\n            Change yv [0.6] []\n        end\n    end\n    if <([abs v] of (xv) ) < [3]> then\n        if <<(item (5) of [movement - player v]) = [1]> and <(yv) = [-3]>> then\n            point in direction (90)\n            set [yv v] to [7]\n            Change xv ((item (2) of [upgrades - player v]) * (12)) []\n        end\n        if <<(item (6) of [movement - player v]) = [1]> and <(yv) = [-3]>> then\n            point in direction (-90)\n            set [yv v] to [7]\n            Change xv (() - ((item (2) of [upgrades - player v]) * (12))) []\n        end\n    end\n    if <(item (4) of [movement - player v]) = [1]> then\n        point in direction (-90)\n        Change xv (() - (item (2) of [upgrades - player v])) []\n    end\n    if <(item (3) of [movement - player v]) = [1]> then\n        point in direction (90)\n        Change xv (item (2) of [upgrades - player v]) []\n    end\n    set [xv v] to ((xv) * (0.85))\n    change x by (xv)\n    if <touching color (#000008)?> then\n        change y by (-2)\n        if <touching color (#000008)?> then\n            change y by (1)\n            if <touching color (#000008)?> then\n                change y by (1)\n                if <touching color (#000008)?> then\n                    change y by (1)\n                    if <touching color (#000008)?> then\n                        change y by (1)\n                        if <touching color (#000008)?> then\n                            change y by (1)\n                            if <touching color (#000008)?> then\n                                change y by (-5)\n                                change x by ((-1) * (xv))\n                                if <<(item (1) of [movement - player v]) = [1]> and <not <(xv) = [0]>>> then\n                                    set [mode v] to [walljump]\n                                    set [yv v] to [5]\n                                    set [xv v] to (((xv) / ([abs v] of (xv) )) * (-5))\n                                else\n                                    set [mode v] to [wallslide]\n                                    set [xv v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change y by (2)\n    end\n    change y by (-3)\n    if <touching color (#000008)?> then\n        if <(yv) = [-3]> then\n            if <<(item (3) of [movement - player v]) = [1]> or <(item (4) of [movement - player v]) = [1]>> then\n                set [mode v] to [run]\n            else\n                if <([abs v] of (xv) ) > [.1]> then\n                    set [mode v] to [skid]\n                else\n                    set [mode v] to [stand]\n                end\n            end\n        end\n        if <(item (1) of [movement - player v]) = [1]> then\n            set [mode v] to [jump]\n            set [yv v] to (item (1) of [upgrades - player v])\n        end\n    end\n    if <<<<(mode) = [jump]> or <(mode) = [walljump]>> and <(yv) < [0]>> or <<<(mode) = [run]> or <(mode) = [skid]>> and <(yv) < [-3]>>> then\n        set [mode v] to [fall]\n    end\n    change y by (3)\n    if <(yv) > [-15]> then\n        Change yv [-0.55] []\n    end\n    change y by (-2)\n    if <not <touching color (#000008)?>> then\n        change y by (-1)\n        if <not <touching color (#000008)?>> then\n            change y by (-1)\n            if <not <touching color (#000008)?>> then\n                change y by (-1)\n                if <not <touching color (#000008)?>> then\n                    change y by (-1)\n                    if <not <touching color (#000008)?>> then\n                        change y by (-1)\n                        if <not <touching color (#000008)?>> then\n                            change y by (5)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (2)\n    change y by (yv)\n    if <touching color (#000008)?> then\n        change y by (-2)\n        if <touching color (#000008)?> then\n            change y by ((-1) * (yv))\n            set [yv v] to [-3]\n        end\n        change y by (2)\n    end\nend\n\nwhen I receive [play v]\nset [*in_game v] to [1]\nSetup Player\nwait (4) seconds\nwait until <(Loading...) = [0]>\nwait (3) seconds\nshow\nEffect Player\ngo to x: (0) y: (-50)\nrepeat until <(Loading...) = [1]>\n    Normal [Game]\nend\nset [*in_game v] to [0]\n\ndefine Setup Player\nhide\ndelete all of [movement - player v]\ndelete all of [upgrades - player v]\nrepeat (6)\n    add [0] to [movement - player v]\nend\npoint in direction (90)\nadd [7] to [upgrades - player v]\nadd [0.4] to [upgrades - player v]\nadd [1] to [upgrades - player v]\nadd [7] to [upgrades - player v]\nadd [0.4] to [upgrades - player v]\nadd [1] to [upgrades - player v]\nclear graphic effects\ngo to [front v] layer\nswitch costume to (player - normal v)\nset size to (70) %\ngo to x: (0) y: (0)\nset [xv v] to [0]\nset [yv v] to [0]\n\nwhen I start as a clone\nif <(costume [name v]) = [Effect]> then\n    Effect Change (pick random (-1.35) to (1.35)) (pick random (-1.35) to (1.35))\nend\nrepeat (20)\n    change y by (1)\n    change [ghost v] effect by (-5)\nend\ndelete this clone\n\ndefine Effect Change (e_n) (e_n2)\nrepeat (pick random (25) to (50))\n    change y by ((e_n) * (0.8))\n    change x by (e_n2)\nend\n\ndefine Effect Player\nset [ghost v] effect to (100)\nset [brightness v] effect to (100)\nrepeat (50)\n    change [ghost v] effect by (-2)\n    switch costume to (effect v)\n    create clone of (_myself_ v)\n    switch costume to (player - normal v)\nend\nrepeat (20)\n    change [brightness v] effect by (-2)\n    switch costume to (effect v)\n    create clone of (_myself_ v)\n    switch costume to (player - normal v)\nend\nrepeat (30)\n    change [brightness v] effect by (-2)\nend\n\ndefine Clear Button\ndelete all of [movement - player v]\nrepeat (6)\n    add [0] to [movement - player v]\nend\n\ndefine Button <arrow> (change)\nif <arrow> then\n    replace item (change) of [movement - player v] with [1]\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nforever\n    Clear Button\n    wait () seconds\nend\n\ndefine Check Player Power! (c_p)\nreplace item (c_p) of [upgrades - player v] with (item ((c_p) + (3)) of [upgrades - player v])\n\n@Logo\n\nwhen flag clicked\nhide\nforever\n    reset timer\nend\n\nwhen [timer v] > (0.5)\nhide variable [volume v]\ngo to x: () y: ()\nswitch costume to (thumbnail v)\nshow\nclear graphic effects\nset size to (100) %\ngo to [front v] layer\nset [ghost v] effect to (100)\nset [brightness v] effect to (100)\nrepeat (50)\n    change [ghost v] effect by (-2)\n    change [brightness v] effect by (-2)\nend\n\nwhen I receive [back - home v]\nchange [coins v] by (Points)\ngo to x: () y: ()\nshow\nclear graphic effects\nset size to (100) %\ngo to [front v] layer\nset [ghost v] effect to (100)\nset [brightness v] effect to (-100)\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nwait until <(Loading...) = [0]>\nwait (0.5) seconds\nrepeat (25)\n    change [ghost v] effect by (4)\nend\n\nwhen I receive [play v]\ngo to x: () y: ()\nshow\nclear graphic effects\nset size to (100) %\ngo to [front v] layer\nset [ghost v] effect to (100)\nset [brightness v] effect to (-100)\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nwait until <(Loading...) = [0]>\nwait (0.5) seconds\nrepeat (25)\n    change [ghost v] effect by (4)\nend\nbroadcast (join [Map - ] (Choose Map))\n\n@Map\n\nwhen flag clicked\nswitch costume to (map - 1 - wood house v)\nSetup Map\nwait (0.1) seconds\nshow\nrepeat until <(Loading...) = [0]>\n    Move to Player\nend\n\nwhen I receive [back - home v]\nwait (4) seconds\nhide\n\nwhen I receive [play v]\nSetup Map\nwait (4.2) seconds\nshow\nforever\n    Move to Player\nend\n\ndefine Setup Map\nset size to (123) %\nset [x v] to [0]\nset [y v] to [-100]\nset [x changer v] to [0]\nset [y changer v] to [0]\n\ndefine Move to Player\ngo to x: (() - (x)) y: ((() - (y)) + (-100))\nchange [x v] by (round ((0.1) * ([x position v] of [player v])))\nchange [y v] by (round ((0.05) * ([y position v] of [player v])))\nset [x changer v] to (round ((0.1) * ([x position v] of [player v])))\nset [y changer v] to (round ((0.05) * ([y position v] of [player v])))\n\nwhen I receive [map - 1 v]\nswitch costume to (map - 1 - wood house v)\n\nwhen I receive [map - 2 v]\nswitch costume to (map - 2 - castle v)\nset [x v] to [-200]\nset [y v] to [-195]\n\n@Ỉtem\n\nwhen flag clicked\nSet in Warp [Wood House] [1] Points [6]\n\ndefine Points (x) (y) (+) (show?) (stt)\nif <((show?) + (1)) > (stt)> then\n    go to x: ((x) - (x)) y: ((y) - (y))\n    repeat until <<touching (player v)?> and <(distance to [player v]) < [20]>>\n        go to x: ((x) - (x)) y: ((y) - (y))\n        if <(costume [number v]) < [3]> then\n            if <<<[-260] < (x position)> and <(x position) < [260]>> and <<[-200] < (y position)> and <(y position) < [200]>>> then\n                show\n            else\n                hide\n            end\n        else\n            if <<<[-250] < (x position)> and <(x position) < [250]>> and <<[-190] < (y position)> and <(y position) < [190]>>> then\n                show\n            else\n                hide\n            end\n        end\n    end\n    start sound [Coin v]\n    if < (costume [name v]) contains [Point]?> then\n        change [points v] by ((+) * (item (3) of [upgrades - player v]))\n    end\n    if < (costume [name v]) contains [Jump]?> then\n        if < (costume [name v]) contains [Lv1]?> then\n            replace item (1) of [upgrades - player v] with [9]\n        end\n        if < (costume [name v]) contains [Lv2]?> then\n            replace item (1) of [upgrades - player v] with [11]\n        end\n        if < (costume [name v]) contains [Lv3]?> then\n            replace item (1) of [upgrades - player v] with [13]\n        end\n    end\n    if < (costume [name v]) contains [Points]?> then\n        if < (costume [name v]) contains [x2]?> then\n            replace item (3) of [upgrades - player v] with [2]\n        end\n        if < (costume [name v]) contains [x4]?> then\n            replace item (3) of [upgrades - player v] with [4]\n        end\n    end\n    if < (costume [name v]) contains [PowerUp]?> then\n        if < (costume [name v]) contains [Speed]?> then\n            if < (costume [name v]) contains [Lv1]?> then\n                replace item (2) of [upgrades - player v] with [0.8]\n            end\n            if < (costume [name v]) contains [Lv2]?> then\n                replace item (2) of [upgrades - player v] with [1.2]\n            end\n            if < (costume [name v]) contains [Lv3]?> then\n                replace item (2) of [upgrades - player v] with [1.5]\n            end\n        end\n    end\nend\n\ndefine Set in Warp (map) (type) Points (num)\nbroadcast (Numberic - Points v)\nset size to (100) %\nswitch costume to (point - help v)\nset [points v] to [0]\ngo to [back v] layer\nif <(map) = [Wood House]> then\n    if <(type) = [1]> then\n        Points [150] [-160] [1] (num) [1]\n        switch costume to (points v)\n        Points [0] [-50] [1] (num) [2]\n        Points [-225] [-265] [1] (num) [3]\n        Points [200] [-100] [1] (num) [4]\n        Points [-105] [50] [1] (num) [5]\n        Points [0] [-335] [1] (num) [6]\n    end\n    if <(type) = [2]> then\n        Points [-225] [-265] [1] (num) [1]\n        switch costume to (points v)\n        Points [-105] [50] [1] (num) [2]\n        Points [200] [-100] [1] (num) [3]\n        set size to (50) %\n        switch costume to (powerup - speed - lv1 v)\n        Points [-230] [120] [1] (num) [3]\n        switch costume to (points v)\n        set size to (100) %\n        Points [0] [-335] [1] (num) [4]\n        Points [0] [-50] [1] (num) [5]\n        Points [150] [-160] [1] (num) [6]\n    end\nend\nif <(map) = [Castle]> then\n    if <(type) = [1]> then\n        Points [-25] [-320] [1] (num) [1]\n        switch costume to (points v)\n        Points [175] [-150] [1] (num) [2]\n        Points [400] [-320] [1] (num) [3]\n        Points [0] [-70] [1] (num) [4]\n        Points [460] [-5] [1] (num) [5]\n        set size to (50) %\n        switch costume to (powerup - x2points v)\n        Points [-70] [70] [1] (num) [5]\n        switch costume to (points v)\n        set size to (100) %\n        Points [-125] [-50] [1] (num) [6]\n        Points [375] [-250] [1] (num) [7]\n    end\n    if <(type) = [2]> then\nend\nhide\nwait (4) seconds\nbroadcast (Back - Home v)\n\nwhen I receive [map - 1 v]\nSet in Warp [Wood House] [2] Points [6]\n\nwhen I receive [map - 2 v]\nSet in Warp [Castle] [1] Points [8]\n\n@Text\n\nwhen flag clicked\nSetup Quest\npoint in direction (90)\nset [loading... v] to [2]\nhide\ngo to x: (0) y: (0)\nwait (1) seconds\nShow Costume [1]\n\nwhen I start as a clone\nshow\nset size to (100) %\ngo to [front v] layer\nclear graphic effects\ngo to x: (0) y: (0)\nif < (costume [name v]) contains [Rq]?> then\n    if < (costume [name v]) contains [1]?> then\n        set [brightness v] effect to (100)\n        if <(Choose Map) = [1]> then\n            wait until <<(Points) > [6]> or <(Points) = [6]>>\n        end\n        if <(Choose Map) = [2]> then\n            wait until <<(Points) > [8]> or <(Points) = [8]>>\n        end\n        change [finish_quest v] by (1)\n        clear graphic effects\n        wait (2) seconds\n        repeat (25)\n            change [ghost v] effect by (4)\n        end\n        hide\n    end\nend\nif < (costume [name v]) contains [Loading]?> then\n    if < (costume [name v]) contains [Circle]?> then\n        show\n        set [ghost v] effect to (100)\n        hide variable [volume v]\n        set [loading... v] to [1]\n        go to x: (210) y: (-160)\n        repeat (50)\n            go to [front v] layer\n            change [ghost v] effect by (-2)\n            turn right (12) degrees\n        end\n        repeat (pick random (100) to (200))\n            turn right (12) degrees\n        end\n        set [loading... v] to [0]\n        show variable [volume v]\n        hide\n        if <(*In_game) = [1]> then\n            broadcast (Numeric - Coins v)\n        end\n    else\n        show\n        set [ghost v] effect to (100)\n        repeat (50)\n            go to [front v] layer\n            change [ghost v] effect by (-2)\n        end\n        wait until <(Loading...) = [0]>\n        hide\n    end\nend\ndelete this clone\n\nwhen I receive [back - home v]\nclear graphic effects\nswitch costume to (loading v)\ncreate clone of (_myself_ v)\nswitch costume to (loading - circle v)\ncreate clone of (_myself_ v)\n\nwhen I receive [play v]\nwait (0.1) seconds\nif <(Loading...) = [0]> then\n    clear graphic effects\n    switch costume to (loading v)\n    create clone of (_myself_ v)\n    switch costume to (loading - circle v)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nwait (0.1) seconds\nif < (costume [name v]) contains [Loading]?> then\n    wait until <(Loading...) = [0]>\nend\nif < (costume [name v]) contains [Rq]?> then\n    wait until <(Loading...) = [1]>\nend\ndelete this clone\n\ndefine Setup Quest\ndelete all of [quest v]\nadd [1 - Find + Get 6 Points] to [quest v]\nadd [2 - Find + Get 8 Points] to [quest v]\nadd [3 - Find + Get 10 Points] to [quest v]\n\nwhen I receive [map - 1 v]\nShow Costume [1]\n\nwhen I receive [map - 2 v]\nShow Costume [2]\n\ndefine Show Costume (n)\nclear graphic effects\nset [brightness v] effect to (100)\nswitch costume to ((letter (1) of (item (n) of [quest v])) + (2))\ncreate clone of (_myself_ v)\n\n@Title\n\nwhen I receive [back - home v]\ngo to x: (-360) y: (0)\nwait (0.1) seconds\nwait until <(Loading...) = [0]>\nwait (1) seconds\nshow\ngo to [front v] layer\nrepeat until <<(x position) > [0]> or <(x position) = [0]>>\n    change x by ([abs v] of (((x position) - (1)) * (0.125)) )\nend\nrepeat until <(Loading...) = [1]>\n    repeat (pick random (2) to (4))\n        set [pixelate v] effect to (100)\n        wait (0.01) seconds\n        clear graphic effects\n        wait (pick random (0.2) to (0.5)) seconds\n    end\n    wait (pick random (1) to (3)) seconds\nend\nhide\n\nwhen flag clicked\nhide\nclear graphic effects\n\n@Button\n\nwhen flag clicked\nset [finish_quest v] to [0]\nhide\nclear graphic effects\n\nwhen I receive [back - home v]\ngo to x: (300) y: (-100)\nwait (0.1) seconds\nwait until <(Loading...) = [0]>\nwait (1.5) seconds\nswitch costume to (play v)\nset size to (150) %\nshow\ngo to [front v] layer\nrepeat until <<(x position) < [100]> or <(x position) = [100]>>\n    change x by (() - ([abs v] of (((x position) - (99)) * (0.125)) ))\nend\n\nwhen I receive [back - home v]\nforever\n    if <touching (mouse-pointer v)?> then\n        repeat until <<<(size) > [175]> or <(size) = [175]>> or <not <touching (mouse-pointer v)?>>>\n            change size by ([abs v] of (((size) - (174)) * (0.125)) )\n            if <<mouse down?> and <(_OpenShop) = [0]>> then\n                wait until <not <mouse down?>>\n                hide\n                go to x: (300) y: (-25)\n                switch costume to (map - wood house v)\n                create clone of (_myself_ v)\n                wait (0.3) seconds\n                go to x: (300) y: (-100)\n                switch costume to (map - castle v)\n                create clone of (_myself_ v)\n                stop [this script v]\n            end\n        end\n    else\n        repeat until <<<(size) < [150]> or <(size) = [150]>> or <touching (mouse-pointer v)?>>\n            change size by (() - ([abs v] of (((size) - (149)) * (0.25)) ))\n        end\n    end\nend\n\nwhen I start as a clone\nshow\ngo to [front v] layer\nif < (costume [name v]) contains [Map -]?> then\n    if <(Finish_Quest) < [2]> then\n        if < (costume [name v]) contains [Castle]?> then\n            set [brightness v] effect to (-50)\n        end\n    end\n    repeat until <<touching (mouse-pointer v)?> and <mouse down?>>\n        Check Touch\n    end\n    Check Touch\nend\n\nwhen I start as a clone\nif < (costume [name v]) contains [Map -]?> then\n    repeat until <<(x position) < [100]> or <(x position) = [100]>>\n        change x by (() - ([abs v] of (((x position) - (99)) * (0.125)) ))\n    end\nend\n\nwhen I start as a clone\nwait until <(Loading...) = [1]>\ndelete this clone\n\ndefine Check Touch\nif <touching (mouse-pointer v)?> then\n    repeat until <<<(size) > [175]> or <(size) = [175]>> or <not <touching (mouse-pointer v)?>>>\n        change size by ([abs v] of (((size) - (174)) * (0.125)) )\n        if <<mouse down?> and <(_OpenShop) = [0]>> then\n            if < (costume [name v]) contains [Wood House]?> then\n                broadcast (Play v)\n                set [choose map v] to [1]\n            end\n            if < (costume [name v]) contains [Castle]?> then\n                if <(Finish_Quest) < [2]> then\n                    say [Must Finish Map "Wood House"] for (2) seconds\n                else\n                    broadcast (Play v)\n                    set [choose map v] to [2]\n                end\n            end\n        end\n    end\nelse\n    repeat until <<<(size) < [150]> or <(size) = [150]>> or <touching (mouse-pointer v)?>>\n        change size by (() - ([abs v] of (((size) - (149)) * (0.25)) ))\n    end\nend\n\n@Teleport Door\n\nwhen flag clicked\ngo to x: ((0) - (x)) y: ((-80) - (y))\nSetup - Door\nRun Show - Door [0] [-80]\n\nwhen I receive [map - 1 v]\ngo to x: ((0) - (x)) y: ((-80) - (y))\nSetup - Door\nRun Show - Door [0] [-80]\n\ndefine Setup - Door\nclear graphic effects\nhide\nwait (1) seconds\ngo to [back v] layer\nshow\nswitch costume to (teleport - jg - 1 v)\nwait (0.3) seconds\nrepeat (9)\n    next costume\n    wait (0.03) seconds\nend\n\ndefine Run Show - Door (x) (y)\nrepeat (250)\n    go to x: ((x) - (x)) y: ((y) - (y))\nend\nrepeat (pick random (4) to (6))\n    set [pixelate v] effect to (100)\n    set [color v] effect to (115)\n    set [ghost v] effect to (30)\n    wait (0.02) seconds\n    clear graphic effects\n    repeat (pick random (25) to (100))\n        go to x: ((x) - (x)) y: ((y) - (y))\n    end\nend\nrepeat (9)\n    go to x: ((x) - (x)) y: ((y) - (y))\n    Before Costume\n    wait (0.03) seconds\nend\nhide\n\ndefine Before Costume\nswitch costume to ((costume [number v]) - (1))\n\nwhen I receive [map - 2 v]\ngo to x: ((-150) - (x)) y: ((-180) - (y))\nSetup - Door\nRun Show - Door [-150] [-180]\n\n@Mobile Button\n\nwhen flag clicked\nset [mobile? v] to [0]\nset [_speedup? v] to [0]\nhide\nset size to (100) %\nclear graphic effects\nswitch costume to (settings button v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nclear graphic effects\ngo to [front v] layer\nif < (costume [name v]) contains [Settings]?> then\n    set size to (85) %\n    go to x: (205) y: (150)\n    forever\n        if <touching (mouse-pointer v)?> then\n            repeat until <<<(size) > [105]> or <(size) = [105]>> or <not <touching (mouse-pointer v)?>>>\n                change size by ([abs v] of (((size) - (104)) * (0.125)) )\n                if <mouse down?> then\n                    wait until <not <mouse down?>>\n                    if <(Mobile?) = [0]> then\n                        set [mobile? v] to [1]\n                        switch costume to (movement - button v)\n                        create clone of (_myself_ v)\n                        switch costume to (movement - speed v)\n                        create clone of (_myself_ v)\n                        switch costume to (settings button v)\n                    else\n                        set [mobile? v] to [0]\n                    end\n                end\n            end\n        else\n            repeat until <<<(size) < [85]> or <(size) = [85]>> or <touching (mouse-pointer v)?>>\n                change size by (() - ([abs v] of (((size) - (84)) * (0.25)) ))\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif < (costume [name v]) contains [Movement]?> then\n    set size to (100) %\n    if < (costume [name v]) contains [Speed]?> then\n        go to x: (170) y: (-120)\n        forever\n            if <(_SpeedUp?) = [1]> then\n                set [brightness v] effect to (30)\n            else\n                clear graphic effects\n            end\n            if <(Loading...) = [1]> then\n                set [mobile? v] to [0]\n            end\n            if <(Mobile?) = [1]> then\n                if <touching (mouse-pointer v)?> then\n                    if <mouse down?> then\n                        wait until <not <<mouse down?> and <touching (mouse-pointer v)?>>>\n                        if <(_SpeedUp?) = [0]> then\n                            set [_speedup? v] to [1]\n                        else\n                            set [_speedup? v] to [0]\n                        end\n                    end\n                end\n            else\n                delete this clone\n            end\n        end\n    else\n        go to x: (-170) y: (-110)\n        forever\n            if <(Loading...) = [1]> then\n                set [mobile? v] to [0]\n            end\n            if <(Mobile?) = [1]> then\n                if <<(distance to [mouse-pointer v]) > [20]> and <(distance to [mouse-pointer v]) < [70]>> then\n                    if <mouse down?> then\n                        if <(mouse y) > ((y position) + (25))> then\n                            replace item (1) of [movement - player v] with [1]\n                        end\n                        if <(mouse y) < ((y position) - (25))> then\n                            replace item (2) of [movement - player v] with [1]\n                        end\n                        if <(mouse x) > ((x position) + (20))> then\n                            if <(_SpeedUp?) = [1]> then\n                                replace item (5) of [movement - player v] with [1]\n                            end\n                            replace item (3) of [movement - player v] with [1]\n                        end\n                        if <(mouse x) < ((x position) - (20))> then\n                            if <(_SpeedUp?) = [1]> then\n                                replace item (6) of [movement - player v] with [1]\n                            end\n                            replace item (4) of [movement - player v] with [1]\n                        end\n                    end\n                end\n            else\n                delete this clone\n            end\n        end\n    end\nend\n\n@Shop - Trade\n\nwhen I start as a clone\nhide\ngo to [front v] layer\nif < (costume [name v]) contains [Player]?> then\n    show\n    forever\n        clear graphic effects\n        if < (costume [name v]) contains [Speed]?> then\n            Shaded [240] y [285] Touching? [2] [0.5] [10] Costume Contain [Lv1]\n            Shaded [230] y [225] Touching? [2] [0.67] [22] Costume Contain [Lv2]\n            Shaded [160] y [165] Touching? [2] [0.75] [35] Costume Contain [Lv3]\n            Shaded [110] y [105] Touching? [2] [0.92] [50] Costume Contain [Lv4]\n            Shaded [40] y [45] Touching? [2] [1.1] [100] Costume Contain [Lv5]\n        end\n        if < (costume [name v]) contains [Jump]?> then\n            Shaded [-30] y [-15] Touching? [1] [7.7] [10] Costume Contain [Lv1]\n            Shaded [-80] y [-75] Touching? [1] [9.8] [15] Costume Contain [Lv2]\n            Shaded [-110] y [-135] Touching? [1] [12.25] [25] Costume Contain [Lv3]\n            Shaded [-180] y [-195] Touching? [1] [14.7] [33] Costume Contain [Lv4]\n            Shaded [-225] y [-255] Touching? [1] [17.5] [75] Costume Contain [Lv5]\n        end\n    end\nend\nif < (costume [name v]) contains [Menu Shop]?> then\n    show\n    go to x: (145) y: (0)\n    set size to (100) %\nend\nif < (costume [name v]) contains [Button]?> then\n    go to x: (-190) y: (-150)\n    set size to (80) %\n    wait (1) seconds\n    wait until <(Loading...) = [0]>\n    show\n    forever\n        if <(Loading...) = [0]> then\n            if <touching (mouse-pointer v)?> then\n                repeat until <<<(size) > [95]> or <(size) = [95]>> or <not <touching (mouse-pointer v)?>>>\n                    change size by ([abs v] of (((size) - (94)) * (0.125)) )\n                    if <mouse down?> then\n                        wait until <not <mouse down?>>\n                        if <(_OpenShop) = [0]> then\n                            set [_openshop v] to [1]\n                            Create Clone of Shop\n                            switch costume to (shop button v)\n                        else\n                            set [_openshop v] to [0]\n                        end\n                    end\n                end\n            else\n                repeat until <<<(size) < [80]> or <(size) = [80]>> or <touching (mouse-pointer v)?>>\n                    change size by (() - ([abs v] of (((size) - (79)) * (0.25)) ))\n                end\n            end\n        else\n            delete this clone\n        end\n    end\nend\n\nwhen I receive [back - home v]\nswitch costume to (shop button v)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [coins v] to [0]\nhide variable [coins v]\nSetup - Purchase Data\nset [_y_mouseshop v] to [225]\nset [_openshop v] to [0]\ngo to x: (220) y: (75)\nset size to (100) %\nforever\n    switch costume to (menu click v)\n    go to [front v] layer\n    if <(_OpenShop) = [1]> then\n        show\n    else\n        hide\n    end\n    if <(distance to [mouse-pointer v]) < [20]> then\n        set [brightness v] effect to (20)\n        repeat until <not <mouse down?>>\n            set y to (mouse y)\n            Radius On Shop!\n        end\n    else\n        clear graphic effects\n    end\nend\n\nwhen I start as a clone\nif << (costume [name v]) contains [Menu]?> or < (costume [name v]) contains [Player]?>> then\n    wait until <(_OpenShop) = [0]>\n    delete this clone\nend\n\ndefine Create Clone of Shop\nswitch costume to (menu shop v)\ncreate clone of (_myself_ v)\nrepeat (11)\n    next costume\n    create clone of (_myself_ v)\nend\n\nwhen [up arrow v] key pressed\nif <(costume [name v]) = [Menu Click]> then\n    change y by (5)\n    Radius On Shop!\nend\n\nwhen [down arrow v] key pressed\nif <(costume [name v]) = [Menu Click]> then\n    change y by (-5)\n    Radius On Shop!\nend\n\ndefine Radius On Shop!\nif <(y position) > [75]> then\n    set y to (75)\nend\nif <(y position) < [-95]> then\n    set y to (-95)\nend\nset [_y_mouseshop v] to ((y position) * (3))\n\ndefine Touch Mouse? (c_p_change) (power??) (cost)\nif <<touching (mouse-pointer v)?> and <(distance to [mouse-pointer v]) < [30]>> then\n    set [brightness v] effect to (20)\n    if <mouse down?> then\n        wait until <not <mouse down?>>\n        if <(item ((costume [number v]) - (3)) of [purchase - shop v]) = [0]> then\n            if <<(item ((costume [number v]) - (4)) of [purchase - shop v]) = [1]> or <((costume [number v]) - (3)) = [1]>> then\n                if <((Coins) + (1)) > (cost)> then\n                    replace item ((c_p_change) + (3)) of [upgrades - player v] with (power??)\n                    replace item ((costume [number v]) - (3)) of [purchase - shop v] with [1]\n                    change [coins v] by (() - (cost))\n                    say [Purchased!] for (1) seconds\n                else\n                    say [Not Enough Coins!] for (1) seconds\n                end\n            else\n                say (join [Must Buy Lv ] ((costume [number v]) - (4))) for (1) seconds\n            end\n        else\n            say [Owned!] for (1) seconds\n        end\n    end\nelse\n    set [brightness v] effect to (0)\nend\n\ndefine Setup - Purchase Data\ndelete all of [purchase - shop v]\nrepeat (10)\n    add [0] to [purchase - shop v]\nend\n\ndefine Shaded (ghost) y (y) Touching? (type) (power) (price) Costume Contain (contain?)\nif < (costume [name v]) contains (contain?)?> then\n    set [ghost v] effect to ([abs v] of (((_y_MouseShop) - (ghost)) * (0.8)) )\n    go to x: (90) y: ((y) - (_y_MouseShop))\n    Touch Mouse? (type) (power) (price)\nend\n\n@Number\n\nwhen flag clicked\nhide\nclear graphic effects\nset size to (100) %\n\nwhen I start as a clone\nshow\ngo to [front v] layer\nclear graphic effects\nset size to (100) %\nwait () seconds\ndelete this clone\n\ndefine Create Clone of (things)\nset [_letter_numberic v] to [0]\nif <(things) = [Points]> then\n    repeat (length of (Points))\n        change [_letter_numberic v] by (1)\n        switch costume to (letter (_Letter_Numberic) of (Points))\n        create clone of (_myself_ v)\n        if <(costume [name v]) = [1]> then\n            change x by (8)\n        else\n            change x by (15)\n        end\n    end\nend\nif <(things) = [Coins]> then\n    repeat (length of (Coins))\n        change [_letter_numberic v] by (1)\n        switch costume to (letter (_Letter_Numberic) of (Coins))\n        create clone of (_myself_ v)\n        if <(costume [name v]) = [1]> then\n            change x by (8)\n        else\n            change x by (15)\n        end\n    end\nend\n\nwhen I receive [numeric - coins v]\nwait until <not <(Loading...) = [1]>>\nrepeat until <(Loading...) = [1]>\n    go to x: (-215) y: (150)\n    Create Clone of [Coins]\n    change x by (-5)\n    switch costume to (coins v)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [numberic - points v]\nwait until <not <(Loading...) = [1]>>\nrepeat until <(Loading...) = [1]>\n    go to x: (-215) y: (150)\n    Create Clone of [Points]\n    change x by (10)\n    change y by (3)\n    switch costume to (point v)\n    create clone of (_myself_ v)\nend\n\n