Flipped - A Platformer
@Stage\n\nwhen flag clicked\nforever\n    play sound [Epic 8bit v] until done\nend\n\nwhen flag clicked\nforever\n    if <(Blocco_) = [1]> then\n        repeat until <not <(Blocco_) = [1]>>\n            set volume to (0) %\n        end\n    end\n    set volume to (Volume musica) %\nend\n\n@Personaggio\n\ndefine Parla (n elemento) (secondi per lettera) (secondi pausa finale)\nset [csg v] to []\nset [indicelettera v] to [1]\nrepeat until <(IndiceLettera) > (length of (item (n elemento) of [speak v]))>\n    if <(IndiceLettera) > ((length of (item (n elemento) of [speak v])) - (1))> then\n        say (join (CSG) (letter (IndiceLettera) of (item (n elemento) of [speak v]))) for (secondi pausa finale) seconds\n    else\n        say (join (CSG) (letter (IndiceLettera) of (item (n elemento) of [speak v]))) for (secondi per lettera) seconds\n    end\n    set [csg v] to (join (CSG) (letter (IndiceLettera) of (item (n elemento) of [speak v])))\n    change [indicelettera v] by (1)\nend\n\nwhen flag clicked\nshow\npoint in direction (90)\ngo to x: (-230) y: (60)\nset [background v] to [1]\nset size to (25) %\nset rotation style [left-right v]\nset [yspeed v] to [0]\nset [frame v] to [0]\nset [blocco_ v] to [0]\nforever\n    if <<(Background) = [20]> and <(Blocco_) = [0]>> then\n        switch costume to (stand_1 v)\n        set [blocco_ v] to [1]\n        glide (2) secs to x: (0) y: (65)\n        broadcast (boss v) and wait\n    else\n        if <(Blocco_) = [0]> then\n            broadcast (messaggio1 v)\n        end\n    end\nend\n\ndefine Cammina al contrario (direzione) (velocità)\npoint in direction (direzione)\nchange x by (velocità)\nset [pendenza v] to [0]\nrepeat until <<(Pendenza) = [-8]> or <not <touching (linee calpestabili sfondo v)?>>>\n    change y by (-1)\n    change [pendenza v] by (-1)\nend\nif <(Pendenza) = [-8]> then\n    change x by ((-1) * (velocità))\n    change y by ((-1) * (Pendenza))\nend\nif <(XSpeed) < [0]> then\n    change [frame v] by ((velocità) / (-8))\nelse\n    change [frame v] by ((velocità) / (8))\nend\n\ndefine Tocca_Terra al contrario <su?>\nchange [caduta v] by (-1)\nrepeat until <not <touching (linee calpestabili sfondo v)?>>\n    if <su?> then\n        change y by (1)\n    else\n        change y by (-1)\n        set [caduta v] to [0]\n    end\n    set [yspeed v] to [0]\nend\n\ndefine Costume\nif <(Caduta) > [-3]> then\n    if <(Frame) = [0]> then\n        switch costume to (stand_1 v)\n    else\n        switch costume to ([floor v] of ((4) + ((Frame) mod (8))) )\n    end\nelse\n    if <(YSpeed) < [0]> then\n        switch costume to (jump_1 v)\n    else\n        switch costume to (fall_1 v)\n    end\nend\n\nwhen I receive [messaggio1 v]\nswitch costume to (hitbox v)\nif <<(YSpeed) > [-4]> or <<key (w v) pressed?> or <<key (up arrow v) pressed?> or <key (space v) pressed?>>>> then\n    change [yspeed v] by (1)\nelse\n    change [yspeed v] by (2)\nend\nchange y by (YSpeed)\nTocca_Terra al contrario <(YSpeed) < [0]>\nset [xspeed v] to ((XSpeed) * (0.7))\nif <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n    change [xspeed v] by (1.5)\nend\nif <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n    change [xspeed v] by (-1.5)\nend\nif <(XSpeed) > [0.5]> then\n    Cammina al contrario [90] (XSpeed)\nelse\n    if <(XSpeed) < [-0.5]> then\n        Cammina al contrario [-90] (XSpeed)\n    else\n        set [frame v] to [0]\n    end\nend\nif <<key (w v) pressed?> or <<key (up arrow v) pressed?> or <key (space v) pressed?>>> then\n    if <<(Salto) = [0]> and <(Caduta) = [0]>> then\n        set [yspeed v] to [-14]\n        set [caduta v] to [-6]\n        set [salto v] to [1]\n    end\nelse\n    set [salto v] to [0]\nend\nif <(x position) > [239]> then\n    go to x: (-239) y: (60)\n    change [background v] by (1)\nend\nif <<(y position) > [170]> or <touching (spikes v)?>> then\n    go to x: (-239) y: (60)\nend\nCostume\n\nwhen I receive [boss-risposta v]\nParla [2] [0.07] [1]\nstart sound [OMAE WA MOU SHINDEIRU v]\nParla [3] [0.06] [1.5]\nbroadcast (nani v)\n\nwhen I receive [tutanvengi nevru v]\nstart sound [NANIII 2 v]\nswitch costume to (stand_fucile1 v)\nwait (0.5) seconds\nswitch costume to (stand_fucile2 v)\nwait (0.5) seconds\nswitch costume to (stand_fucile3 v)\nwait (0.5) seconds\nswitch costume to (stand_fucile4 v)\nwait (0.5) seconds\nswitch costume to (stand_fucile5 v)\nwait (3) seconds\nbroadcast (off v)\nbroadcast (normal v)\nset [blocco_ v] to [0]\nchange [background v] by (1)\nhide\nstop [other scripts in sprite v]\n\n@Personaggio2\n\ndefine Cammina (direzione) (velocità)\npoint in direction (direzione)\nchange x by (velocità)\nset [pendenza v] to [0]\nrepeat until <<(Pendenza) = [8]> or <not <touching (linee calpestabili sfondo v)?>>>\n    change y by (1)\n    change [pendenza v] by (1)\nend\nif <(Pendenza) = [8]> then\n    change x by ((-1) * (velocità))\n    change y by ((-1) * (Pendenza))\nend\nif <(XSpeed) < [0]> then\n    change [frame v] by ((velocità) / (-8))\nelse\n    change [frame v] by ((velocità) / (8))\nend\n\ndefine Tocca terra <su?>\nchange [caduta v] by (1)\nrepeat until <not <touching (linee calpestabili sfondo v)?>>\n    if <su?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [caduta v] to [0]\n    end\n    set [yspeed v] to [0]\nend\n\ndefine Costume\nif <(Caduta) < [3]> then\n    if <(Frame) = [0]> then\n        switch costume to (stand_1 v)\n    else\n        switch costume to ([floor v] of ((4) + ((Frame) mod (8))) )\n    end\nelse\n    if <(YSpeed) > [0]> then\n        switch costume to (jump_1 v)\n    else\n        switch costume to (fall_1 v)\n    end\nend\n\nwhen flag clicked\nhide\npoint in direction (90)\ngo to x: (0) y: (0)\nset size to (25) %\nset rotation style [left-right v]\nset [yspeed v] to [0]\nset [frame v] to [0]\n\nwhen I receive [normal v]\ngo to x: (0) y: (0)\nshow\nforever\n    switch costume to (hitbox v)\n    if <<(YSpeed) < [4]> or <<key (w v) pressed?> or <<key (up arrow v) pressed?> or <key (space v) pressed?>>>> then\n        change [yspeed v] by (-1)\n    else\n        change [yspeed v] by (-2)\n    end\n    change y by (YSpeed)\n    Tocca terra <(YSpeed) > [0]>\n    set [xspeed v] to ((XSpeed) * (0.7))\n    if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n        change [xspeed v] by (1.5)\n    end\n    if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n        change [xspeed v] by (-1.5)\n    end\n    if <(XSpeed) > [0.5]> then\n        Cammina [90] (XSpeed)\n    else\n        if <(XSpeed) < [-0.5]> then\n            Cammina [-90] (XSpeed)\n        else\n            set [frame v] to [0]\n        end\n    end\n    if <<key (w v) pressed?> or <<key (up arrow v) pressed?> or <key (space v) pressed?>>> then\n        if <<(Salto) = [0]> and <(Caduta) = [0]>> then\n            set [yspeed v] to [14]\n            set [caduta v] to [6]\n            set [salto v] to [1]\n        end\n    else\n        set [salto v] to [0]\n    end\n    Costume\nend\n\n@Linee calpestabili sfondo\n\nwhen flag clicked\nset [ghost v] effect to (100)\ngo to x: (16) y: (-9)\nforever\n    switch costume to (Background)\nend\n\n@Banner\n\nwhen flag clicked\npoint in direction (90)\ngo to x: (0) y: (135)\ngo to [front v] layer\nset [tic v] to [0]\nforever\n    set drag mode [not draggable v]\n    point in direction (90)\n    switch costume to (Background)\n    set [color v] effect to ((([cos v] of ((tic) * (2)) ) * (10)) + (35))\n    change [tic v] by (5)\nend\n\nwhen flag clicked\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        repeat until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n            point in direction (-90)\n        end\n    end\nend\n\nchange [color v] effect by (1)\n\n@Boss\n\ndefine Parla (n elemento) (secondi per lettera) (secondi pausa finale)\nset [csg v] to []\nset [indicelettera v] to [1]\nrepeat until <(IndiceLettera) > (length of (item (n elemento) of [speak v]))>\n    if <(IndiceLettera) > ((length of (item (n elemento) of [speak v])) - (1))> then\n        say (join (CSG) (letter (IndiceLettera) of (item (n elemento) of [speak v]))) for (secondi pausa finale) seconds\n    else\n        say (join (CSG) (letter (IndiceLettera) of (item (n elemento) of [speak v]))) for (secondi per lettera) seconds\n    end\n    set [csg v] to (join (CSG) (letter (IndiceLettera) of (item (n elemento) of [speak v])))\n    change [indicelettera v] by (1)\nend\n\nwhen flag clicked\ngo to x: (8) y: (-83)\nhide\n\nwhen I receive [boss v]\nshow\nParla [1] [0.04] [1]\nbroadcast (boss-risposta v)\n\nwhen I receive [nani v]\nstart sound [NANIII v]\nParla [4] [0.04] [1.2]\nbroadcast (tutanvengi nevru v) and wait\n\nwhen I receive [off v]\nhide\n\n@Sfondo\n\nwhen flag clicked\ngo to [back v] layer\ngo to x: (0) y: (120)\nforever\n    switch costume to (Background)\nend\n\n@Spikes\n\nwhen flag clicked\ngo to [back v] layer\ngo to x: (0) y: (75)\nforever\n    switch costume to (Background)\nend\n\nset [background v] to [19]\n\n@Mute music\n\nwhen flag clicked\nset size to (20) %\ngo to x: (226) y: (-168)\nset [volume musica v] to [60]\nhide variable [volume musica v]\nset [chiudi v] to [1]\nshow\n\nwhen this sprite clicked\nif <(Chiudi) = [1]> then\n    set [chiudi v] to [0]\n    hide variable [volume musica v]\nelse\n    set [chiudi v] to [1]\n    show variable [volume musica v]\nend\n\n@Sprite1\n\nwhen flag clicked\ngo to x: (-1) y: (-28)\nhide\nforever\n    reset timer\nend\n\nwhen [timer v] > (0.25)\nif <(t?) = [1]> then\n    switch costume to (turbo mode v)\n    set size to (100) %\n    go to x: (-1) y: (-28)\n    go to [front v] layer\n    show\nelse\n    switch costume to (costume1 v)\n    go to x: (0) y: (110)\n    go to [front v] layer\n    show\n    repeat (20)\n        change y by (((0) - (y position)) / (4))\n    end\n    go to x: (0) y: (0)\nend\n\n
Funny!\nClick the text to flip it\nI know, it's sooooo difficult, but it's possible\nPart two: https://scratch.mit.edu/projects/398370209/\n