Platformer Engine || Remixable
@Stage\n\n@Player\n\nwhen I receive [start v]\nshow\npoint in direction (90)\ngo to x: (-190) y: (20)\nset [xs v] to [0]\nset [ys v] to [0]\nforever\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n        change [xs v] by (1.5)\n    end\n    if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>>> then\n        change [xs v] by (-1.5)\n    end\n    change x by (Xs)\n    if <touching (ground v)?> then\n        change x by ((Xs) * (-1))\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n            if <(Xs) > [0]> then\n                set [xs v] to [-15]\n                set [ys v] to [10]\n            else\n                set [xs v] to [15]\n                set [ys v] to [10]\n            end\n        else\n            set [xs v] to [0]\n        end\n    else\n        set [xs v] to ((Xs) * (0.8))\n    end\n    change y by (Ys)\n    if <touching (ground v)?> then\n        change y by ((Ys) * (-1))\n        set [ys v] to [0]\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n            if <(Jumping) = [yes]> then\n                set [ys v] to [12]\n                set [jumping v] to [no]\n            end\n        end\n    else\n        change [ys v] by (-1)\n        set [jumping v] to [yes]\n    end\n    if <(x position) > [239]> then\n        change [level v] by (1)\n        go to x: (-190) y: (20)\n        set [xs v] to [0]\n        set [ys v] to [0]\n    end\n    if <touching (trampoline v)?> then\n        set [ys v] to [20]\n    end\n    if <touching (speed ups v)?> then\n        set [xs v] to [20]\n    end\n    if <<<touching (danger v)?> or <(y position) < [-178]>> or <touching (saws v)?>> then\n        go to x: (-190) y: (50)\n        set [xs v] to [0]\n        set [ys v] to [0]\n    end\nend\n\nwhen flag clicked\nset [level v] to [1]\ngo to [front v] layer\nhide\n\nwhen I receive [start v]\nforever\n    play sound [Vexento - Pixel Party v] until done\nend\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nrepeat (7)\n    change size by (-5)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\n@Ground\n\nwhen flag clicked\n\nwhen flag clicked\nset [color v] effect to (0)\nhide\ngo to x: (0) y: (0)\n\nwhen I receive [start v]\nswitch costume to (1 v)\ngo to x: (0) y: (0)\nshow\nforever\n    change [color v] effect by (0.3)\n    switch costume to (Level)\nend\n\n@Danger\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\n\nwhen I receive [start v]\nswitch costume to (1 v)\ngo to x: (0) y: (0)\nshow\nforever\n    switch costume to (Level)\nend\n\n@Dangers Glow\n\nwhen I receive [start v]\nswitch costume to (1 v)\ngo to x: (0) y: (0)\nshow\nforever\n    switch costume to (Level)\n    go to [back v] layer\nend\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\n\n@Saws\n\nwhen I receive [start v]\ngo to [back v] layer\nswitch costume to (1 v)\ngo to x: (0) y: (0)\nshow\nforever\n    switch costume to (Level)\n    turn right (5) degrees\n    if <(Level) = [5]> then\n        go to x: (11) y: (-110)\n    end\n    if <(Level) = [6]> then\n        go to x: (112) y: (75)\n    end\nend\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\n\n@Speed Ups\n\nwhen I receive [start v]\ngo to [back v] layer\nswitch costume to (1 v)\ngo to x: (0) y: (0)\nshow\nforever\n    change [color v] effect by (0.3)\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\n\n@Trampoline\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\n\nwhen I receive [start v]\ngo to [back v] layer\nswitch costume to (1 v)\ngo to x: (0) y: (0)\nshow\nforever\n    change [color v] effect by (0.3)\n    switch costume to (Level)\nend\n\n@Bubbles\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nrepeat (50)\n    change y by (-1)\n    change x by (0.5)\n    move (1) steps\n    turn left (3) degrees\n    change [ghost v] effect by (-1)\nend\nrepeat (50)\n    change y by (-1)\n    change x by (1)\n    move (1) steps\n    change [ghost v] effect by (2)\n    turn left (2) degrees\nend\ndelete this clone\n\nwhen I receive [start v]\nset [ghost v] effect to (50)\nshow\nforever\n    set size to (pick random (10) to (100)) %\n    go to (random position v)\n    create clone of (_myself_ v)\n    turn right (pick random (180) to (-180)) degrees\n    next costume\n    wait (0.1) seconds\nend\n\n@My Intro\n\nwhen I start as a clone\nshow\nif <(ID) = [Particle]> then\n    switch costume to (bg v)\n    set size to (pick random (10) to (75)) %\n    go to [front v] layer\n    go to x: (pick random (-400) to (240)) y: (-300)\n    point in direction (60)\n    if <(timer) > [5]> then\n        show\n    else\n        hide\n    end\n    set [ghost v] effect to (50)\n    if <(size) < [40]> then\n        go [backward v] (1) layers\n    end\n    set [i v] to (pick random (3) to (7))\n    set [id v] to (pick random (2) to (6))\n    repeat until <<(x position) > [399]> or <<(x position) < [-399]> or <<(y position) > [399]> or <(y position) < [-399]>>>>\n        switch costume to (movehack v)\n        move (i) steps\n        change y by (ID)\n        change [id v] by (.01)\n        switch costume to (particle v)\n        if <(timer) > [5]> then\n            show\n            if <(timer) > [8.7]> then\n                hide\n            end\n        end\n    end\n    delete this clone\nend\nif <(ID) = [Line]> then\n    point in direction (135)\n    switch costume to (blank v)\n    set size to (100) %\n    if <(timer) > [1.5]> then\n        set [ghost v] effect to (0)\n    else\n        set [ghost v] effect to (100)\n    end\n    switch costume to (movehack v)\n    go to x: (-325) y: (200)\n    go to [back v] layer\n    go [forward v] (5) layers\n    repeat until <(x position) > [300]>\n        switch costume to (movehack v)\n        if <(timer) > [1.5]> then\n            if <(timer) > [7.5]> then\n                delete this clone\n            else\n                change x by (5)\n                change y by (-5)\n                change [ghost v] effect by (-10)\n            end\n        else\n            change x by (10)\n            change y by (-10)\n        end\n        switch costume to (linething v)\n    end\n    delete this clone\nend\nif <(ID) = [BG]> then\n    switch costume to (bg v)\n    set size to (1) %\n    go to [front v] layer\n    go [backward v] (2) layers\n    repeat (5)\n        change size by (((10) - (size)) / (8))\n    end\n    repeat (50)\n        switch costume to (blank v)\n        change size by (((700) - (size)) / (12))\n        switch costume to (bg v)\n    end\n    wait until <(timer) > [8.7]>\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\nif <(ID) = [CE]> then\n    switch costume to (ce v)\n    set size to (1) %\n    go to [back v] layer\n    go [forward v] (1) layers\n    set [i v] to [1]\n    repeat (15)\n        change [i v] by ((i) / (8))\n        change size by (i)\n    end\n    repeat (7)\n        change size by (((100) - (size)) / (12))\n    end\n    repeat (14)\n        change size by (((100) - (size)) / (12))\n        change size by (2)\n        next costume\n    end\n    delete this clone\nend\nif <(ID) = [BG2]> then\n    switch costume to (bg2 v)\n    set size to (100) %\n    set [ghost v] effect to (100)\n    go to [back v] layer\n    point in direction (90)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    wait until <(timer) > [8]>\n    delete this clone\nend\nif <(ID) = [CT]> then\n    switch costume to (circlething2 v)\n    set size to (60) %\n    set [ghost v] effect to (100)\n    go to [back v] layer\n    go [forward v] (1) layers\n    point in direction (90)\n    go to x: (-133) y: (-46)\n    repeat (10)\n        change [ghost v] effect by (-10)\n        turn right (2) degrees\n    end\n    repeat until <(timer) > [7.5]>\n        turn right (2) degrees\n    end\n    delete this clone\nend\nif <(ID) = [CT2]> then\n    switch costume to (circlething2 v)\n    set size to (60) %\n    set [ghost v] effect to (100)\n    go to [back v] layer\n    go [forward v] (1) layers\n    point in direction (90)\n    go to x: (133) y: (46)\n    repeat (10)\n        change [ghost v] effect by (-10)\n        turn left (2) degrees\n    end\n    repeat until <(timer) > [7.5]>\n        turn left (2) degrees\n    end\n    delete this clone\nend\nif <(ID) = [Name]> then\n    set [id v] to [2]\n    if <(ID) = [1]> then\n        set [brightness v] effect to (-100)\n        switch costume to (logo3 v)\n    else\n        switch costume to (name v)\n    end\n    set size to (250) %\n    set [ghost v] effect to (100)\n    go to [front v] layer\n    point in direction (45)\n    repeat (50)\n        change [ghost v] effect by (-10)\n        change size by (((100) - (size)) / (12))\n        turn right (((90) - (direction)) / (12)) degrees\n    end\n    repeat until <(timer) > [5]>\n        change size by (-.25)\n    end\n    repeat (5)\n        change size by (((65) - (size)) / (12))\n        go to x: (pick random (-2) to (2)) y: (pick random (-2) to (2))\n        set [-kami's intro x v] to (x position)\n        set [-kami's intro y v] to (y position)\n        go to [front v] layer\n    end\n    if <(ID) = [1]> then\n        set [brightness v] effect to (0)\n        switch costume to (logo3 v)\n    else\n        switch costume to (name2 v)\n    end\n    repeat (15)\n        change size by (((65) - (size)) / (12))\n        go to x: (pick random (-2) to (2)) y: (pick random (-2) to (2))\n        set [-kami's intro x v] to (x position)\n        set [-kami's intro y v] to (y position)\n        go to [front v] layer\n    end\n    repeat (10)\n        change size by (-.25)\n        go to x: (pick random (-2) to (2)) y: (pick random (-2) to (2))\n        set [-kami's intro x v] to (x position)\n        set [-kami's intro y v] to (y position)\n    end\n    repeat (10)\n        change size by (-.25)\n        go to x: (pick random (-1) to (1)) y: (pick random (-1) to (1))\n        set [-kami's intro x v] to (x position)\n        set [-kami's intro y v] to (y position)\n    end\n    go to x: (0) y: (0)\n    set [-kami's intro x v] to [0]\n    set [-kami's intro y v] to [0]\n    repeat until <(timer) > [8]>\n        change size by (-.25)\n    end\n    set [i v] to [1]\n    set [id v] to [1]\n    repeat (10)\n        change size by (i)\n        turn right (ID) degrees\n        change [i v] by ((i) / (4))\n        change [id v] by ((ID) / (8))\n    end\n    repeat (5)\n        change size by (((250) - (size)) / (8))\n        turn right (((135) - (direction)) / (12)) degrees\n    end\n    repeat (10)\n        change size by (((250) - (size)) / (8))\n        turn right (((135) - (direction)) / (12)) degrees\n        change [ghost v] effect by (10)\n    end\n    wait (1) seconds\n    broadcast (Pizzarush's Intro v)\n    delete this clone\nend\n\nwhen flag clicked\nbroadcast (-Kami's Intro v)\n\nwhen I start as a clone\nif <(ID) = [BG]> then\n    go to x: (-Kami's Intro X) y: (-Kami's Intro Y)\nend\n\nwhen I receive [-kami's intro v]\nforever\n    Clone [Particle]\nend\n\nwhen I receive [-kami's intro v]\nset [-kami's intro x v] to [0]\nset [-kami's intro y v] to [0]\nreset timer\nstart sound [MUSICA v]\nset volume to (100) %\nhide\nclear graphic effects\nset size to (100) %\ngo to x: (0) y: (0)\npoint in direction (90)\nwait until <(timer) > [1.5]>\nClone [Skip]\nClone [BG2]\nClone [CE]\nClone [Name]\nClone [CT]\nClone [CT2]\nwait until <(timer) > [5]>\nClone [BG]\n\ndefine Clone (id)\nset [id v] to (id)\ncreate clone of (_myself_ v)\n\nwhen I receive [-kami's intro v]\nrepeat until <(timer) > [1.5]>\n    Clone [Line]\n    wait (.13) seconds\nend\nrepeat until <(timer) > [7.5]>\n    Clone [Line]\n    wait (.3) seconds\nend\n\nwhen I receive [skip -kami's intro v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\n    change volume by (-10)\nend\nbroadcast (Pizzarush's Intro v)\ndelete this clone\n\nwhen I start as a clone\nif <(ID) = [Skip]> then\n    forever\n        show\n        go to [front v] layer\n        clear graphic effects\n        set size to (100) %\n        go to x: (0) y: (0)\n        point in direction (90)\n        switch costume to (skip v)\n        if <<key (space v) pressed?> or <mouse down?>> then\n            broadcast (Skip -Kami's Intro v)\n        end\n        if <(timer) > [9]> then\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            delete this clone\n        end\n    end\nend\n\nwhen I receive [pizzarush's intro v]\nbroadcast (Start v)\n\n@DELETE THIS AFTER REMIXING\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\ngo to [front v] layer\ngo to x: (0) y: (0)\nset volume to (100) %\n\n
This is an ENGINE NOT A GAME!!!!!\n-------------------------------------------------------------------------\nMade by: @jindalsargun\n-------------------------------------------------------------------------\nRemix it to make YOUR VERY OWN PLATFORMER GAME!\n-------------------------------------------------------------------------\nInstructions\nUse WASD keys or arrow buttons to move\nAvoid spikes, saws and lava.\n-------------------------------------------------------------------------\nUpdates\n14th June 2021 - shared\n-------------------------------------------------------------------------