Sheep - Platformer
@Stage\n\n@Player\n\nwhen flag clicked\ngo to x: (-178) y: (70)\nhide\n\nwhen I receive [start v]\nshow variable [deaths v]\nset [deaths v] to [0]\nset [level number v] to [1]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nset [ghost v] effect to (100)\nset size to (100) %\ngo to [front v] layer\nshow\ngo [backward v] (3) layers\nwait (1) seconds\nforever\n    Move\nend\n\ndefine Move\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [x v] by (1)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [x v] by (-1)\nend\nchange x by (x)\nif <touching (level v)?> then\n    change x by ((x) * (-1))\n    set [x v] to [0]\nelse\n    set [x v] to ((x) * (0.9))\nend\nchange y by (y)\nif <touching (level v)?> then\n    change y by ((y) * (-1))\n    set [y v] to [0]\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        set [y v] to [15]\n    end\nelse\n    change [y v] by (-1)\nend\n\ngo to x: (0) y: (0)\nchange [scroll x v] by ((x position) * (-1))\nchange [scroll y v] by ((y position) * (-1))\n\nwhen I receive [start v]\nforever\n    if <(x position) > [240]> then\n        change [level number v] by (1)\n        go to x: (-239) y: (-57)\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <<touching (spike v)?> or <<touching (hole v)?> or <touching (bullets v)?>>> then\n        go to x: (-195) y: (-57)\n        change [deaths v] by (1)\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <key (r v) pressed?> then\n        go to x: (-195) y: (-57)\n        wait (2) seconds\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(level number) = [11]> then\n        if <touching (wolf v)?> then\n            go to x: (-195) y: (-57)\n            change [deaths v] by (1)\n        end\n    end\nend\n\n@Level\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (100)\nset size to (100) %\nswitch costume to (1 v)\ngo to [back v] layer\ngo [forward v] (2) layers\n\nwhen I receive [start v]\nforever\n    if <(level number) = [1]> then\n        switch costume to (1 v)\n    else\n        if <(level number) = [2]> then\n            switch costume to (2 v)\n        else\n            if <(level number) = [3]> then\n                switch costume to (3 v)\n            else\n                if <(level number) = [4]> then\n                    switch costume to (4 v)\n                else\n                    if <(level number) = [5]> then\n                        switch costume to (5 v)\n                    else\n                        if <(level number) = [6]> then\n                            switch costume to (6 v)\n                        else\n                            if <(level number) = [7]> then\n                                switch costume to (7 v)\n                            else\n                                if <(level number) = [8]> then\n                                    switch costume to (8 v)\n                                else\n                                    if <(level number) = [9]> then\n                                        switch costume to (9 v)\n                                    else\n                                        if <(level number) = [10]> then\n                                            switch costume to (10 v)\n                                        else\n                                            if <(level number) = [11]> then\n                                                switch costume to (11 v)\n                                            else\n                                                if <(level number) = [12]> then\n                                                    switch costume to (12 v)\n                                                else\n                                                    if <(level number) = [13]> then\n                                                        switch costume to (13 v)\n                                                    else\n                                                        if <(level number) = [14]> then\n                                                            switch costume to (14 v)\n                                                        else\n                                                            if <(level number) = [15]> then\n                                                                switch costume to (15 v)\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\n    end\nend\n\n@Spike\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nset size to (100) %\nswitch costume to (1 v)\ngo to [back v] layer\ngo [forward v] (1) layers\n\nwhen I receive [start v]\nforever\n    if <(level number) = [1]> then\n        hide\n    else\n        if <(level number) = [2]> then\n            hide\n        else\n            if <(level number) = [3]> then\n                hide\n            else\n                if <(level number) = [4]> then\n                    show\n                    switch costume to (1 v)\n                else\n                    if <(level number) = [5]> then\n                        show\n                        switch costume to (2 v)\n                    else\n                        if <(level number) = [6]> then\n                            show\n                            switch costume to (3 v)\n                        else\n                            if <(level number) = [7]> then\n                                show\n                                switch costume to (4 v)\n                            else\n                                if <(level number) = [8]> then\n                                    hide\n                                else\n                                    if <(level number) = [9]> then\n                                        hide\n                                    else\n                                        if <(level number) = [10]> then\n                                            show\n                                            switch costume to (5 v)\n                                        else\n                                            if <(level number) = [11]> then\n                                                hide\n                                            else\n                                                if <(level number) = [12]> then\n                                                    hide\n                                                else\n                                                    if <(level number) = [13]> then\n                                                        show\n                                                        switch costume to (6 v)\n                                                    else\n                                                        if <(level number) = [14]> then\n                                                            hide\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\n@Hole\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nshow\nset size to (100) %\nswitch costume to (1 v)\ngo to [back v] layer\n\nwhen I receive [start v]\nforever\n    if <(level number) = [1]> then\n        hide\n    else\n        if <(level number) = [2]> then\n            hide\n        else\n            if <(level number) = [3]> then\n                go to x: (19) y: (-172)\n                switch costume to (hole v)\n                show\n            else\n                if <(level number) = [4]> then\n                    hide\n                else\n                    if <(level number) = [5]> then\n                        hide\n                    else\n                        if <(level number) = [6]> then\n                            hide\n                        else\n                            if <(level number) = [7]> then\n                                hide\n                            else\n                                if <(level number) = [8]> then\n                                    show\n                                else\n                                    if <(level number) = [9]> then\n                                        show\n                                    else\n                                        if <(level number) = [10]> then\n                                            show\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\n@Sheep\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\npoint in direction (90)\nset rotation style [left-right v]\nset size to (500) %\ngo to [front v] layer\ngo [backward v] (2) layers\nshow\nforever\n    go to x: ([x position v] of [player v]) y: (([y position v] of [player v]) + (3))\nend\n\nwhen I receive [start v]\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        point in direction (90)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        point in direction (-90)\n    end\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        switch costume to (jump v)\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n        if <touching (level v)?> then\n            switch costume to (walk v)\n            wait (0.3) seconds\n            switch costume to (idle v)\n            wait (0.3) seconds\n        end\n    else\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            switch costume to (jump v)\n        end\n        if <touching (level v)?> then\n            switch costume to (idle v)\n        end\n    end\nend\n\n@Dirt\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nshow\nset size to (100) %\nswitch costume to (1 v)\ngo to [front v] layer\ngo [backward v] (10) layers\n\nwhen I receive [start v]\nforever\n    if <(level number) = [1]> then\n        switch costume to (1 v)\n    else\n        if <(level number) = [2]> then\n            switch costume to (2 v)\n        else\n            if <(level number) = [3]> then\n                switch costume to (3 v)\n            else\n                if <(level number) = [4]> then\n                    switch costume to (4 v)\n                else\n                    if <(level number) = [5]> then\n                        switch costume to (5 v)\n                    else\n                        if <(level number) = [6]> then\n                            switch costume to (6 v)\n                        else\n                            if <(level number) = [7]> then\n                                switch costume to (7 v)\n                            else\n                                if <(level number) = [8]> then\n                                    switch costume to (8 v)\n                                else\n                                    if <(level number) = [9]> then\n                                        switch costume to (9 v)\n                                    else\n                                        if <(level number) = [10]> then\n                                            switch costume to (10 v)\n                                        else\n                                            if <(level number) = [11]> then\n                                                switch costume to (11 v)\n                                            else\n                                                if <(level number) = [12]> then\n                                                    switch costume to (12 v)\n                                                else\n                                                    if <(level number) = [13]> then\n                                                        switch costume to (13 v)\n                                                    else\n                                                        if <(level number) = [14]> then\n                                                            switch costume to (14 v)\n                                                        else\n                                                            if <(level number) = [15]> then\n                                                                switch costume to (15 v)\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\n    end\nend\n\n@Sign\n\nwhen flag clicked\nset [sign thing v] to [no]\nswitch costume to (1 v)\nset size to (100) %\ngo to [front v] layer\ngo [backward v] (5) layers\ngo to x: (-86) y: (-51)\nhide\n\nwhen I receive [start v]\nshow\nforever\n    if <touching (player v)?> then\n        broadcast (Sign thing v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(level number) = [1]> then\n        show\n    end\n    if <(level number) = [2]> then\n        hide\n    end\nend\n\n@Sign text\n\nwhen flag clicked\nset [press space v] to [no]\nset [sign thing v] to [0]\nswitch costume to (1 v)\nset size to (100) %\ngo to x: (0) y: (-130)\nhide\nset [ghost v] effect to (100)\ngo to [front v] layer\ngo [backward v] (7) layers\n\nwhen I receive [sign thing v]\nforever\n    show\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    wait (2) seconds\n    switch costume to (2 v)\n    wait (3) seconds\n    switch costume to (3 v)\n    wait (3) seconds\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    set [ghost v] effect to (100)\n    hide\n    stop [this script v]\nend\n\n@Intro\n\nwhen flag clicked\nstart sound [kevin macleod a mission v]\ngo to x: (0) y: (0)\ngo to [back v] layer\nshow\n\nwhen I receive [start screen v]\nwait (3) seconds\nhide\n\n@Intro text\n\nwhen flag clicked\nhide\nwait (1) seconds\ngo to [front v] layer\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (100)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nwait (2) seconds\nbroadcast (Start screen v)\nhide\n\n@Start screen\n\nwhen flag clicked\nhide variable [deaths v]\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nswitch costume to (1 v)\ngo to [front v] layer\ngo [backward v] (4) layers\nhide\n\nwhen I receive [start screen v]\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nclear graphic effects\n\nwhen I receive [start v]\nhide\n\nwhen flag clicked\nhide\nforever\n    set [time v] to (timer)\nend\n\nwhen [timer v] > ((Time) + (0.01))\nshow\nset y to (-400)\ngo to [front v] layer\nhide variable [deaths v]\nrepeat (10)\n    set y to ((y position) / (2))\nend\nstop [other scripts in sprite v]\nstop [all v]\n\n@Start button\n\nwhen flag clicked\ngo to x: (0) y: (-130)\nset [direction v] to [0]\nset [ghost v] effect to (100)\nswitch costume to (1 v)\nset size to (100) %\ngo to [front v] layer\ngo [backward v] (3) layers\nhide\n\nwhen I receive [start screen v]\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nclear graphic effects\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (5)\n        change size by (((120) - (size)) / (5))\n        if <mouse down?> then\n            broadcast (Transition v)\n            wait (0.5) seconds\n            broadcast (Start v)\n            hide\n            stop [this script v]\n        end\n    end\n    if <not <touching (mouse-pointer v)?>> then\n        set [brightness v] effect to (0)\n        change size by (((100) - (size)) / (5))\n    end\n    change [direction v] by (7)\n    point in direction ((([sin v] of (direction) ) * (2)) + (90))\nend\n\n@Transition\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nset size to (100) %\ngo to [front v] layer\nhide\n\nwhen I receive [transition v]\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Wolf\n\nwhen I receive [start v]\nset rotation style [left-right v]\nset size to (500) %\nswitch costume to (idk v)\ngo to [back v] layer\ngo [forward v] (3) layers\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    if <(level number) = [1]> then\n        hide\n    end\n    if <(level number) = [11]> then\n        go to x: (154) y: (-66)\n        show\n        wait (1) seconds\n        repeat until <(level number) = [12]>\n            point towards (player v)\n            move (6) steps\n        end\n        hide\n    end\n    if <(level number) = [13]> then\n        show\n        switch costume to (3 v)\n        point in direction (-90)\n        go to x: (201) y: (92)\n    end\n    if <(level number) = [14]> then\n        hide\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(level number) = [11]> then\n        switch costume to (2 v)\n        wait (0.3) seconds\n        switch costume to (1 v)\n        wait (0.3) seconds\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(level number) = [11]> then\n        set y to (-66)\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(level number) = [11]> then\n        if <touching (player v)?> then\n            wait (0.01) seconds\n            go to x: (154) y: (-66)\n        end\n    end\nend\n\nset [level number v] to [2]\nset [level number v] to [13]\n\n@Sound button\n\nwhen I receive [start v]\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nclear graphic effects\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (5)\n        change size by (((120) - (size)) / (5))\n        if <(costume [number v]) = [2]> then\n            if <mouse down?> then\n                wait until <not <mouse down?>>\n                switch costume to (1 v)\n                set volume to (100) %\n            end\n        end\n        if <(costume [number v]) = [1]> then\n            if <mouse down?> then\n                wait until <not <mouse down?>>\n                switch costume to (2 v)\n                set volume to (0) %\n            end\n        end\n    end\n    if <not <touching (mouse-pointer v)?>> then\n        set [brightness v] effect to (0)\n        change size by (((100) - (size)) / (5))\n    end\n    change [direction v] by (9)\n    point in direction ((([sin v] of (direction) ) * (5)) + (90))\nend\n\nwhen flag clicked\nset [sound off v] to [no]\nset volume to (100) %\ngo to x: (-212) y: (-156)\nswitch costume to (1 v)\nset size to (100) %\ngo to [front v] layer\ngo [backward v] (8) layers\nhide\n\nwhen I receive [start v]\nstop all sounds\nforever\n    play sound [Mechanolith - Kevin MacLeod v] until done\nend\n\nset [level number v] to [13]\n\n@Bullets\n\nwhen flag clicked\nhide\ngo to [back v] layer\nset size to (100) %\ngo [forward v] (4) layers\nswitch costume to (1 v)\nhide\n\nwhen I receive [start v]\nforever\n    if <(level number) = [13]> then\n        repeat until <(level number) = [14]>\n            wait (2) seconds\n            create clone of (_myself_ v)\n        end\n    end\nend\n\nwhen I start as a clone\ngo to x: (([x position v] of [wolf v]) - (60)) y: ([y position v] of [wolf v])\nshow\nrepeat until <<touching (player v)?> or <touching (_edge_ v)?>>\n    change x by (-5)\nend\n\nwhen I start as a clone\nforever\n    if <<touching (player v)?> or <touching (_edge_ v)?>> then\n        if <(level number) = [14]> then\n            hide\n        end\n        wait (0.0001) seconds\n        hide\n        delete this clone\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(level number) = [14]> then\n        hide\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\ngo to [front v] layer\ngo [backward v] (1) layers\nshow\n\n
Oh no! All the grass has turned into DIRT!\nGet to the end to FIND THE GRASS!\n\nMove: WASD or Arrow keys