Enemys Movement

Hello,
I have downloaded this Unity Asset Store - The Best Assets for Game Making little fellow for my game, outstanding model i give that to the creator but here’s my problem. I want him to be my nemesis in game, the final boss, the one i have to beat to complete the game. But i cant get it right. I have wrote a simple script for him to detect and attack me but it wont work…
#pragma strict

var Distance : float;
var Target : Transform;
var lookAtDistance = 25.0;
var attackRange = 15.0;
var moveSpeed = 5.0;
var Damping = 6.0;

function Update ()
{
Distance = Vector3.Distance(Target.position, transform.position);

if (Distance < lookAtDistance)
{
lookAt();
}

if (Distance > lookAtDistance)

if (Distance < attackRange)
{
attack ();
}
}

function lookAt ()
{
var rotation = Quaternion.LookRotation(Target.position - transform.position);
transform.rotation = Quaternion.Slerp(transform.rotation, rotation, Time.deltaTime * Damping);
}

function attack ()
{
transform.Translate(Vector3.forward * moveSpeed * Time.deltaTime);
}

That’s not even the biggest of my problems, he is moving exactly like my player, i press w he also moves in his direction, i press space he jumps with me, why? And since i am a new programmer or yeah, lets call me that i cant find a solution here is the code for his movement. If there is anyone out there that can find something, please…help!
Thank you for your time guys

2606680–182702–monstercontroller.js (7.06 KB)

I’m not sure, but the attached script doesn’t look like the one you posted in your post. Also, could you use code tags to help make it readable? Thanks!

Yes thats because the one i have posted is mine the attached is the script that model comes with (btw thanks for the code tags, i am new to everything as you can see and i have 1 week for the game)

Ah okay, well as far as why he’s moving like the player. The only thing I can think of is the wrong script is assigned. Maybe it has the player script?

No it has not, for the movements he has the attached script and if i try to disable it trying to check if mine script works everything collapse, he even starts “flying”…