Slow Motion effect is affecting the pause menu

Hello , So basically I followed one of old brackeys tutorials on slow motion when shooting , worked as a charm but the problem is that the pause menu doesn’t work anymore , time stays the same like it doesn’t pause , Tried putting an awake function in the pause menu script saying (time.timescale = 0) but didn’t work , Any solutions please ?
Thank you.

Alright so i debugged for some time and solved it , is someone is reading this and has the same problem so this :
make a bool for when is in slowmotion , and make it start and stop when the slow motion play , so when the slow motion goes to normal time,timescale in the update function , change it so that it goes back only if the bool is true , i Don’t know if i explained it good enough but any questions hmu