Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = owner
- wait(0.1)
- local m = Instance.new("Model", game.Workspace)
- m.Name = owner.Character.Name.. "'s Hostile Dummy"
- local h = Instance.new("Part",m)
- h.Name = "Head"
- local me = plr.Character.Head.Mesh:Clone()
- me.Parent = h
- local facee = plr.Character.Head.face:Clone()
- facee.Parent = h
- h.Size = plr.Character.Head.Size
- h:BreakJoints()
- h.CanCollide = false
- h.Position = plr.Character.Head.Position
- h.Position = h.Position + Vector3.new(0, 10, 0)
- h.face.Texture = "http://www.roblox.com/asset/?id=15199999"
- local t = Instance.new("Part",m)
- t.Name = "Torso"
- t.Size = plr.Character.Torso.Size
- t:BreakJoints()
- t.CanCollide = false
- t.Position = plr.Character.Torso.Position
- t.Position = t.Position + Vector3.new(0, 10, 0)
- local ra = Instance.new("Part",m)
- ra.Name = "Right Arm"
- ra.Size = plr.Character["Right Arm"].Size
- ra:BreakJoints()
- ra.Position = plr.Character["Right Arm"].Position
- ra.Position = ra.Position + Vector3.new(0, 10, 0)
- local la = Instance.new("Part",m)
- la.Name = "Left Arm"
- la.Size = plr.Character["Left Arm"].Size
- la:BreakJoints()
- la.Position = plr.Character["Left Arm"].Position
- la.Position = la.Position + Vector3.new(0, 10, 0)
- local ll = Instance.new("Part",m)
- ll.Name = "Left Leg"
- ll.Size = plr.Character["Left Leg"].Size
- ll:BreakJoints()
- ll.Position = plr.Character["Left Leg"].Position
- ll.Position = ll.Position + Vector3.new(0, 10, 0)
- local rl = Instance.new("Part",m)
- rl.Name = "Right Leg"
- rl.Size = plr.Character["Right Leg"].Size
- rl:BreakJoints()
- rl.Position = plr.Character["Right Leg"].Position
- rl.Position = rl.Position + Vector3.new(0, 10, 0)
- for i,v in pairs(m:GetChildren()) do
- v:BreakJoints()
- end
- local neck = Instance.new("Motor6D")
- neck.Name = "Neck"
- neck.Part0 = t
- neck.Part1 = h
- neck.Parent = t
- neck.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- neck.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- local rs = Instance.new("Motor6D")
- rs.Name = "Right Shoulder"
- rs.Part0 = t
- rs.Part1 = ra
- rs.Parent = t
- rs.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- rs.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- local ls = Instance.new("Motor6D")
- ls.Name = "Left Shoulder"
- ls.Part0 = t
- ls.Part1 = la
- ls.Parent = t
- ls.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- ls.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- local lh = Instance.new("Motor6D")
- lh.Name = "Left Hip"
- lh.Part0 = t
- lh.Part1 = ll
- lh.Parent = t
- lh.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- lh.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- local rh = Instance.new("Motor6D")
- rh.Name = "Right Hip"
- rh.Part0 = t
- rh.Part1 = rl
- rh.Parent = t
- rh.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- rh.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- wait(0.000000000000001)
- local hu = Instance.new("Humanoid", m)
- hu.MaxHealth = 100
- hu.Health = 100
- hu.WalkSpeed = 13
- h.BrickColor = BrickColor.new("Br. yellowish green")
- ra.BrickColor = BrickColor.new("Br. yellowish green")
- la.BrickColor = BrickColor.new("Br. yellowish green")
- t.BrickColor = BrickColor.new("Really red")
- rl.BrickColor = BrickColor.new("New Yeller")
- ll.BrickColor = BrickColor.new("New Yeller")
- local animation = Instance.new("Animation", script)
- animation.AnimationId = "http://www.roblox.com/asset/?id=180426354"
- local hum = m:WaitForChild("Humanoid")
- local anim = hum:LoadAnimation(script:FindFirstChildOfClass("Animation"))
- anim.Looped = true
- anim:Play()
- while true do
- wait()
- for i,v in pairs(workspace:GetChildren()) do
- if v.Name == owner.Character.Name.."'s hostile dummy" then
- m = v
- function onTouched(fire)
- local humn = fire.Parent:FindFirstChild("Humanoid")
- if humn then
- for i,v in pairs (humn.Parent:GetChildren()) do
- if v.ClassName == "Part" then
- humn:TakeDamage(0.1)
- end
- end
- end
- end
- v:FindFirstChild("Torso").Touched:connect(onTouched)
- s = v
- local larm = s:FindFirstChild("Left Arm")
- local rarm = s:FindFirstChild("Right Arm")
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 100000000000000000000000000000000000000000
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2 ~= s) then
- temp = temp2:FindFirstChild("Torso")
- h = temp2:FindFirstChild("Humanoid")
- if (temp ~= nil) and (h ~= nil) and (h.Health > 0) then
- s.Humanoid.WalkSpeed = 10
- 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 antibug = s:FindFirstChild("Torso")
- if antibug ~= nil then
- local target = findNearestTorso(antibug.Position)
- if target ~= nil then
- s.Humanoid:MoveTo(target.Position, target)
- s.Humanoid.WalkSpeed = 11
- end
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement