Stretch

Instructions: • Press WASD or ARROW KEYS to move\n• Press Q to expand your player\n• Press E to contract him\n• Get to trophy to complete level\n• Avoid spikes because it will kill you\n• Green is super bouncy \n• J and U to adjust volume of music\n• O to go to home screen\n

@Stage\n\nwhen flag clicked\nset [screen v] to [Title]\nset [cooldown v] to [0.7]\nset volume to (100) %\nforever\n    set volume to (Volume) %\n    if <(Screen) = [Game]> then\n        switch backdrop to (game v)\n    else\n        if <(Screen) = [Title]> then\n            switch backdrop to (title v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    set [camera shake x v] to (((Camera Shake X) * (Cooldown)) * (-1))\n    set [camera shake y v] to (((Camera Shake Y) * (Cooldown)) * (-1))\n    if <(round (Camera Shake X)) = [0]> then\n        set [camera shake x v] to [0]\n        set [camera shake y v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(Camera Shake) = [0]>> then\n        set [camera shake x v] to (Camera Shake)\n        set [camera shake y v] to (Camera Shake)\n        set [camera shake v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (u v) pressed?> then\n        change volume by (2)\n    end\n    if <key (j v) pressed?> then\n        change volume by (-2)\n    end\nend\n\nswitch backdrop to ((Level) + (1))\n\n@Player\n\ndefine Sense Y\nif <(Yv) > [0]> then\n    repeat until <<not <touching (level v)?>> and <not <touching (_edge_ v)?>>>\n        change y by (-1)\n        set [jump prevention v] to [Yes]\n    end\nend\nif <(Yv) < [0]> then\n    repeat until <<not <touching (level v)?>> and <not <touching (_edge_ v)?>>>\n        change y by (1)\n        set [jump prevention v] to [No]\n    end\nend\n\ndefine Sense X\nif <(Xv) > [0]> then\n    repeat until <<not <touching (level v)?>> and <not <touching (_edge_ v)?>>>\n        change x by (-1)\n    end\nend\nif <(Xv) < [0]> then\n    repeat until <<not <touching (level v)?>> and <not <touching (_edge_ v)?>>>\n        change x by (1)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (obstacle v)?> then\n        go to x: (-216) y: (-136)\n        switch costume to (((6) * (Outfit)) - (5))\n        start sound [Camera Shake v]\n        start sound [Hurt v]\n        broadcast (hurt v)\n        set [xv v] to [0]\n        set [yv v] to [0]\n        set [camera shake v] to [5]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (finish v)?> then\n        go to x: (-216) y: (-136)\n        if <<(Levels Completed) = (Level)> and <not <(Level) = [10]>>> then\n            change [levels completed v] by (1)\n        end\n        change [level v] by (1)\n        if <(Level) = [11]> then\n            set [screen v] to [Title]\n            if <(Avaliable) = [1]> then\n                if <(Timer) < (☁ HS)> then\n                    set [☁ hs v] to (Timer)\n                    set [timer v] to [0]\n                    set [avaliable v] to [0]\n                end\n            end\n        end\n        switch costume to (((6) * (Outfit)) - (5))\n        start sound [Win v]\n        set [xv v] to [0]\n        set [yv v] to [0]\n        set [camera shake v] to [5]\n    end\nend\n\nwhen I receive [message1 v]\nset size to (100) %\ngo to x: (-216) y: (-136)\nstart sound [Camera Shake v]\nswitch costume to (((6) * (Outfit)) - (5))\nset [xv v] to [0]\nset [yv v] to [0]\nset [camera shake v] to [5]\n\nwhen flag clicked\nforever\n    if <(Screen) = [Game]> then\n        if <(On floor?) = [Yes]> then\n            if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n                play sound [Footsteps v] until done\n            end\n            if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n                play sound [Footsteps v] until done\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Screen) = [Game]> then\n        if <key (e v) pressed?> then\n            if <(costume [number v]) > (((6) * (Outfit)) - (5))> then\n                switch costume to ((costume [number v]) - (1))\n            end\n        end\n        if <key (q v) pressed?> then\n            if <(costume [number v]) < ((6) * (Outfit))> then\n                next costume\n                if <<touching (level v)?> or <touching (_edge_ v)?>> then\n                    switch costume to ((costume [number v]) - (1))\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Screen) = [Game]> then\n        set size to (100) %\n        show\n    else\n        if <(Screen) = [Skins]> then\n            show\n            go to x: (8) y: (64)\n            change size by (((400) - (size)) / (5))\n            if <(round (((size) - (400)) * (3))) = [0]> then\n                set size to (400) %\n            end\n            if <key (e v) pressed?> then\n                if <(costume [number v]) > (((6) * (Outfit)) - (5))> then\n                    switch costume to ((costume [number v]) - (1))\n                end\n            end\n            if <key (q v) pressed?> then\n                if <(costume [number v]) < ((6) * (Outfit))> then\n                    next costume\n                end\n            end\n        else\n            set size to (400) %\n            hide\n        end\n    end\nend\n\nwhen I receive [next v]\nif <not <(Outfit) > [5]>> then\n    change [outfit v] by (1)\n    set size to (420) %\n    next costume\n    next costume\n    next costume\n    next costume\n    next costume\n    next costume\nend\n\nwhen flag clicked\nforever\n    set volume to (Volume) %\nend\n\nwhen flag clicked\nset [outfit v] to [1]\nset [bounce amount v] to [0]\nset [friction v] to [.75]\nset [gravity v] to [-1]\nset [jump height v] to [10]\nset [running speed v] to [3]\nset [bouncy stuff height v] to [40]\nset [boost jump v] to [15]\ngo to x: (-216) y: (-136)\nswitch costume to (guy v)\nset [xv v] to [0]\nset [yv v] to [0]\nhide\nforever\n    if <(Screen) = [Game]> then\n        set [on floor? v] to [No]\n        if <<(Camera Shake X) = [0]> and <(Camera Shake Y) = [0]>> then\n            if <<not <touching (level v)?>> and <not <touching (_edge_ v)?>>> then\n                change [yv v] by (Gravity)\n            end\n            change y by (Yv)\n            if <<touching (level v)?> or <touching (_edge_ v)?>> then\n                set [on floor? v] to [Yes]\n                Sense Y\n                set [xv v] to ((Xv) * (Friction))\n                set [yv v] to (((Yv) * (-1)) * (Bounce Amount))\n                if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                    if <(Jump Prevention) = [No]> then\n                        set [yv v] to (Jump Height)\n                        if <(Screen) = [Game]> then\n                            start sound [Jump v]\n                        end\n                    end\n                end\n            end\n            if <touching (bouncy stuff v)?> then\n                set [yv v] to (Boost Jump)\n                start sound [Bouncy Stuff v]\n            end\n            if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n                change [xv v] by ((Running Speed) * (-1))\n            end\n            if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n                change [xv v] by (Running Speed)\n            end\n            set [xv v] to ((Xv) * (Friction))\n            change x by (Xv)\n            if <<touching (level v)?> or <touching (_edge_ v)?>> then\n                Sense X\n                set [xv v] to (((Xv) * (-1)) * (Wall Bounce))\n            end\n        else\n            go to x: ((-216) + (Camera Shake X)) y: ((-136) + (Camera Shake Y))\n            set [xv v] to [0]\n            set [yv v] to [0]\n            if <touching (level v)?> then\n                go to x: (-216) y: (-136)\n            end\n        end\n    end\nend\n\nwhen I receive [previous v]\nif <not <(Outfit) < [2]>> then\n    change [outfit v] by (-1)\n    set size to (420) %\n    switch costume to ((costume [number v]) - (6))\nend\n\n@Level\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nforever\n    go to x: ((0) + (Camera Shake X)) y: ((0) + (Camera Shake Y))\nend\n\nwhen flag clicked\nforever\n    if <(Screen) = [Game]> then\n        show\n    else\n        hide\n    end\nend\n\n@Obstacle\n\nwhen flag clicked\nswitch costume to (bad stuff v)\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nforever\n    go to x: ((0) + (Camera Shake X)) y: ((0) + (Camera Shake Y))\nend\n\nwhen flag clicked\nforever\n    if <(Screen) = [Game]> then\n        show\n    else\n        hide\n    end\nend\n\n@Finish\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nforever\n    go to x: ((0) + (Camera Shake X)) y: ((Float) + (Camera Shake Y))\nend\n\nwhen flag clicked\nforever\n    set [float v] to [-4]\n    wait (0.2) seconds\n    set [float v] to [0]\n    wait (0.2) seconds\n    set [float v] to [4]\n    wait (0.2) seconds\n    set [float v] to [0]\n    wait (0.2) seconds\nend\n\nwhen flag clicked\nforever\n    if <(Screen) = [Game]> then\n        show\n    else\n        hide\n    end\nend\n\n@Title\n\nwhen flag clicked\nforever\n    go to x: (0) y: (8)\n    if <(Screen) = [Title]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((102) - (size)) / (5))\n    else\n        set [brightness v] effect to (10)\n        change size by (((100) - (size)) / (5))\n        if <(round (((size) - (100)) * (3))) = [0]> then\n            set size to (100) %\n        end\n    end\nend\n\n@Play\n\nwhen flag clicked\nforever\n    if <(Screen) = [Title]> then\n        show\n        if <touching (mouse-pointer v)?> then\n            switch costume to (selected v)\n            set [brightness v] effect to (30)\n            change size by (((120) - (size)) / (3))\n            if <mouse down?> then\n                if <(Screen) = [Title]> then\n                    set [level v] to [1]\n                    set [screen v] to [Game]\n                    set [timer v] to [0]\n                    broadcast (message1 v)\n                end\n            end\n        else\n            clear graphic effects\n            switch costume to (normal v)\n            change size by (((100) - (size)) / (3))\n            if <(round (((size) - (100)) * (3))) = [0]> then\n                set size to (100) %\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    go to x: (0) y: (0)\nend\n\nwhen flag clicked\nforever\n    if <(Screen) = [Game]> then\n        wait (1) seconds\n        change [timer v] by (1)\n    end\nend\n\n@Bouncy Stuff\n\nwhen flag clicked\nswitch costume to (bad stuff v)\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nforever\n    go to x: ((0) + (Camera Shake X)) y: ((0) + (Camera Shake Y))\nend\n\nwhen flag clicked\nforever\n    if <(Screen) = [Game]> then\n        show\n    else\n        hide\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\nhide\n\nset [☁ hs v] to [1000]\n\nshow\ngo to x: (0) y: (0)\ngo to [front v] layer\nset [levels completed v] to [1]\nset [avaliable v] to [1]\n\n@Skins\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (selected v)\n        set [brightness v] effect to (30)\n        change size by (((120) - (size)) / (3))\n        if <mouse down?> then\n            if <(Screen) = [Title]> then\n                set [screen v] to [Skins]\n                wait until <not <mouse down?>>\n                set [levels is stupid v] to [1]\n            end\n        end\n    else\n        clear graphic effects\n        switch costume to (normal v)\n        change size by (((100) - (size)) / (3))\n        if <(round (((size) - (100)) * (3))) = [0]> then\n            set size to (100) %\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Screen) = [Title]> then\n        go to x: (0) y: (-44)\n        show\n    else\n        hide\n    end\nend\n\n@Back To Home\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    if <(Screen) = [Skins]> then\n        go to x: (0) y: (-108)\n        show\n    else\n        if <(Screen) = [Levels]> then\n            go to x: (0) y: (-108)\n            show\n        else\n            hide\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (selected v)\n        set [brightness v] effect to (30)\n        change size by (((120) - (size)) / (3))\n        if <mouse down?> then\n            if <(Levels is stupid) = [1]> then\n                set [screen v] to [Title]\n                wait until <not <mouse down?>>\n                set [levels is stupid v] to [0]\n            end\n        end\n    else\n        clear graphic effects\n        switch costume to (normal v)\n        change size by (((100) - (size)) / (3))\n        if <(round (((size) - (100)) * (3))) = [0]> then\n            set size to (100) %\n        end\n    end\n    if <key (o v) pressed?> then\n        set [screen v] to [Title]\n    end\nend\n\n@Right\n\nwhen flag clicked\nforever\n    go to x: (64) y: (-16)\n    if <touching (mouse-pointer v)?> then\n        switch costume to (selected v)\n        set [brightness v] effect to (30)\n        change size by (((120) - (size)) / (3))\n        if <mouse down?> then\n            broadcast (Next v)\n            wait until <not <mouse down?>>\n        end\n    else\n        clear graphic effects\n        switch costume to (normal v)\n        change size by (((100) - (size)) / (3))\n        if <(round (((size) - (100)) * (3))) = [0]> then\n            set size to (100) %\n        end\n    end\nend\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    if <(Screen) = [Skins]> then\n        show\n    else\n        hide\n    end\nend\n\n@Left\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    if <(Screen) = [Skins]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    go to x: (-68) y: (-16)\n    if <touching (mouse-pointer v)?> then\n        switch costume to (selected v)\n        set [brightness v] effect to (30)\n        change size by (((120) - (size)) / (3))\n        if <mouse down?> then\n            broadcast (Previous v)\n            wait until <not <mouse down?>>\n        end\n    else\n        clear graphic effects\n        switch costume to (normal v)\n        change size by (((100) - (size)) / (3))\n        if <(round (((size) - (100)) * (3))) = [0]> then\n            set size to (100) %\n        end\n    end\nend\n\n@Levels\n\nwhen flag clicked\nset [level v] to [1]\nset [levels is stupid v] to [0]\nforever\n    go to x: (0) y: (-88)\n    if <touching (mouse-pointer v)?> then\n        switch costume to (selected v)\n        set [brightness v] effect to (30)\n        change size by (((120) - (size)) / (3))\n        if <mouse down?> then\n            if <(Screen) = [Title]> then\n                if <(Levels is stupid) = [0]> then\n                    set [screen v] to [Levels]\n                    wait until <not <mouse down?>>\n                    set [levels is stupid v] to [1]\n                end\n            end\n        end\n    else\n        clear graphic effects\n        switch costume to (normal v)\n        change size by (((100) - (size)) / (3))\n        if <(round (((size) - (100)) * (3))) = [0]> then\n            set size to (100) %\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Screen) = [Title]> then\n        show\n    else\n        hide\n    end\nend\n\n@Level Icons\n\nwhen flag clicked\nhide\nset [levels huh? v] to [1]\nset [level v] to [1]\nforever\n    if <(Screen) = [Levels]> then\n        if <(Levels Huh?) = [1]> then\n            Create Levels\n            set [levels huh? v] to [0]\n        end\n    else\n        set [levels huh? v] to [1]\n    end\nend\n\ndefine Create Levels\nshow\nset [level for clone v] to [0]\ngo to x: (-124) y: (116)\nrepeat (4)\n    repeat (6)\n        change [level for clone v] by (1)\n        create clone of (_myself_ v)\n        change x by (48)\n    end\n    change y by (-48)\n    set x to (-124)\nend\nhide\n\nwhen I start as a clone\nforever\n    if <<(Level For Clone) < (Levels Completed)> or <(Level For Clone) = (Levels Completed)>> then\n        switch costume to ((Level For Clone) + (1))\n        set [ghost v] effect to (0)\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            set [level v] to (Level For Clone)\n            set [screen v] to [Game]\n            broadcast (message1 v)\n        end\n    else\n        if <(Level For Clone) > [10]> then\n            switch costume to (not done yet v)\n            set [ghost v] effect to (50)\n        else\n            switch costume to (lock v)\n            set [ghost v] effect to (50)\n        end\n    end\n    if <touching (mouse-pointer v)?> then\n        switch costume to (selected v)\n        set [brightness v] effect to (30)\n        change size by (((120) - (size)) / (3))\n    else\n        set [brightness v] effect to (0)\n        switch costume to (normal v)\n        change size by (((100) - (size)) / (3))\n        if <(round (((size) - (100)) * (3))) = [0]> then\n            set size to (100) %\n        end\n    end\n    if <not <(Screen) = [Levels]>> then\n        delete this clone\n    end\nend\n\nset [levels completed v] to [24]\n\n@Instructions\n\nwhen flag clicked\nforever\n    if <(Screen) = [Game]> then\n        if <(Level) = [1]> then\n            show\n            switch costume to (stretch v)\n            go to [front v] layer\n            set [ghost v] effect to (80)\n        else\n            if <(Level) = [2]> then\n                switch costume to (watch out v)\n                show\n                go to [front v] layer\n                set [ghost v] effect to (80)\n            else\n                if <(Level) = [4]> then\n                    switch costume to (bouncy v)\n                    show\n                    go to [front v] layer\n                    set [ghost v] effect to (80)\n                else\n                    hide\n                end\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    go to x: (0) y: (152)\n    wait (0.1) seconds\n    go to x: (0) y: (148)\n    wait (0.1) seconds\n    go to x: (0) y: (152)\n    wait (0.1) seconds\n    go to x: (0) y: (156)\n    wait (0.1) seconds\nend\n\n