Classic platformer

Instructions: Hi guys! not an animation but a game welcome to CLASSIC PLATFORMER! I worked really hard on this so please leave a heart and star\n\nCREDICTS:\n@griffpatch\n\nFor all the tutorials!\n\n1. https://www.youtube.com/watch?v=D16hTnDGweo\n2. https://www.youtube.com/watch?v=HdFxavSE9H8\n3. https://www.youtube.com/watch?v=Y6jnwkwLhto\n4. https://www.youtube.com/watch?v=Ham3cyqbPuQ\n5. https://www.youtube.com/watch?v=lG9R-rc1z28\n6. https://www.youtube.com/watch?v=_KpiiOSMn6w\n7. https://www.youtube.com/watch?v=bMZmDVCookw\n8. https://www.youtube.com/watch?v=Vu_PO5YMDVQ\n9. https://www.youtube.com/watch?v=ca4J1x-BZU4\n10.https://www.youtube.com/watch?v=B_sumuBIYgE\n11.https://www.youtube.com/watch?v=Qh0yz_qPQeA\n12.https://www.youtube.com/watch?v=_O3Sb0-wIxM\n13.https://www.youtube.com/watch?v=PuqyJOT83ko

@Stage\n\n@Player\n\nwhen flag clicked\nhide variable [coins v]\nhide variable [lives v]\nbroadcast (Main menu v)\n\ndefine Move - In steps (steps)\nchange [falling v] by (1)\nrepeat (steps)\n    set [last value v] to (x position)\n    change x by ((speed x) / (steps))\n    Check Touching Solid\n    if <(Touching) > [0]> then\n        Collide X - Slope or Wall?\n    end\n    set [last value v] to (y position)\n    change y by ((speed y) / (steps))\n    Check Touching Solid\n    if <(Touching) > [0]> then\n        Collide Y - Ceiling or Floor \n    end\nend\n\ndefine Check Touching Solid\nif <<touching (level v)?> or <touching (platform v)?>> then\n    set [touching v] to [1]\nelse\n    set [touching v] to [0]\nend\n\nwhen I receive [tick - player v]\nswitch backdrop to <touching (level v)?>\nMoved - by Moving Platform\nControls - Up and Down\nControls - Left and Right\nMove - In steps (([abs v] of (speed x) ) + ([abs v] of (speed y) ))\nSet Costume\n\ndefine Controls - Up and Down\nif <<key (up arrow v) pressed?> or <key (space v) pressed?>> then\n    if <<(Wall slide) > [0]> and <(Jumping) = [0]>> then\n        start sound [Jump v]\n        set [jumping v] to [1]\n        set [falling v] to [3]\n        set [wall slide v] to [0]\n        turn right (180) degrees\n        set [speed x v] to (((direction) / (90)) * (7))\n        set [long jump v] to [12]\n    end\n    if <<(falling) < [3]> and <(Jumping) = [0]>> then\n        start sound [Jump v]\n        set [jumping v] to [1]\n        set [falling v] to [3]\n    end\n    if <<(Jumping) > [0]> and <(Jumping) < (Jump Duration)>> then\n        change [jumping v] by (1)\n        set [speed y v] to (Jump Force)\n    end\nelse\n    set [jumping v] to [0]\nend\nchange [speed y v] by (Gravity)\nif <(Wall slide) > [0]> then\n    Check Can Wall Slide\n    if <(speed y) < [0]> then\n        set [speed y v] to ((speed y) * (0.6))\n    end\nend\n\ndefine Controls - Left and Right\nif <(Long jump) > [0]> then\n    change [long jump v] by (-1)\n    stop [this script v]\nend\nset [key x v] to (<key (right arrow v) pressed?> - <key (left arrow v) pressed?>)\nif <(Key X) = [0]> then\n    if <<(falling) > [2]> and <(Wall slide) < [1]>> then\n        set [speed x v] to ((speed x) * (0.98))\n        stop [this script v]\n    end\n    if <([abs v] of (speed x) ) < [1]> then\n        set [frame v] to [0]\n        set [speed x v] to [0]\n    else\n        change [frame v] by (0.5)\n    end\nelse\n    change [speed x v] by ((Key X) * (Acceleration))\n    if <not <(direction) = ((Key X) * (90))>> then\n        set [wall slide v] to [0]\n    end\n    point in direction ((Key X) * (90))\n    change [frame v] by (1)\nend\nset [speed x v] to ((speed x) * (Resistance))\n\ndefine Reset and begin level\nset [invulnerable v] to [0]\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [wall slide v] to [0]\nset [jumping v] to [0]\nset [long jump v] to [0]\nset [falling v] to [99]\npoint in direction (90)\nBegin Scene # (Spawn Scene) go to x,y: (Spawn X) (Spawn Y)\n\nwhen I receive [game loop v]\nclear graphic effects\nforever\n    broadcast (Tick - First v)\n    broadcast (Tick - Platforms v)\n    broadcast (Tick - Player v)\n    broadcast (Tick - Last v)\nend\n\nwhen I receive [tick - last v]\nif <(x position) > [235]> then\n    Begin Scene # ((Scene #) + (1)) go to x,y: [-235] []\nend\nif <(x position) < [-235]> then\n    Begin Scene # ((Scene #) + (-1)) go to x,y: [235] []\nend\nif <(y position) > [180]> then\n    Begin Scene # ((Scene #) + (100)) go to x,y: [] [-160]\nend\nif <(y position) < [-180]> then\n    Begin Scene # ((Scene #) + (-100)) go to x,y: [] [180]\nend\nif <touching (danger v)?> then\n    broadcast (Loose life v)\nend\n\ndefine Begin Scene # (scene #) go to x,y: (x) (y)\nset [scene # v] to (scene #)\nif <(x) > []> then\n    set x to (x)\nend\nif <(y) > []> then\n    set y to (y)\nend\nbroadcast (About to change scene v)\nbroadcast (Change Scene v)\nstop [other scripts in sprite v]\nwait (0) seconds\nswitch costume to (hitbox v2 v)\nset rotation style [don't rotate v]\nif <(x) > []> then\n    Fix Collision in Direction [0]\nelse\n    Fix Collision in Direction [90]\nend\nSet Costume\nbroadcast (Game Loop v)\n\ndefine Fix Collision in Direction (dir)\nset [temp v] to (direction)\nset [distance v] to [1]\npoint in direction (dir)\nrepeat (128)\n    Check Touching Solid\n    if <(Touching) < [1]> then\n        point in direction (temp)\n        stop [this script v]\n    end\n    move (Distance) steps\n    turn right (180) degrees\n    change [distance v] by (1)\nend\n\nwhen I receive [tick - first v]\nswitch costume to (hitbox v2 v)\nset rotation style [don't rotate v]\nset [platform dx v] to []\nset [platform dy v] to []\n\ndefine Set Costume\nset rotation style [left-right v]\nif <(Wall slide) > [0]> then\n    switch costume to (hangon01 v)\n    stop [this script v]\nend\nif <(falling) > [1]> then\n    if <(speed y) > [0]> then\n        switch costume to (jump01 v)\n    else\n        switch costume to (run_j2 v)\n    end\n    stop [this script v]\nend\nif <(Frame) > [0]> then\n    switch costume to ((1) + ([floor v] of ((Frame) mod (16)) ))\nelse\n    switch costume to (stand v)\nend\n\ndefine Collide X - Slope or Wall?\nCheck Can Wall Slide\nchange y by (1)\nCheck Touching Solid\nif <(Touching) > [0]> then\n    change y by (1)\n    Check Touching Solid\n    if <(Touching) > [0]> then\n        change y by (-2)\n        set x to (last value)\n        set [speed x v] to [0]\n        stop [this script v]\n    end\n    set [speed x v] to ((speed x) * (0.8))\nend\nset [speed x v] to ((speed x) * (0.95))\nSlip\n\ndefine Collide Y - Ceiling or Floor \nset y to (last value)\nif <(speed y) > [0]> then\n    set [speed y v] to [0]\n    stop [this script v]\nend\nif <(falling) > [0]> then\n    set [falling v] to [0]\n    Slip\nend\nset [speed y v] to ((speed y) * (0.8))\n\ndefine Slip\nchange y by (-2)\nchange x by (1)\nCheck Touching Solid\nif <(Touching) < [1]> then\n    set [falling v] to [9]\n    change [speed x v] by (1)\n    stop [this script v]\nend\nchange x by (-2)\nCheck Touching Solid\nif <(Touching) < [1]> then\n    set [falling v] to [9]\n    change [speed x v] by (-1)\n    stop [this script v]\nend\nchange y by (2)\nchange x by (1)\n\ndefine Check Can Wall Slide\nif <(falling) < [2]> then\n    set [wall slide v] to [0]\n    stop [this script v]\nend\nswitch costume to (hitbox wallslide v)\nset rotation style [left-right v]\nCheck Touching Solid\nset [wall slide v] to (Touching)\nswitch costume to (hitbox v2 v)\nset rotation style [don't rotate v]\n\nwhen I receive [loose life v]\nset [invulnerable v] to [1]\nstop [other scripts in sprite v]\nstart sound [Meow2 v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nwait (0.5) seconds\nchange [lives v] by (-1)\nif <(Lives) > [0]> then\n    Reset and begin level\nelse\n    broadcast (Game Over v)\nend\n\ndefine Moved - by Moving Platform\nchange x by (Platform DX)\nchange y by (Platform DY)\nCheck Touching Solid\nif <(Touching) > [0]> then\n    Find close space to (x position) (y position) Max [16]\n    if <(Touching) > [0]> then\n        broadcast (Loose life v)\n    end\nend\n\ndefine Find close space to (x) (y) Max (max)\nset [temp v] to (direction)\nset [distance v] to [1]\npoint in direction (0)\nrepeat (max)\n    repeat (16)\n        go to x: (x) y: (y)\n        move (Distance) steps\n        Check Touching Solid\n        if <(Touching) < [1]> then\n            point in direction (temp)\n            stop [this script v]\n        end\n        turn right (22.5) degrees\n    end\n    change [distance v] by (1)\nend\ngo to x: (x) y: (y)\npoint in direction (temp)\n\nwhen I receive [start game v]\nshow variable [coins v]\nshow variable [lives v]\nshow\ngo to [front v] layer\nset [jump duration v] to [6]\nset [acceleration v] to [1.5]\nset [gravity v] to [-1]\nset [jump force v] to [12]\nset [resistance v] to [0.8]\nset [last value v] to [0]\nbroadcast (Reset Game v) and wait\nbroadcast (Set up v) and wait\nset [lives v] to [4]\nset [spawn scene v] to [1]\nset [spawn x v] to [-150]\nset [spawn y v] to [55]\nReset and begin level\n\nwhen I receive [player - bounce v]\nset [speed y v] to [10]\n\n@Level\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\nhide\n\nwhen I receive [change scene v]\nswitch costume to (join [Scene] (Scene #))\n\nwhen I receive [start game v]\nshow\n\n@Danger\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\nhide\n\nwhen I receive [change scene v]\nswitch costume to (blank v)\nswitch costume to (join [Scene] (Scene #))\nif <(Scene #) = [102]> then\n    repeat until <(Scene #) = [103]>\n        switch costume to (scene102 v)\n        repeat until <(costume [number v]) = [21]>\n            wait (0.09) seconds\n            next costume\n        end\n        wait (1) seconds\n    end\nend\nif <(Scene #) = [101]> then\n    repeat until <(Scene #) = [102]>\n        switch costume to (scene101 v)\n        repeat until <(costume [number v]) = [7]>\n            wait (0.09) seconds\n            next costume\n        end\n        wait (1) seconds\n    end\nend\nif <(Scene #) = [-2]> then\n    forever\n        set y to ((3) * ([sin v] of ((timer) * (180)) ))\n    end\nend\nif <(Scene #) = [0]> then\n    forever\n        set y to ((3) * ([sin v] of ((timer) * (180)) ))\n    end\nend\nif <(Scene #) = [5]> then\n    forever\n        set y to ((3) * ([sin v] of ((timer) * (180)) ))\n    end\nend\nif <(Scene #) = [105]> then\n    forever\n        set y to ((8) * ([sin v] of ((timer) * (180)) ))\n    end\nend\nif <(Scene #) = [109]> then\n    forever\n        set y to ((8) * ([sin v] of ((timer) * (180)) ))\n    end\nend\n\nwhen I receive [start game v]\nshow\n\n@Platform\n\nwhen I receive [change scene v]\ngo to [back v] layer\nswitch costume to (costume1 v)\nhide\nif <(Scene #) = [-3]> then\n    Spawn [beam] at [0] [0] dir [90] Turn [-2]\nend\nif <(Scene #) = [-2]> then\n    Spawn [costume1] at [-161] [-137] dir [90] Turn [-2]\n    Spawn [costume1] at [-59] [-137] dir [90] Turn [-2]\n    Spawn [costume1] at [31] [-137] dir [90] Turn [-2]\n    Spawn [costume1] at [109] [-137] dir [90] Turn [-2]\nend\nif <(Scene #) = [-1]> then\n    Spawn [wheel] at [6] [-182] dir [90] Turn [-2]\nend\nif <(Scene #) = [0]> then\n    Spawn [Square] at [-125] [-9] dir [90] Turn [2]\n    Spawn [cup] at [45] [18] dir [90] Turn [0.5]\nend\nif <(Scene #) = [1]> then\n    show\n    Animate Platform\nend\nif <(Scene #) = [2]> then\n    show\n    Animate 2\nend\nif <(Scene #) = [3]> then\n    show\n    Animate 3\nend\nif <(Scene #) = [5]> then\n    show\n    Animate 4\nend\nif <(Scene #) = [107]> then\n    Spawn [Key 1] at [24] [40] dir [90] Turn []\nend\n\ndefine Animate Platform\ngo to [front v] layer\npoint in direction (90)\ngo to x: (42) y: (-57)\nforever\n    glide (2) secs to x: (15) y: (90)\n    wait (1) seconds\n    glide (1) secs to x: (163) y: (51)\n    wait (1) seconds\n    glide (2) secs to x: (19) y: (-47)\n    wait (1) seconds\nend\n\nwhen I receive [tick - platforms v]\nTick (x position) (y position)\nset [last x v] to (x position)\nset [last y v] to (y position)\n\ndefine Tick (new x) (new y)\nif <(Turn) > []> then\n    change y by (4)\n    if <touching (player v)?> then\n        Rotation Maths CCW ((0) - (Turn))\n    end\nelse\n    if <(new y) > [50]> then\n        change y by (1)\n    else\n        set y to ((Last y) + (1))\n    end\n    if <touching (player v)?> then\n        set [platform dx v] to ((new x) - (Last x))\n        set [platform dy v] to ((new y) - (Last y))\n    end\nend\ngo to x: (new x) y: (new y)\n\ndefine Animate 2\ngo to [back v] layer\nset rotation style [all around v]\npoint in direction (0)\ngo to x: (71) y: (114)\nforever\n    glide (2) secs to x: (70) y: (-33)\n    wait (1) seconds\n    glide (1) secs to x: (70) y: (114)\nend\n\ndefine Animate 3\npoint in direction (90)\ngo to x: (24) y: (-40)\nforever\n    glide (2) secs to x: (263) y: (-40)\n    wait (1) seconds\n    glide (2) secs to x: (24) y: (-40)\n    wait (1) seconds\nend\n\ndefine Animate 4\ngo to [back v] layer\npoint in direction (0)\ngo to x: (-183) y: (87)\nforever\n    glide (1) secs to x: (-183) y: (-89)\n    wait (1) seconds\n    glide (1) secs to x: (-183) y: (87)\nend\n\ndefine Door at (x) (y) Key (key name)\npoint in direction (90)\nshow\nswitch costume to (key name)\ngo to x: (x) y: (y)\nforever\n    wait until <touching (player v)?>\n    go to [back v] layer\n    if <[collected v] contains (key name)?> then\n        start sound [Buzz Whir v]\n        repeat (24)\n            change y by (4)\n        end\n        wait (1) seconds\n        start sound [Buzz Whir v]\n        repeat (24)\n            change y by (-4)\n        end\n        start sound [Crunch v]\n    else\n        start sound [Low Squeak v]\n    end\n    wait until <not <touching (player v)?>>\nend\n\ndefine Animate5\nshow\npoint in direction (90)\nforever\n    glide (1.5) secs to x: (x position) y: ((y position) - (90))\n    wait (0) seconds\n    glide (1) secs to x: (x position) y: ((y position) + (90))\n    wait (0) seconds\nend\n\nwhen flag clicked\nclear graphic effects\nset [speed y v] to [0]\nset rotation style [left-right v]\nhide\n\nwhen I receive [about to change scene v]\ndelete this clone\n\ndefine Spawn (type) at (x) (y) dir (dir) Turn (degrees)\nset [turn v] to (degrees)\ngo to x: (x) y: (y)\npoint in direction (dir)\nswitch costume to (type)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif < (costume [name v]) contains [Key]?> then\n    Door at (x position) (y position) Key (costume [name v])\nend\nif <(Turn) > []> then\n    show\n    set rotation style [all around v]\n    forever\n        turn right (Turn) degrees\n    end\nend\n\ndefine Rotation Maths CCW (ccw)\nset [dx v] to (([x position v] of [player v]) - (x position))\nset [dy v] to (([y position v] of [player v]) - (y position))\nset [sin v] to ([sin v] of (ccw) )\nset [cos v] to ([cos v] of (ccw) )\nset [platform dx v] to ((((dx) * (cos)) - ((dy) * (sin))) - (dx))\nset [platform dy v] to ((((dx) * (sin)) + ((dy) * (cos))) - (dy))\n\ngo to [front v] layer\n\n@Sound\n\nwhen flag clicked\nforever\n    play sound [Ghostrifter-Official-Deflector v] until done\nend\n\n@Collectables\n\nwhen I receive [change scene v]\nif <(Scene #) = (My Scene)> then\n    show\nelse\n    hide\nend\n\nwhen I start as a clone\nrepeat until <touching (player v)?>\n    change y by ((0.5) * ([sin v] of (Frame) ))\n    change [frame v] by (5)\nend\nset [my scene v] to []\nif <(costume [name v]) = [Coin]> then\n    start sound [Coin v]\n    change [coins v] by (1)\nelse\n    if <(costume [name v]) = [Green Flag]> then\n        start sound [Squeaky Toy v]\n        set [spawn scene v] to (Scene #)\n        set [spawn x v] to ([x position v] of [player v])\n        set [spawn y v] to ([y position v] of [player v])\n    else\n        start sound [magic-key v]\n        add (costume [name v]) to [collected v]\n    end\nend\nrepeat (20)\n    change y by (2)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I receive [set up v]\ndelete all of [collected v]\nshow list [collected v]\nset [coins v] to [0]\nset [frame v] to [0]\nPlace [Green Flag] Scene [-1] xy [-3] [54]\nPlace [Coin] Scene [0] xy [155] [-140]\nPlace [Coin] Scene [0] xy [-73] [-144]\nPlace [Coin] Scene [0] xy [-145] [-144]\nPlace [Coin] Scene [1] xy [155] [6]\nPlace [Coin] Scene [1] xy [212] [36]\nPlace [Coin] Scene [2] xy [-160] [0]\nPlace [Green Flag] Scene [2] xy [-200] [48]\nPlace [Coin] Scene [101] xy [-71] [-29]\nPlace [Coin] Scene [101] xy [74] [-30]\nPlace [Coin] Scene [102] xy [-124] [-29]\nPlace [Coin] Scene [102] xy [42] [-29]\nPlace [Green Flag] Scene [102] xy [216] [-18]\nPlace [Coin] Scene [103] xy [-7] [-144]\nPlace [Coin] Scene [103] xy [-156] [-58]\nPlace [Coin] Scene [103] xy [-119] [86]\nPlace [Coin] Scene [103] xy [110] [63]\nPlace [Coin] Scene [103] xy [183] [-51]\nPlace [Coin] Scene [103] xy [-8] [-1]\nPlace [Coin] Scene [3] xy [-8] [136]\nPlace [Coin] Scene [3] xy [-63] [-98]\nPlace [Coin] Scene [3] xy [183] [-98]\nPlace [Green Flag] Scene [4] xy [-57] [33]\nPlace [Key 1] Scene [104] xy [148] [-51]\nPlace [Coin] Scene [105] xy [-78] [-61]\nPlace [Coin] Scene [105] xy [0] [30]\nPlace [Green Flag] Scene [105] xy [-178] [64]\nPlace [Coin] Scene [105] xy [149] [-60]\nPlace [Coin] Scene [106] xy [-124] [-38]\nPlace [Coin] Scene [106] xy [4] [-40]\nPlace [Coin] Scene [106] xy [137] [-83]\nPlace [Coin] Scene [108] xy [-102] [-81]\nPlace [Coin] Scene [108] xy [-25] [-81]\nPlace [Coin] Scene [108] xy [95] [-81]\nPlace [Green Flag] Scene [109] xy [149] [-61]\n\ndefine Place (costume name) Scene (scene) xy (x) (y)\nset [my scene v] to (scene)\nclear graphic effects\nswitch costume to (costume name)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\nset [my scene v] to []\n\nwhen I receive [set up v]\nif <key (e v) pressed?> then\n    hide list [collected v]\nend\n\nwhen I receive [reset game v]\ndelete this clone\n\n@Splash screen\n\nwhen flag clicked\nswitch costume to (main menu v)\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\n\nwhen I receive [game over v]\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\nbroadcast (Main menu v)\n\nwhen I receive [start game v]\nhide\n\n@Main Menu\n\nwhen I receive [main menu v]\nwait (0.1) seconds\ngo to [front v] layer\nset size to (10) %\nshow\ngo to x: (2) y: (-110)\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by ((0.2) * ((110) - (size)))\n    else\n        change size by ((0.2) * ((100) - (size)))\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nhide\nbroadcast (Start game v)\n\n@Enemy\n\nwhen flag clicked\nclear graphic effects\nset [speed y v] to [0]\nset rotation style [left-right v]\nhide\n\nwhen I receive [change scene v]\nif <(Scene #) = [0]> then\n    if <([x position v] of [player v]) < [0]> then\n        Spawn [Red] at [-195] [-145] dir [90]\n    else\n        Spawn [Red] at [-195] [-145] dir [90]\n    end\nend\nif <(Scene #) = [2]> then\n    if <([x position v] of [player v]) < [0]> then\n        Spawn [Red] at [149] [16] dir [-90]\n    else\n        Spawn [Red] at [22] [-55] dir [90]\n    end\n    if <([x position v] of [player v]) < [0]> then\n        Spawn [Red] at [208] [-19] dir [-90]\n    else\n        Spawn [Red] at [54] [-56] dir [90]\n    end\nend\nif <(Scene #) = [3]> then\n    if <([x position v] of [player v]) < [0]> then\n        Spawn [Red] at [-89] [-10] dir [90]\n    else\n        Spawn [Red] at [-90] [-10] dir [90]\n    end\nend\nif <(Scene #) = [107]> then\n    if <([x position v] of [player v]) < [0]> then\n        Spawn [Red] at [220] [-80] dir [-90]\n    else\n        Spawn [Red] at [61] [-79] dir [90]\n    end\nend\n\nwhen I start as a clone\nshow\nset [speed y v] to [0]\nset [frame v] to [0]\nforever\n    switch costume to (red1 v)\n    set rotation style [don't rotate v]\n    Move - Left or Right\n    Move - Down\n    change [frame v] by (0.33)\n    switch costume to ((1) + (([floor v] of (Frame) ) mod (4)))\n    set rotation style [left-right v]\n    if <<(Invulnerable) = [0]> and <touching (player v)?>> then\n        Touching Player\n    end\nend\n\nwhen I receive [about to change scene v]\ndelete this clone\n\ndefine Move - Down\nchange [speed y v] by (-1)\nchange y by (speed y)\nrepeat until <not <touching (level v)?>>\n    change y by (1)\n    set [speed y v] to [0]\nend\n\ndefine Move - Left or Right\nmove (2) steps\nrepeat (4)\n    if <not <<touching (level v)?> or <touching (danger v)?>>> then\n        if <not <<touching (_edge_ v)?> or <<touching (safe zones v)?> or <touching (platform v)?>>>> then\n            stop [this script v]\n        end\n    end\n    change y by (1)\nend\nchange y by (-4)\nmove (-2) steps\nturn right (180) degrees\n\ndefine Touching Player\nif <([speed y v] of [player v]) < [-3]> then\n    broadcast (Player - Bounce v)\n    start sound [Squish Pop v]\n    switch costume to (red squish v)\n    wait (0.3) seconds\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\nbroadcast (Loose life v)\n\ndefine Spawn (type) at (x) (y) dir (dir)\ngo to x: (x) y: (y)\npoint in direction (dir)\ncreate clone of (_myself_ v)\n\n@Safe Zones\n\nwhen flag clicked\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\ngo to [back v] layer\nshow\n\nwhen I receive [change scene v]\nswitch costume to (blank v)\nswitch costume to (join [Scene] (Scene #))\n\n