秋のプラットフォーマー　～Autumn platformer～


@Stage\n\nwhen flag clicked\nswitch backdrop to (empty v)\n\nwhen flag clicked\nhide\nforever\n    if <(level) > [7]> then\n        broadcast (THE END :\) v)\n        set [collect coins v] to [0]\n        stop [this script v]\n    end\nend\n\nset [already loved/faved? v] to [no]\n\n@Blank\n\n@player\n\nwhen I receive [the end :\) v]\nstop [other scripts in sprite v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [the end :\) v]\nstop [other scripts in sprite v]\nhide\n\nwhen I start as a clone\ngo to [back v] layer\nswitch costume to (clone v)\nset size to (70) %\nset [ghost v] effect to (0)\nrepeat (10)\n    change [ghost v] effect by (10)\n    change size by (-10)\nend\ndelete this clone\n\nwhen I receive [go v]\nset size to (70) %\nswitch costume to (normal v)\nshow\ngo to x: (-225) y: (-40)\npoint in direction (90)\nset [x move v] to [0]\nset [y move v] to [0]\nforever\n    clear graphic effects\n    change y by (-3)\n    if <touching (platform v)?> then\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            set [y move v] to [8.5]\n        end\n    end\n    change y by (3)\n    if <(y move) > [-15]> then\n        change [y move v] by (-0.5)\n    end\n    change y by (-2)\n    if <not <touching (platform v)?>> then\n        change y by (-1)\n        if <not <touching (platform v)?>> then\n            change y by (-1)\n            if <not <touching (platform v)?>> then\n                change y by (-1)\n                if <not <touching (platform v)?>> then\n                    change y by (-1)\n                    if <not <touching (platform v)?>> then\n                        change y by (-1)\n                        if <not <touching (platform v)?>> then\n                            change y by (5)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (2)\n    change y by (y move)\n    if <touching (platform v)?> then\n        change y by (-2)\n        if <touching (platform v)?> then\n            change y by ((-1) * (y move))\n            set [y move v] to [-3]\n        end\n        change y by (2)\n    end\nend\n\nwhen I receive [go v]\nforever\n    if <<(x position) = [235]> or <(x position) > [235]>> then\n        if <(collect coins) = (minum collected)> then\n            set [x move v] to [0]\n            set [y move v] to [0]\n            hide\n            change [level v] by (1)\n            start sound [Collect v]\n            go to x: (-225) y: (-40)\n            broadcast (transition v)\n            broadcast (next level v)\n            show\n        end\n    end\nend\n\nwhen I receive [go v]\nforever\n    set [x move v] to ((x move) * (0.85))\n    change x by (x move)\n    if <touching (platform v)?> then\n        change y by (-2)\n        if <touching (platform v)?> then\n            change y by (1)\n            if <touching (platform v)?> then\n                change y by (1)\n                if <touching (platform v)?> then\n                    change y by (1)\n                    if <touching (platform v)?> then\n                        change y by (1)\n                        if <touching (platform v)?> then\n                            change y by (1)\n                            if <touching (platform v)?> then\n                                change y by (-5)\n                                change x by ((-1) * (x move))\n                                if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<<mouse down?> and <(mouse x) > (x position)>> or <<mouse down?> and <(mouse x) < (x position)>>>> and <not <(x move) = [0]>>> then\n                                    set [y move v] to [8]\n                                    set [x move v] to (((x move) / ([abs v] of (x move) )) * (-10))\n                                else\n                                    set [x move v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change y by (2)\n    end\nend\n\nwhen I receive [go v]\nforever\n    create clone of (_myself_ v)\n    wait (.025) seconds\nend\n\nwhen I receive [go v]\nforever\n    if <touching (jump pad v)?> then\n        set [y move v] to [16]\n        wait (1) seconds\n        repeat (10)\n            change [x move v] by (4)\n        end\n    end\nend\n\nwhen I receive [go v]\ngo to [back v] layer\nforever\n    if <<(y position) < [-175]> or <touching (oof v)?>> then\n        hide\n        set [x move v] to [0]\n        set [y move v] to [0]\n        go to x: (-225) y: (-40)\n        point in direction (90)\n        start sound [Crunch v]\n        broadcast (transition v)\n        broadcast (coin reset v) and wait\n        broadcast (coin check v)\n        show\n    end\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [x move v] by (-1.5)\n        point in direction (-90)\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x move v] by (1.5)\n        point in direction (90)\n    end\nend\n\nwhen flag clicked\nforever\n    set [playerx v] to (x position)\n    set [playery v] to (y position)\nend\n\nwhen I receive [change skin v]\nswitch costume to (orange skin v)\n\nwhen I receive [go v]\nswitch costume to (normal v)\nwait (.5) seconds\nif <<(username) = [Schoolacc_CD]> or <(username) = [ scracher882]>> then\n    switch costume to (cat v)\nelse\n    if <(already loved/faved?) = [yes]> then\n        switch costume to (orange skin v)\n    else\n        switch costume to (normal v)\n    end\nend\n\n@platform\n\nwhen I receive [the end :\) v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [go v]\nshow\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\nhide\nswitch costume to (1 v)\n\nwhen flag clicked\nswitch costume to (1 v)\nchange [ghost v] effect by (100)\nset [level v] to [1]\nhide\n\n@deco\n\nwhen I receive [the end :\) v]\nstop [other scripts in sprite v]\nhide\n\nwhen flag clicked\nswitch costume to (1 v)\nhide\n\nwhen I receive [go v]\nshow\nforever\n    switch costume to (level)\nend\n\n@oof\n\nwhen I receive [go v]\nshow\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\nhide\nswitch costume to (1 v)\nclear graphic effects\nset [ghost v] effect to (100)\n\n@coin\n\ndefine spawn (x) (y)\ngo to x: (x) y: (y)\nswitch costume to (1 v)\nclear graphic effects\nset size to (60) %\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nswitch costume to (1 v)\n\nwhen I start as a clone\nshow\nforever\n    if <touching (player v)?> then\n        start sound [Coin v]\n        change [collect coins v] by (1)\n        repeat (10)\n            change y by (2)\n            change [ghost v] effect by (10)\n        end\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nforever\n    repeat until <(costume [number v]) = [5]>\n        next costume\n        wait (.025) seconds\n    end\n    repeat until <(costume [number v]) = [1]>\n        switch costume to ((costume [number v]) - (1))\n        wait (.025) seconds\n    end\nend\n\nwhen I receive [go v]\nwait until <(level) = [1]>\nset [minum collected v] to [2]\nspawn [46] [55]\nspawn [196] [-100]\nwait until <(level) = [2]>\nset [collect coins v] to [0]\nset [minum collected v] to [1]\nwait (1) seconds\nspawn [113] [-100]\nwait until <(level) = [3]>\nset [collect coins v] to [0]\nset [minum collected v] to [3]\nwait (.7) seconds\nspawn [12] [-100]\nspawn [125] [-60]\nspawn [178] [75]\nwait until <(level) = [4]>\nset [collect coins v] to [0]\nset [minum collected v] to [4]\nwait (.7) seconds\nspawn [190] [130]\nspawn [33] [160]\nspawn [200] [11]\nspawn [90] [-97]\nwait until <(level) = [5]>\nset [collect coins v] to [0]\nset [minum collected v] to [4]\nwait (.7) seconds\nspawn [-41] [-66]\nspawn [6] [100]\nspawn [136] [148]\nspawn [230] [-104]\nwait until <(level) = [6]>\nset [collect coins v] to [0]\nset [minum collected v] to [4]\nwait (.7) seconds\nspawn [-89] [-60]\nspawn [-8] [32]\nspawn [30] [143]\nspawn [202] [-93]\nwait until <(level) = [7]>\nset [collect coins v] to [0]\nset [minum collected v] to [5]\nwait (.7) seconds\nspawn [-97] [57]\nspawn [178] [80]\nspawn [67] [-93]\nspawn [142] [-46]\nspawn [86] [133]\n\nspawn [] []\nspawn [] []\nspawn [] []\nspawn [] []\nspawn [] []\nset [collect coins v] to [0]\nset [minum collected v] to []\n\n\n\nwhen I receive [coin check v]\nset [collect coins v] to [0]\nhide\nif <(level) = [1]> then\n    set [collect coins v] to [0]\n    set [minum collected v] to [2]\n    wait (.3) seconds\n    spawn [46] [55]\n    spawn [196] [-100]\nend\nif <(level) = [2]> then\n    set [collect coins v] to [0]\n    set [minum collected v] to [1]\n    wait (.3) seconds\n    spawn [113] [-100]\nend\nif <(level) = [3]> then\n    set [collect coins v] to [0]\n    set [minum collected v] to [3]\n    wait (.3) seconds\n    spawn [12] [-100]\n    spawn [125] [-60]\n    spawn [178] [75]\nend\nif <(level) = [4]> then\n    set [collect coins v] to [0]\n    set [minum collected v] to [4]\n    wait (.3) seconds\n    spawn [190] [130]\n    spawn [33] [160]\n    spawn [200] [11]\n    spawn [90] [-97]\nend\nif <(level) = [5]> then\n    set [collect coins v] to [0]\n    set [minum collected v] to [4]\n    wait (.3) seconds\n    spawn [-41] [-66]\n    spawn [6] [100]\n    spawn [136] [148]\n    spawn [230] [-104]\nend\nif <(level) = [6]> then\n    set [collect coins v] to [0]\n    set [minum collected v] to [4]\n    wait (.3) seconds\n    spawn [-89] [-60]\n    spawn [-8] [32]\n    spawn [30] [143]\n    spawn [202] [-93]\nend\nif <(level) = [7]> then\n    set [collect coins v] to [0]\n    set [minum collected v] to [5]\n    wait (.3) seconds\n    spawn [-97] [57]\n    spawn [178] [80]\n    spawn [67] [-93]\n    spawn [142] [-46]\n    spawn [86] [133]\nend\n\nwhen I receive [coin reset v]\ndelete this clone\n\nwhen flag clicked\nset [collect coins v] to [0]\n\n@thumbnail \n\nwhen flag clicked\nset [ghost v] effect to (100)\ngo to [front v] layer\nshow\ngo to [front v] layer\n\nwhen I receive [stop v]\nclear graphic effects\nset [ghost v] effect to (100)\ngo to [front v] layer\nshow\nrepeat (50)\n    change [ghost v] effect by (-2)\n    wait (0.025) seconds\nend\n\n@music\n\nwhen flag clicked\nset [id v] to [1]\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [go v]\nforever\n    switch costume to (1 -  isrg33 - dreams v)\n    show\n    repeat (50)\n        change [ghost v] effect by (-2)\n    end\n    wait (3) seconds\n    repeat (50)\n        change [ghost v] effect by (2)\n    end\n    hide\n    wait until <(id) = [2]>\n    switch costume to (2 - baryiscool - drive 184 v)\n    show\n    repeat (50)\n        change [ghost v] effect by (-2)\n    end\n    wait (3) seconds\n    repeat (50)\n        change [ghost v] effect by (2)\n    end\n    hide\n    wait until <(id) = [3]>\n    switch costume to (3 - djjaner - god bless you v)\n    show\n    repeat (50)\n        change [ghost v] effect by (-2)\n    end\n    wait (3) seconds\n    repeat (50)\n        change [ghost v] effect by (2)\n    end\n    hide\n    wait until <(id) = [4]>\n    switch costume to (4 - xomuedm - midnight flower v)\n    show\n    repeat (50)\n        change [ghost v] effect by (-2)\n    end\n    wait (3) seconds\n    repeat (50)\n        change [ghost v] effect by (2)\n    end\n    hide\nend\n\nwhen flag clicked\nforever\n    set [id v] to [1]\n    play sound [1 -  iSrg33 - Dreams v] until done\n    wait (1.5) seconds\n    set [id v] to [2]\n    play sound [2 - baryiscool - Drive 184 v] until done\n    wait (2) seconds\n    set [id v] to [3]\n    play sound [3 - Djjaner - God bless you v] until done\n    wait (1) seconds\n    set [id v] to [4]\n    play sound [4 - XomuEDM - midnight flower v] until done\n    wait (1.5) seconds\nend\n\n@notfication\n\nwhen I receive [the end :\) v]\nstop [other scripts in sprite v]\nhide\n\nwhen flag clicked\nshow\nrepeat until <(y position) < [6]>\n    change y by (((5) - (y position)) / (6))\nend\nwait (3.5) seconds\nrepeat until <(y position) > [49.5]>\n    change y by (((y position) + (5)) / (5))\nend\nhide\ngo to x: (0) y: (50)\nforever\n    wait (pick random (20) to (35)) seconds\n    show\n    repeat until <(y position) < [6]>\n        change y by (((5) - (y position)) / (6))\n    end\n    wait (3.5) seconds\n    repeat until <(y position) > [49.5]>\n        change y by (((y position) + (5)) / (5))\n    end\n    hide\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nwhen I receive [stop notif v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [go v]\nwait (.3) seconds\nif <(already loved/faved?) = [yes]> then\n    stop [other scripts in sprite v]\n    hide\nend\n\n@bg\n\nwhen I receive [the end :\) v]\nstop [other scripts in sprite v]\nhide\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nclear graphic effects\n\nwhen I receive [go v]\nshow\nforever\n    go to x: ((playerX) / (-10)) y: ((playerY) / (-10))\n    go to [back v] layer\nend\n\n@Par\n\nwhen I receive [the end :\) v]\nstop [other scripts in sprite v]\nhide\n\nwhen flag clicked\nhide\ngo to [front v] layer\nforever\n    create clone of (_myself_ v)\n    wait (.1) seconds\nend\n\nwhen I start as a clone\nhide\ngo to x: (pick random (-230) to (230)) y: (-200)\nset size to (pick random (30) to (50)) %\npoint in direction (pick random (-90) to (90))\nshow\nrepeat (20)\n    move (2) steps\n    change y by (1)\n    turn right (5) degrees\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\n@transition\n\nwhen I receive [transition v]\ngo to [front v] layer\nshow\nclear graphic effects\nwait (.5) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nswitch costume to (1 v)\nhide\ngo to [back v] layer\n\nwhen flag clicked\nhide\nclear graphic effects\n\n@win screen \n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nclear graphic effects\n\nwhen I receive [the end :\) v]\ngo to x: (0) y: (0)\ncreate clone of (_myself_ v)\nshow\nswitch costume to (text v)\nwait (2) seconds\nrepeat (1027)\n    change y by (1)\nend\nwait (.9) seconds\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nswitch costume to (me v)\ngo to x: (0) y: (0)\nwait (.9) seconds\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nwait (1.3) seconds\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\nbroadcast (thumbnail v)\n\nwhen I start as a clone\nswitch costume to (black screen v)\ngo to x: (0) y: (0)\ngo to [back v] layer\nshow\n\n@Intro\n\ndefine [Smooth spin] Speed - (speed) [Ending direction] (direction) [Full turn speed] (full speed)\nset [my variable v] to [0]\nrepeat (15)\n    change [my variable v] by (full speed)\n    turn right (my variable) degrees\nend\nrepeat until <(round (direction)) = (direction)>\n    turn right (((direction) - (direction)) / (speed)) degrees\nend\n\nwhen flag clicked\nset [full turn speed v] to [1]\nset [ending direction v] to [90]\nset [smooth spin v] to [5]\npoint in direction (90)\n\nwhen flag clicked\nhide\nswitch costume to (capture2 v)\nshow\ngo to x: (-240) y: (0)\nset size to (10) %\nrepeat (2)\n    change x by (6)\n    change size by (5)\nend\nrepeat (3)\n    change x by (9)\n    change size by (6)\nend\nrepeat (4)\n    change x by (12)\n    change size by (8)\nend\nrepeat (3)\n    change x by (12)\n    change size by (8)\nend\nrepeat (3)\n    change x by (12)\n    change size by (6)\nend\nrepeat (3)\n    change x by (9)\n    change size by (6)\nend\nrepeat (3)\n    change x by (7)\n    change size by (6)\nend\nrepeat (3)\n    change x by (5)\n    change size by (4)\nend\nrepeat (3)\n    change x by (3)\n    change size by (3)\nend\nrepeat (3)\n    change x by (3)\n    change size by (3)\nend\nrepeat (3)\n    change x by (2)\n    change size by (2)\nend\nrepeat (3)\n    change x by (1)\n    change size by (1)\nend\n[Smooth spin] Speed - (Smooth spin) [Ending direction] (Ending direction) [Full turn speed] (Full turn speed)\nwait (.5) seconds\nrepeat (2)\n    change size by (-6)\nend\nrepeat (3)\n    change size by (-8)\nend\nrepeat (4)\n    change size by (-10)\nend\nrepeat (5)\n    change size by (-14)\nend\nhide\nbroadcast (transition v)\nbroadcast (go v)\ndelete this clone\n\nwhen flag clicked\nwait until <key (any v) pressed?>\nstop [other scripts in sprite v]\nhide\nbroadcast (transition v)\nbroadcast (go v)\ndelete this clone\n\n@thumbnail\n\nwhen flag clicked\nhide\n\nwhen I receive [thumbnail v]\nset volume to (100) %\nstart sound [end v]\ngo to [front v] layer\ngo to x: (0) y: (200)\nset [brightness v] effect to (45)\nshow\nrepeat (45)\n    change y by (((0) - (y position)) / (7))\n    change [brightness v] effect by (-1)\nend\n\n@timer\n\nwhen I receive [go v]\nshow variable [time v]\nset [time v] to [0]\nforever\n    repeat until <(level) = [8]>\n        change [time v] by (1)\n        wait (1) seconds\n    end\n    stop [this script v]\nend\n\nwhen flag clicked\nhide variable [time v]\nhide variable [☁ world record v]\n\nwhen I receive [the end :\) v]\nforever\n    if <(time) < (☁ World record)> then\n        set [☁ world record v] to (time)\n    end\nend\n\nwhen I receive [the end :\) v]\nshow variable [☁ world record v]\n\n@skin gain ani\n\nwhen flag clicked\nhide\ngo to [front v] layer\npoint in direction (90)\nset size to (30) %\ngo to x: (0) y: (0)\nswitch costume to (with out text v)\n\nwhen I receive [give skin v]\ngo to [front v] layer\npoint in direction (90)\nset size to (30) %\ngo to x: (0) y: (0)\nset rotation style [all around v]\nswitch costume to (with out text v)\nwait (1) seconds\nbroadcast (transition v)\nshow\nrepeat (56)\n    turn left (25) degrees\n    change size by (10)\nend\nturn left (25) degrees\npoint in direction (90)\nswitch costume to (with text v)\nrepeat until <<key (any v) pressed?> or <mouse down?>>\n    repeat (10)\n        change y by (1.5)\n    end\n    repeat (10)\n        change y by (-1.5)\n    end\nend\nswitch costume to (with out text v)\nrepeat (58)\n    change size by (-8.4)\nend\nset rotation style [left-right v]\nrepeat until <touching (player v)?>\n    move (10) steps\n    point towards (player v)\nend\nhide\nbroadcast (flash v)\nbroadcast (change skin v)\n\n@flash\n\nwhen flag clicked\nshow\nset size to (300) %\nset [ghost v] effect to (100)\n\nwhen I receive [flash v]\nforever\n    go to [front v] layer\nend\n\nwhen I receive [flash v]\nswitch costume to (white v)\ngo to [front v] layer\nclear graphic effects\nshow\ngo to x: (0) y: (0)\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\nclear graphic effects\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]>>\nset [already loved/faved? v] to [yes]\nbroadcast (stop notif v)\nbroadcast (give skin v)\nhide\ndelete this clone\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