SLIME - Simple Platformer remix
@Stage\n\n@SLIME\n\ndefine movement\nswitch costume to (hitbox v)\nset rotation style [don't rotate v]\nset [~xinput v] to (<<key (right arrow v) pressed?> or <key (d v) pressed?>> - <<key (left arrow v) pressed?> or <key (a v) pressed?>>)\nchange [~xspeed v] by ((~xInput) * (2))\nset [~xspeed v] to ((~xSpeed) * (0.8))\nchange [~yspeed v] by (-2)\nchange y by (~ySpeed)\nif <(~ySpeed) < [0]> then\n    repeat until <not <touching (ground v)?>>\n        change y by (1)\n        set [~yspeed v] to [0]\n        set [~canjump v] to [true]\n    end\nelse\n    repeat until <not <touching (ground v)?>>\n        change y by (-1)\n        set [~yspeed v] to [0]\n        set [~canjump v] to [false]\n    end\nend\nchange x by (~xSpeed)\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(~canJump) = [true]>> then\n    set [~yspeed v] to [18]\n    set [~canjump v] to [false]\nend\nset [~slope v] to [0]\nrepeat until <<(~slope) = [8]> or <not <touching (ground v)?>>>\n    change [~slope v] by (1)\n    change y by (1)\nend\nif <(~slope) = [8]> then\n    change x by ((~xSpeed) * (-1))\n    change y by ((~slope) * (-1))\n    set [~xspeed v] to [0]\nend\n\ndefine costume\nset rotation style [left-right v]\nif <not <(~xInput) = [0]>> then\n    point in direction ((~xInput) * (90))\nend\nif <(~ySpeed) > [0]> then\n    switch costume to (jump v)\nelse\n    if <(~ySpeed) < [-5]> then\n        switch costume to (fall v)\n    else\n        switch costume to (walk v)\n    end\nend\n\nwhen I receive [nextnevel v]\nset [~xspeed v] to [0]\nset [~yspeed v] to [0]\nset x to (-200)\npoint in direction (90)\ngo to [front v] layer\n\nwhen I receive [start v]\nset size to (50) %\nset [ghost v] effect to (0)\nset x to (-200)\nshow\nset [.level v] to [1]\nbroadcast (nextNevel v)\nforever\n    movement\n    costume\n    if <(x position) > [240]> then\n        change [.level v] by (1)\n        broadcast (nextNevel v) and wait\n    end\nend\n\nwhen I receive [start v]\nset [level on v] to (.level)\nforever\n    if <touching (danger v)?> then\n        broadcast (LOSE LIFE v)\n        wait until <not <touching (danger v)?>>\n    end\nend\n\nwhen I receive [lose life v]\nstart sound [Squeaky Toy v]\nrepeat (50)\n    change [ghost v] effect by (5)\nend\nbroadcast (GAME OVER v)\n\nwhen [space v] key pressed\nchange [color v] effect by (25)\n\nwhen I receive [start v]\nforever\n    play sound [Tuca Donka v] until done\nend\n\nwhen I receive [game over v]\nstop all sounds\n\n@ground\n\nwhen I receive [nextnevel v]\nswitch costume to (.level)\n\nwhen [space v] key pressed\nchange [color v] effect by (25)\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\nend\n\n@SPALSH SCREEN\n\nwhen flag clicked\nshow\ngo to [front v] layer\nstart sound [Fluxxwave \(Slowed + Reverb\)  v]\n\nwhen I receive [start v]\nstop all sounds\nhide\n\n@BUTTON\n\nwhen flag clicked\ngo to x: (-137) y: (-125)\nshow\nset [speed v] to [0]\nset size to (0) %\nforever\n    go [forward v] (1) layers\n    point in direction ((([sin v] of ((SPEED) * (1)) ) * (10)) + (90))\n    change [speed v] by (6)\n    if <touching (mouse-pointer v)?> then\n        change size by (((130) - (size)) / (7))\n    else\n        change size by (((100) - (size)) / (7.1))\n    end\nend\n\nwhen this sprite clicked\nbroadcast (START v)\nset [.level v] to (LEVEL ON)\nhide\n\nwhen I receive [game over v]\nshow\n\n@DANGER\n\nwhen I receive [nextnevel v]\nswitch costume to (.level)\n\n@GAME OVER\n\nwhen I receive [game over v]\nshow\n\nwhen I receive [start v]\nhide\nstop all sounds\n\nwhen [space v] key pressed\nchange [color v] effect by (25)\n\n
✦ Thanks for checking SLIME- A simple platformer where you move around. Wow.\n=========================================\nDIRECTIONS:\n⋆ A OR</> OR D to move\nUP OR W ARROW to jump\n=========================================\nSpace to change colour