~Ice~ (A Platformer)


@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nforever\n    if <(lvl) = [11]> then\n        switch backdrop to (backdrop2 v)\n    end\n    if <(lvl) = [12]> then\n        switch backdrop to (backdrop3 v)\n    end\n    if <(lvl) = [13]> then\n        switch backdrop to (backdrop6 v)\n    end\n    if <(lvl) = [14]> then\n        switch backdrop to (backdrop4 v)\n    end\n    if <(lvl) = [15]> then\n        switch backdrop to (backdrop5 v)\n    end\nend\n\n@Player\n\nwhen I receive [start game v]\ngo to x: (-198) y: (-126)\nset size to (100) %\nshow\nforever\n    go to [front v] layer\n    if <key (left arrow v) pressed?> then\n        change [xvel v] by (-1)\n    end\n    if <key (right arrow v) pressed?> then\n        change [xvel v] by (1)\n    end\n    set [xvel v] to ((Xvel) * (.97))\n    change x by (Xvel)\n    if <<touching (ground v)?> or <touching (cork v)?>> then\n        change y by (1)\n        if <<touching (ground v)?> or <touching (cork v)?>> then\n            change y by (1)\n            if <<touching (ground v)?> or <touching (cork v)?>> then\n                change y by (1)\n                if <<touching (ground v)?> or <touching (cork v)?>> then\n                    change y by (1)\n                    if <<touching (ground v)?> or <touching (cork v)?>> then\n                        change y by (1)\n                        if <<touching (ground v)?> or <touching (cork v)?>> then\n                            change y by (1)\n                            if <<touching (ground v)?> or <touching (cork v)?>> then\n                                change y by (1)\n                                if <<touching (ground v)?> or <touching (cork v)?>> then\n                                    change x by ((Xvel) * (-1))\n                                    change y by (-7)\n                                    if <key (up arrow v) pressed?> then\n                                        if <(Xvel) > [0]> then\n                                            set [xvel v] to [-5]\n                                        else\n                                            set [xvel v] to [5]\n                                        end\n                                        set [yvel v] to [10]\n                                    else\n                                        set [xvel v] to [0]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yvel v] by (-1)\n    change y by (Yvel)\n    if <<touching (ground v)?> or <touching (cork v)?>> then\n        change y by ((Yvel) * (-1))\n        set [yvel v] to [0]\n    end\n    change y by (-1)\n    if <<touching (ground v)?> or <touching (cork v)?>> then\n        if <key (up arrow v) pressed?> then\n            set [yvel v] to [15]\n        end\n    end\n    change y by (1)\nend\n\nwhen flag clicked\nset [lvl v] to [0]\nhide\nforever\n    if <(x position) > [230]> then\n        change [lvl v] by (1)\n        go to x: (-198) y: (-126)\n        set [yvel v] to [0]\n        set [xvel v] to [0]\n    end\n    if <touching color (#ff0000)?> then\n        go to x: (-198) y: (-126)\n        set [yvel v] to [0]\n        set [xvel v] to [0]\n    end\nend\n\nwhen I receive [player bounce v]\nchange [xvel v] by (-30)\n\nwhen I receive [start game v]\nwait (.5) seconds\nforever\n    play sound [Windfall.mp3 v] until done\nend\n\n@Ground\n\nwhen flag clicked\n\nwhen I receive [start game v]\nset [lvl v] to [1]\nswitch costume to (costume1 v)\nforever\n    switch costume to (lvl)\nend\n\n@me logo from @nitrogenstrike\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [sine v] to [0]\npoint in direction (90)\nforever\n    change [sine v] by (7.5)\n    point in direction ((([sin v] of (sine) ) * (15)) + (90))\n    set size to ((([sin v] of ((sine) * (2)) ) * (25)) + (100)) %\nend\n\nwhen I receive [fade v]\nforever\n    change [ghost v] effect by (5)\nend\n\nstop [other scripts in sprite v]\n\npoint in direction (90)\n\nwhen flag clicked\nshow\nwait (7) seconds\nbroadcast (start game v)\nhide\n\n@grey back thingy\n\nwhen flag clicked\nshow\nstart sound [TheFatRat - Jackpot \(Jackpot EP Track 1\).mp3 v]\nset volume to (100) %\n\nwhen I receive [fade v]\nforever\n    change volume by (-2)\nend\n\nwhen I receive [start game v]\nhide\n\n@--Atomic--\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (0)\nhide\nwait (3) seconds\nset [x v] to [30]\nshow\ngo to x: (300) y: (0)\nrepeat until <(x position) = [0]>\n    set [x v] to ((x) / (1.1))\n    change x by ((0) - (x))\nend\n\nwhen flag clicked\nwait (5) seconds\nbroadcast (Fade v)\nforever\n    change [ghost v] effect by (5)\nend\n\nwhen I receive [start game v]\nhide\n\n@Thumbnail\n\nwhen flag clicked\nhide\n\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\n\n@lava\n\nwhen flag clicked\nset [lvl v] to [1]\nforever\n    go to x: (0) y: (0)\n    switch costume to (lvl)\nend\n\n@cork\n\nwhen I receive [broadcast player bounce v]\nbroadcast (player bounce v)\nglide (1) secs to x: (36) y: (28)\n\nwhen flag clicked\nrepeat until <(lvl) = [18]>\n    hide\nend\ngo to x: (40) y: (170)\nshow\nwait until <(lvl) = [19]>\nhide\n\n@cork2\n\nwhen flag clicked\nrepeat until <(lvl) = [18]>\n    hide\nend\ngo to x: (33) y: (170)\nshow\nwait until <touching (player v)?>\nbroadcast (broadcast player bounce v)\nhide\n\n@Words\n\nwhen flag clicked\nset [lvl v] to [1]\nforever\n    go to x: (0) y: (0)\n    switch costume to (lvl)\nend\n\n