diff --git a/src/lua_baselib.c b/src/lua_baselib.c
index c415eecb8e10f2c2853cb5b123d6fb3126ff58de..2cc79db47e7e3b2b7fae01905601902176decdb3 100644
--- a/src/lua_baselib.c
+++ b/src/lua_baselib.c
@@ -85,6 +85,14 @@ static int lib_print(lua_State *L)
 	return 0;
 }
 
+static int lib_evalMath(lua_State *L)
+{
+	const char *word = luaL_checkstring(L, 1);
+	LUA_Deprecated(L, "EvalMath(string)", "_G[string]");
+	lua_pushinteger(L, LUA_EvalMath(word));
+	return 1;
+}
+
 // M_RANDOM
 //////////////
 
@@ -1899,6 +1907,7 @@ static int lib_gTicsToMilliseconds(lua_State *L)
 
 static luaL_Reg lib[] = {
 	{"print", lib_print},
+	{"EvalMath", lib_evalMath},
 
 	// m_random
 	{"P_Random",lib_pRandom},
diff --git a/src/lua_script.h b/src/lua_script.h
index ec67703c33d3b8494ad810f695be6900d11bfb17..96f832e2c60623998b16643ca2cf0131bffc7935 100644
--- a/src/lua_script.h
+++ b/src/lua_script.h
@@ -70,4 +70,15 @@ void COM_Lua_f(void);
 
 #define LUA_ErrInvalid(L, type) luaL_error(L, "accessed " type " doesn't exist anymore, please check 'valid' before using " type ".");
 
+// Deprecation warnings
+// Shows once upon use. Then doesn't show again.
+#define LUA_Deprecated(L,this_func,use_instead)\
+{\
+	static UINT8 seen = 0;\
+	if (!seen) {\
+		seen = 1;\
+		CONS_Alert(CONS_WARNING,"\"%s\" is deprecated and will be removed.\nUse \"%s\" instead.\n", this_func, use_instead);\
+	}\
+}
+
 #endif