Licky cat platformer
@Stage\n\n@Player\n\ndefine Up/Down Movement (jump height) (fall speed)\nchange y by (yVelocity)\nif <touching (level v)?> then\n    repeat ([ceiling v] of ([abs v] of (yVelocity) ) )\n        if <touching (level v)?> then\n            change y by (((yVelocity) / ([abs v] of (yVelocity) )) * (-1))\n        end\n    end\n    if <<not <(yVelocity) > [0]>> and <key (up arrow v) pressed?>> then\n        set [yvelocity v] to (jump height)\n    else\n        set [yvelocity v] to [0]\n    end\nelse\n    change [yvelocity v] by (fall speed)\nend\n\ndefine Right/Left Movement (move speed) (drag)\n\nwhen flag clicked\nshow\nset size to (20) %\ngo to x: (-192) y: (-100)\nset [yvelocity v] to [0]\nset [xvelocity v] to [0]\nforever\n    switch costume to (hitbox v)\n    Right/Left Movement [18] [-1]\n    Up/Down Movement [10] [0.6]\n    switch costume to (66459574_60x60 v)\nend\n\nwhen I receive [makeplayerfollowhitbox v]\ngo to (hitbox v)\n\nchange x by (xVelocity)\nif <touching (level v)?> then\n    repeat ([ceiling v] of ([abs v] of (xVelocity) ) )\n        if <touching (level v)?> then\n            change x by (((xVelocity) / ([abs v] of (xVelocity) )) * (-1))\n        end\n    end\n    set [xvelocity v] to [0]\nend\nif <key (right arrow v) pressed?> then\n    set [xvelocity v] to (move speed)\nelse\n    if <key (left arrow v) pressed?> then\n        set [xvelocity v] to ((move speed) * (-1))\n    end\nend\nset [xvelocity v] to ((xVelocity) * (drag))\n\nwhen flag clicked\nswitch costume to (66459574_60x60 v)\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    play sound [Xylo3 v] until done\nend\n\nwhen flag clicked\nif <touching color (#79d8ff)?> then\n    go to x: (SpawnX) y: (SpawnY)\nend\n\n@Hitbox\n\nwhen flag clicked\nswitch costume to (66459574_60x60 v)\nforever\n    wait (0.05) seconds\n    next costume\nend\n\nwhen flag clicked\nshow\nset size to (20) %\nset [spawnx v] to [-206]\nset [spawny v] to [-100]\ngo to x: (SpawnX) y: (SpawnY)\nset [yvelocity v] to [0]\nset [xvelocity v] to [0]\nset [ghost v] effect to (100)\nforever\n    broadcast (MakePlayerFollowHitbox v)\n    Up/Down Movement [18] [-1]\n    Right/Left Movement [10] [0.6]\n    CheckNextLevel\nend\n\ndefine Up/Down Movement (jump height) (fall speed)\nchange y by (yVelocity)\nif <touching (level v)?> then\n    CheckTouchingLava\n    repeat ([ceiling v] of ([abs v] of (yVelocity) ) )\n        if <touching (level v)?> then\n            change y by (((yVelocity) / ([abs v] of (yVelocity) )) * (-1))\n        end\n    end\n    if <<not <(yVelocity) > [0]>> and <key (up arrow v) pressed?>> then\n        set [yvelocity v] to (jump height)\n    else\n        set [yvelocity v] to <<key (up arrow v) pressed?> or <<mouse down?> and <(y position) < (mouse y)>>>\n    end\nelse\n    change [yvelocity v] by (fall speed)\nend\n\ndefine Right/Left Movement (move speed) (drag)\nchange x by (xVelocity)\nif <touching (level v)?> then\n    CheckTouchingLava\n    repeat ([ceiling v] of ([abs v] of (xVelocity) ) )\n        if <touching (level v)?> then\n            change x by (((xVelocity) / ([abs v] of (xVelocity) )) * (-1))\n        end\n    end\n    set [xvelocity v] to [0]\nend\nif <<key (right arrow v) pressed?> or <<mouse down?> and <(x position) < (mouse x)>>> then\n    set [xvelocity v] to (move speed)\nelse\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(x position) < (mouse x)>>> then\n        set [xvelocity v] to ((move speed) * (-1))\n    end\nend\nset [xvelocity v] to ((xVelocity) * (drag))\n\ndefine CheckNextLevel\nif <(x position) > [230]> then\n    broadcast (Next Level v)\n    go to x: (SpawnX) y: (SpawnY)\nend\n\ndefine CheckTouchingLava\nif <touching color (#79d8ff)?> then\n    go to x: (SpawnX) y: (SpawnY)\nend\n\nUp/Down Movement [18] [-1]\n\nwhen flag clicked\nforever\n    if <mouse down?> then\n        point towards (mouse-pointer v)\n        move ((distance to [mouse-pointer v]) / (4)) steps\n    end\nend\n\nwhen flag clicked\ngo to [back v] layer\n\nwhen flag clicked\nif <touching color (#79d8ff)?> then\n    go to x: (SpawnX) y: (SpawnY)\nend\n\nwhen flag clicked\nif <color (#000000) is touching (#79d8ff)?> then\n    go to x: (SpawnX) y: (SpawnY)\nend\n\n@Level\n\nwhen flag clicked\nset [level v] to [1]\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nchange [level v] by (1)\nnext costume\n\n@382149602_480x360\n\nwhen flag clicked\ngo to x: (1) y: (-2)\nshow\nwait (1) seconds\nglide (1) secs to x: (5) y: (344)\nhide\n\n
Avoid water and arrow keys to move.