Ok i got it. Setting pev_mins and pev_maxs helped with the entity not falling through the ground. Using EngFunc_SetSize helped with players passing through the entity (it was like SOLID_NOT).
Thanks to everyone for your help, i really appreciate it. Its frustrating to work a lot on your script and not getting any good results lol.