Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- npc=Instance.new("Model")
- head=Instance.new("Part")mesh=Instance.new("SpecialMesh")
- face=Instance.new("Decal")mesh_2=Instance.new("SpecialMesh")
- torso=Instance.new("Part")roblox=Instance.new("Decal")
- right_shoulder=Instance.new("Motor")left_shoulder=Instance.new("Motor")
- right_hip=Instance.new("Motor")left_hip=Instance.new("Motor")
- neck=Instance.new("Motor")mesh_3=Instance.new("SpecialMesh")
- left_arm=Instance.new("Part")mesh_4=Instance.new("SpecialMesh")
- right_arm=Instance.new("Part")mesh_5=Instance.new("SpecialMesh")
- left_leg=Instance.new("Part")mesh_6=Instance.new("SpecialMesh")
- right_leg=Instance.new("Part")mesh_7=Instance.new("SpecialMesh")
- humanoid=Instance.new("Humanoid")npc.PrimaryPart=head;npc.Name=""npc.Parent=workspace
- head.Size=Vector3.new(2,1,1)head.Color=Color3.new(0.960784,0.803922,0.188235)
- head.BrickColor=BrickColor.new(24)head.TopSurface=0;head.Name="Head"head.Parent=npc
- head.CFrame=CFrame.new(135.76,156.73,138.82)mesh.Scale=Vector3.new(1.25,1.25,1.25)mesh.Parent=head
- face.Texture="rbxasset://textures/face.png"face.Name="face"face.Parent=head;mesh_2.MeshType=5
- mesh_2.Scale=Vector3.new(0.873,0.873,0.873)mesh_2.MeshId="http://www.roblox.com/asset/?id=114690930 "
- mesh_2.TextureId="http://www.roblox.com/asset/?id=297548963"mesh_2.Parent=head;torso.Size=Vector3.new(2,2,1)
- torso.RightSurface=2;torso.Name="Torso"torso.RightParamA=0;torso.LeftParamA=0
- torso.LeftParamB=0;torso.BrickColor=BrickColor.new(23)torso.LeftSurface=2
- torso.Color=Color3.new(0.0509804,0.411765,0.67451)torso.RightParamB=0;torso.Parent=npc
- torso.CFrame=CFrame.new(135.76,155.23,138.82)roblox.Name="roblox"roblox.Parent=torso
- right_shoulder.Part1=right_arm
- right_shoulder.C0=CFrame.new(1,0.5,0)*CFrame.Angles(0,1.571,0)right_shoulder.Part0=torso;right_shoulder.C1=CFrame.new(-0.5,0.5,0)*
- CFrame.Angles(0,1.571,0)
- right_shoulder.Name="Right Shoulder"right_shoulder.MaxVelocity=0.15;right_shoulder.Parent=torso
- left_shoulder.Part1=left_arm
- left_shoulder.C0=CFrame.new(-1,0.5,0)*CFrame.Angles(0,-1.571,0)left_shoulder.Part0=torso
- left_shoulder.C1=CFrame.new(0.5,0.5,0)*CFrame.Angles(0,
- -1.571,0)left_shoulder.Name="Left Shoulder"
- left_shoulder.MaxVelocity=0.15;left_shoulder.Parent=torso;right_hip.Part1=right_leg
- right_hip.C0=CFrame.new(1,
- -1,0)*CFrame.Angles(0,1.571,0)right_hip.Part0=torso;right_hip.C1=CFrame.new(0.5,1,0)*
- CFrame.Angles(0,1.571,0)
- right_hip.Name="Right Hip"right_hip.MaxVelocity=0.1;right_hip.Parent=torso
- left_hip.Part1=left_leg
- left_hip.C0=CFrame.new(-1,-1,0)*CFrame.Angles(0,-1.571,0)left_hip.Part0=torso;left_hip.C1=CFrame.new(-0.5,1,0)*
- CFrame.Angles(0,-1.571,0)
- left_hip.Name="Left Hip"left_hip.MaxVelocity=0.1;left_hip.Parent=torso;neck.Part1=head
- neck.C0=
- CFrame.new(0,1,0)*CFrame.Angles(-1.571,0,-3.142)neck.Part0=torso;neck.C1=CFrame.new(0,-0.5,0)*
- CFrame.Angles(-1.571,0,-3.142)neck.Name="Neck"
- neck.MaxVelocity=0.1;neck.Parent=torso;mesh_3.MeshType=5
- mesh_3.Scale=Vector3.new(0.499,0.499,0.499)mesh_3.MeshId="http://www.roblox.com/asset/?id=152167638"
- mesh_3.TextureId="http://www.roblox.com/asset/?id=297542876"mesh_3.Parent=torso;left_arm.CanCollide=false
- left_arm.Size=Vector3.new(1,2,1)
- left_arm.Color=Color3.new(0.960784,0.803922,0.188235)left_arm.BrickColor=BrickColor.new(24)
- left_arm.Name="Left Arm"left_arm.Parent=npc
- left_arm.CFrame=CFrame.new(134.26,155.23,138.82)mesh_4.MeshType=5
- mesh_4.Scale=Vector3.new(0.499,0.499,0.499)mesh_4.MeshId="http://www.roblox.com/asset/?id=152167720"
- mesh_4.TextureId="http://www.roblox.com/asset/?id=152618588"mesh_4.Parent=left_arm;right_arm.CanCollide=false
- right_arm.Size=Vector3.new(1,2,1)
- right_arm.Color=Color3.new(0.960784,0.803922,0.188235)right_arm.BrickColor=BrickColor.new(24)
- right_arm.Name="Right Arm"right_arm.Parent=npc
- right_arm.CFrame=CFrame.new(137.26,155.23,138.82)mesh_5.MeshType=5
- mesh_5.Scale=Vector3.new(0.499,0.499,0.499)mesh_5.MeshId="http://www.roblox.com/asset/?id=152167765"
- mesh_5.TextureId="http://www.roblox.com/asset/?id=152618588"mesh_5.Parent=right_arm;left_leg.CanCollide=false
- left_leg.Size=Vector3.new(1,2,1)left_leg.BrickColor=BrickColor.new(119)
- left_leg.BottomSurface=0
- left_leg.Color=Color3.new(0.643137,0.741176,0.278431)left_leg.Name="Left Leg"left_leg.TopSurface=4;left_leg.Parent=npc
- left_leg.CFrame=CFrame.new(135.26,153.23,138.82)mesh_6.MeshType=5
- mesh_6.Scale=Vector3.new(0.499,0.499,0.499)mesh_6.MeshId="http://www.roblox.com/asset/?id=152167845"
- mesh_6.TextureId="http://www.roblox.com/asset/?id=152618588"mesh_6.Parent=left_leg;right_leg.CanCollide=false
- right_leg.Size=Vector3.new(1,2,1)right_leg.BrickColor=BrickColor.new(119)
- right_leg.BottomSurface=0
- right_leg.Color=Color3.new(0.643137,0.741176,0.278431)right_leg.Name="Right Leg"right_leg.TopSurface=4
- right_leg.Parent=npc;right_leg.CFrame=CFrame.new(136.26,153.23,138.82)
- mesh_7.MeshType=5;mesh_7.Scale=Vector3.new(0.499,0.499,0.499)
- mesh_7.MeshId="http://www.roblox.com/asset/?id=152167904"mesh_7.TextureId="http://www.roblox.com/asset/?id=152618588"
- mesh_7.Parent=right_leg;humanoid.NameOcclusion=0;humanoid.Parent=npc
- local dance3 = Instance.new("Animation")
- dance3.Name = "Dance3"
- dance3.AnimationId = "rbxassetid://27759788"
- dance3.Parent = npc.Head
- local humanoid = npc.Humanoid
- local w = humanoid:LoadAnimation(npc.Head.Dance3)
- w:Play()
- local startsound = Instance.new("Sound")
- startsound.Name = "MerasmusIntro"
- startsound.SoundId = "http://www.roblox.com/asset/?id=961600832"
- startsound.Parent = npc
- startsound.Volume = 10
- startsound.Looped = true
- startsound:play()
- function onTouch(part)
- local humanoid = part.Parent:findFirstChild("Humanoid")
- if (humanoid ~=nil) then
- humanoid.Health = humanoid.Health - 25
- end
- end
- npc.Torso.Touched:connect(onTouch)
- npc.Parent = game.workspace
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 1000
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2 ~= npc) then
- temp = temp2:findFirstChild("Torso")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if (temp.Position - pos).magnitude < dist then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end
- return torso
- end
- while true do
- local MaxInc = 40
- local target = findNearestTorso(npc.Torso.Position)
- wait(0.5)
- if target ~= nil then
- npc.Humanoid:MoveTo(target.Position)
- target.Parent.Humanoid.Health = target.Parent.Humanoid.Health - 9
- end
- wait(0.5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement