Radiation - A Scrolling Platformer
@Stage\n\nwhen flag clicked\nset volume to (25) %\nforever\n    play sound [Smooth Jazz Piano v] until done\nend\n\nwhen flag clicked\nwait (1) seconds\nwait until <(Level) = [17]>\nstop all sounds\nstop [other scripts in sprite v]\n\nwhen I receive [end v]\nstop all sounds\nstop [other scripts in sprite v]\n\n@Player\n\nwhen flag clicked\nbroadcast (Reset Update v) and wait\ngo to [front v] layer\ngo to x: (-140) y: (-50)\nset [level v] to [1]\nforever\n    Platforming script\nend\n\ndefine Move in steps (steps)\nchange [airtime v] by (1)\nrepeat (steps)\n    set [orig v] to (x position)\n    change x by ((vx) / (steps))\n    if <touching color (#000000)?> then\n        set x to (orig)\n        set [vx v] to [0]\n    end\n    set [orig v] to (y position)\n    change y by ((vy) / (steps))\n    if <touching color (#000000)?> then\n        set y to (orig)\n        set [vy v] to [0]\n        set [airtime v] to [0]\n    end\n    if <touching (spikes v)?> then\n        Respawn at x: (Spawn x) y: (Spawn y)\n        set [vy v] to [0]\n        set [vx v] to [0]\n        stop [this script v]\n    end\n    if <<(y position) = [-190]> and <<(Level \(Modulo\)) = [1]> or <(Level \(Modulo\)) = [2]>>> then\n        Respawn at x: (Spawn x) y: (Spawn y)\n        set [vy v] to [0]\n        set [vx v] to [0]\n        stop [this script v]\n    end\nend\n\ndefine Platforming script\nswitch costume to (costume1 v)\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <[2] > (airtime)>> then\n    set [vy v] to [10]\n    change [airtime v] by (-0.7)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [vx v] by (-1.5)\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [vx v] by (1.5)\nend\nchange [vx v] by (((0) - (vx)) / (5))\nchange [vy v] by (-1)\nMove in steps (([abs v] of (vy) ) + ([abs v] of (vx) ))\nswitch costume to (costume2 v)\nset [level \(modulo\) v] to ((((Level) - (1)) mod (4)) + (1))\nWin if Level = [1] And x = [240] And y = []\nWin if Level = [2] And x = [] And y = [190]\nWin if Level = [3] And x = [-240] And y = []\nWin if Level = [4] And x = [] And y = [-190]\nBack if level = [2] and x = [-240] and y = []\nBack if level = [3] and x = [] and y = [-190]\nBack if level = [4] and x = [240] and y = []\nif <<(Level) = [6]> and <(x position) = [240]>> then\n    easter egg [1]\nend\nif <<(Level \(Modulo\)) = [1]> and <(y position) = [190]>> then\n    broadcast (end v)\n    stop [other scripts in sprite v]\n    stop [this script v]\nend\n\ndefine Level (lev) , New x: (nx) , New y: (ny) , Spawn x: (sx) , Spawn y: (sy)\nset [level \(modulo\) v] to ((((Level) - (1)) mod (4)) + (1))\nif <(Level \(Modulo\)) = (lev)> then\n    set [new x v] to (nx)\n    set [new y v] to (ny)\n    set [spawn x v] to (sx)\n    set [spawn y v] to (sy)\nend\n\ndefine Respawn at x: (xx) y: (yy)\ngo to x: (xx) y: (yy)\n\ndefine Win if Level = (l) And x = (x) And y = (y)\nif <(Level \(Modulo\)) = (l)> then\n    if <<(x position) = (x)> or <(x) = []>> then\n        if <<(y position) = (y)> or <(y) = []>> then\n            change [level v] by (1)\n            broadcast (Reset Update v) and wait\n            Respawn at x: (New x) y: (New y)\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [reset update v]\nLevel [1] , New x: [-140] , New y: [176] , Spawn x: [-140] , Spawn y: [-106]\nLevel [2] , New x: [-226] , New y: (y position) , Spawn x: [-180] , Spawn y: [-106]\nLevel [3] , New x: [213] , New y: [-134] , Spawn x: [134] , Spawn y: [-106]\nLevel [4] , New x: [238] , New y: (y position) , Spawn x: [192] , Spawn y: [-106]\n\ndefine Back if level = (levback) and x = (xb) and y = (yb)\nif <((((Level) - (1)) mod (4)) + (1)) = (levback)> then\n    if <<(x position) = (xb)> or <(xb) = []>> then\n        if <<(y position) = (yb)> or <(yb) = []>> then\n            change [level v] by (-1)\n            broadcast (Back reset update v) and wait\n            Respawn at x: (New x) y: (New y)\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [back reset update v]\nLevel [1] , New x: [239] , New y: (y position) , Spawn x: [200] , Spawn y: [-106]\nLevel [2] , New x: [163] , New y: [188] , Spawn x: [140] , Spawn y: [108]\nLevel [3] , New x: [-229] , New y: (y position) , Spawn x: [-220] , Spawn y: [-106]\nLevel [4] , New x: [238] , New y: [-106] , Spawn x: [192] , Spawn y: [-106]\n\nwhen [r v] key pressed\nRespawn at x: (Spawn x) y: (Spawn y)\nset [vy v] to [0]\nset [vx v] to [0]\nstop [this script v]\n\ndefine easter egg ()\n\nwhen [x v] key pressed\nif <(username) = [max-0]> then\n    change [level v] by (1)\n    broadcast (Reset Update v) and wait\n    Respawn at x: (New x) y: (New y)\n    stop [this script v]\nend\n\n@Ground\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@Spikes\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    switch costume to (Level)\nend\n\n@Added things\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@end\n\nwhen flag clicked\nhide\n\nwhen I receive [end v]\npoint in direction (90)\nset volume to (30) %\nwait (0.05) seconds\nstart sound [JJD - Adventure - cut v]\nwait (0.05) seconds\nset [id v] to [1]\nshow\nswitch costume to (costume1 v)\nset size to (100) %\ngo to [front v] layer\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nclear graphic effects\nrepeat (2)\n    clon thing\n    wait (3.62) seconds\nend\nclon thing\nrepeat (5)\n    wait (2.43) seconds\n    clon thing\nend\nwait (7) seconds\nclon thing\nwait (2.43) seconds\nset [id v] to [11]\ncreate clone of (_myself_ v)\nwait (1) seconds\nset [id v] to [12]\nforever\n    wait (0.5) seconds\n    create clone of (_myself_ v)\nend\n\ndefine transition\nif <(id) = [black dot]> then\n    go to x: (0) y: (0)\n    switch costume to (costume6 v)\n    set size to (150) %\n    set [a v] to (pick random (-8) to (8))\n    set [o v] to (pick random (-3) to (16))\n    set [ghost v] effect to (50)\n    go to [front v] layer\n    repeat (15)\n        if <<[-170] > (y position)> or <([abs v] of (x position) ) > [180]>> then\n            change [ghost v] effect by (25)\n        end\n        change x by (a)\n        change y by (o)\n        change [o v] by (-1)\n    end\n    repeat (5)\n        change [ghost v] effect by (15)\n        change x by (a)\n        change y by (o)\n        change [o v] by (-1)\n        if <<[-170] > (y position)> or <([abs v] of (x position) ) > [180]>> then\n            change [ghost v] effect by (25)\n        end\n    end\n    delete this clone\nelse\n    point in direction (pick random (87) to (93))\n    go to x: (0) y: (-200)\n    if <(id) = [12]> then\n        set x to (pick random (-200) to (200))\n    end\n    set [ghost v] effect to (100)\n    switch costume to (costume6 v)\n    set size to (400) %\n    switch costume to (id)\n    go to [front v] layer\n    set [a v] to [23]\n    repeat (15)\n        switch costume to (costume6 v)\n        change size by (((100) - (size)) / (9))\n        switch costume to (id)\n        change [ghost v] effect by (-10)\n        change y by (a)\n        change [a v] by (-1)\n        if <(id) = [12]> then\n            change x by (((0) - (x position)) / (7))\n        end\n    end\n    repeat until <<[6] > (y position)> or <(y position) = [6]>>\n        switch costume to (costume6 v)\n        change size by (((100) - (size)) / (9))\n        switch costume to (id)\n        change [ghost v] effect by (-10)\n        change [a v] by (-1)\n        change y by (a)\n        if <(id) = [12]> then\n            change x by (((0) - (x position)) / (7))\n        end\n    end\n    go to x: (0) y: (0)\n    set size to (100) %\n    clone [15] black dots\n    if <(id) > [3]> then\n        if <(id) = [4]> then\n            repeat (10)\n                go to x: ((pick random (-3) to (3)) * (5)) y: ((pick random (-3) to (3)) * (5))\n                point in direction (pick random (-190) to (190))\n            end\n        else\n            repeat (5)\n                go to x: ((pick random (-3) to (3)) * (3)) y: ((pick random (-3) to (3)) * (3))\n            end\n        end\n    else\n        repeat (5)\n            go to x: ((pick random (-3) to (3)) * (1)) y: ((pick random (-3) to (3)) * (1))\n            point in direction (pick random (87) to (93))\n        end\n    end\n    if <(id) = [4]> then\n        point in direction (92)\n    end\n    go to x: (0) y: (0)\n    wait (0.1) seconds\n    clear graphic effects\n    if <(id) = [12]> then\n        repeat (5)\n            change [ghost v] effect by (20)\n        end\n        delete this clone\n    end\nend\n\nwhen I start as a clone\ntransition\nset [a v] to [4]\nrepeat (10)\n    change [a v] by (-1)\n    change y by (a)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\ndefine clon thing\nchange [id v] by (1)\ncreate clone of (_myself_ v)\n\ndefine clone (e) black dots\nset [o v] to (id)\nset [id v] to [black dot]\nrepeat (e)\n    create clone of (_myself_ v)\nend\nset [id v] to (o)\n\nstart sound [JJD - Adventure - cut v]\n\n@Sprite1\n\nwhen flag clicked\ngo to [front v] layer\nhide\n\n
Click the flag twice, LAG will build up if you don't.\nMovement: Arrow Keys.   Jump: X.\nRunning: Double Tap Left or Right arrow.\nInhale / Use Ability: Z.    Slide: Down Arrow + X.\nSwallow Enemy / Enter Door: Down Arrow.\nDrop Ability: A / Take Damage.   Float: Up Arrow.