GREY a 8 bit Colorless Platformer + EDITOR
@Stage\n\nwhen flag clicked\nset [loading v] to [0]\nbroadcast (MAIN_MENU v) and wait\n\nwhen flag clicked\nshow list [shared_projects v]\n\nwhen I receive [back_to_main_menu v]\nbroadcast (MAIN_MENU v) and wait\n\nwhen I receive [main_menu v]\nstop all sounds\nforever\n    play sound [04 All of Us.mp3 v] until done\nend\n\nwhen I receive [show_menu v]\nstop [other scripts in stage v]\n\nwhen I receive [show_only_menu_bg v]\nstop [other scripts in stage v]\n\n@Editor\n\nwhen flag clicked\nset [never_saved v] to [0]\nset [key1_pressed v] to [0]\nset [printer v] to [0]\nset [gui_transparency v] to [0]\nset [number_of_levels v] to [10]\nset [local_grid_visible v] to [0]\nset [current_level v] to [1]\nerase all\nReset_List\nswitch costume to (1c v)\nset size to (300) %\nset [ghost v] effect to (100)\n\nwhen I receive [mouse_follow v]\nset [ghost v] effect to (50)\nif <(costume [number v]) > (Tiles_End)> then\n    switch costume to (Tiles_Start)\nend\nif <(costume [number v]) < (Tiles_Start)> then\n    switch costume to (Tiles_Start)\nend\nforever\n    Go_to_Mouse\n    if <mouse down?> then\n        if <(Mouse_Down) = [0]> then\n            set [mouse_down v] to [1]\n            if <(costume [number v]) = [1]> then\n                Erase\n            else\n                Stamp_Tile\n            end\n        end\n    else\n        set [mouse_down v] to [0]\n    end\nend\n\ndefine Stamp_Tile\nset [gui_transparency v] to [50]\nif <<(mouse x) < [240]> and <(mouse x) > [-240]>> then\n    if <<(mouse y) > [-180]> and <(mouse y) < [180]>> then\n        Go_to_Mouse\n        Record_Tile (x position) (y position) Record position in the grid and tile type\n    end\nend\n\ndefine None\nset [counter v] to (((1) + (((x position) + (225)) / (30))) + ((16) * (((y position) + (165)) / (30))))\nif <(Tiles_Type) = [hero]> then\n    Record_Hero (Counter)\nelse\n    if <(Tiles_Type) = [enemy]> then\n        Record_Enemy (Counter)\n    else\n        if <(Tiles_Type) = [exit]> then\n            Record_Exit_point (Counter)\n        else\n            if <<(Tiles_Type) = [terrain]> or <(Tiles_Type) = [hazard]>> then\n                if <<(item (193) of [temp v]) = (Counter)> or <(item (194) of [temp v]) = (Counter)>> then\n                else\n                    if <<(item (195) of [temp v]) = (Counter)> or <(item (196) of [temp v]) = (Counter)>> then\n                    else\n                        if <<(item (197) of [temp v]) = (Counter)> or <(item (198) of [temp v]) = (Counter)>> then\n                        else\n                            replace item (Counter) of [temp v] with (letter (1) of (item (costume [number v]) of [costume_letters v]))\n                            set [ghost v] effect to (0)\n                            stamp\n                            set [ghost v] effect to (50)\n                        end\n                    end\n                end\n            else\n                replace item (Counter) of [temp v] with (letter (1) of (item (costume [number v]) of [costume_letters v]))\n                set [ghost v] effect to (0)\n                stamp\n                set [ghost v] effect to (50)\n            end\n            Render_Again_This_Level\n        end\n    end\nend\n\ndefine Verify_User\nset [project_id v] to [0]\nif <(length of [projects v]) = [0]> then\n    Add_Guest_User\nend\nset [user_detect v] to []\nif <(username) = []> then\n    broadcast (Message_2_No_User v) and wait\nelse\n    set [counter v] to [0]\n    set [project_id v] to [0]\n    repeat (length of [projects v])\n        change [counter v] by (1)\n        set [letter_count v] to [0]\n        set [letter v] to [0]\n        repeat until <<(Letter) = [;]> or <(Letter) = []>>\n            change [letter_count v] by (1)\n            set [letter v] to (letter (Letter_Count) of (item (Counter) of [projects v]))\n            if <not <<(Letter) = [;]> or <(Letter) = []>>> then\n                set [user_detect v] to (join (User_Detect) (Letter))\n            end\n        end\n        if <(User_Detect) = (username)> then\n            set [project_id v] to (Counter)\n        end\n    end\n    if <(Project_ID) = [0]> then\n        set [never_saved v] to [1]\n        Reset_List\n    else\n        Load_Data (Project_ID)\n    end\n    broadcast (Message_4_Welcome v) and wait\n    broadcast (SHOW_GRID v)\n    broadcast (SHOW_MENU v) and wait\n    broadcast (SHOW_BUTTONS v) and wait\n    set [loading v] to [0]\nend\n\ndefine None\ndelete (all) of [temp v]\nset [counter v] to [0]\nrepeat (192)\n    change [counter v] by (1)\n    if <(letter (Counter) of (item (level) of [temp_levels v])) = []> then\n        add [0] to [temp v]\n    else\n        add (letter (Counter) of (item (level) of [temp_levels v])) to [temp v]\n    end\nend\nrepeat (6)\n    if <(letter (Counter) of (item (level) of [temp_levels v])) = []> then\n        add [0] to [temp v]\n    else\n        set [temporary_letter v] to []\n        change [counter v] by (1)\n        set [temporary_letter v] to (join (Temporary_Letter) (letter (Counter) of (item (level) of [temp_levels v])))\n        change [counter v] by (1)\n        set [temporary_letter v] to (join (Temporary_Letter) (letter (Counter) of (item (level) of [temp_levels v])))\n        change [counter v] by (1)\n        set [temporary_letter v] to (join (Temporary_Letter) (letter (Counter) of (item (level) of [temp_levels v])))\n        if <(Temporary_Letter) = [000]> then\n        else\n            if <(letter (1) of (Temporary_Letter)) = [0]> then\n                set [temporary_letter v] to (join (letter (2) of (Temporary_Letter)) (letter (3) of (Temporary_Letter)))\n                if <(letter (1) of (Temporary_Letter)) = [0]> then\n                    set [temporary_letter v] to (letter (2) of (Temporary_Letter))\n                end\n            else\n            end\n        end\n        add (Temporary_Letter) to [temp v]\n    end\nend\nchange [counter v] by (1)\nif <(letter (Counter) of (item (level) of [temp_levels v])) = []> then\n    add [101] to [temp v]\nelse\n    add (join (letter (Counter) of (item (level) of [temp_levels v])) (join (letter ((Counter) + (1)) of (item (level) of [temp_levels v])) (letter ((Counter) + (2)) of (item (level) of [temp_levels v])))) to [temp v]\nend\nRender_Backdrop\nerase all\nset [counter v] to [0]\ngo to x: ((-240) + (15)) y: ((-180) + (15))\nrepeat (12)\n    repeat (16)\n        change [counter v] by (1)\n        if <<(item (Counter) of [temp v]) = [0]> or <(item (Counter) of [temp v]) = []>> then\n        else\n            switch costume to (00 v)\n            set [costume_check v] to (costume [number v])\n            switch costume to (join (item (Counter) of [temp v]) [t])\n            if <(costume [number v]) = (Costume_Check)> then\n                switch costume to (join (item (Counter) of [temp v]) [c])\n            end\n            set [ghost v] effect to (0)\n            stamp\n            set [ghost v] effect to (50)\n        end\n        go to x: ((x position) + (30)) y: (y position)\n    end\n    go to x: ((-240) + (15)) y: ((y position) + (30))\nend\nset [counter_2 v] to [193]\nrepeat (6)\n    set [enemy_temp_costume v] to [0]\n    if <(item (Counter_2) of [temp v]) > [600]> then\n        set [enemy_temp_costume v] to ((item (Counter_2) of [temp v]) - (600))\n        replace item (Counter_2) of [temp v] with (Enemy_temp_costume)\n        set [enemy_temp_costume v] to [3]\n    else\n        if <(item (Counter_2) of [temp v]) > [400]> then\n            set [enemy_temp_costume v] to ((item (Counter_2) of [temp v]) - (400))\n            replace item (Counter_2) of [temp v] with (Enemy_temp_costume)\n            set [enemy_temp_costume v] to [2]\n        else\n            if <(item (Counter_2) of [temp v]) > [200]> then\n                set [enemy_temp_costume v] to ((item (Counter_2) of [temp v]) - (200))\n                replace item (Counter_2) of [temp v] with (Enemy_temp_costume)\n                set [enemy_temp_costume v] to [1]\n            else\n                set [enemy_temp_costume v] to [0]\n            end\n        end\n    end\n    if <not <(item (Counter_2) of [temp v]) = [000]>> then\n        go to x: ((-240) + (15)) y: ((-180) + (15))\n        if <((item (Counter_2) of [temp v]) mod (16)) = [0]> then\n            go to x: ((x position) + (((30) * (15)) - (0))) y: ((y position) + (((30) * ((item (Counter_2) of [temp v]) / (16))) - (30)))\n        else\n            go to x: ((x position) + ((30) * (((item (Counter_2) of [temp v]) mod (16)) - (1)))) y: ((y position) + ((30) * ([floor v] of ((item (Counter_2) of [temp v]) / (16)) )))\n        end\n        switch costume to ((((Counter_2) - (193)) + (51)) + (Enemy_temp_costume))\n        replace item (Counter_2) of [temp v] with ((item (Counter_2) of [temp v]) + ((200) * (Enemy_temp_costume)))\n        if <<(Counter_2) > [193]> and <(Counter_2) < [198]>> then\n            if <(item (Counter_2) of [temp v]) = [000]> then\n            else\n                if <(Enemy_temp_costume) = [0]> then\n                    switch costume to (uc v)\n                end\n                if <(Enemy_temp_costume) = [1]> then\n                    switch costume to (vt v)\n                end\n                if <(Enemy_temp_costume) = [2]> then\n                    switch costume to (vc v)\n                end\n                if <(Enemy_temp_costume) = [3]> then\n                    switch costume to (wt v)\n                end\n            end\n        end\n        set [ghost v] effect to (0)\n        stamp\n        set [ghost v] effect to (50)\n    end\n    change [counter_2 v] by (1)\nend\nbroadcast (SHOW_GRID v)\nset [ghost v] effect to (100)\n\ndefine None\nif <<(item (193) of [temp v]) = (Counter)> or <(item (194) of [temp v]) = (Counter)>> then\nelse\n    if <<(item (195) of [temp v]) = (Counter)> or <(item (196) of [temp v]) = (Counter)>> then\n    else\n        if <<(item (197) of [temp v]) = (Counter)> or <(item (198) of [temp v]) = (Counter)>> then\n        else\n            set [counter_2 v] to [0]\n            if <(item (194) of [temp v]) = [000]> then\n                set [counter_2 v] to [194]\n            else\n                if <(item (195) of [temp v]) = [000]> then\n                    set [counter_2 v] to [195]\n                else\n                    if <(item (196) of [temp v]) = [000]> then\n                        set [counter_2 v] to [196]\n                    else\n                        if <(item (197) of [temp v]) = [000]> then\n                            set [counter_2 v] to [197]\n                        else\n                            set [counter_2 v] to [0]\n                        end\n                    end\n                end\n            end\n            if <(Counter_2) > [0]> then\n                set [enemy_temp_costume v] to [0]\n                if <(costume [number v]) = [52]> then\n                    set [enemy_temp_costume v] to [0]\n                end\n                if <(costume [number v]) = [53]> then\n                    set [enemy_temp_costume v] to [200]\n                end\n                if <(costume [number v]) = [54]> then\n                    set [enemy_temp_costume v] to [400]\n                end\n                if <(costume [number v]) = [55]> then\n                    set [enemy_temp_costume v] to [600]\n                end\n                if <(item (counter) of [temp v]) = [i]> then\n                    replace item (Counter_2) of [temp v] with ((counter) + (Enemy_temp_costume))\n                    stamp\n                else\n                    if <(item (counter) of [temp v]) = [j]> then\n                        replace item (Counter_2) of [temp v] with ((counter) + (Enemy_temp_costume))\n                        stamp\n                    else\n                        if <(item (counter) of [temp v]) = [k]> then\n                            replace item (Counter_2) of [temp v] with ((counter) + (Enemy_temp_costume))\n                            stamp\n                        else\n                            if <(item (counter) of [temp v]) = [l]> then\n                                replace item (Counter_2) of [temp v] with ((counter) + (Enemy_temp_costume))\n                                stamp\n                            else\n                                if <(item (counter) of [temp v]) = [m]> then\n                                    replace item (Counter_2) of [temp v] with ((counter) + (Enemy_temp_costume))\n                                    stamp\n                                else\n                                    if <(item (counter) of [temp v]) = [n]> then\n                                        replace item (Counter_2) of [temp v] with ((counter) + (Enemy_temp_costume))\n                                        stamp\n                                    else\n                                        if <(item (counter) of [temp v]) = [o]> then\n                                            replace item (Counter_2) of [temp v] with ((counter) + (Enemy_temp_costume))\n                                            stamp\n                                        else\n                                            if <(item (counter) of [temp v]) = [p]> then\n                                                replace item (Counter_2) of [temp v] with ((counter) + (Enemy_temp_costume))\n                                                stamp\n                                            else\n                                                if <(item (counter) of [temp v]) = [0]> then\n                                                    replace item (Counter_2) of [temp v] with ((counter) + (Enemy_temp_costume))\n                                                    stamp\n                                                else\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n                Render_Again_This_Level\n            else\n                broadcast (Message_4_max_enemies v)\n            end\n        end\n    end\nend\n\ndefine Go_to_Mouse\nif <<(mouse x) < [240]> and <(mouse x) > [-240]>> then\n    if <<(mouse y) > [-180]> and <(mouse y) < [180]>> then\n        go to x: ((15) + (([floor v] of ((mouse x) / (30)) ) * (30))) y: ((15) + (([floor v] of ((mouse y) / (30)) ) * (30)))\n    end\nend\n\ndefine None\nif <<(item (193) of [temp v]) = (Counter)> or <(item (194) of [temp v]) = (Counter)>> then\nelse\n    if <<(item (195) of [temp v]) = (Counter)> or <(item (196) of [temp v]) = (Counter)>> then\n    else\n        if <(item (197) of [temp v]) = (Counter)> then\n        else\n            if <(item (counter) of [temp v]) = [i]> then\n                replace item (198) of [temp v] with (counter)\n                stamp\n            else\n                if <(item (counter) of [temp v]) = [j]> then\n                    replace item (198) of [temp v] with (counter)\n                    stamp\n                else\n                    if <(item (counter) of [temp v]) = [k]> then\n                        replace item (198) of [temp v] with (counter)\n                        stamp\n                    else\n                        if <(item (counter) of [temp v]) = [l]> then\n                            replace item (198) of [temp v] with (counter)\n                            stamp\n                        else\n                            if <(item (counter) of [temp v]) = [m]> then\n                                replace item (198) of [temp v] with (counter)\n                                stamp\n                            else\n                                if <(item (counter) of [temp v]) = [n]> then\n                                    replace item (198) of [temp v] with (counter)\n                                    stamp\n                                else\n                                    if <(item (counter) of [temp v]) = [o]> then\n                                        replace item (198) of [temp v] with (counter)\n                                        stamp\n                                    else\n                                        if <(item (counter) of [temp v]) = [p]> then\n                                            replace item (198) of [temp v] with (counter)\n                                            stamp\n                                        else\n                                            if <(item (counter) of [temp v]) = [0]> then\n                                                replace item (198) of [temp v] with (counter)\n                                                stamp\n                                            else\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n            Render_Again_This_Level\n        end\n    end\nend\n\ndefine Erase\nset [counter v] to (((1) + (((x position) + (225)) / (30))) + ((16) * (((y position) + (165)) / (30))))\nif <(item (193) of [temp v]) = (Counter)> then\n    replace item (193) of [temp v] with [000]\nelse\n    if <<<<(item (194) of [temp v]) = (Counter)> or <(item (194) of [temp v]) = ((Counter) + (200))>> or <(item (194) of [temp v]) = ((Counter) + (400))>> or <(item (194) of [temp v]) = ((Counter) + (600))>> then\n        replace item (194) of [temp v] with [000]\n    else\n        if <<<<(item (195) of [temp v]) = (Counter)> or <(item (195) of [temp v]) = ((Counter) + (200))>> or <(item (195) of [temp v]) = ((Counter) + (400))>> or <(item (195) of [temp v]) = ((Counter) + (600))>> then\n            replace item (195) of [temp v] with [000]\n        else\n            if <<<<(item (196) of [temp v]) = (Counter)> or <(item (196) of [temp v]) = ((Counter) + (200))>> or <(item (196) of [temp v]) = ((Counter) + (400))>> or <(item (196) of [temp v]) = ((Counter) + (600))>> then\n                replace item (196) of [temp v] with [000]\n            else\n                if <<<<(item (197) of [temp v]) = (Counter)> or <(item (197) of [temp v]) = ((Counter) + (200))>> or <(item (197) of [temp v]) = ((Counter) + (400))>> or <(item (197) of [temp v]) = ((Counter) + (600))>> then\n                    replace item (197) of [temp v] with [000]\n                else\n                    if <(item (198) of [temp v]) = (Counter)> then\n                        replace item (198) of [temp v] with [000]\n                    else\n                        replace item (Counter) of [temp v] with [0]\n                    end\n                end\n            end\n        end\n    end\nend\nRender_Again_This_Level\n\ndefine Render_Backdrop\nset [backdrop_frame v] to (letter (3) of (item (199) of [temp v]))\nswitch backdrop to (BACKDROP_FRAME)\n\ndefine Add_Guest_User\ndelete (all) of [temp_levels v]\nset [letter_count v] to [0]\nset [letter v] to []\nrepeat (199)\n    change [letter_count v] by (1)\n    set [letter v] to (join (Letter) (item (Letter_Count) of [temp v]))\nend\nrepeat (Number_of_Levels)\n    add (Letter) to [temp_levels v]\nend\nset [letter v] to (join [Guest] [;])\nset [letter_count v] to []\nset [counter v] to [0]\nrepeat (Number_of_Levels)\n    change [counter v] by (1)\n    set [letter_count v] to (join (Letter_Count) (item (Counter) of [temp_levels v]))\nend\nset [letter v] to (join (Letter) (Letter_Count))\nadd (Letter) to [projects v]\n\ndefine None\ndelete (all) of [temp_levels v]\nset [letter v] to []\nset [letter_count v] to [0]\nrepeat until <(Letter) = [;]>\n    change [letter_count v] by (1)\n    set [letter v] to (letter (Letter_Count) of (item (project_id) of [projects v]))\nend\nset [counter v] to [0]\nrepeat (Number_of_Levels)\n    change [counter v] by (1)\n    set [letter v] to []\n    repeat ((192) + ((7) * (3)))\n        change [letter_count v] by (1)\n        set [letter v] to (join (Letter) (letter (Letter_Count) of (item (project_id) of [projects v])))\n    end\n    insert (Letter) at (Counter) of [temp_levels v] \nend\nRender_Level (Current_Level)\n\ndefine None\nif <<(item (194) of [temp v]) = (Counter)> or <(item (195) of [temp v]) = (Counter)>> then\nelse\n    if <<(item (196) of [temp v]) = (Counter)> or <(item (197) of [temp v]) = (Counter)>> then\n    else\n        if <(item (198) of [temp v]) = (Counter)> then\n        else\n            if <(item (counter) of [temp v]) = [i]> then\n                replace item (193) of [temp v] with (counter)\n                stamp\n            else\n                if <(item (counter) of [temp v]) = [j]> then\n                    replace item (193) of [temp v] with (counter)\n                    stamp\n                else\n                    if <(item (counter) of [temp v]) = [k]> then\n                        replace item (193) of [temp v] with (counter)\n                        stamp\n                    else\n                        if <(item (counter) of [temp v]) = [l]> then\n                            replace item (193) of [temp v] with (counter)\n                            stamp\n                        else\n                            if <(item (counter) of [temp v]) = [m]> then\n                                replace item (193) of [temp v] with (counter)\n                                stamp\n                            else\n                                if <(item (counter) of [temp v]) = [n]> then\n                                    replace item (193) of [temp v] with (counter)\n                                    stamp\n                                else\n                                    if <(item (counter) of [temp v]) = [o]> then\n                                        replace item (193) of [temp v] with (counter)\n                                        stamp\n                                    else\n                                        if <(item (counter) of [temp v]) = [p]> then\n                                            replace item (193) of [temp v] with (counter)\n                                            stamp\n                                        else\n                                            if <(item (counter) of [temp v]) = [0]> then\n                                                replace item (193) of [temp v] with (counter)\n                                                stamp\n                                            else\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n            Render_Again_This_Level\n        end\n    end\nend\n\nwhen [left arrow v] key pressed\nif <(Printer) > [0]> then\n    if <(key2_Pressed) = [0]> then\n        set [key2_pressed v] to [1]\n        switch costume to ((costume [number v]) - (1))\n        if <(costume [number v]) < (Tiles_Start)> then\n            switch costume to (Tiles_End)\n        end\n        forever\n            if <not <key (left arrow v) pressed?>> then\n                set [key2_pressed v] to [0]\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen [right arrow v] key pressed\nif <(Printer) > [0]> then\n    if <(key1_Pressed) = [0]> then\n        set [key1_pressed v] to [1]\n        switch costume to ((costume [number v]) + (1))\n        if <(costume [number v]) > (Tiles_End)> then\n            switch costume to (Tiles_Start)\n        end\n        forever\n            if <not <key (right arrow v) pressed?>> then\n                set [key1_pressed v] to [0]\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen [up arrow v] key pressed\nif <(Printer) > [0]> then\n    if <(key1_Pressed) = [0]> then\n        set [key1_pressed v] to [1]\n        switch costume to ((costume [number v]) + (1))\n        if <(costume [number v]) > (Tiles_End)> then\n            switch costume to (Tiles_Start)\n        end\n        forever\n            if <not <key (right arrow v) pressed?>> then\n                set [key1_pressed v] to [0]\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen [down arrow v] key pressed\nif <(Printer) > [0]> then\n    if <(key2_Pressed) = [0]> then\n        set [key2_pressed v] to [1]\n        switch costume to ((costume [number v]) - (1))\n        if <(costume [number v]) < (Tiles_Start)> then\n            switch costume to (Tiles_End)\n        end\n        forever\n            if <not <key (left arrow v) pressed?>> then\n                set [key2_pressed v] to [0]\n                stop [this script v]\n            end\n        end\n    end\nend\n\ndefine Create_A_New_Data\ndelete (all) of [temp_levels v]\nset [letter_count v] to [0]\nset [letter v] to []\nrepeat (199)\n    change [letter_count v] by (1)\n    set [letter v] to (join (Letter) (item (Letter_Count) of [temp v]))\nend\nrepeat (Number_of_Levels)\n    add (Letter) to [temp_levels v]\nend\nset [letter v] to (join (username) [;])\nset [letter_count v] to []\nset [counter v] to [0]\nrepeat (Number_of_Levels)\n    change [counter v] by (1)\n    set [letter_count v] to (join (Letter_Count) (item (Counter) of [temp_levels v]))\nend\nset [letter v] to (join (Letter) (Letter_Count))\nadd (Letter) to [projects v]\n\ndefine Render_Again_This_Level\nRender_Backdrop\nset [letter v] to (costume [number v])\nerase all\nset [counter v] to [0]\ngo to x: ((-240) + (15)) y: ((-180) + (15))\nrepeat (12)\n    repeat (16)\n        change [counter v] by (1)\n        if <<(item (Counter) of [temp v]) = [0]> or <(item (Counter) of [temp v]) = []>> then\n        else\n            switch costume to (00 v)\n            set [costume_check v] to (costume [number v])\n            switch costume to (join (item (Counter) of [temp v]) [t])\n            if <(costume [number v]) = (Costume_Check)> then\n                switch costume to (join (item (Counter) of [temp v]) [c])\n            end\n            set [ghost v] effect to (0)\n            stamp\n            set [ghost v] effect to (50)\n        end\n        go to x: ((x position) + (30)) y: (y position)\n    end\n    go to x: ((-240) + (15)) y: ((y position) + (30))\nend\nset [counter_2 v] to [193]\nrepeat (6)\n    set [enemy_temp_costume v] to [0]\n    if <(item (Counter_2) of [temp v]) > [600]> then\n        set [enemy_temp_costume v] to ((item (Counter_2) of [temp v]) - (600))\n        replace item (Counter_2) of [temp v] with (Enemy_temp_costume)\n        set [enemy_temp_costume v] to [3]\n    else\n        if <(item (Counter_2) of [temp v]) > [400]> then\n            set [enemy_temp_costume v] to ((item (Counter_2) of [temp v]) - (400))\n            replace item (Counter_2) of [temp v] with (Enemy_temp_costume)\n            set [enemy_temp_costume v] to [2]\n        else\n            if <(item (Counter_2) of [temp v]) > [200]> then\n                set [enemy_temp_costume v] to ((item (Counter_2) of [temp v]) - (200))\n                replace item (Counter_2) of [temp v] with (Enemy_temp_costume)\n                set [enemy_temp_costume v] to [1]\n            else\n                set [enemy_temp_costume v] to [0]\n            end\n        end\n    end\n    if <not <(item (Counter_2) of [temp v]) = [000]>> then\n        go to x: ((-240) + (15)) y: ((-180) + (15))\n        if <((item (Counter_2) of [temp v]) mod (16)) = [0]> then\n            go to x: ((x position) + (((30) * (15)) - (0))) y: ((y position) + (((30) * ((item (Counter_2) of [temp v]) / (16))) - (30)))\n        else\n            go to x: ((x position) + ((30) * (((item (Counter_2) of [temp v]) mod (16)) - (1)))) y: ((y position) + ((30) * ([floor v] of ((item (Counter_2) of [temp v]) / (16)) )))\n        end\n        switch costume to ((((Counter_2) - (193)) + (51)) + (Enemy_temp_costume))\n        replace item (Counter_2) of [temp v] with ((item (Counter_2) of [temp v]) + ((200) * (Enemy_temp_costume)))\n        if <<(Counter_2) > [193]> and <(Counter_2) < [198]>> then\n            if <(item (Counter_2) of [temp v]) = [000]> then\n            else\n                if <(Enemy_temp_costume) = [0]> then\n                    switch costume to (uc v)\n                end\n                if <(Enemy_temp_costume) = [1]> then\n                    switch costume to (vt v)\n                end\n                if <(Enemy_temp_costume) = [2]> then\n                    switch costume to (vc v)\n                end\n                if <(Enemy_temp_costume) = [3]> then\n                    switch costume to (wt v)\n                end\n            end\n        end\n        set [ghost v] effect to (0)\n        stamp\n        set [ghost v] effect to (50)\n    end\n    change [counter_2 v] by (1)\nend\nGo_to_Mouse\nbroadcast (SHOW_GRID v)\nswitch costume to (Letter)\n\ndefine Reset_List\ndelete (all) of [temp v]\nrepeat (192)\n    add [0] to [temp v]\nend\nrepeat (6)\n    add [000] to [temp v]\nend\nadd [101] to [temp v]\nset [backdrop_frame v] to [1]\ndelete (all) of [temp_levels v]\nrepeat (Number_of_Levels)\n    set [letter v] to []\n    repeat (192)\n        set [letter v] to (join (Letter) [0])\n    end\n    repeat (6)\n        set [letter v] to (join (Letter) [000])\n    end\n    set [letter v] to (join (Letter) [101])\n    add (Letter) to [temp_levels v]\nend\nswitch backdrop to (BACKDROP_FRAME)\nset [music v] to [1]\n\nwhen I receive [close editor v]\nset [ghost v] effect to (100)\n\nwhen I receive [render_again_this_level v]\nRender_Again_This_Level\nset [local_grid_visible v] to (Grid_Visible)\n\nwhen I receive [render_level v]\nRender_Level (Next_Level)\nset [current_level v] to (Next_Level)\n\nwhen I receive [stop_editing v]\nset [ghost v] effect to (100)\nif <(Local_Grid_Visible) = (Grid_Visible)> then\n    stop [other scripts in sprite v]\nend\n\nwhen I receive [exit_menu v]\nif <(Printer) > [0]> then\n    broadcast (MOUSE_FOLLOW v)\nend\n\nwhen I receive [show_only_menu_bg v]\nVerify_User\n\nwhen I receive [show_menu v]\nset [printer v] to [0]\nset [key1_pressed v] to [0]\nstop [other scripts in sprite v]\nRender_Again_This_Level\nset [ghost v] effect to (100)\nif <not <(LOADING) = [2]>> then\n    broadcast (SHOW_BUTTONS v)\n    set [loading v] to [0]\nelse\n    set [next_level v] to [1]\n    broadcast (RENDER_NEW_LEVEL_IN_GAME v) and wait\n    wait (2) seconds\n    set [loading v] to [0]\n    broadcast (Q_to_quit v) and wait\n    broadcast (TEST_LEVEL v) and wait\n    broadcast (Start_Level v)\nend\n\nReset_List\nbroadcast (SHOW_GRID v)\nbroadcast (SHOW_MENU v) and wait\n\n@Grid\n\ndefine Draw_Grid\ngo to x: (-240) y: (180)\nrepeat (15)\n    go to x: ((x position) + (30)) y: (180)\n    pen down\n    go to x: (x position) y: (-180)\n    pen up\nend\ngo to x: (-240) y: (-180)\nrepeat (11)\n    go to x: (-240) y: ((y position) + (30))\n    pen down\n    go to x: (240) y: (y position)\n    pen up\nend\n\nwhen flag clicked\nset [grid_visible v] to [0]\nset pen color to (#000000)\nset pen size to (1)\n\nwhen I receive [show_grid v]\nif <(Grid_Visible) = [1]> then\n    Draw_Grid\nend\n\nbroadcast (SHOW_GRID v)\n\n@Menu_Bg\n\nwhen I receive [show_only_menu_bg v]\nset [ghost v] effect to (20)\nswitch costume to (costume2 v)\nshow\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nset [ghost v] effect to (20)\nset [menu_visible v] to [0]\nset [menu_visible v] to [1]\n\nwhen I receive [main_menu v]\nset [ghost v] effect to (0)\nswitch costume to (costume4 v)\nshow\n\nwhen [space v] key pressed\nif <(DIS_IS_A_TEST) > [99]> then\nelse\n    if <(Menu_Visible) = [0]> then\n        set [mouse_down v] to [1]\n        set [menu_visible v] to [1]\n        broadcast (SHOW_MENU v)\n        wait (0.1) seconds\n        broadcast (SHOW_MENU v)\n    end\nend\n\nwhen I receive [close editor v]\nif <(Menu_Visible) = [0]> then\n    set [mouse_down v] to [1]\n    set [menu_visible v] to [1]\n    broadcast (SHOW_MENU v)\n    wait (0.1) seconds\n    broadcast (SHOW_MENU v)\nend\n\nwhen I receive [show_background_selection v]\nset [ghost v] effect to (20)\nswitch costume to (costume3 v)\nshow\n\nwhen I receive [test_level v]\nset [menu_visible v] to [0]\nhide\n\nwhen I receive [invalid_input v]\nset [ghost v] effect to (0)\nswitch costume to (costume6 v)\nshow\nwait (2) seconds\nswitch costume to (costume5 v)\n\nwhen I receive [exit_menu v]\nset [menu_visible v] to [0]\nhide\n\nwhen I receive [show_menu v]\nset [ghost v] effect to (20)\nswitch costume to (costume1 v)\nshow\n\nwhen [q v] key pressed\nif <(DIS_IS_A_TEST) > [99]> then\n    set [mouse_down v] to [1]\n    set [menu_visible v] to [1]\n    set [loading v] to [1]\n    wait (0.2) seconds\n    broadcast (SHOW_MENU v) and wait\n    set [loading v] to [0]\n    broadcast (BACK_TO_MAIN_MENU v)\n    set [current_level v] to [1]\nelse\nend\n\nwhen I receive [load_a_shared_game v]\nset [ghost v] effect to (0)\nswitch costume to (costume5 v)\nshow\n\nwhen I receive [invalid_number v]\nset [ghost v] effect to (0)\nswitch costume to (costume7 v)\nshow\nwait (2) seconds\nswitch costume to (costume5 v)\n\nwhen I receive [show_music_selection v]\nset [ghost v] effect to (20)\nswitch costume to (costume8 v)\nshow\n\ngo [backward v] (1) layers\n\n@Button2\n\ndefine None\nset [counter v] to [0]\nset [string v] to []\nrepeat (192)\n    change [counter v] by (1)\n    set [string v] to (join (String) (item (Counter) of [temp v]))\nend\nrepeat (6)\n    change [counter v] by (1)\n    if <(length of (item (Counter) of [temp v])) = [1]> then\n        set [string v] to (join (String) (join [00] (item (Counter) of [temp v])))\n    else\n        if <(length of (item (Counter) of [temp v])) = [2]> then\n            set [string v] to (join (String) (join [0] (item (Counter) of [temp v])))\n        else\n            set [string v] to (join (String) (item (Counter) of [temp v]))\n        end\n    end\nend\nchange [counter v] by (1)\nset [string v] to (join (String) (item (Counter) of [temp v]))\nreplace item (current_level) of [temp_levels v] with (String)\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\nswitch costume to (costume1 v)\nset [current_level v] to [1]\n\nbroadcast (SAVE_IN_CLOUD v) and wait\n\nwhen I receive [show_buttons v]\nswitch costume to (costume1 v)\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\ndefine Overwrite_User\nset [project_id v] to [0]\nset [user_detect v] to []\nif <(username) = []> then\n    broadcast (Message_3_Cant_Save v) and wait\n    set [user_detect v] to [Guest]\nelse\n    if <(NEVER_SAVED) = [1]> then\n        Create_a_new_data\n    end\n    set [never_saved v] to [0]\n    set [counter v] to [0]\n    set [project_id v] to [0]\n    repeat (length of [projects v])\n        change [counter v] by (1)\n        set [letter_count v] to [0]\n        set [letter v] to [0]\n        repeat until <<(Letter) = [;]> or <(Letter) = []>>\n            change [letter_count v] by (1)\n            set [letter v] to (letter (Letter_Count) of (item (Counter) of [projects v]))\n            if <not <<(Letter) = [;]> or <(Letter) = []>>> then\n                set [user_detect v] to (join (User_Detect) (Letter))\n            end\n        end\n        if <(User_Detect) = (username)> then\n            set [project_id v] to (Counter)\n        end\n    end\n    Save_All (username) (Project_ID)\n    broadcast (Message_1_Saved v)\nend\n\nwhen I receive [save_user_project v]\nOverwrite_User\n\ndefine None\nSave_level (Current_Level)\nset [letter v] to []\nset [letter v] to (join (username) [;])\nset [letter_count v] to []\nset [counter v] to [0]\nrepeat (Number_of_Levels)\n    change [counter v] by (1)\n    set [letter_count v] to (join (Letter_Count) (item (Counter) of [temp_levels v]))\nend\nset [letter v] to (join (Letter) (Letter_Count))\nreplace item (user_id) of [projects v] with (Letter)\n\nwhen I receive [exit_menu v]\nhide\n\ndefine Delete_User\nset [project_id v] to [0]\nset [user_detect v] to []\nif <(username) = []> then\nelse\n    set [counter v] to [0]\n    set [project_id v] to [0]\n    repeat (length of [projects v])\n        change [counter v] by (1)\n        set [letter_count v] to [0]\n        set [letter v] to [0]\n        repeat until <<(Letter) = [;]> or <(Letter) = []>>\n            change [letter_count v] by (1)\n            set [letter v] to (letter (Letter_Count) of (item (Counter) of [projects v]))\n            if <not <<(Letter) = [;]> or <(Letter) = []>>> then\n                set [user_detect v] to (join (User_Detect) (Letter))\n            end\n        end\n        if <(User_Detect) = (username)> then\n            set [project_id v] to (Counter)\n            delete (Project_ID) of [projects v]\n        end\n    end\nend\n\nwhen I receive [render_new_level_in_game v]\nstop [other scripts in sprite v]\nSave_level (Current_Level)\nset [current_level v] to (Next_Level)\nbroadcast (RENDER_LEVEL v)\n\nwhen I receive [show_background_selection v]\nhide\n\nwhen I receive [share_this v]\nstop [other scripts in sprite v]\nif <(username) = []> then\nelse\n    if <[shared_projects v] contains (username)?> then\n        Overwrite_User\n    else\n        add (username) to [shared_projects v]\n    end\n    broadcast (SHOW_BUTTONS v)\nend\n\nwhen I receive [delete_user_data v]\nDelete_User\n\nwhen I receive [show_music_selection v]\nhide\n\nwhen this sprite clicked\nstop [other scripts in sprite v]\nswitch costume to (costume3 v)\nwait (0.2) seconds\nSave_level (Current_Level)\nswitch costume to (costume1 v)\nbroadcast (SAVE_USER_PROJECT v) and wait\nbroadcast (SHOW_BUTTONS v)\n\nwhen I receive [test_level v]\nhide\n\nwhen I receive [back_to_main_menu v]\nhide\n\nwhen I receive [save_level_and_render_new v]\nstop [other scripts in sprite v]\nwait (0.2) seconds\nSave_level (Current_Level)\nset [current_level v] to (Next_Level)\nbroadcast (RENDER_LEVEL v)\nbroadcast (SHOW_MENU v)\n\ndefine Create_a_new_data\ndelete (all) of [temp_levels v]\nset [letter_count v] to [0]\nset [letter v] to []\nrepeat (192)\n    set [letter v] to (join (Letter) [0])\nend\nrepeat (6)\n    set [letter v] to (join (Letter) [000])\nend\nset [letter v] to (join (Letter) [101])\nrepeat (Number_of_Levels)\n    add (Letter) to [temp_levels v]\nend\nset [letter v] to (join (username) [;])\nset [letter_count v] to []\nset [counter v] to [0]\nrepeat (Number_of_Levels)\n    change [counter v] by (1)\n    set [letter_count v] to (join (Letter_Count) (item (Counter) of [temp_levels v]))\nend\nset [letter v] to (join (Letter) (Letter_Count))\ndelete (all) of [projects v]\nadd (Letter) to [projects v]\n\n@Levels_label\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\nswitch costume to (costume1 v)\n\nwhen I receive [show_buttons v]\nswitch costume to (costume1 v)\nshow\nforever\n    switch costume to (Current_Level)\nend\n\nwhen I receive [exit_menu v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [show_background_selection v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [test_level v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [back_to_main_menu v]\nhide\n\nwhen I receive [show_music_selection v]\nstop [other scripts in sprite v]\nhide\n\n@Button3-4\n\nwhen I receive [exit_menu v]\nhide\n\nwhen I start as a clone\nset rotation style [left-right v]\npoint in direction (-90)\ngo to x: (((x position) + (480)) - (215)) y: (y position)\nset [ghost v] effect to (0)\nswitch costume to (costume1 v)\n\nwhen flag clicked\nhide\ncreate clone of (_myself_ v)\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\nswitch costume to (costume1 v)\nset [current_level v] to [1]\n\nwhen this sprite clicked\nif <(mouse x) < [130]> then\n    set [next_level v] to ((Current_Level) - (1))\n    if <(Next_Level) < [1]> then\n        set [next_level v] to [1]\n    end\nelse\n    set [next_level v] to ((Current_Level) + (1))\n    if <(Next_Level) > (Number_of_Levels)> then\n        set [next_level v] to (Number_of_Levels)\n    end\nend\nswitch costume to (costume3 v)\nif <(Next_Level) = (Current_Level)> then\nelse\n    broadcast (SHOW_MENU v)\n    broadcast (SAVE_LEVEL_AND_RENDER_NEW v)\nend\nwait (0.3) seconds\nswitch costume to (costume1 v)\n\nwhen I receive [show_background_selection v]\nhide\n\nwhen I receive [show_buttons v]\nswitch costume to (costume1 v)\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [test_level v]\nhide\n\nwhen I receive [back_to_main_menu v]\nhide\n\nwhen I receive [show_music_selection v]\nhide\n\n@Messages\n\nwhen I receive [message_1_saved v]\nset [ghost v] effect to (0)\ngo to [front v] layer\nswitch costume to (costume1 v)\nshow\nwait (2) seconds\nhide\n\nwhen I receive [message_2_no_user v]\nset [ghost v] effect to (0)\ngo to [front v] layer\nswitch costume to (costume2 v)\nshow\nwait (4) seconds\nhide\n\nwhen I receive [message_3_cant_save v]\nset [ghost v] effect to (0)\ngo to [front v] layer\nswitch costume to (costume3 v)\nshow\nwait (2) seconds\nhide\n\nwhen I receive [tool_tip_show v]\nstop [other scripts in sprite v]\ngo to [front v] layer\nswitch costume to (([tool_tip_n v] of [navigator3 v]) + (4))\nCalculate_tool_tip_time\nshow\nforever\n    if <<(Tool_Tip_Visible) > [0]> and <(Tool_Tip_Visible) < (Tool_Tip_Time)>> then\n        if <(Tooltip_Transparency) > [50]> then\n            change [tooltip_transparency v] by (-2)\n            set [ghost v] effect to (Tooltip_Transparency)\n        else\n            change [tool_tip_visible v] by (1)\n        end\n    else\n        if <(Tooltip_Transparency) < [100]> then\n            change [tooltip_transparency v] by (2)\n            set [ghost v] effect to (Tooltip_Transparency)\n        end\n    end\nend\n\nwhen I receive [message_4_welcome v]\nset [ghost v] effect to (0)\ngo to [front v] layer\nswitch costume to (costume4 v)\nshow\nwait (0.5) seconds\nset [temp_text v] to (join [Welcome    ] (username))\nsay (Temp_text) for (3) seconds\nwait (0.5) seconds\nhide\n\nwhen flag clicked\nset [waiting v] to [0]\nset [tool_tip_time v] to [100]\nset [ghost v] effect to (0)\ngo to x: (0) y: (0)\nhide\n\ndefine Calculate_tool_tip_time\nif <(costume [number v]) = [5]> then\n    set [tool_tip_time v] to [100]\nend\nif <(costume [number v]) = [6]> then\n    set [tool_tip_time v] to [300]\nend\nif <(costume [number v]) = [7]> then\n    set [tool_tip_time v] to [300]\nend\nif <(costume [number v]) = [8]> then\n    set [tool_tip_time v] to [300]\nend\nif <(costume [number v]) = [9]> then\n    set [tool_tip_time v] to [200]\nend\nif <(costume [number v]) = [10]> then\n    set [tool_tip_time v] to [350]\nend\nif <(costume [number v]) = [11]> then\n    set [tool_tip_time v] to [200]\nend\nif <(costume [number v]) = [12]> then\n    set [tool_tip_time v] to [100]\nend\nif <(costume [number v]) = [13]> then\n    set [tool_tip_time v] to [100]\nend\n\nwhen I receive [show_menu v]\nhide\n\nwhen I receive [message_4_max_enemies v]\nstop [other scripts in sprite v]\ngo to [front v] layer\nswitch costume to (costume14 v)\nset [tool_tip_time v] to [50]\nset [tool_tip_visible_2 v] to [1]\nset [tooltip_transparency v] to [100]\nshow\nforever\n    if <<(Tool_tip_Visible_2) > [0]> and <(Tool_tip_Visible_2) < (Tool_Tip_Time)>> then\n        if <(Tooltip_Transparency) > [50]> then\n            change [tooltip_transparency v] by (-2)\n            set [ghost v] effect to (Tooltip_Transparency)\n        else\n            change [tool_tip_visible_2 v] by (1)\n        end\n    else\n        if <(Tooltip_Transparency) < [100]> then\n            change [tooltip_transparency v] by (2)\n            set [ghost v] effect to (Tooltip_Transparency)\n        end\n    end\nend\n\nwhen I receive [show_background_selection v]\nhide\n\nwhen I receive [test_level v]\nhide\n\nwhen I receive [test_level v]\nstop [other scripts in sprite v]\nif <(DIS_IS_A_TEST) = [1]> then\n    set [dis_is_a_test v] to [2]\n    set [ghost v] effect to (0)\n    go to [front v] layer\n    switch costume to (costume15 v)\n    show\n    wait (3) seconds\n    hide\nend\nif <(DIS_IS_A_TEST) = [3]> then\n    set [dis_is_a_test v] to [4]\n    set [ghost v] effect to (0)\n    go to [front v] layer\n    switch costume to (costume17 v)\n    show\n    wait (2) seconds\n    hide\nend\nif <(DIS_IS_A_TEST) = [100]> then\n    set [dis_is_a_test v] to [101]\n    set [ghost v] effect to (0)\n    go to [front v] layer\n    switch costume to (costume17 v)\n    show\n    wait (2) seconds\n    hide\nend\n\nwhen I receive [back_to_main_menu v]\nhide\n\nwhen I receive [end_level v]\nstop [other scripts in sprite v]\nif <<(DIS_IS_A_TEST) < [3]> and <not <(DIS_IS_A_TEST) = [0]>>> then\n    set [dis_is_a_test v] to [0]\n    set [ghost v] effect to (0)\n    go to [front v] layer\n    switch costume to (costume16 v)\n    show\n    wait (3) seconds\n    hide\n    set [mouse_down v] to [1]\n    set [menu_visible v] to [1]\n    broadcast (SHOW_MENU v)\n    wait (0.1) seconds\n    broadcast (SHOW_MENU v)\nend\nif <(DIS_IS_A_TEST) = [4]> then\n    wait (0.1) seconds\n    switch costume to ((17) + (Current_Level))\n    show\n    set [next_level v] to ((Current_Level) + (1))\n    if <(Next_Level) > (Number_of_Levels)> then\n        show\n        broadcast (END_MUSIC v) and wait\n        set [next_level v] to (Number_of_Levels)\n        set [ghost v] effect to (0)\n        go to [front v] layer\n        switch costume to (costume34 v)\n        wait (0.1) seconds\n        start sound [dance around v]\n    else\n        broadcast (RENDER_NEW_LEVEL_IN_GAME v) and wait\n        wait (2) seconds\n        hide\n        broadcast (TEST_LEVEL v)\n        broadcast (Start_Level v)\n    end\nend\nif <(DIS_IS_A_TEST) = [101]> then\n    wait (0.1) seconds\n    switch costume to ((17) + (Current_Level))\n    show\n    set [next_level v] to ((Current_Level) + (1))\n    if <(Next_Level) > (Number_of_Levels)> then\n        show\n        broadcast (END_MUSIC v) and wait\n        set [next_level v] to (Number_of_Levels)\n        set [ghost v] effect to (0)\n        go to [front v] layer\n        switch costume to (costume34 v)\n        wait (0.1) seconds\n        start sound [dance around v]\n    else\n        broadcast (RENDER_NEW_LEVEL_IN_GAME v) and wait\n        wait (2) seconds\n        hide\n        broadcast (TEST_LEVEL v)\n        broadcast (Start_Level v)\n    end\nend\n\nwhen I receive [q_to_quit v]\nset [waiting v] to [1]\nset [ghost v] effect to (0)\ngo to [front v] layer\nswitch costume to (costume27 v)\nshow\nrepeat until <(WAITING) = [0]>\nend\n\nset [ghost v] effect to (0)\n\nwhen I receive [show_music_selection v]\nhide\n\nwhen I receive [message_5_wanna_remix v]\nset [ghost v] effect to (0)\ngo to [front v] layer\nswitch costume to (costume29 v)\nshow\nset [go_on v] to [1]\nwait until <(Go_On) = [2]>\nset [go_on v] to [0]\nswitch costume to (costume28 v)\nshow\nwait until <(In Editor?) = [true]>\nset [remixer v] to (username)\nwait (1) seconds\nswitch costume to (costume30 v)\nset [go_on v] to [1]\nwait until <(Go_On) = [2]>\nset [go_on v] to [0]\nswitch costume to (costume31 v)\nset [go_on v] to [1]\nwait until <(Go_On) = [2]>\nset [go_on v] to [0]\nswitch costume to (costume32 v)\nset [go_on v] to [1]\nwait until <(Go_On) = [2]>\nset [go_on v] to [0]\nswitch costume to (costume33 v)\nset [go_on v] to [1]\nwait until <(Go_On) = [2]>\nset [go_on v] to [0]\nswitch costume to (costume33 v)\nstop [all v]\n\nwhen [any v] key pressed\nif <(WAITING) = [1]> then\n    set [waiting v] to [0]\nend\nif <(Go_On) = [1]> then\n    set [go_on v] to [2]\nend\n\nwhen this sprite clicked\nif <(Go_On) = [1]> then\n    set [go_on v] to [2]\nend\nif <(costume [number v]) = [34]> then\n    stop all sounds\n    set [mouse_down v] to [1]\n    set [menu_visible v] to [1]\n    set [loading v] to [1]\n    broadcast (SHOW_MENU v) and wait\n    set [loading v] to [0]\n    broadcast (BACK_TO_MAIN_MENU v)\n    set [current_level v] to [1]\n    hide\nend\n\n@Navigator\n\nwhen flag clicked\ngo to x: (71) y: (23)\nhide\n\nwhen I receive [exit_menu v]\nshow\nforever\n    set [ghost v] effect to (GUI_transparency)\n    go to (navigator2 v)\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        set [gui_transparency v] to [0]\n    end\n    if <touching (mouse-pointer v)?> then\n        broadcast (STOP_EDITING v)\n    end\n    if <<not <touching (mouse-pointer v)?>> and <not <mouse down?>>> then\n        broadcast (EXIT_MENU v)\n        set [local_timer v] to [0]\n    end\n    if <<touching (mouse-pointer v)?> and <not <mouse down?>>> then\n        broadcast (EXIT_MENU v)\n        if <<(Local_Timer) < [20]> and <(Local_Timer) > [0]>> then\n            set [local_timer v] to [41]\n        end\n        if <<(Local_Timer) < [60]> and <(Local_Timer) > [40]>> then\n            set [local_timer v] to [40]\n        end\n        if <(Local_Timer) = [60]> then\n            set [local_timer v] to [0]\n        end\n    end\nend\n\nwhen I receive [show_menu v]\nhide\nstop [other scripts in sprite v]\n\n@Navigator2\n\nwhen flag clicked\ngo to x: (71) y: (23)\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [exit_menu v]\nshow\nset [local_timer v] to [0]\nforever\n    if <<touching (mouse-pointer v)?> and <not <mouse down?>>> then\n        broadcast (STOP_EDITING v)\n        set [dx v] to ((x position) - (mouse x))\n        set [dy v] to ((y position) - (mouse y))\n    end\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        set [gui_transparency v] to [0]\n        if <(Local_Timer) = [20]> then\n            set [local_timer v] to [1]\n        end\n        if <(Local_Timer) = [0]> then\n            set [local_timer v] to [1]\n        end\n        go to x: ((DX) + (mouse x)) y: ((DY) + (mouse y))\n    end\n    if <<not <touching (mouse-pointer v)?>> and <mouse down?>> then\n        if <<(Local_Timer) < [20]> and <(Local_Timer) > [0]>> then\n            change [local_timer v] by (1)\n            go to x: ((DX) + (mouse x)) y: ((DY) + (mouse y))\n        end\n        if <(Local_Timer) = [20]> then\n            set [local_timer v] to [0]\n        end\n    end\nend\n\nwhen I receive [show_menu v]\nhide\nstop [other scripts in sprite v]\n\n@Navigator3\n\nwhen I receive [show_menu v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen flag clicked\ngo to x: (71) y: (23)\nset [mouse_clicked v] to [0]\nset [tooltip_transparency v] to [100]\nset [tool_tip_n v] to [0]\nhide\n\nwhen I receive [inizialize_navigator v]\nset [mouse_clicked v] to [0]\nCreate_Clones\nbroadcast (INIZIALIZE_TOOL_TIP v)\n\nwhen I receive [inizialize_tool_tip v]\nset [clone_n v] to [1000]\ncreate clone of (_myself_ v)\nforever\n    if <not <mouse down?>> then\n        set [mouse_down_2 v] to [0]\n    end\n    if <[clone_touched? v] contains [true]?> then\n        Detect_Clone_Touching\n    end\nend\n\ndefine Create_Clones\ndelete (all) of [costume_list v]\ndelete (all) of [clone_touched? v]\nset [counter v] to [-1]\nset [clone_n v] to [0]\ngo to [front v] layer\nrepeat (9)\n    set [counter v] to ((Counter) + (3))\n    change [clone_n v] by (1)\n    add (Counter) to [costume_list v]\n    add [] to [clone_touched? v]\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset [color v] effect to (0)\nshow\nset [clone_id v] to (Clone_N)\nif <(Clone_ID) = [1]> then\n    if <(Grid_Visible) = [1]> then\n        switch costume to ((Counter) + (2))\n    else\n        switch costume to (Counter)\n    end\nelse\n    switch costume to (Counter)\nend\nif <(Clone_ID) = [1000]> then\n    switch costume to (1 v)\n    set [ghost v] effect to (Tooltip_Transparency)\n    go to x: (0) y: (0)\n    show\nend\nforever\n    if <(Clone_ID) = [1000]> then\n        if <<(Tool_Tip_Visible) > [0]> and <(Tool_Tip_Visible) < (Tool_Tip_Time)>> then\n            if <(Tooltip_Transparency) > [50]> then\n                change [tooltip_transparency v] by (-2)\n                set [ghost v] effect to (Tooltip_Transparency)\n            else\n                change [tool_tip_visible v] by (1)\n            end\n        else\n            if <(Tooltip_Transparency) < [100]> then\n                change [tooltip_transparency v] by (2)\n                set [ghost v] effect to (Tooltip_Transparency)\n            end\n        end\n    else\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            set [gui_transparency v] to [0]\n        end\n        set [ghost v] effect to (GUI_transparency)\n        set [color v] effect to (0)\n        go to (navigator v)\n        replace item (Clone_ID) of [clone_touched? v] with <touching (mouse-pointer v)?>\n        if <not <[clone_touched? v] contains [true]?>> then\n            set [tool_tip_visible v] to [0]\n        end\n        if <(costume [number v]) = ((item (Clone_ID) of [costume_list v]) + (2))> then\n            if <touching (mouse-pointer v)?> then\n                if <(Tool_Tip_Visible) = [0]> then\n                    set [tool_tip_visible v] to [1]\n                    broadcast (TOOL_TIP_SHOW v)\n                end\n            end\n        else\n            if <touching (mouse-pointer v)?> then\n                switch costume to ((item (Clone_ID) of [costume_list v]) + (1))\n                if <(Tool_Tip_Visible) = [0]> then\n                    set [tool_tip_visible v] to [1]\n                    broadcast (TOOL_TIP_SHOW v)\n                end\n            else\n                switch costume to (item (Clone_ID) of [costume_list v])\n            end\n        end\n        if <(Clone_ID) = [1]> then\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                if <(Mouse_Down_2) = [0]> then\n                    set [mouse_down_2 v] to [1]\n                    if <(costume [number v]) = ((item (Clone_ID) of [costume_list v]) + (2))> then\n                        switch costume to (item (Clone_ID) of [costume_list v])\n                        set [grid_visible v] to [0]\n                        broadcast (RENDER_AGAIN_THIS_LEVEL v) and wait\n                    else\n                        switch costume to ((item (Clone_ID) of [costume_list v]) + (2))\n                        set [grid_visible v] to [1]\n                        broadcast (RENDER_AGAIN_THIS_LEVEL v) and wait\n                    end\n                end\n            end\n        else\n            if <(Clone_ID) = [9]> then\n                if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                    if <(Mouse_Down_2) = [0]> then\n                        set [mouse_down_2 v] to [1]\n                        broadcast (CLOSE EDITOR v) and wait\n                    end\n                end\n            else\n                if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                    if <(Mouse_Down_2) = [0]> then\n                        set [mouse_down_2 v] to [1]\n                        set [printer v] to [1]\n                        broadcast (INIZIALIZE_EDITING_TILES v) and wait\n                        if <(costume [number v]) = ((item (Clone_ID) of [costume_list v]) + (2))> then\n                        else\n                            switch costume to ((item (Clone_ID) of [costume_list v]) + (2))\n                        end\n                    end\n                end\n                if <<mouse down?> and <<(item (1) of [clone_touched? v]) = [false]> and <[clone_touched? v] contains [true]?>>> then\n                    if <(item (Clone_ID) of [clone_touched? v]) = [false]> then\n                        switch costume to (item (Clone_ID) of [costume_list v])\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Detect_Editing_type\nset [counter_2 v] to [0]\nrepeat (length of [clone_touched? v])\n    change [counter_2 v] by (1)\n    if <(item (Counter_2) of [clone_touched? v]) = [true]> then\n        if <(Counter_2) = [2]> then\n            set [tiles_type v] to [terrain]\n            set [tiles_start v] to [2]\n            set [tiles_end v] to [26]\n        end\n        if <(Counter_2) = [3]> then\n            set [tiles_type v] to [special]\n            set [tiles_start v] to [27]\n            set [tiles_end v] to [42]\n        end\n        if <(Counter_2) = [4]> then\n            set [tiles_type v] to [hazard]\n            set [tiles_start v] to [43]\n            set [tiles_end v] to [50]\n        end\n        if <(Counter_2) = [5]> then\n            set [tiles_type v] to [hero]\n            set [tiles_start v] to [51]\n            set [tiles_end v] to [51]\n        end\n        if <(Counter_2) = [6]> then\n            set [tiles_type v] to [enemy]\n            set [tiles_start v] to [52]\n            set [tiles_end v] to [55]\n        end\n        if <(Counter_2) = [7]> then\n            set [tiles_type v] to [exit]\n            set [tiles_start v] to [56]\n            set [tiles_end v] to [56]\n        end\n        if <(Counter_2) = [8]> then\n            set [tiles_type v] to [eraser]\n            set [tiles_start v] to [1]\n            set [tiles_end v] to [1]\n        end\n    end\nend\n\ndefine Detect_Clone_Touching\nset [counter_2 v] to [0]\nrepeat (length of [clone_touched? v])\n    change [counter_2 v] by (1)\n    if <(item (Counter_2) of [clone_touched? v]) = [true]> then\n        set [tool_tip_n v] to (Counter_2)\n    end\nend\n\nwhen I receive [inizialize_editing_tiles v]\nDetect_Editing_type\n\n@Button3\n\nwhen this sprite clicked\nstop [other scripts in sprite v]\nswitch costume to (costume3 v)\nwait (0.2) seconds\nbroadcast (EXIT_MENU v) and wait\nbroadcast (INIZIALIZE_NAVIGATOR v)\n\nwhen I receive [show_buttons v]\nswitch costume to (costume1 v)\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [exit_menu v]\nhide\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\nswitch costume to (costume1 v)\n\nwhen I receive [show_background_selection v]\nhide\n\nwhen I receive [test_level v]\nhide\n\nwhen I receive [back_to_main_menu v]\nhide\n\nwhen I receive [show_music_selection v]\nhide\n\n@Button4\n\nwhen this sprite clicked\nstop [other scripts in sprite v]\nswitch costume to (costume3 v)\nwait (0.2) seconds\nbroadcast (SHOW_BACKGROUND_SELECTION v)\nwait (0.1) seconds\nbroadcast (SHOW_BACKGROUND_SELECTION v)\n\nwhen I receive [show_buttons v]\nswitch costume to (costume1 v)\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [exit_menu v]\nhide\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\nswitch costume to (costume1 v)\n\nwhen I receive [show_background_selection v]\nhide\n\nwhen I receive [test_level v]\nhide\n\nwhen I receive [back_to_main_menu v]\nhide\n\nwhen I receive [show_music_selection v]\nhide\n\n@Button5\n\nwhen this sprite clicked\nstop [other scripts in sprite v]\nswitch costume to (costume3 v)\nset [music_frame v] to (letter (1) of (item (199) of [temp v]))\nwait (0.2) seconds\nbroadcast (SHOW_MUSIC_SELECTION v)\nwait (0.1) seconds\nbroadcast (SHOW_MUSIC_SELECTION v)\n\nwhen I receive [show_buttons v]\nswitch costume to (costume1 v)\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [exit_menu v]\nhide\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\nswitch costume to (costume1 v)\n\nwhen I receive [show_music_selection v]\nhide\n\nwhen I receive [show_background_selection v]\nhide\n\nwhen I receive [back_to_main_menu v]\nhide\n\nwhen I receive [test_level v]\nhide\n\n@Button6\n\nwhen this sprite clicked\nstop [other scripts in sprite v]\nswitch costume to (costume3 v)\nwait (0.2) seconds\nset [dis_is_a_test v] to [1]\nbroadcast (TEST_LEVEL v) and wait\nbroadcast (Start_Level v)\n\nwhen I receive [show_buttons v]\nswitch costume to (costume1 v)\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [exit_menu v]\nhide\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\nswitch costume to (costume1 v)\n\nwhen I receive [show_background_selection v]\nhide\n\nwhen I receive [test_level v]\nhide\n\nwhen I receive [back_to_main_menu v]\nhide\n\nwhen I receive [show_music_selection v]\nhide\n\n@Button7\n\nwhen this sprite clicked\nstop [other scripts in sprite v]\nswitch costume to (costume3 v)\nwait (0.2) seconds\nif <(NEVER_SAVED) = [1]> then\n    broadcast (DELETE_USER_DATA v) and wait\nend\nbroadcast (BACK_TO_MAIN_MENU v)\nset [current_level v] to [1]\nhide\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\nswitch costume to (costume1 v)\n\nwhen I receive [show_buttons v]\nswitch costume to (costume1 v)\nshow\nif <(Message_showed) = [1]> then\n    set [message_showed v] to [0]\n    say [] for (0) seconds\nend\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n        if <(Message_showed) = [0]> then\n            set [message_showed v] to [1]\n            say [Remember to save in the Scratch Editor before leaving the editor] for (2) seconds\n        end\n    else\n        set [message_showed v] to [0]\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [exit_menu v]\nhide\n\nwhen I receive [back_to_main_menu v]\nhide\n\nwhen I receive [test_level v]\nhide\n\nwhen I receive [show_background_selection v]\nhide\n\nwhen I receive [show_music_selection v]\nhide\n\n@BG Selection\n\nwhen I receive [exit_menu v]\nhide\n\nwhen I receive [show_menu v]\nhide\n\nwhen flag clicked\nset [backdrop_frame v] to [1]\nhide\nswitch costume to (costume1 v)\nset size to (100) %\nset [clone_id v] to [0]\nset [clone_n v] to [0]\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\nchange [clone_n v] by (1)\ncreate clone of (_myself_ v)\nchange [clone_n v] by (1)\ncreate clone of (_myself_ v)\nchange [clone_n v] by (1)\ncreate clone of (_myself_ v)\n\nwhen this sprite clicked\nif <(Clone_ID) = [3]> then\nelse\n    if <(Clone_ID) = [2]> then\n        Save_Backdrop\n        switch costume to (costume6 v)\n        wait (0.2) seconds\n        switch costume to (costume4 v)\n        broadcast (SHOW_MENU v)\n        wait (0.1) seconds\n        broadcast (SHOW_MENU v)\n    else\n        if <(mouse x) < [0]> then\n            change [backdrop_frame v] by (-1)\n            if <(BACKDROP_FRAME) < [1]> then\n                set [backdrop_frame v] to [9]\n            end\n        else\n            change [backdrop_frame v] by (1)\n            if <(BACKDROP_FRAME) > [9]> then\n                set [backdrop_frame v] to [1]\n            end\n        end\n        switch costume to (costume3 v)\n        wait (0.2) seconds\n        switch costume to (costume1 v)\n        broadcast (SWITCH_BACKDROP v) and wait\n    end\nend\n\nwhen I receive [show_background_selection v]\nshow\nif <(Clone_ID) = [3]> then\n    switch costume to ((BACKDROP_FRAME) + (6))\nend\nforever\n    if <(Clone_ID) = [3]> then\n    else\n        if <(Clone_ID) = [2]> then\n            if <touching (mouse-pointer v)?> then\n                switch costume to (costume5 v)\n            else\n                switch costume to (costume4 v)\n            end\n        else\n            if <touching (mouse-pointer v)?> then\n                switch costume to (costume2 v)\n            else\n                switch costume to (costume1 v)\n            end\n        end\n    end\nend\n\nwhen I receive [test_level v]\nhide\n\nwhen I receive [show_music_selection v]\nhide\n\nwhen I start as a clone\nset [clone_id v] to (Clone_N)\nif <(Clone_ID) = [1]> then\n    set rotation style [left-right v]\n    point in direction (-90)\n    set [ghost v] effect to (0)\n    switch costume to (costume1 v)\nelse\n    if <(Clone_ID) = [2]> then\n        set [ghost v] effect to (0)\n        switch costume to (costume4 v)\n    else\n        switch costume to ((BACKDROP_FRAME) + (6))\n        set size to (50) %\n        set [ghost v] effect to (0)\n    end\nend\n\ndefine Save_Backdrop\nset [temp v] to []\nset [temp v] to (join (letter (1) of (item (199) of [temp v])) (letter (2) of (item (199) of [temp v])))\nset [temp v] to (join (Temp) (BACKDROP_FRAME))\nreplace item (199) of [temp v] with (Temp)\n\nwhen I receive [switch_backdrop v]\nif <(Clone_ID) = [3]> then\n    switch costume to ((BACKDROP_FRAME) + (6))\n    switch backdrop to (BACKDROP_FRAME)\nelse\nend\n\n@Lavel\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\n\nwhen I receive [show_menu v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [test_level v]\nstop [other scripts in sprite v]\nshow\nswitch costume to (00 v)\nerase all\nChange_BG\nRender_elements\nbroadcast (Start_Level v)\n\ndefine Change_BG\nset [backdrop_frame v] to (letter (3) of (item (199) of [temp v]))\nswitch backdrop to (BACKDROP_FRAME)\nset [previous_music v] to (MUSIC)\nset [music v] to (letter (1) of (item (199) of [temp v]))\nif <not <(Previous_Music) = (MUSIC)>> then\n    broadcast (Stop_music_temporally v) and wait\n    broadcast (Play_Music v)\nend\n\ndefine Render_elements\nset [counter v] to [0]\ngo to x: ((-240) + (15)) y: ((-180) + (15))\nerase all\nrepeat (12)\n    repeat (16)\n        change [counter v] by (1)\n        if <not <(item (Counter) of [temp v]) = [0]>> then\n            switch costume to (00 v)\n            set [costume_check v] to (costume [number v])\n            switch costume to (join (item (Counter) of [temp v]) [t])\n            if <(costume [number v]) = (Costume_Check)> then\n                switch costume to (join (item (Counter) of [temp v]) [c])\n            end\n            stamp\n        end\n        go to x: ((x position) + (30)) y: (y position)\n    end\n    go to x: ((-240) + (15)) y: ((y position) + (30))\nend\nswitch costume to (00 v)\nhide\n\n@Hero\n\ndefine Reset_variables\nset [z_vx v] to [0]\nset [z_vy v] to [0]\nset [z_jump v] to [0]\nset [z_jump_h v] to [7]\nset [z_speed v] to [1.5]\nset [z_gravity v] to [0.6]\n\ndefine Physics_Parse\nchange y by (Z_VY)\nchange y by (-1)\nCheck_Collision\nif <(Collision_Found) > [0]> then\n    if <(Z_VY) < [0.5]> then\n        set [z_y_coll v] to [1]\n        set [z_vy v] to [0]\n        set [z_jump v] to (Z_Jump_H)\n        GO_UP\n    else\n        set [z_vy v] to [0]\n        set [z_jump v] to [0]\n        GO_DOWN\n    end\nelse\n    set [z_y_coll v] to [0]\n    change [z_vy v] by ((0) - (Z_Gravity))\nend\nif <not <key (up arrow v) pressed?>> then\n    set [z_jump_pressed v] to [0]\nend\nif <<[0] < (Z_Jump)> and <key (up arrow v) pressed?>> then\n    change y by (1)\n    if <(Z_Move) = [0]> then\n        Check_Collision\n        if <not <(Collision_Found) > [0]>> then\n            if <(Z_Jump_H) = (Z_Jump)> then\n                set [z_vy v] to (Z_Jump_H)\n                start sound [jump v]\n            end\n            change [z_jump v] by (-1)\n            change [z_vy v] by (((Z_Gravity) / (4)) * (3))\n        end\n        change y by (-1)\n    end\nelse\n    set [z_jump v] to [0]\nend\nif <<key (right arrow v) pressed?> or <key (left arrow v) pressed?>> then\n    if <(Z_Move) = [0]> then\n        if <key (right arrow v) pressed?> then\n            point in direction (90)\n            change [z_vx v] by (Z_Speed)\n        end\n        if <key (left arrow v) pressed?> then\n            point in direction (-90)\n            change [z_vx v] by ((0) - (Z_Speed))\n        end\n    end\nelse\n    if <(Z_Move) = [0]> then\n        set [z_vx v] to ((0.75) * (Z_VX))\n    end\nend\nset [z_vx v] to ((0.7) * (Z_VX))\nchange x by (Z_VX)\nCheck_Collision\nif <(Collision_Found) > [0]> then\n    change x by ((0) - (Z_VX))\n    set [z_vx v] to [0]\nend\n\nwhen I receive [test_level v]\nInizialize\nReset_variables\ngo to x: ((-240) + (15)) y: ((-180) + (15))\nif <((item (193) of [temp v]) mod (16)) = [0]> then\n    go to x: ((x position) + (((30) * (15)) - (0))) y: ((y position) + (((30) * ((item (193) of [temp v]) / (16))) - (30)))\nelse\n    go to x: ((x position) + ((30) * (((item (193) of [temp v]) mod (16)) - (1)))) y: ((y position) + ((30) * ([floor v] of ((item (193) of [temp v]) / (16)) )))\nend\nset [ghost v] effect to (0)\nif <not <(item (193) of [temp v]) = [000]>> then\n    show\nelse\n    hide\nend\nset rotation style [left-right v]\npoint in direction (90)\n\nwhen flag clicked\nhide\nset size to (300) %\nset rotation style [left-right v]\n\nwhen I receive [show_menu v]\nstop [other scripts in sprite v]\nhide\n\ndefine Inizialize\ndelete (all) of [killing_stuff v]\nadd [q] to [killing_stuff v]\nadd [r] to [killing_stuff v]\nadd [s] to [killing_stuff v]\nadd [t] to [killing_stuff v]\nadd [u] to [killing_stuff v]\nadd [v] to [killing_stuff v]\nadd [w] to [killing_stuff v]\nadd [x] to [killing_stuff v]\nadd [y] to [killing_stuff v]\nadd [z] to [killing_stuff v]\ndelete (all) of [local_excluding_letters v]\ndelete (all) of [temp_temp v]\nadd [i] to [local_excluding_letters v]\nadd [j] to [local_excluding_letters v]\nadd [k] to [local_excluding_letters v]\nadd [l] to [local_excluding_letters v]\nadd [m] to [local_excluding_letters v]\nadd [n] to [local_excluding_letters v]\nadd [o] to [local_excluding_letters v]\nadd [p] to [local_excluding_letters v]\nadd [q] to [local_excluding_letters v]\nadd [r] to [local_excluding_letters v]\nadd [s] to [local_excluding_letters v]\nadd [t] to [local_excluding_letters v]\nadd [u] to [local_excluding_letters v]\nadd [v] to [local_excluding_letters v]\nadd [w] to [local_excluding_letters v]\nadd [x] to [local_excluding_letters v]\nadd [y] to [local_excluding_letters v]\nadd [z] to [local_excluding_letters v]\nset [detecter v] to [0]\nrepeat (192)\n    change [detecter v] by (1)\n    if <[local_excluding_letters v] contains (item (Detecter) of [temp v])?> then\n        insert [0] at (Detecter) of [temp_temp v] \n    else\n        insert (item (Detecter) of [temp v]) at (Detecter) of [temp_temp v] \n    end\nend\n\ndefine Check_Collision\nset [collision_found v] to [0]\nset [x v] to ((15) + (([floor v] of (((x position) + (9)) / (30)) ) * (30)))\nset [y v] to ((15) + (([floor v] of (((y position) + (13)) / (30)) ) * (30)))\nset [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\nif <<(X) > [240]> or <(X) < [-240]>> then\n    change [collision_found v] by (1)\nelse\n    if <(Y) < [-180]> then\n        change [collision_found v] by (0)\n    else\n        if <(Y) > [180]> then\n            change [collision_found v] by (1)\n        else\n            if <not <(item (Detecter) of [temp_temp v]) = [0]>> then\n                change [collision_found v] by (1)\n            end\n        end\n    end\nend\nset [x v] to ((15) + (([floor v] of (((x position) + (9)) / (30)) ) * (30)))\nset [y v] to ((15) + (([floor v] of (((y position) - (14)) / (30)) ) * (30)))\nset [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\nif <<(X) > [240]> or <(X) < [-240]>> then\n    change [collision_found v] by (1)\nelse\n    if <(Y) < [-180]> then\n        change [collision_found v] by (0)\n    else\n        if <(Y) > [180]> then\n            change [collision_found v] by (1)\n        else\n            if <not <(item (Detecter) of [temp_temp v]) = [0]>> then\n                change [collision_found v] by (1)\n            end\n        end\n    end\nend\nset [x v] to ((15) + (([floor v] of (((x position) - (9)) / (30)) ) * (30)))\nset [y v] to ((15) + (([floor v] of (((y position) + (13)) / (30)) ) * (30)))\nset [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\nif <<(X) > [240]> or <(X) < [-240]>> then\n    change [collision_found v] by (1)\nelse\n    if <(Y) < [-180]> then\n        change [collision_found v] by (0)\n    else\n        if <(Y) > [180]> then\n            change [collision_found v] by (1)\n        else\n            if <not <(item (Detecter) of [temp_temp v]) = [0]>> then\n                change [collision_found v] by (1)\n            end\n        end\n    end\nend\nset [x v] to ((15) + (([floor v] of (((x position) - (9)) / (30)) ) * (30)))\nset [y v] to ((15) + (([floor v] of (((y position) - (14)) / (30)) ) * (30)))\nset [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\nif <<(X) > [240]> or <(X) < [-240]>> then\n    change [collision_found v] by (1)\nelse\n    if <(Y) < [-180]> then\n        change [collision_found v] by (0)\n    else\n        if <(Y) > [180]> then\n            change [collision_found v] by (1)\n        else\n            if <not <(item (Detecter) of [temp_temp v]) = [0]>> then\n                change [collision_found v] by (1)\n            end\n        end\n    end\nend\n\ndefine Check_Death\nset [run_into_kill v] to [0]\nset [x v] to ((15) + (([floor v] of (((x position) + (0)) / (30)) ) * (30)))\nset [y v] to ((15) + (([floor v] of (((y position) + (0)) / (30)) ) * (30)))\nset [detecter_2 v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\nif <[killing_stuff v] contains (item (Detecter_2) of [temp v])?> then\n    set [run_into_kill v] to [1]\nend\n\ndefine GO_UP\nrepeat until <(Collision_Found) = [0]>\n    change y by (1)\n    Check_Collision\nend\n\ndefine GO_DOWN\nrepeat until <(Collision_Found) = [0]>\n    change y by (-1)\n    Check_Collision\nend\nchange y by (-1)\n\ndefine Lampeggia\nrepeat (3)\n    set [ghost v] effect to (50)\n    wait (0.3) seconds\n    set [ghost v] effect to (0)\n    wait (0.3) seconds\nend\n\ndefine WIN\n\nif <(LOADING) = [0]> then\nend\n\nwhen I receive [start_level v]\nset [run_into_kill v] to [0]\nforever\n    if <(LOADING) = [0]> then\n        Physics_Parse\n        if <(y position) < [-179]> then\n            broadcast (Z_Death v)\n        end\n        if <touching (star v)?> then\n            WIN\n            broadcast (END_LEVEL v)\n            stop [this script v]\n        else\n            Check_Death\n            if <(RUN_INTO_KILL) > [0]> then\n                set [run_into_kill v] to [0]\n                broadcast (Z_Death v)\n                stop [this script v]\n            end\n        end\n        if <(Z_Y_Coll) = [1]> then\n            if <<key (right arrow v) pressed?> or <key (left arrow v) pressed?>> then\n                next costume\n                if <(costume [number v]) > [10]> then\n                    switch costume to (costume1 v)\n                end\n            else\n                switch costume to (costume1 v)\n            end\n        else\n            switch costume to (costume11 v)\n        end\n    end\nend\n\nwhen I receive [z_death v]\nstart sound [Bump v]\nstop [other scripts in sprite v]\nset [z_vy v] to [6]\nif <(direction) = [90]> then\n    set [z_angle_death v] to [1]\n    switch costume to (costume11 v)\nelse\n    set [z_angle_death v] to [-1]\n    switch costume to (costume12 v)\nend\npoint in direction (90)\nset rotation style [all around v]\nrepeat until <(y position) < [-174]>\n    if <(Z_Angle_death) > [0]> then\n        turn left (Z_Angle_death) degrees\n    else\n        turn right ((0) - (Z_Angle_death)) degrees\n    end\n    change [ghost v] effect by (2)\n    change [z_vy v] by ((0) - (Z_Gravity))\n    change y by (Z_VY)\nend\nbroadcast (Delete_Clones v)\nwait (0.1) seconds\nbroadcast (TEST_LEVEL v) and wait\nswitch costume to (costume1 v)\nset rotation style [left-right v]\npoint in direction (90)\nLampeggia\n\nbroadcast (Start_Level v)\n\n@Star\n\nwhen flag clicked\nhide\nset size to (300) %\nset rotation style [left-right v]\n\nwhen I receive [test_level v]\ngo to x: ((-240) + (15)) y: ((-180) + (15))\nif <((item (198) of [temp v]) mod (16)) = [0]> then\n    go to x: ((x position) + (((30) * (15)) - (0))) y: ((y position) + (((30) * ((item (198) of [temp v]) / (16))) - (30)))\nelse\n    go to x: ((x position) + ((30) * (((item (198) of [temp v]) mod (16)) - (1)))) y: ((y position) + ((30) * ([floor v] of ((item (198) of [temp v]) / (16)) )))\nend\nset [ghost v] effect to (0)\nif <not <(item (198) of [temp v]) = [000]>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [show_menu v]\nstop [other scripts in sprite v]\nhide\n\n@Enemy_1\n\nwhen I receive [test_level v]\nInizialize\ngo to x: ((-240) + (15)) y: ((-180) + (15))\nset rotation style [left-right v]\npoint in direction (90)\nif <(item (Enemy_ID) of [temp v]) > [600]> then\n    set [velocity_x v] to [-4]\n    set [enemy_costume v] to [34]\n    set [costume_max v] to [45]\n    set [costume_min v] to [34]\n    set [start_position v] to ((item (Enemy_ID) of [temp v]) - (600))\n    show\nelse\n    if <(item (Enemy_ID) of [temp v]) > [400]> then\n        set [velocity_x v] to [-2]\n        set [enemy_costume v] to [23]\n        set [costume_max v] to [32]\n        set [costume_min v] to [23]\n        set [start_position v] to ((item (Enemy_ID) of [temp v]) - (400))\n        show\n    else\n        if <(item (Enemy_ID) of [temp v]) > [200]> then\n            set [velocity_x v] to [-3]\n            set [enemy_costume v] to [13]\n            set [costume_max v] to [21]\n            set [costume_min v] to [13]\n            set [start_position v] to ((item (Enemy_ID) of [temp v]) - (200))\n            show\n        else\n            if <not <(item (Enemy_ID) of [temp v]) = [000]>> then\n                set [velocity_x v] to [-2]\n                set [enemy_costume v] to [1]\n                set [costume_max v] to [11]\n                set [costume_min v] to [1]\n                set [start_position v] to (item (Enemy_ID) of [temp v])\n                show\n            else\n                hide\n            end\n        end\n    end\nend\nswitch costume to (Enemy_Costume)\nif <((START_POSITION) mod (16)) = [0]> then\n    go to x: ((x position) + (((30) * (15)) - (0))) y: ((y position) + (((30) * ((START_POSITION) / (16))) - (30)))\nelse\n    go to x: ((x position) + ((30) * (((START_POSITION) mod (16)) - (1)))) y: ((y position) + ((30) * ([floor v] of ((START_POSITION) / (16)) )))\nend\nset [ghost v] effect to (0)\n\ndefine Inizialize\ndelete (all) of [killing_stuff v]\nadd [q] to [killing_stuff v]\nadd [r] to [killing_stuff v]\nadd [s] to [killing_stuff v]\nadd [t] to [killing_stuff v]\nadd [u] to [killing_stuff v]\nadd [v] to [killing_stuff v]\nadd [w] to [killing_stuff v]\nadd [x] to [killing_stuff v]\nadd [y] to [killing_stuff v]\nadd [z] to [killing_stuff v]\ndelete (all) of [local_excluding_letters v]\ndelete (all) of [temp_temp v]\nadd [i] to [local_excluding_letters v]\nadd [j] to [local_excluding_letters v]\nadd [k] to [local_excluding_letters v]\nadd [l] to [local_excluding_letters v]\nadd [m] to [local_excluding_letters v]\nadd [n] to [local_excluding_letters v]\nadd [o] to [local_excluding_letters v]\nadd [p] to [local_excluding_letters v]\nadd [q] to [local_excluding_letters v]\nadd [r] to [local_excluding_letters v]\nadd [s] to [local_excluding_letters v]\nadd [t] to [local_excluding_letters v]\nadd [u] to [local_excluding_letters v]\nadd [v] to [local_excluding_letters v]\nadd [w] to [local_excluding_letters v]\nadd [x] to [local_excluding_letters v]\nadd [y] to [local_excluding_letters v]\nadd [z] to [local_excluding_letters v]\nset [detecter v] to [0]\nrepeat (192)\n    change [detecter v] by (1)\n    if <[local_excluding_letters v] contains (item (Detecter) of [temp v])?> then\n        insert [0] at (Detecter) of [temp_temp v] \n    else\n        insert (item (Detecter) of [temp v]) at (Detecter) of [temp_temp v] \n    end\nend\n\ndefine Check_Collision\nset [x v] to (x position)\nset [y v] to ((y position) - (30))\nset [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\nif <(Y) < [-180]> then\n    set [ground_found v] to [1]\nelse\n    if <not <(item (Detecter) of [temp_temp v]) = [0]>> then\n        set [ground_found v] to [1]\n    else\n        change y by (-30)\n    end\nend\n\ndefine Check_collision_left_right\nif <(Velocity_X) > [0]> then\n    set [x v] to ((x position) + (30))\n    set [y v] to (y position)\n    set [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\n    if <(X) > [240]> then\n        set [velocity_x v] to ((0) - (Velocity_X))\n        point in direction ((0) - (direction))\n    else\n        if <not <(item (Detecter) of [temp_temp v]) = [0]>> then\n            set [velocity_x v] to ((0) - (Velocity_X))\n            point in direction ((0) - (direction))\n        else\n            set [x v] to ((x position) + (30))\n            set [y v] to ((y position) - (30))\n            set [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\n            if <(item (Detecter) of [temp_temp v]) = [0]> then\n                set [velocity_x v] to ((0) - (Velocity_X))\n                point in direction ((0) - (direction))\n            end\n        end\n    end\nelse\n    set [x v] to ((x position) - (0))\n    set [y v] to (y position)\n    set [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\n    if <(X) < [-240]> then\n        set [velocity_x v] to ((0) - (Velocity_X))\n        point in direction ((0) - (direction))\n    else\n        if <not <(item (Detecter) of [temp_temp v]) = [0]>> then\n            set [velocity_x v] to ((0) - (Velocity_X))\n            point in direction ((0) - (direction))\n        else\n            set [x v] to ((x position) - (0))\n            set [y v] to ((y position) - (30))\n            set [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\n            if <(item (Detecter) of [temp_temp v]) = [0]> then\n                set [velocity_x v] to ((0) - (Velocity_X))\n                point in direction ((0) - (direction))\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\nset size to (300) %\nset rotation style [left-right v]\nset [enemy_id v] to [194]\n\nwhen I receive [show_menu v]\nstop [other scripts in sprite v]\nhide\n\ndefine Check_Flying_Collisions\nif <(Velocity_X) > [0]> then\n    set [x v] to ((x position) + (30))\n    set [y v] to (y position)\n    set [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\n    if <(X) > [240]> then\n        set [velocity_x v] to ((0) - (Velocity_X))\n        point in direction ((0) - (direction))\n    else\n        if <not <(item (Detecter) of [temp_temp v]) = [0]>> then\n            set [velocity_x v] to ((0) - (Velocity_X))\n            point in direction ((0) - (direction))\n        else\n        end\n    end\nelse\n    set [x v] to ((x position) - (30))\n    set [y v] to (y position)\n    set [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\n    if <(X) < [-240]> then\n        set [velocity_x v] to ((0) - (Velocity_X))\n        point in direction ((0) - (direction))\n    else\n        if <not <(item (Detecter) of [temp_temp v]) = [0]>> then\n            set [velocity_x v] to ((0) - (Velocity_X))\n            point in direction ((0) - (direction))\n        else\n        end\n    end\nend\n\nwhen I receive [start_level v]\nif <<(Enemy_Costume) = [1]> or <(Enemy_Costume) = [12]>> then\n    set [ground_found v] to [0]\n    repeat until <(Ground_found) = [1]>\n        Check_Collision\n    end\nelse\nend\nwait until <(Ground_found) = [1]>\nforever\n    if <(LOADING) = [0]> then\n        change x by (Velocity_X)\n        if <(costume [number v]) < [21]> then\n            Check_collision_left_right\n        else\n            Check_Flying_Collisions\n        end\n        next costume\n        if <(costume [number v]) > (Costume_MAX)> then\n            switch costume to (Costume_MIN)\n        end\n        if <touching (hero v)?> then\n            if <([y position v] of [hero v]) > ((y position) + (30))> then\n                set [z_vy v] to [6]\n                Die\n                stop [this script v]\n            else\n                broadcast (Z_Death v)\n                if <(x position) > ([x position v] of [hero v])> then\n                    point in direction (90)\n                else\n                    point in direction (-90)\n                end\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I receive [z_death v]\nstop [other scripts in sprite v]\n\nwhen I receive [end_level v]\nstop [other scripts in sprite v]\n\ndefine Die\nstart sound [snare drum v]\nstart sound [Bump2 v]\nset [velocity_y v] to [3]\nif <(direction) = [90]> then\n    set [angle_fall v] to [1]\n    switch costume to (Costume_MIN)\nelse\n    set [angle_fall v] to [-1]\n    switch costume to ((Costume_MAX) + (1))\nend\npoint in direction (90)\nset rotation style [all around v]\nrepeat until <(y position) < [-174]>\n    if <(Angle_fall) > [0]> then\n        turn left (Angle_fall) degrees\n    else\n        turn right ((0) - (Angle_fall)) degrees\n    end\n    change [ghost v] effect by (2)\n    change [velocity_y v] by ((0) - (Z_Gravity))\n    change y by (Velocity_Y)\nend\nhide\nset rotation style [left-right v]\npoint in direction (90)\n\n@Button8\n\nwhen I receive [show_buttons v]\nswitch costume to (costume1 v)\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [exit_menu v]\nhide\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\nswitch costume to (costume1 v)\n\nwhen this sprite clicked\nstop [other scripts in sprite v]\nswitch costume to (costume3 v)\nset [next_level v] to [1]\nbroadcast (RENDER_NEW_LEVEL_IN_GAME v) and wait\nwait (0.2) seconds\nset [dis_is_a_test v] to [3]\nbroadcast (TEST_LEVEL v) and wait\nbroadcast (Start_Level v)\n\nwhen I receive [show_background_selection v]\nhide\n\nwhen I receive [test_level v]\nhide\n\nwhen I receive [back_to_main_menu v]\nhide\n\nwhen I receive [show_music_selection v]\nhide\n\n@Enemy_2\n\nwhen I receive [test_level v]\nInizialize\ngo to x: ((-240) + (15)) y: ((-180) + (15))\nset rotation style [left-right v]\npoint in direction (-90)\nif <(item (Enemy_ID) of [temp v]) > [600]> then\n    set [velocity_x v] to [4]\n    set [enemy_costume v] to [34]\n    set [costume_max v] to [45]\n    set [costume_min v] to [34]\n    set [start_position v] to ((item (Enemy_ID) of [temp v]) - (600))\n    show\nelse\n    if <(item (Enemy_ID) of [temp v]) > [400]> then\n        set [velocity_x v] to [2]\n        set [enemy_costume v] to [23]\n        set [costume_max v] to [32]\n        set [costume_min v] to [23]\n        set [start_position v] to ((item (Enemy_ID) of [temp v]) - (400))\n        show\n    else\n        if <(item (Enemy_ID) of [temp v]) > [200]> then\n            set [velocity_x v] to [3]\n            set [enemy_costume v] to [13]\n            set [costume_max v] to [21]\n            set [costume_min v] to [13]\n            set [start_position v] to ((item (Enemy_ID) of [temp v]) - (200))\n            show\n        else\n            if <not <(item (Enemy_ID) of [temp v]) = [000]>> then\n                set [velocity_x v] to [2]\n                set [enemy_costume v] to [1]\n                set [costume_max v] to [11]\n                set [costume_min v] to [1]\n                set [start_position v] to (item (Enemy_ID) of [temp v])\n                show\n            else\n                hide\n            end\n        end\n    end\nend\nswitch costume to (Enemy_Costume)\nif <((START_POSITION) mod (16)) = [0]> then\n    go to x: ((x position) + (((30) * (15)) - (0))) y: ((y position) + (((30) * ((START_POSITION) / (16))) - (30)))\nelse\n    go to x: ((x position) + ((30) * (((START_POSITION) mod (16)) - (1)))) y: ((y position) + ((30) * ([floor v] of ((START_POSITION) / (16)) )))\nend\nset [ghost v] effect to (0)\n\ndefine Inizialize\ndelete (all) of [killing_stuff v]\nadd [q] to [killing_stuff v]\nadd [r] to [killing_stuff v]\nadd [s] to [killing_stuff v]\nadd [t] to [killing_stuff v]\nadd [u] to [killing_stuff v]\nadd [v] to [killing_stuff v]\nadd [w] to [killing_stuff v]\nadd [x] to [killing_stuff v]\nadd [y] to [killing_stuff v]\nadd [z] to [killing_stuff v]\ndelete (all) of [local_excluding_letters v]\ndelete (all) of [temp_temp v]\nadd [i] to [local_excluding_letters v]\nadd [j] to [local_excluding_letters v]\nadd [k] to [local_excluding_letters v]\nadd [l] to [local_excluding_letters v]\nadd [m] to [local_excluding_letters v]\nadd [n] to [local_excluding_letters v]\nadd [o] to [local_excluding_letters v]\nadd [p] to [local_excluding_letters v]\nadd [q] to [local_excluding_letters v]\nadd [r] to [local_excluding_letters v]\nadd [s] to [local_excluding_letters v]\nadd [t] to [local_excluding_letters v]\nadd [u] to [local_excluding_letters v]\nadd [v] to [local_excluding_letters v]\nadd [w] to [local_excluding_letters v]\nadd [x] to [local_excluding_letters v]\nadd [y] to [local_excluding_letters v]\nadd [z] to [local_excluding_letters v]\nset [detecter v] to [0]\nrepeat (192)\n    change [detecter v] by (1)\n    if <[local_excluding_letters v] contains (item (Detecter) of [temp v])?> then\n        insert [0] at (Detecter) of [temp_temp v] \n    else\n        insert (item (Detecter) of [temp v]) at (Detecter) of [temp_temp v] \n    end\nend\n\ndefine Check_Collision\nset [x v] to (x position)\nset [y v] to ((y position) - (30))\nset [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\nif <(Y) < [-180]> then\n    set [ground_found v] to [1]\nelse\n    if <not <(item (Detecter) of [temp_temp v]) = [0]>> then\n        set [ground_found v] to [1]\n    else\n        change y by (-30)\n    end\nend\n\ndefine Check_collision_left_right\nif <(Velocity_X) > [0]> then\n    set [x v] to ((x position) + (30))\n    set [y v] to (y position)\n    set [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\n    if <(X) > [240]> then\n        set [velocity_x v] to ((0) - (Velocity_X))\n        point in direction ((0) - (direction))\n    else\n        if <not <(item (Detecter) of [temp_temp v]) = [0]>> then\n            set [velocity_x v] to ((0) - (Velocity_X))\n            point in direction ((0) - (direction))\n        else\n            set [x v] to ((x position) + (30))\n            set [y v] to ((y position) - (30))\n            set [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\n            if <(item (Detecter) of [temp_temp v]) = [0]> then\n                set [velocity_x v] to ((0) - (Velocity_X))\n                point in direction ((0) - (direction))\n            end\n        end\n    end\nelse\n    set [x v] to ((x position) - (0))\n    set [y v] to (y position)\n    set [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\n    if <(X) < [-240]> then\n        set [velocity_x v] to ((0) - (Velocity_X))\n        point in direction ((0) - (direction))\n    else\n        if <not <(item (Detecter) of [temp_temp v]) = [0]>> then\n            set [velocity_x v] to ((0) - (Velocity_X))\n            point in direction ((0) - (direction))\n        else\n            set [x v] to ((x position) - (0))\n            set [y v] to ((y position) - (30))\n            set [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\n            if <(item (Detecter) of [temp_temp v]) = [0]> then\n                set [velocity_x v] to ((0) - (Velocity_X))\n                point in direction ((0) - (direction))\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\nset size to (300) %\nset rotation style [left-right v]\nset [enemy_id v] to [195]\n\nwhen I receive [show_menu v]\nstop [other scripts in sprite v]\nhide\n\ndefine Check_Flying_Collisions\nif <(Velocity_X) > [0]> then\n    set [x v] to ((x position) + (30))\n    set [y v] to (y position)\n    set [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\n    if <(X) > [240]> then\n        set [velocity_x v] to ((0) - (Velocity_X))\n        point in direction ((0) - (direction))\n    else\n        if <not <(item (Detecter) of [temp_temp v]) = [0]>> then\n            set [velocity_x v] to ((0) - (Velocity_X))\n            point in direction ((0) - (direction))\n        else\n        end\n    end\nelse\n    set [x v] to ((x position) - (30))\n    set [y v] to (y position)\n    set [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\n    if <(X) < [-240]> then\n        set [velocity_x v] to ((0) - (Velocity_X))\n        point in direction ((0) - (direction))\n    else\n        if <not <(item (Detecter) of [temp_temp v]) = [0]>> then\n            set [velocity_x v] to ((0) - (Velocity_X))\n            point in direction ((0) - (direction))\n        else\n        end\n    end\nend\n\nwhen I receive [start_level v]\nif <<(Enemy_Costume) = [1]> or <(Enemy_Costume) = [12]>> then\n    set [ground_found v] to [0]\n    repeat until <(Ground_found) = [1]>\n        Check_Collision\n    end\nelse\nend\nwait until <(Ground_found) = [1]>\nforever\n    if <(LOADING) = [0]> then\n        change x by (Velocity_X)\n        if <(costume [number v]) < [21]> then\n            Check_collision_left_right\n        else\n            Check_Flying_Collisions\n        end\n        next costume\n        if <(costume [number v]) > (Costume_MAX)> then\n            switch costume to (Costume_MIN)\n        end\n        if <touching (hero v)?> then\n            if <([y position v] of [hero v]) > ((y position) + (30))> then\n                set [z_vy v] to [6]\n                Die\n                stop [this script v]\n            else\n                broadcast (Z_Death v)\n                if <(x position) > ([x position v] of [hero v])> then\n                    point in direction (90)\n                else\n                    point in direction (-90)\n                end\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I receive [z_death v]\nstop [other scripts in sprite v]\n\nwhen I receive [end_level v]\nstop [other scripts in sprite v]\n\ndefine Die\nstart sound [snare drum v]\nstart sound [Bump2 v]\nset [velocity_y v] to [3]\nif <(direction) = [90]> then\n    set [angle_fall v] to [1]\n    switch costume to (Costume_MIN)\nelse\n    set [angle_fall v] to [-1]\n    switch costume to ((Costume_MAX) + (1))\nend\npoint in direction (90)\nset rotation style [all around v]\nrepeat until <(y position) < [-174]>\n    if <(Angle_fall) > [0]> then\n        turn left (Angle_fall) degrees\n    else\n        turn right ((0) - (Angle_fall)) degrees\n    end\n    change [ghost v] effect by (2)\n    change [velocity_y v] by ((0) - (Z_Gravity))\n    change y by (Velocity_Y)\nend\nhide\nset rotation style [left-right v]\npoint in direction (-90)\n\n@Enemy_3\n\nwhen I receive [test_level v]\nInizialize\ngo to x: ((-240) + (15)) y: ((-180) + (15))\nset rotation style [left-right v]\npoint in direction (90)\nif <(item (Enemy_ID) of [temp v]) > [600]> then\n    set [velocity_x v] to [-4]\n    set [enemy_costume v] to [34]\n    set [costume_max v] to [45]\n    set [costume_min v] to [34]\n    set [start_position v] to ((item (Enemy_ID) of [temp v]) - (600))\n    show\nelse\n    if <(item (Enemy_ID) of [temp v]) > [400]> then\n        set [velocity_x v] to [-2]\n        set [enemy_costume v] to [23]\n        set [costume_max v] to [32]\n        set [costume_min v] to [23]\n        set [start_position v] to ((item (Enemy_ID) of [temp v]) - (400))\n        show\n    else\n        if <(item (Enemy_ID) of [temp v]) > [200]> then\n            set [velocity_x v] to [-3]\n            set [enemy_costume v] to [13]\n            set [costume_max v] to [21]\n            set [costume_min v] to [13]\n            set [start_position v] to ((item (Enemy_ID) of [temp v]) - (200))\n            show\n        else\n            if <not <(item (Enemy_ID) of [temp v]) = [000]>> then\n                set [velocity_x v] to [-2]\n                set [enemy_costume v] to [1]\n                set [costume_max v] to [11]\n                set [costume_min v] to [1]\n                set [start_position v] to (item (Enemy_ID) of [temp v])\n                show\n            else\n                hide\n            end\n        end\n    end\nend\nswitch costume to (Enemy_Costume)\nif <((START_POSITION) mod (16)) = [0]> then\n    go to x: ((x position) + (((30) * (15)) - (0))) y: ((y position) + (((30) * ((START_POSITION) / (16))) - (30)))\nelse\n    go to x: ((x position) + ((30) * (((START_POSITION) mod (16)) - (1)))) y: ((y position) + ((30) * ([floor v] of ((START_POSITION) / (16)) )))\nend\nset [ghost v] effect to (0)\n\ndefine Inizialize\ndelete (all) of [killing_stuff v]\nadd [q] to [killing_stuff v]\nadd [r] to [killing_stuff v]\nadd [s] to [killing_stuff v]\nadd [t] to [killing_stuff v]\nadd [u] to [killing_stuff v]\nadd [v] to [killing_stuff v]\nadd [w] to [killing_stuff v]\nadd [x] to [killing_stuff v]\nadd [y] to [killing_stuff v]\nadd [z] to [killing_stuff v]\ndelete (all) of [local_excluding_letters v]\ndelete (all) of [temp_temp v]\nadd [i] to [local_excluding_letters v]\nadd [j] to [local_excluding_letters v]\nadd [k] to [local_excluding_letters v]\nadd [l] to [local_excluding_letters v]\nadd [m] to [local_excluding_letters v]\nadd [n] to [local_excluding_letters v]\nadd [o] to [local_excluding_letters v]\nadd [p] to [local_excluding_letters v]\nadd [q] to [local_excluding_letters v]\nadd [r] to [local_excluding_letters v]\nadd [s] to [local_excluding_letters v]\nadd [t] to [local_excluding_letters v]\nadd [u] to [local_excluding_letters v]\nadd [v] to [local_excluding_letters v]\nadd [w] to [local_excluding_letters v]\nadd [x] to [local_excluding_letters v]\nadd [y] to [local_excluding_letters v]\nadd [z] to [local_excluding_letters v]\nset [detecter v] to [0]\nrepeat (192)\n    change [detecter v] by (1)\n    if <[local_excluding_letters v] contains (item (Detecter) of [temp v])?> then\n        insert [0] at (Detecter) of [temp_temp v] \n    else\n        insert (item (Detecter) of [temp v]) at (Detecter) of [temp_temp v] \n    end\nend\n\ndefine Check_Collision\nset [x v] to (x position)\nset [y v] to ((y position) - (30))\nset [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\nif <(Y) < [-180]> then\n    set [ground_found v] to [1]\nelse\n    if <not <(item (Detecter) of [temp_temp v]) = [0]>> then\n        set [ground_found v] to [1]\n    else\n        change y by (-30)\n    end\nend\n\ndefine Check_collision_left_right\nif <(Velocity_X) > [0]> then\n    set [x v] to ((x position) + (30))\n    set [y v] to (y position)\n    set [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\n    if <(X) > [240]> then\n        set [velocity_x v] to ((0) - (Velocity_X))\n        point in direction ((0) - (direction))\n    else\n        if <not <(item (Detecter) of [temp_temp v]) = [0]>> then\n            set [velocity_x v] to ((0) - (Velocity_X))\n            point in direction ((0) - (direction))\n        else\n            set [x v] to ((x position) + (30))\n            set [y v] to ((y position) - (30))\n            set [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\n            if <(item (Detecter) of [temp_temp v]) = [0]> then\n                set [velocity_x v] to ((0) - (Velocity_X))\n                point in direction ((0) - (direction))\n            end\n        end\n    end\nelse\n    set [x v] to ((x position) - (0))\n    set [y v] to (y position)\n    set [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\n    if <(X) < [-240]> then\n        set [velocity_x v] to ((0) - (Velocity_X))\n        point in direction ((0) - (direction))\n    else\n        if <not <(item (Detecter) of [temp_temp v]) = [0]>> then\n            set [velocity_x v] to ((0) - (Velocity_X))\n            point in direction ((0) - (direction))\n        else\n            set [x v] to ((x position) - (0))\n            set [y v] to ((y position) - (30))\n            set [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\n            if <(item (Detecter) of [temp_temp v]) = [0]> then\n                set [velocity_x v] to ((0) - (Velocity_X))\n                point in direction ((0) - (direction))\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\nset size to (300) %\nset rotation style [left-right v]\nset [enemy_id v] to [196]\n\nwhen I receive [show_menu v]\nstop [other scripts in sprite v]\nhide\n\ndefine Check_Flying_Collisions\nif <(Velocity_X) > [0]> then\n    set [x v] to ((x position) + (30))\n    set [y v] to (y position)\n    set [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\n    if <(X) > [240]> then\n        set [velocity_x v] to ((0) - (Velocity_X))\n        point in direction ((0) - (direction))\n    else\n        if <not <(item (Detecter) of [temp_temp v]) = [0]>> then\n            set [velocity_x v] to ((0) - (Velocity_X))\n            point in direction ((0) - (direction))\n        else\n        end\n    end\nelse\n    set [x v] to ((x position) - (30))\n    set [y v] to (y position)\n    set [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\n    if <(X) < [-240]> then\n        set [velocity_x v] to ((0) - (Velocity_X))\n        point in direction ((0) - (direction))\n    else\n        if <not <(item (Detecter) of [temp_temp v]) = [0]>> then\n            set [velocity_x v] to ((0) - (Velocity_X))\n            point in direction ((0) - (direction))\n        else\n        end\n    end\nend\n\nwhen I receive [start_level v]\nif <<(Enemy_Costume) = [1]> or <(Enemy_Costume) = [12]>> then\n    set [ground_found v] to [0]\n    repeat until <(Ground_found) = [1]>\n        Check_Collision\n    end\nelse\nend\nwait until <(Ground_found) = [1]>\nforever\n    if <(LOADING) = [0]> then\n        change x by (Velocity_X)\n        if <(costume [number v]) < [21]> then\n            Check_collision_left_right\n        else\n            Check_Flying_Collisions\n        end\n        next costume\n        if <(costume [number v]) > (Costume_MAX)> then\n            switch costume to (Costume_MIN)\n        end\n        if <touching (hero v)?> then\n            if <([y position v] of [hero v]) > ((y position) + (30))> then\n                set [z_vy v] to [6]\n                Die\n                stop [this script v]\n            else\n                broadcast (Z_Death v)\n                if <(x position) > ([x position v] of [hero v])> then\n                    point in direction (90)\n                else\n                    point in direction (-90)\n                end\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I receive [z_death v]\nstop [other scripts in sprite v]\n\nwhen I receive [end_level v]\nstop [other scripts in sprite v]\n\ndefine Die\nstart sound [snare drum v]\nstart sound [Bump2 v]\nset [velocity_y v] to [3]\nif <(direction) = [90]> then\n    set [angle_fall v] to [1]\n    switch costume to (Costume_MIN)\nelse\n    set [angle_fall v] to [-1]\n    switch costume to ((Costume_MAX) + (1))\nend\npoint in direction (90)\nset rotation style [all around v]\nrepeat until <(y position) < [-174]>\n    if <(Angle_fall) > [0]> then\n        turn left (Angle_fall) degrees\n    else\n        turn right ((0) - (Angle_fall)) degrees\n    end\n    change [ghost v] effect by (2)\n    change [velocity_y v] by ((0) - (Z_Gravity))\n    change y by (Velocity_Y)\nend\nhide\nset rotation style [left-right v]\npoint in direction (90)\n\n@Enemy_4\n\nwhen I receive [test_level v]\nInizialize\ngo to x: ((-240) + (15)) y: ((-180) + (15))\nset rotation style [left-right v]\npoint in direction (-90)\nif <(item (Enemy_ID) of [temp v]) > [600]> then\n    set [velocity_x v] to [4]\n    set [enemy_costume v] to [34]\n    set [costume_max v] to [45]\n    set [costume_min v] to [34]\n    set [start_position v] to ((item (Enemy_ID) of [temp v]) - (600))\n    show\nelse\n    if <(item (Enemy_ID) of [temp v]) > [400]> then\n        set [velocity_x v] to [2]\n        set [enemy_costume v] to [23]\n        set [costume_max v] to [32]\n        set [costume_min v] to [23]\n        set [start_position v] to ((item (Enemy_ID) of [temp v]) - (400))\n        show\n    else\n        if <(item (Enemy_ID) of [temp v]) > [200]> then\n            set [velocity_x v] to [3]\n            set [enemy_costume v] to [13]\n            set [costume_max v] to [21]\n            set [costume_min v] to [13]\n            set [start_position v] to ((item (Enemy_ID) of [temp v]) - (200))\n            show\n        else\n            if <not <(item (Enemy_ID) of [temp v]) = [000]>> then\n                set [velocity_x v] to [2]\n                set [enemy_costume v] to [1]\n                set [costume_max v] to [11]\n                set [costume_min v] to [1]\n                set [start_position v] to (item (Enemy_ID) of [temp v])\n                show\n            else\n                hide\n            end\n        end\n    end\nend\nswitch costume to (Enemy_Costume)\nif <((START_POSITION) mod (16)) = [0]> then\n    go to x: ((x position) + (((30) * (15)) - (0))) y: ((y position) + (((30) * ((START_POSITION) / (16))) - (30)))\nelse\n    go to x: ((x position) + ((30) * (((START_POSITION) mod (16)) - (1)))) y: ((y position) + ((30) * ([floor v] of ((START_POSITION) / (16)) )))\nend\nset [ghost v] effect to (0)\n\ndefine Inizialize\ndelete (all) of [killing_stuff v]\nadd [q] to [killing_stuff v]\nadd [r] to [killing_stuff v]\nadd [s] to [killing_stuff v]\nadd [t] to [killing_stuff v]\nadd [u] to [killing_stuff v]\nadd [v] to [killing_stuff v]\nadd [w] to [killing_stuff v]\nadd [x] to [killing_stuff v]\nadd [y] to [killing_stuff v]\nadd [z] to [killing_stuff v]\ndelete (all) of [local_excluding_letters v]\ndelete (all) of [temp_temp v]\nadd [i] to [local_excluding_letters v]\nadd [j] to [local_excluding_letters v]\nadd [k] to [local_excluding_letters v]\nadd [l] to [local_excluding_letters v]\nadd [m] to [local_excluding_letters v]\nadd [n] to [local_excluding_letters v]\nadd [o] to [local_excluding_letters v]\nadd [p] to [local_excluding_letters v]\nadd [q] to [local_excluding_letters v]\nadd [r] to [local_excluding_letters v]\nadd [s] to [local_excluding_letters v]\nadd [t] to [local_excluding_letters v]\nadd [u] to [local_excluding_letters v]\nadd [v] to [local_excluding_letters v]\nadd [w] to [local_excluding_letters v]\nadd [x] to [local_excluding_letters v]\nadd [y] to [local_excluding_letters v]\nadd [z] to [local_excluding_letters v]\nset [detecter v] to [0]\nrepeat (192)\n    change [detecter v] by (1)\n    if <[local_excluding_letters v] contains (item (Detecter) of [temp v])?> then\n        insert [0] at (Detecter) of [temp_temp v] \n    else\n        insert (item (Detecter) of [temp v]) at (Detecter) of [temp_temp v] \n    end\nend\n\ndefine Check_Collision\nset [x v] to (x position)\nset [y v] to ((y position) - (30))\nset [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\nif <(Y) < [-180]> then\n    set [ground_found v] to [1]\nelse\n    if <not <(item (Detecter) of [temp_temp v]) = [0]>> then\n        set [ground_found v] to [1]\n    else\n        change y by (-30)\n    end\nend\n\ndefine Check_collision_left_right\nif <(Velocity_X) > [0]> then\n    set [x v] to ((x position) + (30))\n    set [y v] to (y position)\n    set [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\n    if <(X) > [240]> then\n        set [velocity_x v] to ((0) - (Velocity_X))\n        point in direction ((0) - (direction))\n    else\n        if <not <(item (Detecter) of [temp_temp v]) = [0]>> then\n            set [velocity_x v] to ((0) - (Velocity_X))\n            point in direction ((0) - (direction))\n        else\n            set [x v] to ((x position) + (30))\n            set [y v] to ((y position) - (30))\n            set [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\n            if <(item (Detecter) of [temp_temp v]) = [0]> then\n                set [velocity_x v] to ((0) - (Velocity_X))\n                point in direction ((0) - (direction))\n            end\n        end\n    end\nelse\n    set [x v] to ((x position) - (0))\n    set [y v] to (y position)\n    set [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\n    if <(X) < [-240]> then\n        set [velocity_x v] to ((0) - (Velocity_X))\n        point in direction ((0) - (direction))\n    else\n        if <not <(item (Detecter) of [temp_temp v]) = [0]>> then\n            set [velocity_x v] to ((0) - (Velocity_X))\n            point in direction ((0) - (direction))\n        else\n            set [x v] to ((x position) - (0))\n            set [y v] to ((y position) - (30))\n            set [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\n            if <(item (Detecter) of [temp_temp v]) = [0]> then\n                set [velocity_x v] to ((0) - (Velocity_X))\n                point in direction ((0) - (direction))\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\nset size to (300) %\nset rotation style [left-right v]\nset [enemy_id v] to [197]\n\nwhen I receive [show_menu v]\nstop [other scripts in sprite v]\nhide\n\ndefine Check_Flying_Collisions\nif <(Velocity_X) > [0]> then\n    set [x v] to ((x position) + (30))\n    set [y v] to (y position)\n    set [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\n    if <(X) > [240]> then\n        set [velocity_x v] to ((0) - (Velocity_X))\n        point in direction ((0) - (direction))\n    else\n        if <not <(item (Detecter) of [temp_temp v]) = [0]>> then\n            set [velocity_x v] to ((0) - (Velocity_X))\n            point in direction ((0) - (direction))\n        else\n        end\n    end\nelse\n    set [x v] to ((x position) - (30))\n    set [y v] to (y position)\n    set [detecter v] to (((1) + (((X) + (225)) / (30))) + ((16) * (((Y) + (165)) / (30))))\n    if <(X) < [-240]> then\n        set [velocity_x v] to ((0) - (Velocity_X))\n        point in direction ((0) - (direction))\n    else\n        if <not <(item (Detecter) of [temp_temp v]) = [0]>> then\n            set [velocity_x v] to ((0) - (Velocity_X))\n            point in direction ((0) - (direction))\n        else\n        end\n    end\nend\n\nwhen I receive [start_level v]\nif <<(Enemy_Costume) = [1]> or <(Enemy_Costume) = [12]>> then\n    set [ground_found v] to [0]\n    repeat until <(Ground_found) = [1]>\n        Check_Collision\n    end\nelse\nend\nwait until <(Ground_found) = [1]>\nforever\n    if <(LOADING) = [0]> then\n        change x by (Velocity_X)\n        if <(costume [number v]) < [21]> then\n            Check_collision_left_right\n        else\n            Check_Flying_Collisions\n        end\n        next costume\n        if <(costume [number v]) > (Costume_MAX)> then\n            switch costume to (Costume_MIN)\n        end\n        if <touching (hero v)?> then\n            if <([y position v] of [hero v]) > ((y position) + (30))> then\n                set [z_vy v] to [6]\n                Die\n                stop [this script v]\n            else\n                broadcast (Z_Death v)\n                if <(x position) > ([x position v] of [hero v])> then\n                    point in direction (90)\n                else\n                    point in direction (-90)\n                end\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I receive [z_death v]\nstop [other scripts in sprite v]\n\nwhen I receive [end_level v]\nstop [other scripts in sprite v]\n\ndefine Die\nstart sound [snare drum v]\nstart sound [Bump2 v]\nset [velocity_y v] to [3]\nif <(direction) = [90]> then\n    set [angle_fall v] to [1]\n    switch costume to (Costume_MIN)\nelse\n    set [angle_fall v] to [-1]\n    switch costume to ((Costume_MAX) + (1))\nend\npoint in direction (90)\nset rotation style [all around v]\nrepeat until <(y position) < [-174]>\n    if <(Angle_fall) > [0]> then\n        turn left (Angle_fall) degrees\n    else\n        turn right ((0) - (Angle_fall)) degrees\n    end\n    change [ghost v] effect by (2)\n    change [velocity_y v] by ((0) - (Z_Gravity))\n    change y by (Velocity_Y)\nend\nhide\nset rotation style [left-right v]\npoint in direction (-90)\n\n@Sprite1\n\nwhen flag clicked\nhide\ngo to x: (9) y: (-115)\n\nwhen I receive [main_menu v]\nset [ghost v] effect to (0)\nswitch costume to (costume1 v)\nshow\nforever\n    if <not <(username) = (REMIXER)>> then\n        hide\n        stop [this script v]\n    end\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [load_a_shared_game v]\nhide\n\nwhen I receive [show_only_menu_bg v]\nhide\n\n@Sprite2\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\n\nwhen I receive [main_menu v]\nset [ghost v] effect to (0)\nswitch costume to (costume1 v)\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [show_only_menu_bg v]\nhide\n\nwhen this sprite clicked\nstop [other scripts in sprite v]\nswitch costume to (costume3 v)\nwait (0.2) seconds\nswitch costume to (costume1 v)\nset [loading v] to [1]\nwait (0.2) seconds\nbroadcast (LOAD_A_SHARED_GAME v)\nLoad_Game (1)\nhide\n\nwhen I receive [load_a_shared_game v]\nhide\n\ndefine None\ndelete (all) of [temp_levels v]\nset [letter v] to []\nset [letter_count v] to [0]\nrepeat until <(Letter) = [;]>\n    change [letter_count v] by (1)\n    set [letter v] to (letter (Letter_Count) of (item (number) of [projects v]))\nend\nset [counter v] to [0]\nrepeat (Number_of_Levels)\n    change [counter v] by (1)\n    set [letter v] to []\n    repeat ((192) + ((7) * (3)))\n        change [letter_count v] by (1)\n        set [letter v] to (join (Letter) (letter (Letter_Count) of (item (number) of [projects v])))\n    end\n    insert (Letter) at (Counter) of [temp_levels v] \nend\nCarica_Livello1_su_TEMP (1)\nset [current_level v] to [1]\nwait (0.2) seconds\nset [dis_is_a_test v] to [100]\nstop [other scripts in sprite v]\nset [loading v] to [2]\nbroadcast (SHOW_MENU v)\nstop [this script v]\n\ndefine None\ndelete (all) of [temp v]\nset [counter v] to [0]\nrepeat (192)\n    change [counter v] by (1)\n    if <(letter (Counter) of (item (level) of [temp_levels v])) = []> then\n        add [0] to [temp v]\n    else\n        add (letter (Counter) of (item (level) of [temp_levels v])) to [temp v]\n    end\nend\nrepeat (6)\n    if <(letter (Counter) of (item (level) of [temp_levels v])) = []> then\n        add [0] to [temp v]\n    else\n        set [temporary_letter v] to []\n        change [counter v] by (1)\n        set [temporary_letter v] to (join (Temporary_Letter) (letter (Counter) of (item (level) of [temp_levels v])))\n        change [counter v] by (1)\n        set [temporary_letter v] to (join (Temporary_Letter) (letter (Counter) of (item (level) of [temp_levels v])))\n        change [counter v] by (1)\n        set [temporary_letter v] to (join (Temporary_Letter) (letter (Counter) of (item (level) of [temp_levels v])))\n        if <(Temporary_Letter) = [000]> then\n        else\n            if <(letter (1) of (Temporary_Letter)) = [0]> then\n                set [temporary_letter v] to (join (letter (2) of (Temporary_Letter)) (letter (3) of (Temporary_Letter)))\n                if <(letter (1) of (Temporary_Letter)) = [0]> then\n                    set [temporary_letter v] to (letter (2) of (Temporary_Letter))\n                end\n            else\n            end\n        end\n        add (Temporary_Letter) to [temp v]\n    end\nend\nchange [counter v] by (1)\nif <(letter (Counter) of (item (level) of [temp_levels v])) = []> then\n    add [001] to [temp v]\nelse\n    add (join (letter (Counter) of (item (level) of [temp_levels v])) (join (letter ((Counter) + (1)) of (item (level) of [temp_levels v])) (letter ((Counter) + (2)) of (item (level) of [temp_levels v])))) to [temp v]\nend\n\nstop [other scripts in sprite v]\nswitch costume to (costume3 v)\nwait (0.2) seconds\nswitch costume to (costume1 v)\nbroadcast (LOAD_A_SHARED_GAME v)\nhide list [shared_projects v]\nset [controller v] to [0]\nrepeat until <(CONTROLLER) = [1]>\n    ask [] and wait\n    set [input v] to (answer)\n    if <(INPUT) = []> then\n        set [controller v] to [1]\n        show list [shared_projects v]\n        broadcast (BACK_TO_MAIN_MENU v)\n    else\n        if <([floor v] of (INPUT) ) = (INPUT)> then\n            if <(INPUT) > (length of [shared_projects v])> then\n                broadcast (invalid_number v) and wait\n            else\n                if <(INPUT) = [0]> then\n                    broadcast (invalid_input v) and wait\n                else\n                    Load_Game (INPUT)\n                    set [controller v] to [1]\n                end\n            end\n        else\n            broadcast (invalid_input v) and wait\n        end\n    end\nend\n\nbroadcast (Start_Level v)\n\nbroadcast (TEST_LEVEL v) and wait\n\nset [name v] to (item (number) of [shared_projects v])\nset [id v] to [0]\nset [user_detect v] to []\nset [counter v] to [0]\nset [id v] to [0]\nrepeat (length of [projects v])\n    change [counter v] by (1)\n    set [letter_count v] to [0]\n    set [letter v] to [0]\n    repeat until <<(Letter) = [;]> or <(Letter) = []>>\n        change [letter_count v] by (1)\n        set [letter v] to (letter (Letter_Count) of (item (Counter) of [projects v]))\n        if <not <<(Letter) = [;]> or <(Letter) = []>>> then\n            set [user_detect v] to (join (User_Detect) (Letter))\n        end\n    end\n    if <(User_Detect) = (Name)> then\n        set [id v] to (Counter)\n    end\nend\n\nhide list [shared_projects v]\nset [controller v] to [0]\nrepeat until <(CONTROLLER) = [1]>\nend\n\nset [controller v] to [1]\n\n@Sprite3\n\nwhen flag clicked\nhide\ngo to x: (243) y: (86)\n\nwhen I receive [main_menu v]\nset [ghost v] effect to (0)\nswitch costume to (costume1 v)\nshow\nforever\n    if <(username) = (REMIXER)> then\n        hide\n        stop [this script v]\n    end\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen this sprite clicked\nif <(username) = []> then\n    broadcast (Message_2_No_User v) and wait\nelse\n    if <not <(username) = (REMIXER)>> then\n        broadcast (Message_5_Wanna_REMIX v) and wait\n    else\n        set [loading v] to [1]\n        set [dis_is_a_test v] to [0]\n        stop [other scripts in sprite v]\n        switch costume to (costume3 v)\n        wait (0.2) seconds\n        switch costume to (costume1 v)\n        broadcast (SHOW_ONLY_MENU_BG v)\n    end\nend\n\nwhen I receive [load_a_shared_game v]\nhide\n\nwhen I receive [show_only_menu_bg v]\nhide\n\n@LOADING_Splash_Screen\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\ngo to [front v] layer\nforever\n    if <(LOADING) > [0]> then\n        show\n        next costume\n        if <(costume [number v]) = [17]> then\n            switch costume to (costume1 v)\n        end\n    else\n        hide\n        switch costume to (costume1 v)\n    end\nend\n\n@Music_Selection\n\nwhen I receive [exit_menu v]\nhide\n\nwhen flag clicked\nset [music_frame v] to [1]\nhide\nswitch costume to (costume1 v)\nset size to (100) %\nset [clone_id v] to [0]\nset [clone_n v] to [0]\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\nchange [clone_n v] by (1)\ncreate clone of (_myself_ v)\nchange [clone_n v] by (1)\ncreate clone of (_myself_ v)\nchange [clone_n v] by (1)\ncreate clone of (_myself_ v)\nchange [clone_n v] by (1)\ncreate clone of (_myself_ v)\n\nwhen I receive [show_music_selection v]\nset [playing v] to [0]\nshow\nif <(Clone_ID) = [3]> then\n    switch costume to ((MUSIC_FRAME) + (6))\nend\nforever\n    if <(Clone_ID) = [3]> then\n    else\n        if <(Clone_ID) = [4]> then\n            if <(playing) = [0]> then\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (bg_7 v)\n                else\n                    switch costume to (bg_6 v)\n                end\n            else\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (bg_9 v)\n                else\n                    switch costume to (bg_8 v)\n                end\n            end\n        else\n            if <(Clone_ID) = [2]> then\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (costume5 v)\n                else\n                    switch costume to (costume4 v)\n                end\n            else\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (costume2 v)\n                else\n                    switch costume to (costume1 v)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [test_level v]\nhide\n\nwhen I receive [show_background_selection v]\nhide\n\nwhen I start as a clone\nset [clone_id v] to (Clone_N)\nif <(Clone_ID) = [1]> then\n    set rotation style [left-right v]\n    point in direction (-90)\n    set [ghost v] effect to (0)\n    switch costume to (costume1 v)\nelse\n    if <(Clone_ID) = [2]> then\n        set [ghost v] effect to (0)\n        switch costume to (costume4 v)\n    else\n        if <(Clone_ID) = [3]> then\n            switch costume to ((MUSIC_FRAME) + (6))\n            set [ghost v] effect to (0)\n        else\n            switch costume to (bg_6 v)\n            set [ghost v] effect to (0)\n        end\n    end\nend\n\nwhen this sprite clicked\nif <(Clone_ID) = [4]> then\n    if <(playing) = [0]> then\n        set [playing v] to [1]\n        switch costume to (bg_8 v)\n        broadcast (Play_Sample v)\n    else\n        set [playing v] to [0]\n        switch costume to (bg_6 v)\n        broadcast (Stop_Sample v) and wait\n    end\nelse\n    if <(Clone_ID) = [3]> then\n    else\n        if <(Clone_ID) = [2]> then\n            set [playing v] to [0]\n            broadcast (Stop_Sample_for_save v) and wait\n            Save_Music\n            switch costume to (costume6 v)\n            wait (0.2) seconds\n            switch costume to (costume4 v)\n            broadcast (SHOW_MENU v)\n            wait (0.1) seconds\n            broadcast (SHOW_MENU v)\n        else\n            if <(mouse x) < [0]> then\n                change [music_frame v] by (-1)\n                if <(MUSIC_FRAME) < [1]> then\n                    set [music_frame v] to [5]\n                end\n                set [playing v] to [0]\n                broadcast (Stop_Sample v) and wait\n            else\n                change [music_frame v] by (1)\n                if <(MUSIC_FRAME) > [5]> then\n                    set [music_frame v] to [1]\n                end\n                set [playing v] to [0]\n                broadcast (Stop_Sample v) and wait\n            end\n            switch costume to (costume3 v)\n            wait (0.2) seconds\n            switch costume to (costume1 v)\n            broadcast (SWITCH_MUSIC v) and wait\n        end\n    end\nend\n\ndefine Save_Music\nset [temp v] to []\nset [temp v] to (join (MUSIC_FRAME) (Temp))\nset [temp v] to (join (Temp) (join (letter (2) of (item (199) of [temp v])) (letter (3) of (item (199) of [temp v]))))\nreplace item (199) of [temp v] with (Temp)\n\nwhen I receive [switch_music v]\n\nwhen I receive [stop_sample v]\nif <(Clone_ID) = [4]> then\n    switch costume to (bg_6 v)\nelse\nend\nstop [other scripts in sprite v]\nbroadcast (SHOW_MUSIC_SELECTION v)\n\nif <(Clone_ID) = [3]> then\n    switch costume to ((MUSIC_FRAME) + (6))\nelse\nend\n\nwhen I receive [show_menu v]\nstop [other scripts in sprite v]\nhide\n\n@MUSIC\n\nwhen flag clicked\nset [music_playing v] to [0]\n\nwhen I receive [start_level v]\nif <(Music_playing) = [0]> then\n    set [music_playing v] to [1]\n    broadcast (Play_Music v)\nend\n\nwhen I receive [show_menu v]\nif <(Music_playing) = [1]> then\n    set [music_playing v] to [0]\n    stop [other scripts in sprite v]\nend\n\nwhen I receive [play_music v]\nforever\n    play sound (MUSIC) until done\nend\n\nwhen I receive [play_sample v]\nforever\n    play sound (MUSIC_FRAME) until done\nend\n\nwhen I receive [stop_sample v]\nstop [other scripts in sprite v]\n\nwhen I receive [stop_sample_for_save v]\nstop [other scripts in sprite v]\n\nwhen I receive [stop_music_temporally v]\nstop [other scripts in sprite v]\n\nwhen I receive [end_music v]\nstop [other scripts in sprite v]\nstop all sounds\n\n@Check_username\n\nwhen flag clicked\nhide\n\nset [remixer v] to [test]\n\nset [remixer v] to (username)\n\n@Sprite5\n\nwhen flag clicked\ngo to x: (0) y: (0)\nif <(REMIXER) = (username)> then\n    hide\nelse\n    show\nend\n\nwhen I receive [main_menu v]\nif <(REMIXER) = (username)> then\n    hide\nelse\n    show\nend\n\nwhen I receive [load_a_shared_game v]\nhide\n\nwhen I receive [show_only_menu_bg v]\nhide\n\n@Sprite6\n\nwhen flag clicked\nhide\ngo to x: (83) y: (-9)\n\nwhen I receive [main_menu v]\nset [ghost v] effect to (0)\nswitch costume to (costume1 v)\nforever\n    if <(username) = (REMIXER)> then\n        show\n    else\n        hide\n        stop [this script v]\n    end\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen this sprite clicked\nif <(username) = []> then\n    broadcast (Message_2_No_User v) and wait\nelse\n    if <not <(username) = (REMIXER)>> then\n        broadcast (Message_5_Wanna_REMIX v) and wait\n    else\n        set [loading v] to [1]\n        set [dis_is_a_test v] to [0]\n        stop [other scripts in sprite v]\n        switch costume to (costume3 v)\n        wait (0.2) seconds\n        switch costume to (costume1 v)\n        broadcast (SHOW_ONLY_MENU_BG v)\n    end\nend\n\nwhen I receive [load_a_shared_game v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [show_only_menu_bg v]\nstop [other scripts in sprite v]\nhide\n\n@Scratch_detection\n\nwhen flag clicked\nforever\n    set [in editor? v] to <touching (mouse-pointer v)?>\nend\n\n@Sprite7\n\nwhen flag clicked\nhide\ngo to x: (231) y: (108)\n\nwhen this sprite clicked\nstop [other scripts in sprite v]\nswitch costume to (costume3 v)\nwait (0.2) seconds\nswitch costume to (costume1 v)\nerase all\ndelete (all) of [temp v]\nrepeat (192)\n    add [0] to [temp v]\nend\nrepeat (6)\n    add [000] to [temp v]\nend\nadd [101] to [temp v]\nset [backdrop_frame v] to [1]\nbroadcast (RENDER_AGAIN_THIS_LEVEL v)\nbroadcast (SHOW_MENU v)\nbroadcast (SHOW_BUTTONS v)\n\nwhen I receive [back_to_main_menu v]\nhide\n\nwhen I receive [exit_menu v]\nhide\n\nwhen I receive [test_level v]\nhide\n\nwhen I receive [show_background_selection v]\nhide\n\nwhen I receive [show_buttons v]\nif <not <(username) = []>> then\n    switch costume to (costume1 v)\n    show\n    forever\n        if <touching (mouse-pointer v)?> then\n            switch costume to (costume2 v)\n        else\n            switch costume to (costume1 v)\n        end\n    end\nend\n\nwhen I receive [show_music_selection v]\nhide\n\ngo to x: (0) y: (0)\n\ngo to [front v] layer\n\n@Sprite8\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\ngo to [front v] layer\nset [ghost v] effect to (0)\nrepeat (20)\n    change [ghost v] effect by (5)\n    go to [front v] layer\nend\nhide\n\nwhen flag clicked\nforever\n    reset timer\n    hide\nend\n\nwhen [timer v] > (0.5)\nshow\n\n
When playing use Left-Right arrows to move, Up arrow to Jump.\nQ to quit the game while playing.\nAs for the EDITOR just follow in-game instructions.\nNOTE: Jump on enemies head to make em fall.\n