Spin The Wheel!!  


@Stage\n\nwhen flag clicked\nforever\n    play sound [latin-meeting-background-music-for-video-vlog-hip-hop-version-34-sec-207016 v] until done\n    play sound [ethereal-vistas-191254 v] until done\n    play sound [once-in-paris-168895 v] until done\nend\n\nwhen flag clicked\nif <[0] < [1]> then\n    broadcast (out of spins! v)\nend\n\nwhen flag clicked\nset [☁ spins left v] to [10]\n\n@Sprite1\n\nwhen [space v] key pressed\njump\n\nwhen I receive [message1 v]\nspin\n\nwhen I receive [message1 v]\nplay sound [bike-back-wheel-coasting-74816 v] until done\nstart sound [tada-fanfare-a-6313 v]\nbroadcast (win v)\n\ndefine jump\nchange y by (10)\nwait (0.4) seconds\nchange y by (-10)\nwait (0.4) seconds\n\ndefine spin\nrepeat (pick random (pick random (20) to (100)) to (pick random (100) to (130)))\n    turn right (8.951) degrees\nend\n\nwhen flag clicked\ngo to x: (10) y: (7)\ngo [backward v] (1) layers\n\n@Button1\n\ndefine click\nstart sound [laser2 v]\nchange size by (-10)\nwait (0.25) seconds\nchange size by (10)\nbroadcast (message1 v)\n\nwhen this sprite clicked\nclick\nchange [☁ spins left v] by (-1)\n\nwhen [b v] key pressed\nnext costume\n\nwhen I receive [spin again v]\nclick\n\nwhen flag clicked\nset size to (100) %\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by ((40) - ((size) / (2)))\n        set [brightness v] effect to (10)\n        point in direction ((([sin v] of ((timer) * (500)) ) * (5)) + (90))\n    else\n        point in direction (90)\n        change size by (((60) - (size)) / (3))\n        set [brightness v] effect to (0)\n    end\nend\n\n@Sprite2\n\nwhen I receive [win v]\nnext costume\nshow\nbroadcast (ui v)\nbroadcast (confetti v)\n\nwhen flag clicked\nhide\n\nwhen I receive [hide  v]\nhide\n\nwhen flag clicked\ngo [forward v] (100) layers\n\n@Sprite3\n\nwhen flag clicked\nrepeat until <key (space v) pressed?>\n    hide\n    wait (10) seconds\n    show\n    play sound [happy-pop-3-185288 v] until done\n    wait (10) seconds\n    hide\nend\n\nwhen this sprite clicked\nplay sound [happy-pop-3-185288 v] until done\nhide\n\nwhen flag clicked\ngo [forward v] (1000) layers\n\n@detector\n\nwhen flag clicked\nhide\nset [faved___ v] to [0]\nset [loved__ v] to [0]\nset [clone id v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone id v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(LOVED__) = [1]> and <(FAVED___) = [1]>>\nwait (1) seconds\nshow\nchange [☁ spins left v] by (100)\ngo to x: (0) y: (50)\nreset timer\nswitch costume to (pick random (1) to (4))\nset [ghost v] effect to (100)\nrepeat until <(timer) > [3.5]>\n    change y by ((y position) / (-15))\n    change [ghost v] effect by (-3)\nend\nreset timer\nrepeat until <(timer) > [3.5]>\n    change y by (((y position) - (-100)) / (-15))\n    change [ghost v] effect by (10)\nend\n\nwhen I start as a clone\nif <(clone id) = [0]> then\n    go to x: (-15) y: (0)\n    set [loved__ v] to [0]\n    switch costume to (love v)\n    forever\n        set [love? v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [loved__ v] to [1]\n        end\n    end\nend\nif <(clone id) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (fave v)\n    set [faved___ v] to [0]\n    forever\n        set [fav v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [faved___ v] to [1]\n        end\n    end\nend\n\n@Sprite4\n\nwhen flag clicked\nhide\n\nwhen I receive [ui v]\nshow\n\nwhen this sprite clicked\nchange [☁ spins left v] by (-1)\nhide\nbroadcast (hide  v)\nbroadcast (spin again v)\nnext costume\nbroadcast (hide again v)\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by ((40) - ((size) / (2)))\n        set [brightness v] effect to (10)\n        point in direction ((([sin v] of ((timer) * (500)) ) * (5)) + (90))\n    else\n        point in direction (90)\n        change size by (((100) - (size)) / (3))\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\nset size to (100) %\n\n@confetti\n\nwhen I receive [confetti v]\nstart sound [Tada v]\nforever\n    go to x: (pick random (-240) to (240)) y: (200)\n    create clone of (_myself_ v)\n    wait (.000001) seconds\nend\n\nwhen I receive [hide again v]\nstop [other scripts in sprite v]\nhide\n\nwhen I start as a clone\nshow\npoint in direction (pick random (0) to (360))\nset size to (pick random (60) to (80)) %\nset [color v] effect to (pick random (0) to (200))\nrepeat until <[-179] > (y position)>\n    next costume\n    change y by (pick random (-8) to (-4))\n    turn right (pick random (-8) to (-4)) degrees\nend\n\n@FX2\n\nwhen flag clicked\nset [click v] to [1]\nforever\n    clear graphic effects\n    hide\n    if <key (1 v) pressed?> then\n        set [click v] to [1]\n    end\n    if <key (2 v) pressed?> then\n        set [click v] to [2]\n    end\n    if <key (3 v) pressed?> then\n        set [click v] to [3]\n    end\n    if <key (4 v) pressed?> then\n        set [click v] to [4]\n    end\n    if <key (5 v) pressed?> then\n        set [click v] to [5]\n    end\n    if <key (6 v) pressed?> then\n        set [click v] to [6]\n    end\n    if <key (7 v) pressed?> then\n        set [click v] to [7]\n    end\n    if <key (8 v) pressed?> then\n        set [click v] to [8]\n    end\n    if <mouse down?> then\n        go to (mouse-pointer v)\n        create clone of (_myself_ v)\n    end\n    clear graphic effects\nend\n\nwhen I start as a clone\nset size to (100) %\nshow\nif <(click) = [1]> then\n    set [ghost v] effect to (0)\n    switch costume to (1 v)\n    show\n    turn right (pick random (1000) to (0)) degrees\n    set [color v] effect to (pick random (1) to (100))\n    repeat (20)\n        change [ghost v] effect by (5)\n        turn right (5) degrees\n        move (5) steps\n    end\nend\nif <(click) = [2]> then\n    switch costume to (2 v)\n    point in direction (90)\n    point in direction (pick random (180) to (90))\n    repeat (20)\n        move (5) steps\n        change [ghost v] effect by (5)\n    end\nend\nif <(click) = [3]> then\n    set [brightness v] effect to (50)\n    switch costume to (3 v)\n    point in direction (90)\n    repeat (19)\n        change [brightness v] effect by (-5)\n        change size by (-5)\n    end\nend\nif <(click) = [4]> then\n    set [color v] effect to (pick random (1) to (10))\n    repeat (20)\n        switch costume to (4 v)\n        change x by (pick random (-3) to (3))\n        change y by (pick random (5) to (10))\n        change [ghost v] effect by (5)\n        change [brightness v] effect by (-5)\n    end\nend\nif <(click) = [5]> then\n    set [brightness v] effect to (-10)\n    switch costume to (5 v)\n    set [color v] effect to (pick random (1) to (10))\n    change x by (pick random (-100) to (100))\n    change y by (pick random (-100) to (100))\n    repeat (20)\n        point towards (mouse-pointer v)\n        move (5) steps\n        change [ghost v] effect by (5)\n    end\nend\nif <(click) = [6]> then\n    clear graphic effects\n    switch costume to (6 v)\n    set size to (8.1) %\n    repeat (20)\n        change size by (5)\n        change [ghost v] effect by (5)\n    end\nend\nif <(click) = [7]> then\n    change [color v] effect by (pick random (1) to (50))\n    clear graphic effects\n    switch costume to (7 v)\n    go to (mouse-pointer v)\n    repeat (20)\n        change size by (-5)\n        change y by (10)\n        change x by (pick random (-5) to (5))\n        change [ghost v] effect by (5)\n        turn right (pick random (-20) to (20)) degrees\n    end\nend\nif <(click) = [8]> then\n    set [ghost v] effect to (0)\n    switch costume to (1 v)\n    show\n    turn right (pick random (1000) to (0)) degrees\n    set [color v] effect to (10)\n    repeat (20)\n        change [ghost v] effect by (5)\n        turn right (5) degrees\n        move (5) steps\n    end\n    repeat (20)\n        change [ghost v] effect by (-5)\n        turn right (-5) degrees\n        move (-5) steps\n    end\nend\ndelete this clone\n\n@Shop\n\nwhen flag clicked\nforever\n    change size by (((125) - (size)) / (25))\nend\n\nwhen this sprite clicked\nstart sound [click v]\nset size to (115) %\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((145) - (size)) / (3))\n    else\n        change size by (((125) - (size)) / (3))\n    end\nend\n\nwhen flag clicked\nswitch costume to (shop v)\ngo to x: (197) y: (0)\n\nwhen this sprite clicked\nwait (0.5) seconds\nchange [timesshopclicked v] by (1)\nif <(timesShopClicked) = [1]> then\n    broadcast (shop open v)\n    set y to (0)\n    repeat (50)\n        change y by (((198) - (y position)) / (5))\n        switch costume to (exit v)\n    end\nend\n\nwhen flag clicked\nforever\n    wait until <(timesShopClicked) = [2]>\n    set [timesshopclicked v] to [0]\n    broadcast (shop close v)\n    set y to (198)\n    repeat (50)\n        change y by (((0) - (y position)) / (5))\n        switch costume to (shop v)\n    end\nend\n\nwhen flag clicked\nset [timesshopclicked v] to [0]\nrepeat (11)\n    go to [front v] layer\nend\n\n@Shop UI\n\nwhen I receive [shop open v]\nstart sound [whoosh in v]\nshow\nbroadcast (shop button v)\nswitch costume to (ui16 v)\nset x to (125)\nrepeat (50)\n    change x by (((0) - (x position)) / (5))\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nrepeat (10)\n    go to [front v] layer\nend\n\nwhen I receive [shop close v]\nbroadcast (hide buy button v)\nstart sound [whoosh out v]\nshow\nswitch costume to (ui16 v)\nrepeat (15)\n    switch costume to ((costume [number v]) - (1))\nend\nhide\n\nwhen flag clicked\nforever\n\nnext costume\n\nset x to (0)\nrepeat (50)\n    change x by (((-125) - (x position)) / (0))\nend\n\nhide\n\n@Sprite5\n\nwhen I receive [shop button v]\ngo [forward v] (1) layers\nshow\n\nwhen flag clicked\nhide\n\nwhen I receive [hide buy button v]\nhide\n\nwhen this sprite clicked\nif <[10] > [0]> then\n    change [☁ spins left v] by (-10)\n    broadcast (ui 2 v) and wait\nend\n\n@Sprite6\n\nwhen I receive [ui 2 v]\nshow\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nhide\n\n@Sprite7\n\n@Sprite8\n\nwhen this sprite clicked\nchange [☁ spins left v] by (5)\nhide\nif <[0] > [0]> then\n    show\nend\n\nwhen I receive [out of spins! v]\nshow\n\nwhen flag clicked\nhide\n\n