Cave Platformer 3 (April Fools 2022)
@Stage\n\nwhen flag clicked\nforever\n    switch backdrop to (Level)\nend\n\nwhen flag clicked\nforever\n    play sound [738335_Canonblade---Debug.mp3 v] until done\n    set volume to (70) %\nend\n\n@Ground Display\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    switch costume to (Level)\nend\n\n@Lava\n\nwhen flag clicked\nforever\n    switch costume to (Level)\n    set y to (([sin v] of ((timer) * (100)) ) * (5))\nend\n\n@Ground Hitbox\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    switch costume to (Level)\n    set [ghost v] effect to (100)\nend\n\n@Jump Pads\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    go to [back v] layer\n    go [forward v] (1) layers\n    switch costume to (Level)\nend\n\n@Foreground\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    go to [front v] layer\n    go [backward v] (1) layers\n    switch costume to (Level)\nend\n\n@Black Fade\n\nwhen flag clicked\nset [stop v] to [0]\ngo to [front v] layer\nchange [ghost v] effect by (100)\n\nwhen I receive [level change v]\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nif <(Level) < [10]> then\n    change [level v] by (1)\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\nelse\n    set [stop v] to [1]\n    broadcast (End v)\nend\n\n@Player\n\nwhen flag clicked\nset [level v] to [1]\nset [stop v] to [0]\ngo to x: (0) y: (0)\ngo to x: (item (((Level) * (2)) - (1)) of [spawnpoints v]) y: (item ((Level) * (2)) of [spawnpoints v])\nset [jumping? v] to [1]\nset [sx v] to [0]\nset [sy v] to [0]\nforever\n    if <(Stop) = [0]> then\n        switch costume to (player hitbox v)\n        if <key (right arrow v) pressed?> then\n            change [sx v] by (1.5)\n        end\n        if <key (left arrow v) pressed?> then\n            change [sx v] by (-1.5)\n        end\n        set [sx v] to ((SX) * (0.8))\n        change x by (SX)\n        Touch X\n        change [sy v] by (-1)\n        if <<key (up arrow v) pressed?> and <<(Jumping?) = [0]> and <(SY) = [-1]>>> then\n            set [jumping? v] to [1]\n            set [sy v] to [12]\n        end\n        change y by (SY)\n        Touch Y\n        switch costume to (player round v)\n        if <touching (jump pads v)?> then\n            set [jumping? v] to [1]\n            set [sy v] to [19]\n        end\n        if <touching (lava v)?> then\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            set [sx v] to [0]\n            set [sy v] to [0]\n            set [jumping? v] to [1]\n            go to x: (item (((Level) * (2)) - (1)) of [spawnpoints v]) y: (item ((Level) * (2)) of [spawnpoints v])\n            repeat (10)\n                change [ghost v] effect by (-10)\n            end\n        end\n        if <(x position) < [-244]> then\n            set x to (-244)\n        end\n        if <(x position) > [244]> then\n            set x to (244)\n        end\n        if <(distance to [portal v]) < [40]> then\n            broadcast (Level Change v)\n            repeat (22)\n                change x by ((([x position v] of [portal v]) - (x position)) / (8))\n                change y by ((([y position v] of [portal v]) - (y position)) / (8))\n                change [ghost v] effect by (10)\n            end\n            set [jumping? v] to [1]\n            set [sx v] to [0]\n            set [sy v] to [0]\n            set [ghost v] effect to (0)\n            go to x: (item (((Level) * (2)) - (1)) of [spawnpoints v]) y: (item ((Level) * (2)) of [spawnpoints v])\n        end\n    end\n    switch costume to (player round v)\nend\n\ndefine Touch X\nif <touching (ground hitbox v)?> then\n    repeat until <not <touching (ground hitbox v)?>>\n        change x by ((0) - ((SX) / ([abs v] of (SX) )))\n    end\n    set [sx v] to [0]\nend\n\ndefine Touch Y\nif <touching (ground hitbox v)?> then\n    repeat until <not <touching (ground hitbox v)?>>\n        change y by ((0) - ((SY) / ([abs v] of (SY) )))\n    end\n    if <(SY) < [0]> then\n        set [jumping? v] to [0]\n    end\n    set [sy v] to [0]\nend\n\n@Portal\n\nwhen flag clicked\ncreate clone of (_myself_ v)\nforever\n    go to x: (item (((Level) * (2)) - (1)) of [endpoints v]) y: (item ((Level) * (2)) of [endpoints v])\n    change y by (([sin v] of ((timer) * (125)) ) * (5))\n    change x by (([sin v] of ((timer) * (50)) ) * (5))\n    turn right (1.5) degrees\n    set size to ((100) + (([sin v] of ((timer) * (150)) ) * (5))) %\nend\n\nwhen I start as a clone\nforever\n    go to x: (item (((Level) * (2)) - (1)) of [endpoints v]) y: (item ((Level) * (2)) of [endpoints v])\n    change y by (([sin v] of ((timer) * (125)) ) * (5))\n    change x by (([sin v] of ((timer) * (50)) ) * (5))\n    turn right (-2) degrees\n    set size to ((100) + (([sin v] of ((timer) * (120)) ) * (5))) %\nend\n\n@End Text\n\nwhen I receive [end v]\nshow\nrepeat (20)\n    go to [front v] layer\n    change [ghost v] effect by (-5)\nend\n\nwhen flag clicked\nhide\nset [ghost v] effect to (100)\n\n@Thumbnail\n\ngo to [front v] layer\nshow\n\nwhen flag clicked\ngo to [front v] layer\nhide\n\n