Spiderweb - A Platformer

Instructions: **CURATED Tues afternoon, March 10th, and most of Wed, March 11th, 2020. Thank you @LegoLover2018**\n\nDISCLAIMER: You aren't actually a fly, it's supposed to be like a metaphor, showing how trapped you are.\n\n*Warning:* this is a little bit scary for younger children...\nPLEASE READ:\nDouble-click green flag PLEASE! Or nothing will work right, and the thing below will happen. ------v\nIf a screen comes up saying, "There is no escape," at the beginning of the game, then please RESTART the game! It is supposed to come at the end. \nThank you!\nArrow keys to move the ball. The text is someone speaking to you.\nFull screen for better graphics.\nFollow the story, I spent a long time on it.\nAll levels are possible.\nTIP: If you can't get past a level, look for any yellow bits... they make you smaller, and that can help!\nIf you are having a lot of trouble getting past a level, just click see inside and move yourself... but only if you are having a lot of trouble.\n\nHope you enjoy!\n\nSTORY: In case you forgot to read them\n1: *gasps* A new visitor! We rarely ever get one of those...\n2: If you're wondering what I'm talking about... you don't want to know.\n3: You should just focus on getting out of here. Before it's too late. Don't worry, I'll help you, but we need to move quickly.\n4: Make sure to avoid gray. It's your enemy.\n5: Uh oh! This might not end well... Come on, hurry! Please!\n6: If he finds you... I'll have failed again.\n7: Green is bouncy... and yellow makes you smaller. Jump up here!\n8: Oh no... we're running out of time! Please hurry!\n9: You don't want to be stuck here... trust me!\n10: Every time someone else gets trapped...\n11: I just feel so bad when... It just doesn't...\n12: It just doesn't work. No matter how hard I try.\n13: I just can't get them out. They are lost forever.\n14: I don't - Oh no! Be careful... I think he knows you're here!\n15: That trap... it's scary. This is really bad.\n16: I thought this time it would work! I really did!\n17: You need to get out of here NOW!\n18: I've tried to protect you for so long...\n19: But sometimes, things don't happen the way you want them to.\n20: Sometimes, we have to look for illusions...\n21: Sometimes, we will fall to our deaths.\n22: This time, I thought it would be different.\n23: But every time, the same thing happens.\n24: I've watched this over and over.\n25: I tried to help you... but history has a way of repeating itself.\n26: He's found you. And now there's nothing I can do.\n27: There is no escape.\nBLACK SCREEN: \nThere is no escape. \nDon't you see? He has found you. You will never see the light again. History repeats itself. This has happened before. It's time to let go. Time to hand you over. To HIM. You are a fly. A fly caught in a his web. I'm sorry. There is no escape.

@Stage\n\nwhen flag clicked\nforever\n    play sound [Paradox's theme v] until done\nend\n\nwhen flag clicked\nforever\n    if <([costume # v] of [ground v]) = [27]> then\n        show variable [deaths: v]\n    else\n        show variable [deaths: v]\n    end\nend\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nforever\n    wait (0.1) seconds\n    change [color v] effect by (5)\nend\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (-46) y: (8)\ngo to [front v] layer\nhide\nforever\n    if <not <([costume # v] of [ground v]) = [27]>> then\n        hide\n    end\n    if <([costume # v] of [ground v]) = [27]> then\n        wait (10) seconds\n        broadcast (message2 v)\n        stop [this script v]\n    end\nend\n\n@Platformer code 1\n\ndefine platform physics (jump height) (gravity) (friction) (movement speed) (wall jump vm) (wall jump hm)\nchange y by (y vel)\nif <touching (ground v)?> then\n    repeat ([abs v] of (y vel) )\n        if <touching (ground v)?> then\n            change y by ((-1) * (([abs v] of (y vel) ) / (y vel)))\n        end\n    end\n    if <<key (up arrow v) pressed?> and <not <(y vel) > [0]>>> then\n        set [y vel v] to (jump height)\n    else\n        set [y vel v] to [0]\n    end\nelse\n    change [y vel v] by (gravity)\nend\nif <key (right arrow v) pressed?> then\n    change [x vel v] by (movement speed)\nend\nif <key (left arrow v) pressed?> then\n    change [x vel v] by ((-1) * (movement speed))\nend\nchange x by (x vel)\nif <touching (ground v)?> then\n    set [old y v] to (y position)\n    repeat (([abs v] of (x vel) ) + (1))\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n    end\n    if <touching (ground v)?> then\n        set y to (old y)\n        repeat ([ceiling v] of ([abs v] of (x vel) ) )\n            if <touching (ground v)?> then\n                change x by ((-1) * (([abs v] of (x vel) ) / (x vel)))\n            end\n        end\n        if <key (up arrow v) pressed?> then\n            if <(x vel) < [0]> then\n                set [x vel v] to [0]\n                if <key (left arrow v) pressed?> then\n                    set [x vel v] to (wall jump hm)\n                    set [y vel v] to (wall jump vm)\n                end\n            else\n                set [x vel v] to [0]\n                if <key (right arrow v) pressed?> then\n                    set [x vel v] to ((-1) * (wall jump hm))\n                    set [y vel v] to (wall jump vm)\n                end\n            end\n        end\n    end\nend\nset [x vel v] to ((x vel) * (friction))\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to x: (-191) y: (-20)\nshow\nset [y vel v] to [0]\nset [x vel v] to [0]\nforever\n    platform physics (12) (-1) (0.9) (1) (12) (12)\nend\n\nwhen flag clicked\nforever\n    if <touching (_edge_ v)?> then\n        broadcast (message1 v)\n        go to x: (-191) y: (-20)\n        switch costume to (costume1 v)\n    end\n    if <touching (spikes v)?> then\n        change [deaths: v] by (1)\n        go to x: (-191) y: (-20)\n        switch costume to (costume1 v)\n    end\n    if <touching (bounce v)?> then\n        repeat (10)\n            change y by (10)\n        end\n    end\n    if <touching (small v)?> then\n        switch costume to (costume2 v)\n    end\n    if <touching (trap v)?> then\n        change [deaths: v] by (1)\n        go to x: (-191) y: (-20)\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [message3 v]\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen flag clicked\nset [deaths: v] to [0]\n\n@ground\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [message1 v]\nnext costume\n\n@Spikes\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    if <([costume # v] of [ground v]) = [4]> then\n        show\n        switch costume to (costume1 v)\n    else\n        hide\n        if <([costume # v] of [ground v]) = [5]> then\n            show\n            switch costume to (costume2 v)\n        else\n            hide\n            if <([costume # v] of [ground v]) = [6]> then\n                show\n                switch costume to (costume3 v)\n            else\n                hide\n                if <([costume # v] of [ground v]) = [8]> then\n                    show\n                    switch costume to (costume4 v)\n                else\n                    hide\n                    if <([costume # v] of [ground v]) = [9]> then\n                        show\n                        switch costume to (costume5 v)\n                    else\n                        hide\n                        if <([costume # v] of [ground v]) = [10]> then\n                            show\n                            switch costume to (costume6 v)\n                        else\n                            hide\n                            if <([costume # v] of [ground v]) = [11]> then\n                                show\n                                switch costume to (costume7 v)\n                            else\n                                hide\n                                if <([costume # v] of [ground v]) = [12]> then\n                                    show\n                                    switch costume to (costume8 v)\n                                else\n                                    hide\n                                    if <([costume # v] of [ground v]) = [13]> then\n                                        show\n                                        switch costume to (costume9 v)\n                                    else\n                                        hide\n                                        if <([costume # v] of [ground v]) = [15]> then\n                                            show\n                                            switch costume to (costume10 v)\n                                        else\n                                            hide\n                                            if <([costume # v] of [ground v]) = [16]> then\n                                                show\n                                                switch costume to (costume11 v)\n                                            else\n                                                hide\n                                                if <([costume # v] of [ground v]) = [17]> then\n                                                    show\n                                                    switch costume to (costume12 v)\n                                                else\n                                                    hide\n                                                    if <([costume # v] of [ground v]) = [18]> then\n                                                        show\n                                                        switch costume to (costume13 v)\n                                                    else\n                                                        hide\n                                                        if <([costume # v] of [ground v]) = [19]> then\n                                                            show\n                                                            switch costume to (costume14 v)\n                                                        else\n                                                            hide\n                                                            if <([costume # v] of [ground v]) = [21]> then\n                                                                show\n                                                                switch costume to (costume15 v)\n                                                            else\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\n    end\nend\n\n@Bounce\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\nforever\n    if <([costume # v] of [ground v]) = [7]> then\n        show\n        go to x: (37) y: (-41)\n    else\n        hide\n        if <([costume # v] of [ground v]) = [8]> then\n            show\n            go to x: (37) y: (-41)\n        else\n            hide\n            if <([costume # v] of [ground v]) = [11]> then\n                go to x: (36) y: (28)\n                switch costume to (costume2 v)\n                show\n            else\n                hide\n                if <([costume # v] of [ground v]) = [23]> then\n                    go to [back v] layer\n                    go to x: (92) y: (-29)\n                    switch costume to (costume1 v)\n                    show\n                else\n                    hide\n                    if <([costume # v] of [ground v]) = [25]> then\n                        go to [back v] layer\n                        go to x: (92) y: (-29)\n                        switch costume to (costume3 v)\n                        show\n                    else\n                        hide\n                    end\n                end\n            end\n        end\n    end\nend\n\n@small\n\nwhen flag clicked\ngo to [back v] layer\nswitch costume to (costume1 v)\nhide\nforever\n    if <([costume # v] of [ground v]) = [7]> then\n        show\n        switch costume to (costume1 v)\n        go to x: (36) y: (28)\n    else\n        hide\n        if <([costume # v] of [ground v]) = [8]> then\n            show\n            switch costume to (costume2 v)\n            go to x: (453) y: (27)\n        else\n            hide\n            if <([costume # v] of [ground v]) = [11]> then\n                go to x: (1) y: (-11)\n                switch costume to (costume3 v)\n                show\n            else\n                hide\n                if <([costume # v] of [ground v]) = [16]> then\n                    go to x: (1) y: (-11)\n                    switch costume to (costume4 v)\n                    show\n                else\n                    hide\n                    if <([costume # v] of [ground v]) = [17]> then\n                        go to x: (1) y: (-11)\n                        switch costume to (costume5 v)\n                        show\n                    else\n                        hide\n                        if <([costume # v] of [ground v]) = [19]> then\n                            go to x: (1) y: (-11)\n                            switch costume to (costume6 v)\n                            show\n                        else\n                            hide\n                            if <([costume # v] of [ground v]) = [23]> then\n                                go to x: (1) y: (-11)\n                                switch costume to (costume7 v)\n                                show\n                            else\n                                hide\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\n@Trap\n\nwhen flag clicked\nforever\n    if <([costume # v] of [ground v]) = [14]> then\n        go to x: (37) y: (27)\n        show\n        switch costume to (costume1 v)\n        repeat until <not <([costume # v] of [ground v]) = [14]>>\n            repeat (10)\n                if <not <([costume # v] of [ground v]) = [14]>> then\n                    hide\n                end\n                wait (0.001) seconds\n                next costume\n            end\n            if <not <([costume # v] of [ground v]) = [14]>> then\n                hide\n            end\n            wait (1) seconds\n            if <not <([costume # v] of [ground v]) = [14]>> then\n                hide\n            end\n            repeat (10)\n                if <not <([costume # v] of [ground v]) = [14]>> then\n                    hide\n                end\n                wait (0.001) seconds\n                next costume\n            end\n            if <not <([costume # v] of [ground v]) = [14]>> then\n                hide\n            end\n            wait (1) seconds\n            if <not <([costume # v] of [ground v]) = [14]>> then\n                hide\n            end\n            switch costume to (costume1 v)\n        end\n    else\n        hide\n        if <([costume # v] of [ground v]) = [21]> then\n            go to x: (364) y: (16)\n            show\n            switch costume to (costume1 v)\n            repeat until <not <([costume # v] of [ground v]) = [21]>>\n                repeat (10)\n                    if <not <([costume # v] of [ground v]) = [21]>> then\n                        hide\n                    end\n                    wait (0.001) seconds\n                    next costume\n                end\n                if <not <([costume # v] of [ground v]) = [21]>> then\n                    hide\n                end\n                wait (0.75) seconds\n                if <not <([costume # v] of [ground v]) = [21]>> then\n                    hide\n                end\n                repeat (10)\n                    if <not <([costume # v] of [ground v]) = [21]>> then\n                        hide\n                    end\n                    wait (0.001) seconds\n                    next costume\n                end\n                if <not <([costume # v] of [ground v]) = [21]>> then\n                    hide\n                end\n                wait (1) seconds\n                if <not <([costume # v] of [ground v]) = [21]>> then\n                    hide\n                end\n                switch costume to (costume1 v)\n            end\n        else\n            hide\n        end\n    end\nend\n\n@False\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\nforever\n    if <([costume # v] of [ground v]) = [20]> then\n        switch costume to (costume1 v)\n        show\n        go to x: (94) y: (27)\n    else\n        hide\n    end\nend\n\n@End\n\nwhen I receive [message2 v]\ngo to [front v] layer\nshow\nswitch costume to (costume2 v)\nset size to (100) %\nwait (5) seconds\nswitch costume to (costume3 v)\nwait (5) seconds\nswitch costume to (costume4 v)\nwait (5) seconds\nswitch costume to (costume5 v)\nwait (5) seconds\nswitch costume to (costume6 v)\nwait (5) seconds\nswitch costume to (costume7 v)\nwait (5) seconds\nswitch costume to (costume8 v)\nwait (5) seconds\nswitch costume to (costume9 v)\nwait (5) seconds\nswitch costume to (costume10 v)\nwait (5) seconds\nswitch costume to (costume11 v)\nwait (5) seconds\nswitch costume to (screenshot 2019-12-22 at 2 v)\nbroadcast (message3 v)\nhide\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\n@Sprite17\n\nwhen flag clicked\nhide\nset [ghost v] effect to (100)\n\nwhen I receive [message3 v]\nshow\ngo to x: (0) y: (-1)\nforever\n    repeat (5)\n        change [ghost v] effect by (-20)\n    end\n    repeat (5)\n        change [ghost v] effect by (20)\n    end\n    wait (3) seconds\nend\n\n@Sprite2\n\nwhen flag clicked\nhide\ngo to x: (4) y: (1)\n\nwhen I receive [message3 v]\nshow\nforever\n    play sound [Thunder & Lightn v] until done\nend\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen I receive [message2 v]\nwait (10) seconds\nset [brightness v] effect to (0)\ngo to [front v] layer\nshow\nforever\n    go to x: (36) y: (28)\n    repeat (5)\n        change [ghost v] effect by (-20)\n    end\n    repeat (5)\n        change [ghost v] effect by (20)\n    end\n    wait (3) seconds\nend\n\n