	//script reusable
	//made by TheLastKitchenGun
	if not escapetime
	rawset(_G, "escapetime", -1)
	
	
	rawset(_G, "pausedescapetime", -1)
	
	
	
	rawset(_G, "escapequake", 0)
	
	
	rawset(_G, "StartEscape", function()
		if (escapetime == -1)
		escapetime = tonumber(mapheaderinfo[gamemap].escapetimelimit) * TICRATE
		end
	end)
	
	rawset(_G, "ResumeEscape", function()
	escapetime = pausedescapetime
	pausedescapetime = -1
	end)
	
	rawset(_G, "StopEscape", function()
		if (escapetime ~= -1)
		pausedescapetime = escapetime
		escapetime = -1
		end
	end)
	
	end
	
	//P_StartQuake(fixed_t intensity, int time, [table{x, y, z} epicenter, [fixed_t radius]])
	
	addHook("PlayerThink", function(player)
		if (mapheaderinfo[gamemap].escapepunish == nil and mapheaderinfo[gamemap].escapetimelimit == nil)
		return end
		if (mapheaderinfo[gamemap].escapestartsector ~= nil and player.mo.subsector.sector == sectors[mapheaderinfo[gamemap].escapestartsector])
		and P_IsObjectOnGround(player.mo)
		and not (escapetime >= 0)
		StartEscape()
		end
		if (tonumber(mapheaderinfo[gamemap].escapepunish) == 1)
		and (escapetime == 0)
		P_DamageMobj(player.mo, nil, nil, nil, DMG_INSTAKILL)
		end
		if (tonumber(mapheaderinfo[gamemap].escapepunish) == 2 or tonumber(mapheaderinfo[gamemap].escapepunish) == 4)
		and (escapetime == 0)
		escapetime = $ + 1
		player.score = $ - 1
		end
		if (tonumber(mapheaderinfo[gamemap].escapepunish) == 3)
		and (escapetime == 0)
		escapetime = $ + 1
		end
		if (tonumber(mapheaderinfo[gamemap].escapepunish) == 3 or tonumber(mapheaderinfo[gamemap].escapepunish) == 5)
		and (escapetime == 0 or escapetime == 1)
		and (leveltime % TICRATE * 10)
		P_GivePlayerRings(player, -1)
		end
		if (tonumber(mapheaderinfo[gamemap].escapepunish) == 4)
		and (leveltime % TICRATE == 0)
		and not (escapetime == 0)
		player.score = $ - 5
		end
		if (tonumber(mapheaderinfo[gamemap].escapepunish) == 5)
		and (leveltime % TICRATE == 0)
		and not (escapetime == 0)
		player.escapesequence_ringloss = $ + 1
		end
		if (player.escapesequence_ringloss == 5)
		P_GivePlayerRings(player, -3)
		player.escapesequence_ringloss = 0
		end
		if (tonumber(mapheaderinfo[gamemap].escapequake) >= 1 and escapetime >= 0)
		P_StartQuake(3*FRACUNIT, escapetime) //low intensity to not make it nauseating etc, if you make it higher  than 6 I get to punch you
		end
	end)
	
	
	addHook("ThinkFrame", function ()
		if (escapetime ~= -1)
		escapetime = $ - 1
		end
	end)
	
	addHook("MapLoad", function()
		escapetime = -1
	end)

	addHook("PlayerSpawn", function(p)
		p.escapesequence_ringloss = 0
	end)
	
	addHook("NetVars", function(net)
		escapetime = net($)
	end)

	local function HURRYUP(v, player)
		if escapetime >= 0
		v.drawString(140, 20, "\x82"+G_TicsToMinutes(escapetime)+" : "+G_TicsToSeconds(escapetime)+"", V_YELLOWMAP|V_SNAPTOTOP)
		end
	end
	hud.add(HURRYUP, "game")