Opposite Day! ~A Platformer~
@Stage\n\ndefine Encode (letters)\nset [_chars v] to [ !"#$%&'\(\)*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz\[\\]^_`{|}~ABCDEFGHIJKLMNOPQURSTUVWXYZ]\nset [encoded v] to []\nset [ei v] to [1]\nrepeat (length of (letters))\n    set [eii v] to [1]\n    repeat until <<(letter (Ei) of (letters)) = (letter (Eii) of (_Chars))> or <(Eii) > (length of (_Chars))>>\n        change [eii v] by (1)\n    end\n    if <(Eii) > (length of (_Chars))> then\n        Error\n    else\n        if <(length of (Eii)) = [1]> then\n            set [encoded v] to (join (Encoded) (join [0] (Eii)))\n        else\n            set [encoded v] to (join (Encoded) (Eii))\n        end\n    end\n    change [ei v] by (1)\nend\n\ndefine Decode (numbers)\nset [_chars v] to [ !"#$%&'\(\)*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz\[\\]^_`{|}~ABCDEFGHIJKLMNOPQURSTUVWXYZ]\nset [di v] to [1]\nset [decoded v] to []\nrepeat ((length of (numbers)) / (2))\n    set [decoded v] to (join (Decoded) (letter (join (letter (Di) of (numbers)) (letter ((Di) + (1)) of (numbers))) of (_Chars)))\n    change [di v] by (2)\nend\n\nwhen I receive [start levels v]\nshow variable [level v]\nhide variable [☁ leastdeaths v]\nhide variable [deaths v]\nhide variable [decoded v]\nrepeat until <(Level) = [14]>\n    switch backdrop to ((Level) + (1))\nend\nswitch backdrop to ((Level) + (1))\nrepeat until <(Level) = [1]>\n    if <(Deaths) < (☁ LeastDeaths)> then\n        set [☁ leastdeaths v] to (Deaths)\n        Encode (username)\n        set [☁ leastby v] to (Encoded)\n    end\n    Decode (☁ LeastBy)\n    show variable [☁ leastdeaths v]\n    show variable [deaths v]\n    show variable [decoded v]\nend\nhide variable [☁ leastdeaths v]\nhide variable [deaths v]\nhide variable [decoded v]\n\nwhen I receive [go game! v]\nswitch backdrop to (title v)\nhide variable [level v]\nhide variable [☁ leastdeaths v]\nhide variable [deaths v]\nhide variable [decoded v]\n\nforever\n    play sound [Cool Song by Diglett123 v] until done\nend\n\n@Not Logo\n\nwhen I receive [go game! v]\nshow\nset [sin v] to [0]\nrepeat until <(backdrop [number v]) = [2]>\n    go to x: (0) y: ((100) + ((15) * ([sin v] of (Sin) )))\n    change [sin v] by (5)\nend\nhide\n\nwhen flag clicked\nforever\n    set [timer v] to ((timer) + (0.01))\nend\n\nwhen [timer v] > (timer)\nbroadcast (Go Game! v)\n\n@Not Play\n\nwhen this sprite clicked\nif <(timer) < (timer)> then\n    stop [all v]\nend\n\nwhen I receive [start levels v]\nhide\n\nwhen I receive [go game! v]\nshow\nforever\n    wait until <touching (mouse-pointer v)?>\n    change size by (10)\n    wait until <not <touching (mouse-pointer v)?>>\n    change size by (-10)\nend\n\n@Not Exit\n\nwhen this sprite clicked\nif <(timer) < (timer)> then\n    broadcast (Start Levels v)\n    hide\nend\n\nwhen I receive [go game! v]\nshow\nforever\n    wait until <touching (mouse-pointer v)?>\n    change size by (10)\n    wait until <not <touching (mouse-pointer v)?>>\n    change size by (-10)\nend\n\n@Not Mobile\n\nwhen this sprite clicked\nif <(timer) < (timer)> then\n    if <(costume [number v]) = [1]> then\n        set [mobile? v] to [n]\n        next costume\n    else\n        set [mobile? v] to [y]\n        next costume\n    end\nend\n\nwhen I receive [start levels v]\nhide\n\nwhen I receive [go game! v]\nshow\nswitch costume to (off v)\nset [mobile? v] to [n]\nforever\n    wait until <touching (mouse-pointer v)?>\n    change size by (5)\n    wait until <not <touching (mouse-pointer v)?>>\n    change size by (-5)\nend\n\n@Not Player\n\ndefine Restart\nset [x v] to [0]\nset [y v] to [0]\ngo to x: (-200) y: (0)\n\ndefine Physics\nif <<<(Mobile?) = [n]> and <<key (left arrow v) pressed?> or <key (a v) pressed?>>> or <<(Mobile?) = [y]> and <(item (2) of [playermobilecontrols v]) = [1]>>> then\n    point in direction (-90)\n    change [x v] by (2)\nend\nif <<<(Mobile?) = [n]> and <<key (right arrow v) pressed?> or <key (d v) pressed?>>> or <<(Mobile?) = [y]> and <(item (4) of [playermobilecontrols v]) = [1]>>> then\n    point in direction (90)\n    change [x v] by (-2)\nend\nchange x by (x)\nif <<touching color (#cd7700)?> or <<touching color (#00faff)?> or <<touching color (#0057ff)?> or <touching color (#bc6e00)?>>>> then\n    change [deaths v] by (1)\n    start sound [Roblox OOF v]\n    Restart\nend\nSlope\nif <touching (not level v)?> then\n    change x by ((x) * (-1))\n    if <<<(Mobile?) = [n]> and <not <<key (up arrow v) pressed?> or <key (w v) pressed?>>>> or <<(Mobile?) = [y]> and <not <(item (1) of [playermobilecontrols v]) = [1]>>>> then\n        if <(x) > [0]> then\n            set [x v] to [-10]\n            set [y v] to [10]\n        else\n            set [x v] to [10]\n            set [y v] to [10]\n        end\n    else\n        set [x v] to [0]\n    end\nelse\n    set [x v] to ((x) * (0.8))\nend\nchange y by (y)\nif <<touching color (#cd7700)?> or <<touching color (#00faff)?> or <<touching color (#0057ff)?> or <touching color (#bc6e00)?>>>> then\n    change [deaths v] by (1)\n    start sound [Roblox OOF v]\n    Restart\nend\nif <touching (not level v)?> then\n    change y by ((y) * (-1))\n    set [y v] to [0]\n    if <<<(Mobile?) = [n]> and <not <<key (up arrow v) pressed?> or <key (w v) pressed?>>>> or <<(Mobile?) = [y]> and <not <(item (1) of [playermobilecontrols v]) = [1]>>>> then\n        if <(Jumping?) = [y]> then\n            set [y v] to [12]\n            set [jumping? v] to [n]\n        end\n    end\nelse\n    change [y v] by (-1)\n    set [jumping? v] to [y]\nend\nif <<(x position) > [225]> or <<(y position) < [-179]> and <(Level) = [11]>>> then\n    if <(Level) = [14]> then\n        set [level v] to [1]\n        broadcast (Start Levels v)\n    else\n        change [level v] by (1)\n    end\n    Restart\nend\nif <<<(y position) < [-179]> and <not <(Level) = [11]>>> or <<touching (not geyser v)?> or <<touching color (#cd7700)?> or <<touching color (#00faff)?> or <touching color (#0057ff)?>>>>> then\n    change [deaths v] by (1)\n    start sound [Roblox OOF v]\n    Restart\nend\n\nwhen I receive [start levels v]\nset rotation style [left-right v]\nRestart\nshow\nset [level v] to [1]\nforever\n    Physics\nend\n\ndefine Slope\nset [slope v] to [0]\nrepeat until <<(Slope) = [8]> or <not <touching (not level v)?>>>\n    change y by (1)\n    change [slope v] by (1)\nend\nif <touching (not level v)?> then\n    change y by (-8)\nend\n\nwhen I receive [go game! v]\ndelete all of [playermobilecontrols v]\nrepeat (4)\n    add [0] to [playermobilecontrols v]\nend\nset [deaths v] to [0]\nhide\nforever\n    switch costume to (open v)\n    wait (pick random (4) to (8)) seconds\n    switch costume to (closed v)\n    wait (0.078) seconds\nend\n\n@Not Level\n\nwhen I receive [start levels v]\nswitch costume to (l1 v)\nshow\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\n@Not Geyser\n\nwhen I receive [start levels v]\nhide\nwait until <not <(Level) = [12]>>\nwait until <(Level) = [12]>\nrepeat until <not <(Level) = [12]>>\n    wait (pick random (2) to (5)) seconds\n    switch costume to (pick random (1) to (2))\n    show\n    go to x: (0) y: (-398)\n    repeat (15)\n        change y by (20)\n    end\n    wait (0.5) seconds\n    repeat (15)\n        change y by (-20)\n    end\n    hide\nend\n\nwhen I receive [go game! v]\nhide\n\n@Not Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\n\nwhen I receive [go game! v]\nhide\n\n@Not Mobile Controls!\n\nwhen I receive [go game! v]\nhide\nswitch costume to (left v)\ngo to x: (-172) y: (-110)\ncreate clone of (_myself_ v)\nchange x by (45)\nnext costume\ncreate clone of (_myself_ v)\ngo to x: (127) y: (-110)\nnext costume\ncreate clone of (_myself_ v)\nchange x by (45)\nnext costume\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nforever\n    set [ghost v] effect to (25)\n    if <(Mobile?) = [y]> then\n        show\n    else\n        hide\n    end\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        if <(costume [number v]) = [1]> then\n            replace item (2) of [playermobilecontrols v] with [1]\n        else\n            if <(costume [number v]) = [2]> then\n                replace item (4) of [playermobilecontrols v] with [1]\n            else\n                if <(costume [number v]) = [3]> then\n                    replace item (3) of [playermobilecontrols v] with [1]\n                else\n                    replace item (1) of [playermobilecontrols v] with [1]\n                end\n            end\n        end\n    else\n        if <(costume [number v]) = [1]> then\n            replace item (2) of [playermobilecontrols v] with [0]\n        else\n            if <(costume [number v]) = [2]> then\n                replace item (4) of [playermobilecontrols v] with [0]\n            else\n                if <(costume [number v]) = [3]> then\n                    replace item (3) of [playermobilecontrols v] with [0]\n                else\n                    replace item (1) of [playermobilecontrols v] with [0]\n                end\n            end\n        end\n    end\nend\n\n
-Use WASD or Arrow keys to move, but beware, it is opposite day! The grass is dirt and it kills you, but fear not! You have to jump on the spikes!\n-Green flag to start! Oh wait, or maybe it's the stop button!\n-If you want you can also check out the most complicated project that I am working on, the most advanced player inventory on Scratch! https://scratch.mit.edu/projects/439673531/\n\nAll levels are possible, though some are annoyingly hard.