☁️ Sky - A Platformer Game ☁️
@Stage\n\n@Player\n\nwhen I receive [play v]\nshow\nset [y vel v] to [0]\nset [x vel v] to [0]\ngo to x: (-193) y: (119)\nset size to (75) %\nforever\n    Platform Physics (1) (10) (0.9)\n    go to [front v] layer\nend\n\nwhen flag clicked\nhide\nforever\n    reset timer\nend\n\ndefine None\nset size to (51) %\nset rotation style [don't rotate v]\nif on edge, bounce\nchange [y vel v] by (-0.5)\nif <key (left arrow v) pressed?> then\n    change [x vel v] by ((speed) * (-1))\n    switch costume to (costume3 v)\nend\nif <key (right arrow v) pressed?> then\n    change [x vel v] by (speed)\n    switch costume to (costume2 v)\nend\nset [x vel v] to ((X Vel) * (glide))\nchange x by (X Vel)\nif <(x position) > [210]> then\n    go to x: (-193) y: (110)\n    change [level v] by (1)\nend\nif <touching (_edge_ v)?> then\n    change x by (([abs v] of (X Vel) ) * (-1))\nend\nif <touching color (#e5e5e5)?> then\n    repeat (50)\n        change [ghost v] effect by (2)\n    end\n    go to x: (-193) y: (119)\n    repeat (50)\n        change [ghost v] effect by (-2)\n    end\nend\nif <touching color (#003fff)?> then\n    set [y vel v] to ((jump height) * (1.7))\nend\nif <touching color (#ffffff)?> then\n    change y by (1)\n    if <touching color (#ffffff)?> then\n        change y by (1)\n        if <touching color (#ffffff)?> then\n            change y by (1)\n            if <touching color (#ffffff)?> then\n                change y by (1)\n                if <touching color (#ffffff)?> then\n                    change y by (1)\n                    if <touching color (#ffffff)?> then\n                        change y by (1)\n                        if <touching color (#ffffff)?> then\n                            change y by (-6)\n                            change x by ((X Vel) * (-2))\n                            if <key (up arrow v) pressed?> then\n                                set [y vel v] to [10]\n                                if <(Y Vel) > [0]> then\n                                    set [x vel v] to [-10]\n                                else\n                                    set [x vel v] to [10]\n                                end\n                            else\n                                set [x vel v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange y by (Y Vel)\nif <touching color (#ffffff)?> then\n    change y by ((Y Vel) * (-1))\n    set [y vel v] to [0]\nend\nchange y by (-0.5)\nif <<touching color (#ffffff)?> and <key (up arrow v) pressed?>> then\n    set [y vel v] to (jump height)\nend\nchange y by (0.5)\n\n@Platform\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [play v]\nshow\n\n@Menu\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\ngo [backward v] (4) layers\n\nwhen I receive [play v]\nhide\n\n@Play Button\n\nwhen flag clicked\nreset timer\nshow\nreset timer\nset size to (50) %\nforever\n    if <touching (mouse-pointer v)?> then\n        repeat until <(size) = [60]>\n            change size by (1)\n        end\n        if <mouse down?> then\n            broadcast (Play v)\n            hide\n        end\n    else\n        repeat until <(size) = [50]>\n            change size by (-1)\n        end\n    end\nend\n\nwhen I receive [instructions v]\nhide\nwait until <mouse down?>\nshow\n\n@Instructions Button\n\nwhen flag clicked\nshow\nset size to (50) %\nforever\n    if <touching (mouse-pointer v)?> then\n        repeat until <(size) = [60]>\n            change size by (1)\n        end\n        if <mouse down?> then\n            broadcast (Instructions v)\n        end\n    else\n        repeat until <(size) = [50]>\n            change size by (-1)\n        end\n    end\nend\n\nwhen I receive [play v]\nhide\n\n@Instruction\n\nwhen I receive [instructions v]\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait until <not <mouse down?>>\nwait until <mouse down?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen flag clicked\nhide\n\n@Mute Button\n\nwhen flag clicked\nshow\ngo to x: (210) y: (-150)\nswitch costume to (sound v)\nset volume to (100) %\nforever\n    play sound [Alan W. - Tired Ft. Gavin James v] until done\nend\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    switch costume to (sound \(muted\) v)\n    set [brightness v] effect to (-40)\n    repeat (10)\n        change volume by (-10)\n    end\nelse\n    switch costume to (sound v)\n    set [brightness v] effect to (0)\n    repeat (10)\n        change volume by (10)\n    end\nend\n\n@Clouds\n\nwhen I start as a clone\nshow\nset y to (pick random (0) to (150))\nset x to (230)\nrepeat (460)\n    change x by (-1)\nend\ndelete this clone\n\nwhen I receive [play v]\nforever\n    hide\n    wait (pick random (5) to (9)) seconds\n    create clone of (_myself_ v)\nend\n\n@Title\n\nwhen flag clicked\ngo to x: (0) y: (50)\npoint in direction (90)\nshow\nset size to (150) %\nset rotation style [don't rotate v]\nforever\n    change [y v] by (6)\n    change y by ([sin v] of (Y) )\n    change x by (([sin v] of (Y) ) * (2))\n    change y by ([sin v] of (Y) )\nend\n\nwhen I receive [play v]\nhide\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nclear graphic effects\nwait (1) seconds\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nforever\n    reset timer\nend\n\nwhen [timer v] > (0.3)\ngo to x: (0) y: (-180)\nshow\ngo to [front v] layer\nrepeat until <(y position) > [-1]>\n    change y by ((y position) / (-4))\nend\n\n@Intro\n\n
\n