Mario's PONG Platformer #Games #Mario #Platformer #All
@Stage\n\nwhen flag clicked\nforever\n    play sound [Original Tetris theme \(Tetris Soundtrack\) v] until done\nend\n\nwhen flag clicked\nwait (1) seconds\nwait until <(Level) = [17]>\nstop [other scripts in sprite v]\nbroadcast (detect v)\nforever\n    play sound [Super Mario Bros v] until done\nend\n\nwhen I receive [detect v]\nwait until <(Level) = [18]>\nstop [other scripts in sprite v]\nforever\n    play sound [Super Mario Bros \(NES\) Music - Ending Theme v] until done\nend\n\n@Mario\n\nwhen flag clicked\ngo to [back v] layer\nset rotation style [left-right v]\nset [level v] to [1]\nset [xv v] to [0]\nset [yv v] to [0]\nspawn\nforever\n    physics <touching (platforms v)?>\nend\n\ndefine physics <touch>\nclear graphic effects\nchange [yv v] by (-1)\nif <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    point in direction (90)\n    change [xv v] by (0.9)\nend\nif <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    point in direction (-90)\n    change [xv v] by (-0.9)\nend\nset [xv v] to ((Xv) * (0.9))\nchange x by (Xv)\nif <<touching (platforms v)?> or <touching (moving platform v)?>> then\n    change y by (1)\nend\nif <<touching (platforms v)?> or <touching (moving platform v)?>> then\n    change y by (1)\nend\nif <<touching (platforms v)?> or <touching (moving platform v)?>> then\n    change y by (1)\nend\nif <<touching (platforms v)?> or <touching (moving platform v)?>> then\n    change y by (1)\nend\nif <<touching (platforms v)?> or <touching (moving platform v)?>> then\n    change y by (-4)\n    change x by ((Xv) * (-1))\n    if <<key (up arrow v) pressed?> or <mouse down?>> then\n        set [yv v] to [14]\n        if <(Xv) > [0]> then\n            set [xv v] to [-10]\n        else\n            set [xv v] to [10]\n        end\n    end\nend\nchange y by (Yv)\nif <<touching (platforms v)?> or <touching (moving platform v)?>> then\n    change y by ((Yv) * (-1))\n    set [yv v] to [0]\nend\nchange y by (-1)\nif <<<key (up arrow v) pressed?> or <mouse down?>> and <<touching (platforms v)?> or <touching (moving platform v)?>>> then\n    start sound [smb_jump-small v]\n    change [yv v] by (14)\nend\nchange y by (1)\nif <(x position) > [230]> then\n    change [level v] by (1)\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    go to x: (-200) y: (-45)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nend\nif <<<touching (boss 1 v)?> or <<touching (spikes v)?> or <touching (enemies v)?>>> or <(y position) < [-175]>> then\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    go to x: (-200) y: (-45)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nend\n\ndefine spawn\ngo to x: (-209) y: (21)\n\nwhen [m v] key pressed\n\nwhen [l v] key pressed\n\nwhen I receive [door v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nchange [level v] by (1)\ngo to x: (-200) y: (-135)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nbroadcast (physic v)\n\nwhen I receive [physic v]\nforever\n    physics <>\nend\n\nswitch costume to (pixil-frame-0 \(5\)2 v)\n\nwhen I receive [save mario v]\nstop [other scripts in sprite v]\nwait (.2) seconds\nrepeat (10)\n    change [pixelate v] effect by (10)\n    change [ghost v] effect by (10)\nend\nwait (.1) seconds\nrepeat (10)\n    change [pixelate v] effect by (-10)\n    change [ghost v] effect by (-10)\nend\nswitch costume to (stand v)\nforever\n    physics <>\nend\n\nwhen flag clicked\nswitch costume to (pixil-frame-0 \(2\) v)\n\nswitch costume to (pixil-frame-0 \(2\)2 v)\n\n@Platforms\n\nwhen flag clicked\nforever\n    switch costume to (join [level] (Level))\nend\n\n@Txt engine\n\ndefine Txt Engine || (text) || Effects Cl (cl) Br (br) Position (x) (y) Distance (distance) Size (size) Delay (delay)\nhide\nset [color v] effect to (cl)\nset [brightness v] effect to (br)\ngo to x: (x) y: (y)\ndelete all of [data v]\nadd (text) to [data v]\nadd (distance) to [data v]\nadd (size) to [data v]\nadd [1] to [data v]\nrepeat (length of (text))\n    set size to (size) %\n    switch costume to (letter (item (4) of [data v]) of (text))\n    stamp\n    change x by (distance)\n    replace item (4) of [data v] with ((item (4) of [data v]) + (1))\n    wait (delay) seconds\nend\n\nwhen flag clicked\nset [level v] to [1]\nerase all\nTxt Engine || [hello nice to meet you] || Effects Cl [0] Br [100] Position [-220] [86] Distance [20] Size [500] Delay []\nwait until <(Level) = [2]>\nerase all\nTxt Engine || [we are going on a quest] || Effects Cl [0] Br [100] Position [-220] [86] Distance [20] Size [500] Delay []\nwait until <(Level) = [3]>\nerase all\nTxt Engine || [to turn back into mario] || Effects Cl [0] Br [100] Position [-220] [86] Distance [20] Size [500] Delay []\nwait until <(Level) = [4]>\nerase all\nTxt Engine || [you can wall jump] || Effects Cl [0] Br [100] Position [-220] [86] Distance [20] Size [500] Delay []\nwait until <(Level) = [5]>\nerase all\nTxt Engine || [     lets go now] || Effects Cl [0] Br [100] Position [-220] [86] Distance [20] Size [500] Delay []\nwait until <(Level) = [6]>\nerase all\nTxt Engine || [     avoid spikes!!] || Effects Cl [0] Br [100] Position [-220] [86] Distance [20] Size [500] Delay []\nwait until <(Level) = [7]>\nerase all\nwait until <(Level) = [10]>\nerase all\nTxt Engine || [      take a ride!!] || Effects Cl [0] Br [100] Position [-220] [86] Distance [20] Size [500] Delay []\nwait until <(Level) = [12]>\nerase all\nwait until <(Level) = [16]>\nerase all\nTxt Engine || [    almost there!] || Effects Cl [0] Br [100] Position [-220] [86] Distance [20] Size [500] Delay []\nwait until <(Level) = [17]>\nerase all\nTxt Engine || [        boss!!!!] || Effects Cl [0] Br [100] Position [-220] [86] Distance [20] Size [500] Delay []\nTxt Engine || [  space for fireball] || Effects Cl [0] Br [100] Position [-220] [30] Distance [20] Size [500] Delay []\nwait until <(Level) = [18]>\nerase all\nTxt Engine || [you saved mario!!!!!] || Effects Cl [0] Br [100] Position [-220] [86] Distance [20] Size [500] Delay []\nbroadcast (save mario v)\nwait (2) seconds\nerase all\nTxt Engine || [follow me for part 2!] || Effects Cl [0] Br [100] Position [-220] [86] Distance [20] Size [500] Delay []\n\n@spikes\n\nwhen flag clicked\nhide\nwait until <(Level) = [6]>\nswitch costume to (costume1 v)\nshow\nwait until <(Level) = [7]>\nnext costume\nwait until <(Level) = [8]>\nnext costume\nwait until <(Level) = [9]>\nnext costume\nwait until <(Level) = [10]>\nnext costume\nwait until <(Level) = [11]>\nnext costume\nwait until <(Level) = [12]>\n\nchange [level v] by (1)\n\n@moving platform\n\nwhen flag clicked\nhide\nwait (1) seconds\nwait until <(Level) = [10]>\ngo to x: (0) y: (0)\nshow\nbroadcast (move v)\nwait until <(Level) = [11]>\nstop [other scripts in sprite v]\nhide\ngo to x: (0) y: (0)\nshow\nbroadcast (move v)\nwait until <(Level) = [12]>\nstop [other scripts in sprite v]\nhide\nhide\ngo to x: (-8) y: (-68)\nshow\nbroadcast (move 2 v)\nwait until <(Level) = [13]>\nstop [other scripts in sprite v]\nhide\nwait until <(Level) = [15]>\nstop [other scripts in sprite v]\nhide\nhide\nhide\ngo to x: (-7) y: (-69)\nshow\nbroadcast (move3 v)\nwait until <(Level) = [16]>\nstop [other scripts in sprite v]\nhide\nwait until <(Level) = [17]>\nstop [other scripts in sprite v]\nhide\ngo to x: (-17) y: (116)\nshow\nbroadcast (move 4 v)\nwait until <(Level) = [18]>\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [move v]\nforever\n    glide (1) secs to x: (0) y: (0)\n    wait (1) seconds\n    glide (1) secs to x: (192) y: (0)\n    wait (1) seconds\nend\n\nwhen I receive [move 2 v]\nforever\n    glide (1) secs to x: (-8) y: (-68)\n    wait (1) seconds\n    glide (1) secs to x: (120) y: (-68)\n    wait (1) seconds\nend\n\nwhen I receive [move3 v]\nforever\n    glide (1) secs to x: (302) y: (-69)\n    wait (1) seconds\n    glide (1) secs to x: (-7) y: (-69)\n    wait (1) seconds\nend\n\nwhen I receive [move 4 v]\nforever\n    glide (1) secs to x: (173) y: (116)\n    wait (1) seconds\n    glide (1) secs to x: (-17) y: (116)\n    wait (1) seconds\nend\n\n@key\n\ndefine smooth glide to (y) (speed)\nif <(y) < (x position)> then\n    repeat until <((x position) - (1)) < (y)>\n        change x by (((y) - (x position)) / (speed))\n    end\n    set x to (y)\nelse\n    repeat until <(y) < ((x position) - (-1))>\n        change x by (((y) - (x position)) / (speed))\n    end\n    set x to (y)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [key collected v]\nshow\nstart sound [recording1 v]\nsmooth glide to ([x position v] of [mario v]) [3]\nforever\n    if <([direction v] of [mario v]) = [90]> then\n        smooth glide to (([x position v] of [mario v]) - (30)) [3]\n        repeat until <not <([direction v] of [mario v]) = [90]>>\n            set x to (([x position v] of [mario v]) - (30))\n        end\n    else\n        smooth glide to (([x position v] of [mario v]) - (-30)) [3]\n        repeat until <not <([direction v] of [mario v]) = [-90]>>\n            set x to (([x position v] of [mario v]) - (-30))\n        end\n    end\nend\n\nwhen I receive [key open v]\nstop [other scripts in sprite v]\nhide\n\n@Door\n\nwhen flag clicked\nset [boss health v] to [3]\nhide\nswitch costume to (door v)\nwait (1) seconds\ngo to [back v] layer\nwait until <(Level) = [16]>\nshow\ngo to x: (186) y: (-128)\nwait until <touching (mario v)?>\nhide\nbroadcast (door v) and wait\nwait until <(Level) = [17]>\nshow\nswitch costume to (keydoor v)\nwait until <<touching (mario v)?> and <(boss health) < [1]>>\nswitch costume to (keydoor2 v)\nbroadcast (key open v)\nwait (.1) seconds\nhide\nbroadcast (door v) and wait\n\n@Boss 1\n\nwhen flag clicked\ngo to x: (53) y: (-117)\nhide\nwait (1) seconds\nset [boss health v] to [22]\nwait until <(Level) = [17]>\nswitch costume to (pixil-frame-0 \(5\) v)\ncreate clone of (_myself_ v)\nshow\nbroadcast (glide v)\nforever\n    set [x v] to (x position)\n    set [y v] to (y position)\n    if <(boss health) < [1]> then\n        broadcast (key collected v)\n        repeat (10)\n            change [ghost v] effect by (10)\n            change [pixelate v] effect by (10)\n        end\n        hide\n        stop [this script v]\n    end\nend\n\nwhen I start as a clone\n\nif <([x position v] of [mario v]) > (x)> then\n    move (5) steps\nelse\n    move (-5) steps\nend\nwait (1) seconds\n\nswitch costume to (hitbox v)\nforever\n    go to [front v] layer\n    go to x: (x) y: (y)\n    show\n    if <touching (mario v)?> then\n        change [boss health v] by (-1)\n        wait until <not <touching (mario v)?>>\n    end\nend\n\nwhen I receive [glide v]\nforever\n    glide (pick random (0.1) to (1)) secs to x: (pick random (-200) to (200)) y: (-117)\n    wait (pick random (0.1) to (3)) seconds\nend\n\nwhen I start as a clone\nhide\n\n@health bar\n\nwhen flag clicked\nhide\nwait (1) seconds\nset [boss health v] to [22]\nwait until <(Level) = [17]>\nshow\nstart sound [smb_powerup v]\nrepeat until <(boss health) < [1]>\n    go to x: ([x position v] of [boss 1 v]) y: (([y position v] of [boss 1 v]) + (67))\n    switch costume to ((1) + (boss health))\nend\nhide\n\n@fireball\n\nwhen flag clicked\nhide\nwait (1) seconds\nset [boss health v] to [22]\nwait until <(Level) = [17]>\nshow\ngo to [back v] layer\nhide\nbroadcast (ticckkk v)\nt\n\ngo to x: ([x position v] of [boss 1 v]) y: (([y position v] of [boss 1 v]) + (67))\n\ngo to (boss 1 v)\n\ndefine t\nrepeat until <(boss health) < [1]>\n    wait until <key (space v) pressed?>\n    go to (mario v)\n    show\n    wait (pick random (0.02) to (0.01)) seconds\n    go to (mario v)\n    start sound [smb_fireball2 v]\n    if <([direction v] of [mario v]) = [90]> then\n        go to (mario v)\n        repeat until <touching (_edge_ v)?>\n            change x by (pick random (8) to (10))\n            if <touching (boss 1 v)?> then\n                change [boss health v] by (-1)\n                hide\n                t\n            end\n        end\n    else\n        go to (mario v)\n        repeat until <touching (_edge_ v)?>\n            change x by (pick random (-8) to (-10))\n            if <touching (boss 1 v)?> then\n                change [boss health v] by (-1)\n                hide\n                t\n            end\n        end\n    end\n    hide\nend\n\nwhen I receive [ticckkk v]\nforever\n    turn right (15) degrees\nend\n\n@enemies\n\nwhen flag clicked\nhide\nwait (1) seconds\nset [boss health v] to [22]\nwait until <(Level) = [17]>\nshow\nrepeat until <(boss health) < [1]>\n    hide\n    wait (pick random (3) to (8)) seconds\n    go to (boss 1 v)\n    show\n    start sound [smb_fireworks v]\n    if <(x position) > ([x position v] of [mario v])> then\n        switch costume to (costume2 v)\n        repeat until <touching (_edge_ v)?>\n            move (pick random (-5) to (-8)) steps\n        end\n    else\n        switch costume to (costume1 v)\n        repeat until <touching (_edge_ v)?>\n            move (pick random (5) to (8)) steps\n        end\n    end\nend\nhide\n\nwhen flag clicked\nhide\nwait (1) seconds\nwait until <(Level) = [17]>\nwait until <(boss health) < [1]>\nstop [other scripts in sprite v]\nhide\n\n@thumb\n\nwhen [timer v] > (TiMeR ☻)\nforever\n    reset timer\nend\n\ndefine TiMeR ☻ + (t)\nset [timer ☻ v] to ((t) + (timer))\nset [ghost v] effect to (500)\n\nwhen flag clicked\nforever\n    TiMeR ☻ + (timer)\nend\n\nwhen [timer v] > (TiMeR ☻)\nbroadcast (thumb v)\n\n
[ Mario's PONG Platformer ]\nby @dwseoh127\n\n➠ Mario became a pong character and you must help him become the original mario. arrow keys to move!\n➠ There's a boss and you can defeat him with fire-balls (space key)\n\nEnjoy!\n\n\n\n\nCredits:\n- Level Up for inspiration\n- Me for pixel art (pixilart)\n- Mario, Tetris For Music