Bounce Luigi! - A Platformer                       #games

Instructions: Oh no! Luigi was mining diamonds in the cave when he was turned into a basketball! Can YOU escape the cave as basketball Luigi?!\n\n< < < How to Play > > >\n<> WASD or Arrow Keys to move and jump!\n<> Luigi always bounces! Press the jump button to bounce HIGHER!!!\n<> Press jump when touching a wall to walljump!\n

@Stage\n\nwhen flag clicked\nforever\n    play sound [Crystal Caves Fast \(YI_ Crystal Caves\) v] until done\nend\n\nwhen I receive [next level v]\nnext backdrop\n\nwhen flag clicked\nswitch backdrop to (256px-nsmb-stalagmitebgbothfixed v)\nset [brightness v] effect to (-10)\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    if <(level) = [10]> then\n        switch backdrop to (mario-bros-wallpaper-8 v)\n        stop [other scripts in sprite v]\n        play sound [Super Mario \(Trap Remix\) v] until done\n    end\nend\n\n@Player\n\nwhen flag clicked\nset size to (150) %\ngo to [front v] layer\nRespawn [-210] [0]\nset [paused v] to [0]\nset [level v] to [1]\nset [frame counter v] to [0]\nset [deaths on hard level v] to [0]\nset [dir v] to [90]\nforever\n    if <(paused) = [0]> then\n        point in direction (90)\n        switch costume to (cube3 v)\n        change [y speed v] by (-1)\n        Change Y (y speed)\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(touching ground) = [1]>> then\n            set [y speed v] to [17]\n            start sound [WU_SE_PLY_JUMP_HIGH_ v]\n        end\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            change [x speed v] by (2)\n        end\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            change [x speed v] by (-2)\n        end\n        if <(x speed) > [9]> then\n            set [x speed v] to [9]\n        else\n            if <(x speed) < [-9]> then\n                set [x speed v] to [-9]\n            end\n        end\n        Change X (x speed)\n        if <(x speed) > [0]> then\n            change [x speed v] by (-1)\n            change [dir v] by (x speed)\n        else\n            if <(x speed) < [0]> then\n                change [x speed v] by (1)\n                change [dir v] by (x speed)\n            end\n        end\n        switch costume to (cube3 v)\n        point in direction (dir)\n        change [frame counter v] by (1)\n        if <(frame counter) = [99]> then\n            set [frame counter v] to [0]\n        end\n        if <((frame counter) mod (3)) = [0]> then\n            switch costume to (cube4 v)\n            create clone of (_myself_ v)\n            switch costume to (cube3 v)\n        end\n        if <<(x position) > [239]> and <not <(level) = [10]>>> then\n            Respawn [-210] [0]\n            start sound (pick random (9) to (11))\n            change [level v] by (1)\n            set [deaths on hard level v] to [0]\n        end\n        if <<touching (rising lava v)?> or <touching (spikes v)?>> then\n            change [deaths on hard level v] by (1)\n            set [death sound v] to [1]\n            set [ghost v] effect to (50)\n            glide (.5) secs to x: (-210) y: (0)\n            set [ghost v] effect to (0)\n            Respawn [-210] [0]\n            set [y speed v] to [0]\n        end\n    end\nend\n\ndefine Respawn (x) (y)\nset x to (x)\nset y to (y)\n\ndefine Change X (x speed)\nset [slope v] to [0]\nif <(touching ground) = [1]> then\n    set [max slope v] to [15]\nelse\n    set [max slope v] to [1]\nend\nchange x by (x speed)\nif <touching (platforms v)?> then\n    repeat until <<not <touching (platforms v)?>> or <(slope) = (max slope)>>\n        change y by (1)\n        change [slope v] by (1)\n    end\nend\nif <(slope) = (max slope)> then\n    change y by (() - (slope))\n    set [x speed v] to [0]\n    if <(x speed) > [0]> then\n        repeat until <not <touching (platforms v)?>>\n            change x by (-1)\n        end\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [y speed v] to [15]\n            set [x speed v] to [-10]\n            start sound [Finger Snap v]\n        end\n    else\n        repeat until <not <touching (platforms v)?>>\n            change x by (1)\n        end\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [y speed v] to [15]\n            set [x speed v] to [10]\n            start sound [Finger Snap v]\n        end\n    end\nend\nif <(touching ground) = [1]> then\n    change y by (-15)\n    if <touching (platforms v)?> then\n        repeat until <not <touching (platforms v)?>>\n            change y by (1)\n        end\n    else\n        change y by (15)\n    end\nend\n\ndefine Change Y (y speed)\nchange y by (y speed)\nset [touching ground v] to [0]\nif <touching (platforms v)?> then\n    set [y speed v] to [0]\n    if <<(y speed) > [0]> or <(y speed) = [0]>> then\n        repeat until <not <touching (platforms v)?>>\n            change y by (-1)\n        end\n    else\n        set [touching ground v] to [1]\n        repeat until <not <touching (platforms v)?>>\n            change y by (1)\n        end\n        set [y speed v] to [13]\n        start sound [Basketball Bounce v]\n    end\nend\n\nwhen I start as a clone\nset size to (150) %\nrepeat (20)\n    change [ghost v] effect by (5)\n    change size by (-5)\nend\ndelete this clone\n\nwhen I receive [next level v]\nset [deaths on hard level v] to [0]\ndelete this clone\n\nwhen I receive [skip level v]\nRespawn [-210] [0]\nbroadcast (Next Level v) and wait\n\nwhen flag clicked\nforever\n    if <(death sound) = [1]> then\n        play sound [Luigi14 v] until done\n        set [death sound v] to [0]\n    end\nend\n\nglide (.5) secs to x: (-210) y: (0)\n\n@Platforms\n\nwhen flag clicked\nset [brightness v] effect to (5)\nswitch costume to ([sin v] of (90) )\nforever\n    switch costume to (level)\nend\n\nset [level v] to [9]\n\n@Spikes\n\nwhen flag clicked\nset [brightness v] effect to (-5)\nswitch costume to ([sin v] of (90) )\nforever\n    switch costume to (level)\nend\n\n@Rising Lava\n\nwhen flag clicked\nswitch costume to (lava v)\n\nwhen flag clicked\ngo to x: (0) y: (-15)\nforever\n    set y to ((-15) + ((12) * ([sin v] of ((300) * (timer)) )))\nend\n\n@Clouds\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen flag clicked\nswitch costume to ([sin v] of (90) )\nforever\n    switch costume to (level)\nend\n\n@Platform Designer\n\n@End\n\nwhen [timer v] > (timer)\ngo to [front v] layer\nshow\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nforever\n    set [timer v] to (timer)\nend\n\nwhen flag clicked\nhide\nswitch costume to (costume7 v)\ngo to [front v] layer\nset [level v] to [1]\nforever\n    if <(level) = [10]> then\n        start sound [Goal Cheer v]\n        wait (6) seconds\n        broadcast (wedfdg v)\n        go to x: (0) y: (628)\n        show\n        glide (3) secs to x: (0) y: (0)\n        set [paused v] to [1]\n        forever\n            set y to ((10) * ([cos v] of ((timer) * (150)) ))\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@Le7els\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\npoint in direction (90)\nshow\nset [brightness v] effect to (5)\nswitch costume to ([sin v] of (90) )\nforever\n    go to [front v] layer\n    switch costume to (level)\nend\n\nwhen I receive [wedfdg v]\nhide\n\n@Sprite1\n\nwhen flag clicked\nforever\n    if <(deaths on hard level) > [2]> then\n        show\n        go to [front v] layer\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <([x position v] of [player v]) < [210]> then\n    set [deaths on hard level v] to [0]\n    hide\n    change [level v] by (1)\nend\n\n@download\n\n