First factor the expression:
$$1-x-x^2+x^3=(1-x)-x^2(1-x)$$
$$=(1-x)(1-x^2)$$
Therefore,
$$(1-x-x^2+x^3)^6=(1-x)^6(1-x^2)^6$$
Now,
$$(1-x)^6=\sum_{r=0}^{6}(-1)^r\binom{6}{r}x^r$$
and
$$(1-x^2)^6=\sum_{k=0}^{6}(-1)^k\binom{6}{k}x^{2k}$$
To obtain the coefficient of
$$x^7$$
we require
$$r+2k=7$$
The possible pairs are
$$(k,r)=(1,5),\ (2,3),\ (3,1)$$
For
$$(k,r)=(1,5)$$
the contribution is
$$(-1)^1\binom61\cdot(-1)^5\binom65$$
$$=(-6)(-6)$$
$$=36$$
For
$$(k,r)=(2,3)$$
the contribution is
$$(-1)^2\binom62\cdot(-1)^3\binom63$$
$$=(15)(-20)$$
$$=-300$$
For
$$(k,r)=(3,1)$$
the contribution is
$$(-1)^3\binom63\cdot(-1)^1\binom61$$
$$=(-20)(-6)$$
$$=120$$
Hence the required coefficient is
$$36-300+120$$
$$=-144$$
Final Answer :
$$-144$$