☁️Platformer for Scratchy☁️


@Stage\n\nwhen flag clicked\nset volume to (100) %\nshow list [achievements v]\nhide variable [☁ highscore v]\nshow list [projectlink v]\n\nwhen I receive [start game v]\nshow list [achievements v]\n\nwhen I receive [main menu v]\nshow list [projectlink v]\nshow list [achievements v]\nhide variable [strawberries v]\n\nwhen I receive [start game v]\nstop all sounds\nstop [other scripts in sprite v]\nforever\n    play sound [GamePlay v] until done\nend\n\nwhen I receive [game over v]\nstop all sounds\nstop [other scripts in sprite v]\nforever\n    hide variable [boss health v]\n    play sound [Menu v] until done\nend\n\nwhen I receive [change scene v]\nwait until <(Level) = [-89]>\nstop all sounds\nstop [other scripts in sprite v]\nforever\n    if <(Collected) = [0]> then\n        play sound [Boss Battle v] until done\n    else\n        stop [this script v]\n    end\nend\n\nwhen I receive [sound v]\nforever\n    set volume to ([x position v] of [button of slider1 v]) %\nend\n\nwhen I receive [cutscene v]\nshow list [achievements v]\nhide variable [time v]\nhide variable [strawberries v]\nhide variable [lives v]\nhide variable [level v]\n\nwhen I receive [reset once again v]\nbroadcast (MUSIC v)\n\nwhen I receive [main menu v]\nstop all sounds\nstop [other scripts in sprite v]\nforever\n    play sound [Menu v] until done\nend\n\nwhen I receive [achievments v]\nhide list [achievements v]\n\nwhen flag clicked\ndelete all of [achievements v]\nadd [???] to [achievements v]\nadd [???] to [achievements v]\nadd [???] to [achievements v]\nadd [???] to [achievements v]\nadd [???] to [achievements v]\nadd [???] to [achievements v]\nadd [???] to [achievements v]\nadd [???] to [achievements v]\nadd [???] to [achievements v]\nadd [???] to [achievements v]\nadd [???] to [achievements v]\n\nwhen I receive [cutscene v]\nwait (0) seconds\nstop all sounds\nstop [other scripts in sprite v]\nforever\n    play sound [Cutscene v] until done\nend\n\nwhen I receive [night v]\nstop all sounds\nstop [other scripts in sprite v]\nforever\n    play sound [Night v] until done\nend\n\nwhen I receive [day v]\nstop all sounds\nstop [other scripts in sprite v]\nforever\n    play sound [GamePlay v] until done\nend\n\nbroadcast (Wait v)\n\nwhen I receive [achievments v]\n\n@NO LAG\n\n@✨Scratchy✨\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        Colide 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        Colide 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]\n    stop [this script v]\nend\nset [touching v] to [0]\nset [hit costume v] to (costume [name v])\nif <touching (jump trough v)?> then\n    if <(Hit Costume) = [hitbox v2]> then\n        switch costume to (hitbox feet v)\n    end\n    if <(Jump Trough) < [1]> then\n        change y by (-6)\n        if <(Hit Costume) = [hitbox v2]> then\n            switch costume to (hitbox feet2 v)\n        end\n        if <touching (jump trough v)?> then\n            set [touching v] to [1]\n        else\n            set [jump trough v] to [1]\n        end\n        change y by (6)\n    end\nelse\n    set [jump trough v] to [0]\nend\nswitch costume to (Hit Costume)\n\nwhen I receive [tick - player 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 <<(Stick Button) > [0]> or <(Stick Y) > [0]>> 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        set [speed x v] to [0]\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 (Stick X)\nif <([abs v] of (Key X) ) < [0.2]> 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 size to (50) %\nset [invunerable v] to [0]\nset [wall slide v] to [0]\nset [jumping v] to [0]\nset [long jump v] to [0]\nset [speed y v] to [0]\nset [speed x v] to [0]\nset [falling v] to [99]\npoint in direction (90)\nBegin scene number (Spawn Scene) go to x,y: (Spawn X) (Spawn Y)\n\nwhen I receive [game loop v]\nforever\n    broadcast (Tick - First v)\n    broadcast (Tick - Platforms v)\n    broadcast (Tick - Player v)\n    add (x position) to [my values to send v]\n    add (y position) to [my values to send v]\n    add (costume [number v]) to [my values to send v]\n    add (direction) to [my values to send v]\n    add (Level) to [my values to send v]\n    broadcast (Cloud - Tick v)\n    broadcast (Tick - Last v)\nend\n\nwhen I receive [tick - last v]\nif <(x position) > [235]> then\n    Begin scene number ((Level) + (1)) go to x,y: [-235] []\nend\nif <(x position) < [-235]> then\n    Begin scene number ((Level) + (-1)) go to x,y: [235] []\nend\nif <(y position) > [180]> then\n    Begin scene number ((Level) + (100)) go to x,y: [] [-180]\nend\nif <(y position) < [-180]> then\n    Begin scene number ((Level) + (-100)) go to x,y: [] [180]\nend\nif <touching (danger v)?> then\n    broadcast (Lost life v)\nend\n\ndefine Begin scene number (scene number) go to x,y: (x) (y)\nset [level v] to (scene number)\nif <(x) > []> then\n    set x to (x)\nend\nif <(y) > []> then\n    set y to (y)\nend\nbroadcast (Change Scene v)\nbroadcast (Exit 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 colission in direction [0]\nelse\n    Fix colission in direction [90]\nend\nSet Costume\nbroadcast (Game loop v)\n\ndefine Fix colission in direction (dir)\nset [temp v] to (direction)\nset [distance v] to [1]\npoint in direction (dir)\nrepeat (1000000000000000000000000000)\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) > [8]> then\n    switch costume to ((1) + ([floor v] of ((Frame) mod (16)) ))\nelse\n    switch costume to (hit angle 0 v)\n    repeat (5)\n        Check touching solid\n        if <(Touching) < [1]> then\n            switch costume to ((costume [number v]) + (5))\n            stop [this script v]\n        end\n        next costume\n    end\n    switch costume to (stand v)\nend\n\nif <(SKIN CREEPER) = [0]> then\nend\n\ndefine Colide X Slope or Wall?\nchange y by (1)\nCheck Can Wall Slide\nCheck touching solid\nif <(Touching) > [0]> then\n    Check touching solid\n    if <(Touching) > [0]> then\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.75))\nend\nset [speed x v] to ((Speed X) * (0.75))\nSlip\n\ndefine Colide 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 [lost life v]\nset [invunerable v] to [1]\nstop [other scripts in sprite v]\nset rotation style [all around v]\nstart sound [Lose A Life v]\nif <(Ouch) = [0]> then\n    broadcast (Ouch. v)\n    replace item (5) of [achievements v] with [Ouch.]\nend\nrepeat (10)\n    turn right (15) degrees\n    change size by (-5)\n    wait (0.1) seconds\nend\nwait (0.5) seconds\nchange [lives v] by (-1)\nchange [ouch v] by (1)\nif <(Lives) > [0]> then\n    Reset and Begin level\nelse\n    if <(Full Defeat) = [0]> then\n        broadcast (Full Defeat v)\n        replace item (7) of [achievements v] with [Full Defeat]\n    end\n    broadcast (Game Over v)\n    change [full defeat v] by (1)\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 Closest Space To (x position) (y position) max [20]\n    if <(Touching) > [0]> then\n        broadcast (Lost life v)\n    end\nend\n\ndefine Find Closest 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]\nset volume to (100) %\nset [jump force v] to [12]\nset [acceleration v] to [1.5]\nset [resistance v] to [0.8]\nset [jump duration v] to [6]\nbroadcast (Reset Game v) and wait\nbroadcast (Setup v) and wait\nset [lives v] to [3]\nset [spawn scene v] to [1]\nset [spawn x v] to [-150]\nset [spawn y v] to [55]\nReset and Begin level\n\nwhen flag clicked\nbroadcast (Cloud - Setup v) and wait\nbroadcast (Main Menu v)\n\nwhen I receive [player - bounce v]\nset [speed y v] to [10]\n\nset [level v] to [10]\nbroadcast (Change Scene v)\n\nadd [Key 2] to [collected v]\n\nwhen I receive [player - bounce boss v]\nset [speed y v] to [15]\n\nwhen I receive [paper v]\nforever\n    go to [back v] layer\nend\n\nwhen I receive [sound2 v]\nforever\n    set volume to ([x position v] of [button of slider2 v]) %\nend\n\nwhen I receive [reset once again v]\nbroadcast (Cloud - Setup v) and wait\nbroadcast (Main Menu v)\n\nwhen flag clicked\nset [ouch v] to [0]\nset [full defeat v] to [0]\nset [nights v] to [0]\n\nwhen I receive [main menu v]\nset volume to (100) %\n\nwhen I receive [start game v]\nforever\n    Idle\nend\n\ndefine Idle\n\nbroadcast (ITSELF v)\n\nwhen I receive [itself v]\n\n\n\nwhen flag clicked\nset [skin creeper v] to [0]\n\nset [jump force v] to [15]\n\n@"CLOUD" Scratchy\n\ndefine Write Number (val) To Encoded String\nset [val v] to (round (val))\nif <(Val) < [0]> then\n    set [val v] to (join [0] ([abs v] of (Val) ))\nend\nset [encoded string v] to (join (Encoded String) (join (length of (Val)) (Val)))\n\ndefine Val = Read Number From "Encoded String"\nset [val v] to []\nrepeat (letter (Encoded IDX) of (Encoded String))\n    change [encoded idx v] by (1)\n    set [val v] to (join (Val) (letter (Encoded IDX) of (Encoded String)))\nend\nchange [encoded idx v] by (1)\nif <(letter (1) of (Val)) = [0]> then\n    set [val v] to ((0) - (Val))\nend\n\nwhen I receive [cloud - setup v]\nhide\nset [cloud tick v] to [0]\ndelete all of [my values to send v]\ndelete all of [cloud values v]\ndelete all of [player uids v]\ndelete all of [player data v]\nadd (join [c] (☁ Cloud 1)) to [cloud values v]\nadd (join [c] (☁ Cloud 2)) to [cloud values v]\nadd (join [c] (☁ Cloud 3)) to [cloud values v]\nadd (join [c] (☁ Cloud 4)) to [cloud values v]\nadd (join [c] (☁ Cloud 5)) to [cloud values v]\nadd (join [c] (☁ Cloud 6)) to [cloud values v]\nadd (join [c] (☁ Cloud 7)) to [cloud values v]\nadd (join [c] (☁ Cloud 8)) to [cloud values v]\nset [my player uid v] to (pick random (1) to (9999999))\nset [player # v] to []\n\nwhen I receive [cloud - tick v]\nif <(Player #) > []> then\n    Player Clone Tick\n    stop [this script v]\nend\nchange [cloud tick v] by (1)\nProcess Cloud Item [1] Value (join [c] (☁ Cloud 1))\nProcess Cloud Item [2] Value (join [c] (☁ Cloud 2))\nProcess Cloud Item [3] Value (join [c] (☁ Cloud 3))\nProcess Cloud Item [4] Value (join [c] (☁ Cloud 4))\nProcess Cloud Item [5] Value (join [c] (☁ Cloud 5))\nProcess Cloud Item [6] Value (join [c] (☁ Cloud 6))\nProcess Cloud Item [7] Value (join [c] (☁ Cloud 7))\nProcess Cloud Item [8] Value (join [c] (☁ Cloud 8))\nSend My Cloud Data After [4] Ticks\n\ndefine Send My Cloud Data After (count) Ticks\nset [color v] effect to (10)\nif <((Cloud Tick) mod (count)) > [0]> then\n    stop [this script v]\nend\nset [encoded string v] to []\nWrite Number (My Player UID) To Encoded String\nrepeat (length of [my values to send v])\n    Write Number (item (1) of [my values to send v]) To Encoded String\n    delete (1) of [my values to send v]\nend\nset [my channel v] to (pick random (1) to (length of [cloud values v]))\nif <(My Channel) < [5]> then\n    if <(My Channel) < [3]> then\n        if <(My Channel) < [2]> then\n            set [☁ cloud 1 v] to (Encoded String)\n        else\n            set [☁ cloud 2 v] to (Encoded String)\n        end\n    else\n        if <(My Channel) < [4]> then\n            set [☁ cloud 3 v] to (Encoded String)\n        else\n            set [☁ cloud 4 v] to (Encoded String)\n        end\n    end\nelse\n    if <(My Channel) < [7]> then\n        if <(My Channel) < [6]> then\n            set [☁ cloud 5 v] to (Encoded String)\n        else\n            set [☁ cloud 6 v] to (Encoded String)\n        end\n    else\n        if <(My Channel) < [8]> then\n            set [☁ cloud 7 v] to (Encoded String)\n        else\n            set [☁ cloud 8 v] to (Encoded String)\n        end\n    end\nend\n\ndefine Process Cloud Item (which?) Value (new value)\nif <(new value) = (item (which?) of [cloud values v])> then\n    stop [this script v]\nend\nreplace item (which?) of [cloud values v] with (new value)\nset [encoded string v] to (new value)\nset [encoded idx v] to [2]\nVal = Read Number From "Encoded String"\nif <<(Val) < [1]> or <(Val) = (My Player UID)>> then\n    stop [this script v]\nend\nset [player # v] to (item # of (Val) in [player uids v])\nif <(Player #) = [0]> then\n    set [player # v] to (item # of [] in [player uids v])\n    if <(Player #) = [0]> then\n        add (Val) to [player uids v]\n        add [] to [player data v]\n        set [player # v] to (length of [player data v])\n        create clone of (_myself_ v)\n    else\n        replace item (Player #) of [player uids v] with (Val)\n    end\nend\nreplace item (Player #) of [player data v] with (new value)\nset [player # v] to []\n\ndefine Player Clone Tick\nif <(Encoded IDX) > (length of (Encoded String))> then\n    Get Next Data Packet\n    if <(Encoded String) = []> then\n        change [inactive v] by (1)\n        if <(Inactive) > [150]> then\n            replace item (Player #) of [player uids v] with []\n            hide\n        end\n        stop [this script v]\n    end\nend\nset [inactive v] to [0]\nVal = Read Number From "Encoded String"\nset x to (Val)\nVal = Read Number From "Encoded String"\nset y to (Val)\nVal = Read Number From "Encoded String"\nswitch costume to (Val)\nVal = Read Number From "Encoded String"\npoint in direction (Val)\nVal = Read Number From "Encoded String"\nset [clone level v] to (Val)\nif <(Clone Level) = (Level)> then\n    show\nelse\n    hide\nend\n\ndefine Get Next Data Packet\nset [encoded string v] to (item (Player #) of [player data v])\nreplace item (Player #) of [player data v] with []\nset [encoded idx v] to [2]\nVal = Read Number From "Encoded String"\n\nbroadcast (Cloud - Setup v) and wait\nforever\n    add (x position) to [my values to send v]\n    add (y position) to [my values to send v]\n    broadcast (Cloud - Tick v)\nend\n\nwhen I receive [change scene v]\nif <(Player #) > []> then\n    if <(Clone Level) = (Level)> then\n        show\n    else\n        hide\n    end\nend\n\n@Level\n\nwhen I receive [change scene v]\nswitch costume to (join [Scene] (Level))\ngo to x: (0) y: (20)\nerase all\nStamp Shadow\nStamp Outline\n\ndefine Stamp Shadow\nset [brightness v] effect to (-100)\nset [ghost v] effect to (80)\nstamp\nchange y by (-20)\nclear graphic effects\n\nwhen I receive [change scene v]\n\nerase all\n\nchange y by (20)\n\nset [brightness v] effect to (-100)\n\nchange y by (3)\n\nchange y by (-3)\nclear graphic effects\n\nstamp\n\nchange y by (-3)\n\nchange y by (3)\n\ndefine Stamp Outline\nset rotation style [don't rotate v]\nset [brightness v] effect to (-100)\nrepeat (8)\n    move (3) steps\n    stamp\n    move (-3) steps\n    turn right (45) degrees\nend\nclear graphic effects\n\nwhen flag clicked\nforever\n    set [distance from scratchy v] to (distance to [✨scratchy✨ v])\nend\n\nbroadcast (Change Scene v)\nset [level v] to [-101]\n\nset [level v] to [-89]\nbroadcast (Change Scene v)\n\nwhen I receive [start game v]\nreset timer\nforever\n    set [time v] to (timer)\nend\n\nset [strawberries v] to [10]\n\n@Danger\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\n\nwhen I receive [change scene v]\nswitch costume to (blank v)\nswitch costume to (join [Scene] (Level))\nif <(Level) = [0]> then\n    forever\n        set y to ((10) * ([sin v] of ((timer) * (100)) ))\n    end\nend\nif <(Level) = [5]> then\n    forever\n        set y to ((5) * ([sin v] of ((timer) * (260)) ))\n    end\nend\nif <(Level) = [3]> then\n    forever\n        set y to ((5) * ([sin v] of ((timer) * (180)) ))\n    end\nend\nif <(Level) = [2]> then\n    forever\n        set y to ((15) * ([sin v] of ((timer) * (60)) ))\n    end\nend\n\n@Platform\n\nwhen I receive [change scene v]\nhide\nif <(Level) = [-01]> then\n    Spawn [Key ???] at [63] [-105] dir [90] turn []\nend\nif <(Level) = [10]> then\n    Spawn [Key Boss] at [11] [-75] dir [90] turn []\nend\nif <(Level) = [7]> then\n    Spawn [Key 2] at [203] [83] dir [90] turn []\nend\nif <(Level) = [4]> then\n    Spawn [Key 1] at [207] [93] dir [90] turn []\nend\nif <(Level) = [3]> then\n    show\n    Animate Platform\nend\nif <(Level) = [1]> then\n    show\n    Animate 2\nend\nif <(Level) = [0]> then\n    Spawn [Platform Norm] at [90] [30] dir [90] turn [3]\n    Spawn [Platform Rotating] at [-20] [30] dir [90] turn [2]\n    Spawn [Platform Rotating] at [-120] [30] dir [90] turn [1]\nend\nif <(Level) = [110]> then\n    Spawn [Platform Rotating] at [-20] [4] dir [90] turn [1]\n    Spawn [Platform Rotating] at [-59] [64] dir [90] turn [2]\n    Spawn [Platform Rotating] at [-116] [110] dir [90] turn [3]\nend\n\ndefine Animate Platform\ngo to x: (-40) y: (140)\nswitch costume to (platform norm v)\nforever\n    glide (2) secs to x: (-40) y: (-3)\n    glide (2) secs to x: (-40) y: (140)\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 (✨scratchy✨ v)?> then\n        Rotation Maths CCW ((0) - (Turn))\n    end\nelse\n    if <(new y) > (last y)> then\n        change y by (1)\n    else\n        set y to ((last y) + (1))\n    end\n    if <touching (✨scratchy✨ 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 x: (194) y: (21)\nswitch costume to (smasher v)\nforever\n    glide (2) secs to x: (194) y: (127)\n    wait (1) seconds\n    glide (1) secs to x: (194) y: (21)\n    wait (0.5) seconds\nend\n\nwhen I receive [lost life v]\nstop [other scripts in sprite v]\n\ndefine Door at (x) (y) key (key name)\nshow\nswitch costume to (key name)\ngo to x: (x) y: (y)\nforever\n    if <not <(Level) = [10]>> then\n        wait until <touching (✨scratchy✨ v)?>\n        if <[collected v] contains (key name)?> then\n            if <not <(costume [name v]) = [Key ???]>> then\n                start sound [Open v]\n            end\n            repeat (24)\n                change y by (4)\n            end\n            wait (1) seconds\n            if <not <(costume [name v]) = [Key ???]>> then\n                start sound [Open v]\n            end\n            repeat (24)\n                change y by (-4)\n            end\n            if <not <(costume [name v]) = [Key ???]>> then\n                start sound [Locked v]\n            end\n        else\n            if <<(DOOR SMASHED) = [0]> and <not <(costume [name v]) = [Key ???]>>> then\n                replace item (3) of [achievements v] with [KEY!!!!!!]\n                broadcast (KEY!!!!!!! v)\n            end\n            change [door smashed v] by (1)\n            if <not <(costume [name v]) = [Key ???]>> then\n                start sound [Closed v]\n            end\n        end\n        wait until <not <touching (✨scratchy✨ v)?>>\n    else\n        wait until <touching (✨scratchy✨ v)?>\n        if <[collected v] contains (key name)?> then\n            start sound [Open v]\n            repeat (24)\n                change x by (4)\n            end\n            wait (1) seconds\n            start sound [Open v]\n            repeat (24)\n                change x by (-4)\n            end\n            start sound [Locked v]\n        else\n            start sound [Closed v]\n        end\n        wait until <not <touching (✨scratchy✨ v)?>>\n    end\nend\n\ndefine Animate 0\nshow\npoint in direction (90)\nforever\n    glide (1) secs to x: (x position) y: ((y position) - (60))\n    wait (0) seconds\n    glide (1) secs to x: (x position) y: ((y position) + (60))\n    wait (0) seconds\nend\n\nwhen flag clicked\nhide\nset rotation style [left-right v]\n\nwhen I receive [exit 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 1]?> then\n    Door at (x position) (y position) key (costume [name v])\nend\nif < (costume [name v]) contains [Key 2]?> then\n    Door at (x position) (y position) key (costume [name v])\nend\nif < (costume [name v]) contains [Key Boss]?> then\n    Door at (x position) (y position) key (costume [name v])\nend\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\nif <(Level) = [1]> then\n    Animate 2\nend\nif <(Level) = [3]> then\n    Animate Platform\nend\nif <(Level) = [0]> then\n    Animate 0\nend\n\ngo to x: (-20) y: (50)\n\ndefine Rotation Maths CCW (ccw)\nif <<not <(Level) = [10]>> and <not <(Level) = [3]>>> then\n    set [dx v] to (([x position v] of [✨scratchy✨ v]) - (x position))\n    set [dy v] to (([x position v] of [✨scratchy✨ v]) - (y position))\n    set [sin v] to ([sin v] of (ccw) )\n    set [cos v] to ([cos v] of (ccw) )\n    set [platform dx v] to ((((DX) * (cos)) - ((DY) * (sin))) - (DX))\n    set [platform dy v] to ((((DX) * (sin)) + ((DY) * (cos))) - (DY))\nend\n\nwhen I receive [change scene v]\ndelete this clone\n\nwhen flag clicked\nset [door smashed v] to [0]\n\nwhen I receive [sound2 v]\nforever\n    set volume to ([x position v] of [button of slider2 v]) %\nend\n\n@Chompie\n\nwhen flag clicked\nhide\nset rotation style [left-right v]\n\nwhen I start as a clone\nclear graphic effects\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 And 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 <<(Invunerable) = [0]> and <touching (✨scratchy✨ v)?>> then\n        Touching Player\n    end\nend\n\nwhen I receive [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)?> or <<touching (platform v)?> or <touching (jump trough v)?>>>>\n    change y by (1)\n    set [speed y v] to [0]\nend\n\ndefine Move - Left And Right\nif <not <([direction v] of [✨scratchy✨ v]) = (direction)>> then\n    move (4) steps\nelse\n    move (2) steps\nend\nrepeat (4)\n    if <not <<<touching (level v)?> or <touching (_edge_ v)?>> or <<touching (safe zones v)?> or <<touching (platform v)?> or <touching (jump trough v)?>>>>> then\n        stop [this script v]\n    end\n    change y by (1)\nend\nchange y by (-4)\nif <not <([direction v] of [✨scratchy✨ v]) = (direction)>> then\n    move (-4) steps\nelse\n    move (-2) steps\nend\nturn right (180) degrees\n\ndefine Touching Player\nif <([speed y v] of [✨scratchy✨ v]) < [-3]> then\n    broadcast (Player - Bounce v)\n    broadcast (Squished! v)\n    start sound [Death v]\n    switch costume to (red squished v)\n    wait (0.3) seconds\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\nbroadcast (Lost 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\nwhen flag clicked\n\nwhen I receive [change scene v]\nif <(Level) = [1]> then\n    Spawn [Red] at [0] [-77] dir [-90]\nend\nif <(Level) = [101]> then\n    Spawn [Red] at [-182] [-56] dir [90]\nend\nif <(Level) = [10]> then\n    Spawn [Red] at [0] [0] dir [-90]\nend\nif <(Level) = [109]> then\n    Spawn [Red] at [-200] [-21] dir [90]\n    Spawn [Red] at [-100] [-32] dir [90]\n    Spawn [Red] at [0] [0] dir [90]\n    Spawn [Red] at [50] [-32] dir [90]\n    Spawn [Red] at [100] [-21] dir [90]\nend\nif <(Level) = [-89]> then\n    wait (1) seconds\n    Spawn [Red] at [0] [-21] dir [-90]\n    wait (1.5) seconds\n    Spawn [Red] at [0] [-32] dir [90]\nend\n\nwhen I receive [squished! v]\n\nwhen flag clicked\nset [squished? v] to [0]\n\nwhen I receive [change scene v]\nset [squished? v] to [0]\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [1]> then\n        play sound [Chomp v] until done\n    end\nend\n\nwhen I receive [boss died v]\nstart sound [Death v]\nswitch costume to (red squished v)\nwait (0.3) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I receive [game over v]\ndelete this clone\n\nwhen I receive [sound2 v]\nforever\n    set volume to ([x position v] of [button of slider2 v]) %\nend\n\nSpawn [Worm] at [0] [-77] dir [-90]\n\n@Collectibles\n\nwhen I receive [change scene v]\ngo to [back v] layer\nif <(Level) = (My Scene)> then\n    show\nelse\n    hide\nend\n\nwhen I start as a clone\ngo to [front v] layer\nclear graphic effects\nrepeat until <touching (✨scratchy✨ 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]) = [+1]> then\n    if <(Extra Healths) = [0]> then\n        broadcast (Extra Health v)\n        replace item (6) of [achievements v] with [Extra Health]\n    end\n    start sound [Toy Zing v]\n    change [extra healths v] by (1)\n    change [lives v] by (1)\nend\nif <(costume [name v]) = [Key Boss]> then\n    start sound [Laugh v]\n    add (costume [name v]) to [collected v]\nend\nif <(costume [name v]) = [strawberry-BIG]> then\n    start sound [Chomp2 v]\n    change [strawberries v] by (5)\n    broadcast (Secret Loot! v)\n    replace item (4) of [achievements v] with [Secret Loot!]\nend\nif <(costume [name v]) = [strawberry-a]> then\n    if <(Collected Times 2) = [0]> then\n        broadcast (Chomp! v)\n        replace item (1) of [achievements v] with [Chomp!]\n    end\n    start sound [Chomp v]\n    change [strawberries v] by (1)\n    change [collected times 2 v] by (1)\nelse\n    if <(costume [name v]) = [CheckPoint]> then\n        if <(Collected Times) = [0]> then\n            replace item (2) of [achievements v] with [CheckPointing]\n            broadcast (CheckPointing v)\n        end\n        change [collected times v] by (1)\n        start sound [CheckPoint v]\n        set [spawn scene v] to (Level)\n        set [spawn x v] to ([x position v] of [✨scratchy✨ v])\n        set [spawn y v] to ([x position v] of [✨scratchy✨ v])\n    else\n        if <(costume [name v]) = [Key ???]> then\n            broadcast (PAPER FALL v)\n        end\n        if << (costume [name v]) contains [Key]?> and <not <(costume [name v]) = [Key Boss]>>> then\n            start sound [Key v]\n            add (costume [name v]) to [collected v]\n        end\n    end\nend\nrepeat (20)\n    change y by (2)\n    change size by (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [setup v]\ndelete all of [collected v]\nset [frame v] to [0]\nset [strawberries v] to [0]\nhide\nPlace [+1] scene [-90] x y [0] [0]\nPlace [CheckPoint] scene [-89] x y [-200] [0]\nPlace [strawberry-BIG] scene [-1] x y [-98] [-17]\nPlace [Key ???] scene [100] x y [0] [0]\nPlace [+1] scene [-1] x y [100] [50]\nPlace [strawberry-a] scene [99] x y [1] [-9]\nPlace [strawberry-a] scene [99] x y [142] [45]\nPlace [strawberry-a] scene [1] x y [1] [-9]\nPlace [strawberry-a] scene [1] x y [197] [-5]\nPlace [strawberry-a] scene [101] x y [-144] [-11]\nPlace [strawberry-a] scene [101] x y [213] [118]\nPlace [Key 1] scene [101] x y [35] [91]\nPlace [strawberry-a] scene [2] x y [-71] [118]\nPlace [strawberry-a] scene [2] x y [122] [126]\nPlace [strawberry-a] scene [102] x y [182] [-73]\nPlace [strawberry-a] scene [102] x y [223] [89]\nPlace [strawberry-a] scene [3] x y [-146] [146]\nPlace [strawberry-a] scene [3] x y [207] [74]\nPlace [strawberry-a] scene [103] x y [144] [-74]\nPlace [strawberry-a] scene [103] x y [-83] [109]\nPlace [strawberry-a] scene [4] x y [166] [76]\nPlace [CheckPoint] scene [4] x y [-31] [131]\nPlace [strawberry-a] scene [104] x y [17] [86]\nPlace [strawberry-a] scene [104] x y [38] [-141]\nPlace [strawberry-a] scene [5] x y [97] [63]\nPlace [strawberry-a] scene [5] x y [217] [117]\nPlace [Key 2] scene [105] x y [46] [-39]\nPlace [CheckPoint] scene [105] x y [202] [101]\nPlace [strawberry-a] scene [105] x y [99] [108]\nPlace [strawberry-a] scene [6] x y [60] [50]\nPlace [strawberry-a] scene [6] x y [4] [117]\nPlace [strawberry-a] scene [106] x y [-128] [-8]\nPlace [strawberry-a] scene [106] x y [220] [31]\nPlace [strawberry-a] scene [7] x y [11] [109]\nPlace [strawberry-a] scene [7] x y [119] [-31]\nPlace [strawberry-a] scene [107] x y [-64] [41]\nPlace [strawberry-a] scene [107] x y [39] [-133]\nPlace [strawberry-a] scene [8] x y [-69] [33]\nPlace [strawberry-a] scene [8] x y [-93] [80]\nPlace [CheckPoint] scene [8] x y [190] [-31]\nPlace [strawberry-a] scene [108] x y [193] [-1]\nPlace [strawberry-a] scene [108] x y [-120] [-2]\nPlace [strawberry-a] scene [10] x y [147] [-29]\nPlace [strawberry-a] scene [10] x y [9] [9]\nPlace [strawberry-a] scene [109] x y [206] [0]\nPlace [strawberry-a] scene [109] x y [93] [29]\nPlace [Key Boss] scene [109] x y [-120] [29]\nPlace [CheckPoint] scene [110] x y [0] [0]\nPlace [strawberry-a] scene [110] x y [9] [9]\nPlace [strawberry-a] scene [110] x y [-216] [0]\nPlace [strawberry-a] scene [110] x y [-115] [157]\n\ndefine Place (costume name) scene (scene) x y (x) (y)\nset [my scene v] to (scene)\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 [reset game v]\ndelete this clone\n\nwhen I receive [game over v]\ndelete this clone\n\nwhen I receive [sound2 v]\nforever\n    set volume to ([x position v] of [button of slider2 v]) %\nend\n\nwhen flag clicked\nset [collected times v] to [0]\nset [collected times 2 v] to [0]\nset [extra healths v] to [0]\n\nwhen flag clicked\nset volume to (100) %\n\n@Screen Splash\n\nwhen I receive [game over v]\nswitch costume to (game over! v)\ngo to [front v] layer\nshow\nrepeat (9)\n    change size by (10)\n    change [ghost v] effect by (-15)\nend\nbroadcast (Main Menu v)\n\nwhen I receive [start game v]\ngo to x: (35) y: (9)\nset [ghost v] effect to (100)\nset size to (10) %\nhide\n\nwhen flag clicked\npoint in direction (90)\ngo to x: (35) y: (10)\nset [ghost v] effect to (100)\nset size to (10) %\nswitch costume to (main menu v)\ngo to [front v] layer\nshow\nrepeat (9)\n    change size by (10)\n    change [ghost v] effect by (-15)\nend\nforever\n    repeat (15)\n        turn right (0.1) degrees\n    end\n    repeat (15)\n        turn left (0.1) degrees\n    end\n    repeat (15)\n        turn left (0.1) degrees\n    end\n    repeat (15)\n        turn right (0.1) degrees\n    end\nend\n\nwhen I receive [reset once again v]\nstop [other scripts in sprite v]\npoint in direction (90)\ngo to x: (35) y: (10)\nset [ghost v] effect to (100)\nset size to (10) %\nswitch costume to (main menu v)\ngo to [front v] layer\nshow\nrepeat (9)\n    change size by (10)\n    change [ghost v] effect by (-15)\nend\nforever\n    repeat (15)\n        turn right (0.1) degrees\n    end\n    repeat (15)\n        turn left (0.1) degrees\n    end\n    repeat (15)\n        turn left (0.1) degrees\n    end\n    repeat (15)\n        turn right (0.1) degrees\n    end\nend\n\n@Main Menu\n\nwhen I receive [main menu v]\nset size to (5) %\nset [h or s v] to [0]\npoint in direction (90)\nwait (2.5) seconds\ngo to [front v] layer\nswitch costume to (play v)\nshow\ngo to x: (150) y: (0)\nforever\n    repeat (15)\n        turn right (0.5) degrees\n    end\n    repeat (15)\n        turn left (0.5) degrees\n    end\n    repeat (15)\n        turn left (0.5) degrees\n    end\n    repeat (15)\n        turn right (0.5) degrees\n    end\nend\n\nwhen flag clicked\nset [level v] to [1]\nhide\n\nwhen this sprite clicked\nset size to (5) %\nhide\nbroadcast (Start Game v)\nstart sound [Connect v]\nstop [other scripts in sprite v]\n\nwhen I receive [main menu v]\nset size to (5) %\nset [h or s v] to [0]\nwait (2.5) seconds\ngo to [front v] layer\nswitch costume to (play v)\nshow\ngo to x: (150) y: (0)\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 I receive [how to play v]\nforever\n    if <touching (how to play instruction v)?> then\n        hide\n    end\nend\n\nwhen I receive [settings v]\nforever\n    if <touching (settings menu v)?> then\n        hide\n    end\nend\n\nwhen I receive [achievments v]\nforever\n    if <touching (achievements menu v)?> then\n        hide\n    end\nend\n\nwait (2.5) seconds\n\nwhen I receive [more epic games v]\nforever\n    if <touching (endscreen v)?> then\n        hide\n    end\nend\n\nwhen I receive [skins v]\nforever\n    if <touching (skins menu v)?> then\n        hide\n    end\nend\n\nwhen I receive [credit v]\nforever\n    if <touching (credit background v)?> then\n        hide\n    end\nend\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\n\nwhen I receive [change scene v]\nswitch costume to (blank v)\nswitch costume to (join [Scene ] (Level))\n\n@detector\n\nwhen flag clicked\ngo to [front v] layer\npoint in direction (90)\nhide\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 (0.5) seconds\nshow\ngo to x: (0) y: (-100)\nreset timer\nswitch costume to (pick random (1) to (4))\nset [ghost v] effect to (100)\ngo [forward v] (2000) layers\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            wait (0.2) seconds\n            if <touching (mouse-pointer v)?> then\n                set [loved__ v] to [1]\n            end\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            wait (0.2) seconds\n            if <touching (mouse-pointer v)?> then\n                set [faved___ v] to [1]\n            end\n        end\n    end\nend\n\n@Jump Trough\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\n\nwhen I receive [change scene v]\nswitch costume to (blank v)\nswitch costume to (join [Scene] (Level))\ngo to x: (0) y: (20)\nStamp Shadow\nStamp Outline\n\ndefine Stamp Shadow\nset [brightness v] effect to (-100)\nset [ghost v] effect to (80)\nstamp\nchange y by (-20)\nclear graphic effects\n\nwhen I receive [change scene v]\n\nerase all\n\nchange y by (20)\n\nset [brightness v] effect to (-100)\n\nchange y by (3)\n\nchange y by (-3)\nclear graphic effects\n\nstamp\n\nchange y by (-3)\n\nchange y by (3)\n\ndefine Stamp Outline\nset rotation style [don't rotate v]\nset [brightness v] effect to (-100)\nrepeat (8)\n    move (3) steps\n    stamp\n    move (-3) steps\n    turn right (45) degrees\nend\nclear graphic effects\n\n@Stick\n\ndefine Keyboard\nset [stick x v] to <<key (right arrow v) pressed?> or <key (d v) pressed?>>\nchange [stick x v] by ((0) - <<key (left arrow v) pressed?> or <key (a v) pressed?>>)\nset [stick y v] to <<key (up arrow v) pressed?> or <key (w v) pressed?>>\nchange [stick y v] by ((0) - <<key (down arrow v) pressed?> or <key (s v) pressed?>>)\nif <key (space v) pressed?> then\n    change [stick button v] by (1)\nelse\n    set [stick button v] to [0]\nend\n\ndefine Stick Activated\ngo to (mouse-pointer v)\nswitch costume to (base active v)\ncreate clone of (_myself_ v)\nswitch costume to (stick v)\ncreate clone of (_myself_ v)\nswitch costume to (base active v)\nset [brightness v] effect to (40)\nset [stick button v] to []\nrepeat until <(distance to [mouse-pointer v]) > ((size) * (1.5))>\n    Detect Stick Movement\n    Detect Stick Button\nend\nbroadcast (Deactivate Stick v)\n\ndefine Detect Stick Movement\nset [stick x v] to (((mouse x) - (x position)) / (Range))\nset [stick y v] to (((mouse y) - (y position)) / (Range))\nif <([abs v] of (Stick X) ) > [1]> then\n    set [stick x v] to ((Stick X) / ([abs v] of (Stick X) ))\nend\nif <([abs v] of (Stick Y) ) > [1]> then\n    set [stick y v] to ((Stick Y) / ([abs v] of (Stick Y) ))\nend\n\ndefine Detect Stick Button\nif <mouse down?> then\n    if <(Stick Button) > []> then\n        change [stick button v] by (1)\n    end\nelse\n    set [stick button v] to [0]\nend\n\nwhen I receive [deactivate stick v]\ndelete this clone\n\nwhen I start as a clone\nif <(costume [name v]) = [Stick]> then\n    go [forward v] (1) layers\n    set [ghost v] effect to (0)\n    forever\n        go to (stick v)\n        change x by ((Stick X) * (Range))\n        change y by ((Stick Y) * (Range))\n    end\nend\ngo to x: (168) y: (-130)\nwait until <not <mouse down?>>\nswitch costume to (base active v)\nforever\n    if <mouse down?> then\n        set [ghost v] effect to (25)\n    else\n        set [ghost v] effect to (75)\n    end\nend\n\nwhen I receive [game over v]\nhide\n\nwhen I receive [start game v]\nshow\n\nwhen I receive [cutscene v]\ngo to [back v] layer\n\nwhen I receive [main menu v]\nhide\ngo to [front v] layer\nset size to (80) %\nset [ghost v] effect to (20)\nset [range v] to ((size) / (2.5))\nforever\n    set [brightness v] effect to (0)\n    switch costume to (base v)\n    go to x: (-168) y: (-130)\n    repeat until <not <mouse down?>>\n        Keyboard\n    end\n    repeat until <mouse down?>\n        Keyboard\n    end\n    if <(distance to [mouse-pointer v]) < (size)> then\n        Stick Activated\n    end\nend\n\nwhen I receive [start game v]\ndelete this clone\n\nwhen flag clicked\nforever\n    if <(Mob?) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(Mob?) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\n@King Of Chompies\n\nwhen flag clicked\nhide\nset rotation style [left-right v]\n\nwhen I start as a clone\nclear graphic effects\nshow\nset [speed y v] to [0]\nset [frame v] to [0]\nforever\n    switch costume to (king1 v)\n    set rotation style [don't rotate v]\n    Move - Left And 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 <<(Invunerable) = [0]> and <touching (✨scratchy✨ v)?>> then\n        Touching Player\n    end\nend\n\nwhen I receive [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)?> or <<touching (platform v)?> or <touching (jump trough v)?>>>>\n    change y by (1)\n    set [speed y v] to [0]\nend\n\ndefine Move - Left And Right\nif <not <([x position v] of [✨scratchy✨ v]) = (direction)>> then\n    move (3) steps\nelse\n    move (4) steps\nend\nrepeat (4)\n    if <not <<<touching (level v)?> or <touching (_edge_ v)?>> or <<touching (safe zones v)?> or <<touching (platform v)?> or <touching (jump trough v)?>>>>> then\n        stop [this script v]\n    end\n    change y by (1)\nend\nchange y by (-4)\nif <not <([x position v] of [✨scratchy✨ v]) = (direction)>> then\n    move (-4) steps\nelse\n    move (-2) steps\nend\nturn right (180) degrees\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\nwhen I receive [change scene v]\nif <(Level) = [-89]> then\n    if <(Enterned) = [0]> then\n        broadcast (Fight Time v)\n        replace item (9) of [achievements v] with [Fight Time]\n    end\n    change [enterned v] by (1)\n    Spawn [King] at [0] [-77] dir [-90]\nend\n\nSpawn [Red] at [20] [-32] dir [90]\nSpawn [Red] at [-70] [-21] dir [90]\nSpawn [Red] at [-50] [-32] dir [90]\n\nwhen I receive [change scene v]\nset [squished? v] to [0]\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [1]> then\n        play sound [Crunch v] until done\n    end\nend\n\nif <(Level) = [101]> then\n    Spawn [Red] at [-182] [-56] dir [90]\nend\nif <(Level) = [10]> then\n    Spawn [Red] at [0] [0] dir [-90]\nend\nif <(Level) = [109]> then\n    Spawn [Red] at [-200] [-21] dir [90]\n    Spawn [Red] at [-100] [-32] dir [90]\n    Spawn [Red] at [0] [0] dir [90]\n    Spawn [Red] at [50] [-32] dir [90]\n    Spawn [Red] at [100] [-21] dir [90]\nend\n\nwhen I receive [change scene v]\nset [boss health v] to [5]\n\ndefine Touching Player\nif <([speed y v] of [no lag v]) < [-1]> then\n    start sound [Hit v]\n    broadcast (Player - Bounce Boss v)\n    change [boss health v] by (-1)\n    wait until <not <touching (✨scratchy✨ v)?>>\nend\nif <<touching (✨scratchy✨ v)?> and <not <([x position v] of [✨scratchy✨ v]) < [-1]>>> then\n    broadcast (Lost life v)\nend\n\nwhen I start as a clone\nforever\n    if <(Boss Health) = [0]> then\n        broadcast (Player - Bounce Boss v)\n        switch costume to (king squished v)\n        start sound [Death v]\n        wait (0.3) seconds\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        broadcast (Boss Died v)\n        delete this clone\n    end\nend\n\nbroadcast (Player - Bounce Boss v)\nswitch costume to (king squished v)\nstart sound [Death v]\nwait (0.3) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nbroadcast (Boss Died v)\ndelete this clone\n\nchange [strawberries v] by (10)\n\nset [boss health v] to [0]\n\nwhen I receive [sound2 v]\nforever\n    set volume to ([x position v] of [button of slider2 v]) %\nend\n\nset [boss health v] to [5]\n\nwhen flag clicked\nset [enterned v] to [0]\n\n@Piece of paper\n\nwhen I receive [boss died v]\nforever\n    repeat until <touching (level v)?>\n        change y by (-2)\n    end\n    forever\n        if <touching (✨scratchy✨ v)?> then\n            set [collected v] to [1]\n            broadcast (Paper v)\n            hide\n        end\n    end\nend\n\nwhen I receive [change scene v]\ngo to x: (0) y: (126)\nhide\n\nwhen flag clicked\nforever\n    if <<<(Boss Health) < [1]> and <not <(Boss Health) = [5]>>> and <(Collected) = [0]>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [main menu v]\nset [collected v] to [0]\ngo to x: (0) y: (126)\nhide\n\n@Paper\n\nwhen flag clicked\nset [paper? v] to [0]\nhide\nset size to (10) %\n\nwhen I receive [paper v]\nset [paper? v] to [1]\nset size to (10) %\nclear graphic effects\nshow\nswitch costume to (page 1 v)\nstart sound [Page Turning v]\nrepeat (12)\n    change size by (10)\nend\nwait until <<key (space v) pressed?> or <<touching (mouse-pointer v)?> and <mouse down?>>>\nstart sound [Page Turning v]\nswitch costume to (page 2 v)\nwait (3) seconds\nrepeat (100)\n    change [ghost v] effect by (1)\nend\nwait (1) seconds\nbroadcast (CUTSCENE v)\n\nwhen I receive [sound2 v]\nforever\n    set volume to ([x position v] of [button of slider2 v]) %\nend\n\n@Darkness\n\nwhen I receive [start game v]\nset [night? v] to [0]\ngo to [front v] layer\nswitch backdrop to (day v)\nset [ghost v] effect to (100)\nforever\n    wait (60) seconds\n    if <(Nights) = [0]> then\n        replace item (8) of [achievements v] with [Night!]\n        broadcast (Night! v)\n    end\n    set [night? v] to [1]\n    change [nights v] by (1)\n    broadcast (Night v)\n    repeat (60)\n        change [ghost v] effect by (-1)\n    end\n    wait (60) seconds\n    broadcast (Day v)\n    set [night? v] to [0]\n    repeat (60)\n        change [ghost v] effect by (1)\n    end\nend\n\nwhen I receive [night v]\nswitch backdrop to (night1 v)\nwait (0.1) seconds\nswitch backdrop to (night2 v)\nwait (0.1) seconds\nswitch backdrop to (night3 v)\nwait (0.1) seconds\nswitch backdrop to (night4 v)\nwait (0.1) seconds\nswitch backdrop to (night5 v)\n\nwait (0.5) seconds\n\nwhen I receive [day v]\nswitch backdrop to (night5 v)\nwait (0.1) seconds\nswitch backdrop to (night4 v)\nwait (0.1) seconds\nswitch backdrop to (night3 v)\nwait (0.1) seconds\nswitch backdrop to (night2 v)\nwait (0.1) seconds\nswitch backdrop to (night1 v)\nwait (0.1) seconds\nswitch backdrop to (day v)\n\nwhen flag clicked\nset [nights v] to [0]\n\nwhen I receive [cutscene v]\nstop [other scripts in sprite v]\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\n@Score\n\nwhen flag clicked\nhide\ngo to x: (-7) y: (-79)\nset [index v] to [1]\n\nwhen I start as a clone\nshow\ngo to [front v] layer\nforever\n    if <not <<key (space v) pressed?> or <mouse down?>>> then\n        switch costume to (join [Glow-] (letter (index) of (Strawberries)))\n        set x to ((((index) - (0.5)) - ((length of (Score)) / (2))) * ((size) / (2)))\n    else\n        delete this clone\n    end\nend\n\nwhen I receive [paper v]\nrepeat (2)\n    create clone of (_myself_ v)\n    change x by ((size) / (2))\n    change [index v] by (1)\nend\n\nwhen I receive [start v]\ndelete this clone\n\nwhen I receive [die v]\nhide\n\n@Arrow\n\nwhen flag clicked\nhide\n\nwhen I receive [boss died v]\ngo to x: (4) y: (90)\nwait (2) seconds\nshow\nforever\n    if <not <(Boss Health) = [5]>> then\n        repeat (10)\n            change y by (1)\n        end\n        repeat (10)\n            change y by (-1)\n        end\n        start sound [Small Cowbell v]\n    end\nend\n\nwhen I receive [paper v]\nhide\n\nwhen I receive [boss died v]\nforever\n    if <<<(Level) = [-89]> and <(Paper?) = [0]>> and <(Boss Health) < [1]>> then\n        wait (2) seconds\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [sound2 v]\nforever\n    set volume to ([x position v] of [button of slider2 v]) %\nend\n\nwhen I receive [paper v]\nstop [other scripts in sprite v]\n\n@HealthBar Boss\n\nwhen flag clicked\nhide\n\nwhen I receive [change scene v]\nforever\n    switch costume to ((Boss Health) + (1))\n    if <<(Level) = [-89]> and <not <(Boss Health) < [1]>>> then\n        show\n    else\n        wait (2) seconds\n        hide\n    end\nend\n\n@Slider2\n\nwhen flag clicked\nhide\n\nwhen I receive [settings v]\nshow\nwait (0) seconds\ngo to [front v] layer\n\nwhen I receive [main menu v]\nhide\n\n@Cutscene\n\nwhen flag clicked\nset [hi-score v] to [0]\nset [ummm where am i v] to [0]\nhide\n\nwhen I receive [cutscene v]\nswitch costume to (1 v)\nshow\nforever\n    if <<<key (space v) pressed?> or <<touching (mouse-pointer v)?> and <mouse down?>>> or <key ((join [enter] []) v) pressed?>> then\n        next costume\n        wait (1) seconds\n    end\nend\n\nwhen I receive [cutscene v]\nwait until <(costume [number v]) = [6]>\nstart sound [Door Opened v]\n\nwhen I receive [cutscene v]\nwait until <(costume [number v]) = [12]>\nstop [other scripts in sprite v]\nwait (3) seconds\nbroadcast (Reset Once Again v)\nif <(Ummm where am i) = [0]> then\n    broadcast (Where Am I? v)\n    replace item (11) of [achievements v] with [Where Am I?]\n    change [ummm where am i v] by (1)\nend\nhide\n\n@How To Play Instruction\n\nwhen flag clicked\nhide\n\nwhen I receive [how to play v]\nstart sound [Page Turning v]\npoint in direction (90)\ngo to [front v] layer\nshow\nforever\n    repeat (15)\n        turn right (0.1) degrees\n    end\n    repeat (15)\n        turn left (0.1) degrees\n    end\n    repeat (15)\n        turn left (0.1) degrees\n    end\n    repeat (15)\n        turn right (0.1) degrees\n    end\nend\n\nwhen this sprite clicked\nstart sound [Page Turning v]\nbroadcast (Main Menu v)\nhide\n\nwhen I receive [sound2 v]\nforever\n    set volume to ([x position v] of [button of slider2 v]) %\nend\n\n@Settings Button\n\nwhen I receive [main menu v]\nwait (1) seconds\ngo to [front v] layer\nswitch costume to (button v)\nset size to (10) %\nshow\ngo to x: (-150) y: (110)\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by ((0.2) * ((60) - (size)))\n    else\n        change size by ((0.2) * ((50) - (size)))\n    end\nend\n\nwhen I receive [main menu v]\npoint in direction (90)\nforever\n    repeat (15)\n        turn right (0.5) degrees\n    end\n    repeat (15)\n        turn left (0.5) degrees\n    end\n    repeat (15)\n        turn left (0.5) degrees\n    end\n    repeat (15)\n        turn right (0.5) degrees\n    end\nend\n\nwhen this sprite clicked\nhide\nbroadcast (Settings v)\n\nwhen I receive [start game v]\nhide\n\nwhen I receive [how to play v]\nhide\n\nwhen I receive [achievments v]\nhide\n\nwhen I receive [more epic games v]\nhide\n\nwhen I receive [skins v]\nhide\n\nwhen I receive [credit v]\nhide\n\n@Achivement Button\n\nwhen I receive [main menu v]\nwait (1) seconds\ngo to [front v] layer\nswitch costume to (button v)\nset size to (10) %\nshow\ngo to x: (-200) y: (70)\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by ((0.2) * ((60) - (size)))\n    else\n        change size by ((0.2) * ((50) - (size)))\n    end\nend\n\nwhen I receive [main menu v]\npoint in direction (90)\nforever\n    repeat (15)\n        turn right (0.5) degrees\n    end\n    repeat (15)\n        turn left (0.5) degrees\n    end\n    repeat (15)\n        turn left (0.5) degrees\n    end\n    repeat (15)\n        turn right (0.5) degrees\n    end\nend\n\nwhen this sprite clicked\nhide\nbroadcast (Achievments v)\n\nwhen I receive [start game v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [settings v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [how to play v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [more epic games v]\nhide\n\nwhen I receive [skins v]\nhide\n\nwhen I receive [credit v]\nhide\n\n@How To Play Button\n\nwhen I receive [main menu v]\nwait (1) seconds\ngo to [front v] layer\nswitch costume to (button v)\nset size to (10) %\nshow\ngo to x: (-200) y: (110)\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by ((0.2) * ((60) - (size)))\n    else\n        change size by ((0.2) * ((50) - (size)))\n    end\nend\n\nwhen I receive [main menu v]\npoint in direction (90)\nforever\n    repeat (15)\n        turn right (0.5) degrees\n    end\n    repeat (15)\n        turn left (0.5) degrees\n    end\n    repeat (15)\n        turn left (0.5) degrees\n    end\n    repeat (15)\n        turn right (0.5) degrees\n    end\nend\n\nwhen this sprite clicked\nhide\nbroadcast (How To Play v)\n\nwhen I receive [start game v]\nhide\n\nwhen I receive [settings v]\nhide\n\nwhen I receive [achievments v]\nhide\n\nwhen I receive [more epic games v]\nhide\n\nwhen I receive [skins v]\nhide\n\nwhen I receive [credit v]\nhide\n\n@Scratchy Achievment\n\nwhen flag clicked\nhide\n\nwhen I receive [chomp! v]\nswitch costume to (pick random (1) to (5))\nset y to (-176)\nset x to (pick random (-216) to (212))\ngo to [front v] layer\nshow\nrepeat (10)\n    change y by (3)\nend\nsay [You Earned "Chomp!" Achievement!] for (2) seconds\nrepeat (10)\n    change y by (-3)\nend\nhide\n\nwhen I receive [fight time v]\nswitch costume to (pick random (1) to (5))\nset y to (-176)\nset x to (pick random (-216) to (212))\ngo to [front v] layer\nshow\nrepeat (10)\n    change y by (3)\nend\nsay [You Earned "Fight Time" Achievement!] for (2) seconds\nrepeat (10)\n    change y by (-3)\nend\nhide\n\nwhen I receive [full defeat v]\nswitch costume to (pick random (1) to (5))\nset y to (-176)\nset x to (pick random (-216) to (212))\nwait (0) seconds\ngo to [front v] layer\nshow\nrepeat (10)\n    change y by (3)\nend\nsay [You Earned "Full Defeat" Achievement!] for (2) seconds\nrepeat (10)\n    change y by (-3)\nend\nhide\n\nwhen I receive [ouch. v]\nswitch costume to (pick random (1) to (5))\nset y to (-176)\nset x to (pick random (-216) to (212))\ngo to [front v] layer\nshow\nrepeat (10)\n    change y by (3)\nend\nsay [You Earned "Ouch." Achievement!] for (2) seconds\nrepeat (10)\n    change y by (-3)\nend\nhide\n\nwhen I receive [secret loot! v]\nswitch costume to (pick random (1) to (5))\nset y to (-176)\nset x to (pick random (-216) to (212))\ngo to [front v] layer\nshow\nrepeat (10)\n    change y by (3)\nend\nsay [You Earned "Secret Loot!" Achievement!] for (2) seconds\nrepeat (10)\n    change y by (-3)\nend\nhide\n\nwhen I receive [where am i? v]\nswitch costume to (pick random (1) to (5))\nset y to (-176)\nset x to (pick random (-216) to (212))\ngo to [front v] layer\nshow\nrepeat (10)\n    change y by (3)\nend\nsay [You Earned "Where Am I?" Achievement!] for (2) seconds\nrepeat (10)\n    change y by (-3)\nend\nhide\n\nwhen I receive [checkpointing v]\nswitch costume to (pick random (1) to (5))\nset y to (-176)\nset x to (pick random (-216) to (212))\ngo to [front v] layer\nshow\nrepeat (10)\n    change y by (3)\nend\nsay [You Earned "CheckPointing" Achievement!] for (2) seconds\nrepeat (10)\n    change y by (-3)\nend\nhide\n\nwhen I receive [key!!!!!!! v]\nswitch costume to (pick random (1) to (5))\nset y to (-176)\nset x to (pick random (-216) to (212))\ngo to [front v] layer\nshow\nrepeat (10)\n    change y by (3)\nend\nsay [You Earned "KEY!!!!!!!" Achievement!] for (2) seconds\nrepeat (10)\n    change y by (-3)\nend\nhide\n\nwhen I receive [extra health v]\nswitch costume to (pick random (1) to (5))\nset y to (-176)\nset x to (pick random (-216) to (212))\ngo to [front v] layer\nshow\nrepeat (10)\n    change y by (3)\nend\nsay [You Earned "Extra Health" Achievement!] for (2) seconds\nrepeat (10)\n    change y by (-3)\nend\nhide\n\nwhen I receive [night! v]\nswitch costume to (pick random (1) to (5))\nset y to (-176)\nset x to (pick random (-216) to (212))\ngo to [front v] layer\nshow\nrepeat (10)\n    change y by (3)\nend\nsay [You Earned "Night!" Achievement!] for (2) seconds\nrepeat (10)\n    change y by (-3)\nend\nhide\n\nwhen I receive [first words.... v]\nswitch costume to (pick random (1) to (5))\nset y to (-176)\nset x to (pick random (-216) to (212))\ngo to [front v] layer\nshow\nrepeat (10)\n    change y by (3)\nend\nsay [You Earned "First Words...." Achievement!] for (2) seconds\nrepeat (10)\n    change y by (-3)\nend\nhide\n\n@Settings Menu\n\nwhen I receive [settings v]\nstart sound [Page Turning v]\npoint in direction (90)\ngo to [front v] layer\nshow\nforever\n    repeat (15)\n        turn right (0.1) degrees\n    end\n    repeat (15)\n        turn left (0.1) degrees\n    end\n    repeat (15)\n        turn left (0.1) degrees\n    end\n    repeat (15)\n        turn right (0.1) degrees\n    end\nend\n\nwhen this sprite clicked\nstart sound [Page Turning v]\nbroadcast (Main Menu v)\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [sound2 v]\nforever\n    set volume to ([x position v] of [button of slider2 v]) %\nend\n\n@Slider1\n\nwhen flag clicked\nhide\n\nwhen I receive [settings v]\nshow\nwait (0) seconds\ngo to [front v] layer\n\nwhen I receive [main menu v]\nhide\n\n@Button Of Slider1\n\nwhen flag clicked\nset y to (28)\nset x to (116)\nhide\n\nforever\n\nwhen I receive [settings v]\npoint in direction (90)\nshow\nwait (0.1) seconds\ngo to [front v] layer\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        if <<(mouse x) > [-24]> and <(mouse x) < [117]>> then\n            set x to (mouse x)\n        end\n    end\n    broadcast (Sound v)\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\nforever\n    repeat (15)\n        turn right (0.5) degrees\n    end\n    repeat (15)\n        turn left (0.5) degrees\n    end\n    repeat (15)\n        turn left (0.5) degrees\n    end\n    repeat (15)\n        turn right (0.5) degrees\n    end\nend\n\nwhen I receive [main menu v]\nhide\n\n@Button Of Slider2\n\nwhen flag clicked\nset y to (-56)\nset x to (116)\nhide\n\nforever\n\nwhen I receive [settings v]\npoint in direction (90)\nshow\nwait (0.1) seconds\ngo to [front v] layer\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        if <<(mouse x) > [-24]> and <(mouse x) < [117]>> then\n            set x to (mouse x)\n        end\n    end\n    broadcast (Sound2 v)\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\nforever\n    repeat (15)\n        turn right (0.5) degrees\n    end\n    repeat (15)\n        turn left (0.5) degrees\n    end\n    repeat (15)\n        turn left (0.5) degrees\n    end\n    repeat (15)\n        turn right (0.5) degrees\n    end\nend\n\nwhen I receive [main menu v]\nhide\n\n@Shop\n\nwhen I receive [change scene v]\nhide\ngo [backward v] (5) layers\nif <(Level) = [-102]> then\n    show\nend\n\n@Achievements Menu\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nstart sound [Page Turning v]\nbroadcast (Main Menu v)\nhide\n\nwhen I receive [sound2 v]\nforever\n    set volume to ([x position v] of [button of slider2 v]) %\nend\n\nwhen I receive [achievments v]\nstart sound [Page Turning v]\npoint in direction (90)\ngo to [front v] layer\nshow\nforever\n    repeat (15)\n        turn right (0.1) degrees\n    end\n    repeat (15)\n        turn left (0.1) degrees\n    end\n    repeat (15)\n        turn left (0.1) degrees\n    end\n    repeat (15)\n        turn right (0.1) degrees\n    end\nend\n\n@Fireflies\n\nwhen flag clicked\nhide\ndelete this clone\n\nwhen I start as a clone\npoint in direction (90)\ngo to [front v] layer\nshow\nforever\n    repeat (10)\n        change y by (0.5)\n        turn right (3) degrees\n    end\n    repeat (10)\n        change y by (-0.5)\n        turn left (3) degrees\n    end\n    repeat (10)\n        change y by (-0.5)\n        turn left (3) degrees\n    end\n    repeat (10)\n        change y by (0.5)\n        turn right (3) degrees\n    end\nend\n\nwhen I receive [main menu v]\nhide\ndelete this clone\n\nwhen I receive [night v]\nrepeat (15)\n    point in direction (pick random (-90) to (90))\n    create clone of (_myself_ v)\n    set x to (pick random (200) to (-200))\n    set y to (pick random (164) to (-78))\nend\n\nwhen I receive [cutscene v]\ngo to [back v] layer\nstop [other scripts in sprite v]\n\nwhen I receive [day v]\nhide\ndelete this clone\n\n@FAKE LEVEL\n\nwhen I receive [change scene v]\nswitch costume to (blank v)\nswitch costume to (join [Scene] (Level))\ngo to x: (0) y: (0)\n\nwhen I receive [change scene v]\n\nerase all\n\nchange y by (20)\n\nset [brightness v] effect to (-100)\n\nchange y by (3)\n\nchange y by (-3)\nclear graphic effects\n\nstamp\n\nchange y by (-3)\n\nchange y by (3)\n\nwhen flag clicked\n\nset [level v] to [-90]\nbroadcast (Change Scene v)\n\nset [strawberries v] to [11]\n\nwhen I receive [start game v]\nreset timer\nforever\n    set [time v] to (timer)\nend\n\n@Piece of paper2\n\nwhen I receive [paper fall v]\nshow\nforever\n    repeat until <touching (level v)?>\n        change y by (-2)\n    end\n    forever\n        if <touching (✨scratchy✨ v)?> then\n            broadcast (THE SECRETS ARE HIDING v)\n            hide\n        end\n    end\nend\n\nwhen I receive [change scene v]\ngo to x: (100) y: (126)\nhide\n\nwhen I receive [main menu v]\nset [collected v] to [0]\ngo to x: (100) y: (126)\nhide\n\n@NPC2\n\ndefine Say (text) Speed (spd) And Wait (seconds)\nif <not <(length of (text)) = [0]>> then\n    delete all of [pause v]\n    add [,] to [pause v]\n    add [.] to [pause v]\n    add [:] to [pause v]\n    add [;] to [pause v]\n    add [!] to [pause v]\n    add [?] to [pause v]\n    set [numbers v] to [0]\n    set [text v] to []\n    repeat (length of (text))\n        change [numbers v] by (1)\n        set [text v] to (join (Text) (letter (Numbers) of (text)))\n        say (Text)\n        if <not <(letter (Numbers) of (text)) = [ ]>> then\n            start sound [Small Cowbell v]\n        end\n        if <not <(Numbers) = (length of (text))>> then\n            if <[pause v] contains (letter (Numbers) of (text))?> then\n                if <<(spd) < [1]> or <(spd) = []>> then\n                    wait (0.4) seconds\n                else\n                    wait ((spd) / (2.5)) seconds\n                end\n            else\n                wait ((spd) / (25)) seconds\n            end\n        end\n    end\n    set [text v] to []\n    set [numbers v] to []\n    wait (seconds) seconds\n    say []\nend\n\nwait (0) seconds\nnext costume\n\nwhen I receive [change scene v]\nhide\nif <(Level) = [-103]> then\n    show\n    forever\n        switch costume to (idle v)\n        repeat (3)\n            wait (0.1) seconds\n            next costume\n        end\n    end\nend\n\n\n\nwhen I receive [main menu v]\n\n\n\nwhen I receive [change scene v]\ngo to [back v] layer\nforever\n    point towards (✨scratchy✨ v)\n    if <<touching (✨scratchy✨ v)?> and <key (t v) pressed?>> then\n        if <(First Talk?) = [0]> then\n            replace item (10) of [achievements v] with [First Words....]\n            broadcast (First Words.... v)\n        end\n        change [first talk? v] by (1)\n        if <(Random sayings) = [1]> then\n            Say [Wow! Congrats! it is a secret that was said in the paper "The secrets are hiding"] Speed [1] And Wait [5]\n            set [random sayings v] to (pick random (1) to (5))\n            stop [this script v]\n        end\n        if <(Random sayings) = [2]> then\n            Say [Nights are calm.] Speed [1] And Wait [2]\n            set [random sayings v] to (pick random (1) to (5))\n            stop [this script v]\n        end\n        if <(Random sayings) = [3]> then\n            Say [Chompies are patroling!] Speed [1] And Wait [2]\n            set [random sayings v] to (pick random (1) to (5))\n            stop [this script v]\n        end\n        if <(Random sayings) = [4]> then\n            Say [There is a king to fight!] Speed [1] And Wait [2]\n            set [random sayings v] to (pick random (1) to (5))\n            stop [this script v]\n        end\n        if <(Random sayings) = [5]> then\n            Say [Secrets are hiding even here!] Speed [1] And Wait [2]\n            set [random sayings v] to (pick random (1) to (5))\n            stop [this script v]\n        end\n    end\nend\n\nwhen flag clicked\nset [hi v] to [0]\n\nwhen I receive [sound2 v]\nforever\n    set volume to ([x position v] of [button of slider2 v]) %\nend\n\nchange [lives v] by (2)\n\nchange [lives v] by (-2)\n\nwhen flag clicked\nset [first talk? v] to [0]\nset volume to (100) %\n\n@Paper2\n\nwhen flag clicked\nhide\nset size to (10) %\n\nwhen I receive [the secrets are hiding v]\nset size to (10) %\nclear graphic effects\nshow\nswitch costume to (hiding>>>> v)\nstart sound [Page Turning v]\nrepeat (12)\n    change size by (10)\nend\nwait until <<key (space v) pressed?> or <<touching (mouse-pointer v)?> and <mouse down?>>>\nstart sound [Page Turning v]\nrepeat (100)\n    change [ghost v] effect by (1)\nend\nhide\n\nwhen I receive [sound2 v]\nforever\n    set volume to ([x position v] of [button of slider2 v]) %\nend\n\n@NPC\n\ndefine Say (text) Speed (spd) And Wait (seconds)\nif <not <(length of (text)) = [0]>> then\n    delete all of [pause v]\n    add [,] to [pause v]\n    add [.] to [pause v]\n    add [:] to [pause v]\n    add [;] to [pause v]\n    add [!] to [pause v]\n    add [?] to [pause v]\n    set [numbers v] to [0]\n    set [text v] to []\n    repeat (length of (text))\n        change [numbers v] by (1)\n        set [text v] to (join (Text) (letter (Numbers) of (text)))\n        say (Text)\n        if <not <(letter (Numbers) of (text)) = [ ]>> then\n            start sound [Pop v]\n        end\n        if <not <(Numbers) = (length of (text))>> then\n            if <[pause v] contains (letter (Numbers) of (text))?> then\n                if <<(spd) < [1]> or <(spd) = []>> then\n                    wait (0.4) seconds\n                    start sound [Голос v]\n                else\n                    wait ((spd) / (2.5)) seconds\n                end\n            else\n                wait ((spd) / (25)) seconds\n            end\n        end\n    end\n    set [text v] to []\n    set [numbers v] to []\n    wait (seconds) seconds\n    say []\nend\n\nnext costume\n\nwhen I receive [change scene v]\nwait (0) seconds\nif <(Level) = [-101]> then\n    show\n    forever\n        switch costume to (idle v)\n        repeat (3)\n            wait (0.1) seconds\n            next costume\n        end\n        point towards (✨scratchy✨ v)\n    end\nend\n\n\n\nwhen I receive [main menu v]\n\n\n\nwhen I receive [change scene v]\nhide\nforever\n    if <(Level) = [-101]> then\n        if <<touching (✨scratchy✨ v)?> and <key (t v) pressed?>> then\n            if <(First Talk?) = [0]> then\n                replace item (10) of [achievements v] with [First Words....]\n                broadcast (First Words.... v)\n            end\n            change [first talk? v] by (1)\n            start sound [Pop v]\n            if <<not <(Lives) > [4]>> and <<not <(Lives) < [2]>> and <(HI) > [0]>>> then\n                switch costume to (waving v)\n                repeat (8)\n                    wait (0) seconds\n                    next costume\n                end\n                Say [Hello Once Again!] Speed [1] And Wait [2]\n                stop [this script v]\n            end\n            if <(HI) = [0]> then\n                switch costume to (waving v)\n                repeat (8)\n                    wait (0) seconds\n                    next costume\n                    change [hi v] by (1)\n                end\n                Say [Hi There!] Speed [1] And Wait [2]\n                stop [this script v]\n            end\n        end\n        if <(Lives) > [4]> then\n            Say [Oooh YOU ARE BUFFED!] Speed [1] And Wait [2]\n            stop [this script v]\n        end\n        if <(Lives) < [2]> then\n            Say [Go to the left! You can buy +1 HP there!] Speed [1] And Wait [2]\n            stop [this script v]\n        end\n    end\nend\n\nwhen flag clicked\nset [hi v] to [0]\n\nwhen I receive [sound2 v]\nforever\n    set volume to ([x position v] of [button of slider2 v]) %\nend\n\nchange [lives v] by (2)\n\nchange [lives v] by (-2)\n\nwhen I receive [change scene v]\nhide\n\nwhen flag clicked\nset volume to (100) %\n\n@ShopKeeper NPC\n\ndefine Say (text) Speed (spd) And Wait (seconds)\nif <not <(length of (text)) = [0]>> then\n    delete all of [pause v]\n    add [,] to [pause v]\n    add [.] to [pause v]\n    add [:] to [pause v]\n    add [;] to [pause v]\n    add [!] to [pause v]\n    add [?] to [pause v]\n    set [numbers v] to [0]\n    set [text v] to []\n    repeat (length of (text))\n        change [numbers v] by (1)\n        set [text v] to (join (Text) (letter (Numbers) of (text)))\n        say (Text)\n        if <not <(letter (Numbers) of (text)) = [ ]>> then\n            start sound [Bell Cymbal v]\n        end\n        if <not <(Numbers) = (length of (text))>> then\n            if <[pause v] contains (letter (Numbers) of (text))?> then\n                if <<(spd) < [1]> or <(spd) = []>> then\n                    wait (0.4) seconds\n                    start sound [Голос v]\n                else\n                    wait ((spd) / (2.5)) seconds\n                end\n            else\n                wait ((spd) / (25)) seconds\n            end\n        end\n    end\n    set [text v] to []\n    set [numbers v] to []\n    wait (seconds) seconds\n    say []\nend\n\nwhen I receive [change scene v]\nwait (0) seconds\ngo to [back v] layer\nhide\nif <(Level) = [-102]> then\n    show\n    forever\n        switch costume to (idle v)\n        repeat (3)\n            wait (0.1) seconds\n            next costume\n        end\n    end\nend\n\nwhen I receive [change scene v]\nforever\n    point towards (✨scratchy✨ v)\n    if <<touching (✨scratchy✨ v)?> and <key (t v) pressed?>> then\n        if <(First Talk?) = [0]> then\n            replace item (10) of [achievements v] with [First Words....]\n            broadcast (First Words.... v)\n        end\n        change [first talk? v] by (1)\n        Say [Welcome! Wanna A Fresh +1? It Costs 5 strawberries.] Speed [0] And Wait [0]\n        ask [Welcome! Wanna A Fresh +1? It Costs 5 strawberries.] and wait\n        if <<(answer) = [yes]> or <(answer) = [Yes]>> then\n            if <(Strawberries) > [4]> then\n                Say [Great! There You Go!] Speed [1] And Wait [2]\n                change [lives v] by (1)\n                if <(Extra Healths) = [0]> then\n                    broadcast (Extra Health v)\n                    replace item (6) of [achievements v] with [Extra Health]\n                end\n                change [extra healths v] by (1)\n                change [strawberries v] by (-5)\n                start sound [Toy Zing v]\n            else\n                Say [Ahem. You Don't Have Enough Strawberries] Speed [1] And Wait [2]\n            end\n        end\n        if <<(answer) = [no]> or <(answer) = [No]>> then\n            Say [Ok........] Speed [1] And Wait [2]\n        end\n        if <(answer) = [sus]> then\n            start sound [SUS v]\n            Say [SUS] Speed [1] And Wait [3]\n        end\n        if <<<not <<(answer) = [no]> or <(answer) = [No]>>> and <not <<(answer) = [yes]> or <(answer) = [Yes]>>>> and <not <(answer) = [sus]>>> then\n            Say [Ugh..... i didn't understand you] Speed [1] And Wait [3]\n        end\n    end\nend\n\nwhen I receive [sound2 v]\nforever\n    set volume to ([x position v] of [button of slider2 v]) %\nend\n\nwhen flag clicked\nset volume to (100) %\n\nif <(First Talk?) = [0]> then\n    replace item (10) of [achievements v] with [First Words....]\n    broadcast (First Words.... v)\nend\nchange [first talk? v] by (1)\n\n@Particles_Footsteps\n\nwhen flag clicked\nhide\ndelete this clone\n\nwhen I receive [main menu v]\ndelete this clone\n\nwhen I receive [game over v]\ndelete this clone\n\nwhen I receive [start game v]\nforever\n    if <not < ([costume name v] of [✨scratchy✨ v]) contains [stand]?>> then\n        go to (✨scratchy✨ v)\n        change y by (-15)\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nset size to (100) %\npoint in direction (90)\nnext costume\ngo to [back v] layer\nshow\npoint in direction (pick random (-90) to (90))\nrepeat (25)\n    change size by (10)\n    change [ghost v] effect by (4)\nend\ndelete this clone\n\nwhen I receive [change scene v]\ndelete this clone\n\nwait (1) seconds\n\nwhen I receive [lost life v]\ndelete this clone\n\n@decor\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\n\nwhen I receive [change scene v]\nswitch costume to (blank v)\nswitch costume to (join [Scene ] (Level))\n\n@SOME ART\n\n@Red Dust\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nclear graphic effects\nset [ghost v] effect to (((y position) / (4)) * (-1))\nshow\nrepeat (50)\n    change [color v] effect by (0.5)\n    go to [front v] layer\n    change [ghost v] effect by (2)\n    change [brightness v] effect by (2)\n    change x by (-1)\n    change y by (1)\n    move (1) steps\n    turn left (5) degrees\nend\ndelete this clone\n\nwhen I receive [hide v]\nset [approachingscreen v] to [True]\n\nwhen I receive [fade2 v]\nhide\n\nwhen I receive [tutor time 4 toddlors! v]\nhide\n\nwhen flag clicked\ngo to [back v] layer\nset [ghost v] effect to (100)\nset [approachingscreen v] to [False]\nset size to (15) %\nforever\n    if <(Level) = [3]> then\n        go to x: (pick random (0) to (150)) y: (([y position v] of [danger v]) - (80))\n        change [ghost v] effect by (-1)\n        set size to (pick random (10) to (100)) %\n        create clone of (_myself_ v)\n        turn right (pick random (0) to (360)) degrees\n        next costume\n    end\n    if <(Level) = [0]> then\n        go to x: (pick random (-180) to (130)) y: (([y position v] of [danger v]) - (60))\n        change [ghost v] effect by (-1)\n        set size to (pick random (10) to (100)) %\n        create clone of (_myself_ v)\n        turn right (pick random (0) to (360)) degrees\n        next costume\n        go to x: (pick random (-180) to (130)) y: (([y position v] of [danger v]) - (60))\n        change [ghost v] effect by (-1)\n        set size to (pick random (10) to (100)) %\n        create clone of (_myself_ v)\n        turn right (pick random (0) to (360)) degrees\n        next costume\n    end\n    if <(Level) = [2]> then\n        go to x: (pick random (-130) to (100)) y: (([y position v] of [danger v]) - (60))\n        change [ghost v] effect by (-1)\n        set size to (pick random (10) to (100)) %\n        create clone of (_myself_ v)\n        turn right (pick random (0) to (360)) degrees\n        next costume\n    end\n    if <(Level) = [5]> then\n        go to x: (pick random (200) to (120)) y: (([y position v] of [danger v]) - (80))\n        change [ghost v] effect by (-1)\n        set size to (pick random (10) to (100)) %\n        create clone of (_myself_ v)\n        turn right (pick random (0) to (360)) degrees\n        next costume\n    end\nend\n\ncreate clone of (_myself_ v)\n\nwhen I receive [game over v]\nset [level v] to [1]\n\n@EndScreen\n\ndefine [Game] Clone No. (cnum) Game No. (gnum) Link (link) X (x) Y (y)\nif <(CloneNum) = (cnum)> then\n    switch costume to (join [Game] (gnum))\n    go to x: (x) y: (y)\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (20)\n            set size to ((size) + (((120) - (size)) / (3))) %\n            if <mouse down?> then\n                wait until <not <mouse down?>>\n                replace item (1) of [projectlink v] with (link)\n                if <(PopUpOpened?) = [0]> then\n                    set [prompt v] to [1]\n                end\n            end\n        else\n            set size to ((size) + (((100) - (size)) / (3))) %\n            set [brightness v] effect to (0)\n        end\n    end\nend\n\nwhen flag clicked\nhide\nset [delete v] to [0]\n\nwhen I receive [theend v]\nhide\nBuild [4] Start [0]\n\ndefine Build (num) Start (start)\nset [clonenum v] to (start)\nrepeat (num)\n    change [clonenum v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\ngo to [front v] layer\nshow\nif <(CloneNum) = [1]> then\n    switch costume to (background v)\nend\nif <(CloneNum) = [2]> then\n    switch costume to (popupclosed v)\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (-10)\n            if <mouse down?> then\n                wait until <not <mouse down?>>\n                if <(costume [name v]) = [PopUpClosed]> then\n                    switch costume to (popupopened v)\n                    set [popupopened? v] to [1]\n                    set [prompt v] to [0]\n                    hide list [projectlink v]\n                else\n                    switch costume to (popupclosed v)\n                    set [popupopened? v] to [0]\n                    show list [projectlink v]\n                end\n            end\n        else\n            set [brightness v] effect to (0)\n        end\n    end\nend\n[Game] Clone No. [3] Game No. [1] Link [https://scratch.mit.edu/projects/60917032/] X [-100] Y [100]\n[Game] Clone No. [4] Game No. [2] Link [https://scratch.mit.edu/projects/915122508/] X [100] Y [100]\n\nwhen I start as a clone\nshow list [projectlink v]\nforever\n    if <(Delete) = [1]> then\n        delete this clone\n    end\nend\n\nwhen I receive [theend v]\ndelete all of [projectlink v]\nadd [] to [projectlink v]\n\nwhen I receive [more epic games v]\nbroadcast (TheEnd v)\n\nwhen I start as a clone\nif <(CloneNum) = [2]> then\n    forever\n        if <(Prompt) = [1]> then\n            clear graphic effects\n            repeat (10)\n                change [brightness v] effect by (10)\n            end\n            repeat (10)\n                change [brightness v] effect by (-10)\n            end\n        end\n    end\nend\n\n@Back Button\n\nwhen flag clicked\nhide\n\nwhen I receive [more epic games v]\npoint in direction (90)\nwait (0) seconds\ngo to [front v] layer\nshow\nforever\n    repeat (10)\n        turn right (1) degrees\n    end\n    repeat (10)\n        turn left (1) degrees\n    end\n    repeat (10)\n        turn left (1) degrees\n    end\n    repeat (10)\n        turn right (1) degrees\n    end\nend\n\nwhen this sprite clicked\nbroadcast (Main Menu v)\nhide\nset [delete v] to [1]\nwait (1) seconds\nset [delete v] to [0]\n\n@More Epic Games Button\n\nwhen I receive [main menu v]\nwait (1) seconds\ngo to [front v] layer\nswitch costume to (costume1 v)\nset size to (10) %\nshow\ngo to x: (-150) y: (70)\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by ((0.2) * ((60) - (size)))\n    else\n        change size by ((0.2) * ((50) - (size)))\n    end\nend\n\nwhen I receive [main menu v]\npoint in direction (90)\nforever\n    repeat (15)\n        turn right (0.5) degrees\n    end\n    repeat (15)\n        turn left (0.5) degrees\n    end\n    repeat (15)\n        turn left (0.5) degrees\n    end\n    repeat (15)\n        turn right (0.5) degrees\n    end\nend\n\nwhen this sprite clicked\nhide\nbroadcast (More Epic Games v)\n\nwhen I receive [start game v]\nhide\n\nwhen I receive [settings v]\nhide\n\nwhen I receive [achievments v]\nhide\n\nwhen I receive [skins v]\nhide\n\nwhen I receive [credit v]\nhide\n\n@Strawberries\n\ndefine Smooth Size to (%) % at speed (s)\nrepeat until <(round (size)) = (round (%))>\n    change size by (((round (%)) - (round (size))) / (s))\nend\nset size to (%) %\n\nwhen flag clicked\n\nwhen I start as a clone\ngo to [front v] layer\nshow\ngo [backward v] (6) layers\nforever\n    Change Costume To (join [Glow-] (letter (index) of (Strawberries)))\nend\n\nSmooth Size to (80) % at speed (7)\n\nwhen I receive [start game v]\nhide\ngo to x: (-120) y: (-150)\nset [index v] to [1]\nrepeat (2)\n    create clone of (_myself_ v)\n    change x by (40)\n    change [index v] by (1)\nend\n\ndefine Change Costume To (costume)\nif <not <(costume) = (costume [name v])>> then\n    switch costume to (costume)\nend\n\nwhen I receive [main menu v]\ndelete this clone\n\n@Text\n\nwhen flag clicked\ngo to [front v] layer\ngo [backward v] (6) layers\n\n@Level2\n\nwhen I start as a clone\ngo to [front v] layer\nshow\ngo [backward v] (6) layers\nforever\n    Change Costume To (join [Glow-] (letter (index) of (Level)))\n    Smooth Size to (100) % at speed (7)\nend\n\nwhen I receive [die v]\nhide\n\nwhen I receive [start game v]\nhide\ngo to x: (0) y: (-150)\nset [index v] to [1]\nrepeat (4)\n    create clone of (_myself_ v)\n    change x by (40)\n    change [index v] by (1)\nend\n\ndefine Smooth Size to (%) % at speed (s)\nrepeat until <(round (size)) = (round (%))>\n    change size by (((round (%)) - (round (size))) / (s))\nend\nset size to (%) %\n\ndefine Change Costume To (costume)\nif <not <(costume) = (costume [name v])>> then\n    switch costume to (costume)\n    set size to (120) %\nend\n\nSmooth Size to (1) % at speed (1)\n\nwhen I receive [main menu v]\ndelete this clone\n\n@Lives\n\nwhen I start as a clone\ngo to [front v] layer\nshow\ngo [backward v] (6) layers\nforever\n    set x to (((((index) - (0.5)) * ((size) / (2))) / (2)) - (-180))\n    Change Costume To (join [Glow-] (letter (index) of (Lives)))\n    Smooth Size to (100) % at speed (7)\nend\n\nwhen I receive [die v]\nhide\n\nwhen I receive [start game v]\nhide\ngo to x: (-200) y: (-150)\nset [index v] to [1]\nrepeat (1)\n    create clone of (_myself_ v)\n    change x by (40)\n    change [index v] by (1)\nend\n\ndefine Smooth Size to (%) % at speed (s)\nrepeat until <(round (size)) = (round (%))>\n    change size by (((round (%)) - (round (size))) / (s))\nend\nset size to (%) %\n\ndefine Change Costume To (costume)\nif <not <(costume) = (costume [name v])>> then\n    switch costume to (costume)\n    set size to (120) %\nend\n\nwhen I receive [main menu v]\ndelete this clone\n\n@Time\n\ndefine Smooth Size to (%) % at speed (s)\nrepeat until <(round (size)) = (round (%))>\n    change size by (((round (%)) - (round (size))) / (s))\nend\nset size to (%) %\n\nwhen I start as a clone\nshow\ngo [forward v] (50) layers\nforever\n    Change Costume To (join [Glow-] (letter (index) of (Time!!)))\n    set x to (((((index) - (0.5)) * ((size) / (2))) / (2)) - (200))\nend\n\nwhen I receive [die v]\nhide\n\nwhen I receive [start game v]\nTimer\n\ndefine Timer\nset [time!! v] to [0]\nwait (1.5) seconds\nrepeat until <not <([costume name v] of [✨scratchy✨ v]) = [stand]>>\n    reset timer\nend\nwait until <not <([costume name v] of [✨scratchy✨ v]) = [stand]>>\nforever\n    set [time!! v] to (timer)\nend\n\nwhen I receive [start game v]\nhide\ngo to x: (-220) y: (150)\nset [index v] to [1]\nrepeat (15)\n    create clone of (_myself_ v)\n    change x by (40)\n    change [index v] by (1)\nend\n\ndefine Change Costume To (costume)\nif <not <(costume) = (costume [name v])>> then\n    switch costume to (costume)\n    set size to (90) %\nend\n\nwhen I start as a clone\nforever\n    Smooth Size to (70) % at speed (7)\nend\n\nwhen I receive [main menu v]\ndelete this clone\n\nbroadcast (Night v)\n\n@Moon/Sun\n\nset size to (100) %\ngo to x: (0) y: ((0) + (([sin v] of ((timer) * (150)) ) * (10)))\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\nwhen I receive [start game v]\nstop [other scripts in sprite v]\nshow\nswitch costume to (sun v)\ngo to x: (-145) y: (86)\nforever\n    repeat (10)\n        change y by (0.5)\n    end\n    repeat (10)\n        change y by (-0.5)\n    end\nend\n\nwhen I receive [night v]\nstop [other scripts in sprite v]\nglide (7) secs to x: (-139) y: (-143)\nhide\nswitch costume to (moon v)\nshow\ngo to x: (145) y: (-143)\nglide (7) secs to x: (145) y: (86)\nforever\n    repeat (10)\n        change y by (0.5)\n    end\n    repeat (10)\n        change y by (-0.5)\n    end\nend\n\nwhen I receive [day v]\nstop [other scripts in sprite v]\nglide (7) secs to x: (145) y: (-143)\nhide\nswitch costume to (sun v)\nshow\ngo to x: (-139) y: (-143)\nglide (7) secs to x: (-145) y: (86)\nforever\n    repeat (10)\n        change y by (0.5)\n    end\n    repeat (10)\n        change y by (-0.5)\n    end\nend\n\nhide\n\nswitch costume to (moon v)\n\n@Maybe love fave follow?\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nforever\n    wait (pick random (15) to (30)) seconds\n    show\n    glide (1) secs to x: (0) y: (-70)\n    wait (1) seconds\n    glide (1) secs to x: (0) y: (0)\n    hide\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@Wifi detector\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    if <not <(translate (timer) to (sl v)::translate) = []>> then\n        switch costume to (costume1 v)\n    else\n        switch costume to (costume2 v)\n    end\nend\n\n@Mobile Or Not Menu\n\nwhen flag clicked\nshow\nwait (0) seconds\ngo to [front v] layer\nwait (1.2) seconds\ngo to [front v] layer\nwait (1.7) seconds\ngo to [front v] layer\n\nwhen I receive [hide v]\nhide\n\n@Mobile\n\nwhen flag clicked\ngo to [front v] layer\nswitch costume to (button v)\nset size to (50) %\nshow\ngo to x: (-125) y: (0)\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by ((0.2) * ((210) - (size)))\n    else\n        change size by ((0.2) * ((200) - (size)))\n    end\nend\n\nwhen this sprite clicked\nbroadcast (Hide v)\nset [mob? v] to [1]\nhide\n\nwhen I receive [hide v]\nhide\n\nwhen I receive [main menu v]\n\nwait (1) seconds\n\nwhen flag clicked\npoint in direction (90)\nforever\n    repeat (15)\n        turn right (0.5) degrees\n    end\n    repeat (15)\n        turn left (0.5) degrees\n    end\n    repeat (15)\n        turn left (0.5) degrees\n    end\n    repeat (15)\n        turn right (0.5) degrees\n    end\nend\n\nwhen flag clicked\nshow\nforever\n    go to [front v] layer\nend\n\n@CPU\n\nwhen flag clicked\nshow\nforever\n    go to [front v] layer\nend\n\nwhen this sprite clicked\nbroadcast (Hide v)\nset [mob? v] to [0]\nhide\n\nwhen I receive [hide v]\nhide\n\nwhen flag clicked\ngo to [front v] layer\nswitch costume to (button v)\nset size to (50) %\nshow\ngo to x: (125) y: (50)\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by ((0.2) * ((210) - (size)))\n    else\n        change size by ((0.2) * ((200) - (size)))\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nforever\n    repeat (15)\n        turn right (0.5) degrees\n    end\n    repeat (15)\n        turn left (0.5) degrees\n    end\n    repeat (15)\n        turn left (0.5) degrees\n    end\n    repeat (15)\n        turn right (0.5) degrees\n    end\nend\n\n@STOP DETECTOR\n\nwhen flag clicked\ncreate clone of (_myself_ v)\nforever\n    switch costume to (detector v)\n    go to [front v] layer\n    if <touching (mouse-pointer v)?> then\n        set [sure? v] to [1]\n    else\n        set [sure? v] to [0]\n    end\nend\n\nwhen I start as a clone\ngo to x: (0) y: (0)\nswitch costume to (are u sure? v)\nforever\n    if <(Sure?) = [1]> then\n        set [ghost v] effect to (20)\n        go to [front v] layer\n        show\n    else\n        hide\n    end\nend\n\n@Shadow\n\nwhen flag clicked\nforever\n    set size to ((75) - ((([y position v] of [✨scratchy✨ v]) - (y position)) / (2))) %\n    go to (✨scratchy✨ v)\n    D\n    set [ghost v] effect to (80)\n    go [backward v] (1) layers\nend\n\ndefine D\nrepeat until <<touching (level v)?> or <touching (_edge_ v)?>>\n    change y by (-1)\nend\n\nset [ghost v] effect to (0)\n\nif <touching (_edge_ v)?> then\n    show\nelse\n    hide\nend\n\n