comments = {}
commands = {"Check", "Unflirt", "Tease", "Apologize"}
randomdialogue = {"[next]"}

defensemisstext = ""
sprite = "empty"
name = "Papyrus"
hp = 10000
def = 99999
atk = 5
check = ""
dialogbubble = "rightwide"
canspare = false
cancheck = false

SetDamageUIOffset(0, 600)

RandomTease = {{"You tell Papyrus his friends\rdied for nothing.","You tell Papyrus he could never\rhave joined the royal guard.","You tell Papyrus will never see\rhis brother again.","You tell Papyrus his spaghetti\ris the worst."}, {"Le dices a Papyrus que sus\ramigos murieron por nada.","Le dices a Papyrus que nunca\rpodría unirse a la guardia real.","Le dices a Papyrus que nunca\rverá a su hermano otra vez.","Le dices a Papyrus que su\respagueti es el peor."}, {"Вы говорите Папирусу[w:5], что его\rдрузья умерли напрасно.","Вы говорите Папирусу[w:5], что он ни-\rкогда бы не смог вступить в\rкоролевскую гвардию.","Вы говорите Папирусу[w:5], что он ни-\rкогда не увидит своего брата.","Вы говорите Папирусу[w:5], что его\rспагетти худшие на свете."}}
RandomDisculpas = {{"you're so sorry.","everything will\rbe okay.","you're\rregretted of everything you did."}, {"lo\rsientes demasiado.","todo\restará bien.","estas\rarrepentido de lo que hiciste."}, {"Вы говорите Папирусу[w:10], что вам\rжаль.","Вы говорите Папирусу[w:10], что всё\rбудет в порядке.","Вы говорите Папирусу[w:10], что вы\rсожалеете обо всём содеянном."}}

function HandleAttack(attackstatus)
    if attackstatus == -1 then
		if Encounter.GetVar("phase") == 1 and Encounter.GetVar("progress") == 6 and Disculpado2 and Disculpado2 == 0 then
			if GetAlMightyGlobal("Idioma") == "Spanish" then
				currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none][func:Head, Disappointed].[w:15].[w:15].[w:15][func:Head, OUCH][func:Jaw, 22]MENTIROSO!","[noskip][font:papyrus][voice:papyrus][effect:none][func:Arms, 360][func:Jaw, 20][func:Head, Okay...]SOLO QUIERES\nMATARME..."}
			elseif GetAlMightyGlobal("Idioma") == "Russian" then
				currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none][func:Head, Disappointed].[w:15].[w:15].[w:15][func:Head, OUCH][func:Jaw, 22]ТЫ ЛЖЕЦ!","[noskip][font:papyrus][voice:papyrus][effect:none][func:Arms, 360][func:Jaw, 20][func:Head, Okay...]ТЫ ПРОСТО\nХОЧЕШЬ МЕНЯ\nУБИТЬ..."}				
			else
				currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none][func:Head, Disappointed].[w:15].[w:15].[w:15][func:Head, OUCH][func:Jaw, 22]YOU LIAR!","[noskip][font:papyrus][voice:papyrus][effect:none][func:Arms, 360][func:Jaw, 20][func:Head, Okay...]YOU JUST WANT\nTO KILL ME..."}
			end
			Teaseado2 = 1
			Disculpado2 = 1
			Game = true
		elseif Encounter["phase"] == 3 then
			Encounter["StatusPhase3"][Encounter["progress"] + 1] = "Miss Papyrus"
		elseif Encounter["phase"] == 4 then
			if not Encounter["Scared"] then
				if GetAlMightyGlobal("Idioma") == "Spanish" then
					currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none]ESTABAS A\nPUNTO DE HACER\nLO INCORRECTO!","[noskip][font:papyrus][voice:papyrus][effect:none]ESTO NO ES UN\nJUEGO!","[noskip][font:papyrus][voice:papyrus][effect:none]SOLO PARA[w:10][func:Please],\nPOR FAVOR!","[noskip][font:papyrus][voice:papyrus][effect:none]AÚN NO ES\nDEMASIADO TARDE![w:10]\nSOLO [color:f2c900]PERDONAME[color:000000]!","[noskip][font:papyrus][voice:papyrus][effect:none]TE LO RUEGO..."}
					randomdialogue = {"[effect:none][font:papyrus][voice:papyrus]POR FAVOR...", "[effect:none][font:papyrus][voice:papyrus][color:f2c900]PERDONAME[color:000000]...", "[effect:none][font:papyrus][voice:papyrus]TE LO RUEGO..."}
				elseif GetAlMightyGlobal("Idioma") == "Russian" then
					currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none]ТЫ ЧУТЬ БЫЛО\nНЕ СДЕЛАЛ \nНЕВЕРНЫЙ ВЫБОР!","[noskip][font:papyrus][voice:papyrus][effect:none]ЭТО НЕ ИГРА!","[noskip][font:papyrus][voice:papyrus][effect:none]ОСТАНОВИСЬ[w:10][func:Please],\nПРОШУ ТЕБЯ!","[noskip][font:papyrus][voice:papyrus][effect:none]ЕЩЁ НЕ СЛИШКОМ\nПОЗДНО![w:10]\nПРОСТО [color:f2c900]ПОЩАДИ[color:000000]\nМЕНЯ!","[noskip][font:papyrus][voice:papyrus][effect:none]ПОЖАЛУЙСТА..."}
					randomdialogue = {"[effect:none][font:papyrus][voice:papyrus]ПРОШУ...", "[effect:none][font:papyrus][voice:papyrus][color:f2c900]ПОЩАДИ[color:000000] МЕНЯ...", "[effect:none][font:papyrus][voice:papyrus]Я ТЕБЯ УМОЛЯЮ..."}				
				else
					currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none]YOU WERE ABOUT\nTO DO THE WRONG\nCHOICE!","[noskip][font:papyrus][voice:papyrus][effect:none]THIS IS NOT A\nGAME!","[noskip][font:papyrus][voice:papyrus][effect:none]JUST STOP[w:10][func:Please],\nPLEASE!","[noskip][font:papyrus][voice:papyrus][effect:none]IT'S NOT TOO\nLATE YET![w:10]\nJUST [color:f2c900]SPARE[color:000000] ME!","[noskip][font:papyrus][voice:papyrus][effect:none]I'M BEGGING YOU..."}
					randomdialogue = {"[effect:none][font:papyrus][voice:papyrus]PLEASE...", "[effect:none][font:papyrus][voice:papyrus][color:f2c900]SPARE[color:000000] ME...", "[effect:none][font:papyrus][voice:papyrus]I'M BEGGING YOU..."}
				end
				Encounter["Scared"] = 1
			elseif Encounter["Scared"] == 1 then
				if GetAlMightyGlobal("Idioma") == "Spanish" then
					currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none]QUÉ ESTA MAL\nCONTIGO?!","[noskip][font:papyrus][voice:papyrus][effect:none]PARA DE\nASUSTARME DE\nESA FORMA Y\nSOLO [color:f2c900]PERDONAME[color:000000]!","[noskip][font:papyrus][voice:papyrus][effect:none][func:Please]POR FAVOR[w:10], SOLO\nPARA DE HACER\nESO..."}
				elseif GetAlMightyGlobal("Idioma") == "Russian" then
				    currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none]ДА ЧТО С ТОБОЙ\nНЕ ТАК?!","[noskip][font:papyrus][voice:papyrus][effect:none]ХВАТИТ МЕНЯ\nТАК ПУГАТЬ.\nПРОСТО [color:f2c900]ПОЩАДИ[color:000000]\nМЕНЯ!","[noskip][font:papyrus][voice:papyrus][effect:none][func:Please]ПОЖАЛУЙСТА[w:10],\nПРОСТО\nПЕРЕСТАНЬ ТАК\nДЕЛАТЬ..."}
				else
					currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none]WHAT IS WRONG\nWITH YOU?!","[noskip][font:papyrus][voice:papyrus][effect:none]STOP SCARING ME\nLIKE THAT AND\nJUST [color:f2c900]SPARE[color:000000] ME!","[noskip][font:papyrus][voice:papyrus][effect:none][func:Please]PLEASE[w:10], JUST\nSTOP DOING\nTHAT..."}
				end
				Encounter["Scared"] = 2
			elseif Encounter["Scared"] == 2 then
				if GetAlMightyGlobal("Idioma") == "Spanish" then
					currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none]SOY UNA BROMA\nPARA TI?!","[noskip][font:papyrus][voice:papyrus][effect:none][func:Please]ESTAS JUGANDO\nCONMIGO?","[noskip][font:papyrus][voice:papyrus][effect:none]POR QUÉ?![w:10] ME\nESTAS ESCUCHANDO\nINCLUSO?!"}
				elseif GetAlMightyGlobal("Idioma") == "Russian" then
				    currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none]Я ТЕБЕ ЧТО,\nПОТЕХА?!","[noskip][font:papyrus][voice:papyrus][effect:none][func:Please]ИЗДЕВАЕШЬСЯ\nНАДО МНОЙ?","[noskip][font:papyrus][voice:papyrus][effect:none]ЗАЧЕМ?![w:10] ТЫ МЕНЯ\nВООБЩЕ\nСЛУШАЕШЬ?!"}
				else
					currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none]AM I A JOKE TO\nYOU?!","[noskip][font:papyrus][voice:papyrus][effect:none][func:Please]ARE YOU JUST\nMESSING WITH ME?","[noskip][font:papyrus][voice:papyrus][effect:none]WHY?![w:10] ARE YOU\nEVEN LISTENING\nTO ME?!"}
				end
				Encounter["Scared"] = 3
			elseif Encounter["Scared"] == 3 then
				if GetAlMightyGlobal("Idioma") == "Spanish" then
					currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none]CUÁNTAS VECES\nVAS A HACER\nESTO?!","[noskip][font:papyrus][voice:papyrus][effect:none]SOLO[w:10] PARA[w:10] DE[w:10]\nHACER[w:10] ESO[w:10] YA!","[noskip][font:papyrus][voice:papyrus][effect:none][func:Please]VAS A HACER QUE\nME VUELVA LOCO..."}
				elseif GetAlMightyGlobal("Idioma") == "Russian" then
				currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none]СКОЛЬКО ЕЩЁ РАЗ\nТЫ СОБИРАЕШЬСЯ\nТАК ПОСТУПАТЬ\nСО МНОЙ?!","[noskip][font:papyrus][voice:papyrus][effect:none]ПРЕКРАТИ[w:10] УЖЕ[w:10]\nТАК[w:10] ДЕЛАТЬ!","[noskip][font:papyrus][voice:papyrus][effect:none][func:Please]ТЫ МЕНЯ ДО\nБЕЛОГО КОЛЕНИЯ\nДОВЕДЁШЬ..."}
				else
					currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none]HOW MANY TIMES\nARE YOU GONNA\nDO THIS?!","[noskip][font:papyrus][voice:papyrus][effect:none]JUST[w:10] STOP[w:10] DOING[w:10]\nTHAT[w:10] ALREADY!","[noskip][font:papyrus][voice:papyrus][effect:none][func:Please]YOU'RE GONNA\nMAKE ME GO\nCRAZY..."}
				end
				Encounter["Scared"] = 4
			elseif Encounter["Scared"] == 4 then
				if GetAlMightyGlobal("Idioma") == "Spanish" then
					currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none]POR QUÉ?!","[noskip][font:papyrus][voice:papyrus][effect:none]NO LO ENTIENDO!","[noskip][font:papyrus][voice:papyrus][effect:none][func:Please]NO LO...","[noskip][font:papyrus][voice:papyrus][effect:none]YA NI SÉ QUÉ\nESTÁS TRATANDO\nDE HACER...","[noskip][font:papyrus][voice:papyrus][effect:none]PARA...[w:10] POR FAVOR..."}
				elseif GetAlMightyGlobal("Idioma") == "Russian" then    
					currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none]ЗАЧЕМ?!","[noskip][font:papyrus][voice:papyrus][effect:none]Я НЕ ПОНИМАЮ!","[noskip][font:papyrus][voice:papyrus][effect:none][func:Please]Я НЕ...","[noskip][font:papyrus][voice:papyrus][effect:none]Я ДАЖЕ НЕ ЗНАЮ\nЧЕГО ТЫ ПЫТА-\nЕШЬСЯ ДОБИТЬСЯ...","[noskip][font:papyrus][voice:papyrus][effect:none]ОСТАНОВИСЬ...[w:10]\nПОЖАЛУЙСТА..."}
				else
					currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none]WHY?!","[noskip][font:papyrus][voice:papyrus][effect:none]I DON'T GET IT!","[noskip][font:papyrus][voice:papyrus][effect:none][func:Please]I DON'T...","[noskip][font:papyrus][voice:papyrus][effect:none]I DON'T KNOW\nANYMORE WHAT\nYOU'RE EVEN\nTRYING TO DO...","[noskip][font:papyrus][voice:papyrus][effect:none]STOP...[w:10] PLEASE..."}
				end
				Encounter["Scared"] = 5
			elseif Encounter["Scared"] == 5 then
				if GetAlMightyGlobal("Idioma") == "Spanish" then
					currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none]YA NO ME\nIMPORTA...","[noskip][font:papyrus][voice:papyrus][effect:none]CUANDO ACABES\nDE HACER ESO...","[noskip][font:papyrus][voice:papyrus][effect:none]SOLO...","[noskip][font:papyrus][voice:papyrus][effect:none][color:f2c900]PERDONAME[color:000000]..."}
				elseif GetAlMightyGlobal("Idioma") == "Russian" then
				    currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none]МНЕ УЖЕ ВСЁ\nРАВНО...","[noskip][font:papyrus][voice:papyrus][effect:none]ПРЕКРАТИШЬ ТЫ\nИЛИ НЕТ...","[noskip][font:papyrus][voice:papyrus][effect:none]ПРОСТО...","[noskip][font:papyrus][voice:papyrus][effect:none][color:f2c900]ПОЩАДИ[color:000000] МЕНЯ..."}
				else
					currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none]I DON'T CARE\nANYMORE...","[noskip][font:papyrus][voice:papyrus][effect:none]WHEN YOU FINISH\nDOING THAT...","[noskip][font:papyrus][voice:papyrus][effect:none]JUST...","[noskip][font:papyrus][voice:papyrus][effect:none][color:f2c900]SPARE[color:000000] ME..."}
				end
				Encounter["Scared"] = 6
			elseif Encounter["Scared"] >= 6 then
				currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none]..."}
			end
			Encounter["moved"] = nil
		end
    else
		if Encounter["phase"] == 1 then
			if Encounter.GetVar("progress") >= 6 then
				Encounter.SetVar("progress", Encounter.GetVar("progress") + 1)
			end
			if Disculpado2 and Disculpado2 == 0 and Encounter.GetVar("progress") == 7 then
				Encounter.Call("Betrayal")
				hp = 1
			else
				if Encounter.GetVar("progress") < 11 then
					Encounter.Call("AnimateBlock")
				else
					Encounter.Call("AnimateBlock", true)
				end
			end
			if Encounter.GetVar("progress") == 7 then
				if Game then
					if GetAlMightyGlobal("Idioma") == "Spanish" then
						currentdialogue = {"[font:papyrus][voice:papyrus][effect:none]REALMENTE NO\nTIENES CORAZÓN.",
										   "[font:papyrus][voice:papyrus][effect:none]INCLUSO CUANDO\nTE PERDONE\nPOR INTENTAR\nMATARME...",
										   "[font:papyrus][waitall:2][voice:papyrus][effect:none]POR QUÉ?[w:20][waitall:1]\nCUÁL ES EL\nPUNTO???"}
					elseif GetAlMightyGlobal("Idioma") == "Russian" then
						currentdialogue = {"[font:papyrus][voice:papyrus][effect:none]ТЫ ДЕЙСТВИТЕЛЬНО\nБЕССЕРДЕЧНЫЙ.",
										   "[font:papyrus][voice:papyrus][effect:none]ДАЖЕ КОГДА Я\nПРОСТИЛ ТЕБЕ\nТВОЮ ЖЕСТОКОСТЬ...",
										   "[font:papyrus][waitall:2][voice:papyrus][effect:none]ЗАЧЕМ?[w:20][waitall:1]\nВ ЧЁМ СМЫСЛ???"}										   
					else
						currentdialogue = {"[font:papyrus][voice:papyrus][effect:none]YOU REALLY\nARE HEARTLESS.",
										   "[font:papyrus][voice:papyrus][effect:none]EVEN WHEN I FOR-\nGAVE YOU FOR\nTRYING TO KILL\nME...",
										   "[font:papyrus][waitall:2][voice:papyrus][effect:none]WHY?[w:20][waitall:1]\nWHAT'S THE\nPOINT???"}
					end
				elseif Teaseado2 and Teaseado2 >= 1 then
					if GetAlMightyGlobal("Idioma") == "Spanish" then
						currentdialogue = {"[font:papyrus][voice:papyrus][effect:none]REALMENTE NO\nTIENES CORAZÓN.",
										   "[font:papyrus][voice:papyrus][effect:none]INCLUSO CUANDO\nME DETUVE DE\nMATARTE POR\nESOS INSULTOS...",
										   "[font:papyrus][waitall:2][voice:papyrus][effect:none]POR QUÉ?[w:20][waitall:1]\nCUÁL ES EL\nPUNTO???"}
					elseif GetAlMightyGlobal("Idioma") == "Russian" then
						currentdialogue = {"[font:papyrus][voice:papyrus][effect:none]ТЫ ДЕЙСТВИТЕЛЬНО\nБЕССЕРДЕЧНЫЙ.",
										   "[font:papyrus][voice:papyrus][effect:none]ДАЖЕ КОГДА Я\nОСТАНОВИЛСЯ,[w:10]\nЧТОБЫ НЕ УБИТЬ\nТЕБЯ ЗА ТЕ\nОСКОРБЛЕНИЯ...",
										   "[font:papyrus][waitall:2][voice:papyrus][effect:none]ЗАЧЕМ?[w:20][waitall:1]\nВ ЧЁМ СМЫСЛ???"}										   
					else
						currentdialogue = {"[font:papyrus][voice:papyrus][effect:none]YOU REALLY\nARE HEARTLESS.",
										   "[font:papyrus][voice:papyrus][effect:none]EVEN WHEN I STO-\nPPED MYSELF FROM\nKILLING YOU FOR\nTHOSE INSULTS...",
										   "[font:papyrus][waitall:2][voice:papyrus][effect:none]WHY?[w:20][waitall:1]\nWHAT'S THE\nPOINT???"}
					end
				elseif not Disculpado2 or (Disculpado2 and Disculpado2 ~= 0) then
					if GetAlMightyGlobal("Idioma") == "Spanish" then
						currentdialogue = {"[font:papyrus][voice:papyrus][effect:none]REALMENTE NO\nTIENES CORAZÓN.",
										   "[font:papyrus][voice:papyrus][effect:none]DESPUÉS DE QUE\nHICE TODO PARA\nDETENERME A MI\nMISMO DE\nMATARTE...",
										   "[font:papyrus][waitall:2][voice:papyrus][effect:none]POR QUÉ?[w:20][waitall:1]\nCUÁL ES EL\nPUNTO???"}
					elseif GetAlMightyGlobal("Idioma") == "Russian" then
						currentdialogue = {"[font:papyrus][voice:papyrus][effect:none]ТЫ ДЕЙСТВИТЕЛЬНО\nБЕССЕРДЕЧНЫЙ.",
										   "[font:papyrus][voice:papyrus][effect:none]ПОСЛЕ ВСЕГО,[w:10]\nЧТО Я СДЕЛАЛ,[w:10]\nЧТОБЫ НЕ УБИТЬ\nТЕБЯ...",
										   "[font:papyrus][waitall:2][voice:papyrus][effect:none]ЗАЧЕМ?[w:20][waitall:1]\nВ ЧЁМ СМЫСЛ???"}										   
					else
						currentdialogue = {"[font:papyrus][voice:papyrus][effect:none]YOU REALLY\nARE HEARTLESS.",
										   "[font:papyrus][voice:papyrus][effect:none]AFTER I DID\nEVERYTHING I\nCOULD TO STOP\nMYSELF FROM\nKILLING YOU...",
										   "[font:papyrus][waitall:2][voice:papyrus][effect:none]WHY?[w:20][waitall:1]\nWHAT'S THE\nPOINT???"}
					end
				end
				if GetAlMightyGlobal("Idioma") == "Spanish" then
					commands[4] = "Disculparse"
				elseif GetAlMightyGlobal("Idioma") == "Russian" then
					commands[4] = "Извиниться"
				else
					commands[4] = "Apologize"
				end
			elseif Encounter.GetVar("progress") == 8 then
				if GetAlMightyGlobal("Idioma") == "Spanish" then
					currentdialogue = {"[font:papyrus][voice:papyrus][effect:none]PUEDES SER\nFELIZ SIN\nLASTIMAR GENTE.",
									   "[font:papyrus][voice:papyrus][effect:none]SOLO NECESITAS\nINTENTARLO.",
									   "[font:papyrus][voice:papyrus][effect:none]SIGO SIENDO TU\nAMIGO."}
				elseif GetAlMightyGlobal("Idioma") == "Russian" then
					currentdialogue = {"[font:papyrus][voice:papyrus][effect:none]ТЫ МОЖЕШЬ БЫТЬ\nСЧАСТЛИВ, НЕ\nПРИЧИНЯЯ ЛЮДЯМ\nБОЛЬ.",
									   "[font:papyrus][voice:papyrus][effect:none]ТЕБЕ ПРОСТО\nНУЖНО ПОПРОБО-\nВАТЬ.",
									   "[font:papyrus][voice:papyrus][effect:none]Я ВСЁ ЕЩЁ ТВОЙ\nДРУГ."}				
				else
					currentdialogue = {"[font:papyrus][voice:papyrus][effect:none]YOU CAN BE\nHAPPY WITHOUT\nHURTING PEOPLE.",
									   "[font:papyrus][voice:papyrus][effect:none]YOU JUST NEED\nTO TRY.",
									   "[font:papyrus][voice:papyrus][effect:none]I'M STILL YOUR\nFRIEND."}
				end
			elseif Encounter.GetVar("progress") == 9 then
				if GetAlMightyGlobal("Idioma") == "Spanish" then
					currentdialogue = {"[font:papyrus][voice:papyrus][effect:none]TE PERDONO.[w:20]\nNO ES DEMASIADO\nTARDE PARA\nVOLVER ATRÁS!",
									   "[font:papyrus][voice:papyrus][effect:none]NO ME HAGAS\nLASTIMARTE.[w:20]\nPOR FAVOR."}
				elseif GetAlMightyGlobal("Idioma") == "Russian" then
					currentdialogue = {"[font:papyrus][voice:papyrus][effect:none]Я ПРОЩАЮ ТЕБЯ.[w:20]\nЕЩЁ НЕ ПОЗДНО\nВЕРНУТЬСЯ НАЗАД!",
									   "[font:papyrus][voice:papyrus][effect:none]НЕ ЗАСТАВЛЯЙ\nМЕНЯ ВРЕДИТЬ\nТЕБЕ.[w:20]\nПРОШУ."}				
				else
					currentdialogue = {"[font:papyrus][voice:papyrus][effect:none]I FORGIVE YOU.[w:20]\nIT'S NOT TOO\nLATE TO GO\nBACK!",
									   "[font:papyrus][voice:papyrus][effect:none]DON'T MAKE ME\nHURT YOU.[w:20]\nPLEASE."}
				end
			elseif Encounter.GetVar("progress") == 10 then
				if GetAlMightyGlobal("Idioma") == "Spanish" then
					currentdialogue = {"[font:papyrus][waitall:2][voice:papyrus][effect:none]ESTOY EN MI\nLÍMITE, HUMANO."}
				elseif GetAlMightyGlobal("Idioma") == "Russian" then
				    currentdialogue = {"[font:papyrus][waitall:2][voice:papyrus][effect:none]Я НА ПРЕДЕЛЕ[w:10],\nЧЕЛОВЕК."}
				else
					currentdialogue = {"[font:papyrus][waitall:2][voice:papyrus][effect:none]I'M AT MY\nLIMIT, HUMAN."}
				end
			elseif Encounter.GetVar("progress") == 11 then
				Encounter.Call("ContinueMusic")
			end
		elseif Encounter["phase"] == 3 then
			if Encounter["progress"] == 0 then
				Encounter.Call("SetSansHead","Surprised")
			end
			Encounter["StatusPhase3"][Encounter["progress"] + 1] = "Fight Papyrus"
			Encounter.Call("BlockAnim")
		elseif Encounter.GetVar("phase") == 4 then
			Encounter["Animation"] = "Death 1"
			Encounter["vel"] = 0
			hp = 1
		end
    end
end

function BeforeDamageCalculation()
	if Encounter.GetVar("phase") == 1 then
		if Disculpado2 and Disculpado2 == 0 and Encounter.GetVar("progress") == 6 then
			SetDamage(9999999)
			SetDamageUIOffset(0, 0)
			Head("Disappointed")
		else
			Encounter.Call("BlockAnim")
			SetDamageUIOffset(0, 600)
		end
		if Encounter.GetVar("progress") == 6 and (not Disculpado2 or (Disculpado2 and Disculpado2 ~= 0)) then
			Encounter.Call("ContinueMusic")
			Encounter.Call("GlowAlpha", 0.7)
			SetDamageUIOffset(0, 600)
		elseif Encounter.GetVar("progress") == 10 then
			if Teaseado2 and Teaseado2 == 2 then
				SetDamage(1999 + math.random(1000))
			else
				SetDamage(999 + math.random(1000))
			end
			SetDamageUIOffset(0, 0)
		end
	elseif Encounter.GetVar("phase") == 2 then
		Encounter.Call("BlockAnim")
		SetDamageUIOffset(0, 600)
	elseif Encounter.GetVar("phase") == 3 then
		SetDamage(1)
		SetDamageUIOffset(0, 0)
	elseif Encounter.GetVar("phase") == 4 then
		SetDamage(9999999)
		SetDamageUIOffset(0, 0)
		randomdialogue = {"[next]"}
		Encounter["Bad"] = true
	end
end

function HandleCustomCommand(command)
	if command == "CHECK" then
		if Encounter.GetVar("phase") == -1 then
			BattleDialog({"[effect:none]PAPYRUS - 5 ATK 0 DEF[w:10]\n[color:ff0000][voice:chara]JUST KILL HIM ALREADY."})
		elseif Encounter.GetVar("phase") == 1 then
			if Encounter.GetVar("progress") == 6 then
				BattleDialog({"[effect:none]PAPYRUS - 5 ATK 5 DEF[w:10][color:ff0000][voice:chara]\nNow is our chance :)"})
			elseif Encounter.GetVar("progress") >= 7 then
				BattleDialog({"[effect:none]PAPYRUS - 80 ATK 20 DEF[w:10][color:ff0000][voice:chara]\nWe almost had him..."})
			else
				BattleDialog({"[effect:none]PAPYRUS - 80 ATK 20 DEF[w:10]\nHe seems willing to teach you\ra lesson."})
			end
			if string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 1, 1) == "0" then
				SetAlMightyGlobal("ProgresoProgresivamenteProgresante1", "1"..string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 2))
				if GetAlMightyGlobal("ProgresoProgresivamenteProgresante1") == "111111" then
					SetAlMightyGlobal("Archivimentazo", string.sub(GetAlMightyGlobal("Archivimentazo"), 1, 8).."1"..string.sub(GetAlMightyGlobal("Archivimentazo"), 10))
					Encounter["LogroDesbloqueado"] = {Timer = 0, Icon = 9}
				end
			end
		elseif Encounter.GetVar("phase") == 2 then
			BattleDialog({"[effect:none]PAPYRUS - 5 ATK 30 DEF[w:10]\nHe's too angry to talk."})
			if string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 2, 2) == "0" then
				SetAlMightyGlobal("ProgresoProgresivamenteProgresante1", string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 1, 1).."1"..string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 3))
				if GetAlMightyGlobal("ProgresoProgresivamenteProgresante1") == "111111" then
					SetAlMightyGlobal("Archivimentazo", string.sub(GetAlMightyGlobal("Archivimentazo"), 1, 8).."1"..string.sub(GetAlMightyGlobal("Archivimentazo"), 10))
					Encounter["LogroDesbloqueado"] = {Timer = 0, Icon = 9}
				end
			end
		elseif Encounter.GetVar("phase") == 3 then
			if Encounter["progress"] == 0 then
				BattleDialog({"[effect:none]PAPYRUS - 9999 ATK 9999 DEF[w:10]\nHe likes to say:\r\"Nyeh heh heh!\""})
			elseif Encounter["progress"] == 1 then
				if Encounter["StatusPhase3"][1] == "Check Papyrus" or Encounter["StatusPhase3"][1] == "Fight Papyrus" then
					BattleDialog({"[effect:none]PAPYRUS - 9999 ATK 9999 DEF[w:10]\nLook at those stats![w:10][color:ff0000][voice:chara]\nIT'S NOT FAIR!"})
				else
					BattleDialog({"[effect:none]PAPYRUS - 9999 ATK 9999 DEF[w:10]\nB[w:10]-b[w:10]-but[w:10] HOW?!?!"})
				end
			end
			if string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 3, 3) == "0" then
				SetAlMightyGlobal("ProgresoProgresivamenteProgresante1", string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 1, 2).."1"..string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 4))
				if GetAlMightyGlobal("ProgresoProgresivamenteProgresante1") == "111111" then
					SetAlMightyGlobal("Archivimentazo", string.sub(GetAlMightyGlobal("Archivimentazo"), 1, 8).."1"..string.sub(GetAlMightyGlobal("Archivimentazo"), 10))
					Encounter["LogroDesbloqueado"] = {Timer = 0, Icon = 9}
				end
			end
			Encounter["StatusPhase3"][Encounter["progress"] + 1] = "Check Papyrus"
		elseif Encounter.GetVar("phase") == 4 then
			BattleDialog({"[effect:none]PAPYRUS - 5 ATK 5 DEF[w:10]\nHe just wants to be your friend.[w:10][color:ff0000][voice:chara]\nNot worth my time."})
			if string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 6, 6) == "0" then
				SetAlMightyGlobal("ProgresoProgresivamenteProgresante1", string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 1, 5).."1")
				if GetAlMightyGlobal("ProgresoProgresivamenteProgresante1") == "111111" then
					SetAlMightyGlobal("Archivimentazo", string.sub(GetAlMightyGlobal("Archivimentazo"), 1, 8).."1"..string.sub(GetAlMightyGlobal("Archivimentazo"), 10))
					Encounter["LogroDesbloqueado"] = {Timer = 0, Icon = 9}
				end
			end
		end
	elseif command == "CHECAR" then
		if Encounter.GetVar("phase") == -1 then
			BattleDialog({"[effect:none]PAPYRUS - 5 ATK 0 DEF[w:10]\n[color:ff0000][voice:chara]SOLO MATÁLO DE UNA VEZ."})
		elseif Encounter.GetVar("phase") == 1 then
			if Encounter.GetVar("progress") == 6 then
				BattleDialog({"[effect:none]PAPYRUS - 5 ATK 5 DEF[w:10][color:ff0000][voice:chara]\nAhora es nuestra oportunidad :)"})
			elseif Encounter.GetVar("progress") >= 7 then
				BattleDialog({"[effect:none]PAPYRUS - 80 ATK 20 DEF[w:10][color:ff0000][voice:chara]\nCasi lo teníamos..."})
			else
				BattleDialog({"[effect:none]PAPYRUS - 80 ATK 20 DEF[w:10]\nParece estar dispuesto a\renseñarte una lección."})
			end
			if string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 1, 1) == "0" then
				SetAlMightyGlobal("ProgresoProgresivamenteProgresante1", "1"..string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 2))
				if GetAlMightyGlobal("ProgresoProgresivamenteProgresante1") == "111111" then
					SetAlMightyGlobal("Archivimentazo", string.sub(GetAlMightyGlobal("Archivimentazo"), 1, 8).."1"..string.sub(GetAlMightyGlobal("Archivimentazo"), 10))
					Encounter["LogroDesbloqueado"] = {Timer = 0, Icon = 9}
				end
			end
		elseif Encounter.GetVar("phase") == 2 then
			BattleDialog({"[effect:none]PAPYRUS - 5 ATK 30 DEF[w:10]\nEstá demasiado enojado para\rhablar."})
			if string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 2, 2) == "0" then
				SetAlMightyGlobal("ProgresoProgresivamenteProgresante1", string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 1, 1).."1"..string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 3))
				if GetAlMightyGlobal("ProgresoProgresivamenteProgresante1") == "111111" then
					SetAlMightyGlobal("Archivimentazo", string.sub(GetAlMightyGlobal("Archivimentazo"), 1, 8).."1"..string.sub(GetAlMightyGlobal("Archivimentazo"), 10))
					Encounter["LogroDesbloqueado"] = {Timer = 0, Icon = 9}
				end
			end
		elseif Encounter.GetVar("phase") == 3 then
			if Encounter["progress"] == 0 then
				BattleDialog({"[effect:none]PAPYRUS - 9999 ATK 9999 DEF[w:10]\nLe gusta decir:\r\"Nyeh heh heh!\""})
			elseif Encounter["progress"] == 1 then
				if Encounter["StatusPhase3"][1] == "Check Papyrus" or Encounter["StatusPhase3"][1] == "Fight Papyrus" then
					BattleDialog({"[effect:none]PAPYRUS - 9999 ATK 9999 DEF[w:10]\nMira esas estadísticas![w:10][color:ff0000][voice:chara]\nNO ES JUSTO!"})
				else
					BattleDialog({"[effect:none]PAPYRUS - 9999 ATK 9999 DEF[w:10]\nP[w:10]-p[w:10]-pero[w:10] CÓMO?!?!"})
				end
			end
			if string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 3, 3) == "0" then
				SetAlMightyGlobal("ProgresoProgresivamenteProgresante1", string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 1, 2).."1"..string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 4))
				if GetAlMightyGlobal("ProgresoProgresivamenteProgresante1") == "111111" then
					SetAlMightyGlobal("Archivimentazo", string.sub(GetAlMightyGlobal("Archivimentazo"), 1, 8).."1"..string.sub(GetAlMightyGlobal("Archivimentazo"), 10))
					Encounter["LogroDesbloqueado"] = {Timer = 0, Icon = 9}
				end
			end
			Encounter["StatusPhase3"][Encounter["progress"] + 1] = "Check Papyrus"
		elseif Encounter.GetVar("phase") == 4 then
			BattleDialog({"[effect:none]PAPYRUS - 5 ATK 5 DEF[w:10]\nSolo quiere ser tu amigo.[w:10][color:ff0000][voice:chara]\nNo vale mi tiempo."})
			if string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 6, 6) == "0" then
				SetAlMightyGlobal("ProgresoProgresivamenteProgresante1", string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 1, 5).."1")
				if GetAlMightyGlobal("ProgresoProgresivamenteProgresante1") == "111111" then
					SetAlMightyGlobal("Archivimentazo", string.sub(GetAlMightyGlobal("Archivimentazo"), 1, 8).."1"..string.sub(GetAlMightyGlobal("Archivimentazo"), 10))
					Encounter["LogroDesbloqueado"] = {Timer = 0, Icon = 9}
				end
			end
		end
	elseif command == "ПРОВЕРИТЬ" then
		if Encounter.GetVar("phase") == -1 then
			BattleDialog({"[effect:none]ПАПИРУС - 5 АТК 0 ЗЩТ[w:10]\n[color:ff0000][voice:chara]ПРОСТО УБЕЙ ЕГО УЖЕ."})
		elseif Encounter.GetVar("phase") == 1 then
			if Encounter.GetVar("progress") == 6 then
				BattleDialog({"[effect:none]ПАПИРУС - 5 АТК 5 ЗЩТ[w:10][color:ff0000][voice:chara]\nВот наш шанс :)"})
			elseif Encounter.GetVar("progress") >= 7 then
				BattleDialog({"[effect:none]ПАПИРУС - 80 АТК 20 ЗЩТ[w:10][color:ff0000][voice:chara]\nПочти попали..."})
			else
				BattleDialog({"[effect:none]ПАПИРУС - 80 АТК 20 ЗЩТ[w:10]\nПохоже[w:10], он хочет преподать вам\rурок."})
			end
			if string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 1, 1) == "0" then
				SetAlMightyGlobal("ProgresoProgresivamenteProgresante1", "1"..string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 2))
				if GetAlMightyGlobal("ProgresoProgresivamenteProgresante1") == "111111" then
					SetAlMightyGlobal("Archivimentazo", string.sub(GetAlMightyGlobal("Archivimentazo"), 1, 8).."1"..string.sub(GetAlMightyGlobal("Archivimentazo"), 10))
					Encounter["LogroDesbloqueado"] = {Timer = 0, Icon = 9}
				end
			end
		elseif Encounter.GetVar("phase") == 2 then
			BattleDialog({"[effect:none]ПАПИРУС - 5 АТК 30 ЗЩТ[w:10]\nОн слишком зол[w:10], чтобы говорить."})
			if string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 2, 2) == "0" then
				SetAlMightyGlobal("ProgresoProgresivamenteProgresante1", string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 1, 1).."1"..string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 3))
				if GetAlMightyGlobal("ProgresoProgresivamenteProgresante1") == "111111" then
					SetAlMightyGlobal("Archivimentazo", string.sub(GetAlMightyGlobal("Archivimentazo"), 1, 8).."1"..string.sub(GetAlMightyGlobal("Archivimentazo"), 10))
					Encounter["LogroDesbloqueado"] = {Timer = 0, Icon = 9}
				end
			end
		elseif Encounter.GetVar("phase") == 3 then
			if Encounter["progress"] == 0 then
				BattleDialog({"[effect:none]ПАПИРУС - 9999 АТК 9999 ЗЩТ[w:10]\nОн любит говорить:\r\"Ньех-хех-хех!\""})
			elseif Encounter["progress"] == 1 then
				if Encounter["StatusPhase3"][1] == "Check Papyrus" or Encounter["StatusPhase3"][1] == "Fight Papyrus" then
					BattleDialog({"[effect:none]ПАПИРУС - 9999 АТК 9999 ЗЩТ[w:10]\nПосмотри на его статистику![w:10][color:ff0000][voice:chara]\nЭТО НЕЧЕСТНО!"})
				else
					BattleDialog({"[effect:none]ПАПИРУС - 9999 АТК 9999 ЗЩТ[w:10]\nН[w:10]-н[w:10]-но[w:10] КАК?!?!"})
				end
			end
			if string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 3, 3) == "0" then
				SetAlMightyGlobal("ProgresoProgresivamenteProgresante1", string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 1, 2).."1"..string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 4))
				if GetAlMightyGlobal("ProgresoProgresivamenteProgresante1") == "111111" then
					SetAlMightyGlobal("Archivimentazo", string.sub(GetAlMightyGlobal("Archivimentazo"), 1, 8).."1"..string.sub(GetAlMightyGlobal("Archivimentazo"), 10))
					Encounter["LogroDesbloqueado"] = {Timer = 0, Icon = 9}
				end
			end
			Encounter["StatusPhase3"][Encounter["progress"] + 1] = "Check Papyrus"
		elseif Encounter.GetVar("phase") == 4 then
			BattleDialog({"[effect:none]ПАПИРУС - 5 АТК 5 ЗЩТ[w:10]\nОн лишь хочет быть вашим другом.[w:10][color:ff0000][voice:chara]\nНе стоит моего времени."})
			if string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 6, 6) == "0" then
				SetAlMightyGlobal("ProgresoProgresivamenteProgresante1", string.sub(GetAlMightyGlobal("ProgresoProgresivamenteProgresante1"), 1, 5).."1")
				if GetAlMightyGlobal("ProgresoProgresivamenteProgresante1") == "111111" then
					SetAlMightyGlobal("Archivimentazo", string.sub(GetAlMightyGlobal("Archivimentazo"), 1, 8).."1"..string.sub(GetAlMightyGlobal("Archivimentazo"), 10))
					Encounter["LogroDesbloqueado"] = {Timer = 0, Icon = 9}
				end
			end
		end
	elseif command == "UNFLIRT" then
		if Encounter["phase"] == -1 then
			BattleDialog({"[effect:none][color:ff0000][voice:chara]JUST KILL HIM ALREADY."})
		else
			BattleDialog({"[effect:none]Your flirts have been retracted.[w:10]\nNo longer a need to worry\rabout romantic tension."})
		end
	elseif command == "DESCOQUETEAR" then
		if Encounter["phase"] == -1 then
			BattleDialog({"[effect:none][color:ff0000][voice:chara]SOLO MATÁLO DE UNA VEZ."})
		else
			BattleDialog({"[effect:none]Tus coqueteos han sido retraídos.[w:10]\nYa no es necesario preocuparse\rpor una tensión romántica."})
		end
	elseif command == "АНТИФЛИРТ" then
		if Encounter["phase"] == -1 then
			BattleDialog({"[effect:none][color:ff0000][voice:chara]ПРОСТО УБЕЙ ЕГО УЖЕ."})
		else
			BattleDialog({"[effect:none]Вы оттаргаете свой флирт.[w:10]\nУже нет смысла волноваться о\rромантической обстановке."})
		end
	elseif command == "TEASE" then
		if Encounter["phase"] == -1 then
			BattleDialog({"[effect:none][color:ff0000][voice:chara]JUST KILL HIM ALREADY."})
		else
			if Encounter.GetVar("progress") <= 5 then
				if not Teaseado then
					BattleDialog({"[noskip][effect:none]"..RandomTease[1][math.random(4)].."[w:10][func:Glow, 1]\nHis eye glows brighter.","[effect:none]Papyrus's ATTACK increased!"})
					Teaseado = true
				else
					BattleDialog({"[effect:none]"..RandomTease[1][math.random(4)],"[effect:none]Papyrus no longer trust in your\rlies..."})
				end
			elseif Encounter.GetVar("progress") == 6 then
				if not Teaseado2 then
					if not Disculpado2 then
						BattleDialog({"[noskip][effect:none]"..RandomTease[1][math.random(4)]})
						currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none][func:Arms, 20]STOP HUMAN![w:20]\nYOUR WORDS[func:Arms, 0]\nHURTS..."}
						Teaseado2 = 1
					else
						BattleDialog({"[noskip][effect:none][func:Head, Disappointed]"..RandomTease[1][math.random(4)]})
						currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:shake][func:Head, Disappointed, 6]WHY HUMAN?![w:20][effect:none]\nYOUR WORDS[func:Head, Okay..., -6][func:Arms, 360]\nHURTS..."}
						Teaseado2 = 1
						Disculpado2 = 1
					end
				elseif Teaseado2 == 1 then
					BattleDialog({"[noskip][effect:none]"..RandomTease[1][math.random(4)].."[w:10]\nPapyrus cries louder.","[effect:none]Papyrus's ATTACK decreased![w:10]\nPapyrus's DEFENSE decreased!"})
					Teaseado2 = 2
					Disculpado2 = 2
				elseif Teaseado2 == 2 then
					BattleDialog({"[effect:none]"..RandomTease[1][math.random(4)].."[w:10]\nPapyrus isn't listening..."})
				end
			else
				BattleDialog({"[effect:none]"..RandomTease[1][math.random(4)],"Papyrus no longer trust in your\rlies..."})
			end
		end
	elseif command == "MOLESTAR" then
		if Encounter["phase"] == -1 then
			BattleDialog({"[effect:none][color:ff0000][voice:chara]SOLO MATÁLO DE UNA VEZ."})
		else
			if Encounter.GetVar("progress") <= 5 then
				if not Teaseado then
					BattleDialog({"[noskip][effect:none]"..RandomTease[2][math.random(4)].."[w:10][func:Glow, 1]\nSu ojo brilla más.","[effect:none]El ATAQUE de Papyrus incrementó!"})
					Teaseado = true
				else
					BattleDialog({"[effect:none]"..RandomTease[2][math.random(4)],"[effect:none]Papyrus ya no cree en tus\rmentiras..."})
				end
			elseif Encounter.GetVar("progress") == 6 then
				if not Teaseado2 then
					if not Disculpado2 then
						BattleDialog({"[noskip][effect:none]"..RandomTease[2][math.random(4)]})
						currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none][func:Arms, 20]PARA HUMANO![w:20]\nTUS PALABRAS[func:Arms, 0]\nDUELEN..."}
						Teaseado2 = 1
					else
						BattleDialog({"[noskip][effect:none][func:Head, Disappointed]"..RandomTease[2][math.random(4)]})
						currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:shake][func:Head, Disappointed, 6]POR QUÉ HUMANO?![w:20][effect:none]\nTUS PALABRAS[func:Head, Okay..., -6][func:Arms, 360]\nDUELEN..."}
						Teaseado2 = 1
						Disculpado2 = 1
					end
				elseif Teaseado2 == 1 then
					BattleDialog({"[noskip][effect:none]"..RandomTease[2][math.random(4)].."[w:10]\nPapyrus llora más fuerte.","[effect:none]El ATAQUE de Papyrus disminuyó![w:10]\nLa DEFENSA de Papyrus disminuyó!"})
					Teaseado2 = 2
					Disculpado2 = 2
				elseif Teaseado2 == 2 then
					BattleDialog({"[effect:none]"..RandomTease[2][math.random(4)].."[w:10]\nPapyrus no está escuchando..."})
				end
			else
				BattleDialog({"[effect:none]"..RandomTease[2][math.random(4)],"Papyrus ya no cree en tus\rmentiras..."})
			end
		end
	elseif command == "ДРАЗНИТЬ" then
		if Encounter["phase"] == -1 then
			BattleDialog({"[effect:none][color:ff0000][voice:chara]ПРОСТО УБЕЙ ЕГО УЖЕ."})
		else
			if Encounter.GetVar("progress") <= 5 then
				if not Teaseado then
					BattleDialog({"[noskip][effect:none]"..RandomTease[3][math.random(1,4)].."[effect:none][func:Glow, 1]\nЕго глаз сияет ярче.","АТАКА Папируса увеличилась!"})
					Teaseado = true
				else
					BattleDialog({"[effect:none]"..RandomTease[3][math.random(4)],"[effect:none]Папирус больше не верит вашему\rвранью..."})
				end
			elseif Encounter.GetVar("progress") == 6 then
				if not Teaseado2 then
					if not Disculpado2 then
						BattleDialog({"[noskip][effect:none]"..RandomTease[3][math.random(4)]})
						currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none][func:Arms, 20]ПРЕКРАТИ[w:10], ЧЕЛО-\nВЕК![w:20] ТВОИ СЛОВА[func:Arms, 0]\nРАНЯТ..."}
						Teaseado2 = 1
					else
						BattleDialog({"[noskip][effect:none][func:Head, Disappointed]"..RandomTease[3][math.random(4)]})
						currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:shake][func:Head, Disappointed, 6]ЗАЧЕМ ЧЕЛОВЕК?![w:20][effect:none]\nТВОИ СЛОВА[func:Head, Okay..., -6][func:Arms, 360]\nРАНЯТ..."}
						Teaseado2 = 1
						Disculpado2 = 1
					end
				elseif Teaseado2 == 1 then
					BattleDialog({"[noskip][effect:none]"..RandomTease[3][math.random(4)].."","[effect:none]Папирус плачет громче.\nАТАКА Папируса понизилась![w:10]\nЗАЩИТА Папируса понизилась!"})
					Teaseado2 = 2
					Disculpado2 = 2
				elseif Teaseado2 == 2 then
					BattleDialog({"[effect:none]"..RandomTease[3][math.random(4)].."","Папирус не слушает..."})
				end
			else
				BattleDialog({"[effect:none]"..RandomTease[3][math.random(4)],"Папирус больше не верит вашему\rвранью..."})
			end
		end
	elseif command == "APOLOGIZE" then
		if Encounter["phase"] == -1 then
			BattleDialog({"[effect:none][color:ff0000][voice:chara]WHY?![w:10] JUST KILL HIM ALREADY."})
		else
			if Encounter.GetVar("progress") <= 5 then
				if not Teaseado or not Disculpado then
					if not Disculpado then
						BattleDialog({"[noskip][effect:none]You apologize.[w:10]\nPapyrus recalls a good memory,[w:10][func:Glow, 0.4]\rand his glowing eye weakens.","[effect:none]Papyrus's ATTACK decreased!"})
						Disculpado = true
						Teaseado = false
					else
						BattleDialog({"[effect:none]You apologize.[w:10]\nPapyrus shows no reaction."})
					end
				else
					BattleDialog({"[effect:none]You apologize.[w:10]\nPapyrus no longer trust in your\rlies..."})
				end
			else
				BattleDialog({"[effect:none]You apologize.[w:10]\nPapyrus no longer trust in your\rlies..."})
			end
		end
	elseif command == "DISCULPARSE" then
		if Encounter["phase"] == -1 then
			BattleDialog({"[effect:none][color:ff0000][voice:chara]POR QUÉ?![w:10] SOLO MATÁLO DE UNA VEZ."})
		else
			if Encounter.GetVar("progress") <= 5 then
				if not Teaseado or not Disculpado then
					if not Disculpado then
						BattleDialog({"[noskip][effect:none]Te disculpas.[w:10]\nPapyrus recuerda un buen momento,[w:10][func:Glow, 0.4]\ry su ojo brillante se debilita.","[effect:none]El ATAQUE de Papyrus disminuyó!"})
						Disculpado = true
						Teaseado = false
					else
						BattleDialog({"[effect:none]Te disculpas.[w:10]\nPapyrus no muestra reacción."})
					end
				else
					BattleDialog({"[effect:none]Te disculpas.[w:10]\nPapyrus ya no cree en tus\rmentiras..."})
				end
			else
				BattleDialog({"[effect:none]Te disculpas.[w:10]\nPapyrus ya no cree en tus\rmentiras..."})
			end
		end
	elseif command == "ИЗВИНИТЬСЯ" then
		if Encounter["phase"] == -1 then
			BattleDialog({"[effect:none][color:ff0000][voice:chara]ЗАЧЕМ?![w:10] ПРОСТО УБЕЙ ЕГО УЖЕ."})
		else
			if Encounter.GetVar("progress") <= 5 then
				if not Teaseado or not Disculpado then
					if not Disculpado then
						BattleDialog({"[noskip][effect:none]Вы извиняетесь.[w:10]\nПапирус вспомнил что-то хорошее,[w:10][func:Glow, 0.4]\rогонь в его глазу стал меньше.","[effect:none]АТАКА Папируса понизилась!"})
						Disculpado = true
						Teaseado = false
					else
						BattleDialog({"[effect:none]Вы извиняетесь.[w:10]\nПапирус никак не отреагировал."})
					end
				else
					BattleDialog({"[effect:none]Вы извиняетесь.[w:10]\nПапирус больше не верит вашему\rвранью..."})
				end
			else
				BattleDialog({"[effect:none]Вы извиняетесь.[w:10]\nПапирус больше не верит вашему\rвранью..."})
			end
		end
	elseif command == "CONSOLE" then
		if Encounter.GetVar("progress") == 6 then
			if not Disculpado2 then
				BattleDialog({"[noskip][effect:none]You tell Papyrus "..RandomDisculpas[1][math.random(3)].."[w:10][func:Arms, 20]\nPapyrus stops crying."})
				currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none]I FORGIVE YOU\nHUMAN...[func:Arms, 0][w:20][func:Arms, -140][func:Head, Okay...]\nI'LL BE FINE..."}
				Disculpado2 = 0
				Teaseado2 = nil
			elseif Disculpado2 == 0 then
				BattleDialog({"[effect:none]You tell Papyrus "..RandomDisculpas[1][math.random(3)].."[w:10]\nPapyrus shows no reaction."})
				currentdialogue = {"[font:papyrus][voice:papyrus][effect:none]..."}
			elseif Disculpado2 == 1 then
				BattleDialog({"[effect:none]You tell Pap-[func:State,ENEMYDIALOGUE]"})
				currentdialogue = {"[noskip][font:papyrus][voice:papyrus][func:Arms, 20][func:Head, STOP][effect:none]STOP!!![w:20]\nPLEASE[w:5][func:Arms, 0] STOP..."}
				Disculpado2 = 2
			elseif Disculpado2 == 2 then
				BattleDialog({"[effect:none]You tell Papyrus "..RandomDisculpas[1][math.random(3)].."[w:10]\nPapyrus isn't listening."})
			end
		end
	elseif command == "CONSOLAR" then
		if Encounter.GetVar("progress") == 6 then
			if not Disculpado2 then
				BattleDialog({"[noskip][effect:none]Le dices a Papyrus que "..RandomDisculpas[2][math.random(3)].."[w:10][func:Arms, 20]\nPapyrus para de llorar."})
				currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none]TE PERDONO\nHUMANO...[func:Arms, 0][w:20][func:Arms, -140][func:Head, Okay...]\nESTARÉ BIEN..."}
				Disculpado2 = 0
				Teaseado2 = nil
			elseif Disculpado2 == 0 then
				BattleDialog({"[effect:none]Le dices a Papyrus que "..RandomDisculpas[2][math.random(3)].."[w:10]\nPapyrus no muestra reacción."})
				currentdialogue = {"[font:papyrus][voice:papyrus][effect:none]..."}
			elseif Disculpado2 == 1 then
				BattleDialog({"[effect:none]Le dices a Pap-[func:State,ENEMYDIALOGUE]"})
				currentdialogue = {"[noskip][font:papyrus][voice:papyrus][func:Arms, 20][func:Head, STOP][effect:none]PARA!!![w:20]\nPOR FAVOR[w:5][func:Arms, 0] PARA..."}
				Disculpado2 = 2
			elseif Disculpado2 == 2 then
				BattleDialog({"[effect:none]You tell Papyrus "..RandomDisculpas[2][math.random(3)].."[w:10]\nPapyrus no está escuchando."})
			end
		end
	elseif command == "УТЕШИТЬ" then
		if Encounter.GetVar("progress") == 6 then
			if not Disculpado2 then
				BattleDialog({"[noskip][effect:none]"..RandomDisculpas[3][math.random(3)].."[w:10][func:Arms, 20]\nПапирус прекращает плакать."})
				currentdialogue = {"[noskip][font:papyrus][voice:papyrus][effect:none]Я ПРОЩАЮ ТЕБЯ[w:10],\nЧЕЛОВЕК...[func:Arms, 0][w:20][func:Arms, -140][func:Head, Okay...]\nЯ БУДУ В\nПОРЯДКЕ..."}
				Disculpado2 = 0
				Teaseado2 = nil
			elseif Disculpado2 == 0 then
				BattleDialog({"[effect:none]"..RandomDisculpas[3][math.random(3)].."[w:10]\nПапирус никак не\rотреагировал."})
				currentdialogue = {"[font:papyrus][voice:papyrus][effect:none]..."}
			elseif Disculpado2 == 1 then
				BattleDialog({"[effect:none]Вы говорите Пап-[func:State,ENEMYDIALOGUE]"})
				currentdialogue = {"[noskip][font:papyrus][voice:papyrus][func:Arms, 20][func:Head, STOP][effect:none]ХВАТИТ!!![w:20]\nПРОШУ,[w:10][func:Arms, 0]\nОСТАНОВИСЬ..."}
				Disculpado2 = 2
			elseif Disculpado2 == 2 then
				BattleDialog({"[effect:none]"..RandomDisculpas[3][math.random(3)].."[w:10]\nПапирус не слушает."})
			end
		end
	elseif command == "REFLIRT" then
		if Encounter["phase"] == 2 then
			BattleDialog({"[effect:none]You try to flirt.[w:10]\nPapyrus's expression makes all\ryour flirts retract."})
		elseif Encounter["phase"] == 3 then
			if Encounter["progress"] == 0 then
				BattleDialog({"[effect:none]You flirt.[w:10]\nPapyrus looks at you with a\rface of disgust."})
				Encounter.Call("SetSansHead","Worried")
				Encounter.Call("SetHead","Disgust")
				Encounter.Call("AttackAnim", 1)
			else
				if Encounter["StatusPhase3"][1] == "Flirt" then
					BattleDialog({"[effect:none]You keep flirting.[w:10]\nPapyrus starts to think that\ryou are a sicko..."})
					Encounter.Call("SetSansHead","Worried")
					Encounter.Call("SetHead","Disgust")
					Encounter.Call("AttackAnim", 1)
				else
					BattleDialog({"[effect:none]You flirt.[w:10]\nPapyrus looks at you with a\rface of disgust."})
					Encounter.Call("SetSansHead","Surprised")
					Encounter.Call("SetHead","Disgust")
					Encounter.Call("AttackAnim", 1)
				end
			end
			Encounter["StatusPhase3"][Encounter["progress"] + 1] = "Flirt"
		end
	elseif command == "RECOQUETEAR" then
		if Encounter["phase"] == 2 then
			BattleDialog({"[effect:none]Intentas coquetear.[w:10]\nLa expresión de Papyrus hace que\rtodos tus coqueteos se retraigan."})
		elseif Encounter["phase"] == 3 then
			if Encounter["progress"] == 0 then
				BattleDialog({"[effect:none]Tu coqueteas.[w:10]\nPapyrus te mira con una cara\rde disgusto."})
				Encounter.Call("SetSansHead","Worried")
				Encounter.Call("SetHead","Disgust")
				Encounter.Call("AttackAnim", 1)
			else
				if Encounter["StatusPhase3"][1] == "Flirt" then
					BattleDialog({"[effect:none]Sigues coqueteando.[w:10]\nPapyrus empieza a pensar que\reres un enfermo..."})
					Encounter.Call("SetSansHead","Worried")
					Encounter.Call("SetHead","Disgust")
					Encounter.Call("AttackAnim", 1)
				else
					BattleDialog({"[effect:none]Tu coqueteas.[w:10]\nPapyrus te mira con una cara\rde disgusto."})
					Encounter.Call("SetSansHead","Surprised")
					Encounter.Call("SetHead","Disgust")
					Encounter.Call("AttackAnim", 1)
				end
			end
			Encounter["StatusPhase3"][Encounter["progress"] + 1] = "Flirt"
		end
	elseif command == "ПЕРЕФЛИРТ" then
		if Encounter["phase"] == 2 then
			BattleDialog({"[effect:none]Вы пытаетесь флиртовать.[w:10]\nВыражение лица Папируса отражает\rвесь ваш флирт."})
		elseif Encounter["phase"] == 3 then
			if Encounter["progress"] == 0 then
				BattleDialog({"[effect:none]Вы флиртуете.[w:10]\nПапирус смотрит на вас с\rотвращением."})
				Encounter.Call("SetSansHead","Worried")
				Encounter.Call("SetHead","Disgust")
				Encounter.Call("AttackAnim", 1)
			else
				if Encounter["StatusPhase3"][1] == "Flirt" then
					BattleDialog({"[effect:none]Вы продолжаете флиртовать.[w:10]\nПапирус начинает думать[w:5],\rчто вы псих..."})
					Encounter.Call("SetSansHead","Worried")
					Encounter.Call("SetHead","Disgust")
					Encounter.Call("AttackAnim", 1)
				else
					BattleDialog({"[effect:none]Вы флиртуете.[w:10]\nПапирус смотрит на вас с\rотвращением."})
					Encounter.Call("SetSansHead","Surprised")
					Encounter.Call("SetHead","Disgust")
					Encounter.Call("AttackAnim", 1)
				end
			end
			Encounter["StatusPhase3"][Encounter["progress"] + 1] = "Flirt"
		end
	elseif command == "CRY" then
		if Encounter["phase"] == 2 then
			BattleDialog({"[effect:none]You cry.[w:10]\nPapyrus no longer believes\rin you."})
		elseif Encounter["phase"] == 3 then
			if Encounter["progress"] == 0 then
				BattleDialog({"[effect:none]You start to cry."})
				Encounter.Call("SetHead","Thinking")
				Encounter.Call("AttackAnim", 2)
			else
				if Encounter["StatusPhase3"][1] == "Cry" then
					Encounter.Call("SetHead","Disgust")
					BattleDialog({"[effect:none]You keep crying.[w:10]\nPapyrus starts to feel a bit\runcomfortable.","[effect:none]Sans is just.[w:5].[w:5].[w:5] being lazy as\ralways[w:10], nothing new.[func:Wink]"})
				elseif Encounter["StatusPhase3"][1] == "Fight Papyrus" then
					BattleDialog({"[effect:none]You start to cry.[w:10]\nPapyrus doesn't even care.[w:10]\nSans is just.[w:5].[w:5].[w:5] being lazy as\ralways[w:10], nothing new.[func:Wink]"})
				else
					Encounter.Call("SetHead","Thinking")
					Encounter.Call("SetSansHead","Angry")
					Encounter.Call("AttackAnim", 1)
					BattleDialog({"[effect:none]You start to cry.[w:10]\nPapyrus starts to feel a bit\rbad now.","[effect:none]Sans looks at you [waitall:3]not very\rhappy..."})
				end
			end
			Encounter["StatusPhase3"][Encounter["progress"] + 1] = "Cry"
		end
	elseif command == "LLORAR" then
		if Encounter["phase"] == 2 then
			BattleDialog({"[effect:none]Tu lloras.[w:10]\nPapyrus ya no cree en ti."})
		elseif Encounter["phase"] == 3 then
			if Encounter["progress"] == 0 then
				BattleDialog({"[effect:none]Empiezas a llorar."})
				Encounter.Call("SetHead","Thinking")
				Encounter.Call("AttackAnim", 2)
			else
				if Encounter["StatusPhase3"][1] == "Cry" then
					Encounter.Call("SetHead","Disgust")
					BattleDialog({"[effect:none]Sigues llorando.[w:10]\nPapyrus comienza a sentirse un\rpoco incómodo.","[effect:none]Sans solo.[w:5].[w:5].[w:5] está siendo flojo\rcomo siempre[w:10], nada nuevo.[func:Wink]"})
				elseif Encounter["StatusPhase3"][1] == "Fight Papyrus" then
					BattleDialog({"[effect:none]Empiezas a llorar.[w:10]\nA Papyrus ni siquiera le importa.[w:10]\nSans solo.[w:5].[w:5].[w:5] está siendo flojo\rcomo siempre[w:10], nada nuevo.[func:Wink]"})
				else
					Encounter.Call("SetHead","Thinking")
					Encounter.Call("SetSansHead","Angry")
					Encounter.Call("AttackAnim", 1)
					BattleDialog({"[effect:none]Empiezas a llorar.[w:10]\nPapyrus comienza a sentirse un\rpoco mal.","[effect:none]Sans te mira [waitall:3]no muy feliz..."})
				end
			end
			Encounter["StatusPhase3"][Encounter["progress"] + 1] = "Cry"
		end
	elseif command == "ПЛАКАТЬ" then
		if Encounter["phase"] == 2 then
			BattleDialog({"[effect:none]Вы плачете.[w:10]\nПапирус больше вам не верит."})
		elseif Encounter["phase"] == 3 then
			if Encounter["progress"] == 0 then
				BattleDialog({"[effect:none]Вы начинаете плакать."})
				Encounter.Call("SetHead","Thinking")
				Encounter.Call("AttackAnim", 2)
			else
				if Encounter["StatusPhase3"][1] == "Cry" then
					Encounter.Call("SetHead","Disgust")
					BattleDialog({"[effect:none]Вы продолжате плакать.[w:10]\nПапирус начинает чув-\rствовать себя неуютно.","[effect:none]Санс просто.[w:5].[w:5].[w:5] остаётся ленивым[w:10],\rкак всегда[w:10], ничего нового.[func:Wink]"})
				elseif Encounter["StatusPhase3"][1] == "Fight Papyrus" then
					BattleDialog({"[effect:none]Вы начинаете плакать.[w:10]\nПапирус не обращает внимания.[w:10]\nА Санс.[w:5].[w:5].[w:5] остаётся ленивым[w:10],\rкак всегда[w:10], ничего нового.[func:Wink]"})
				else
					Encounter.Call("SetHead","Thinking")
					Encounter.Call("SetSansHead","Angry")
					Encounter.Call("AttackAnim", 1)
					BattleDialog({"[effect:none]Вы начинаете плакать.[w:10]\nПапирус начинает чув-\rствовать себя виноватым.","[effect:none]Санс [waitall:3]нерадостно\rсмотрит на вас..."})
				end
			end
			Encounter["StatusPhase3"][Encounter["progress"] + 1] = "Cry"
		end
	elseif command == "PUN" then
		if Encounter["phase"] == 2 then
			BattleDialog({"[effect:none]You say the word [waitall:5]PUN[waitall:1].[w:10]\nPapyrus ignores you."})
		elseif Encounter["phase"] == 3 then
			if Encounter["progress"] == 0 then
				BattleDialog({"[effect:none]You say the word \"pun\" out loud.[w:10]\nPapyrus looks at you in disgust."})
				Encounter.Call("SetSansHead","Joking")
				Encounter.Call("SetHead","Disgust")
				Encounter.Call("AttackAnim", 1)
			else
				if Encounter["StatusPhase3"][1] == "Pun" then
					BattleDialog({"[effect:none]You say the word \"pun\" out loud\ragain.","[effect:none]Even after making one himself[w:10],\rPapyrus's expression freezes\rout of disgust.","[effect:none]Sans is still just smiling and\rbeing lazy[w:10], like usual.[func:Wink]"})
				else
					BattleDialog({"[effect:none]You say the word \"pun\" out loud.","[effect:none]Even after making one himself[w:10],\rPapyrus's expression freezes\rout of disgust.","[effect:none]Sans is still just smiling and\rbeing lazy[w:10], like usual.[func:Wink]"})
				end
			end
			Encounter["StatusPhase3"][Encounter["progress"] + 1] = "Pun"
		end
	elseif command == "BROMEAR" then
		if Encounter["phase"] == 2 then
			BattleDialog({"[effect:none]Dices la palabra [waitall:5]BROMA[waitall:1].[w:10]\nPapyrus te ignora."})
		elseif Encounter["phase"] == 3 then
			if Encounter["progress"] == 0 then
				BattleDialog({"[effect:none]Dices la palabra \"broma\" en voz\ralta.[w:10]\nPapyrus te mira con disgusto."})
				Encounter.Call("SetSansHead","Joking")
				Encounter.Call("SetHead","Disgust")
				Encounter.Call("AttackAnim", 1)
			else
				if Encounter["StatusPhase3"][1] == "Pun" then
					BattleDialog({"[effect:none]Dices la palabra \"broma\" en voz\ralta de nuevo.","[effect:none]Incluso después de hacer uno el\rmismo[w:10], la expresión de Papyrus se\rcongela de disgusto.","[effect:none]Sans sigue sonriendo y siendo\rflojo[w:10], como siempre.[func:Wink]"})
				else
					BattleDialog({"[effect:none]Dices la palabra \"broma\" en voz\ralta.","[effect:none]Incluso después de hacer uno el\rmismo[w:10], la expresión de Papyrus se\rcongela de disgusto.","[effect:none]Sans sigue sonriendo y siendo\rflojo[w:10], como siempre.[func:Wink]"})
				end
			end
			Encounter["StatusPhase3"][Encounter["progress"] + 1] = "Pun"
		end
	elseif command == "ШУТКА" then
		if Encounter["phase"] == 2 then
			BattleDialog({"[effect:none]Вы сказали слово\r[waitall:5]ШУТКА[waitall:1].[w:10]\nПапирус вас игнорирует."})
		elseif Encounter["phase"] == 3 then
			if Encounter["progress"] == 0 then
				BattleDialog({"[effect:none]Вы вслух сказали слово\r\"шутка\".[w:10] Папирус смотрит\rна вас с отвращением."})
				Encounter.Call("SetSansHead","Joking")
				Encounter.Call("SetHead","Disgust")
				Encounter.Call("AttackAnim", 1)
			else
				if Encounter["StatusPhase3"][1] == "Pun" then
					BattleDialog({"[effect:none]Вы выкрикнули слово \"шутка\"\rснова.","[effect:none]Хоть Папирус и сказал\rодну сам[w:10], его лицо\rзастыло в отвращении.","[effect:none]Санс всё ещё просто\rулыбается и остаётся\rленивым[w:10], как и всегда.[func:Wink]"})
				else
					BattleDialog({"[effect:none]Вы выкрикнули слово \"шутка\".","[effect:none]Хоть Папирус и сказал\rодну сам[w:10], его лицо\rзастыло в отвращении.","[effect:none]Санс всё ещё просто\rулыбается и остаётся\rленивым[w:10], как и всегда.[func:Wink]"})
				end
			end
			Encounter["StatusPhase3"][Encounter["progress"] + 1] = "Pun"
		end
	end
end

function OnSpare()
	canspare = false
end

function Jaw(num)
	Encounter.Call("SetJaw", num)
end

function Please()
	Head("Please")
	Encounter["Jaw"].MoveTo(Encounter["Head"].x, Encounter["Head"].y - 20)
	Encounter["Animation"] = "Reset Phase 4"
	Encounter["vel"] = 0
end

function Music()
	Encounter["GameMusic"] = "NYEH!"
	Encounter["Volumen"] = 1
end

function Song()
	Encounter["GameMusic"] = "NYEH!"
	Encounter["Volumen"] = 0
end

function Head(sprite, diff)
	if diff then
		Encounter.Call("AnimateHead", diff)
	end
	Encounter.Call("SetHead", sprite)
end

function SpecialHead()
	Encounter.Call("SetHead", "...")
end

function Arms(num)
	Encounter.Call("AnimateHands", num)
end

function Glow(num)
	Encounter.Call("GlowAlpha", num)
end

function Wink()
	Encounter.Call("Wink")
end