Smashy Stone - platformer

Instructions:                       W e l c o m e  to my platformer \n¤_¤_¤_¤_¤_¤_¤_¤_¤_¤_¤_¤_¤_¤_¤_¤_¤_¤_¤_¤_¤_¤_¤_¤_¤_¤_¤\n\nI n s t r u c t i o n s :\nUse wasd or arrow keys, and navigate trough your adventure... \nBut to get past each level, you must smash the coke. There are 15 levels. Other instructions will be in-game. PRESS R TO RESTART

@Stage\n\nwhen I receive [next v]\nnext backdrop\n\nwhen I receive [start v]\nswitch backdrop to (bakgrunn1 v)\nset [brightness v] effect to (0)\nset volume to (100) %\nforever\n    play sound [Ancient Music - Stone Age \(1\).mp3 v] until done\n    play sound [Ancient Music - Cavemen.mp3 v] until done\nend\n\nwhen I receive [you win finally v]\nstop all sounds\nstop [other scripts in stage v]\nbroadcast (black it v)\n\nwhen I receive [black it v]\nset [brightness v] effect to (0)\nwait (1) seconds\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\nrepeat (10)\n    change [brightness v] effect by (10)\nend\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\nrepeat (10)\n    change [brightness v] effect by (10)\nend\n\nwhen I receive [start v]\nswitch backdrop to (backdrop1 v)\nset [brightness v] effect to (0)\nset volume to (100) %\n\nwhen flag clicked\nswitch backdrop to (bakgrunn1 v)\nset [brightness v] effect to (0)\nset volume to (100) %\n\n@logo\n\nwhen flag clicked\nhide variable [stage v]\nshow\nset [ghost v] effect to (0)\nset [pixelate v] effect to (0)\nset size to (90) %\ngo to x: (-20) y: (0)\nwait (2) seconds\nrepeat (10)\n    change [pixelate v] effect by (10)\nend\nrepeat (10)\n    change [pixelate v] effect by (-10)\nend\nbroadcast (dissepearLogo v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nshow variable [stage v]\nbroadcast (start v)\nhide\n\n@deSmashyStone\n\nwhen [up arrow v] key pressed\nif <<<touching color (#009933)?> or <touching color (#7f00ff)?>> or <touching color (#00cc44)?>> then\n    if <not <touching color (#006622)?>> then\n        if <touching color (#7f00ff)?> then\n            set [vel v] to [0]\n            set [vel v] to ((vel) + (13))\n        else\n            set [vel v] to []\n            set [vel v] to ((vel) + (5))\n        end\n    end\nend\n\nwhen [space v] key pressed\nif <<<touching color (#009933)?> or <touching color (#7f00ff)?>> or <touching color (#00cc44)?>> then\n    if <not <touching color (#006622)?>> then\n        if <touching color (#7f00ff)?> then\n            set [vel v] to [0]\n            set [vel v] to ((vel) + (13))\n        else\n            set [vel v] to []\n            set [vel v] to ((vel) + (5))\n        end\n    end\nend\n\nwhen I receive [start v]\nshow\nswitch costume to (drakt2 v)\nset [x movement 2 v] to [0]\npoint in direction (90)\ngo to x: (-165) y: (-72)\nset [vel v] to [0]\nset [x gravity v] to [0]\nset [gravity v] to [-0.6]\nforever\n    if <touching color (#009933)?> then\n        if <not <<key (up arrow v) pressed?> or <<key (space v) pressed?> or <key (w v) pressed?>>>> then\n            if <not <(vel) > [1]>> then\n                set [vel v] to [0]\n            end\n        else\n            wait until <not <touching color (#009933)?>>\n        end\n    else\n        set [vel v] to ((vel) + (gravity))\n    end\nend\n\nwhen flag clicked\nset size to (100) %\nhide\npoint in direction (90)\nswitch costume to (drakt2 v)\ngo to x: (-165) y: (-72)\n\nwhen I receive [you win finally v]\nstop [other scripts in sprite v]\nwait (5) seconds\nbroadcast (triumphsound v)\nglide (1) secs to x: (0) y: (-26)\nrepeat (150)\n    change y by (0.5)\nend\n\nwhen I receive [triumphsound v]\nrepeat (2)\n    play sound [triumph v] until done\nend\nwait (1) seconds\nstart sound [glass break :\) v]\npoint in direction (90)\nswitch costume to (drakt1 v)\nrepeat (25)\n    change y by (-2)\nend\nthink [Hmm...] for (1) seconds\nbroadcast (start v)\n\nwhen I receive [start v]\nforever\n    if <<touching (_edge_ v)?> or <touching color (#006622)?>> then\n        if <[1] < (vel)> then\n            set [vel v] to ((vel) * (-1))\n        else\n            if <(vel) < [-1]> then\n                if <<touching color (#009933)?> and <touching color (#00cc44)?>> then\n                    set [vel v] to ((vel) * (1))\n                end\n            end\n        end\n        set [x movement 2 v] to ((x movement) * (-5))\n        wait until <not <<touching (_edge_ v)?> and <touching color (#006622)?>>>\n    end\nend\n\nwhen [w v] key pressed\nif <<<touching color (#009933)?> or <touching color (#7f00ff)?>> or <touching color (#00cc44)?>> then\n    if <not <touching color (#006622)?>> then\n        if <touching color (#7f00ff)?> then\n            set [vel v] to [0]\n            set [vel v] to ((vel) + (13))\n        else\n            set [vel v] to []\n            set [vel v] to ((vel) + (5))\n        end\n    end\nend\n\nturn right (1.25) degrees\n\nwhen [r v] key pressed\ngo to x: (-165) y: (-72)\n\nwhen I receive [next v]\nset [x movement 2 v] to [0]\nset [x movement v] to [0]\nset [vel v] to [0]\n\nwhen I receive [start v]\nforever\n    if <touching color (#009933)?> then\n        if <not <<key (up arrow v) pressed?> or <<key (space v) pressed?> or <key (w v) pressed?>>>> then\n            if <not <(vel) > [1]>> then\n                set [vel v] to [0]\n            end\n        end\n    end\nend\n\nwhen I receive [start v]\nset [x gravity v] to [-0.6]\nset [stage v] to [1]\nforever\n    set y to ((y position) + (vel))\n    change x by (x movement 2)\n    change x by (x movement)\n    if <touching (bugfixer v)?> then\n        go to x: (-165) y: (-72)\n        set [x movement 2 v] to [0]\n        set [x movement v] to [0]\n        set [vel v] to [0]\n    end\n    if <touching (end v)?> then\n        change [stage v] by (1)\n        go to x: (-165) y: (-72)\n        broadcast (NEXT v)\n    end\n    if <not <touching (_edge_ v)?>> then\n        set [x movement 2 v] to ((x movement 2) * (0.8))\n    end\n    if <touching color (#cccc00)?> then\n        go to x: (-186) y: (-72)\n        broadcast (deleteyellow v)\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        if <touching color (#00cc44)?> then\n            if <not <touching color (#006622)?>> then\n                change y by (2)\n            end\n        end\n        set [x movement v] to [1.5]\n    else\n        if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n            if <touching color (#00cc44)?> then\n                if <not <touching color (#006622)?>> then\n                    change y by (2)\n                end\n            end\n            set [x movement v] to [-1.5]\n        else\n            set [x movement v] to ((x movement) * (0.85))\n        end\n    end\n    if <touching color (#ff9400)?> then\n        set [vel v] to [0]\n        set [x movement 2 v] to [-15]\n    else\n        if <touching color (#cc7700)?> then\n            set [vel v] to [0]\n            set [x movement 2 v] to [15]\n        end\n    end\n    if <touching color (#00cc44)?> then\n        set [vel v] to [0]\n    end\n    if <<touching (trophy v)?> and <touching color (#ffff00)?>> then\n        broadcast (YOU WIN FINALLY v)\n    end\n    if <<<touching color (#00cc44)?> and <touching color (#006622)?>> and <not <touching color (#009933)?>>> then\n        change y by (-10)\n    end\n    if <<<touching color (#009933)?> and <touching color (#006622)?>> and <not <touching color (#00cc44)?>>> then\n        change y by (-10)\n    end\n    if <<<touching color (#00cc44)?> and <touching color (#006622)?>> and <touching color (#009933)?>> then\n        change y by (10)\n    end\n    turn right (x movement) degrees\n    turn right (x movement 2) degrees\nend\n\nset size to (300) %\n\n@Folk (not in use)\n\nwhen flag clicked\nswitch costume to (drakt1 v)\ngo to x: (200) y: (0)\npoint in direction (90)\nwait (3) seconds\nset [x movement 2 v] to [0]\nset [vel v] to [0]\nset [x gravity v] to [0]\nset [gravity v] to [-0.6]\nforever\n    if <touching color (#009933)?> then\n        set [vel v] to ((vel) * (-0.5))\n        wait until <not <touching color (#009933)?>>\n        repeat until <touching color (#009933)?>\n            set [vel v] to ((vel) + (gravity))\n        end\n        wait until <touching color (#009933)?>\n    else\n        set [vel v] to ((vel) + (gravity))\n    end\nend\n\nif <touching (_edge_ v)?> then\n    set [x movement v] to [-10]\nend\nif <touching (_edge_ v)?> then\n    set [x movement v] to [10]\nend\n\nwhen flag clicked\nset [x gravity v] to [-0.6]\nwait (3) seconds\nforever\n    if <(Dir) = [1]> then\n        if <touching color (#00cc44)?> then\n            change y by (1)\n        end\n        set [x movement v] to [1]\n    else\n        if <(Dir) = [-1]> then\n            if <touching color (#00cc44)?> then\n                change y by (1)\n            end\n            set [x movement v] to [-1]\n        else\n            set [x movement v] to ((x movement) * (0.8))\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    set y to ((y position) + (vel))\n    change x by (x movement 2)\n    change x by (x movement)\n    if <touching (_edge_ v)?> then\n        set [x movement 2 v] to ((x movement) * (-5))\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <touching (_edge_ v)?>> then\n        set [x movement 2 v] to ((x movement 2) * (0.8))\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (desmashystone v)?> then\n        if <touching color (#009933)?> then\n            stop [other scripts in sprite v]\n            switch costume to (drakt3 v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#009933)?> then\n        if <not <key (space v) pressed?>> then\n            set [vel v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    wait (pick random (0) to (5)) seconds\n    set [dir v] to (pick random (1) to (-1))\nend\n\nwhen flag clicked\nwait (3) seconds\nforever\n    wait (pick random (1) to (4)) seconds\n    if <touching color (#009933)?> then\n        set [vel v] to []\n        set [vel v] to ((vel) + (5))\n    end\nend\n\n@End\n\n@Coke/key\n\nwhen I start as a clone\nif <(Stage) = [1]> then\n    go to x: (80) y: (-78)\nend\nif <(Stage) = [2]> then\n    go to x: (0) y: (-126)\nend\nif <(Stage) = [3]> then\n    go to x: (98) y: (68)\nend\nif <(Stage) = [4]> then\n    go to x: (-230) y: (57)\nend\nif <(Stage) = [5]> then\n    go to x: (25) y: (33)\nend\nif <(Stage) = [6]> then\n    go to x: (27) y: (6)\nend\nif <(Stage) = [7]> then\n    go to x: (-224) y: (44)\nend\nif <(Stage) = [8]> then\n    go to x: (-227) y: (44)\nend\nif <(Stage) = [9]> then\n    go to x: (-209) y: (50)\nend\nif <(Stage) = [10]> then\n    go to x: (-226) y: (60)\nend\nif <(Stage) = [11]> then\n    go to x: (200) y: (60)\nend\nif <(Stage) = [12]> then\n    go to x: (-4) y: (-75)\nend\nif <(Stage) = [13]> then\n    go to x: (-231) y: (57)\nend\nif <(Stage) = [14]> then\n    go to x: (220) y: (10)\nend\nif <(Stage) = [15]> then\n    hide\n    delete this clone\nend\nshow\nswitch costume to (drakt1 v)\nforever\n    if <<touching color (#cccccc)?> and <touching (desmashystone v)?>> then\n        switch costume to (drakt2 v)\n        start sound [The real Coca Cola sounds - Extreme Sound Design \(coke beer opening can sound effects\).mp3 v]\n        wait (0.3) seconds\n        broadcast (open v)\n        delete this clone\n    end\nend\n\nwhen flag clicked\nset size to (100) %\nshow variable [stage v]\nhide\n\ncreate clone of (_myself_ v)\n\nwhen I receive [next v]\ndelete this clone\n\nwhen I receive [start v]\nwait (0.1) seconds\ncreate clone of (_myself_ v)\n\nwhen I receive [next v]\nwait (0.1) seconds\ncreate clone of (_myself_ v)\n\nbroadcast (next v)\n\nset size to (500) %\n\n@Barrier\n\nwhen I start as a clone\nshow\ngo to x: (208) y: (1)\n\nwhen I receive [open v]\ndelete this clone\n\nwhen I receive [next v]\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\ncreate clone of (_myself_ v)\n\n@Spike\n\nwhen I start as a clone\nshow\nif <(Stage) = [5]> then\n    go to x: (pick random (100) to (-100)) y: (190)\n    repeat until <<touching color (#009933)?> or <touching color (#cccc00)?>>\n        change y by (-1)\n    end\n    delete this clone\nend\nif <(Stage) = [6]> then\n    go to x: (pick random (240) to (-200)) y: (190)\n    repeat until <<touching color (#009933)?> or <touching color (#cccc00)?>>\n        change y by (-1)\n    end\n    delete this clone\nend\nif <(Stage) = [7]> then\n    go to x: (pick random (-240) to (-180)) y: (190)\n    repeat until <<touching color (#009933)?> or <touching color (#cccc00)?>>\n        change y by (-1)\n    end\n    delete this clone\nend\nif <(Stage) = [8]> then\n    go to x: (pick random (-240) to (-15)) y: (190)\n    repeat until <<touching color (#009933)?> or <touching color (#cccc00)?>>\n        change y by (-1)\n    end\n    delete this clone\nend\nif <(Stage) = [9]> then\n    point in direction (180)\n    go to x: (240) y: (pick random (170) to (-140))\n    repeat until <<touching color (#009933)?> or <touching color (#cccc00)?>>\n        change x by (-0.3)\n    end\n    delete this clone\nend\nif <(Stage) = [11]> then\n    point in direction (90)\n    go to x: (pick random (240) to (-240)) y: (190)\n    repeat until <<touching color (#009933)?> or <touching color (#cccc00)?>>\n        change y by (-0.5)\n    end\n    delete this clone\nend\nif <(Stage) = [12]> then\n    point in direction (90)\n    go to x: (pick random (240) to (-200)) y: (190)\n    repeat until <<touching color (#009933)?> or <touching color (#cccc00)?>>\n        change y by (-2)\n    end\n    delete this clone\nend\nif <(Stage) = [13]> then\n    point in direction (180)\n    go to x: (250) y: (-40)\n    repeat until <<touching color (#009933)?> or <touching color (#cccc00)?>>\n        change x by (-6)\n    end\n    delete this clone\nend\n\nwhen I receive [next v]\nif <(Stage) = [5]> then\n    repeat until <(Stage) = [6]>\n        wait (pick random (3) to (5)) seconds\n        create clone of (_myself_ v)\n    end\nend\nif <(Stage) = [6]> then\n    repeat until <(Stage) = [7]>\n        wait (pick random (1.5) to (3.5)) seconds\n        create clone of (_myself_ v)\n    end\nend\nif <(Stage) = [7]> then\n    repeat until <(Stage) = [8]>\n        wait (pick random (1) to (4)) seconds\n        create clone of (_myself_ v)\n    end\nend\nif <(Stage) = [8]> then\n    repeat until <(Stage) = [9]>\n        wait (pick random (3) to (6)) seconds\n        create clone of (_myself_ v)\n    end\nend\nif <(Stage) = [9]> then\n    repeat until <(Stage) = [10]>\n        wait (pick random (20) to (35)) seconds\n        create clone of (_myself_ v)\n    end\nend\nif <(Stage) = [11]> then\n    repeat until <(Stage) = [12]>\n        wait (pick random (15) to (22)) seconds\n        create clone of (_myself_ v)\n    end\nend\nif <(Stage) = [12]> then\n    repeat until <(Stage) = [13]>\n        wait (pick random (0.25) to (0.9)) seconds\n        create clone of (_myself_ v)\n    end\nend\nif <(Stage) = [13]> then\n    repeat until <(Stage) = [14]>\n        wait (pick random (0.5) to (3.5)) seconds\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I receive [deleteyellow v]\ndelete this clone\n\nwhen I receive [next v]\ndelete this clone\n\nwhen I start as a clone\nwait until <not <touching (_edge_ v)?>>\nrepeat until <touching (_edge_ v)?>\nend\ndelete this clone\n\nwhen flag clicked\nhide\nwait (1) seconds\n\n@Platform1\n\nwhen I receive [next v]\nwait (0.01) seconds\nif <(Stage) = [8]> then\n    create clone of (_myself_ v)\nend\nif <(Stage) = [9]> then\n    repeat (1)\n        create clone of (_myself_ v)\n    end\nend\nif <(Stage) = [11]> then\n    repeat (1)\n        create clone of (_myself_ v)\n    end\nend\nif <(Stage) = [12]> then\n    repeat (1)\n        create clone of (_myself_ v)\n    end\nend\nif <(Stage) = [13]> then\n    repeat (1)\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nshow\nif <(Stage) = [8]> then\n    switch costume to (costume1 v)\n    go to x: (18) y: (-128)\n    repeat until <(Stage) = [9]>\n        glide (5) secs to x: (200) y: (-128)\n        glide (2.55) secs to x: (18) y: (-128)\n    end\nend\nif <(Stage) = [9]> then\n    switch costume to (costume2 v)\n    go to x: (18) y: (-128)\n    repeat until <(Stage) = [10]>\n        glide (7) secs to x: (150) y: (-128)\n        glide (7) secs to x: (-50) y: (-128)\n    end\nend\nif <(Stage) = [11]> then\n    switch costume to (costume2 v)\n    go to x: (-155) y: (26)\n    repeat until <(Stage) = [12]>\n        glide (12) secs to x: (94) y: (26)\n        glide (12) secs to x: (-155) y: (26)\n    end\nend\nif <(Stage) = [12]> then\n    switch costume to (costume1 v)\n    go to x: (-156) y: (167)\n    repeat until <(Stage) = [13]>\n        glide (15) secs to x: (156) y: (167)\n        glide (15) secs to x: (-156) y: (167)\n    end\nend\nif <(Stage) = [13]> then\n    switch costume to (costume1 v)\n    go to x: (-154) y: (35)\n    repeat until <(Stage) = [14]>\n        glide (11) secs to x: (154) y: (35)\n        glide (11) secs to x: (-154) y: (35)\n    end\nend\n\ngo to x: (-156) y: (167)\n\nwhen I receive [next v]\ndelete this clone\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset size to (300) %\n\n@Platform2\n\nwhen I start as a clone\nshow\nif <(Stage) = [9]> then\n    switch costume to (costume1 v)\n    go to x: (130) y: (30)\n    repeat until <(Stage) = [10]>\n        glide (9) secs to x: (-130) y: (30)\n        glide (9) secs to x: (130) y: (30)\n    end\nend\nif <(Stage) = [11]> then\n    switch costume to (costume3 v)\n    go to x: (0) y: (-126)\n    glide (0) secs to x: (191) y: (-126)\n    repeat until <(Stage) = [12]>\n        glide (9) secs to x: (-1) y: (-126)\n        glide (9) secs to x: (191) y: (-126)\n    end\nend\nif <(Stage) = [12]> then\n    switch costume to (costume1 v)\n    go to x: (156) y: (100)\n    repeat until <(Stage) = [13]>\n        glide (15) secs to x: (-156) y: (100)\n        glide (15) secs to x: (156) y: (100)\n    end\nend\nif <(Stage) = [13]> then\n    switch costume to (costume1 v)\n    go to x: (154) y: (35)\n    repeat until <(Stage) = [14]>\n        glide (11) secs to x: (-154) y: (35)\n        glide (11) secs to x: (154) y: (35)\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset size to (300) %\n\nwhen I receive [next v]\nwait (0.01) seconds\nif <(Stage) = [9]> then\n    repeat (1)\n        create clone of (_myself_ v)\n    end\nend\nif <(Stage) = [11]> then\n    repeat (1)\n        create clone of (_myself_ v)\n    end\nend\nif <(Stage) = [12]> then\n    repeat (1)\n        create clone of (_myself_ v)\n    end\nend\nif <(Stage) = [13]> then\n    repeat (1)\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I receive [next v]\ndelete this clone\n\n@Bugfixer\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\nwhen flag clicked\nhide\nshow\n\n@Invisible\n\nwhen flag clicked\nhide\ngo to x: (-351) y: (31)\n\nwhen I start as a clone\nshow\ngo to x: (-351) y: (31)\nrepeat until <(Stage) = [11]>\n    glide (7) secs to x: (150) y: (31)\n    glide (7) secs to x: (-351) y: (31)\nend\ndelete this clone\n\nwhen I receive [next v]\nif <(Stage) = [10]> then\n    create clone of (_myself_ v)\nend\n\nwhen I receive [next v]\ndelete this clone\n\n@Barry\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nif <(Stage) = [14]> then\n    go to x: (143) y: (-8)\n    repeat until <(Stage) = [15]>\n        glide (0.4) secs to x: (143) y: (-131)\n        glide (0.4) secs to x: (143) y: (119)\n    end\n    delete this clone\nend\n\nwhen I receive [next v]\ndelete this clone\n\nwhen I receive [next v]\nwait (0.1) seconds\nif <(Stage) = [14]> then\n    create clone of (_myself_ v)\nend\n\nset [stage v] to [14]\nbroadcast (NEXT v)\n\n@TROPHY\n\nwhen flag clicked\nset size to (100) %\nhide\nforever\n    if <(Stage) = [15]> then\n        show\n    else\n        hide\n    end\nend\n\nif  then\nend\n\nwhen I receive [start v]\nhide\n\nwhen flag clicked\nrepeat (100)\n    hide\nend\n\nset size to (300) %\n\n@Figur1\n\n