In the sky - Platformer

Instructions: |-------------------------------------------------------|\n|        SPEEDRUNNER UPDATE               |\n|-------------------------------------------------------|\nNow you can speedrun against other Scratchers! By checking the "Speedrun" check in the menu, you can beat the current record if you're a Scratcher! And, others Scratchers will see your record!\n\nNow mobile friendly & redesigned!\n\nUse WASD to move, touchscreen, arrow keys or space for jumping!\nThanks so much for SDS!\n\nFollow - Like - Favorite!\n!--- All advertising will be reported ---!\n\nmy friend said the it was too easy... so new level xD\n

@Stage\n\nwhen [m v] key pressed\nset volume to (0) %\n\nwhen I receive [intro v]\nset volume to (70) %\nforever\n    play sound (Song) until done\nend\n\nwhen I receive [start v]\nif <(Speedrunner?) = [1]> then\n    set [song v] to [ohdream]\n    stop all sounds\nelse\n    set [song v] to [palm]\nend\n\nwhen flag clicked\nset [song v] to [palm]\n\n@InTheAir\n\nwhen flag clicked\nhide\nswitch costume to (costume2 v)\ngo to x: (0) y: (300)\nhide variable [record decrypted v]\nhide variable [player decrypted v]\n\nwhen I receive [start v]\nhide\nstop [other scripts in sprite v]\nhide variable [record decrypted v]\nhide variable [player decrypted v]\n\nwhen I receive [menu v]\nshow variable [record decrypted v]\nshow variable [player decrypted v]\nswitch costume to (costume2 v)\ngo to x: (0) y: (300)\nshow\nnext costume\nrepeat (9)\n    change y by (-10)\nend\nforever\n    point in direction ((90) + (([sin v] of ((timer) * (100)) ) * (6)))\nend\n\nwhen I receive [shop v]\nhide\nhide variable [record decrypted v]\nhide variable [player decrypted v]\n\nset [☁ speedrunner v] to [191919]\n\n@Cloud\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nif <(start) = [1]> then\n    delete this clone\nend\nshow\ngo to [front v] layer\ngoto x [-666] y (pick random (120) to (140))\nswitch costume to (cloud v)\nrepeat until <<(x position) > [310]> or <(start) = [1]>>\n    goto x ((x position) + (4)) y (y position)\nend\nif <(start) = [1]> then\n    delete this clone\nend\ncreate clone of (_myself_ v)\ndelete this clone\n\nwait (pick random (2.) to (4)) seconds\n\ngo to x: (-300) y: (0)\n\ndefine goto x (x) y (y)\nswitch costume to (sizebypass v)\nset size to (10800) %\ngo to x: (x) y: (y)\nset size to (100) %\nswitch costume to (cloud v)\n\nwhen I receive [start v]\nchange [start v] by (1)\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [menu v]\nhide\nset [start v] to [0]\ncreate clone of (_myself_ v)\n\nwhen I receive [shop v]\nchange [start v] by (1)\nstop [other scripts in sprite v]\nhide\n\n@StartButton\n\nwhen flag clicked\nhide\n\nforever\n    if <touching (mouse-pointer v)?> then\n        set [ghost v] effect to (20)\n    else\n        clear graphic effects\n    end\nend\n\nwhen this sprite clicked\nbroadcast (start v)\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [menu v]\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        set [ghost v] effect to (20)\n    else\n        clear graphic effects\n    end\nend\n\nwhen I receive [shop v]\nstop [other scripts in sprite v]\nhide\n\n@Player\n\ndefine Reset\ngo to x: (-217) y: (140)\nset [y velocity v] to [0]\nset [x vel v] to [0]\n\nwhen I receive [start v]\nswitch backdrop to (backdrop1 v)\nshow\nset rotation style [all around v]\ngo to x: (-217) y: (140)\nclear graphic effects\nset [level v] to [1]\nshow\npoint in direction (90)\nset [x vel v] to [0]\nreset timer\nset [clonei v] to [0]\nset [y velocity v] to [0]\nReset\nforever\n    clear graphic effects\n    switch costume to (PlayerSkin)\n    switch backdrop to ((Level) + (1))\n    if <<<mouse down?> and <(mouse x) > (x position)>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n        change [x vel v] by (1.5)\n    end\n    if <<<mouse down?> and <(mouse x) < (x position)>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n        change [x vel v] by (-1.5)\n    end\n    set [x vel v] to ((X vel) * (0.85))\n    change x by (X vel)\n    if <touching color (#ff0000)?> then\n        change y by (1)\n        if <touching color (#ff0000)?> then\n            change y by (1)\n            if <touching color (#ff0000)?> then\n                change y by (1)\n                if <touching color (#ff0000)?> then\n                    change y by (1)\n                    if <touching color (#ff0000)?> then\n                        change y by (1)\n                        if <touching color (#ff0000)?> then\n                            change x by ((X vel) * (-1))\n                            change y by (-5)\n                            if <<<<mouse down?> and <(mouse y) > (y position)>> or <key (up arrow v) pressed?>> or <<key (w v) pressed?> or <key (space v) pressed?>>> then\n                                if <(X vel) > [0]> then\n                                    set [x vel v] to [-5]\n                                else\n                                    set [x vel v] to [5]\n                                end\n                                set [y velocity v] to [10]\n                            else\n                                set [x vel v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y velocity v] by (-0.5)\n    change y by (Y velocity)\n    if <touching color (#ff0000)?> then\n        change y by ((Y velocity) * (-1))\n        set [y velocity v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#ff0000)?> then\n        if <<<mouse down?> and <(mouse y) > (y position)>> or <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <key (space v) pressed?>>>> then\n            set [y velocity v] to [10]\n        end\n    end\n    change y by (1)\n    if <touching color (#2600ff)?> then\n        Reset\n    end\n    if <(x position) > [240]> then\n        broadcast (next level v)\n        next backdrop\n        if <(backdrop [number v]) = [23]> then\n            broadcast (Won v)\n        end\n        if <(backdrop [number v]) = [1]> then\n            broadcast (ripballons v)\n            reset timer\n        end\n        change [level v] by (2)\n        Reset\n    end\n    if <(y position) < [-170]> then\n        Reset\n    end\n    switch backdrop to (Level)\nend\n\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nerase all\nswitch backdrop to (backdrop2 v)\nhide\n\nif <(Level) = [1]> then\n    switch backdrop to ((Level) + (2))\nend\n\nwhen flag clicked\nset [speedrunner? v] to [0]\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\nerase all\nhide\nhide variable [timer v]\n\nwhen I start as a clone\n\nset [ghost v] effect to (70)\n\nwait (0.05) seconds\ndelete this clone\n\ncreate clone of (_myself_ v)\n\nchange [clonei v] by (1)\n\nif <(CloneI) > [2]> then\n    erase all\n    set [clonei v] to [0]\nend\n\nset pen color to ((200) * (16777216))\nstamp\n\ndefine Make blurr effect\nset [prevx v] to (x position)\nset [prevy v] to (y position)\npoint towards (mouse-pointer v)\nerase all\nif <(X vel) < [0]> then\n    set [dist v] to [-5]\nelse\nend\nset [dist v] to ((X vel) * (0.04))\nset [ghost v] effect to (100)\nswitch costume to (join (PlayerSkin) [T])\nrepeat (10)\n    move (Dist) steps\n    change [color v] effect by (-2)\n    stamp\nend\nrepeat (10)\n    move (Dist) steps\n    change [color v] effect by (2)\n    stamp\nend\ngo to x: (prevX) y: (prevY)\npoint in direction (90)\n\nMake blurr effect\nMake blurr effect\n\nwhen I receive [start v]\nforever\n    set [timer v] to (timer)\n    if <(Speedrunner?) = [1]> then\n        show variable [timer v]\n    else\n        hide variable [timer v]\n    end\nend\n\nwhen I receive [newrecord v]\nsay (join (join [Congrats! You now have the new record of speedrunning by ] ((enDecrypt) - (lastTImer))) [ seconds faster!]) for (4) seconds\n\nwhen flag clicked\nhide variable [timer v]\n\nwhen I receive [menu v]\n\n@Sky\n\nwhen flag clicked\nshow\ngo to [back v] layer\nswitch costume to (costume2 v)\n\nwhen I receive [start v]\nhide\n\nwhen I receive [menu v]\nshow\ngo to [back v] layer\nswitch costume to (costume1 v)\nbroadcast (Decrypt speedrunner statistics v)\n\n@Balloon1\n\nwhen I receive [won v]\nhide\nforever\n    repeat (pick random (1) to (4))\n        create clone of (_myself_ v)\n    end\n    wait (pick random (2) to (4)) seconds\nend\n\nwhen flag clicked\nhide\nset [again v] to [0]\n\nwhen I start as a clone\nshow\nswitch costume to (pick random (1) to (3))\ngo to x: (pick random (-220) to (220)) y: (183)\nrepeat until <<(again) = [1]> or <(y position) < [-200]>>\n    change y by (-4)\nend\ndelete this clone\n\nwhen I receive [start v]\nset [again v] to [0]\n\nwhen I receive [menu v]\nset [again v] to [1]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [ripballons v]\nset [again v] to [1]\nstop [other scripts in sprite v]\nhide\n\n@Menubutton\n\nwhen flag clicked\nhide\nclear graphic effects\n\nwhen I receive [start v]\nshow\ngo to x: (205) y: (163)\nforever\n    if <touching (mouse-pointer v)?> then\n        set [ghost v] effect to (30)\n        point in direction ((90) + (([sin v] of ((timer) * (100)) ) * (6)))\n    else\n        set [ghost v] effect to (70)\n        point in direction (90)\n    end\nend\n\nwhen this sprite clicked\nbroadcast (Menu v)\nstop [other scripts in sprite v]\nhide\n\n@Shop\n\nwhen flag clicked\nhide\n\nforever\n    if <touching (mouse-pointer v)?> then\n        set [ghost v] effect to (20)\n    else\n        clear graphic effects\n    end\nend\n\nwhen this sprite clicked\nbroadcast (shop v)\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [menu v]\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        set [ghost v] effect to (20)\n    else\n        clear graphic effects\n    end\nend\n\nwhen I receive [start v]\nstop [other scripts in sprite v]\nhide\n\n@Sprite1\n\nwhen flag clicked\nset [shop v] to [0]\nset [playerskin v] to [1]\n\nwhen I receive [menu v]\nset [shop v] to [0]\nclear graphic effects\nhide\n\nwhen I receive [shop v]\nset [shop v] to [1]\nCreate clones\n\ndefine Create clones\ngo to x: (-220) y: (-100)\nswitch costume to (1 v)\nshow\nset [clone # v] to [0]\nrepeat (5)\n    change x by (80)\n    change [clone # v] by (1)\n    create clone of (_myself_ v)\n    next costume\nend\nhide\n\nwhen I start as a clone\nclear graphic effects\nswitch costume to (Clone #)\nshow\nrepeat until <(Shop) = [0]>\n    if <touching (mouse-pointer v)?> then\n        set [ghost v] effect to (30)\n    else\n        clear graphic effects\n    end\n    if <(Clone #) = (PlayerSkin)> then\n        switch costume to (join (Clone #) [b])\n    else\n        switch costume to (Clone #)\n    end\nend\ndelete this clone\n\nshow\n\nwhen this sprite clicked\nset [playerskin v] to (Clone #)\n\ngo to [front v] layer\n\n@Sprite2\n\nwhen I receive [shop v]\ngo to [back v] layer\nset [ghost v] effect to (20)\ngo [forward v] (1) layers\nshow\n\nwhen flag clicked\nclear graphic effects\nhide\n\nwhen I receive [menu v]\nhide\n\n@Exit\n\nwhen I receive [menu v]\ngo to [front v] layer\nhide\n\nwhen flag clicked\nclear graphic effects\nhide\n\nwhen I receive [shop v]\nclear graphic effects\nshow\nwait until <(Shop) = [1]>\nrepeat until <(Shop) = [0]>\n    if <touching (mouse-pointer v)?> then\n        set [ghost v] effect to (50)\n    else\n        clear graphic effects\n    end\nend\n\nwhen this sprite clicked\nbroadcast (Menu v)\n\n@thumbnail\n\nwhen flag clicked\nhide\n\nshow\ngo to [front v] layer\n\nwhen I receive [won v]\nset [lasttimer v] to (Timer)\nDecrypt (☁ Speedrunner)\ncheck if new scratcher\nif <[1] = [1]> then\n    if <(enDecrypt) > (lastTImer)> then\n        broadcast (newRecord v)\n        Encrypt (lastTImer)\n        set [☁ speedrunner v] to (encrypt)\n        Encrypt (username)\n        set [☁ speedrunner player v] to (encrypt)\n    end\nend\n\ndefine Decrypt (str)\nset [endecrypt v] to []\nset [i v] to [1]\nrepeat ([floor v] of ((length of (str)) / (2)) )\n    set [endecrypt v] to (join (enDecrypt) (item (join (letter (i) of (str)) (letter ((i) + (1)) of (str))) of [symb v]))\n    change [i v] by (2)\nend\n\ndefine Encrypt (str)\nset [encrypt v] to []\nset [i v] to [1]\nrepeat (length of (str))\n    set [encrypt v] to (join (encrypt) (item # of (letter (i) of (str)) in [symb v]))\n    change [i v] by (1)\nend\n\nEncrypt [9999]\n\nDecrypt (encrypt)\n\ndefine check if new scratcher\nset [☁ newscratcher? v] to [1]\nset [isscratcher? v] to [0]\nif <(☁ NewScratcher?) = [1]> then\n    set [isscratcher? v] to [1]\nend\nset [☁ newscratcher? v] to [0]\n\nDecrypt (☁ Speedrunner player)\n\nwhen I receive [decrypt speedrunner statistics v]\nDecrypt (☁ Speedrunner player)\nset [player decrypted v] to (join [Top speedrunner: ] (enDecrypt))\nDecrypt (☁ Speedrunner)\nset [record decrypted v] to (join (join [Worldrecord: ] (enDecrypt)) [s])\n\nEncrypt [99999]\n\nset [☁ speedrunner v] to (encrypt)\n\n@pear\n\nwhen flag clicked\nshow\ngo to [front v] layer\nreset timer\npoint in direction (90)\nclear graphic effects\nswitch costume to (costume1 v)\nset size to (100) %\nrepeat (50)\n    change size by (1)\nend\nwait (.5) seconds\nstart sound [Crunch v]\nnext costume\nrepeat (4)\n    change x by (-8)\n    change y by (8)\n    wait (.05) seconds\n    change x by (8)\n    change y by (-8)\nend\nwait (1) seconds\nbroadcast (fae v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nstop [other scripts in sprite v]\nhide\nwait (.5) seconds\nbroadcast (Menu v)\nbroadcast (intro v)\n\nwhen flag clicked\nforever\n    point in direction ((90) + (([sin v] of ((timer) * (30)) ) * (5)))\nend\n\n@Text\n\nwhen I receive [fae v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen flag clicked\nclear graphic effects\ngo to [front v] layer\nshow\n\n@speedrunner\n\nwhen I receive [menu v]\nshow\ngo to [front v] layer\nforever\n    switch costume to (hitbox v)\n    switch costume to (Speedrunner?)\nend\n\nwhen I receive [start v]\nstop [other scripts in sprite v]\nhide\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nif <(Speedrunner?) = [1]> then\n    set [speedrunner? v] to [0]\nelse\n    set [speedrunner? v] to [1]\nend\n\nwhen I receive [shop v]\nhide\n\n