As it turns out, i made a grief mistake. I was supposed to use the formula to find the angle (theta) and not the radian itself.
var mpos = get_global_mouse_position() rotation = atan2(mpos.y,mpos.x)
Works exactly like the look_at() function.