Bjorne's Expedition - A platformer
@Stage\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [11]> then\n    switch backdrop to (värld 2 - heta sanden v)\n    change [☁ !global - 1 v] by (1)\nend\nif <(Bana!?) = [21]> then\n    switch backdrop to (värld 3 - spökstället v)\n    change [☁ !global - 2 v] by (1)\nend\nif <(Bana!?) = [31]> then\n    switch backdrop to (värld 4 - magmabergen v)\n    change [☁ !global - 3 v] by (1)\nend\n\nwhen flag clicked\nset [spelet är igång!? v] to [nej]\nset [björne kan röra på sig!!? v] to [nej]\nswitch backdrop to (värld 1 - gräsön v)\nset [spelläge!!?? v] to [normal]\n\nwhen I receive [himlen v]\nswitch backdrop to (värld 5 - himlen v) and wait\nchange [☁ !global - klar v] by (1)\n\nwhen flag clicked\ndelete (all) of [tid v]\nshow list [tid v]\n\nwhen flag clicked\nset [st-räknare minut v] to [0]\nset [speltidsräknare v] to [0]\nforever\n    if <(Spelet är igång!?) = [ja]> then\n        change [speltidsräknare v] by (1)\n        wait (1) seconds\n        if <(Speltidsräknare) = [60]> then\n            set [speltidsräknare v] to [0]\n            change [st-räknare minut v] by (1)\n        end\n    end\nend\n\nwhen I receive [nästa bana v]\nif <(Bana!?) = [11]> then\n    add (join [Värld 1 tog ] (join (join (St-räknare minut) [ minuter och ]) (join (Speltidsräknare) [ sekunder.]))) to [tid v]\n    set [speltidsräknare v] to [0]\nend\nif <(Bana!?) = [21]> then\n    add (join [Värld 2 tog ] (join (join (St-räknare minut) [ minuter och ]) (join (Speltidsräknare) [ sekunder.]))) to [tid v]\n    set [speltidsräknare v] to [0]\nend\nif <(Bana!?) = [31]> then\n    add (join [Värld 3 tog ] (join (join (St-räknare minut) [ minuter och ]) (join (Speltidsräknare) [ sekunder.]))) to [tid v]\n    set [speltidsräknare v] to [0]\nend\n\nwhen I receive [himlen v]\nadd (join [Värld 4 tog ] (join (join (St-räknare minut) [ minuter och ]) (join (Speltidsräknare) [ sekunder.]))) to [tid v]\nset [speltidsräknare v] to [0]\n\nwhen I receive [starta spelet v]\nwait (1) seconds\nbroadcast (meddelande1 v)\nset [spelet är igång!? v] to [ja]\n\nwhen I receive [björne död v]\nwait (1) seconds\nstop [all v]\n\n@Björne\n\nwhen flag clicked\nforever\n    if <(Spelet är igång!?) = [ja]> then\n        if <(Björne kan röra på sig!!?) = [ja]> then\n            if <<<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> and <(Rör marken!?) = [ja]>> then\n                next costume\n            end\n            if <not <<<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> and <(Rör marken!?) = [ja]>>> then\n                repeat until <<(costume [number v]) = [1]> or <(costume [number v]) = [11]>>\n                    next costume\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Spelet är igång!?) = [ja]> then\n        if <(Björne kan röra på sig!!?) = [ja]> then\n            if <key (left arrow v) pressed?> then\n                point in direction (-90)\n            end\n            if <key (right arrow v) pressed?> then\n                point in direction (90)\n            end\n        end\n    end\nend\n\nwhen I receive [skada - fiende v]\nset [skadehopp v] to [20]\nset rotation style [all around v]\nrepeat (9)\n    turn left (10) degrees\n    change [skadehopp v] by (-4)\n    change y by (SKADEHOPP)\nend\nwait (0.2) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nif <not <(Liv) = [0]>> then\n    set rotation style [left-right v]\n    wait (0.6) seconds\n    show\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nend\n\nwhen I receive [skada - void v]\nrepeat (10)\n    change y by (-10)\n    change [ghost v] effect by (25)\nend\nhide\nif <not <(Liv) = [0]>> then\n    wait (1) seconds\n    show\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nend\n\nwhen I receive [blixt tagen v]\nset [brightness v] effect to (70)\nwait (0.7) seconds\nrepeat (10)\n    change [brightness v] effect by (-7)\nend\nchange [poäng v] by (15)\n\nwhen flag clicked\nset [storlek v] to [8]\n\nwhen I receive [meddelande1 v]\nwait (1) seconds\nset size to (35) %\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\n    change size by (Storlek)\n    change [storlek v] by (-1)\nend\nwait (0.2) seconds\nset [björne kan röra på sig!!? v] to [ja]\nforever\n    go to (hitbox v)\nend\n\nwhen flag clicked\nset size to (70) %\ngo to x: (-208) y: (117)\nset rotation style [left-right v]\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [skada - bränd v]\nrepeat (4)\n    change [brightness v] effect by (-25)\nend\nwait (0.2) seconds\nbroadcast (Aska v)\npoint in direction (90)\nset rotation style [all around v]\nrepeat (10)\n    turn right (pick random (-2) to (2)) degrees\n    change size by (-1)\n    change [ghost v] effect by (10)\nend\nhide\nif <not <(Liv) = [0]>> then\n    set size to (70) %\n    set [brightness v] effect to (0)\n    set rotation style [left-right v]\n    wait (0.45) seconds\n    show\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nend\n\n@Hitbox\n\nwhen flag clicked\ngo to x: (-208) y: (117)\nset rotation style [left-right v]\nset size to (70) %\nset [ghost v] effect to (100)\nshow\nset [antalet hopp v] to [0]\nset [speed y v] to [0]\nset [falling? v] to [10]\nforever\n    if <(Spelet är igång!?) = [ja]> then\n        if <(Björne kan röra på sig!!?) = [ja]> then\n            change [speed y v] by (-1)\n            change y by (speed y)\n            Touch Ground <(speed y) > [0]>\n            if <not <touching (kvicksand v)?>> then\n                if <key (left arrow v) pressed?> then\n                    Walk (-90) (join [-] (Gåstyrka XXX))\n                end\n                if <key (right arrow v) pressed?> then\n                    Walk (90) (Gåstyrka XXX)\n                end\n                if <<key (up arrow v) pressed?> and <(falling?) < [3]>> then\n                    set [speed y v] to (Hoppstryka XXX)\n                end\n            end\n            if <touching (kvicksand v)?> then\n                if <key (left arrow v) pressed?> then\n                    Walk (-90) (join [-] [0.5])\n                end\n                if <key (right arrow v) pressed?> then\n                    Walk (90) (0.5)\n                end\n            end\n        end\n    end\nend\n\ndefine Touch Ground <>\nchange [falling? v] by (1)\nrepeat until <not <<touching (bana v)?> or <<touching (spökplanka v)?> or <<touching (stenplattform v)?> or <touching (templeblock v)?>>>>>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    set [speed y v] to [0]\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nset [spelet är igång!? v] to [ja]\ngo to x: (-208) y: (117)\n\nwhen flag clicked\nforever\n    if <(falling?) = [0]> then\n        set [rör marken!? v] to [ja]\n    else\n        set [rör marken!? v] to [nej]\n    end\n    if <(speed y) < [0]> then\n        set [faller!? v] to [ja]\n    else\n        set [faller!? v] to [nej]\n    end\nend\n\nwhen flag clicked\nset [antalet liv v] to [30]\n\nwhen I receive [björne - litet hopp v]\nset [speed y v] to [5]\n\ndefine None\npoint in direction (direction)\nchange x by (speed)\nset [slope v] to [0]\nrepeat until <<(slope) = [8]> or <not <<touching (bana v)?> or <<touching (trampolin v)?> or <<touching (spökplanka v)?> or <<touching (stenplattform v)?> or <touching (templeblock v)?>>>>>>>\n    change y by (1)\n    change [slope v] by (1)\nend\nif <(slope) = [8]> then\n    change x by ((0) - (speed))\n    change y by ((0) - (slope))\nend\n\nwhen flag clicked\nset [kan skadas!? v] to [ja]\n\nwhen flag clicked\nforever\n    if <(Björne kan röra på sig!!?) = [ja]> then\n        if <(Träffad av kaktus!!??) = [nej]> then\n            if <not <(Bob-tid) = [0]>> then\n                if <touching (knaktus v)?> then\n                    set [träffad av kaktus!!?? v] to [ja]\n                    broadcast (Bob 2 - Förlust v)\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (trampolin v)?> then\n        if <not <(falling?) = [0]>> then\n            set [speed y v] to [21]\n            broadcast (Trampolin v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(x position) > [235]> then\n        if <(Spelet är igång!?) = [ja]> then\n            if <(Boss igång!?) = [nej]> then\n                set [spelet är igång!? v] to [nej]\n                set [antalet hopp v] to [0]\n                broadcast (Bort med musiken v)\n                change [poäng v] by (2)\n            end\n        end\n    end\nend\n\nwhen I receive [spräng-hopp v]\nset [speed y v] to [20]\n\nwhen flag clicked\nforever\n    if <(Spelet är igång!?) = [ja]> then\n        if <(Björne kan röra på sig!!?) = [ja]> then\n            if <(Kan skadas!?) = [ja]> then\n                if <<touching (hoppi v)?> or <<touching (morot v)?> or <<touching (näbbus v)?> or <<touching (bä-hä v)?> or <<touching (herr hoppitott - tass 1 v)?> or <<touching (herr hoppitott - tass 2 v)?> or <<touching (herr hoppitott - morot v)?> or <touching (herr hoppitott - morot sidan v)?>>>>>>>> then\n                    broadcast (Skada - Fiende v)\n                end\n                if <<touching (benel v)?> or <<touching (slickistick v)?> or <<touching (gunt v)?> or <<touching (gunt a gnag - hatt v)?> or <<touching (gunt a gnag - gunta 1 v)?> or <touching (gunt a gnag - gunta 2 v)?>>>>>> then\n                    broadcast (Skada - Fiende v)\n                end\n                if <(Gunt a gnag, nudda?) = [nej]> then\n                    if <touching (gunt a gnag v)?> then\n                        broadcast (Skada - Fiende v)\n                    end\n                end\n                if <<touching (kattadratt v)?> or <<touching (lakibu v)?> or <<<touching (spintus v)?> or <touching (kung spinnidung - tråd 1 v)?>> or <<touching (kung spinnidung - tråd 2 v)?> or <<touching (kung spinnedung - kraft v)?> or <touching (kung spinnedung - spintus v)?>>>>>> then\n                    broadcast (Skada - Fiende v)\n                end\n                if <(Kung Spinnedung, nudda?) = [nej]> then\n                    if <touching (kung spinnidung v)?> then\n                        broadcast (Skada - Fiende v)\n                    end\n                end\n                if <touching (lava v)?> then\n                    broadcast (Skada - Bränd v)\n                end\n                if <<touching (eldklot v)?> or <<touching (eldklot 2 v)?> or <touching (eldklot 3 v)?>>> then\n                    broadcast (Skada - Bränd v)\n                end\n                if <(Gråbjörn, nudda?) = [nej]> then\n                    if <touching (gråbjörn v)?> then\n                        broadcast (Skada - Fiende v)\n                    end\n                end\n            end\n            if <(y position) < [-180]> then\n                broadcast (Skada - Void v)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Spelet är igång!?) = [ja]> then\n        if <(Björne kan röra på sig!!?) = [ja]> then\n            if <not <touching (kvicksand v)?>> then\n                if <<key (up arrow v) pressed?> and <(falling?) < [3]>> then\n                    start sound (pick random (1) to (3))\n                    change [antalet hopp v] by (1)\n                    wait (0.2) seconds\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (kvicksand v)?> then\n        set [speed y v] to [-0.05]\n    end\nend\n\nwhen flag clicked\nset [hoppstryka xxx v] to [12.5]\nset [gåstyrka xxx v] to [3.5]\n\nwhen I receive [björne - skadad v]\nset [kan skadas!? v] to [nej]\nwait (1) seconds\nset [kan skadas!? v] to [ja]\n\nwhen I receive [skada - fiende v]\nset [hatt - följa efter!? v] to [nej]\nstart sound (pick random (4) to (6))\nset [skadehopp v] to [20]\nset [björne kan röra på sig!!? v] to [nej]\nset rotation style [all around v]\nrepeat (10)\n    turn left (9) degrees\n    change [skadehopp v] by (-4)\n    change y by (SKADEHOPP)\nend\nif <not <(Liv) = [0]>> then\n    wait (1) seconds\n    set rotation style [left-right v]\n    broadcast (Björne - Skadad v)\nend\nif <(Liv) = [0]> then\n    set [björne död? v] to [ja]\n    broadcast (Björne död v)\n    hide\nend\n\nwhen I receive [stort spränghopp v]\nwait until <(y position) > [170]>\nset [björne kan röra på sig!!? v] to [nej]\n\nwhen I receive [himlen v]\ngo to x: (-208) y: (117)\nwait (2) seconds\nset [björne kan röra på sig!!? v] to [ja]\n\nwhen I receive [stort spränghopp v]\nset [björne kan röra på sig!!? v] to [ja]\nset [speed y v] to [30]\n\nwhen I receive [gråbjörns sista prat v]\nset [björne kan röra på sig!!? v] to [nej]\n\nwhen I receive [björne - sista gråbjörns hopp v]\nset [speed y v] to [15]\n\nwhen I receive [björne - skadad v]\nbroadcast (Tillbaka med hatt v)\nset [hatt - följa efter!? v] to [ja]\nif <not <<(Bana!?) = [35]> and <(Stenplattform där!?) = [ja]>>> then\n    go to x: (-208) y: (117)\nend\nif <<(Bana!?) = [35]> and <(Stenplattform där!?) = [ja]>> then\n    go to x: ([x position v] of [stenplattform v]) y: (117)\nend\nset [speed y v] to [0]\nset [björne kan röra på sig!!? v] to [ja]\nchange [poäng v] by (-3)\nif <(Poäng) < [0]> then\n    set [poäng v] to [0]\nend\n\nwhen I receive [skada - void v]\nset [hatt - följa efter!? v] to [nej]\nstart sound [Björne - Ner i hål v]\nset [björne kan röra på sig!!? v] to [nej]\nrepeat (10)\n    change y by (-10)\nend\nif <not <(Liv) = [0]>> then\n    wait (1) seconds\n    broadcast (Björne - Skadad v)\nend\nif <(Liv) = [0]> then\n    set [björne död? v] to [ja]\n    broadcast (Björne död v)\n    hide\nend\n\nwhen I receive [skada - bränd v]\nset [hatt - följa efter!? v] to [nej]\nstart sound (pick random (4) to (6))\nset [björne kan röra på sig!!? v] to [nej]\nif <not <(Liv) = [0]>> then\n    wait (1) seconds\n    broadcast (Björne - Skadad v)\nend\nif <(Liv) = [0]> then\n    set [björne död? v] to [ja]\n    broadcast (Björne död v)\n    hide\nend\n\nwhen flag clicked\nset [björne död? v] to [nej]\n\n@Bana\n\nwhen I receive [herr hoppitott v]\nrepeat (25)\n    change volume by (-2)\nend\nstop all sounds\nstart sound [Herr Hoppitott v]\nrepeat (20)\n    change volume by (2)\nend\n\nwhen I receive [hoppitott nästan död v]\nwait (2) seconds\nrepeat (20)\n    change volume by (-2)\nend\nstop all sounds\n\nwhen I receive [gunt a gnag v]\nrepeat (15)\n    change volume by (-3)\nend\nstop all sounds\nstart sound [Gunt a gnag v]\nrepeat (10)\n    change volume by (3)\nend\n\nwhen I receive [gunt a gnag - nästan död v]\nrepeat (10)\n    change volume by (-3)\nend\nstop all sounds\n\nwhen I receive [kung spinnidung v]\nrepeat (21)\n    change volume by (-2)\nend\nstop all sounds\nstart sound [Kung Spinnidung v]\nrepeat (20)\n    change volume by (2)\nend\n\nswitch backdrop to (värld 3 - spökstället v)\nrepeat (29)\n    broadcast (Nästa bana v)\n    stop all sounds\nend\n\nwhen I receive [kung spinnedung nästan död v]\nrepeat (20)\n    change volume by (-2)\nend\nstop all sounds\n\nswitch backdrop to (värld 2 - heta sanden v)\nrepeat (19)\n    broadcast (Nästa bana v)\n    stop all sounds\nend\n\nrepeat (4)\n    broadcast (Nästa bana v)\n    stop all sounds\nend\n\nswitch backdrop to (värld 2 - heta sanden v)\nrepeat (10)\n    broadcast (Nästa bana v)\n    stop all sounds\nend\n\nwhen I receive [nästa bana v]\nchange [bana!? v] by (1)\nnext costume\nwait (0.5) seconds\nif <<(Bana!?) > [0]> and <(Bana!?) < [11]>> then\n    set volume to (60) %\n    start sound [Värld 1 v]\n    start sound [Fåglar v]\nend\nif <<(Bana!?) > [10]> and <(Bana!?) < [21]>> then\n    set volume to (45) %\n    start sound [Värld 2 v]\nend\nif <<(Bana!?) > [20]> and <(Bana!?) < [31]>> then\n    set volume to (42) %\n    start sound [Värld 3 v]\nend\nif <<(Bana!?) > [30]> and <(Bana!?) < [41]>> then\n    set volume to (30) %\n    start sound [Värld 4 v]\nend\n\nswitch backdrop to (värld 3 - spökstället v)\nrepeat (20)\n    broadcast (Nästa bana v)\n    stop all sounds\nend\n\nwhen I receive [bob - värld 1 - börjar v]\nwait (1.5) seconds\nstart sound [Bobs tävlingar v]\nrepeat (15)\n    change volume by (2)\nend\n\nswitch backdrop to (värld 3 - spökstället v)\nrepeat (24)\n    broadcast (Nästa bana v)\n    stop all sounds\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\npoint in direction (90)\nset [bana!? v] to [1]\nswitch costume to (1 - 1 v)\nset [ghost v] effect to (100)\nshow\nset volume to (60) %\n\nswitch backdrop to (värld 2 - heta sanden v)\nrepeat (14)\n    broadcast (Nästa bana v)\n    stop all sounds\nend\n\nswitch backdrop to (värld 4 - magmabergen v)\nrepeat (30)\n    broadcast (Nästa bana v)\n    stop all sounds\nend\n\nwhen I receive [gråbjörn - börjar v]\nstart sound [Gråbjörn v]\nrepeat (8)\n    change volume by (5)\nend\n\nwhen I receive [bort med musiken v]\nrepeat until <(volume) = [0]>\n    change volume by (-1)\nend\nstop all sounds\nset volume to (100) %\nplay sound (pick random (6) to (7)) until done\nbroadcast (Banan avklarad! v)\n\nwhen I receive [gråbjörn v]\nrepeat (10)\n    change volume by (-3)\nend\nstop all sounds\n\nwhen I receive [g fas 3 v]\nrepeat (8)\n    change volume by (-5)\nend\nstop all sounds\n\nwhen I receive [g sista fas v]\nstart sound [Gråbjörn Final v]\nrepeat (10)\n    change volume by (4)\nend\n\nwhen I receive [bob - värld 1 v]\nrepeat (15)\n    change volume by (-4)\nend\nstop all sounds\n\nrepeat (9)\n    broadcast (Nästa bana v)\n    stop all sounds\nend\n\nswitch backdrop to (värld 4 - magmabergen v)\nrepeat (34)\n    broadcast (Nästa bana v)\n    stop all sounds\nend\n\nwhen I receive [gråbjörns sista prat v]\nrepeat (20)\n    change volume by (-2)\nend\nstop all sounds\n\nwhen I receive [g sista fas v]\nset [bana-farta v] to [0]\nrepeat (30)\n    change [bana-farta v] by (-0.3)\n    turn right (0.3) degrees\n    change y by (Bana-farta)\nend\nhide\n\nwhen I receive [himlen v]\npoint in direction (90)\ngo to x: (0) y: (0)\nswitch costume to (5 - 1 v)\nshow\n\nwhen I receive [stort spränghopp v]\nwait (0.1) seconds\nstart sound [Himlen v]\nrepeat (5)\n    change volume by (5)\nend\n\nwhen I receive [blåakanini pratar v]\nrepeat (25)\n    change volume by (-1)\nend\nstop all sounds\nwait (0.1) seconds\nset volume to (50) %\nforever\n    play sound [Blåakanini v] until done\nend\n\nwhen I receive [bob - värld 2 v]\nrepeat (15)\n    change volume by (-3)\nend\nstop all sounds\n\nwhen I receive [bob - värld 2 - börjar v]\nwait (0.5) seconds\nstart sound [Bobs tävlingar v]\nrepeat (15)\n    change volume by (2)\nend\n\nwhen I receive [bob - värld 3 v]\nrepeat (14)\n    change volume by (-3)\nend\nstop all sounds\n\nwhen I receive [bob - värld 3 - börjar v]\nwait (0.5) seconds\nstart sound [Bobs tävlingar v]\nrepeat (15)\n    change volume by (2)\nend\n\nwhen I receive [meddelande1 v]\nwait (2) seconds\nstart sound [Värld 1 v]\nstart sound [Fåglar v]\n\nwhen I receive [dullen varnar! v]\nstop all sounds\nset volume to (30) %\nstart sound [Blåakanini e borta v]\n\nwhen I receive [bort med dullen v]\nrepeat (6)\n    change volume by (-5)\nend\nstop all sounds\nstart sound [Värld 1 v]\nstart sound [Fåglar v]\nrepeat (15)\n    change volume by (4)\nend\n\n@Bana - Framsida\n\nwhen flag clicked\ngo to x: (0) y: (0)\npoint in direction (90)\nswitch costume to (1 - 1 v)\nshow\nset [ghost v] effect to (0)\nset volume to (50) %\n\nwhen I receive [nästa bana v]\nnext costume\n\nwhen I receive [g sista fas v]\nforever\n    go to (bana v)\n    point in direction ([direction v] of [bana v])\nend\n\nwhen I receive [g sista fas v]\nstart sound [Berget hasar v]\nwait (0.5) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nstart sound [Explosion! v]\n\nwhen I receive [himlen v]\nswitch costume to (5 - 1 v)\nshow\nset [ghost v] effect to (0)\ngo to x: (0) y: (0)\npoint in direction (90)\n\n@Bana - Bakgrund\n\nwhen flag clicked\ngo to x: (0) y: (10)\npoint in direction (90)\nswitch costume to (1 - 1 v)\nset [brightness v] effect to (3)\nshow\nset [ghost v] effect to (0)\n\nwhen I receive [nästa bana v]\nnext costume\nwait (0.3) seconds\nif <<(Bana!?) > [20]> and <(Bana!?) < [31]>> then\n    set [brightness v] effect to (2)\nend\n\nwhen I receive [g sista fas v]\nwait (0.5) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [g sista fas v]\nrepeat until <(Bana!?) = [36]>\n    go to (bana - framsida v)\n    point in direction ([direction v] of [bana v])\nend\n\nwhen I receive [himlen v]\nswitch costume to (5 - 1 v)\nshow\nset [ghost v] effect to (0)\ngo to x: (0) y: (8)\npoint in direction (90)\n\n@Moln\n\nwhen flag clicked\nset [ghost v] effect to (20)\ngo to x: (-95) y: (148)\n\nwhen flag clicked\nforever\n    if <<(Bana!?) > [0]> and <(Bana!?) < [11]>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [meddelande1 v]\nforever\n    glide (20) secs to x: (229) y: (148)\n    glide (20) secs to x: (-95) y: (148)\nend\n\n@Vit sida\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (klädsel1 v)\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [banan avklarad! v]\nwait (0.5) seconds\nrepeat (17)\n    next costume\nend\nbroadcast (Nästa bana v)\n\nwhen I receive [banan avklarad! v]\nwait (0.5) seconds\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (0.7) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nswitch costume to (klädsel1 v)\n\n@Nallemynt\n\nwhen flag clicked\ngo to x: (16) y: (8)\nshow\nset size to (80) %\nswitch costume to (klädsel2 v)\npoint in direction (90)\nset volume to (30) %\nset [antalet nallemynt v] to [0]\nset [kan myntet tas!? v] to [nej]\nforever\n    if <(Kan myntet tas!?) = [ja]> then\n        next costume\n    end\nend\n\nwhen I receive [meddelande1 v]\nset [kan myntet tas!? v] to [ja]\n\nwhen flag clicked\nforever\n    if <touching (hitbox v)?> then\n        if <(Kan myntet tas!?) = [ja]> then\n            set [kan myntet tas!? v] to [nej]\n            broadcast (Mynt taget v)\n            start sound [Mynt v]\n            change [antalet nallemynt v] by (1)\n            repeat (10)\n                change y by (5)\n                change [ghost v] effect by (10)\n                next costume\n                next costume\n            end\n            hide\n        end\n    end\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [21]> then\n    go to x: (-2) y: (28)\nend\nif <(Bana!?) = [22]> then\n    go to x: (146) y: (143)\nend\nif <(Bana!?) = [23]> then\n    go to x: (16) y: (155)\nend\nif <(Bana!?) = [24]> then\n    go to x: (-80) y: (159)\nend\nif <(Bana!?) = [25]> then\n    go to x: (181) y: (-139)\nend\nif <(Bana!?) = [26]> then\n    go to x: (-60) y: (-114)\nend\nif <(Bana!?) = [27]> then\n    go to x: (36) y: (136)\nend\nif <(Bana!?) = [28]> then\n    go to x: (13) y: (-99)\nend\nif <(Bana!?) = [29]> then\n    go to x: (-91) y: (-128)\nend\nif <(Bana!?) = [30]> then\n    go to x: (0) y: (-1)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [2]> then\n    go to x: (39) y: (137)\nend\nif <(Bana!?) = [3]> then\n    go to x: (-10) y: (128)\nend\nif <(Bana!?) = [4]> then\n    go to x: (-13) y: (-59)\nend\nif <(Bana!?) = [5]> then\n    go to x: (111) y: (139)\nend\nif <(Bana!?) = [6]> then\n    go to x: (20) y: (62)\nend\nif <(Bana!?) = [7]> then\n    go to x: (120) y: (147)\nend\nif <(Bana!?) = [8]> then\n    go to x: (-69) y: (63)\nend\nif <(Bana!?) = [9]> then\n    go to x: (96) y: (83)\nend\nif <(Bana!?) = [10]> then\n    go to x: (93) y: (102)\nend\nif <(Bana!?) = [11]> then\n    go to x: (70) y: (38)\nend\nif <(Bana!?) = [12]> then\n    go to x: (173) y: (94)\nend\nif <(Bana!?) = [13]> then\n    go to x: (170) y: (-45)\nend\nif <(Bana!?) = [14]> then\n    go to x: (77) y: (17)\nend\nif <(Bana!?) = [15]> then\n    go to x: (55) y: (-112)\nend\nif <(Bana!?) = [16]> then\n    go to x: (-79) y: (152)\nend\nif <(Bana!?) = [17]> then\n    go to x: (-9) y: (147)\nend\nif <(Bana!?) = [18]> then\n    go to x: (16) y: (63)\nend\nif <(Bana!?) = [19]> then\n    go to x: (175) y: (134)\nend\nif <(Bana!?) = [20]> then\n    go to x: (6) y: (7)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nset [ghost v] effect to (0)\nshow\npoint in direction (90)\nset [kan myntet tas!? v] to [ja]\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [31]> then\n    go to x: (35) y: (64)\nend\nif <(Bana!?) = [32]> then\nend\nif <(Bana!?) = [33]> then\n    go to x: (-98) y: (142)\nend\nif <(Bana!?) = [34]> then\n    go to x: (4) y: (-60)\nend\nif <(Bana!?) = [35]> then\n    go to x: (0) y: (-25)\nend\n\nwhen I receive [mynt taget v]\nchange [poäng v] by (10)\n\n@Nallemynt - Partiklar\n\nwhen I receive [mynt taget v]\ngo to (nallemynt v)\nrepeat (10)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nwait (0.03) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I start as a clone\ngo to (nallemynt v)\nshow\nswitch costume to (pick random (1) to (4))\npoint in direction (pick random (-240) to (240))\nrepeat (10)\n    move (5) steps\nend\n\n@Minimynt\n\nwhen flag clicked\nswitch costume to (klädsel1 v)\nset [ghost v] effect to (100)\nhide\nset volume to (100) %\nset [antalet mynt v] to [0]\n\nwhen I start as a clone\nswitch costume to (klädsel1 v)\nset [ghost v] effect to (0)\nshow\nif <(Bana!?) = [1]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (-120) y: (-16)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (-90) y: (-28)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (-60) y: (-40)\n    end\nend\nif <(Bana!?) = [2]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (30) y: (25)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (60) y: (30)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (90) y: (25)\n    end\nend\nif <(Bana!?) = [3]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (142) y: (26)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (142) y: (56)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (142) y: (86)\n    end\nend\nif <(Bana!?) = [4]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (27) y: (14)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (57) y: (24)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (87) y: (34)\n    end\nend\nif <(Bana!?) = [5]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (2) y: (18)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (12) y: (48)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (22) y: (78)\n    end\nend\nif <(Bana!?) = [6]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (49) y: (-20)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (59) y: (10)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (69) y: (40)\n    end\nend\nif <(Bana!?) = [7]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (-45) y: (66)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (-15) y: (86)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (15) y: (66)\n    end\nend\nif <(Bana!?) = [8]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (45) y: (44)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (75) y: (24)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (105) y: (4)\n    end\nend\nif <(Bana!?) = [9]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (48) y: (-8)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (78) y: (-28)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (108) y: (-38)\n    end\nend\nif <(Bana!?) = [10]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (-5) y: (135)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (25) y: (135)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (55) y: (135)\n    end\nend\nrepeat until <<touching (hitbox v)?> or <(Spelet är igång!?) = [nej]>>\n    next costume\nend\nif <touching (hitbox v)?> then\n    start sound [Mynt v]\n    change [antalet mynt v] by (1)\n    change [poäng v] by (1)\nend\nrepeat (5)\n    change y by (2)\n    change [ghost v] effect by (10)\n    next costume\nend\nhide\ndelete this clone\n\nwhen I start as a clone\nswitch costume to (klädsel1 v)\nset [ghost v] effect to (0)\nshow\nif <(Bana!?) = [11]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (100) y: (-73)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (130) y: (-78)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (160) y: (-83)\n    end\nend\nif <(Bana!?) = [12]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (62) y: (39)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (62) y: (69)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (92) y: (69)\n    end\nend\nif <(Bana!?) = [13]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (44) y: (-51)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (74) y: (-41)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (104) y: (-31)\n    end\nend\nif <(Bana!?) = [14]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (64) y: (-104)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (94) y: (-84)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (124) y: (-64)\n    end\nend\nif <(Bana!?) = [15]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (-137) y: (-63)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (-107) y: (-53)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (-77) y: (-43)\n    end\nend\nif <(Bana!?) = [16]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (-10) y: (110)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (20) y: (100)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (50) y: (95)\n    end\nend\nif <(Bana!?) = [17]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (-123) y: (116)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (-93) y: (96)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (-63) y: (76)\n    end\nend\nif <(Bana!?) = [18]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (158) y: (-70)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (188) y: (-50)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (218) y: (-20)\n    end\nend\nif <(Bana!?) = [19]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (-108) y: (-12)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (-108) y: (-42)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (-108) y: (-72)\n    end\nend\nif <(Bana!?) = [20]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (193) y: (-46)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (163) y: (-56)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (133) y: (-66)\n    end\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nset [myntets placering v] to [0]\nrepeat (3)\n    change [myntets placering v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [meddelande1 v]\nset [myntets placering v] to [0]\nrepeat (3)\n    change [myntets placering v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nswitch costume to (klädsel1 v)\nset [ghost v] effect to (0)\nshow\nif <(Bana!?) = [21]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (-54) y: (-58)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (-24) y: (-48)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (6) y: (-38)\n    end\nend\nif <(Bana!?) = [22]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (-91) y: (-59)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (-61) y: (-54)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (-31) y: (-49)\n    end\nend\nif <(Bana!?) = [23]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (-23) y: (105)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (7) y: (105)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (37) y: (105)\n    end\nend\nif <(Bana!?) = [24]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (38) y: (109)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (68) y: (119)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (98) y: (124)\n    end\nend\nif <(Bana!?) = [25]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (-98) y: (-108)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (-68) y: (-108)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (-38) y: (-108)\n    end\nend\nif <(Bana!?) = [26]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (-11) y: (155)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (19) y: (150)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (49) y: (140)\n    end\nend\nif <(Bana!?) = [27]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (-91) y: (64)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (-121) y: (74)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (-151) y: (84)\n    end\nend\nif <(Bana!?) = [28]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (141) y: (-43)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (171) y: (-23)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (201) y: (-13)\n    end\nend\nif <(Bana!?) = [29]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (141) y: (-17)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (171) y: (-27)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (201) y: (-37)\n    end\nend\nif <(Bana!?) = [30]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (66) y: (-50)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (96) y: (-45)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (126) y: (-35)\n    end\nend\n\nwhen I start as a clone\nswitch costume to (klädsel1 v)\nset [ghost v] effect to (0)\nshow\nif <(Bana!?) = [31]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (152) y: (-18)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (122) y: (-28)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (182) y: (-8)\n    end\nend\nif <(Bana!?) = [32]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (-70) y: (35)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (-70) y: (65)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (-70) y: (95)\n    end\nend\nif <(Bana!?) = [33]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (95) y: (105)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (95) y: (135)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (125) y: (135)\n    end\nend\nif <(Bana!?) = [34]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (13) y: (91)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (43) y: (101)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (73) y: (106)\n    end\nend\nif <(Bana!?) = [35]> then\n    if <(Myntets placering) = [1]> then\n        go to x: (-141) y: (-41)\n    end\n    if <(Myntets placering) = [2]> then\n        go to x: (-111) y: (-35)\n    end\n    if <(Myntets placering) = [3]> then\n        go to x: (-81) y: (-32)\n    end\nend\n\n@Hjälpruta in game\n\nwhen flag clicked\ngo to x: (0) y: (-216)\nset [har varnat v] to [nej]\nset [är mellanslag tryckt? v] to [nej]\nset [pandafaffa på bana? v] to [nej]\nset volume to (70) %\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [pandafaffa hjälper - klart v]\nif <(Är mellanslag tryckt?) = [ja]> then\n    glide (0.5) secs to x: (0) y: (-216)\nend\n\nwhen I receive [pandafaffa hjälper v]\nstart sound [Meddelande v]\nglide (0.5) secs to x: (0) y: (-143)\nif <(Spelläge!!??) = [normal]> then\n    wait until <key (space v) pressed?>\nend\nif <(Spelläge!!??) = [spelkontroll]> then\n    wait until <key (q v) pressed?>\nend\nif <(Är mellanslag tryckt?) = [nej]> then\n    broadcast (Pandafaffa hjälper - klart v)\n    set [är mellanslag tryckt? v] to [ja]\n    start sound [Meddelande v]\nend\n\nwhen I receive [pandafaffa hjälper - klart v]\nif <(Är mellanslag tryckt?) = [ja]> then\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    hide\nend\n\nwhen I receive [meddelande1 v]\nforever\nend\n\nwhen I receive [bort med musiken v]\nif <(Pandafaffa på bana?) = [ja]> then\n    if <(Är mellanslag tryckt?) = [nej]> then\n        set [är mellanslag tryckt? v] to [ja]\n        start sound [Meddelande v]\n        broadcast (Pandafaffa hjälper - klart v)\n    end\nend\n\nwhen I receive [pandafaffa hjälper v]\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\n\nwhen I receive [nästa bana v]\n\nwhen I receive [nästa bana v]\n\nwhen I receive [nästa bana v]\nwait (0.5) seconds\nset [har varnat v] to [nej]\nset [pandafaffa på bana? v] to [nej]\nset [är mellanslag tryckt? v] to [nej]\n\nif <(Har varnat) = [nej]> then\n    if <(Bana!?) = [1]> then\n        if <([x position v] of [hitbox v]) > [-119]> then\n            switch costume to (kaninvarning v)\n            set [har varnat v] to [ja]\n            set [pandafaffa på bana? v] to [ja]\n            broadcast (Pandafaffa hjälper v)\n        end\n    end\nend\n\nwait (0.5) seconds\nforever\n    if <(Har varnat) = [nej]> then\n        if <(Bana!?) = [2]> then\n            if <([x position v] of [hitbox v]) > [-105]> then\n                switch costume to (örnvarning + trampolin v)\n                set [har varnat v] to [ja]\n                set [pandafaffa på bana? v] to [ja]\n                broadcast (Pandafaffa hjälper v)\n            end\n        end\n    end\n    if <(Har varnat) = [nej]> then\n        if <(Bana!?) = [3]> then\n            if <([x position v] of [hitbox v]) > [-89]> then\n                switch costume to (fårvarning v)\n                set [har varnat v] to [ja]\n                set [pandafaffa på bana? v] to [ja]\n                broadcast (Pandafaffa hjälper v)\n            end\n        end\n    end\n    if <(Har varnat) = [nej]> then\n        if <(Bana!?) = [5]> then\n            if <([x position v] of [hitbox v]) > [-205]> then\n                switch costume to (bob varning v)\n                set [har varnat v] to [ja]\n                set [pandafaffa på bana? v] to [ja]\n                broadcast (Pandafaffa hjälper v)\n            end\n        end\n    end\n    if <(Har varnat) = [nej]> then\n        if <(Bana!?) = [7]> then\n            if <([x position v] of [hitbox v]) > [-100]> then\n                switch costume to (blixtförklaring v)\n                set [har varnat v] to [ja]\n                set [pandafaffa på bana? v] to [ja]\n                broadcast (Pandafaffa hjälper v)\n            end\n        end\n    end\n    if <(Har varnat) = [nej]> then\n        if <(Bana!?) = [11]> then\n            if <([x position v] of [hitbox v]) > [-185]> then\n                switch costume to (kamelvarning v)\n                set [har varnat v] to [ja]\n                set [pandafaffa på bana? v] to [ja]\n                broadcast (Pandafaffa hjälper v)\n            end\n        end\n    end\n    if <(Har varnat) = [nej]> then\n        if <(Bana!?) = [12]> then\n            if <([x position v] of [hitbox v]) > [-138]> then\n                switch costume to (ormvarning v)\n                set [har varnat v] to [ja]\n                set [pandafaffa på bana? v] to [ja]\n                broadcast (Pandafaffa hjälper v)\n            end\n        end\n    end\n    if <(Har varnat) = [nej]> then\n        if <(Bana!?) = [13]> then\n            if <([x position v] of [hitbox v]) > [-23]> then\n                switch costume to (tempelblock v)\n                set [har varnat v] to [ja]\n                set [pandafaffa på bana? v] to [ja]\n                broadcast (Pandafaffa hjälper v)\n            end\n        end\n    end\n    if <(Har varnat) = [nej]> then\n        if <(Bana!?) = [15]> then\n            if <([x position v] of [hitbox v]) > [-130]> then\n                switch costume to (bob varning 2 v)\n                set [har varnat v] to [ja]\n                set [pandafaffa på bana? v] to [ja]\n                broadcast (Pandafaffa hjälper v)\n            end\n        end\n    end\n    if <(Har varnat) = [nej]> then\n        if <(Bana!?) = [16]> then\n            if <([x position v] of [hitbox v]) > [-49]> then\n                switch costume to (råttvarning v)\n                set [har varnat v] to [ja]\n                set [pandafaffa på bana? v] to [ja]\n                broadcast (Pandafaffa hjälper v)\n            end\n        end\n    end\n    if <(Har varnat) = [nej]> then\n        if <(Bana!?) = [21]> then\n            if <([x position v] of [hitbox v]) > [-71]> then\n                switch costume to (kattvarning v)\n                set [har varnat v] to [ja]\n                set [pandafaffa på bana? v] to [ja]\n                broadcast (Pandafaffa hjälper v)\n            end\n        end\n    end\n    if <(Har varnat) = [nej]> then\n        if <(Bana!?) = [22]> then\n            if <([x position v] of [hitbox v]) > [-48]> then\n                switch costume to (spökvarning + ljus v)\n                set [har varnat v] to [ja]\n                set [pandafaffa på bana? v] to [ja]\n                broadcast (Pandafaffa hjälper v)\n            end\n        end\n    end\n    if <(Har varnat) = [nej]> then\n        if <(Bana!?) = [24]> then\n            if <([x position v] of [hitbox v]) > [-168]> then\n                switch costume to (spindelvarning v)\n                set [har varnat v] to [ja]\n                set [pandafaffa på bana? v] to [ja]\n                broadcast (Pandafaffa hjälper v)\n            end\n        end\n    end\n    if <(Har varnat) = [nej]> then\n        if <(Bana!?) = [25]> then\n            if <([x position v] of [hitbox v]) > [-121]> then\n                switch costume to (bob varning 3 v)\n                set [har varnat v] to [ja]\n                set [pandafaffa på bana? v] to [ja]\n                broadcast (Pandafaffa hjälper v)\n            end\n        end\n    end\nend\n\nwait (0.5) seconds\nforever\n    if <(Har varnat) = [nej]> then\n        if <(Bana!?) = [31]> then\n            if <([x position v] of [hitbox v]) > [-90]> then\n                switch costume to (lavavarning v)\n                set [har varnat v] to [ja]\n                set [pandafaffa på bana? v] to [ja]\n                broadcast (Pandafaffa hjälper v)\n            end\n        end\n    end\n    if <(Har varnat) = [nej]> then\n        if <(Bana!?) = [32]> then\n            if <([x position v] of [hitbox v]) > [-59]> then\n                switch costume to (stenvarning v)\n                set [har varnat v] to [ja]\n                set [pandafaffa på bana? v] to [ja]\n                broadcast (Pandafaffa hjälper v)\n            end\n        end\n    end\nend\n\n@Trampolin\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [2]> then\n    switch costume to (klädsel1 v)\n    go to x: (-28) y: (-91)\nend\nif <(Bana!?) = [3]> then\n    switch costume to (klädsel1 v)\n    go to x: (145) y: (-50)\nend\nif <(Bana!?) = [5]> then\n    switch costume to (klädsel1 v)\n    go to x: (8) y: (-87)\nend\nif <(Bana!?) = [9]> then\n    switch costume to (klädsel1 v)\n    go to x: (-212) y: (-98)\nend\nif <(Bana!?) = [10]> then\n    switch costume to (klädsel1 v)\n    go to x: (0) y: (-130)\nend\n\nwhen flag clicked\nset volume to (50) %\nswitch costume to (klädsel1 v)\nhide\n\nwhen flag clicked\nforever\n    if <<(Bana!?) = [2]> or <<(Bana!?) = [3]> or <<(Bana!?) = [5]> or <<(Bana!?) = [9]> or <(Bana!?) = [10]>>>>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [trampolin v]\nstart sound [boing v]\nrepeat (6)\n    next costume\nend\n\nwhen I receive [trampolin v]\nchange [poäng v] by (-2)\nif <(Poäng) < [0]> then\n    set [poäng v] to [0]\nend\n\n@Hoppi\n\nwhen flag clicked\ngo to x: (-25) y: (-115)\npoint in direction (90)\nswitch costume to (klädsel2 v)\nshow\n\nwhen I receive [meddelande1 v]\nforever\n    if <(Bana!?) = [1]> then\n        if <(Spelet är igång!?) = [ja]> then\n            repeat (30)\n                next costume\n                wait (0.03) seconds\n            end\n            start sound [Swish 3 v]\n            repeat (3)\n                turn right (2) degrees\n                change y by (3)\n            end\n            repeat (3)\n                turn right (2) degrees\n                change y by (2)\n            end\n            repeat (3)\n                turn right (1) degrees\n                change y by (1)\n            end\n            broadcast (Morot v)\n            repeat (3)\n                turn left (2) degrees\n                change y by (-1)\n            end\n            repeat (3)\n                turn left (2) degrees\n                change y by (-2)\n            end\n            repeat (3)\n                turn left (1) degrees\n                change y by (-3)\n            end\n        end\n    end\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nforever\n    if <<<(Bana!?) = [1]> or <(Bana!?) = [4]>> or <(Bana!?) = [8]>> then\n        if <(Spelet är igång!?) = [ja]> then\n            repeat (30)\n                next costume\n                wait (0.03) seconds\n            end\n            start sound [Swish 3 v]\n            repeat (3)\n                turn right (2) degrees\n                change y by (3)\n            end\n            repeat (3)\n                turn right (2) degrees\n                change y by (2)\n            end\n            repeat (3)\n                turn right (1) degrees\n                change y by (1)\n            end\n            broadcast (Morot v)\n            repeat (3)\n                turn left (2) degrees\n                change y by (-1)\n            end\n            repeat (3)\n                turn left (2) degrees\n                change y by (-2)\n            end\n            repeat (3)\n                turn left (1) degrees\n                change y by (-3)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<(Bana!?) = [1]> or <(Bana!?) = [4]>> or <(Bana!?) = [8]>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [4]> then\n    go to x: (-92) y: (-32)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [8]> then\n    go to x: (215) y: (-121)\nend\n\n@Morot\n\nwhen flag clicked\npoint in direction (90)\nset size to (100) %\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [morot v]\nstart sound [Swish v]\npoint in direction (90)\ngo to (hoppi v)\nset [gravitation v] to (pick random (5) to (10))\nset [kraft v] to (pick random (5) to (8))\nset size to (100) %\nset [ghost v] effect to (0)\nshow\nstart sound [Swish 2 v]\nrepeat until <touching (bana v)?>\n    turn right (15) degrees\n    change y by ((Gravitation) * (2))\n    change x by (join [-] (Kraft))\n    change [gravitation v] by (-1)\nend\nstart sound [Ner i jorden v]\nrepeat (10)\n    turn right (2) degrees\n    change y by (-1)\n    change [ghost v] effect by (10)\n    change size by (-5)\nend\nhide\n\n@Näbbus\n\nwhen flag clicked\nhide\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nforever\n    if <<<(Bana!?) = [2]> or <(Bana!?) = [6]>> or <(Bana!?) = [9]>> then\n        if <(Spelet är igång!?) = [ja]> then\n            change y by ((([y position v] of [hitbox v]) - (y position)) * (0.02))\n            change x by ((([y position v] of [hitbox v]) - (y position)) * (0.02))\n            if on edge, bounce\n            next costume\n        end\n    end\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [2]> then\n    go to x: (47) y: (-76)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [6]> then\n    go to x: (-41) y: (39)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [9]> then\n    go to x: (55) y: (4)\nend\n\nwhen flag clicked\nforever\n    if <<<(Bana!?) = [2]> or <(Bana!?) = [6]>> or <(Bana!?) = [9]>> then\n        show\n    else\n        hide\n    end\nend\n\n@Bä-hä\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nforever\n    if <<<<(Bana!?) = [3]> or <(Bana!?) = [5]>> or <(Bana!?) = [7]>> or <(Bana!?) = [8]>> then\n        if <(Spelet är igång!?) = [ja]> then\n            set [fall fart v] to [19]\n            start sound [Swish 3 v]\n            start sound [Boomerang v]\n            repeat until <(Fall fart) = [-20]>\n                turn right (9) degrees\n                change y by (Fall fart)\n                change [fall fart v] by (-1)\n            end\n            set [fall fart v] to [19]\n            point in direction (90)\n            switch costume to (klädsel1 v)\n            wait (0.3) seconds\n            repeat (8)\n                next costume\n            end\n        end\n    end\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [5]> then\n    switch costume to (klädsel1 v)\n    point in direction (90)\n    go to x: (-116) y: (-65)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [7]> then\n    switch costume to (klädsel1 v)\n    point in direction (90)\n    go to x: (215) y: (-51)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [8]> then\n    switch costume to (klädsel1 v)\n    point in direction (90)\n    go to x: (42) y: (-53)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [3]> then\n    switch costume to (klädsel1 v)\n    point in direction (90)\n    go to x: (-20) y: (-107)\nend\n\nwhen flag clicked\npoint in direction (90)\nswitch costume to (klädsel1 v)\nhide\n\nwhen flag clicked\nforever\n    if <<<<(Bana!?) = [3]> or <(Bana!?) = [5]>> or <(Bana!?) = [7]>> or <(Bana!?) = [8]>> then\n        show\n    else\n        hide\n    end\nend\n\n@Herr Hoppitott\n\nwhen flag clicked\ngo to x: (16) y: (-244)\npoint in direction (90)\nset [bossen har visat sig!? v] to [nej]\nswitch costume to (klädsel1 v)\nset [ghost v] effect to (100)\nhide\nset [rör på sig? v] to [nej]\nset [boss igång!? v] to [nej]\n\nwhen I receive [herr hoppitott v]\nstart sound [Swish v]\nglide (0.3) secs to x: (16) y: (-20)\nrepeat (2)\n    change y by (2)\nend\nrepeat (2)\n    change y by (1)\nend\nrepeat (2)\n    change y by (-1)\nend\nrepeat (2)\n    change y by (-2)\nend\nset [rör på sig? v] to [ja]\nrepeat until <(Rör på sig?) = [nej]>\n    repeat (12)\n        next costume\n        wait (0.03) seconds\n    end\n    wait (1) seconds\nend\n\nwhen I receive [herr hoppitott v]\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [hoppitott död v]\nwait (1) seconds\nstart sound [Swish 2 v]\nglide (1) secs to x: (16) y: (-244)\nstart sound [Explosion! v]\n\nwhen I receive [hoppitott död v]\nwait (1.5) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [hoppitott död v]\nwait (1) seconds\nset [björne kan röra på sig!!? v] to [ja]\nset [boss igång!? v] to [nej]\nrepeat (20)\n    turn right (2) degrees\nend\nhide\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nforever\n    if <(Bana!?) = [10]> then\n        if <(Bossen har visat sig!?) = [nej]> then\n            if <([x position v] of [hitbox v]) > [-45]> then\n                set [bossen har visat sig!? v] to [ja]\n                broadcast (Herr Hoppitott v)\n                set [björne kan röra på sig!!? v] to [nej]\n                set [boss igång!? v] to [ja]\n            end\n        end\n    end\nend\n\nwhen I receive [hoppitott nästan död v]\nwait (2) seconds\nset [björne kan röra på sig!!? v] to [nej]\nbroadcast (Herr Hoppitott - Sista prat v)\nset [boss pratar!? v] to [ja]\nwait until <(Boss pratar!?) = [nej]>\nset [rör på sig? v] to [nej]\nbroadcast (Hoppitott DÖD v)\n\n@Herr Hoppitott - Tass 1\n\nwhen flag clicked\ngo to x: (-124) y: (-191)\nset size to (100) %\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [herr hoppitott v]\nwait (0.6) seconds\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [herr hoppitott v]\nwait (0.6) seconds\nstart sound [Swish 2 v]\nglide (0.2) secs to x: (-121) y: (-76)\nwait (0.5) seconds\nglide (0.05) secs to x: (-121) y: (-95)\nstart sound [Explosion! v]\n\nwhen I receive [herr hoppitott - börjar v]\nrepeat (8)\n    wait (2) seconds\n    repeat (20)\n        change x by (-2)\n    end\n    repeat until <touching (herr hoppitott - tass 2 v)?>\n        change x by (30)\n    end\n    wait (0.1) seconds\n    glide (1) secs to x: (-121) y: (-95)\n    wait (1) seconds\n    glide (0.3) secs to x: (-121) y: (31)\n    wait (1.5) seconds\n    repeat (10)\n        change y by (2)\n    end\n    glide (0.2) secs to x: (-121) y: (-95)\nend\n\nwhen I receive [hoppitott död v]\nwait (1.3) seconds\nrepeat (10)\n    change size by (-9)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [hoppitott död v]\nwait (1.3) seconds\nrepeat (10)\n    change y by (-7)\nend\n\n@Herr Hoppitott - Tass 2\n\nwhen flag clicked\ngo to x: (109) y: (-191)\nset size to (100) %\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [herr hoppitott v]\nwait (0.6) seconds\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [herr hoppitott v]\nwait (0.6) seconds\nstart sound [Swish 2 v]\nglide (0.2) secs to x: (109) y: (-76)\nwait (0.5) seconds\nglide (0.05) secs to x: (109) y: (-95)\nbroadcast (Herr Hoppitott - Börjar v)\nset [björne kan röra på sig!!? v] to [ja]\n\nwhen I receive [herr hoppitott - börjar v]\nrepeat (8)\n    wait (2) seconds\n    repeat (20)\n        change x by (2)\n    end\n    start sound [Swish 2 v]\n    repeat until <touching (herr hoppitott - tass 1 v)?>\n        change x by (-30)\n    end\n    broadcast (Herr Hoppitott - Morot sidan v)\n    start sound [Smock v]\n    wait (0.1) seconds\n    glide (1) secs to x: (109) y: (-95)\n    wait (1) seconds\n    start sound [Swish 2 v]\n    glide (0.3) secs to x: (109) y: (31)\n    wait (1.5) seconds\n    repeat (10)\n        change y by (2)\n    end\n    glide (0.2) secs to x: (109) y: (-95)\n    broadcast (Herr Hoppitott - Morot v)\n    start sound [Explosion! v]\nend\nbroadcast (Hoppitott nästan död v)\n\nwhen I receive [hoppitott död v]\nwait (1.3) seconds\nrepeat (10)\n    change size by (-9)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [hoppitott död v]\nwait (1.3) seconds\nrepeat (10)\n    change y by (-7)\nend\n\n@Herr Hoppitott - Morot\n\nwhen I receive [herr hoppitott - morot v]\nrepeat (2)\n    create clone of (_myself_ v)\n    wait (0.5) seconds\nend\n\nwhen flag clicked\npoint in direction (90)\nhide\n\nwhen I start as a clone\ngo to x: (pick random (-220) to (220)) y: (212)\npoint in direction (90)\nset [ghost v] effect to (0)\nshow\nrepeat (3)\n    change x by (1)\n    wait (0.01) seconds\n    change x by (-1)\n    wait (0.01) seconds\n    change y by (-2)\nend\nstart sound [Swish 2 v]\nrepeat until <touching (bana v)?>\n    change y by (-20)\nend\nstart sound [Ner i jorden v]\nrepeat (10)\n    turn right (pick random (-3) to (3)) degrees\n    change y by (-1)\nend\nwait (0.5) seconds\nrepeat (10)\n    turn right (3) degrees\n    change y by (-2)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\n@Herr Hoppitott - Morot sidan\n\nwhen flag clicked\npoint in direction (90)\nset [ghost v] effect to (100)\nhide\n\nwhen I start as a clone\ngo to x: (235) y: (pick random (-125) to (-110))\npoint in direction (90)\nset [ghost v] effect to (0)\nshow\nstart sound [Swish 2 v]\nrepeat until <(x position) < [-235]>\n    change x by (-23)\n    change y by (pick random (1) to (-2))\nend\nstart sound [Ner i jorden v]\nrepeat (10)\n    change [ghost v] effect by (10)\n    change x by (-3)\n    turn right (3) degrees\nend\ndelete this clone\n\nwhen I receive [herr hoppitott - morot sidan v]\nrepeat (2)\n    create clone of (_myself_ v)\n    wait (0.15) seconds\nend\n\nrepeat until <(Gnagerkaka tagen?) = [ja]>\n    turn right (4) degrees\nend\n\n@Bossklocka\n\nwhen I receive [herr hoppitott - börjar v]\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [bort med klockan v]\nrepeat (5)\n    change [ghost v] effect by (10)\n    change size by (5)\n    turn right (15) degrees\nend\nrepeat (5)\n    change [ghost v] effect by (10)\n    change size by (-5)\n    turn right (15) degrees\nend\nhide\npoint in direction (90)\nset size to (100) %\n\nwhen I receive [bob - värld 1 - börjar v]\nwait (2.5) seconds\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen flag clicked\ngo to x: (198) y: (-142)\npoint in direction (90)\nset size to (100) %\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [bob - värld 2 - börjar v]\nwait (0.5) seconds\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [bob - värld 3 - börjar v]\nwait (0.5) seconds\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\n@Klockvisare\n\nwhen flag clicked\ngo to x: (199) y: (-143)\npoint in direction (90)\nset volume to (20) %\nset [bosstid v] to [0]\nset size to (100) %\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [herr hoppitott - börjar v]\nrepeat (60)\n    turn right (6) degrees\n    start sound [Tick v]\n    wait (1) seconds\nend\nwait (0.3) seconds\nbroadcast (Bort med klockan v)\n\nwhen I receive [herr hoppitott - börjar v]\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [bob - värld 1 - börjar v]\nset [bob-tid v] to [15]\nwait (2.5) seconds\nrepeat (15)\n    wait (1) seconds\n    turn right (6) degrees\n    change [bob-tid v] by (-1)\n    start sound [Tick v]\n    if <(Ballonräknare) = [5]> then\n        broadcast (Bort med klockan v)\n        stop [this script v]\n    end\nend\nif <(Ballonräknare) < [5]> then\n    broadcast (Bob 1 - Förlust v)\nend\nwait (0.3) seconds\nbroadcast (Bort med klockan v)\n\nwhen I receive [bob - värld 1 - börjar v]\nwait (2.5) seconds\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [bob 1 - förlust v]\nset volume to (3) %\n\nwhen I receive [bob 1 - vinst v]\nset volume to (3) %\n\nwhen I receive [bort med klockan v]\nrepeat (5)\n    change [ghost v] effect by (10)\n    change size by (5)\n    turn right (25) degrees\nend\nrepeat (5)\n    change [ghost v] effect by (10)\n    change size by (-5)\n    turn right (25) degrees\nend\nhide\nset volume to (20) %\npoint in direction (90)\n\nwhen I receive [bob - värld 2 - börjar v]\nset [bob-tid v] to [30]\nwait (0.5) seconds\nrepeat (30)\n    wait (1) seconds\n    turn right (6) degrees\n    change [bob-tid v] by (-1)\n    start sound [Tick v]\n    if <(Träffad av kaktus!!??) = [ja]> then\n        broadcast (Bort med klockan v)\n        stop [this script v]\n    end\nend\nif <(Träffad av kaktus!!??) = [nej]> then\n    broadcast (Bob 2 - Vinst v)\nend\nwait (0.3) seconds\nbroadcast (Bort med klockan v)\n\nwhen I receive [bob - värld 3 - börjar v]\nset [bob-tid v] to [25]\nwait (0.5) seconds\nrepeat (25)\n    wait (1) seconds\n    turn right (6) degrees\n    change [bob-tid v] by (-1)\n    start sound [Tick v]\n    if <(Pengasäck tagen!!??) = [ja]> then\n        broadcast (Bort med klockan v)\n        stop [this script v]\n    end\nend\nif <(Pengasäck tagen!!??) = [nej]> then\n    broadcast (Bob 3 - Förlust v)\nend\nwait (0.3) seconds\nbroadcast (Bort med klockan v)\n\nwhen I receive [bob - värld 2 - börjar v]\nwait (0.5) seconds\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [bob - värld 3 - börjar v]\nwait (0.5) seconds\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\n@Kvicksand\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (klädsel2 v)\nhide\n\nwhen flag clicked\nforever\n    if <<(Bana!?) > [10]> and <(Bana!?) < [21]>> then\n        next costume\n        wait (0.05) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Bana!?) > [10]> and <(Bana!?) < [21]>> then\n        show\n    else\n        hide\n    end\nend\n\n@Gunt a Gnag\n\nwhen flag clicked\nhide\nswitch costume to (klädsel3 v)\nset [ghost v] effect to (100)\nset size to (100) %\npoint in direction (90)\ngo to x: (53) y: (199)\nset [bossen har visat sig!? v] to [nej]\n\nwhen I receive [gunt a gnag v]\nwait (0.1) seconds\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [gunt a gnag - börjar v]\nwait (0.5) seconds\nrepeat (6)\n    next costume\n    wait (0.03) seconds\nend\nstart sound [rattle v]\nrepeat (5)\n    change x by (2)\n    wait (0.01) seconds\n    change x by (-2)\n    wait (0.01) seconds\nend\nrepeat (5)\n    next costume\n    wait (0.03) seconds\nend\nswitch costume to (klädsel3 v)\nset [björne kan röra på sig!!? v] to [ja]\nrepeat (3)\n    set [gunt a gnag, nudda? v] to [nej]\n    repeat (Hur många gånger!?)\n        set [fall fart v] to [16]\n        set [x-fart v] to (pick random (1) to (8))\n        wait (Tid för att vänta!?) seconds\n        repeat (6)\n            next costume\n            wait (0.03) seconds\n        end\n        start sound [rattle v]\n        repeat (Hur många skakningar!?)\n            change x by (2)\n            wait (0.01) seconds\n            change x by (-2)\n            wait (0.01) seconds\n        end\n        start sound [Swish 2 v]\n        repeat until <(Fall fart) = [-17]>\n            change y by (Fall fart)\n            change x by (X-fart)\n            change [fall fart v] by (-1)\n        end\n        start sound [Explosion! v]\n        broadcast (Gunt a gnag - Hattar v)\n        repeat (5)\n            next costume\n            wait (0.03) seconds\n        end\n        switch costume to (klädsel3 v)\n        set [fall fart v] to [16]\n        set [x-fart v] to (pick random (-1) to (-8))\n        wait (Tid för att vänta!?) seconds\n        repeat (6)\n            next costume\n            wait (0.03) seconds\n        end\n        start sound [rattle v]\n        repeat (Hur många skakningar!?)\n            change x by (2)\n            wait (0.01) seconds\n            change x by (-2)\n            wait (0.01) seconds\n        end\n        start sound [Swish 2 v]\n        repeat until <(Fall fart) = [-17]>\n            change y by (Fall fart)\n            change x by (X-fart)\n            change [fall fart v] by (-1)\n        end\n        start sound [Explosion! v]\n        broadcast (Gunt a gnag - Hattar v)\n        repeat (5)\n            next costume\n            wait (0.03) seconds\n        end\n        switch costume to (klädsel3 v)\n    end\n    set [fall fart v] to [18]\n    wait (Tid för att vänta!?) seconds\n    repeat (6)\n        next costume\n        wait (0.03) seconds\n    end\n    start sound [rattle v]\n    repeat (Hur många skakningar!?)\n        change x by (2)\n        wait (0.01) seconds\n        change y by (2)\n        wait (0.01) seconds\n        change x by (-2)\n        wait (0.01) seconds\n        change y by (-2)\n        wait (0.01) seconds\n    end\n    start sound [Swish 2 v]\n    repeat until <(Fall fart) = [-22]>\n        change y by (Fall fart)\n        turn right (2) degrees\n        change [fall fart v] by (-2)\n    end\n    start sound [Explosion! v]\n    broadcast (Gunt a gnag - Hattar v)\n    start sound [Bananskal v]\n    repeat (6)\n        next costume\n        turn right (7) degrees\n        wait (0.03) seconds\n    end\n    set [gunt a gnag, nudda? v] to [ja]\n    repeat until <<touching (hitbox v)?> or <(Boss tid) = [3]>>\n        next costume\n        wait (0.05) seconds\n        if <(costume [number v]) = [16]> then\n            switch costume to (skadad v)\n        end\n    end\n    start sound [Knytnäve 3 v]\n    broadcast (Björne - Litet hopp v)\n    change [hur många gånger!? v] by (1)\n    change [tid för att vänta!? v] by (-0.3)\n    change [hur många skakningar!? v] by (-3)\n    set y to (-75)\n    switch costume to (klädsel3 v)\n    set size to (120) %\n    repeat (10)\n        change size by (-2)\n        turn left (9) degrees\n    end\n    set size to (100) %\n    point in direction (90)\nend\nbroadcast (Gunt a gnag - nästan död v)\n\nwhen I receive [gunt a gnag v]\nglide (0.3) secs to x: (53) y: (-75)\nstart sound [Explosion! v]\nrepeat (2)\n    change y by (2)\nend\nrepeat (2)\n    change y by (1)\nend\nrepeat (2)\n    change y by (-1)\nend\nrepeat (2)\n    change y by (-2)\nend\nbroadcast (Gunt a gnag - Börjar v)\n\nwhen flag clicked\nset [hur många gånger!? v] to [1]\nset [tid för att vänta!? v] to [1]\nset [hur många skakningar!? v] to [10]\nset [gunt a gnag, nudda? v] to [nej]\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nforever\n    if <(Bana!?) = [20]> then\n        if <(Bossen har visat sig!?) = [nej]> then\n            if <([x position v] of [hitbox v]) > [-87]> then\n                set [bossen har visat sig!? v] to [ja]\n                broadcast (Gunt a gnag v)\n                set [björne kan röra på sig!!? v] to [nej]\n                set [boss igång!? v] to [ja]\n            end\n        end\n    end\nend\n\nwhen I receive [gunt a gnag - död v]\nstart sound [Swish 2 v]\nrepeat (10)\n    turn left (16) degrees\n    change [ghost v] effect by (10)\n    change size by (10)\n    change y by (10)\nend\nhide\nset [boss igång!? v] to [nej]\nset [björne kan röra på sig!!? v] to [ja]\n\nwhen I receive [gunt a gnag - nästan död v]\nset [björne kan röra på sig!!? v] to [nej]\nbroadcast (Gunt a Gnag - Sista prat v)\nset [boss pratar!? v] to [ja]\nwait until <(Boss pratar!?) = [nej]>\nbroadcast (Gunt a Gnag - Död v)\n\n@Gunt a gnag - Gunta 1\n\nwhen flag clicked\npoint in direction (90)\ngo to x: (-68) y: (-111)\nswitch costume to (klädsel1 v)\nset size to (100) %\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [gunt a gnag - hattar v]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\ngo to x: (pick random (-200) to (200)) y: (-111)\npoint in direction (90)\nset [fall fart v] to [5]\nset size to (100) %\nshow\nrepeat (4)\n    change [ghost v] effect by (-25)\nend\nstart sound [Swish 3 v]\nstart sound [Swish 2 v]\nrepeat until <(Fall fart) = [-5]>\n    change y by (Fall fart)\n    change [fall fart v] by (-1)\nend\nset [fall fart v] to [15]\nrepeat (3)\n    next costume\n    wait (0.02) seconds\nend\nwait (0.02) seconds\nstart sound [Swish 3 v]\nstart sound [Swish 2 v]\nrepeat until <(Fall fart) = [-16]>\n    change y by (Fall fart)\n    change [fall fart v] by (-1)\n    turn right (12) degrees\n    change x by (4)\nend\npoint in direction (90)\nrepeat (10)\n    change size by (-9)\n    change [ghost v] effect by (10)\n    turn right (15) degrees\n    change y by (-3)\nend\ndelete this clone\n\n@Gunt a gnag - Gunta 2\n\nwhen flag clicked\npoint in direction (90)\ngo to x: (-68) y: (-111)\nswitch costume to (klädsel1 v)\nset size to (100) %\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [gunt a gnag - hattar v]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nwait (0.1) seconds\ngo to x: (pick random (-200) to (200)) y: (-111)\npoint in direction (90)\nset [fall fart v] to [5]\nset size to (100) %\nshow\nrepeat (4)\n    change [ghost v] effect by (-25)\nend\nstart sound [Swish 2 v]\nstart sound [Swish 3 v]\nrepeat until <(Fall fart) = [-5]>\n    change y by (Fall fart)\n    change [fall fart v] by (-1)\nend\nset [fall fart v] to [18]\nrepeat (3)\n    next costume\n    wait (0.02) seconds\nend\nwait (0.02) seconds\nstart sound [Swish 2 v]\nstart sound [Swish 3 v]\nrepeat until <(Fall fart) = [-19]>\n    change y by (Fall fart)\n    change [fall fart v] by (-1)\n    turn left (12) degrees\n    change x by (-6)\nend\npoint in direction (90)\nrepeat (10)\n    change size by (-9)\n    change [ghost v] effect by (10)\n    turn left (15) degrees\n    change y by (-3)\nend\ndelete this clone\n\n@Benel\n\nwhen flag clicked\npoint in direction (90)\nswitch costume to (klädsel2 v)\nhide\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [14]> then\n    switch costume to (klädsel1 v)\n    point in direction (90)\n    go to x: (-75) y: (-4)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [19]> then\n    switch costume to (klädsel1 v)\n    point in direction (90)\n    go to x: (67) y: (41)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [17]> then\n    switch costume to (klädsel1 v)\n    point in direction (90)\n    go to x: (93) y: (68)\nend\n\nwhen flag clicked\nforever\n    if <<(Bana!?) = [11]> or <<(Bana!?) = [14]> or <<(Bana!?) = [17]> or <(Bana!?) = [19]>>>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nforever\n    if <<(Bana!?) = [11]> or <<(Bana!?) = [14]> or <<(Bana!?) = [17]> or <(Bana!?) = [19]>>>> then\n        if <(Spelet är igång!?) = [ja]> then\n            switch costume to (klädsel2 v)\n            wait (pick random (0.5) to (1)) seconds\n            start sound [Swish 2 v]\n            repeat (7)\n                change y by (5)\n                next costume\n            end\n            start sound [rattle v]\n            repeat (9)\n                change y by (2)\n                wait (0.01) seconds\n                change x by (2)\n                wait (0.01) seconds\n                change y by (-2)\n                wait (0.01) seconds\n                change x by (-2)\n                wait (0.01) seconds\n                turn right (1) degrees\n            end\n            start sound [Swish 3 v]\n            repeat (3)\n                turn left (3) degrees\n            end\n            repeat (7)\n                change y by (-5)\n                next costume\n            end\n        end\n    end\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [11]> then\n    switch costume to (klädsel1 v)\n    point in direction (90)\n    go to x: (-41) y: (-42)\nend\n\nrepeat (9)\n    change y by (2)\n    wait (0.01) seconds\n    change x by (2)\n    wait (0.01) seconds\n    change y by (-2)\n    wait (0.01) seconds\n    change x by (-2)\n    wait (0.01) seconds\n    turn right (1) degrees\nend\n\n@Slickistick\n\nwhen flag clicked\nswitch costume to (klädsel1 v)\nforever\n    if <<(Bana!?) = [12]> or <<(Bana!?) = [17]> or <(Bana!?) = [18]>>> then\n        if <(Spelet är igång!?) = [ja]> then\n            repeat (2)\n                repeat until <(costume [number v]) = [11]>\n                    next costume\n                    wait (0.03) seconds\n                end\n                switch costume to (klädsel1 v)\n            end\n            repeat until <(costume [number v]) = [20]>\n                next costume\n            end\n            repeat (4)\n                change y by (1)\n                wait (0.01) seconds\n                change x by (1)\n                wait (0.01) seconds\n                change y by (-1)\n                wait (0.01) seconds\n                change x by (-1)\n                wait (0.01) seconds\n                turn left (2) degrees\n            end\n            repeat until <(costume [number v]) = [1]>\n                next costume\n                wait (0.02) seconds\n            end\n            repeat (2)\n                turn right (4) degrees\n            end\n        end\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nswitch costume to (klädsel1 v)\nhide\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [12]> then\n    switch costume to (klädsel1 v)\n    point in direction (90)\n    go to x: (111) y: (-10)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [17]> then\n    switch costume to (klädsel1 v)\n    point in direction (90)\n    go to x: (-144) y: (-102)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [18]> then\n    switch costume to (klädsel1 v)\n    point in direction (90)\n    go to x: (74) y: (-101)\nend\n\nwhen flag clicked\nforever\n    if <<(Bana!?) = [12]> or <<(Bana!?) = [17]> or <(Bana!?) = [18]>>> then\n        show\n    else\n        hide\n    end\nend\n\n@Gunt\n\nwhen flag clicked\npoint in direction (90)\nswitch costume to (klädsel1 v)\nhide\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [18]> then\n    switch costume to (klädsel1 v)\n    go to x: (-42) y: (-78)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nforever\n    if <<(Bana!?) = [16]> or <(Bana!?) = [18]>> then\n        if <(Spelet är igång!?) = [ja]> then\n            wait (0.7) seconds\n            set [fall fart v] to [10]\n            repeat (3)\n                next costume\n                wait (0.02) seconds\n            end\n            wait (0.02) seconds\n            start sound [Swish 2 v]\n            start sound [Swish 3 v]\n            repeat until <(Fall fart) = [-11]>\n                change y by (Fall fart)\n                change [fall fart v] by (-1)\n                turn right (17) degrees\n                change x by (2)\n            end\n            point in direction (90)\n            set [fall fart v] to [10]\n            repeat (3)\n                next costume\n                wait (0.02) seconds\n            end\n            wait (0.7) seconds\n            repeat (3)\n                next costume\n            end\n            wait (0.02) seconds\n            start sound [Swish 3 v]\n            start sound [Swish 2 v]\n            repeat until <(Fall fart) = [-11]>\n                change y by (Fall fart)\n                change [fall fart v] by (-1)\n                turn left (17) degrees\n                change x by (-2)\n            end\n            point in direction (90)\n            set [fall fart v] to [10]\n            repeat (3)\n                next costume\n                wait (0.02) seconds\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Bana!?) = [16]> or <(Bana!?) = [18]>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [16]> then\n    switch costume to (klädsel1 v)\n    go to x: (9) y: (6)\nend\n\n@Affär\n\nwhen flag clicked\nforever\n    if <(Går å trycka på) = [ja]> then\n        if <(Affär öppen!?) = [nej]> then\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                broadcast (Affär v)\n            end\n        end\n    end\n    if <(Går å trycka på) = [ja]> then\n        if <(Affär öppen!?) = [ja]> then\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                broadcast (Bort med affär v)\n            end\n        end\n    end\nend\n\nwhen I receive [affär v]\nset [går å trycka på v] to [nej]\nstart sound [Swish 2 v]\nglide (0.3) secs to x: (99) y: (102)\nset [affär öppen!? v] to [ja]\nset [går å trycka på v] to [ja]\n\nwhen I receive [bort med affär v]\nset [går å trycka på v] to [nej]\nstart sound [Swish 3 v]\nglide (0.3) secs to x: (363) y: (102)\nset [affär öppen!? v] to [nej]\nset [går å trycka på v] to [ja]\n\nwhen I receive [ingen affär tillgänlig v]\nset [går å trycka på v] to [nej]\nif <(Affär öppen!?) = [ja]> then\n    start sound [Swish 3 v]\nend\nglide (0.3) secs to x: (363) y: (102)\nset [affär öppen!? v] to [nej]\n\nwhen I receive [bort med musiken v]\nbroadcast (Ingen affär tillgänlig v)\n\nwhen I receive [nästa bana v]\nset [affär öppen!? v] to [nej]\nset [går å trycka på v] to [ja]\n\nwhen I receive [herr hoppitott v]\nbroadcast (Ingen affär tillgänlig v)\n\nwhen I receive [gunt a gnag v]\nbroadcast (Ingen affär tillgänlig v)\n\nwhen I receive [kung spinnidung v]\nbroadcast (Ingen affär tillgänlig v)\n\nwhen I receive [bob - värld 1 v]\nbroadcast (Ingen affär tillgänlig v)\n\nwhen I receive [bob - värld 2 v]\nbroadcast (Ingen affär tillgänlig v)\n\nwhen I receive [bob - värld 3 v]\nbroadcast (Ingen affär tillgänlig v)\n\nwhen I receive [gråbjörn v]\nbroadcast (Ingen affär tillgänlig v)\n\nwhen I receive [himlen v]\nbroadcast (Ingen affär tillgänlig v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen flag clicked\ngo to x: (363) y: (102)\nset [affär öppen!? v] to [nej]\nset [går å trycka på v] to [nej]\nset [ghost v] effect to (0)\nshow\n\nwhen I receive [meddelande1 v]\nset [affär öppen!? v] to [nej]\nset [går å trycka på v] to [ja]\n\nwhen flag clicked\nforever\n    if <(?Språk?) = [Eng]> then\n        switch costume to (eng v)\n    else\n        switch costume to (sv v)\n    end\nend\n\nwhen I receive [björne död v]\nbroadcast (Ingen affär tillgänlig v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Giftbubblor\n\nwhen flag clicked\nhide\nset [ghost v] effect to (100)\nset size to (100) %\nswitch costume to (klädsel1 v)\n\nwhen I start as a clone\nset size to (pick random (10) to (80)) %\nswitch costume to (klädsel1 v)\ngo to x: (pick random (-240) to (240)) y: (pick random (-140) to (67))\nshow\nset [ghost v] effect to (50)\nrepeat (pick random (10) to (60))\n    change y by (pick random (0.5) to (2))\n    change x by (pick random (-1.2) to (1.2))\nend\nswitch costume to (klädsel2 v)\nset [ghost v] effect to (0)\nrepeat (5)\n    change [ghost v] effect by (20)\n    change size by (7)\nend\ndelete this clone\n\nwhen I receive [nästa bana v]\nforever\n    if <(Spelet är igång!?) = [ja]> then\n        if <<(Bana!?) > [20]> and <(Bana!?) < [31]>> then\n            create clone of (_myself_ v)\n            wait (0.1) seconds\n        end\n    end\nend\n\n@Hattar\n\nwhen flag clicked\npoint in direction (90)\nset size to (70) %\nset [ghost v] effect to (100)\nhide\nset [hatt - följa efter!? v] to [nej]\nset [hatt? v] to [nej]\n\nwhen I receive [hatt - pandafaffas original v]\nswitch costume to (pandafaffa original v)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [hatt - keps v]\nswitch costume to (keps v)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [hatt - gamle grå v]\nswitch costume to (gamle grå v)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [tillbaka med hatt v]\nif <(Hatt?) = [ja]> then\n    show\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nend\n\nwhen I receive [hatt - pandafaffas original v]\nset [hatt? v] to [ja]\nset [hatt - följa efter!? v] to [ja]\nforever\n    if <(Hatt - följa efter!?) = [ja]> then\n        go to (björne v)\n        point in direction ([direction v] of [björne v])\n    end\nend\n\nwhen I receive [hatt - keps v]\nset [hatt? v] to [ja]\nset [hatt - följa efter!? v] to [ja]\nforever\n    if <(Hatt - följa efter!?) = [ja]> then\n        go to (björne v)\n        point in direction ([direction v] of [björne v])\n    end\nend\n\nwhen I receive [skada - void v]\nif <(Hatt?) = [ja]> then\n    repeat (5)\n        change [ghost v] effect by (20)\n        change y by (-18)\n    end\n    hide\nend\n\nwhen I receive [skada - fiende v]\nif <(Hatt?) = [ja]> then\n    repeat (10)\n        turn right (3) degrees\n        change y by (-5)\n        change [ghost v] effect by (10)\n    end\n    hide\n    point in direction (90)\nend\n\nwhen I receive [skada - bränd v]\nif <(Hatt?) = [ja]> then\n    repeat (4)\n        change [brightness v] effect by (-25)\n    end\n    wait (0.2) seconds\n    repeat (10)\n        turn right (pick random (-2) to (2)) degrees\n        change size by (-1)\n        change [ghost v] effect by (10)\n    end\n    hide\n    set size to (70) %\n    set [brightness v] effect to (0)\nend\n\nwhen I receive [hatt - gamle grå v]\nset [hatt? v] to [ja]\nset [hatt - följa efter!? v] to [ja]\nforever\n    if <(Hatt - följa efter!?) = [ja]> then\n        go to (björne v)\n        point in direction ([direction v] of [björne v])\n    end\nend\n\n@Gamle Grå - Knapp\n\nwhen I receive [affär v]\nwait (0.2) seconds\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [bort med affär v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\n\nwhen flag clicked\ngo to x: (2) y: (117)\nset [köpt!? v] to [nej]\nset volume to (70) %\nset [ghost v] effect to (100)\nhide\n\nwhen flag clicked\nset size to (100) %\nforever\n    if <(Köpt!?) = [nej]> then\n        if <touching (mouse-pointer v)?> then\n            switch costume to (betalning v)\n            repeat until <(size) = [110]>\n                change size by (2)\n            end\n        else\n            switch costume to (klädsel3 v)\n            repeat until <(size) = [100]>\n                change size by (-2)\n            end\n        end\n    end\nend\n\nwhen this sprite clicked\nif <(Köpt!?) = [nej]> then\n    if <<(Antalet mynt) = [10]> or <(Antalet mynt) > [9]>> then\n        set [köpt!? v] to [ja]\n        change [antalet mynt v] by (-10)\n        start sound [Handlar v]\n        switch costume to (betald v)\n        set size to (100) %\n        broadcast (Hatt - Gamle Grå v)\n    end\nend\n\nwhen this sprite clicked\nif <(Köpt!?) = [nej]> then\n    if <(Antalet mynt) < [10]> then\n        start sound [Error v]\n    end\nend\n\nwhen I receive [ingen affär tillgänlig v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\n\n@Pandafaffas Original - Knapp\n\nwhen flag clicked\ngo to x: (43) y: (117)\nset volume to (70) %\nset [köpt!? v] to [nej]\nset [ghost v] effect to (100)\nhide\n\nwhen flag clicked\n\nwhen flag clicked\nset size to (100) %\nforever\n    if <(Köpt!?) = [nej]> then\n        if <touching (mouse-pointer v)?> then\n            switch costume to (betalning v)\n            repeat until <(size) = [110]>\n                change size by (2)\n            end\n        else\n            switch costume to (klädsel4 v)\n            repeat until <(size) = [100]>\n                change size by (-2)\n            end\n        end\n    end\nend\n\nwhen I receive [affär v]\nwait (0.2) seconds\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [bort med affär v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\n\nwhen this sprite clicked\nif <(Köpt!?) = [nej]> then\n    if <<(Antalet mynt) = [30]> or <(Antalet mynt) > [29]>> then\n        set [köpt!? v] to [ja]\n        change [antalet mynt v] by (-30)\n        start sound [Handlar v]\n        switch costume to (betald v)\n        set size to (100) %\n        broadcast (Hatt - Pandafaffas original v)\n    end\nend\n\nwhen this sprite clicked\nif <(Köpt!?) = [nej]> then\n    if <(Antalet mynt) < [30]> then\n        start sound [Error v]\n    end\nend\n\nwhen I receive [ingen affär tillgänlig v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\n\n@Keps - Knapp\n\nwhen flag clicked\ngo to x: (84) y: (117)\nset volume to (70) %\nset [köpt!? v] to [nej]\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [affär v]\nwait (0.2) seconds\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [bort med affär v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\n\nwhen I receive [ingen affär tillgänlig v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\n\nwhen flag clicked\nset size to (100) %\nforever\n    if <(Köpt!?) = [nej]> then\n        if <touching (mouse-pointer v)?> then\n            switch costume to (betalning v)\n            repeat until <(size) = [110]>\n                change size by (2)\n            end\n        else\n            switch costume to (klädsel6 v)\n            repeat until <(size) = [100]>\n                change size by (-2)\n            end\n        end\n    end\nend\n\nwhen this sprite clicked\nif <(Köpt!?) = [nej]> then\n    if <<(Antalet mynt) = [45]> or <(Antalet mynt) > [44]>> then\n        set [köpt!? v] to [ja]\n        change [antalet mynt v] by (-45)\n        start sound [Handlar v]\n        switch costume to (betald v)\n        set size to (100) %\n        broadcast (Hatt - Keps v)\n    end\nend\n\nwhen this sprite clicked\nif <(Köpt!?) = [nej]> then\n    if <(Antalet mynt) < [45]> then\n        start sound [Error v]\n    end\nend\n\n@Extraliv - Knapp\n\nwhen flag clicked\ngo to x: (125) y: (117)\nset volume to (70) %\nset [köpt!? v] to [nej]\nset [ghost v] effect to (100)\nhide\n\nwhen flag clicked\nset size to (100) %\nforever\n    if <(Köpt!?) = [nej]> then\n        if <touching (mouse-pointer v)?> then\n            switch costume to (betalning v)\n            repeat until <(size) = [110]>\n                change size by (2)\n            end\n        else\n            switch costume to (klädsel4 v)\n            repeat until <(size) = [100]>\n                change size by (-2)\n            end\n        end\n    end\nend\n\nwhen I receive [bort med affär v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\n\nwhen this sprite clicked\nif <(Köpt!?) = [nej]> then\n    if <<(Antalet mynt) = [25]> or <(Antalet mynt) > [24]>> then\n        set [köpt!? v] to [ja]\n        change [antalet mynt v] by (-25)\n        start sound [Handlar v]\n        switch costume to (betald v)\n        set size to (100) %\n        broadcast (+5 liv v)\n    end\nend\n\nwhen this sprite clicked\nif <(Köpt!?) = [nej]> then\n    if <(Antalet mynt) < [25]> then\n        start sound [Error v]\n    end\nend\n\nwhen I receive [ingen affär tillgänlig v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\n\nwhen I receive [affär v]\nwait (0.2) seconds\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\n@Extraliv - Knapp2\n\nwhen flag clicked\ngo to x: (166) y: (117)\nset volume to (70) %\nset [köpt!? v] to [nej]\nset [ghost v] effect to (100)\nhide\n\nwhen flag clicked\nset size to (100) %\nforever\n    if <(Köpt!?) = [nej]> then\n        if <touching (mouse-pointer v)?> then\n            switch costume to (betalning v)\n            repeat until <(size) = [110]>\n                change size by (2)\n            end\n        else\n            switch costume to (klädsel4 v)\n            repeat until <(size) = [100]>\n                change size by (-2)\n            end\n        end\n    end\nend\n\nwhen I receive [bort med affär v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\n\nwhen this sprite clicked\nif <(Köpt!?) = [nej]> then\n    if <<(Antalet mynt) = [45]> or <(Antalet mynt) > [44]>> then\n        set [köpt!? v] to [ja]\n        change [antalet mynt v] by (-45)\n        start sound [Handlar v]\n        switch costume to (betald v)\n        set size to (100) %\n        broadcast (+10 liv v)\n    end\nend\n\nwhen I receive [ingen affär tillgänlig v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\n\nwhen I receive [affär v]\nwait (0.2) seconds\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen this sprite clicked\nif <(Köpt!?) = [nej]> then\n    if <(Antalet mynt) < [45]> then\n        start sound [Error v]\n    end\nend\n\n@Kattadratt\n\nwhen flag clicked\npoint in direction (90)\nswitch costume to (klädsel1 v)\nset size to (100) %\nhide\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nforever\n    if <<(Bana!?) = [21]> or <<(Bana!?) = [23]> or <<(Bana!?) = [26]> or <<(Bana!?) = [28]> or <(Bana!?) = [29]>>>>> then\n        if <(Spelet är igång!?) = [ja]> then\n            wait (0.8) seconds\n            set [fall fart v] to [10]\n            repeat (3)\n                next costume\n                wait (0.02) seconds\n            end\n            start sound [Swish v]\n            repeat until <(Fall fart) = [0]>\n                change y by (Fall fart)\n                change [fall fart v] by (-1)\n            end\n            set [fall fart v] to [0]\n            start sound [Yxa 2 v]\n            repeat (4)\n                next costume\n            end\n            start sound [rattle v]\n            repeat (6)\n                change y by (2)\n                wait (0.01) seconds\n                switch costume to (taggar2 v)\n                change x by (2)\n                wait (0.01) seconds\n                change y by (-2)\n                wait (0.01) seconds\n                switch costume to (taggar4 v)\n                change x by (-2)\n                wait (0.01) seconds\n                turn left (2) degrees\n                change size by (4)\n            end\n            switch costume to (taggar3 v)\n            repeat (8)\n                turn right (1.5) degrees\n                next costume\n                change size by (-3)\n                wait (0.02) seconds\n            end\n            point in direction (90)\n            start sound [Swish 2 v]\n            repeat until <(Fall fart) = [-11]>\n                change y by (Fall fart)\n                change [fall fart v] by (-1)\n            end\n        end\n    end\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [21]> then\n    point in direction (90)\n    switch costume to (klädsel1 v)\n    set size to (100) %\n    go to x: (94) y: (-72)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [23]> then\n    point in direction (90)\n    switch costume to (klädsel1 v)\n    set size to (100) %\n    go to x: (-159) y: (-30)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [26]> then\n    point in direction (90)\n    switch costume to (klädsel1 v)\n    set size to (100) %\n    go to x: (133) y: (85)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [28]> then\n    point in direction (90)\n    switch costume to (klädsel1 v)\n    set size to (100) %\n    go to x: (11) y: (115)\nend\n\nwhen flag clicked\nforever\n    if <<(Bana!?) = [21]> or <<(Bana!?) = [23]> or <<(Bana!?) = [26]> or <<(Bana!?) = [28]> or <(Bana!?) = [29]>>>>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [29]> then\n    point in direction (90)\n    switch costume to (klädsel1 v)\n    set size to (100) %\n    go to x: (45) y: (-36)\nend\n\n@Lakibu\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nforever\n    if <<(Bana!?) = [22]> or <<(Bana!?) = [25]> or <(Bana!?) = [27]>>> then\n        if <(Spelet är igång!?) = [ja]> then\n            next costume\n            wait (0.04) seconds\n        end\n    end\nend\n\nwhen I receive [spöke död v]\nstart sound [rattle v]\nrepeat (9)\n    change y by (2)\n    wait (0.01) seconds\n    change x by (2)\n    wait (0.01) seconds\n    change y by (-2)\n    wait (0.01) seconds\n    change x by (-2)\n    wait (0.01) seconds\n    turn right (1) degrees\nend\n\nwhen I receive [spöke död v]\nset [ghost v] effect to (0)\nstart sound [Spöke död v]\nrepeat (10)\n    change [ghost v] effect by (10)\n    turn right (5) degrees\n    change size by (5)\nend\nhide\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [22]> then\n    point in direction (90)\n    switch costume to (klädsel1 v)\n    set size to (100) %\n    go to x: (147) y: (143)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [25]> then\n    point in direction (90)\n    switch costume to (klädsel1 v)\n    set size to (100) %\n    go to x: (178) y: (122)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [27]> then\n    point in direction (90)\n    switch costume to (klädsel1 v)\n    set size to (100) %\n    go to x: (149) y: (23)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nforever\n    if <(Död?) = [nej]> then\n        if <touching (ljus v)?> then\n            set [död? v] to [ja]\n            broadcast (Spöke död v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Död?) = [nej]> then\n        if <<(Bana!?) = [22]> or <<(Bana!?) = [25]> or <(Bana!?) = [27]>>> then\n            show\n        else\n            hide\n        end\n    end\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nset [död? v] to [nej]\nforever\n    if <<(Bana!?) = [22]> or <<(Bana!?) = [25]> or <(Bana!?) = [27]>>> then\n        if <(Spelet är igång!?) = [ja]> then\n            if <(Död?) = [nej]> then\n                set [ghost v] effect to (((distance to [hitbox v]) / (2)) - (10))\n                if <(distance to [hitbox v]) < [155]> then\n                    if <(distance to [hitbox v]) > [20]> then\n                        move (1) steps\n                        point towards (hitbox v)\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [bort med musiken v]\nif <<(Bana!?) = [22]> or <<(Bana!?) = [25]> or <(Bana!?) = [27]>>> then\n    if <(Död?) = [nej]> then\n        broadcast (Spöket lever!? v)\n    end\nend\n\nwhen flag clicked\nset [död? v] to [nej]\ngo to x: (197) y: (107)\nset size to (100) %\nhide\n\n@Spintus\n\nwhen flag clicked\nhide\nset [spindelns gång v] to [40]\nset volume to (20) %\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nforever\n    if <<<(Bana!?) = [24]> or <(Bana!?) = [25]>> or <(Bana!?) = [28]>> then\n        if <(Spelet är igång!?) = [ja]> then\n            next costume\n            wait (0.02) seconds\n        end\n    end\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [25]> then\n    switch costume to (klädsel2 v)\n    set [spindelns gång v] to [60]\n    go to x: (-165) y: (-148)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [28]> then\n    switch costume to (klädsel2 v)\n    set [spindelns gång v] to [50]\n    go to x: (-44) y: (-115)\nend\n\nwhen flag clicked\nforever\n    if <<<(Bana!?) = [24]> or <(Bana!?) = [25]>> or <(Bana!?) = [28]>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [nästa bana v]\nwait (0.5) seconds\nforever\n    if <<<(Bana!?) = [24]> or <(Bana!?) = [25]>> or <(Bana!?) = [28]>> then\n        if <(Spelet är igång!?) = [ja]> then\n            start sound [Spindelgång v]\n            repeat (Spindelns gång)\n                change x by (2)\n            end\n            wait (pick random (0.1) to (0.5)) seconds\n            start sound [Spindelgång v]\n            repeat (Spindelns gång)\n                change x by (-2)\n            end\n            wait (pick random (0.1) to (0.5)) seconds\n        end\n    end\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [24]> then\n    switch costume to (klädsel2 v)\n    set [spindelns gång v] to [30]\n    go to x: (122) y: (114)\nend\n\n@Ljussjusterare\n\nwhen flag clicked\nhide\ngo to x: (5) y: (-125)\n\nwhen flag clicked\nforever\n    if <<(Bana!?) = [22]> or <<(Bana!?) = [25]> or <(Bana!?) = [27]>>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [22]> then\n    go to x: (5) y: (-130)\nend\nif <(Bana!?) = [25]> then\n    go to x: (36) y: (-145)\nend\nif <(Bana!?) = [27]> then\n    go to x: (-25) y: (-7)\nend\n\n@Ljus\n\nwhen flag clicked\nhide\nset [ghost v] effect to (20)\nset size to (100) %\n\nwhen flag clicked\nforever\n    if <<<(Bana!?) = [22]> or <(Bana!?) = [25]>> or <(Bana!?) = [27]>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [nästa bana v]\nset [rotera v] to [0]\nwait (0.3) seconds\nif <<<(Bana!?) = [22]> or <(Bana!?) = [25]>> or <(Bana!?) = [27]>> then\n    set [rotera v] to [0]\n    repeat until <touching (lakibu v)?>\n        change [rotera v] by (3)\n        point in direction ((([sin v] of (Rotera) ) * (5)) + (90))\n    end\n    set [rotera v] to [0]\n    set [ljus v] to [0]\n    set [storlek v] to [0]\n    start sound [Swish 3 v]\n    wait (0.5) seconds\n    repeat (10)\n        change [ljus v] by (2)\n        change [storlek v] by (-2)\n        change [ghost v] effect by (Ljus)\n        change size by (Storlek)\n    end\n    hide\nend\n\nwhen I receive [nästa bana v]\nwait (0.4) seconds\nif <(Bana!?) = [22]> then\n    go to (ljussjusterare v)\n    go to x: (5) y: (-130)\n    set size to (100) %\n    set [ghost v] effect to (0)\nend\nif <(Bana!?) = [25]> then\n    go to (ljussjusterare v)\n    go to x: (36) y: (-143)\n    set size to (100) %\n    set [ghost v] effect to (0)\nend\nif <(Bana!?) = [27]> then\n    go to (ljussjusterare v)\n    go to x: (-25) y: (-7)\n    set size to (100) %\n    set [ghost v] effect to (0)\nend\n\n@Spökplanka\n\nwhen flag clicked\ngo to x: (11) y: (-58)\nset volume to (30) %\nhide\n\nwhen I receive [nästa bana v]\nwait (0.5) seconds\nforever\n    if <<(Bana!?) = [23]> or <<(Bana!?) = [24]> or <(Bana!?) = [26]>>> then\n        if <(Spelet är igång!?) = [ja]> then\n            change [rotera v] by (5)\n            point in direction ((([sin v] of (Rotera) ) * (Snurr!?)) + (90))\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Bana!?) = [23]> or <<(Bana!?) = [24]> or <(Bana!?) = [26]>>> then\n        show\n    else\n        set [rotera v] to [0]\n        hide\n    end\nend\n\nwhen I receive [nästa bana v]\nwait (0.7) seconds\nforever\n    if <<(Bana!?) = [23]> or <<(Bana!?) = [24]> or <(Bana!?) = [26]>>> then\n        if <(Spelet är igång!?) = [ja]> then\n            play sound [Knak v] until done\n        end\n    end\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [23]> then\n    point in direction (90)\n    go to x: (11) y: (-58)\n    set [snurr!? v] to [60]\n    set [rotate v] to [0]\nend\nif <(Bana!?) = [24]> then\n    point in direction (90)\n    go to x: (-52) y: (-50)\n    set [snurr!? v] to [90]\n    set [rotate v] to [0]\nend\nif <(Bana!?) = [26]> then\n    point in direction (90)\n    go to x: (27) y: (-162)\n    set [snurr!? v] to [80]\n    set [rotate v] to [0]\nend\n\n@Kung Spinnidung\n\nwhen flag clicked\ngo to x: (0) y: (199)\nhide\nset size to (100) %\nset [ghost v] effect to (100)\nswitch costume to (klädsel3 v)\nset [bossen har visat sig!? v] to [nej]\npoint in direction (90)\nset volume to (100) %\nset [kraft vänta v] to [9]\n\nwhen I receive [kung spinnidung - börjar v]\nset [björne kan röra på sig!!? v] to [ja]\nwait (1) seconds\nrepeat (3)\n    repeat (11)\n        next costume\n        wait (0.02) seconds\n        if <(costume [number v]) = [6]> then\n            switch costume to (klädsel3 v)\n        end\n    end\n    switch costume to (tråd 1 v)\n    repeat (4)\n        next costume\n        wait (0.02) seconds\n    end\n    broadcast (Kung Spinnidung - Tråd v)\n    start sound [rattle v]\n    start sound [Skaka v]\n    repeat (20)\n        change y by (2)\n        wait (0.01) seconds\n        change x by (2)\n        wait (0.01) seconds\n        change y by (-2)\n        wait (0.01) seconds\n        change x by (-2)\n        wait (0.01) seconds\n    end\n    repeat (4)\n        next costume\n        wait (0.02) seconds\n    end\n    switch costume to (klädsel3 v)\n    repeat (23)\n        next costume\n        wait (0.02) seconds\n        if <(costume [number v]) = [6]> then\n            switch costume to (klädsel3 v)\n        end\n    end\n    switch costume to (tråd 1 v)\n    repeat (4)\n        next costume\n        wait (0.02) seconds\n    end\n    broadcast (Kung Spinnedung - Kraft v)\n    start sound [rattle v]\n    start sound [Skaka v]\n    repeat (Kraft vänta)\n        change y by (2)\n        wait (0.01) seconds\n        change x by (2)\n        wait (0.01) seconds\n        change y by (-2)\n        wait (0.01) seconds\n        change x by (-2)\n        wait (0.01) seconds\n    end\n    start sound [Bananskal v]\n    repeat (5)\n        turn right (36) degrees\n    end\n    set [fall fart! v] to [0]\n    start sound [Swish 2 v]\n    repeat until <touching (bana v)?>\n        change y by (Fall fart!)\n        change [fall fart! v] by (-1)\n    end\n    set [fall fart! v] to [0]\n    start sound [Bom! v]\n    set [kung spinnedung, nudda? v] to [ja]\n    repeat until <touching (hitbox v)?>\n        next costume\n        wait (0.03) seconds\n        if <(costume [number v]) = [14]> then\n            switch costume to (tråd 3 v)\n        end\n    end\n    broadcast (Björne - Litet hopp v)\n    start sound [Knytnäve 3 v]\n    switch costume to (tråd 5 v)\n    set size to (120) %\n    change [kraft vänta v] by (5)\n    set [kung spinnedung - antal krafter v] to ((Kung Spinnedung - Antal krafter) * (2))\n    change [kung spinnedung - kraftcirklar v] by (11)\n    repeat (10)\n        change size by (-2)\n    end\n    wait (0.3) seconds\n    start sound [Swish v]\n    repeat (10)\n        turn right (18) degrees\n        change y by (3)\n    end\n    repeat until <(costume [number v]) = [1]>\n        next costume\n        wait (0.03) seconds\n    end\n    start sound [Swish 2 v]\n    glide (0.3) secs to x: (0) y: (123)\n    start sound [Yxa 2 v]\n    set [kung spinnedung, nudda? v] to [nej]\nend\nbroadcast (Kung Spinnedung nästan död v)\n\nwhen I receive [kung spinnidung v]\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\n\nwhen I receive [kung spinnidung v]\nswitch costume to (klädsel3 v)\nrepeat (30)\n    next costume\n    wait (0.02) seconds\n    if <(costume [number v]) = [6]> then\n        switch costume to (klädsel3 v)\n    end\nend\nbroadcast (Kung Spinnidung - Börjar v)\n\nwhen I receive [kung spinnidung v]\nglide (1) secs to x: (0) y: (123)\n\nwhen I receive [kung spinnedung nästan död v]\nset [björne kan röra på sig!!? v] to [nej]\nset [boss igång!? v] to [nej]\n\nwhen I receive [kung spinnedung nästan död v]\nset [kung spinnedung, nudda? v] to [ja]\nset [röreslse nästan död v] to [ja]\nset [fall fart! v] to [0]\nwait (0.2) seconds\nstart sound [Swish 2 v]\nrepeat (5)\n    turn right (36) degrees\nend\nrepeat until <touching (bana v)?>\n    change y by (Fall fart!)\n    change [fall fart! v] by (-1)\nend\nset [fall fart! v] to [0]\nstart sound [Bom! v]\nbroadcast (Kung Spinnedung nästan död 2 v)\nrepeat until <(Röreslse nästan död) = [nej]>\n    next costume\n    wait (0.03) seconds\n    if <(costume [number v]) = [14]> then\n        switch costume to (tråd 1 v)\n    end\nend\nwait (0.2) seconds\nrepeat (7)\n    change y by (2)\n    wait (0.01) seconds\n    change x by (2)\n    wait (0.01) seconds\n    change y by (-2)\n    wait (0.01) seconds\n    change x by (-2)\n    wait (0.01) seconds\nend\nbroadcast (Björne 10 nya liv fr spindel v)\nstart sound [Explosion! v]\nrepeat (10)\n    change size by (10)\n    change [ghost v] effect by (10)\n    change y by (15)\n    turn right (20) degrees\nend\nhide\nset [björne kan röra på sig!!? v] to [ja]\n\nwhen flag clicked\nset [kung spinnedung, nudda? v] to [nej]\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nforever\n    if <(Bana!?) = [30]> then\n        if <(Bossen har visat sig!?) = [nej]> then\n            if <([x position v] of [hitbox v]) > [0]> then\n                set [bossen har visat sig!? v] to [ja]\n                broadcast (Kung Spinnidung v)\n                set [björne kan röra på sig!!? v] to [nej]\n                set [boss igång!? v] to [ja]\n            end\n        end\n    end\nend\n\nwhen I receive [kung spinnedung nästan död 2 v]\nbroadcast (Kung Spinnedung - Sista prat v)\nset [boss pratar!? v] to [ja]\nwait until <(Boss pratar!?) = [nej]>\nset [röreslse nästan död v] to [nej]\nwait (2) seconds\n\n@Kung Spinnedung - Hänge\n\nwhen flag clicked\ngo to x: (3) y: (230)\nchange [ghost v] effect by (100)\nhide\n\nwhen I receive [kung spinnidung v]\nwait (0.1) seconds\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nforever\n    change y by (1)\n    wait (0.01) seconds\n    change x by (1)\n    wait (0.01) seconds\n    change y by (-1)\n    wait (0.01) seconds\n    change x by (-1)\n    wait (0.01) seconds\nend\n\nwhen I receive [kung spinnidung v]\nwait (0.1) seconds\nglide (0.5) secs to x: (3) y: (199)\n\nwhen I receive [kung spinnedung nästan död v]\nrepeat (20)\n    change [ghost v] effect by (5)\n    change y by (5)\nend\nhide\n\n@Kung Spinnidung - Tråd 1\n\nwhen flag clicked\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [kung spinnidung - tråd v]\nwait (0.2) seconds\nset size to (100) %\nshow\ngo to (kung spinnidung v)\nchange y by (-30)\npoint towards (hitbox v)\nstart sound [Swish 3 v]\nrepeat until <<touching (bana v)?> or <touching (_edge_ v)?>>\n    move (12) steps\n    turn right (pick random (-1) to (1)) degrees\n    create clone of (_myself_ v)\nend\nstart sound [Yxa 2 v]\nhide\n\nwhen I start as a clone\nswitch costume to (pick random (1) to (2))\nset [ghost v] effect to (0)\nset size to (pick random (50) to (100)) %\nwait (1.5) seconds\nstart sound [Bort med när v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\n@Kung Spinnidung - Tråd 2\n\nwhen flag clicked\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [kung spinnidung - tråd v]\nwait (1.2) seconds\nset size to (100) %\nshow\ngo to (kung spinnidung v)\nchange y by (-30)\npoint towards (hitbox v)\nstart sound [Swish 3 v]\nrepeat until <<touching (bana v)?> or <touching (_edge_ v)?>>\n    move (12) steps\n    turn right (pick random (-1) to (1)) degrees\n    create clone of (_myself_ v)\nend\nstart sound [Yxa 2 v]\nhide\n\nwhen I start as a clone\nswitch costume to (pick random (1) to (2))\nset [ghost v] effect to (0)\nset size to (pick random (50) to (100)) %\nwait (1.5) seconds\nstart sound [Bort med när v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\n@Kung Spinnedung - Kraftcirklar\n\nwhen flag clicked\nset [ghost v] effect to (100)\nset size to (100) %\nhide\nset volume to (60) %\nset [kung spinnedung - kraftcirklar v] to [10]\n\nwhen I receive [kung spinnedung - kraft v]\ngo to (kung spinnidung v)\nset size to (100) %\nshow\nstart sound [Meddelande v]\nrepeat (Kung Spinnedung - Kraftcirklar)\n    create clone of (_myself_ v)\n    wait (0.02) seconds\nend\n\nwhen I receive [kung spinnedung nästan död v]\nhide\n\nwhen I start as a clone\nset [ghost v] effect to (0)\nrepeat (10)\n    change size by (8)\n    change [ghost v] effect by (10)\nend\nhide\ndelete this clone\n\n@Kung Spinnedung - Kraft\n\nwhen flag clicked\nset [ghost v] effect to (100)\nhide\nset volume to (20) %\nset [kung spinnedung - antal krafter v] to [18]\nset [snurr v] to [-0.7]\nset [lasersnurr v] to [25]\n\nwhen I receive [kung spinnedung nästan död v]\nhide\n\nwhen I receive [kung spinnedung - kraft v]\nchange [snurr v] by (0.7)\nchange [lasersnurr v] by (-3)\nshow\ngo to (kung spinnidung v)\npoint in direction (90)\nrepeat (Kung Spinnedung - Antal krafter)\n    turn right (Lasersnurr) degrees\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nstart sound [laser2 v]\nset [ghost v] effect to (0)\nrepeat until <<touching (bana v)?> or <touching (_edge_ v)?>>\n    move (7) steps\n    turn left (Snurr) degrees\nend\nstart sound [laser1 v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\ndelete this clone\n\n@Kung Spinnedung - Spintus\n\nwhen flag clicked\nset volume to (20) %\nhide\n\nwhen I receive [kung spinnidung - tråd v]\ngo to x: (243) y: (0)\nshow\nstart sound [Spindelgång v]\nrepeat until <(x position) < [-235]>\n    change [speed y v] by (-1)\n    change y by (speed y)\n    Touch Ground <(speed y) > [0]>\n    Walk (-90) (pick random (-1) to (-4))\n    next costume\nend\nhide\n\ndefine Touch Ground <>\nchange [falling? v] by (1)\nrepeat until <not <touching (bana v)?>>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    set [speed y v] to [0]\nend\n\ndefine None\npoint in direction (direction)\nchange x by (speed)\nset [slope v] to [0]\nrepeat until <<(slope) = [8]> or <not <touching (bana v)?>>>\n    change y by (1)\n    change [slope v] by (1)\nend\nif <(slope) = [8]> then\n    change x by ((0) - (speed))\n    change y by ((0) - (slope))\nend\n\n@Bob\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nforever\n    if <(Bana!?) = [5]> then\n        next costume\n        wait (0.03) seconds\n    end\n    if <(Bana!?) = [15]> then\n        next costume\n        wait (0.03) seconds\n    end\n    if <(Bana!?) = [25]> then\n        next costume\n        wait (0.03) seconds\n    end\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nset [har varnat!? v] to [nej]\nif <(Bana!?) = [5]> then\n    switch costume to (bob - 1 v)\n    set size to (80) %\n    set [ghost v] effect to (0)\n    point in direction (90)\n    go to x: (-54) y: (-48)\n    show\nend\nif <(Bana!?) = [15]> then\n    switch costume to (bob - 1 v)\n    set size to (80) %\n    set [ghost v] effect to (0)\n    point in direction (90)\n    go to x: (123) y: (-65)\n    show\nend\nif <(Bana!?) = [25]> then\n    switch costume to (bob - 1 v)\n    set size to (80) %\n    set [ghost v] effect to (0)\n    point in direction (90)\n    go to x: (97) y: (-42)\n    show\nend\n\nwhen I receive [nästa bana v]\nwait (0.5) seconds\nforever\n    if <(Har varnat!?) = [nej]> then\n        if <(Bana!?) = [5]> then\n            if <([x position v] of [hitbox v]) > [-170]> then\n                set [har varnat!? v] to [ja]\n                broadcast (Bob - Värld 1 v)\n            end\n        end\n    end\n    if <(Har varnat!?) = [nej]> then\n        if <(Bana!?) = [15]> then\n            if <([x position v] of [hitbox v]) > [-22]> then\n                set [har varnat!? v] to [ja]\n                broadcast (Bob - Värld 2 v)\n            end\n        end\n    end\n    if <(Har varnat!?) = [nej]> then\n        if <(Bana!?) = [25]> then\n            if <([x position v] of [hitbox v]) > [18]> then\n                set [har varnat!? v] to [ja]\n                broadcast (Bob - Värld 3 v)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [har varnat!? v] to [nej]\nset [kaktus bort!? v] to [nej]\nset [träffad av kaktus!!?? v] to [nej]\npoint in direction (90)\nset volume to (100) %\nset [ghost v] effect to (0)\nset size to (80) %\nhide\n\nwhen I receive [bob 1 - vinst v]\nstop all sounds\nset volume to (70) %\nplay sound [Klarade det! v] until done\nset volume to (100) %\nchange [poäng v] by (50)\n\nwhen I receive [bob 1 - förlust v]\nstop all sounds\nstart sound [Visselpipa v]\n\nwhen I receive [bob 2 - vinst v]\nstop all sounds\nset volume to (70) %\nplay sound [Klarade det! v] until done\nset volume to (100) %\nchange [poäng v] by (50)\n\nwhen I receive [bob 2 - förlust v]\nstop all sounds\nplay sound [Visselpipa v] until done\n\nwhen I receive [bob försvinn v]\nwait (0.5) seconds\nstart sound [Swish 2 v]\nrepeat (10)\n    change y by (-5)\n    turn right (10) degrees\n    change [ghost v] effect by (10)\n    change size by (-5)\nend\nhide\nset [björne kan röra på sig!!? v] to [ja]\nset [boss igång!? v] to [nej]\n\nwhen I receive [bob 3 - förlust v]\nstop all sounds\nplay sound [Visselpipa v] until done\n\nwhen I receive [bob 3 - vinst v]\nstop all sounds\nset volume to (70) %\nplay sound [Klarade det! v] until done\nset volume to (100) %\nchange [poäng v] by (50)\n\n@Bobs pratbubblor\n\nwhen flag clicked\nset [ghost v] effect to (100)\nset size to (90) %\nhide\nset volume to (25) %\npoint in direction (120)\n\nwhen I receive [bob 1 - förlust v]\nset [björne kan röra på sig!!? v] to [nej]\nwait (1) seconds\ngo to (bob v)\nchange y by (40)\nchange x by (25)\nstart sound (pick random (4) to (7))\nif <(?Språk?) = [Eng]> then\n    switch costume to (bob 1 - 1 f e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (bob 1 - 1 f s v)\nend\nshow\nstart sound [Meddelande - Fram v]\nrepeat (4)\n    change [ghost v] effect by (-25)\n    change size by (4)\n    turn left (7.5) degrees\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nrepeat (3)\n    change size by (2)\nend\nstart sound [Meddelande - Fram v]\nstart sound (pick random (4) to (7))\nif <(?Språk?) = [Eng]> then\n    switch costume to (bob 1 - 2 f e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (bob 1 - 2 f s v)\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nstart sound [Meddelande - Bort v]\nrepeat (2)\n    change [ghost v] effect by (25)\n    change size by (-5)\nend\nhide\npoint in direction (120)\nbroadcast (Bob försvinn v)\nset [ballong bort!? v] to [ja]\n\nwait until <key (space v) pressed?>\nstart sound [Meddelande - Bort v]\nrepeat (2)\n    change [ghost v] effect by (25)\n    change size by (-5)\nend\nhide\npoint in direction (120)\nset [bob pratar!? v] to [nej]\nset [pratbubbla roterar!? v] to [0]\n\nwait until <key (space v) pressed?>\nrepeat (3)\n    change size by (2)\nend\nstart sound [Meddelande - Fram v]\nset [pratbubbla roterar!? v] to [0]\nswitch costume to (boss 1 - 2 v)\nrepeat (2)\n    change size by (-3)\nend\n\nwhen I receive [meddelande1 v]\n\nset [pratbubbla roterar!? v] to [0]\nset [björne kan röra på sig!!? v] to [nej]\nwait (1) seconds\ngo to x: (70) y: (95)\nswitch costume to (bob 1 - 1 b v)\nshow\nstart sound [Meddelande - Fram v]\nrepeat (4)\n    change [ghost v] effect by (-25)\n    change size by (4)\n    turn left (7.5) degrees\nend\nrepeat (2)\n    change size by (-3)\nend\n\nwhen I receive [bob 1 - vinst v]\nset [björne kan röra på sig!!? v] to [nej]\nwait (1.5) seconds\ngo to (bob v)\nchange y by (40)\nchange x by (25)\nstart sound (pick random (4) to (7))\nif <(?Språk?) = [Eng]> then\n    switch costume to (bob 1 - 1 k e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (bob 1 - 1 k s v)\nend\nshow\nstart sound [Meddelande - Fram v]\nrepeat (4)\n    change [ghost v] effect by (-25)\n    change size by (4)\n    turn left (7.5) degrees\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nrepeat (3)\n    change size by (2)\nend\nstart sound [Meddelande - Fram v]\nstart sound (pick random (4) to (7))\nif <(?Språk?) = [Eng]> then\n    switch costume to (bob 1 - 2 k e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (bob 1 - 2 k s v)\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nstart sound [Meddelande - Bort v]\nrepeat (2)\n    change [ghost v] effect by (25)\n    change size by (-5)\nend\nhide\npoint in direction (120)\nbroadcast (Pris nr 1 v)\nbroadcast (Bob försvinn v)\nset [ballong bort!? v] to [ja]\n\nwhen I receive [bob - värld 1 v]\nset [björne kan röra på sig!!? v] to [nej]\nwait (1) seconds\ngo to (bob v)\nchange y by (40)\nchange x by (25)\nstart sound (pick random (4) to (7))\nif <(?Språk?) = [Eng]> then\n    switch costume to (bob 1 - 1 b e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (bob 1 - 1 b s v)\nend\nshow\nstart sound [Meddelande - Fram v]\nrepeat (4)\n    change [ghost v] effect by (-25)\n    change size by (4)\n    turn left (7.5) degrees\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nrepeat (3)\n    change size by (2)\nend\nstart sound [Meddelande - Fram v]\nstart sound (pick random (4) to (7))\nif <(?Språk?) = [Eng]> then\n    switch costume to (bob 1 - 2 b e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (bob 1 - 2 b s v)\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nstart sound [Meddelande - Bort v]\nrepeat (2)\n    change [ghost v] effect by (25)\n    change size by (-5)\nend\nhide\npoint in direction (120)\nbroadcast (Bob - Värld 1 - Börjar v)\nset [boss igång!? v] to [ja]\n\nwhen I receive [bob 2 - vinst v]\nset [björne kan röra på sig!!? v] to [nej]\nwait (1.5) seconds\ngo to (bob v)\nchange y by (40)\nchange x by (25)\nstart sound (pick random (4) to (7))\nif <(?Språk?) = [Eng]> then\n    switch costume to (bob 2 - 1 k e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (bob 2 - 1 k s v)\nend\nshow\nstart sound [Meddelande - Fram v]\nrepeat (4)\n    change [ghost v] effect by (-25)\n    change size by (4)\n    turn left (7.5) degrees\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nrepeat (3)\n    change size by (2)\nend\nstart sound [Meddelande - Fram v]\nstart sound (pick random (4) to (7))\nif <(?Språk?) = [Eng]> then\n    switch costume to (bob 2 - 2 k e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (bob 2 - 2 k s v)\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nstart sound [Meddelande - Bort v]\nrepeat (2)\n    change [ghost v] effect by (25)\n    change size by (-5)\nend\nhide\npoint in direction (120)\nbroadcast (Pris nr 2 v)\nbroadcast (Bob försvinn v)\nset [kaktus bort!? v] to [ja]\n\nwhen I receive [bob 2 - förlust v]\nset [björne kan röra på sig!!? v] to [nej]\nwait (1) seconds\ngo to (bob v)\nchange y by (40)\nchange x by (25)\nstart sound (pick random (4) to (7))\nif <(?Språk?) = [Eng]> then\n    switch costume to (bob 2 - 1 f e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (bob 2 - 1 f s v)\nend\nshow\nstart sound [Meddelande - Fram v]\nrepeat (4)\n    change [ghost v] effect by (-25)\n    change size by (4)\n    turn left (7.5) degrees\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nrepeat (3)\n    change size by (2)\nend\nstart sound [Meddelande - Fram v]\nstart sound (pick random (4) to (7))\nif <(?Språk?) = [Eng]> then\n    switch costume to (bob 2 - 2 f e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (bob 2 - 2 f s v)\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nstart sound [Meddelande - Bort v]\nrepeat (2)\n    change [ghost v] effect by (25)\n    change size by (-5)\nend\nhide\npoint in direction (120)\nbroadcast (Bob försvinn v)\nset [kaktus bort!? v] to [ja]\n\nwhen I receive [bob - värld 2 v]\nset [björne kan röra på sig!!? v] to [nej]\nwait (1) seconds\ngo to (bob v)\nchange y by (40)\nchange x by (25)\nstart sound (pick random (4) to (7))\nif <(?Språk?) = [Eng]> then\n    switch costume to (bob 2 - 1 b e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (bob 2 - 1 b s v)\nend\nshow\nstart sound [Meddelande - Fram v]\nrepeat (4)\n    change [ghost v] effect by (-25)\n    change size by (4)\n    turn left (7.5) degrees\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nrepeat (3)\n    change size by (2)\nend\nstart sound [Meddelande - Fram v]\nstart sound (pick random (4) to (7))\nif <(?Språk?) = [Eng]> then\n    switch costume to (bob 2 - 2 b e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (bob 2 - 2 b s v)\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nstart sound [Meddelande - Bort v]\nrepeat (2)\n    change [ghost v] effect by (25)\n    change size by (-5)\nend\nhide\npoint in direction (120)\nbroadcast (Bob - Värld 2 - Börjar v)\nset [boss igång!? v] to [ja]\nset [björne kan röra på sig!!? v] to [ja]\n\nwhen I receive [bob 3 - vinst v]\nset [björne kan röra på sig!!? v] to [nej]\nwait (1.5) seconds\ngo to (bob v)\nchange y by (40)\nchange x by (25)\nstart sound (pick random (4) to (7))\nif <(?Språk?) = [Eng]> then\n    switch costume to (bob 3 - 1 k e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (bob 3 - 1 k s v)\nend\nshow\nstart sound [Meddelande - Fram v]\nrepeat (4)\n    change [ghost v] effect by (-25)\n    change size by (4)\n    turn left (7.5) degrees\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nrepeat (3)\n    change size by (2)\nend\nstart sound [Meddelande - Fram v]\nstart sound (pick random (4) to (7))\nif <(?Språk?) = [Eng]> then\n    switch costume to (bob 3 - 2 k e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (bob 3 - 2 k s v)\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nstart sound [Meddelande - Bort v]\nrepeat (2)\n    change [ghost v] effect by (25)\n    change size by (-5)\nend\nhide\npoint in direction (120)\nbroadcast (Pris nr 3 v)\nbroadcast (Bob försvinn v)\n\nwhen I receive [bob 3 - förlust v]\nset [björne kan röra på sig!!? v] to [nej]\nwait (1) seconds\ngo to (bob v)\nchange y by (40)\nchange x by (25)\nstart sound (pick random (4) to (7))\nif <(?Språk?) = [Eng]> then\n    switch costume to (bob 3 - 1 f e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (bob 3 - 1 f s v)\nend\nshow\nstart sound [Meddelande - Fram v]\nrepeat (4)\n    change [ghost v] effect by (-25)\n    change size by (4)\n    turn left (7.5) degrees\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nrepeat (3)\n    change size by (2)\nend\nstart sound [Meddelande - Fram v]\nstart sound (pick random (4) to (7))\nif <(?Språk?) = [Eng]> then\n    switch costume to (bob 3 - 2 f e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (bob 3 - 2 f s v)\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nstart sound [Meddelande - Bort v]\nrepeat (2)\n    change [ghost v] effect by (25)\n    change size by (-5)\nend\nhide\npoint in direction (120)\nbroadcast (Bob försvinn v)\n\nwhen I receive [bob - värld 3 v]\nset [björne kan röra på sig!!? v] to [nej]\nwait (1) seconds\ngo to (bob v)\nchange y by (40)\nchange x by (25)\nstart sound (pick random (4) to (7))\nif <(?Språk?) = [Eng]> then\n    switch costume to (bob 3 - 1 b e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (bob 3 - 1 b s v)\nend\nshow\nstart sound [Meddelande - Fram v]\nrepeat (4)\n    change [ghost v] effect by (-25)\n    change size by (4)\n    turn left (7.5) degrees\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nrepeat (3)\n    change size by (2)\nend\nstart sound [Meddelande - Fram v]\nstart sound (pick random (4) to (7))\nif <(?Språk?) = [Eng]> then\n    switch costume to (bob 3 - 2 b e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (bob 3 - 2 b s v)\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nrepeat (3)\n    change size by (2)\nend\nstart sound [Meddelande - Fram v]\nstart sound (pick random (4) to (7))\nif <(?Språk?) = [Eng]> then\n    switch costume to (bob 3 - 3 b e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (bob 3 - 3 b s v)\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nstart sound [Meddelande - Bort v]\nrepeat (2)\n    change [ghost v] effect by (25)\n    change size by (-5)\nend\nhide\npoint in direction (120)\nbroadcast (Bob - Värld 3 - Börjar v)\nset [boss igång!? v] to [ja]\nset [björne kan röra på sig!!? v] to [ja]\n\n@Ballong\n\nwhen flag clicked\nset [klonnummer v] to [0]\nset [ballonräknare v] to [0]\nset [ghost v] effect to (100)\nset size to (50) %\nhide\n\nwhen I start as a clone\nif <(Klonnummer) = [1]> then\n    go to x: (133) y: (64)\n    show\n    start sound [Swish 2 v]\n    repeat (5)\n        change [ghost v] effect by (-20)\n        change size by (12)\n    end\n    set size to (100) %\n    start sound [Yxa 2 v]\nend\nif <(Klonnummer) = [2]> then\n    go to x: (49) y: (-99)\n    show\n    start sound [Swish 2 v]\n    repeat (5)\n        change [ghost v] effect by (-20)\n        change size by (12)\n    end\n    set size to (100) %\n    start sound [Yxa 2 v]\nend\nif <(Klonnummer) = [3]> then\n    go to x: (-118) y: (125)\n    show\n    start sound [Swish 2 v]\n    repeat (5)\n        change [ghost v] effect by (-20)\n        change size by (12)\n    end\n    set size to (100) %\n    start sound [Yxa 2 v]\nend\nif <(Klonnummer) = [4]> then\n    go to x: (215) y: (-35)\n    show\n    start sound [Swish 2 v]\n    repeat (5)\n        change [ghost v] effect by (-20)\n        change size by (12)\n    end\n    set size to (100) %\n    start sound [Yxa 2 v]\nend\nif <(Klonnummer) = [5]> then\n    go to x: (-119) y: (44)\n    show\n    start sound [Swish 2 v]\n    repeat (5)\n        change [ghost v] effect by (-20)\n        change size by (12)\n    end\n    set size to (100) %\n    start sound [Yxa 2 v]\nend\nrepeat until <<touching (hitbox v)?> or <(Ballong bort!?) = [ja]>>\n    next costume\n    wait (0.05) seconds\nend\nchange [ballonräknare v] by (1)\nstart sound [Smäll v]\nif <not <(Bob-tid) = [0]>> then\n    if <(Ballonräknare) = [5]> then\n        broadcast (Bob 1 - Vinst v)\n    end\nend\nrepeat (5)\n    change y by (2)\n    change x by (pick random (-3) to (3))\n    change [ghost v] effect by (20)\n    change size by (40)\nend\ndelete this clone\n\nwhen I receive [bob - värld 1 - börjar v]\nset [ballonräknare v] to [0]\nwait (0.5) seconds\nrepeat (5)\n    wait (0.3) seconds\n    change [klonnummer v] by (1)\n    create clone of (_myself_ v)\nend\nset [björne kan röra på sig!!? v] to [ja]\nset [boss igång!? v] to [ja]\n\nwhen flag clicked\nset [ballong bort!? v] to [nej]\n\n@Knaktus\n\nwhen flag clicked\nhide\nset [ghost v] effect to (100)\nswitch costume to (början v)\npoint in direction (90)\nset [kaktustid v] to [2]\n\nwhen I receive [bob - värld 2 - börjar v]\nwait (0.5) seconds\nrepeat until <<(Bob-tid) = [0]> or <(Träffad av kaktus!!??) = [ja]>>\n    go to x: (pick random (-240) to (240)) y: (178)\n    create clone of (_myself_ v)\n    wait (Kaktustid) seconds\n    change [kaktustid v] by (-0.07)\nend\n\nwhen I start as a clone\nswitch costume to (klädsel1 v)\nset size to (pick random (70) to (100)) %\nshow\nset [ghost v] effect to (0)\nrepeat until <<touching (bana - framsida v)?> or <<touching color (#9fb47e)?> or <touching (kvicksand v)?>>>\n    change y by (-13)\nend\nif <touching (kvicksand v)?> then\n    repeat (10)\n        change [ghost v] effect by (10)\n        change y by (-3)\n    end\n    delete this clone\nelse\n    start sound [Yxa v]\n    repeat (5)\n        change x by (1)\n        wait (0.01) seconds\n        change x by (-1)\n        wait (0.01) seconds\n    end\nend\nwait (0.5) seconds\nwait until <(Kaktus bort!?) = [ja]>\nstart sound [Yxa 2 v]\nrepeat (10)\n    change [ghost v] effect by (10)\n    turn right (pick random (1) to (4)) degrees\n    change y by (pick random (0) to (-2))\nend\ndelete this clone\n\n@Pengasäck\n\nwhen flag clicked\nset [ghost v] effect to (100)\nset size to (50) %\nhide\nswitch costume to (klädsel1 v)\ngo to x: (195) y: (122)\npoint in direction (0)\nset [pengasäck tagen!!?? v] to [nej]\n\nwhen I receive [bob - värld 3 - börjar v]\nshow\nrepeat (10)\n    turn right (9) degrees\n    change size by (5)\n    change [ghost v] effect by (-10)\nend\nset [björne kan röra på sig!!? v] to [ja]\nset [boss igång!? v] to [ja]\nrepeat until <<touching (hitbox v)?> or <(Bob-tid) = [0]>>\n    next costume\n    wait (0.04) seconds\nend\nif <not <(Bob-tid) = [0]>> then\n    set [pengasäck tagen!!?? v] to [ja]\n    broadcast (Bob 3 - Vinst v)\nend\nrepeat (10)\n    change size by (10)\n    change [ghost v] effect by (10)\n    turn right (20) degrees\nend\nhide\n\n@Eldpartiklar\n\nwhen flag clicked\nset [ghost v] effect to (100)\nhide\n\nwhen I start as a clone\nset [ghost v] effect to (pick random (0) to (80))\nrepeat (pick random (100) to (250))\n    change y by (pick random (0.2) to (1))\n    change x by (pick random (-1) to (1))\nend\ndelete this clone\n\nwhen I receive [nästa bana v]\nwait (0.5) seconds\nshow\nforever\n    if <<(Bana!?) > [30]> and <(Bana!?) < [36]>> then\n        if <(Spelet är igång!?) = [ja]> then\n            go to x: (pick random (-240) to (240)) y: (pick random (-159) to (-91))\n            create clone of (_myself_ v)\n            wait (pick random (0.2) to (0.3)) seconds\n        end\n    end\nend\n\nwhen I receive [gråbjörn död v]\nhide\n\n@Lava\n\nwhen flag clicked\ngo to x: (0) y: (0)\npoint in direction (90)\nset [ghost v] effect to (0)\nhide\nset volume to (40) %\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nforever\n    if <<(Bana!?) > [30]> and <(Bana!?) < [36]>> then\n        if <(Spelet är igång!?) = [ja]> then\n            next costume\n            wait (0.05) seconds\n        end\n    end\nend\n\nwhen I receive [gråbjörn död v]\nrepeat (10)\n    change [ghost v] effect by (10)\n    turn right (0.5) degrees\n    change y by (-3)\nend\n\nwhen flag clicked\nforever\n    if <<(Bana!?) > [30]> and <(Bana!?) < [36]>> then\n        show\n    else\n        hide\n    end\nend\n\n@Lavaljus\n\nwhen flag clicked\ngo to x: (0) y: (25)\npoint in direction (90)\nset [ghost v] effect to (0)\nhide\n\nwhen I receive [gråbjörn död v]\nrepeat (10)\n    change [ghost v] effect by (10)\n    turn right (0.5) degrees\n    change y by (-3)\nend\n\nwhen flag clicked\nforever\n    if <<(Bana!?) > [30]> and <(Bana!?) < [36]>> then\n        show\n    else\n        hide\n    end\nend\n\n@Sprängsten\n\nwhen flag clicked\nset size to (100) %\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [nästa bana v]\nwait (1) seconds\nforever\n    if <<(Bana!?) = [32]> or <<(Bana!?) = [33]> or <(Bana!?) = [34]>>> then\n        if <(Spelet är igång!?) = [ja]> then\n            go to x: (([x position v] of [hitbox v]) + (pick random (70) to (-70))) y: (177)\n            set size to (pick random (100) to (120)) %\n            set [ghost v] effect to (0)\n            show\n            start sound [Swish 2 v]\n            repeat until <<<touching (hitbox v)?> or <touching (bana v)?>> or <touching (lava v)?>>\n                change x by (pick random (-5) to (1))\n                turn right (pick random (0) to (7)) degrees\n                change y by (pick random (-17) to (-18))\n            end\n            if <touching (hitbox v)?> then\n                broadcast (Spräng-hopp v)\n            end\n            start sound [Explosion! v]\n            broadcast (Sprängsten smått v)\n            repeat (5)\n                change [ghost v] effect by (20)\n                change size by (10)\n            end\n            hide\n            wait (1) seconds\n        end\n    end\nend\n\nwhen I start as a clone\nset size to (pick random (10) to (50)) %\nshow\nset [ghost v] effect to (0)\nrepeat (10)\n    change y by (pick random (10) to (-4))\n    change x by (pick random (-6) to (6))\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I receive [sprängsten smått v]\nrepeat (7)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [gråbjörn sten v]\ngo to x: (([x position v] of [hitbox v]) + (pick random (80) to (-80))) y: (177)\nset size to (100) %\nset [ghost v] effect to (0)\nshow\nstart sound [Swish 2 v]\nrepeat until <<touching (hitbox v)?> or <touching (bana v)?>>\n    change x by (pick random (-2) to (1))\n    turn right (pick random (0) to (7)) degrees\n    change y by (pick random (-17) to (-18))\nend\nif <touching (hitbox v)?> then\n    broadcast (Spräng-hopp v)\nend\nstart sound [Explosion! v]\nbroadcast (Sprängsten smått v)\nrepeat (5)\n    change [ghost v] effect by (20)\n    change size by (10)\nend\nhide\n\nwhen I receive [gråbjörn sten - hopp v]\ngo to x: (([x position v] of [hitbox v]) + (pick random (60) to (-60))) y: (177)\nset size to (100) %\nset [ghost v] effect to (0)\nshow\nstart sound [Swish 2 v]\nrepeat until <<touching (hitbox v)?> or <touching (bana v)?>>\n    change x by (pick random (-2) to (1))\n    turn right (pick random (0) to (7)) degrees\n    change y by (pick random (-17) to (-18))\nend\nif <touching (hitbox v)?> then\n    broadcast (Spräng-hopp v)\nend\nstart sound [Explosion! v]\nbroadcast (Sprängsten smått v)\nrepeat (5)\n    change [ghost v] effect by (20)\n    change size by (10)\nend\nhide\n\n@Gråbjörn\n\nwhen flag clicked\ngo to x: (162) y: (65)\npoint in direction (0)\nswitch costume to (vanlig v)\nset size to (10) %\nset [ghost v] effect to (100)\nhide\nset [visat sig!? v] to [nej]\nset [gråbjörn - vilken eld? v] to [1]\nset [gråbjörn, nudda? v] to [nej]\nset rotation style [all around v]\n\nwhen I receive [g fas 2 v]\nset [gråbjörn - vilken eld? v] to [1]\nset [sekund v] to [1.5]\nwait (0.5) seconds\ngo to x: (164) y: (-40)\npoint in direction (90)\nshow\nstart sound [Boomerang v]\nrepeat (20)\n    change [snurrfarten v] by (-4)\n    change [ghost v] effect by (-5)\n    change size by (-2)\n    turn left (Snurrfarten) degrees\nend\nrepeat until <(direction) > [92]>\n    turn right (3) degrees\nend\npoint in direction (90)\nVanlig 12x\nrepeat (2)\n    repeat (4)\n        set [fallfarten v] to [8]\n        set [x-fart v] to [-4]\n        Hopp\n        start sound [Swish 2 v]\n        repeat until <(Fallfarten) = [-9]>\n            change y by (Fallfarten)\n            change x by (X-fart)\n            change [fallfarten v] by (-1)\n        end\n        set [fallfarten v] to [5]\n        start sound [Duns v]\n        broadcast (Gråbjörn sten v)\n        broadcast (Mera eld v)\n        Avsluta hopp\n        wait (Sekund) seconds\n        change [gråbjörn - vilken eld? v] by (1)\n    end\n    set rotation style [all around v]\n    set [gråbjörn - vilken eld? v] to [1]\n    change [sekund v] by (-0.7)\n    set [snurrfarten v] to [0]\n    start sound [Boomerang v]\n    repeat (20)\n        change [snurrfarten v] by (4)\n        change [ghost v] effect by (5)\n        change size by (2)\n        turn right (Snurrfarten) degrees\n    end\n    hide\n    wait (0.5) seconds\n    go to x: (164) y: (-40)\n    point in direction (90)\n    show\n    start sound [Boomerang v]\n    repeat (20)\n        change [snurrfarten v] by (-4)\n        change [ghost v] effect by (-5)\n        change size by (-2)\n        turn left (Snurrfarten) degrees\n    end\n    repeat until <(direction) > [92]>\n        turn right (3) degrees\n    end\n    point in direction (90)\n    Vanlig 12x\nend\nset [fallfarten v] to [10]\nHopp\nstart sound [Swish 2 v]\nrepeat until <(Fallfarten) = [-11]>\n    change y by (Fallfarten)\n    change [fallfarten v] by (-1)\nend\nset [fallfarten v] to [0]\nbroadcast (Gråbjörn sten - hopp v)\nAvsluta hopp\nwait (0.3) seconds\nrepeat (10)\n    change x by (1)\nend\nSpring\nrepeat until <touching (_edge_ v)?>\n    change [fallfarten v] by (-2)\n    turn left (2) degrees\n    change x by (Fallfarten)\nend\nstart sound [Knytnäve 3 v]\nbroadcast (Eld från baken v)\npoint in direction (90)\nset [fallfarten v] to [10]\nrepeat until <(Fallfarten) = [-15]>\n    turn right (18) degrees\n    change y by (Fallfarten)\n    change [fallfarten v] by (-1)\nend\nstart sound [Duns v]\nset [gråbjörn, nudda? v] to [ja]\nrepeat until <touching (hitbox v)?>\n    next costume\n    wait (0.03) seconds\n    if <(costume [number v]) = [20]> then\n        switch costume to (skadad 1 v)\n    end\nend\nstart sound [Knytnäve 3 v]\nbroadcast (Björne - Litet hopp v)\nset size to (120) %\nrepeat (10)\n    change size by (-2)\nend\nwait (0.3) seconds\nset [snurrfarten v] to [0]\nstart sound [Boomerang v]\nrepeat (20)\n    change [snurrfarten v] by (4)\n    change [ghost v] effect by (5)\n    change size by (2)\n    turn right (Snurrfarten) degrees\nend\nhide\nswitch costume to (vanlig v)\nset [gråbjörn, nudda? v] to [nej]\nbroadcast (G fas 3 v)\n\nwhen flag clicked\nset [sekund v] to [1.5]\n\nwhen I receive [g fas 3 v]\nwait (0.5) seconds\ngo to x: (164) y: (-40)\npoint in direction (90)\nshow\nstart sound [Boomerang v]\nrepeat (20)\n    change [snurrfarten v] by (-4)\n    change [ghost v] effect by (-5)\n    change size by (-2)\n    turn left (Snurrfarten) degrees\nend\nrepeat until <(direction) > [92]>\n    turn right (3) degrees\nend\npoint in direction (90)\nwait (1) seconds\nset [björne kan röra på sig!!? v] to [nej]\nwait (0.5) seconds\nset [fallfarten v] to [10]\nHopp\nstart sound [Swish 2 v]\nrepeat until <(Fallfarten) = [-11]>\n    change y by (Fallfarten)\n    change [fallfarten v] by (-1)\nend\nset [fallfarten v] to [0]\nstart sound [Duns v]\nbroadcast (G sista fas v)\nAvsluta hopp\nset [snurrfarten v] to [0]\nstart sound [Boomerang v]\nrepeat (20)\n    change [snurrfarten v] by (4)\n    change [ghost v] effect by (5)\n    change size by (2)\n    turn right (Snurrfarten) degrees\nend\nhide\n\nwhen I receive [gråbjörn - börjar v]\nrepeat (2)\n    Vanlig 12x\n    set [fallfarten v] to [15]\n    set [x-fart v] to (pick random (-8) to (-2))\n    Hopp\n    start sound [Swish 2 v]\n    repeat until <(Fallfarten) = [-16]>\n        change y by (Fallfarten)\n        change x by (X-fart)\n        change [fallfarten v] by (-1)\n    end\n    set [fallfarten v] to [15]\n    start sound [Duns v]\n    point in direction (90)\n    set rotation style [left-right v]\n    point towards (hitbox v)\n    turn right (180) degrees\n    broadcast (Eldklot v)\n    Avsluta hopp\n    wait (0.5) seconds\n    Vanlig 12x\n    set rotation style [all around v]\n    set [snurrfarten v] to [0]\n    start sound [Boomerang v]\n    repeat (20)\n        change [snurrfarten v] by (4)\n        change [ghost v] effect by (5)\n        change size by (2)\n        turn right (Snurrfarten) degrees\n    end\n    hide\n    wait (0.5) seconds\n    go to x: (164) y: (-40)\n    point in direction (90)\n    show\n    start sound [Boomerang v]\n    repeat (20)\n        change [snurrfarten v] by (-4)\n        change [ghost v] effect by (-5)\n        change size by (-2)\n        turn left (Snurrfarten) degrees\n    end\n    repeat until <(direction) > [92]>\n        turn right (3) degrees\n    end\n    point in direction (90)\nend\nVanlig 12x\nset [fallfarten v] to [10]\nHopp\nstart sound [Swish 2 v]\nrepeat until <(Fallfarten) = [-11]>\n    change y by (Fallfarten)\n    change [fallfarten v] by (-1)\nend\nset [fallfarten v] to [0]\nbroadcast (Gråbjörn sten - hopp v)\nAvsluta hopp\nwait (0.3) seconds\nrepeat (10)\n    change x by (1)\nend\nSpring\nrepeat until <touching (_edge_ v)?>\n    change [fallfarten v] by (-2)\n    turn left (2) degrees\n    change x by (Fallfarten)\nend\nstart sound [Knytnäve 3 v]\nswitch costume to (skadad 1 v)\npoint in direction (90)\nset [fallfarten v] to [10]\nrepeat until <(Fallfarten) = [-15]>\n    turn right (18) degrees\n    change y by (Fallfarten)\n    change [fallfarten v] by (-1)\nend\nstart sound [Duns v]\nset [gråbjörn, nudda? v] to [ja]\nrepeat until <touching (hitbox v)?>\n    next costume\n    wait (0.03) seconds\n    if <(costume [number v]) = [20]> then\n        switch costume to (skadad 1 v)\n    end\nend\nstart sound [Knytnäve 3 v]\nbroadcast (Björne - Litet hopp v)\nset size to (120) %\nrepeat (10)\n    change size by (-2)\nend\nwait (0.3) seconds\nset [snurrfarten v] to [0]\nstart sound [Boomerang v]\nrepeat (20)\n    change [snurrfarten v] by (4)\n    change [ghost v] effect by (5)\n    change size by (2)\n    turn right (Snurrfarten) degrees\nend\nhide\nswitch costume to (vanlig v)\nset [gråbjörn, nudda? v] to [nej]\nbroadcast (G fas 2 v)\n\ndefine Vanlig 12x\nswitch costume to (vanlig v)\nrepeat (12)\n    next costume\n    wait (0.05) seconds\n    if <(costume [number v]) = [6]> then\n        switch costume to (vanlig v)\n    end\nend\n\ndefine Spring\nswitch costume to (springer v)\nrepeat (3)\n    next costume\n    wait (0.05) seconds\nend\n\ndefine Hopp\nswitch costume to (hoppar 1 v)\nrepeat (2)\n    next costume\n    wait (0.03) seconds\nend\n\ndefine Avsluta hopp\nswitch costume to (hoppar 4 v)\nwait (0.03) seconds\nswitch costume to (hoppar 1 v)\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nforever\n    if <(Bana!?) = [35]> then\n        if <(Visat sig!?) = [nej]> then\n            if <([x position v] of [hitbox v]) > [21]> then\n                set [visat sig!? v] to [ja]\n                broadcast (Gråbjörn v)\n                set [björne kan röra på sig!!? v] to [nej]\n                set [boss igång!? v] to [ja]\n            end\n        end\n    end\nend\n\nwhen I receive [gråbjörn v]\nwait (0.1) seconds\nstart sound [Swish 2 v]\nglide (0.3) secs to x: (164) y: (-40)\nstart sound [Duns v]\nrepeat (2)\n    change y by (2)\nend\nrepeat (2)\n    change y by (1)\nend\nrepeat (2)\n    change y by (-1)\nend\nrepeat (2)\n    change y by (-2)\nend\nbroadcast (Gråbjörns första prat v)\nset [boss pratar!? v] to [ja]\nrepeat until <(Boss pratar!?) = [nej]>\n    Vanlig 12x\n    repeat until <(costume [number v]) = [6]>\n        next costume\n        wait (0.05) seconds\n    end\n    switch costume to (vanlig v)\nend\nwait (0.5) seconds\nbroadcast (Gråbjörn - Börjar v)\nset [björne kan röra på sig!!? v] to [ja]\n\nwhen I receive [gråbjörn v]\nwait (0.1) seconds\nshow\nrepeat (10)\n    turn right (9) degrees\n    change [ghost v] effect by (-10)\n    change size by (9)\nend\n\nwhen flag clicked\nset [antal lavahopp v] to [5]\nset [antal eldfall v] to [1]\n\nwhen I receive [g sista fas v]\nwait (2) seconds\ngo to x: (187) y: (74)\npoint in direction (90)\nshow\nstart sound [Boomerang v]\nrepeat (20)\n    change [snurrfarten v] by (-4)\n    change [ghost v] effect by (-5)\n    change size by (-2)\n    turn left (Snurrfarten) degrees\nend\nrepeat until <(direction) > [92]>\n    turn right (3) degrees\nend\nwait (1) seconds\nset [fallfarten v] to [0]\nstart sound [Swish 2 v]\nrepeat until <(y position) < [-216]>\n    change y by (Fallfarten)\n    change [fallfarten v] by (-1)\nend\nhide\nrepeat (3)\n    wait (1) seconds\n    repeat (Antal lavahopp)\n        set y to (-234)\n        if <([x position v] of [stenplattform v]) > [0]> then\n            set x to (([x position v] of [stenplattform v]) - (pick random (150) to (200)))\n        else\n            set x to (([x position v] of [stenplattform v]) + (pick random (150) to (200)))\n        end\n        show\n        point in direction (90)\n        set [fallfarten v] to [20]\n        broadcast (många eldklot v)\n        Hopp\n        start sound [Swish 2 v]\n        start sound [Upp ur lavan v]\n        repeat until <(Fallfarten) = [-21]>\n            turn left (10) degrees\n            change y by (Fallfarten)\n            change [fallfarten v] by (-1)\n        end\n        set [fallfarten v] to [0]\n        hide\n        broadcast (Mindre plattform v)\n        wait (1) seconds\n    end\n    change [antal lavahopp v] by (3)\n    wait (1) seconds\n    if <([x position v] of [stenplattform v]) > [0]> then\n        set x to (([x position v] of [stenplattform v]) - (pick random (170) to (220)))\n    else\n        set x to (([x position v] of [stenplattform v]) + (pick random (170) to (220)))\n    end\n    point in direction (90)\n    set [fallfarten v] to [31]\n    show\n    Hopp\n    start sound [Swish 2 v]\n    start sound [Upp ur lavan v]\n    repeat until <(Fallfarten) = [0]>\n        turn left (5) degrees\n        change y by (Fallfarten)\n        change [fallfarten v] by (-1)\n    end\n    set [fallfarten v] to [0]\n    hide\n    repeat (Antal eldfall)\n        broadcast (eld från himlen v)\n        wait (2) seconds\n    end\n    if <(Antal eldfall) = [5]> then\n        go to x: (0) y: (200)\n    end\n    show\n    set [fallfarten v] to [0]\n    start sound [Swish 3 v]\n    repeat until <(y position) < [-216]>\n        turn right (10) degrees\n        change y by (Fallfarten)\n        change [fallfarten v] by (-1)\n    end\n    set [fallfarten v] to [0]\n    hide\n    broadcast (Mindre plattform v)\n    change [antal eldfall v] by (2)\nend\nstart sound [Större duns v]\nswitch costume to (skadad 1 v)\nwait (0.7) seconds\npoint in direction (90)\nshow\nrepeat (33)\n    turn right (0.3) degrees\n    change y by (2)\nend\nrepeat (3)\n    change y by (-1)\nend\nset [gråbjörn, nudda? v] to [ja]\nrepeat until <touching (hitbox v)?>\n    next costume\n    wait (0.02) seconds\n    if <(costume [number v]) = [20]> then\n        switch costume to (skadad 1 v)\n    end\nend\nstart sound [Knytnäve 3 v]\nbroadcast (Björne - Sista gråbjörns hopp v)\nset size to (120) %\nrepeat (10)\n    change size by (-2)\nend\nbroadcast (Gråbjörns sista prat v)\nset [boss pratar!? v] to [ja]\nwait until <(Boss pratar!?) = [nej]>\nrepeat (40)\n    turn right (1) degrees\n    change y by (-1)\nend\nwait (0.5) seconds\nstart sound [Explosion! v]\nhide\nbroadcast (Gråbjörn DÖD v)\n\n@Eldklot\n\nwhen flag clicked\nset size to (100) %\nset [ghost v] effect to (100)\nhide\nswitch costume to (eld1 v)\n\nwhen I receive [eldklot v]\nset size to (100) %\nswitch costume to (eld1 v)\ngo to (gråbjörn v)\npoint in direction ([direction v] of [gråbjörn v])\nshow\nset [ghost v] effect to (0)\nstart sound [Eld v]\nrepeat until <touching (_edge_ v)?>\n    move (pick random (-8) to (-12)) steps\n    turn right (pick random (-1) to (1)) degrees\n    create clone of (_myself_ v)\n    next costume\n    if <(costume [number v]) = [8]> then\n        switch costume to (eld1 v)\n    end\nend\nstart sound [Eld2 v]\nset [ghost v] effect to (100)\nhide\n\nwhen I start as a clone\nset size to (pick random (80) to (100)) %\nset [ghost v] effect to (20)\nrepeat (8)\n    change [ghost v] effect by (10)\n    change size by (pick random (-5) to (-7))\nend\ndelete this clone\n\nwhen I receive [mera eld v]\nif <<(Gråbjörn - Vilken eld?) = [1]> or <(Gråbjörn - Vilken eld?) = [4]>> then\n    switch costume to (eld1 v)\n    go to (gråbjörn v)\n    point in direction (90)\n    show\n    set [ghost v] effect to (0)\n    start sound [Eld v]\n    repeat until <touching (_edge_ v)?>\n        move (pick random (-7) to (-10)) steps\n        turn right (pick random (7) to (-7)) degrees\n        create clone of (_myself_ v)\n        next costume\n        if <(costume [number v]) = [8]> then\n            switch costume to (eld1 v)\n        end\n    end\n    start sound [Eld2 v]\n    set [ghost v] effect to (100)\n    hide\nend\n\nwhen I receive [eld från baken v]\nset size to (100) %\nswitch costume to (eld1 v)\ngo to (gråbjörn v)\npoint in direction (-90)\nshow\nset [ghost v] effect to (0)\nstart sound [Eld v]\nrepeat until <touching (_edge_ v)?>\n    move (pick random (-8) to (-12)) steps\n    turn right (pick random (-2) to (2)) degrees\n    create clone of (_myself_ v)\n    next costume\n    if <(costume [number v]) = [8]> then\n        switch costume to (eld1 v)\n    end\nend\nstart sound [Eld2 v]\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [många eldklot v]\nwait (0.5) seconds\nset size to (100) %\nswitch costume to (eld1 v)\ngo to (gråbjörn v)\npoint in direction (90)\nturn left (pick random (-30) to (30)) degrees\nshow\nset [ghost v] effect to (0)\nstart sound [Eld v]\nrepeat until <touching (_edge_ v)?>\n    move (pick random (-8) to (-12)) steps\n    turn right (pick random (-3) to (3)) degrees\n    create clone of (_myself_ v)\n    next costume\n    if <(costume [number v]) = [8]> then\n        switch costume to (eld1 v)\n    end\nend\nstart sound [Eld2 v]\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [eld från himlen v]\nset [fart v] to [0]\nset size to (100) %\nswitch costume to (eld1 v)\ngo to x: (pick random (-220) to (220)) y: (170)\npoint in direction (0)\nshow\nset [ghost v] effect to (0)\nstart sound [Eld v]\nrepeat until <touching (lava v)?>\n    create clone of (_myself_ v)\n    change y by (FART)\n    change [fart v] by (-1)\nend\nstart sound [Eld2 v]\nset [ghost v] effect to (100)\nhide\n\n@Eldklot 2\n\nwhen flag clicked\nset size to (100) %\nset [ghost v] effect to (100)\nhide\nswitch costume to (eld1 v)\n\nwhen I receive [eldklot v]\nwait (0.7) seconds\nswitch costume to (eld1 v)\ngo to (gråbjörn v)\npoint in direction ([direction v] of [gråbjörn v])\nturn left (pick random (15) to (30)) degrees\nshow\nset [ghost v] effect to (0)\nstart sound [Eld v]\nrepeat until <touching (_edge_ v)?>\n    move (pick random (-8) to (-12)) steps\n    turn right (pick random (-3) to (3)) degrees\n    create clone of (_myself_ v)\n    next costume\n    if <(costume [number v]) = [8]> then\n        switch costume to (eld1 v)\n    end\nend\nstart sound [Eld2 v]\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [mera eld v]\nif <<(Gråbjörn - Vilken eld?) = [2]> or <(Gråbjörn - Vilken eld?) = [5]>> then\n    switch costume to (eld1 v)\n    go to (gråbjörn v)\n    point in direction (90)\n    show\n    set [ghost v] effect to (0)\n    start sound [Eld v]\n    repeat until <touching (_edge_ v)?>\n        move (pick random (-7) to (-10)) steps\n        turn right (pick random (7) to (-7)) degrees\n        create clone of (_myself_ v)\n        next costume\n        if <(costume [number v]) = [8]> then\n            switch costume to (eld1 v)\n        end\n    end\n    start sound [Eld2 v]\n    set [ghost v] effect to (100)\n    hide\nend\n\nwhen I start as a clone\nset size to (pick random (80) to (100)) %\nset [ghost v] effect to (20)\nrepeat (8)\n    change [ghost v] effect by (10)\n    change size by (pick random (-5) to (-7))\nend\ndelete this clone\n\nwhen I receive [eld från baken v]\nswitch costume to (eld1 v)\ngo to (gråbjörn v)\npoint in direction (-90)\nturn right (35) degrees\nshow\nset [ghost v] effect to (0)\nstart sound [Eld v]\nrepeat until <touching (_edge_ v)?>\n    move (pick random (-8) to (-12)) steps\n    turn right (pick random (-3) to (3)) degrees\n    create clone of (_myself_ v)\n    next costume\n    if <(costume [number v]) = [8]> then\n        switch costume to (eld1 v)\n    end\nend\nstart sound [Eld2 v]\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [många eldklot v]\nwait (0.5) seconds\nswitch costume to (eld1 v)\ngo to (gråbjörn v)\npoint in direction (-90)\nturn left (pick random (-30) to (30)) degrees\nshow\nset [ghost v] effect to (0)\nstart sound [Eld v]\nrepeat until <touching (_edge_ v)?>\n    move (pick random (-8) to (-12)) steps\n    turn right (pick random (-3) to (3)) degrees\n    create clone of (_myself_ v)\n    next costume\n    if <(costume [number v]) = [8]> then\n        switch costume to (eld1 v)\n    end\nend\nstart sound [Eld2 v]\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [eld från himlen v]\nwait (0.3) seconds\nset [fart v] to [0]\nset size to (100) %\nswitch costume to (eld1 v)\ngo to x: (pick random (-220) to (220)) y: (170)\npoint in direction (0)\nshow\nset [ghost v] effect to (0)\nstart sound [Eld v]\nrepeat until <touching (lava v)?>\n    create clone of (_myself_ v)\n    change y by (FART)\n    change [fart v] by (-1)\nend\nstart sound [Eld2 v]\nset [ghost v] effect to (100)\nhide\n\n@Eldklot 3\n\nwhen flag clicked\nset size to (100) %\nset [ghost v] effect to (100)\nhide\nswitch costume to (eld1 v)\n\nwhen I receive [eldklot v]\nwait (1.4) seconds\nswitch costume to (eld1 v)\ngo to (gråbjörn v)\npoint in direction ([direction v] of [gråbjörn v])\nturn right (pick random (15) to (30)) degrees\nshow\nset [ghost v] effect to (0)\nstart sound [Eld v]\nrepeat until <touching (_edge_ v)?>\n    move (pick random (-8) to (-12)) steps\n    turn right (pick random (-3) to (3)) degrees\n    create clone of (_myself_ v)\n    next costume\n    if <(costume [number v]) = [8]> then\n        switch costume to (eld1 v)\n    end\nend\nstart sound [Eld2 v]\nset [ghost v] effect to (100)\nhide\n\nwhen I start as a clone\nset size to (pick random (80) to (100)) %\nset [ghost v] effect to (20)\nrepeat (8)\n    change [ghost v] effect by (10)\n    change size by (pick random (-5) to (-7))\nend\ndelete this clone\n\nwhen I receive [eld från baken v]\nswitch costume to (eld1 v)\ngo to (gråbjörn v)\npoint in direction (-90)\nturn left (35) degrees\nshow\nset [ghost v] effect to (0)\nstart sound [Eld v]\nrepeat until <touching (_edge_ v)?>\n    move (pick random (-8) to (-12)) steps\n    turn right (pick random (-3) to (3)) degrees\n    create clone of (_myself_ v)\n    next costume\n    if <(costume [number v]) = [8]> then\n        switch costume to (eld1 v)\n    end\nend\nstart sound [Eld2 v]\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [mera eld v]\nif <(Gråbjörn - Vilken eld?) = [3]> then\n    switch costume to (eld1 v)\n    go to (gråbjörn v)\n    point in direction (90)\n    show\n    set [ghost v] effect to (0)\n    start sound [Eld v]\n    repeat until <touching (_edge_ v)?>\n        move (pick random (-7) to (-10)) steps\n        turn right (pick random (-7) to (7)) degrees\n        create clone of (_myself_ v)\n        next costume\n        if <(costume [number v]) = [8]> then\n            switch costume to (eld1 v)\n        end\n    end\n    start sound [Eld2 v]\n    set [ghost v] effect to (100)\n    hide\nend\n\nwhen I receive [eld från himlen v]\nwait (0.6) seconds\nset [fart v] to [0]\nset size to (100) %\nswitch costume to (eld1 v)\ngo to x: (pick random (-220) to (220)) y: (170)\npoint in direction (0)\nshow\nset [ghost v] effect to (0)\nstart sound [Eld v]\nrepeat until <touching (lava v)?>\n    create clone of (_myself_ v)\n    change y by (FART)\n    change [fart v] by (-1)\nend\nstart sound [Eld2 v]\nset [ghost v] effect to (100)\nhide\n\n@Stenplattform\n\nwhen flag clicked\npoint in direction (90)\nset rotation style [don't rotate v]\nset size to (100) %\nset [ghost v] effect to (100)\nhide\nset [stenplattform där!? v] to [nej]\nset [gråbjörn död? v] to [nej]\n\nwhen I receive [g sista fas v]\nwait (1.5) seconds\ngo to x: ([x position v] of [hitbox v]) y: (-176)\nshow\nrepeat (19)\n    change [ghost v] effect by (-10)\n    change y by (2.5)\nend\nrepeat (3)\n    change [ghost v] effect by (-10)\n    change y by (1)\nend\nset [stenplattform där!? v] to [ja]\nset [björne kan röra på sig!!? v] to [ja]\nwait (0.5) seconds\npoint in direction (90)\nrepeat until <(Gråbjörn död?) = [ja]>\n    move (pick random (0.5) to (2)) steps\n    if on edge, bounce\nend\n\nwhen I receive [gråbjörn död v]\nset rotation style [all around v]\nrepeat (50)\n    turn right (1.5) degrees\n    change y by (-8)\nend\nhide\nset [ghost v] effect to (100)\nset [stenplattform där!? v] to [nej]\n\nwhen I receive [gråbjörns sista prat v]\nset [gråbjörn död? v] to [ja]\n\n@Energiblixt\n\nwhen flag clicked\nset [blixt tagen? v] to [nej]\nset [ghost v] effect to (100)\nhide\nset size to (100) %\npoint in direction (90)\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nforever\n    if <(Spelet är igång!?) = [ja]> then\n        if <<<<(Bana!?) = [7]> or <<(Bana!?) = [13]> or <(Bana!?) = [19]>>> or <<(Bana!?) = [24]> or <(Bana!?) = [28]>>> or <(Bana!?) = [34]>> then\n            repeat until <(Blixt tagen?) = [ja]>\n                change x by (1)\n                wait (0.01) seconds\n                change y by (1)\n                wait (0.01) seconds\n                change x by (-1)\n                wait (0.01) seconds\n                change y by (-1)\n                wait (0.01) seconds\n            end\n        end\n    end\nend\n\nwhen I receive [bort med musiken v]\nif <<<<(Bana!?) = [7]> or <<(Bana!?) = [13]> or <(Bana!?) = [19]>>> or <<(Bana!?) = [24]> or <(Bana!?) = [28]>>> or <(Bana!?) = [34]>> then\n    set [blixt tagen? v] to [ja]\n    repeat (10)\n        change [ghost v] effect by (10)\n        change size by (15)\n        turn right (15) degrees\n    end\n    hide\nend\n\nwhen I receive [blixt tagen v]\nrepeat (10)\n    turn right (pick random (-10) to (10)) degrees\n    change [ghost v] effect by (10)\n    change size by (20)\nend\nhide\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <<<<(Bana!?) = [7]> or <<(Bana!?) = [13]> or <(Bana!?) = [19]>>> or <<(Bana!?) = [24]> or <(Bana!?) = [28]>>> or <(Bana!?) = [34]>> then\n    set [blixt tagen? v] to [nej]\n    go to x: (62) y: (65)\n    point in direction (90)\n    set size to (100) %\n    set [ghost v] effect to (0)\n    show\nend\n\nwhen I start as a clone\nset size to (pick random (10) to (30)) %\npoint in direction (pick random (-240) to (240))\nrepeat (20)\n    move (pick random (1) to (1.5)) steps\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [13]> then\n    go to x: (-3) y: (143)\n    set [ghost v] effect to (0)\n    show\n    set size to (100) %\n    point in direction (90)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [19]> then\n    go to x: (-64) y: (95)\n    set [ghost v] effect to (0)\n    show\n    set size to (100) %\n    point in direction (90)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [24]> then\n    go to x: (23) y: (-77)\n    set [ghost v] effect to (0)\n    show\n    set size to (100) %\n    point in direction (90)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [28]> then\n    go to x: (42) y: (-2)\n    set [ghost v] effect to (0)\n    show\n    set size to (100) %\n    point in direction (90)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [34]> then\n    go to x: (126) y: (-61)\n    set [ghost v] effect to (0)\n    show\n    set size to (100) %\n    point in direction (90)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [7]> then\n    go to x: (50) y: (53)\n    set [ghost v] effect to (0)\n    show\n    set size to (100) %\n    point in direction (90)\nend\n\nwhen I receive [nästa bana v]\nset [blixt tagen? v] to [nej]\nwait (0.3) seconds\nforever\n    if <(Spelet är igång!?) = [ja]> then\n        if <<<<(Bana!?) = [7]> or <<(Bana!?) = [13]> or <(Bana!?) = [19]>>> or <<(Bana!?) = [24]> or <(Bana!?) = [28]>>> or <(Bana!?) = [34]>> then\n            if <(Blixt tagen?) = [nej]> then\n                repeat until <touching (hitbox v)?>\n                    create clone of (_myself_ v)\n                end\n                set [blixt tagen? v] to [ja]\n                broadcast (Blixt tagen v)\n                change [hoppstryka xxx v] by (0.2)\n                change [gåstyrka xxx v] by (0.2)\n            end\n        end\n    end\nend\n\n@Blixt\n\nwhen flag clicked\nset [ghost v] effect to (100)\nhide\nset volume to (35) %\n\nwhen I receive [blixt tagen v]\nstart sound [Blixt v]\ngo to x: ([x position v] of [hitbox v]) y: (0)\nshow\nset [ghost v] effect to (0)\nrepeat (3)\n    change x by (4)\n    wait (0.01) seconds\n    change x by (-4)\n    wait (0.01) seconds\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Blixtljus\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [blixt tagen v]\nshow\nset [ghost v] effect to (0)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Gran\n\n@Livmätarruta\n\nwhen flag clicked\ngo to x: (207) y: (161)\nset [ghost v] effect to (0)\nshow\n\nwhen I receive [himlen v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [björne död v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Livmätare\n\nwhen flag clicked\nset [liv v] to [25]\nset size to (100) %\nswitch costume to (klädsel1 v)\ngo to x: (228) y: (162)\nforever\n    if <(Liv) < [6]> then\n        set y to (pick random (162) to (163))\n        set x to (pick random (228) to (227))\n    end\nend\n\nwhen I receive [skada - void v]\nset size to (130) %\nchange [liv v] by (-1)\nnext costume\nrepeat (5)\n    change size by (-6)\nend\n\nwhen I receive [skada - fiende v]\nset size to (130) %\nchange [liv v] by (-1)\nnext costume\nrepeat (5)\n    change size by (-6)\nend\n\nwhen I receive [skada - bränd v]\nset size to (130) %\nchange [liv v] by (-1)\nnext costume\nrepeat (5)\n    change size by (-6)\nend\n\nwhen I receive [himlen v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [1 extraliv v]\nif <not <(costume [number v]) = [1]>> then\n    change [liv v] by (1)\n    switch costume to ((costume [number v]) - (1))\nend\n\nwhen I receive [+10 liv v]\nrepeat until <<(Gå me liv) = [10]> or <(costume [number v]) = [1]>>\n    change [liv v] by (1)\n    change [gå me liv v] by (1)\n    switch costume to ((costume [number v]) - (1))\nend\nset [gå me liv v] to [0]\n\nwhen flag clicked\nset [gå me liv v] to [0]\nset [ghost v] effect to (0)\nshow\n\nwhen I receive [+5 liv v]\nrepeat until <<(Gå me liv) = [5]> or <(costume [number v]) = [1]>>\n    change [liv v] by (1)\n    change [gå me liv v] by (1)\n    switch costume to ((costume [number v]) - (1))\nend\nset [gå me liv v] to [0]\n\nwhen I receive [björne död v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Pratbubbla - Bossar + Blåakanini\n\nwhen I receive [gunt a gnag - sista prat v]\nset [pratbubbla roterar v] to [0]\nwait (1) seconds\ngo to (gunt a gnag v)\nchange y by (50)\nchange x by (40)\nif <(?Språk?) = [Eng]> then\n    switch costume to (boss 2 - 1 e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (boss 2 - 1 s v)\nend\nshow\nstart sound [Meddelande - Fram v]\nrepeat (4)\n    change [ghost v] effect by (-25)\n    change size by (4)\n    turn left (7.5) degrees\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nrepeat (3)\n    change size by (2)\nend\nstart sound [Meddelande - Fram v]\nset [pratbubbla roterar v] to [0]\nif <(?Språk?) = [Eng]> then\n    switch costume to (boss 2 - 2 e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (boss 2 - 2 s v)\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nrepeat (3)\n    change size by (2)\nend\nstart sound [Meddelande - Fram v]\nset [pratbubbla roterar v] to [0]\nif <(?Språk?) = [Eng]> then\n    switch costume to (boss 2 - 3 e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (boss 2 - 3 s v)\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nstart sound [Meddelande - Bort v]\nrepeat (2)\n    change [ghost v] effect by (25)\n    change size by (-5)\nend\nhide\npoint in direction (120)\nset [boss pratar!? v] to [nej]\nset [pratbubbla roterar v] to [0]\n\nwhen I receive [kung spinnedung - sista prat v]\nset [pratbubbla roterar v] to [0]\nwait (1) seconds\ngo to (kung spinnidung v)\nchange x by (35)\nchange y by (40)\nif <(?Språk?) = [Eng]> then\n    switch costume to (boss 3 - 1 e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (boss 3 - 1 s v)\nend\nshow\nstart sound [Meddelande - Fram v]\nrepeat (4)\n    change [ghost v] effect by (-25)\n    change size by (4)\n    turn left (7.5) degrees\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nrepeat (3)\n    change size by (2)\nend\nstart sound [Meddelande - Fram v]\nset [pratbubbla roterar v] to [0]\nif <(?Språk?) = [Eng]> then\n    switch costume to (boss 3 - 2 e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (boss 3 - 2 s v)\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nrepeat (3)\n    change size by (2)\nend\nstart sound [Meddelande - Fram v]\nset [pratbubbla roterar v] to [0]\nif <(?Språk?) = [Eng]> then\n    switch costume to (boss 3 - 3 e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (boss 3 - 3 s v)\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nstart sound [Meddelande - Bort v]\nrepeat (2)\n    change [ghost v] effect by (25)\n    change size by (-5)\nend\nhide\npoint in direction (120)\nset [boss pratar!? v] to [nej]\nset [pratbubbla roterar v] to [0]\n\nwhen I receive [gunt a gnag - sista prat v]\nrepeat until <(Boss pratar!?) = [nej]>\n    change [pratbubbla roterar v] by (5)\n    point in direction ((([sin v] of (Pratbubbla roterar) ) * (3)) + (90))\nend\n\nwhen I receive [kung spinnedung - sista prat v]\nrepeat until <(Boss pratar!?) = [nej]>\n    change [pratbubbla roterar v] by (5)\n    point in direction ((([sin v] of (Pratbubbla roterar) ) * (3)) + (90))\nend\n\nwhen flag clicked\nset [ghost v] effect to (100)\nset size to (90) %\nhide\nset volume to (25) %\npoint in direction (120)\n\nwhen I receive [herr hoppitott - sista prat v]\nset [pratbubbla roterar v] to [0]\nwait (1) seconds\ngo to x: (70) y: (95)\nif <(?Språk?) = [Eng]> then\n    switch costume to (boss 1 - 1 e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (boss 1 - 1 s v)\nend\nshow\nstart sound [Meddelande - Fram v]\nrepeat (4)\n    change [ghost v] effect by (-25)\n    change size by (4)\n    turn left (7.5) degrees\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nrepeat (3)\n    change size by (2)\nend\nstart sound [Meddelande - Fram v]\nset [pratbubbla roterar v] to [0]\nif <(?Språk?) = [Eng]> then\n    switch costume to (boss 1 - 2 e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (boss 1 - 2 s v)\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nrepeat (3)\n    change size by (2)\nend\nstart sound [Meddelande - Fram v]\nset [pratbubbla roterar v] to [0]\nif <(?Språk?) = [Eng]> then\n    switch costume to (boss 1 - 3 e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (boss 1 - 3 s v)\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nstart sound [Meddelande - Bort v]\nrepeat (2)\n    change [ghost v] effect by (25)\n    change size by (-5)\nend\nhide\npoint in direction (120)\nset [boss pratar!? v] to [nej]\nset [pratbubbla roterar v] to [0]\n\nwhen I receive [herr hoppitott - sista prat v]\nrepeat until <(Boss pratar!?) = [nej]>\n    change [pratbubbla roterar v] by (5)\n    point in direction ((([sin v] of (Pratbubbla roterar) ) * (3)) + (90))\nend\n\nwhen I receive [gråbjörns första prat v]\nset [pratbubbla roterar v] to [0]\nwait (0.5) seconds\ngo to (gråbjörn v)\nchange x by (-10)\nchange y by (74)\nif <(?Språk?) = [Eng]> then\n    switch costume to (g - 1 e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (g - 1 s v)\nend\nshow\nstart sound [Meddelande - Fram v]\nrepeat (4)\n    change [ghost v] effect by (-25)\n    change size by (4)\n    turn left (7.5) degrees\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nrepeat (3)\n    change size by (2)\nend\nstart sound [Meddelande - Fram v]\nset [pratbubbla roterar v] to [0]\nif <(?Språk?) = [Eng]> then\n    switch costume to (g - 2 e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (g - 2 s v)\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nrepeat (3)\n    change size by (2)\nend\nstart sound [Meddelande - Fram v]\nset [pratbubbla roterar v] to [0]\nif <(?Språk?) = [Eng]> then\n    switch costume to (g - 3 e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (g - 3 s v)\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nstart sound [Meddelande - Bort v]\nrepeat (2)\n    change [ghost v] effect by (25)\n    change size by (-5)\nend\nhide\npoint in direction (120)\nset [boss pratar!? v] to [nej]\nset [pratbubbla roterar v] to [0]\n\nwhen I receive [gråbjörns sista prat v]\nrepeat until <(Boss pratar!?) = [nej]>\n    change [pratbubbla roterar v] by (5)\n    point in direction ((([sin v] of (Pratbubbla roterar) ) * (3)) + (90))\nend\n\nwhen I receive [gråbjörns första prat v]\nrepeat until <(Boss pratar!?) = [nej]>\n    change [pratbubbla roterar v] by (5)\n    point in direction ((([sin v] of (Pratbubbla roterar) ) * (3)) + (90))\nend\n\nwhen I receive [gråbjörns sista prat v]\nset [pratbubbla roterar v] to [0]\nwait (0.5) seconds\ngo to (gråbjörn v)\nchange x by (-10)\nchange y by (74)\nif <(?Språk?) = [Eng]> then\n    switch costume to (g - sista e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (g - sista s v)\nend\nshow\nstart sound [Meddelande - Fram v]\nrepeat (4)\n    change [ghost v] effect by (-25)\n    change size by (4)\n    turn left (7.5) degrees\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nstart sound [Meddelande - Bort v]\nrepeat (2)\n    change [ghost v] effect by (25)\n    change size by (-5)\nend\nhide\npoint in direction (120)\nset [boss pratar!? v] to [nej]\nset [pratbubbla roterar v] to [0]\n\nwhen I receive [blåakanini pratar v]\nset [pratbubbla roterar v] to [0]\nwait (1) seconds\ngo to (blåakanini v)\nchange x by (10)\nchange y by (64)\nstart sound (pick random (4) to (6))\nif <(?Språk?) = [Eng]> then\n    switch costume to (blåa - 1 e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (blåa - 1 s v)\nend\nshow\nstart sound [Meddelande - Fram v]\nrepeat (4)\n    change [ghost v] effect by (-25)\n    change size by (4)\n    turn left (7.5) degrees\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nrepeat (3)\n    change size by (2)\nend\nstart sound [Meddelande - Fram v]\nstart sound (pick random (4) to (6))\nset [pratbubbla roterar v] to [0]\nif <(?Språk?) = [Eng]> then\n    switch costume to (blåa - 2 e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (blåa - 2 s v)\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nrepeat (3)\n    change size by (2)\nend\nstart sound [Meddelande - Fram v]\nstart sound (pick random (4) to (6))\nset [pratbubbla roterar v] to [0]\nif <(?Språk?) = [Eng]> then\n    switch costume to (blåa - 3 e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (blåa - 3 s v)\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nrepeat (3)\n    change size by (2)\nend\nstart sound [Meddelande - Fram v]\nstart sound (pick random (4) to (6))\nset [pratbubbla roterar v] to [0]\nif <(?Språk?) = [Eng]> then\n    switch costume to (blåa - 4 e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (blåa - 4 s v)\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nrepeat (3)\n    change size by (2)\nend\nstart sound [Meddelande - Fram v]\nstart sound (pick random (4) to (6))\nset [pratbubbla roterar v] to [0]\nif <(?Språk?) = [Eng]> then\n    switch costume to (blåa - 5 e v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (blåa - 5 s v)\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nstart sound [Meddelande - Bort v]\nrepeat (2)\n    change [ghost v] effect by (25)\n    change size by (-5)\nend\nhide\npoint in direction (120)\nset [boss pratar!? v] to [nej]\nset [pratbubbla roterar v] to [0]\n\nwhen I receive [blåakanini pratar v]\nrepeat until <(Boss pratar!?) = [nej]>\n    change [pratbubbla roterar v] by (5)\n    point in direction ((([sin v] of (Pratbubbla roterar) ) * (3)) + (90))\nend\n\n@Templeblock\n\nwhen flag clicked\nset volume to (25) %\npoint in direction (90)\nhide\n\nwhen I receive [nästa bana v]\nwait (0.5) seconds\nforever\n    if <<<(Bana!?) = [13]> or <(Bana!?) = [14]>> or <(Bana!?) = [18]>> then\n        if <(Spelet är igång!?) = [ja]> then\n            turn right (pick random (0.5) to (2)) degrees\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<(Bana!?) = [13]> or <(Bana!?) = [14]>> or <(Bana!?) = [18]>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [nästa bana v]\nwait (0.5) seconds\nforever\n    if <<<(Bana!?) = [13]> or <(Bana!?) = [14]>> or <(Bana!?) = [18]>> then\n        if <(Spelet är igång!?) = [ja]> then\n            play sound [Sqeaking_door-Sarasprella-1754011079.mp3 v] until done\n        end\n    end\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [13]> then\n    point in direction (90)\n    go to x: (164) y: (-135)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [14]> then\n    point in direction (90)\n    go to x: (170) y: (-139)\nend\n\ngo [backward v] (170) layers\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [18]> then\n    point in direction (90)\n    go to x: (175) y: (-139)\nend\n\n@Tumbleweed\n\nwhen flag clicked\nset size to (100) %\nset [ghost v] effect to (100)\nhide\nset [åker v] to [nej]\n\nwhen flag clicked\nwait (1) seconds\nforever\n    if <<(Bana!?) > [10]> and <(Bana!?) < [21]>> then\n        show\n        set size to (pick random (80) to (100)) %\n        go to x: (-240) y: (0)\n        repeat until <touching (bana v)?>\n            change y by (-10)\n        end\n        change y by (10)\n        set [ghost v] effect to (0)\n        set [åker v] to [ja]\n        repeat until <(x position) > [235]>\n            change x by (pick random (11) to (13))\n            change size by (pick random (-4) to (4))\n            change [ghost v] effect by (pick random (-4) to (4))\n            turn right (pick random (11) to (12)) degrees\n        end\n        set [åker v] to [nej]\n        repeat (4)\n            change size by (5)\n            change [ghost v] effect by (25)\n        end\n        hide\n        set size to (100) %\n        wait (pick random (1) to (8)) seconds\n    end\nend\n\nwhen flag clicked\nwait (1) seconds\nforever\n    if <<(Bana!?) > [10]> and <(Bana!?) < [21]>> then\n        if <(åker) = [ja]> then\n            if <touching (bana v)?> then\n                change y by (8)\n            end\n        end\n    end\nend\n\n@Aska\n\nwhen flag clicked\nhide\nset [ghost v] effect to (100)\nset volume to (50) %\n\nwhen I receive [aska v]\nshow\ngo to (björne v)\nrepeat (15)\n    change y by (pick random (-5) to (15))\n    switch costume to (pick random (1) to (6))\n    create clone of (_myself_ v)\nend\nhide\n\nwhen I start as a clone\nset [brightness v] effect to (pick random (0) to (20))\nswitch costume to (pick random (1) to (6))\nset [ghost v] effect to (0)\nrepeat (3)\n    change x by (pick random (3) to (-3))\n    change y by (pick random (-5) to (-2))\nend\nrepeat (5)\n    change [ghost v] effect by (20)\n    change x by (pick random (3) to (-3))\n    change y by (pick random (-5) to (-2))\nend\ndelete this clone\n\nbroadcast (Skada - Bränd v)\n\nwhen I receive [aska v]\nwait (0.1) seconds\nstart sound [Eld v]\n\n@Hjärta\n\nwhen flag clicked\nset [ghost v] effect to (100)\nhide\npoint in direction (90)\nset size to (100) %\nset volume to (40) %\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [4]> then\n    set [ghost v] effect to (0)\n    show\n    set size to (100) %\n    point in direction (90)\n    go to x: (139) y: (92)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nforever\n    if <(Spelet är igång!?) = [ja]> then\n        if <<<<(Bana!?) = [4]> or <<(Bana!?) = [8]> or <(Bana!?) = [12]>>> or <<(Bana!?) = [16]> or <(Bana!?) = [23]>>> or <<(Bana!?) = [27]> or <<(Bana!?) = [31]> or <(Bana!?) = [35]>>>> then\n            switch costume to (1 v)\n            repeat until <<touching (hitbox v)?> or <(Spelet är igång!?) = [nej]>>\n                next costume\n            end\n            if <(Spelet är igång!?) = [ja]> then\n                change [poäng v] by (5)\n                broadcast (1 Extraliv v)\n                start sound [Ding v]\n            end\n            start sound [Boomerang v]\n            repeat (5)\n                next costume\n                next costume\n                change y by (8)\n            end\n            repeat (10)\n                next costume\n                change [ghost v] effect by (10)\n                change y by (3)\n                next costume\n            end\n            hide\n        end\n    end\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [8]> then\n    set [ghost v] effect to (0)\n    show\n    set size to (100) %\n    point in direction (90)\n    go to x: (110) y: (83)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [12]> then\n    set [ghost v] effect to (0)\n    show\n    set size to (100) %\n    point in direction (90)\n    go to x: (-1) y: (-123)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [16]> then\n    set [ghost v] effect to (0)\n    show\n    set size to (100) %\n    point in direction (90)\n    go to x: (141) y: (135)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [27]> then\n    set [ghost v] effect to (0)\n    show\n    set size to (100) %\n    point in direction (90)\n    go to x: (-115) y: (142)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [23]> then\n    set [ghost v] effect to (0)\n    show\n    set size to (100) %\n    point in direction (90)\n    go to x: (-86) y: (-49)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [31]> then\n    set [ghost v] effect to (0)\n    show\n    set size to (100) %\n    point in direction (90)\n    go to x: (36) y: (-124)\nend\n\nwhen I receive [nästa bana v]\nwait (0.3) seconds\nif <(Bana!?) = [35]> then\n    set [ghost v] effect to (0)\n    show\n    set size to (100) %\n    point in direction (90)\n    go to x: (-200) y: (-37)\nend\n\n@Sprängsten - Slutet\n\nwhen flag clicked\nset size to (100) %\nset [ghost v] effect to (100)\nhide\n\nwhen I start as a clone\nset size to (pick random (10) to (50)) %\nshow\nset [ghost v] effect to (0)\nrepeat (10)\n    change y by (pick random (10) to (-4))\n    change x by (pick random (-6) to (6))\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I receive [sprängsten smått 2 v]\nrepeat (7)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [gråbjörn död v]\nwait (1.5) seconds\nstart sound [Stenras v]\nstart sound [Vulkanutbrott v]\nwait (2) seconds\ngo to x: ([x position v] of [hitbox v]) y: (177)\nset size to (pick random (100) to (120)) %\nset [ghost v] effect to (0)\nshow\nstart sound [Swish 2 v]\nrepeat until <touching (hitbox v)?>\n    turn right (pick random (0) to (7)) degrees\n    change y by (pick random (-20) to (-22))\nend\nif <touching (hitbox v)?> then\n    broadcast (Stort spränghopp v)\nend\nstart sound [Explosion! v]\nbroadcast (Sprängsten smått 2 v)\nrepeat (5)\n    change [ghost v] effect by (20)\n    change size by (10)\nend\nhide\n\n@Drömvitt\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [stort spränghopp v]\nwait (0.3) seconds\nshow\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nbroadcast (Himlen v)\nwait (2) seconds\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\n\nwhen I receive [gråbjörn död v]\nwait (1) seconds\nchange [bana!? v] by (1)\n\n@Blåakanini\n\nwhen flag clicked\nset [ghost v] effect to (100)\nhide\nset [har varnat v] to [nej]\n\nwhen I receive [himlen v]\ngo to x: (93) y: (-73)\npoint in direction (-90)\nshow\nset [ghost v] effect to (0)\n\nwhen I receive [himlen v]\nwait (1) seconds\nforever\n    if <(Har varnat) = [nej]> then\n        if <(Bana!?) = [36]> then\n            if <([x position v] of [hitbox v]) > [15]> then\n                set [har varnat v] to [ja]\n                set [björne kan röra på sig!!? v] to [nej]\n                set [boss pratar!? v] to [ja]\n                broadcast (Blåakanini pratar v)\n            end\n        end\n    end\nend\n\nwhen I receive [blåakanini pratar v]\nwait until <(Boss pratar!?) = [nej]>\nset [björne kan röra på sig!!? v] to [ja]\nbroadcast (Du vann v)\n\n@Du vann! - Text\n\nwhen flag clicked\ngo to x: (-323) y: (136)\npoint in direction (0)\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [du vann v]\nglide (0.3) secs to x: (-103) y: (136)\n\nwhen I receive [du vann v]\nwait (0.1) seconds\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [du vann v]\nrepeat (10)\n    turn right (9) degrees\nend\n\nwhen flag clicked\nforever\n    if <(?Språk?) = [Eng]> then\n        switch costume to (eng v)\n    else\n        switch costume to (sv v)\n    end\nend\n\n@Dimma\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nset [ghost v] effect to (100)\n\nwhen I receive [himlen v]\nshow\nset [ghost v] effect to (50)\n\n@Poäng\n\nwhen flag clicked\ngo to x: (-190) y: (79)\nset [ghost v] effect to (100)\nhide\nhide variable [poäng v]\nset [poäng v] to [0]\n\nwhen I receive [du vann v]\nwait (1) seconds\nshow variable [poäng v]\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen flag clicked\nforever\n    if <(?Språk?) = [Eng]> then\n        switch costume to (eng v)\n    else\n        switch costume to (sv v)\n    end\nend\n\n@Bästa poäng\n\nwhen flag clicked\ngo to x: (-147) y: (50)\nset [ghost v] effect to (100)\nhide\nhide variable [☁ bästa poäng v]\n\nwhen I receive [du vann v]\nif <(Poäng) > (☁ Bästa poäng)> then\n    set [☁ bästa poäng v] to (Poäng)\nend\n\nwhen I receive [du vann v]\nwait (1.5) seconds\nshow variable [☁ bästa poäng v]\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen flag clicked\nforever\n    if <(?Språk?) = [Eng]> then\n        switch costume to (eng v)\n    else\n        switch costume to (sv v)\n    end\nend\n\n@Extraliv fr boss\n\nwhen flag clicked\nset [ghost v] effect to (100)\nhide\nswitch costume to (1 v)\nset volume to (20) %\n\nwhen I receive [gunt a gnag - död v]\nwait (1) seconds\nrepeat (3)\n    switch costume to (1 v)\n    create clone of (_myself_ v)\n    start sound [Ding2 v]\n    wait (0.1) seconds\nend\n\nwhen I receive [björne 10 nya liv fr spindel v]\nwait (1) seconds\nrepeat (3)\n    switch costume to (1 v)\n    create clone of (_myself_ v)\n    start sound [Ding2 v]\n    wait (0.1) seconds\nend\n\nwhen I receive [hoppitott död v]\nwait (1) seconds\nrepeat (3)\n    switch costume to (1 v)\n    create clone of (_myself_ v)\n    start sound [Ding2 v]\n    wait (0.1) seconds\nend\n\nwhen I start as a clone\ngo to (hitbox v)\nchange y by (20)\nbroadcast (+10 liv v)\nshow\nrepeat (4)\n    change [ghost v] effect by (-25)\nend\nrepeat (3)\n    change y by (10)\n    next costume\nend\nrepeat (10)\n    change y by (5)\n    next costume\n    next costume\n    change [ghost v] effect by (10)\nend\nhide\n\n@Myntbelöning\n\nwhen flag clicked\nset [ghost v] effect to (100)\nhide\nswitch costume to (klädsel1 v)\nset volume to (20) %\n\nwhen I start as a clone\ngo to (hitbox v)\nchange y by (20)\nshow\nrepeat (4)\n    change [ghost v] effect by (-25)\nend\nrepeat (3)\n    change y by (10)\n    next costume\nend\nrepeat (10)\n    change y by (5)\n    next costume\n    next costume\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [pris nr 3 v]\nwait (1) seconds\nrepeat (3)\n    switch costume to (1 v)\n    create clone of (_myself_ v)\n    start sound [Mynt v]\n    wait (0.1) seconds\nend\nchange [antalet mynt v] by (10)\n\nwhen I receive [pris nr 2 v]\nwait (1) seconds\nrepeat (3)\n    switch costume to (1 v)\n    create clone of (_myself_ v)\n    start sound [Mynt v]\n    wait (0.1) seconds\nend\nchange [antalet mynt v] by (10)\n\nwhen I receive [pris nr 1 v]\nwait (1) seconds\nrepeat (3)\n    switch costume to (1 v)\n    create clone of (_myself_ v)\n    start sound [Mynt v]\n    wait (0.1) seconds\nend\nchange [antalet mynt v] by (10)\n\n@Fps\n\nwhen flag clicked\nforever\n    change [räknare v] by (1)\n    wait (0) seconds\n    if <(timer) > [1]> then\n        reset timer\n        set [fps v] to (Räknare)\n        set [räknare v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (f v) pressed?> then\n        show variable [fps v]\n    else\n        hide variable [fps v]\n    end\nend\n\n@Intro - Del 1\n\nwhen flag clicked\nhide\nset [ghost v] effect to (100)\nset size to (60) %\ngo to x: (0) y: (0)\npoint in direction (40)\n\nwhen flag clicked\nwait (1) seconds\nstart sound [Switch v]\nshow\nrepeat (5)\n    turn right (10) degrees\n    change [ghost v] effect by (-20)\n    change size by (-3)\nend\nrepeat (2)\n    change size by (2.5)\nend\nwait (1.1) seconds\nbroadcast (Intro Text v)\nrepeat (7)\n    change x by (-17)\nend\n\nwhen I receive [bort med intro v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Intro - Del 2\n\nwhen flag clicked\ngo to x: (-190) y: (0)\nshow\n\nwhen I receive [intro text v]\nrepeat (7)\n    change x by (-17)\nend\n\nwhen flag clicked\nwait (0.5) seconds\nstart sound [01. Banner Intro.mp3 v]\n\nwhen I receive [bort med intro v]\nhide\n\n@Intro - Del 3\n\nwhen I receive [intro text v]\nstart sound [Swish 2 v]\nrepeat (7)\n    change x by (22)\nend\nwait (1) seconds\nbroadcast (Bort med intro v)\n\nwhen I receive [intro text v]\nset [ghost v] effect to (0)\nshow\n\nwhen flag clicked\ngo to x: (-93) y: (0)\nset [ghost v] effect to (100)\nhide\nset volume to (40) %\n\nwhen I receive [bort med intro v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Intro - Del 4\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\nshow\n\nwhen I receive [bort med intro v]\nwait (1) seconds\nrepeat (25)\n    change [ghost v] effect by (4)\nend\nhide\n\n@Huvudmeny\n\nwhen flag clicked\nshow\nset [ghost v] effect to (0)\ngo to x: (0) y: (0)\nset volume to (25) %\n\nwhen I receive [bort med intro v]\nwait (1) seconds\nstart sound [1-08 Gerudo Valley.mp3 v]\n\nwhen I receive [starta spelet v]\nrepeat (25)\n    change volume by (-1)\nend\nstop all sounds\n\nwhen I receive [starta spelet v]\nwait (1) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I receive [hjälpknapp v]\nrepeat (15)\n    change volume by (-1)\nend\nset volume to (10) %\n\nwhen I receive [bort med hjälpruta v]\nrepeat (15)\n    change volume by (1)\nend\nset volume to (25) %\n\nwhen I receive [topplistor v]\nrepeat (15)\n    change volume by (-1)\nend\nset volume to (10) %\n\n@Rubrik\n\nwhen flag clicked\ngo to x: (0) y: (110)\nset [rotera v] to [0]\nset [spelet börjar v] to [nej]\nset [storleksräknare v] to [10]\nset size to (100) %\nset [ghost v] effect to (0)\nshow\n\nwhen I receive [bort med intro v]\nrepeat until <<(Rotera) = [10000]> or <(Spelet börjar) = [ja]>>\n    change [rotera v] by (7)\n    point in direction ((([sin v] of (Rotera) ) * (2)) + (90))\nend\n\nwhen I receive [starta spelet v]\nset [spelet börjar v] to [ja]\nrepeat (20)\n    change size by (Storleksräknare)\n    change [ghost v] effect by (5)\n    change [storleksräknare v] by (-2)\nend\nhide\n\nwhen this sprite clicked\nset size to (120) %\nset [brightness v] effect to (20)\nstart sound (pick random (1) to (4))\nrepeat until <(size) = [100]>\n    change [brightness v] effect by (-2)\n    change size by (-2)\nend\n\nwhen flag clicked\nforever\n    if <(?Språk?) = [Eng]> then\n        switch costume to (engelska v)\n    else\n        switch costume to (svenska v)\n    end\nend\n\n@Highscore-knapp\n\nwhen flag clicked\ngo to x: (-95) y: (-20)\nset [brightness v] effect to (0)\nset volume to (65) %\nset [går att trycka på? v] to [nej]\npoint in direction (90)\nset [ghost v] effect to (0)\nshow\nset size to (100) %\n\nwhen flag clicked\nforever\n    if <(Går att trycka på?) = [ja]> then\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            start sound [Blupp v]\n            set [går att trycka på? v] to [nej]\n            broadcast (Topplistor v)\n        end\n    end\nend\n\nwhen I receive [starta spelet v]\nset [går att trycka på? v] to [nej]\nrepeat (10)\n    turn right (6) degrees\n    change [ghost v] effect by (10)\n    change size by (-8)\nend\nhide\n\nwhen I receive [bort med intro v]\nset [går att trycka på? v] to [ja]\n\nwhen flag clicked\nforever\n    if <(Går att trycka på?) = [ja]> then\n        if <touching (mouse-pointer v)?> then\n            repeat until <(size) = [112]>\n                change size by (4)\n                turn right (2) degrees\n                change [brightness v] effect by (3)\n            end\n        else\n            repeat until <(size) = [100]>\n                change size by (-4)\n                turn left (2) degrees\n                change [brightness v] effect by (-3)\n            end\n        end\n    end\nend\n\nwhen I receive [bort med hjälpruta v]\nwait (0.2) seconds\nset [går att trycka på? v] to [ja]\n\nwhen I receive [hjälpknapp v]\nset [går att trycka på? v] to [nej]\n\n@Startknapp\n\nwhen flag clicked\nforever\n    if <(Går att trycka på?) = [ja]> then\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            start sound [Blupp v]\n            set [går att trycka på? v] to [nej]\n            broadcast (Starta spelet v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Går att trycka på?) = [ja]> then\n        if <touching (mouse-pointer v)?> then\n            repeat until <(size) = [112]>\n                change size by (4)\n                turn right (2) degrees\n                change [brightness v] effect by (3)\n            end\n        else\n            repeat until <(size) = [100]>\n                change size by (-4)\n                turn left (2) degrees\n                change [brightness v] effect by (-3)\n            end\n        end\n    end\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [brightness v] effect to (0)\nset volume to (65) %\nset [går att trycka på? v] to [nej]\npoint in direction (90)\nset [ghost v] effect to (0)\nshow\nset size to (100) %\n\nwhen I receive [starta spelet v]\nrepeat (10)\n    turn right (6) degrees\n    change [ghost v] effect by (10)\n    change size by (-8)\nend\nhide\n\nwhen I receive [bort med intro v]\nset [går att trycka på? v] to [ja]\n\nwhen I receive [hjälpknapp v]\nset [går att trycka på? v] to [nej]\n\nwhen I receive [bort med hjälpruta v]\nwait (0.2) seconds\nset [går att trycka på? v] to [ja]\n\nwhen I receive [topplistor v]\nset [går att trycka på? v] to [nej]\n\n@Hjälpknapp\n\nwhen flag clicked\ngo to x: (95) y: (-20)\nset [brightness v] effect to (0)\nset volume to (60) %\nset [går att trycka på? v] to [nej]\npoint in direction (90)\nset [ghost v] effect to (0)\nshow\nset size to (100) %\n\nwhen flag clicked\nforever\n    if <(Går att trycka på?) = [ja]> then\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            start sound [Blupp v]\n            set [går att trycka på? v] to [nej]\n            broadcast (Hjälpknapp v)\n        end\n    end\nend\n\nwhen I receive [starta spelet v]\nset [går att trycka på? v] to [nej]\nrepeat (10)\n    turn right (6) degrees\n    change [ghost v] effect by (10)\n    change size by (-8)\nend\nhide\n\nwhen I receive [bort med intro v]\nset [går att trycka på? v] to [ja]\n\nwhen flag clicked\nforever\n    if <(Går att trycka på?) = [ja]> then\n        if <touching (mouse-pointer v)?> then\n            repeat until <(size) = [112]>\n                change size by (4)\n                turn right (2) degrees\n                change [brightness v] effect by (3)\n            end\n        else\n            repeat until <(size) = [100]>\n                change size by (-4)\n                turn left (2) degrees\n                change [brightness v] effect by (-3)\n            end\n        end\n    end\nend\n\nwhen I receive [bort med hjälpruta v]\nwait (0.2) seconds\nset [går att trycka på? v] to [ja]\n\nwhen I receive [topplistor v]\nset [går att trycka på? v] to [nej]\n\n@Dullen\n\nwhen I receive [dullen varnar! v]\nstart sound [Swish 2 v]\nglide (0.2) secs to x: (157) y: (0)\nrepeat (2)\n    change y by (2)\nend\nrepeat (2)\n    change y by (1)\nend\nstart sound [Duns v]\nrepeat (2)\n    change y by (-1)\nend\nrepeat (2)\n    change y by (-2)\nend\nbroadcast (Dullen pratar v)\n\nwhen I receive [meddelande1 v]\nforever\n    if <(Dullen pratat?) = [nej]> then\n        if <(Bana!?) = [1]> then\n            if <([x position v] of [hitbox v]) > [90]> then\n                set [dullen pratat? v] to [ja]\n                broadcast (Dullen varnar! v)\n                set [dullen e här? v] to [ja]\n                set [björne kan röra på sig!!? v] to [nej]\n            end\n        end\n    end\nend\n\nwhen I receive [dullen varnar! v]\nrepeat until <(Dullen e här?) = [nej]>\n    next costume\n    wait (0.02) seconds\nend\n\nwhen I receive [bort med dullen v]\nwait (0.5) seconds\nset [björne kan röra på sig!!? v] to [ja]\nset [dullen e här? v] to [nej]\npoint in direction (-90)\nstart sound [Swish 2 v]\nrepeat (10)\n    change [ghost v] effect by (10)\n    change size by (-3)\n    change x by (6)\nend\nhide\n\nwhen I receive [dullen varnar! v]\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen flag clicked\nswitch costume to (dullen - 1 v)\nset size to (70) %\nset [ghost v] effect to (100)\nhide\nset rotation style [left-right v]\ngo to x: (157) y: (50)\npoint in direction (-90)\nset [dullen pratat? v] to [nej]\nset [dullen e här? v] to [nej]\n\n@Dullens pratbubblor\n\nwhen I receive [dullen pratar v]\nset [dullen pratar!+ v] to [ja]\nwait (0.25) seconds\ngo to (dullen v)\nchange y by (50)\nchange x by (-5)\nif <(?Språk?) = [Eng]> then\n    switch costume to (b 1 eng v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (b 1 sv v)\nend\nshow\nstart sound [Dullen 4 v]\nstart sound [Meddelande - Fram v]\nrepeat (4)\n    change [ghost v] effect by (-25)\n    change size by (4)\n    turn left (7.5) degrees\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nrepeat (3)\n    change size by (2)\nend\nstart sound [Dullen 1 v]\nstart sound [Meddelande - Fram v]\nif <(?Språk?) = [Eng]> then\n    switch costume to (b 2 eng v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (b 2 sv v)\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nrepeat (3)\n    change size by (2)\nend\nstart sound [Dullen 3 v]\nstart sound [Meddelande - Fram v]\nif <(?Språk?) = [Eng]> then\n    switch costume to (b 3 eng v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (b 3 sv v)\nend\nrepeat (2)\n    change size by (-3)\nend\nwait until <key (space v) pressed?>\nstart sound [Meddelande - Bort v]\nset [dullen pratar!+ v] to [nej]\nrepeat (2)\n    change [ghost v] effect by (25)\n    change size by (-5)\nend\nhide\nbroadcast (Bort med Dullen v)\n\nwhen flag clicked\nset [dullen pratar!+ v] to [nej]\npoint in direction (120)\nset size to (90) %\nhide\nset [ghost v] effect to (100)\nset volume to (25) %\n\nwhen I receive [dullen pratar v]\nrepeat until <(Dullen pratar!+) = [nej]>\n    change y by (1)\n    wait (0.01) seconds\n    change x by (1)\n    wait (0.01) seconds\n    change y by (-1)\n    wait (0.01) seconds\n    change x by (-1)\n    wait (0.01) seconds\nend\n\n@Achievement\n\nwhen flag clicked\ngo to x: (287) y: (-148)\nhide\nset volume to (20) %\nset [a - trampolin v] to [nej]\nset [a - ballong v] to [nej]\nset [a - blixt v] to [nej]\nset [a - kaktus v] to [nej]\nset [a - spöket v] to [nej]\nset [a - säck v] to [nej]\nset [a - mynt v] to [nej]\nset [a - pandafaffa v] to [nej]\nset [a - oskadad v] to [nej]\n\nwhen I receive [trampolin v]\nif <(A - Trampolin) = [nej]> then\n    set [a - trampolin v] to [ja]\n    if <(?Språk?) = [Eng]> then\n        switch costume to (trampolin - e v)\n    end\n    if <(?Språk?) = [Sv]> then\n        switch costume to (trampolin - s v)\n    end\n    broadcast (Prestation v)\nend\n\nwhen I receive [blixt tagen v]\nif <(A - Blixt) = [nej]> then\n    set [a - blixt v] to [ja]\n    if <(?Språk?) = [Eng]> then\n        switch costume to (blixt - e v)\n    end\n    if <(?Språk?) = [Sv]> then\n        switch costume to (blixt - s v)\n    end\n    broadcast (Prestation v)\nend\n\nwhen I receive [bob 1 - vinst v]\nif <(A - Ballong) = [nej]> then\n    set [a - ballong v] to [ja]\n    if <(?Språk?) = [Eng]> then\n        switch costume to (ballong - e v)\n    end\n    if <(?Språk?) = [Sv]> then\n        switch costume to (ballong - s v)\n    end\n    broadcast (Prestation v)\nend\n\nwhen I receive [prestation v]\ngo to x: (287) y: (-148)\nshow\nset [snabbhet v] to [15]\nstart sound [achievement v]\nchange [poäng v] by (20)\nrepeat until <(Snabbhet) = [0]>\n    change [snabbhet v] by (-1)\n    change x by (join [-] (Snabbhet))\nend\nwait (2) seconds\nrepeat until <(Snabbhet) = [14]>\n    change [snabbhet v] by (1)\n    change x by (Snabbhet)\nend\nhide\n\nwhen I receive [bob 2 - vinst v]\nif <(A - Kaktus) = [nej]> then\n    set [a - kaktus v] to [ja]\n    if <(?Språk?) = [Eng]> then\n        switch costume to (kaktus - e v)\n    end\n    if <(?Språk?) = [Sv]> then\n        switch costume to (kaktus - s v)\n    end\n    broadcast (Prestation v)\nend\n\nwhen I receive [spöket lever!? v]\nif <(A - Spöket) = [nej]> then\n    set [a - spöket v] to [ja]\n    if <(?Språk?) = [Eng]> then\n        switch costume to (spöket - e v)\n    end\n    if <(?Språk?) = [Sv]> then\n        switch costume to (spöket - s v)\n    end\n    broadcast (Prestation v)\nend\n\nwhen I receive [bob 3 - vinst v]\nif <(A - Säck) = [nej]> then\n    set [a - säck v] to [ja]\n    if <(?Språk?) = [Eng]> then\n        switch costume to (säck - e v)\n    end\n    if <(?Språk?) = [Sv]> then\n        switch costume to (säck - s v)\n    end\n    broadcast (Prestation v)\nend\n\nwhen flag clicked\nforever\n    if <(Antalet mynt) = [30]> then\n        if <(A - Mynt) = [nej]> then\n            set [a - mynt v] to [ja]\n            if <(?Språk?) = [Eng]> then\n                switch costume to (mynt - e v)\n            end\n            if <(?Språk?) = [Sv]> then\n                switch costume to (mynt - s v)\n            end\n            broadcast (Prestation v)\n        end\n    end\nend\n\nwhen I receive [hatt - pandafaffas original v]\nif <(A - Pandafaffa) = [nej]> then\n    set [a - pandafaffa v] to [ja]\n    if <(?Språk?) = [Eng]> then\n        switch costume to (pandafaffa - e v)\n    end\n    if <(?Språk?) = [Sv]> then\n        switch costume to (pandafaffa - s v)\n    end\n    broadcast (Prestation v)\nend\n\nwhen I receive [du vann v]\nif <(Liv) = [25]> then\n    if <(A - Oskadad) = [nej]> then\n        set [a - oskadad v] to [ja]\n        if <(?Språk?) = [Eng]> then\n            switch costume to (oskadad - e v)\n        end\n        if <(?Språk?) = [Sv]> then\n            switch costume to (oskadad - s v)\n        end\n        broadcast (Prestation v)\n    end\nend\n\n@Hjälp/highscore\n\nwhen flag clicked\ngo to x: (0) y: (-200)\nchange [ghost v] effect by (100)\nhide\nset [hjälpruta framme? v] to [nej]\n\nwhen I receive [hjälpknapp v]\nglide (0.2) secs to x: (0) y: (0)\nset [hjälpruta framme? v] to [ja]\n\nwhen flag clicked\nhide variable [☁ !global - 1 v]\nhide variable [☁ !global - 2 v]\nhide variable [☁ !global - 3 v]\nhide variable [☁ !global - klar v]\n\nwhen I receive [topplistor v]\nglide (0.2) secs to x: (0) y: (0)\nset [hjälpruta framme? v] to [ja]\n\nwhen I receive [topplistor v]\nwait (0.01) seconds\nshow variable [☁ !global - klar v]\nwait (0.05) seconds\nshow variable [☁ !global - 3 v]\nwait (0.05) seconds\nshow variable [☁ !global - 2 v]\nwait (0.05) seconds\nshow variable [☁ !global - 1 v]\n\nwhen I receive [bort med hjälpruta v]\nhide variable [☁ !global - 1 v]\nhide variable [☁ !global - 2 v]\nhide variable [☁ !global - 3 v]\nhide variable [☁ !global - klar v]\n\nwhen flag clicked\nforever\n    if <key (space v) pressed?> then\n        if <(Hjälpruta framme?) = [ja]> then\n            broadcast (Bort med Hjälpruta v)\n            set [hjälpruta framme? v] to [nej]\n        end\n    end\nend\n\nwhen I receive [bort med hjälpruta v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [bort med hjälpruta v]\nglide (0.2) secs to x: (0) y: (-200)\n\nwhen I receive [hjälpknapp v]\nif <(?Språk?) = [Eng]> then\n    switch costume to (hjälpruta eng v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (hjälpruta sv v)\nend\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [topplistor v]\nif <(?Språk?) = [Eng]> then\n    switch costume to (bästa poänglistan eng v)\nend\nif <(?Språk?) = [Sv]> then\n    switch costume to (bästa poänglistan sv v)\nend\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\n@Språkknapp\n\nwhen flag clicked\nswitch costume to (sv v)\ngo to x: (210) y: (-160)\npoint in direction (90)\nset [?språk? v] to [Eng]\nset [ändrad en gång? v] to [nej]\nset volume to (65) %\nshow\nset [ghost v] effect to (0)\nset size to (100) %\nset [brightness v] effect to (0)\nset [går å klicka på? v] to [nej]\n\nwhen I receive [svenska v]\nwait (0.5) seconds\nforever\n    if <(Går å klicka på?) = [ja]> then\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            if <<(costume [number v]) = [2]> and <(?Språk?) = [Eng]>> then\n                set [ändrad en gång? v] to [ja]\n                set [?språk? v] to [Sv]\n                switch costume to (eng v)\n                start sound [Blupp v]\n                broadcast (Engelska v)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        repeat until <(size) = [112]>\n            change size by (4)\n            turn right (2) degrees\n            change [brightness v] effect by (3)\n        end\n    else\n        repeat until <(size) = [100]>\n            change size by (-4)\n            turn left (2) degrees\n            change [brightness v] effect by (-3)\n        end\n    end\nend\n\nwhen I receive [starta spelet v]\nset [går å klicka på? v] to [nej]\nrepeat (10)\n    turn right (6) degrees\n    change [ghost v] effect by (10)\n    change size by (-8)\nend\nhide\n\nwhen I receive [bort med intro v]\nset [går å klicka på? v] to [ja]\n\nwhen flag clicked\nforever\n    if <(Går å klicka på?) = [ja]> then\n        if <(Ändrad en gång?) = [nej]> then\n            if <<mouse down?> and <touching (mouse-pointer v)?>> then\n                if <<(costume [number v]) = [2]> and <(?Språk?) = [Eng]>> then\n                    set [ändrad en gång? v] to [ja]\n                    set [?språk? v] to [Sv]\n                    switch costume to (eng v)\n                    start sound [Blupp v]\n                    broadcast (Engelska v)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [engelska v]\nwait (0.5) seconds\nforever\n    if <(Går å klicka på?) = [ja]> then\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            if <<(costume [number v]) = [1]> and <(?Språk?) = [Sv]>> then\n                set [?språk? v] to [Eng]\n                switch costume to (sv v)\n                start sound [Blupp v]\n                broadcast (Svenska v)\n            end\n        end\n    end\nend\n\nwhen I receive [hjälpknapp v]\nset [går å klicka på? v] to [nej]\n\nwhen I receive [topplistor v]\nset [går å klicka på? v] to [nej]\n\nwhen I receive [bort med hjälpruta v]\nwait (0.2) seconds\nset [går å klicka på? v] to [ja]\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nshow\n\nwhen I receive [björne död v]\nhide\n\n