Ratatouille | A Scrolling Platformer

Instructions: ★★★Instructions★★★\n~PC USERS~\n- Up Arrow - To Jump\n- W - To Jump\n- Left Arrow - To Move Left\n- A - To Move Left\n- Right Arrow- To Move Right\n- D - To Move Right\n\n~MOBILE USERS~\n- Tap On Left - To Move Left\n- Tap On Right - To Move Right\n-- Tap Up - To Jump

@Stage\n\nwhen flag clicked\nforever\n    play sound [Nebula v] until done\nend\n\n@Player\n\nwhen flag clicked\ndelete all of [chat v]\nadd [Hi!] to [chat v]\nadd [Come with me!] to [chat v]\nadd [Ok!] to [chat v]\nadd [Nice!] to [chat v]\nadd [Look at me!] to [chat v]\nadd [Be careful!] to [chat v]\nadd [lol] to [chat v]\nadd [Bye!] to [chat v]\nadd [No thanks.] to [chat v]\nadd [I found the secret chat option!] to [chat v]\n\nwhen flag clicked\nshow list [chat v]\nset [is the chat open v] to [0]\nforever\n    if <<key (t v) pressed?> or <<touching (mouse-pointer v)?> and <mouse down?>>> then\n        if <(is the chat open) = [1]> then\n            set [is the chat open v] to [0]\n        else\n            set [is the chat open v] to [1]\n        end\n        wait until <<not <<touching (mouse-pointer v)?> and <mouse down?>>> and <not <key (t v) pressed?>>>\n    end\n    Chat\nend\n\ndefine Chat\nif <(is the chat open) = [1]> then\n    if <key (1 v) pressed?> then\n        set [chat v] to [1]\n        say (item (CHAT) of [chat v])\n        wait (2) seconds\n        say []\n        set [chat v] to [0]\n    else\n        if <key (2 v) pressed?> then\n            set [chat v] to [2]\n            say (item (CHAT) of [chat v])\n            wait (2) seconds\n            say []\n            set [chat v] to [0]\n        else\n            if <key (3 v) pressed?> then\n                set [chat v] to [3]\n                say (item (CHAT) of [chat v])\n                wait (2) seconds\n                say []\n                set [chat v] to [0]\n            else\n                if <key (4 v) pressed?> then\n                    set [chat v] to [4]\n                    say (item (CHAT) of [chat v])\n                    wait (2) seconds\n                    say []\n                    set [chat v] to [0]\n                else\n                    if <key (5 v) pressed?> then\n                        set [chat v] to [5]\n                        say (item (CHAT) of [chat v])\n                        wait (2) seconds\n                        say []\n                        set [chat v] to [0]\n                    else\n                        if <key (6 v) pressed?> then\n                            set [chat v] to [6]\n                            say (item (CHAT) of [chat v])\n                            wait (2) seconds\n                            say []\n                            set [chat v] to [0]\n                        else\n                            if <key (7 v) pressed?> then\n                                set [chat v] to [7]\n                                say (item (CHAT) of [chat v])\n                                wait (2) seconds\n                                say []\n                                set [chat v] to [0]\n                            else\n                                if <key (8 v) pressed?> then\n                                    set [chat v] to [8]\n                                    say (item (CHAT) of [chat v])\n                                    wait (2) seconds\n                                    say []\n                                    set [chat v] to [0]\n                                else\n                                    if <key (9 v) pressed?> then\n                                        set [chat v] to [9]\n                                        say (item (CHAT) of [chat v])\n                                        wait (2) seconds\n                                        say []\n                                        set [chat v] to [0]\n                                    else\n                                        if <key (0 v) pressed?> then\n                                            set [chat v] to [10]\n                                            say (item (CHAT) of [chat v])\n                                            wait (3) seconds\n                                            say []\n                                            set [chat v] to [0]\n                                        else\n                                            set [chat v] to [0]\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [my player # v] to [0]\nset [max players v] to [10]\nbroadcast (setup opponents v) and wait\nbroadcast (join game v) and wait\nset [connect v] to [Connecting]\nif <(MY PLAYER #) > [0]> then\n    set [connect v] to [Connected]\nelse\n    set [connect v] to [Full]\nend\nbroadcast (begin v)\n\ndefine write (val) to encoded\nset [letter # v] to [1]\nrepeat (length of (val))\n    set [encoded v] to (join (encoded) (item # of (letter (letter #) of (val)) in [code v]))\n    change [letter # v] by (1)\nend\nset [encoded v] to (join (encoded) [00])\n\nwhen I receive [begin v]\nforever\n    if <(MY PLAYER #) > [0]> then\n        send cloud data\n    end\nend\n\ndefine set cloud # (player) to (value)\nif <(player) = [1]> then\n    set [☁ p1 v] to (value)\nelse\n    if <(player) = [2]> then\n        set [☁ p2 v] to (value)\n    else\n        if <(player) = [3]> then\n            set [☁ p3 v] to (value)\n        else\n            if <(player) = [4]> then\n                set [☁ p4 v] to (value)\n            else\n                if <(player) = [5]> then\n                    set [☁ p5 v] to (value)\n                else\n                    if <(player) = [6]> then\n                        set [☁ p6 v] to (value)\n                    else\n                        if <(player) = [7]> then\n                            set [☁ p7 v] to (value)\n                        else\n                            if <(player) = [8]> then\n                                set [☁ p8 v] to (value)\n                            else\n                                if <(player) = [9]> then\n                                    set [☁ p9 v] to (value)\n                                else\n                                    if <(player) = [10]> then\n                                        set [☁ p10 v] to (value)\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine send cloud data\nset [encoded v] to []\nwrite (costume [number v]) to encoded\nwrite (username) to encoded\nwrite (round ((timer) * (10))) to encoded\nwrite (x) to encoded\nwrite (y) to encoded\nwrite (CHAT) to encoded\nset cloud # (MY PLAYER #) to (encoded)\n\nwhen flag clicked\nbroadcast (Green flag v) and wait\nbroadcast (Play Game v) and wait\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\nwhen I receive [play game v]\nset [level v] to [1]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    Reset\n    repeat until <(EXIT) > []>\n        Tick\n        broadcast (Tick v)\n    end\n    if <(EXIT) = [win]> then\n        Game - Win\n    else\n        set [exit v] to []\n    end\nend\n\ndefine Tick\nif <touching (ladder v)?> then\n    change [sx v] by ((2) * (<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<((mouse x) - (20)) > (x position)> and <mouse down?>>> - <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<((mouse x) + (20)) < (x position)> and <mouse down?>>>))\n    set [sx v] to ((sx) * (0.63))\nelse\n    change [sx v] by ((1.8) * (<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<((mouse x) - (20)) > (x position)> and <mouse down?>>> - <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<((mouse x) + (20)) < (x position)> and <mouse down?>>>))\n    set [sx v] to ((sx) * (0.79))\nend\nif <([abs v] of (sx) ) > [0.9]> then\n    Change Player x by (round (sx))\nend\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (20)) > (y position)> and <mouse down?>>> then\n    if <(in air) < [3]> then\n        if <(sy) > [-2]> then\n            set [sy v] to [13.2]\n        end\n    end\nend\nif <touching (bouncy v)?> then\n    set [sy v] to [22.5]\nend\nif <touching (ladder v)?> then\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (20)) > (y position)> and <mouse down?>>> then\n        change [y v] by (6)\n    end\n    if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<((mouse y) - (20)) > (y position)> and <mouse down?>>> then\n        change [y v] by (-6)\n    end\n    set [sy v] to [0]\nelse\n    if <(sy) > [-20]> then\n        change [sy v] by (-1.3)\n    end\nend\nChange player y by (sy)\n Test - Die\nset [scroll x v] to (x)\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nPosition\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(y) < [-180]> then\n    set [exit v] to [die]\nend\n\nif <<<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<((mouse x) - (20)) > (x position)> and <mouse down?>>> or <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<((mouse x) + (20)) < (x position)> and <mouse down?>>>> or <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) - (20)) > (y position)> and <mouse down?>>> or <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<((mouse y) + (20)) > (y position)> and <mouse down?>>>>> then\n    set [timeout v] to [1000]\nelse\n    change [timeout v] by (-1)\nend\n\nif <(Timeout) < [1]> then\n    broadcast (timeout v)\n    hide\nend\n\ndefine Change Player x by (sx)\nchange [x v] by (sx)\nPosition\nif <touching (platforms v)?> then\n    repeat (8)\n        change [y v] by (1)\n        Position\n        if <not <touching (platforms v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-8)\n    if <touching (platforms v)?> then\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) - (5)) > (y position)> and <mouse down?>>> then\n            if <(sx) > [0]> then\n                set [sx v] to [-16]\n            else\n                set [sx v] to [16]\n            end\n            set [sy v] to [12]\n        end\n        Position\n    end\n    repeat until <not <touching (platforms v)?>>\n        change [x v] by ((([abs v] of (sx) ) / (sx)) * (-1))\n        Position\n    end\nend\n\ndefine Change player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (platforms v)?>>\n    change [y v] by ((([abs v] of (sy) ) / (sy)) * (-1))\n    if <(sy) < [0]> then\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\nif <touching (jump_through v)?> then\n    if <(sy) < [0]> then\n        change [y v] by ((sy) * (-1))\n        set [sy v] to [0]\n        set [in air v] to [0]\n        Position\n    end\nend\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine  Test - Die\nif <<touching (spinny v)?> or <touching (danger v)?>> then\n    set [exit v] to [die]\n    Reset\nend\n\ndefine Game - Win\nrepeat (50)\n    point towards (exit v)\n    turn right (65) degrees\n    move ((distance to [exit v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nhide\nchange [level v] by (1)\nwait (1) seconds\nset [ghost v] effect to (0)\n\nwhen flag clicked\nforever\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (20)) > (y position)> and <mouse down?>>> and <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<((mouse x) + (15)) > (x position)> and <mouse down?>>>> then\n        switch costume to (right up v)\n    else\n        if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (20)) > (y position)> and <mouse down?>>> and <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<((mouse x) - (15)) < (x position)> and <mouse down?>>>> then\n            switch costume to (left up v)\n        else\n            if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (20)) > (y position)> and <mouse down?>>> then\n                switch costume to (up v)\n            else\n                if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<((mouse x) - (20)) > (x position)> and <mouse down?>>> then\n                    switch costume to (right v)\n                else\n                    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<((mouse x) + (20)) < (x position)> and <mouse down?>>> then\n                        switch costume to (left v)\n                    else\n                        switch costume to (middle v)\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [timeout v]\nhide\n\ndefine Reset\nif <(CHECKPOINT) = [0]> then\n    set [x v] to [-100]\n    set [y v] to [-60]\n    set [scroll y v] to (y)\n    set [scroll x v] to (x)\nelse\n    if <(CHECKPOINT) = [1]> then\n        set [x v] to [1400]\n        set [y v] to [-65]\n        set [scroll y v] to (y)\n        set [scroll x v] to (x)\n    else\n        if <(CHECKPOINT) = [2]> then\n            set [x v] to [1400]\n            set [y v] to [775]\n            set [scroll y v] to (y)\n            set [scroll x v] to (x)\n        else\n            if <(CHECKPOINT) = [3]> then\n                set size to (110) %\n                set [ghost v] effect to (50)\n                Game - Win\n                say [You have won the game. Please leave a love!] for (3) seconds\n            end\n        end\n    end\nend\nset [sx v] to [0]\nset [sy v] to [0]\nset [in air v] to [10]\nset [timeout v] to [1000]\nset [exit v] to []\nset size to (100) %\nshow\nset rotation style [left-right v]\n\nwhen flag clicked\nset [ghost v] effect to (0)\nforever\n    set size to (110) %\nend\n\nwhen I start as a clone\nset [ghost v] effect to (0)\nforever\n    set size to (110) %\nend\n\nwhen [r v] key pressed\nReset\n\nwhen flag clicked\nset [win v] to [0]\nforever\n    if <touching (win v)?> then\n        broadcast (win v)\n        change [win v] by (1)\n        wait (4) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(CHECKPOINT) = [3]> then\n        set size to (110) %\n        set [ghost v] effect to (50)\n        say [You have won the game. Please leave a love!] for (3) seconds\n        say [CHANGING TO SPECTATOR MODE] for (1) seconds\n    end\nend\n\nwhen [r v] key pressed\nReset\n\nwhen flag clicked\nset [win v] to [0]\nforever\n    if <touching (win v)?> then\n        play sound [EXTRAYAYAYAYAY v] until done\n        wait (99999) seconds\n    end\nend\n\n@Others\n\nwhen I receive [begin v]\nset [names v] to [1]\nforever\n    if <key (n v) pressed?> then\n        if <(names) = [1]> then\n            wait until <not <key (n v) pressed?>>\n            set [names v] to [0]\n        else\n            wait until <not <key (n v) pressed?>>\n            set [names v] to [1]\n        end\n    end\nend\n\nwhen I receive [setup others v]\nsetup players\n\ndefine setup players\nhide\nset [offline v] to [100]\nset [player # v] to [1]\nrepeat ((MAX PLAYERS) - (1))\n    create clone of (_myself_ v)\n    change [player # v] by (1)\nend\n\ndefine value = cloud # (player)\nif <(player) = [1]> then\n    set [value v] to (☁ P1)\nelse\n    if <(player) = [2]> then\n        set [value v] to (☁ P2)\n    else\n        if <(player) = [3]> then\n            set [value v] to (☁ P3)\n        else\n            if <(player) = [4]> then\n                set [value v] to (☁ P4)\n            else\n                if <(player) = [5]> then\n                    set [value v] to (☁ P5)\n                else\n                    if <(player) = [6]> then\n                        set [value v] to (☁ P6)\n                    else\n                        if <(player) = [7]> then\n                            set [value v] to (☁ P7)\n                        else\n                            if <(player) = [8]> then\n                                set [value v] to (☁ P8)\n                            else\n                                if <(player) = [9]> then\n                                    set [value v] to (☁ P9)\n                                else\n                                    if <(player) = [10]> then\n                                        set [value v] to (☁ P10)\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [begin v]\nforever\n    if <(MY PLAYER #) = (player #)> then\n        set [offline v] to [100]\n        hide\n    else\n        Tick\n    end\nend\n\ndefine Tick\nvalue = cloud # (player #)\nif <(join [A] (value)) = (last value)> then\n    change [offline v] by (1)\n    if <(offline) = [100]> then\n        hide\n    end\nelse\n    set [last value v] to (join [A] (value))\n    if <(offline) > [99]> then\n        show\n    end\n    set [offline v] to [0]\nend\nbegin decode of (value)\nvalue = read from encoded\nif <(names) = [1]> then\n    say (join (player #) (join [:] (value)))\nelse\n    say []\nend\nvalue = read from encoded\nvalue = read from encoded\nset x to ((value) - (SCROLL X))\nvalue = read from encoded\nset y to (((value) - (SCROLL Y)) + (8))\nvalue = read from encoded\nbroadcast (Decode Chat v)\n\ndefine begin decode of (encoded)\nset [encoded v] to (encoded)\nset [letter # v] to [1]\n\ndefine value = read from encoded\nset [value v] to []\nforever\n    set [idx v] to (join (letter (letter #) of (encoded)) (letter ((letter #) + (1)) of (encoded)))\n    change [letter # v] by (2)\n    if <(idx) < [1]> then\n        stop [this script v]\n    end\n    set [value v] to (join (value) (item (idx) of [code v]))\nend\n\nwhen I receive [join game v]\nvalue = cloud # (player #)\nset [last value v] to (join [A] (value))\nwait (3) seconds\nvalue = cloud # (player #)\nif <(join [A] (value)) = (last value)> then\n    set [my player # v] to (player #)\nend\n\ndefine Decode Chat (chat)\nif <(chat) = [1]> then\n    say (item (1) of [chat v]) for (2) seconds\nelse\n    if <(chat) = [2]> then\n        say (item (2) of [chat v]) for (2) seconds\n    else\n        if <(chat) = [3]> then\n            say (item (3) of [chat v]) for (2) seconds\n        else\n            if <(chat) = [4]> then\n                say (item (4) of [chat v]) for (2) seconds\n            else\n                if <(chat) = [5]> then\n                    say (item (5) of [chat v]) for (2) seconds\n                else\n                    if <(chat) = [6]> then\n                        say (item (6) of [chat v]) for (2) seconds\n                    else\n                        if <(chat) = [7]> then\n                            say (item (7) of [chat v]) for (2) seconds\n                        else\n                            if <(chat) = [8]> then\n                                say (item (8) of [chat v]) for (2) seconds\n                            else\n                                if <(chat) = [9]> then\n                                    say (item (9) of [chat v]) for (2) seconds\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [decode chat v]\nDecode Chat (value)\n\nwhen [timer v] > (0)\nhide\n\n@Platforms\n\nwhen I receive [green flag v]\nhide\nset [platforms: x v] to [0]\nset [platforms: y v] to [0]\nswitch costume to (1 v)\nClone at [480] [0]\nClone at [480] [0]\nClone at [630] [0]\nClone at [450] [2]\nClone at [360] [150]\nClone at [0] [0]\nClone at [-200] [400]\nClone at [-800] [400]\nClone at [-1100] [250]\nClone at [-800] [495]\nClone at [600] [500]\nClone at [1250] [300]\nClone at [1500] [300]\n\nwhen I receive [tick v]\nposition ((Platforms: x) - (SCROLL X)) ((Platforms: y) - (SCROLL Y))\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at (x) (y)\ncreate clone of (_myself_ v)\nchange [platforms: x v] by (x)\nchange [platforms: y v] by (y)\nnext costume\n\n@Danger\n\nwhen I receive [green flag v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nClone at [480] [0]\nClone at [480] [0]\nClone at [360] [165]\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at (x) (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\n@Spinny\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nturn right (7.5) degrees\ngo to [back v] layer\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [play game v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (3 v)\nif <((1) + (1)) = [2]> then\n    Clone at [175] [-105]\n    Clone at [1950] [-100]\n    Clone at [2300] [480]\n    Clone at [2100] [480]\n    Clone at [1700] [790]\n    Clone at [1500] [790]\nend\nset [x v] to [-99999]\n\ndefine Clone at (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nClone at [1595] [70]\n\nwhen flag clicked\nforever\n\nClone at [1700] [790]\nClone at [1500] [790]\n\n@Bouncy\n\nwhen I receive [green flag v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nClone at [555] [-102]\nClone at [2000] [495]\nClone at [1770] [755]\nClone at [1570] [755]\nset [x v] to [-99999]\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <touching (player v)?> then\n    switch costume to (forced v)\nelse\n    switch costume to (idle v)\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\n@Ladder\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nClone at [480] [0]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at (x) (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\n@Collectibles\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <touching (player v)?> then\n    change [coins v] by (1)\n    start sound [Coin v]\n    delete this clone\nend\nif <(tick) > [1]> then\n    set [tick v] to [0]\nelse\n    change [tick v] by (1)\nend\n\nwhen I receive [green flag v]\nhide\npoint in direction (90)\nset [coins v] to [0]\nset [x v] to [0]\nset [tick v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nClone at [210] [50]\nClone at [60] [-20]\nClone at [360] [-90]\nClone at [554] [53]\nClone at [710] [154]\nClone at [940] [315]\nset [x v] to [-99999]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nforever\n    set size to (60) %\nend\n\nwhen I start as a clone\nforever\n    set size to (60) %\nend\n\nwhen flag clicked\nforever\n    next costume\nend\n\nwhen I start as a clone\nforever\n    next costume\nend\n\n@Checkpoint\n\nwhen [m v] key pressed\nset [mouse v] to (join ((mouse x) + (SCROLL X)) (join [,] (join [ ] ((mouse y) + (SCROLL Y)))))\nshow variable [mouse v]\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <(costume [name v]) = [closed]> then\n    if <touching (player v)?> then\n        start sound [CHECKPOINT v]\n        switch costume to (open v)\n        set [brightness v] effect to (30)\n        change [checkpoint v] by (1)\n    end\nend\ngo to [front v] layer\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\nset [checkpoint v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (closed v)\nClone at [1400] [-85]\nClone at [1400] [755]\nset [x v] to [-99999]\n\ndefine GOGOGO\n\n@Win\n\nwhen I receive [green flag v]\nhide\nset [platforms: x v] to [0]\nset [platforms: y v] to [0]\nswitch costume to (1 v)\nClone at [480] [0]\nClone at [480] [0]\nClone at [630] [0]\nClone at [450] [2]\nClone at [360] [150]\nClone at [0] [0]\nClone at [-200] [400]\nClone at [-800] [400]\nClone at [-1100] [250]\nClone at [-800] [495]\nClone at [600] [500]\nClone at [1250] [300]\nClone at [1500] [300]\n\nwhen I receive [tick v]\nposition ((Platforms: x) - (SCROLL X)) ((Platforms: y) - (SCROLL Y))\nif <touching (player v)?> then\n    change [checkpoint v] by (1)\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at (x) (y)\ncreate clone of (_myself_ v)\nchange [platforms: x v] by (x)\nchange [platforms: y v] by (y)\nnext costume\n\n@Chat\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (100)\nforever\n    set size to (0) %\n    wait until <(is the chat open) = [1]>\n    repeat (10)\n        set size to ((size) + (((100) - (size)) / (3))) %\n        change [ghost v] effect by (-10)\n    end\n    wait until <(is the chat open) = [0]>\n    repeat (10)\n        set size to ((size) + (((0) - (size)) / (3))) %\n        change [ghost v] effect by (10)\n    end\nend\n\ndefine GO\ngo to [front v] layer\ngo to [front v] layer\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (100)\nforever\n    GO\nend\n\n@@StratfordJames Tree\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [green flag v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nClone at [-91] [-58]\nClone at [1527] [-39]\nset [x v] to [-99999]\n\nClone at [1758] [120]\n\nClone at [0] [-128]\n\ndefine Clone at (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\ngo [backward v] (5) layers\n\n@notif\n\nwhen flag clicked\ngo to x: (0) y: (50)\nhide\nwait (pick random (7) to (15)) seconds\nshow\nrepeat until <(y position) < [6]>\n    change y by (((5) - (y position)) / (6))\nend\nwait (3.5) seconds\nrepeat until <(y position) > [49.5]>\n    change y by (((y position) + (5)) / (5))\nend\nhide\nforever\n    wait (pick random (14) to (26)) seconds\n    show\n    repeat until <(y position) < [6]>\n        change y by (((5) - (y position)) / (6))\n    end\n    wait (3.5) seconds\n    repeat until <(y position) > [49.5]>\n        change y by (((y position) + (5)) / (5))\n    end\n    hide\nend\n\nwhen I receive [alert v]\nstop [other scripts in sprite v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\n\nwhen I receive [tick v]\ngo to [front v] layer\n\n@parallax\n\nwhen I receive [tick v]\nGo to (((((Movement ID) * (480)) - ((SCROLL X) / (6))) mod (960)) - (480)) (Y)\n\nwhen I start as a clone\npoint in direction (90)\nset [ghost v] effect to (0)\nset [movement id v] to [0]\nswitch costume to (hills3 v)\nhide\n\ndefine Go to (x) (y)\ngo to x: (x) y: (y)\nif <<(x position) = (x)> and <(y position) = (y)>> then\n    show\nelse\n    hide\nend\ngo to [back v] layer\n\nwhen flag clicked\ncreate clone of (_myself_ v)\nset [movement id v] to [-1]\nswitch costume to (hills2 v)\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\nwhen I start as a clone\nforever\n    go to [back v] layer\nend\n\n@Sun\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen flag clicked\nforever\n    next costume\n    wait (0.04) seconds\nend\n\n@yay!!!\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nset [ghost v] effect to (100)\nshow\n\nwhen I receive [win v]\nif <(win) = [1]> then\n    repeat (20)\n        change [ghost v] effect by (-5)\n    end\n    wait (3) seconds\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@Figur1\n\nwhen flag clicked\nset [mode v] to [0]\ncreate clone of (_myself_ v)\nset [ghost v] effect to (90)\nset size to (5) %\nwait (0) seconds\nforever\n    show\n    go to x: (0) y: (50)\n    if <(mode) = [0]> then\n        change size by (((size) - (100)) / (-10))\n        switch costume to (kostüm1 v)\n    end\n    if <(mode) = [1]> then\n        set size to ((([cos v] of ((timer) * (100)) ) * (40)) + (100)) %\n        switch costume to (kostüm2 v)\n        set [color v] effect to (color)\n    end\nend\n\nwhen I start as a clone\nset [ghost v] effect to (90)\nset size to (40) %\nwait (0) seconds\nforever\n    show\n    go to x: (0) y: (50)\n    if <(mode) = [0]> then\n        change size by (((size) - (65)) / (-10))\n        switch costume to (kostüm1 v)\n    end\n    if <(mode) = [1]> then\n        set [color v] effect to (color)\n        set size to ((([sin v] of ((timer) * (100)) ) * (40)) + (100)) %\n        switch costume to (kostüm2 v)\n    end\nend\n\n@Figur2\n\nwhen flag clicked\nset [ghost v] effect to (30)\ngo to x: (-8) y: (-167)\nshow\nswitch costume to (not v)\nforever\n    if <(love?) = [true]> then\n        set [mode v] to [1]\n        set [color v] to [0]\n        costume [love]\n    else\n        if <(fav) = [true]> then\n            set [mode v] to [1]\n            set [color v] to [15]\n            costume [fave]\n        else\n            if <(see inside) = [true]> then\n                set [mode v] to [1]\n                set [color v] to [120]\n                costume [see inside]\n            else\n                if <(fulls) = [true]> then\n                    set [mode v] to [1]\n                    set [color v] to [120]\n                    costume [full]\n                else\n                    if <(remix) = [true]> then\n                        set [mode v] to [1]\n                        set [color v] to [52]\n                        costume [re]\n                    else\n                        if <(pfp) = [true]> then\n                            set [mode v] to [1]\n                            set [color v] to [52]\n                            costume [lo]\n                        else\n                            if <(report) = [true]> then\n                                set [mode v] to [1]\n                                set [color v] to [120]\n                                costume [report]\n                            else\n                                if <(gf) = [true]> then\n                                    set [mode v] to [1]\n                                    set [color v] to [52]\n                                    costume [gf]\n                                else\n                                    if <(sb) = [true]> then\n                                        set [mode v] to [1]\n                                        set [color v] to [0]\n                                        costume [stop]\n                                    else\n                                        if <(add) = [true]> then\n                                            set [mode v] to [1]\n                                            set [color v] to [120]\n                                            costume [add]\n                                        else\n                                            if <(copy) = [true]> then\n                                                set [mode v] to [1]\n                                                set [color v] to [120]\n                                                costume [copy]\n                                            else\n                                                if <(post) = [true]> then\n                                                    set [mode v] to [1]\n                                                    set [color v] to [120]\n                                                    costume [post]\n                                                else\n                                                    if <(cv) = [true]> then\n                                                        set [mode v] to [1]\n                                                        set [color v] to [120]\n                                                        costume [cv]\n                                                    else\n                                                        if <(cancel) = [true]> then\n                                                            set [mode v] to [1]\n                                                            set [color v] to [120]\n                                                            costume [cancel]\n                                                        else\n                                                            set [mode v] to [0]\n                                                            set [color v] to [0]\n                                                            costume [not]\n                                                        end\n                                                    end\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine costume (check)\nif <not <(costume [name v]) = (check)>> then\n    repeat (4)\n        change [ghost v] effect by (25)\n    end\n    switch costume to (check)\n    repeat (4)\n        change [ghost v] effect by (-25)\n    end\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@love\n\nwhen flag clicked\nforever\n    set [love? v] to <touching (mouse-pointer v)?>\nend\n\n@fave\n\nrepeat (10)\n\nwhen flag clicked\nforever\n    set [fav v] to <touching (mouse-pointer v)?>\nend\n\n@report\n\nrepeat (10)\n\nwhen flag clicked\nforever\n    set [report v] to <touching (mouse-pointer v)?>\nend\n\n@report2\n\nrepeat (10)\n\nwhen flag clicked\nforever\n    set [add v] to <touching (mouse-pointer v)?>\nend\n\n@report3\n\nrepeat (10)\n\nwhen flag clicked\nforever\n    set [copy v] to <touching (mouse-pointer v)?>\nend\n\n@thumb\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\n\nwhen flag clicked\nforever\n    GOGOGO\n    GOGOGO x2\nend\n\nset [ghost v] effect to (0)\n\ndefine GOGOGO\nforever\n    forever\n        forever\n            forever\n                go to [front v] layer\n                go to [front v] layer\n                go to [front v] layer\n                go to [front v] layer\n                go to [front v] layer\n                go to [front v] layer\n                go to [front v] layer\n                go to [front v] layer\n                go to [front v] layer\n                go to [front v] layer\n                go to [front v] layer\n                go to [front v] layer\n                go to [front v] layer\n                go to [front v] layer\n                go to [front v] layer\n                go to [front v] layer\n            end\n        end\n    end\nend\n\ndefine GOGOGO x2\nforever\n    forever\n        forever\n            forever\n                forever\n                    forever\n                        forever\n                            forever\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                                go to [front v] layer\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\n