Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(Enum,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Model0 = Instance.new("Model")
- Part1 = Instance.new("Part")
- BodyGyro2 = Instance.new("BodyGyro")
- BodyPosition3 = Instance.new("BodyPosition")
- Script4 = Instance.new("Script")
- NumberValue5 = Instance.new("NumberValue")
- Decal6 = Instance.new("Decal")
- Model7 = Instance.new("Model")
- Part8 = Instance.new("Part")
- BodyGyro9 = Instance.new("BodyGyro")
- BodyPosition10 = Instance.new("BodyPosition")
- Script11 = Instance.new("Script")
- NumberValue12 = Instance.new("NumberValue")
- Decal13 = Instance.new("Decal")
- Model14 = Instance.new("Model")
- Part15 = Instance.new("Part")
- BodyGyro16 = Instance.new("BodyGyro")
- BodyPosition17 = Instance.new("BodyPosition")
- Script18 = Instance.new("Script")
- NumberValue19 = Instance.new("NumberValue")
- Decal20 = Instance.new("Decal")
- Model21 = Instance.new("Model")
- Part22 = Instance.new("Part")
- BodyGyro23 = Instance.new("BodyGyro")
- BodyPosition24 = Instance.new("BodyPosition")
- Script25 = Instance.new("Script")
- NumberValue26 = Instance.new("NumberValue")
- Decal27 = Instance.new("Decal")
- Model28 = Instance.new("Model")
- Part29 = Instance.new("Part")
- BodyGyro30 = Instance.new("BodyGyro")
- BodyPosition31 = Instance.new("BodyPosition")
- Script32 = Instance.new("Script")
- NumberValue33 = Instance.new("NumberValue")
- Decal34 = Instance.new("Decal")
- Model35 = Instance.new("Model")
- Part36 = Instance.new("Part")
- BodyGyro37 = Instance.new("BodyGyro")
- BodyPosition38 = Instance.new("BodyPosition")
- Script39 = Instance.new("Script")
- NumberValue40 = Instance.new("NumberValue")
- Decal41 = Instance.new("Decal")
- Model42 = Instance.new("Model")
- Part43 = Instance.new("Part")
- BodyGyro44 = Instance.new("BodyGyro")
- BodyPosition45 = Instance.new("BodyPosition")
- Script46 = Instance.new("Script")
- NumberValue47 = Instance.new("NumberValue")
- Decal48 = Instance.new("Decal")
- Model49 = Instance.new("Model")
- Part50 = Instance.new("Part")
- BodyGyro51 = Instance.new("BodyGyro")
- BodyPosition52 = Instance.new("BodyPosition")
- Script53 = Instance.new("Script")
- NumberValue54 = Instance.new("NumberValue")
- Decal55 = Instance.new("Decal")
- Model56 = Instance.new("Model")
- Part57 = Instance.new("Part")
- BodyGyro58 = Instance.new("BodyGyro")
- BodyPosition59 = Instance.new("BodyPosition")
- Script60 = Instance.new("Script")
- NumberValue61 = Instance.new("NumberValue")
- Decal62 = Instance.new("Decal")
- Model63 = Instance.new("Model")
- Part64 = Instance.new("Part")
- BodyGyro65 = Instance.new("BodyGyro")
- BodyPosition66 = Instance.new("BodyPosition")
- Script67 = Instance.new("Script")
- NumberValue68 = Instance.new("NumberValue")
- Decal69 = Instance.new("Decal")
- Model70 = Instance.new("Model")
- Part71 = Instance.new("Part")
- BodyGyro72 = Instance.new("BodyGyro")
- BodyPosition73 = Instance.new("BodyPosition")
- Script74 = Instance.new("Script")
- NumberValue75 = Instance.new("NumberValue")
- Decal76 = Instance.new("Decal")
- Model77 = Instance.new("Model")
- Part78 = Instance.new("Part")
- BodyGyro79 = Instance.new("BodyGyro")
- BodyPosition80 = Instance.new("BodyPosition")
- Script81 = Instance.new("Script")
- NumberValue82 = Instance.new("NumberValue")
- Decal83 = Instance.new("Decal")
- Model84 = Instance.new("Model")
- Part85 = Instance.new("Part")
- BodyGyro86 = Instance.new("BodyGyro")
- BodyPosition87 = Instance.new("BodyPosition")
- Script88 = Instance.new("Script")
- NumberValue89 = Instance.new("NumberValue")
- Decal90 = Instance.new("Decal")
- Model91 = Instance.new("Model")
- Part92 = Instance.new("Part")
- BodyGyro93 = Instance.new("BodyGyro")
- BodyPosition94 = Instance.new("BodyPosition")
- Script95 = Instance.new("Script")
- NumberValue96 = Instance.new("NumberValue")
- Decal97 = Instance.new("Decal")
- Model98 = Instance.new("Model")
- Part99 = Instance.new("Part")
- BodyGyro100 = Instance.new("BodyGyro")
- BodyPosition101 = Instance.new("BodyPosition")
- Script102 = Instance.new("Script")
- NumberValue103 = Instance.new("NumberValue")
- Decal104 = Instance.new("Decal")
- Model105 = Instance.new("Model")
- Part106 = Instance.new("Part")
- BodyGyro107 = Instance.new("BodyGyro")
- BodyPosition108 = Instance.new("BodyPosition")
- Script109 = Instance.new("Script")
- NumberValue110 = Instance.new("NumberValue")
- Decal111 = Instance.new("Decal")
- Model112 = Instance.new("Model")
- Part113 = Instance.new("Part")
- BodyGyro114 = Instance.new("BodyGyro")
- BodyPosition115 = Instance.new("BodyPosition")
- Script116 = Instance.new("Script")
- NumberValue117 = Instance.new("NumberValue")
- Decal118 = Instance.new("Decal")
- Model119 = Instance.new("Model")
- Part120 = Instance.new("Part")
- BodyGyro121 = Instance.new("BodyGyro")
- BodyPosition122 = Instance.new("BodyPosition")
- Script123 = Instance.new("Script")
- NumberValue124 = Instance.new("NumberValue")
- Decal125 = Instance.new("Decal")
- Model126 = Instance.new("Model")
- Part127 = Instance.new("Part")
- BodyGyro128 = Instance.new("BodyGyro")
- BodyPosition129 = Instance.new("BodyPosition")
- Script130 = Instance.new("Script")
- NumberValue131 = Instance.new("NumberValue")
- Decal132 = Instance.new("Decal")
- Model0.Parent = mas
- Part1.Name = "Head"
- Part1.Parent = Model0
- Part1.CFrame = CFrame.new(13.2279701, 75.9687653, 87.9855957, -0.999935091, 0.00857119635, -0.00751148583, 0.00857600104, 0.999963105, -0.000607622438, 0.00750600081, -0.000672001508, -0.999971628)
- Part1.Orientation = Vector3.new(0.0299999993, -179.570007, 0.49000001)
- Part1.Position = Vector3.new(13.2279701, 75.9687653, 87.9855957)
- Part1.Rotation = Vector3.new(179.970001, -0.430000007, -179.509995)
- Part1.Size = Vector3.new(2.04000163, 2.04000163, 2.04000163)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.Material = Enum.Material.ForceField
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.Shape = Enum.PartType.Ball
- BodyGyro2.Parent = Part1
- BodyPosition3.Parent = Part1
- Script4.Name = "Aim"
- Script4.Parent = Part1
- table.insert(cors,sandbox(Script4,function()
- bin = script.Parent
- function move(target)
- local dir = (target.Position - bin.Position).unit
- local spawnPos = bin.Position
- local pos = spawnPos + (dir * 1)
- bin:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
- bin:findFirstChild("BodyGyro").maxTorque = Vector3.new(9000,9000,9000)
- end
- function moveTo(target)
- bin.BodyPosition.position = target.Position
- bin.BodyPosition.maxForce = Vector3.new(10000,10000,10000) * bin.Speed.Value
- end
- function findNearestTorso(pos)
- local list = game.Workspace:GetChildren()
- 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 ~= script.Parent) then
- temp = temp2:findFirstChild("Head")
- 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 torso = findNearestTorso(bin.Position)
- if torso~=nil then
- move(torso)
- moveTo(torso)
- end
- wait()
- end
- end))
- NumberValue5.Name = "Speed"
- NumberValue5.Parent = Part1
- NumberValue5.Value = 0.2
- Decal6.Name = "ROBLOX Old Default Face"
- Decal6.Parent = Part1
- Decal6.Texture = "http://www.roblox.com/asset/?id=138437944"
- Model7.Parent = mas
- Part8.Name = "Head"
- Part8.Parent = Model7
- Part8.CFrame = CFrame.new(13.2279701, 78.0087738, 87.9855957, -0.999935091, 0.00857119635, -0.00751148583, 0.00857600104, 0.999963105, -0.000607622438, 0.00750600081, -0.000672001508, -0.999971628)
- Part8.Orientation = Vector3.new(0.0299999993, -179.570007, 0.49000001)
- Part8.Position = Vector3.new(13.2279701, 78.0087738, 87.9855957)
- Part8.Rotation = Vector3.new(179.970001, -0.430000007, -179.509995)
- Part8.Size = Vector3.new(2.04000163, 2.04000163, 2.04000163)
- Part8.BottomSurface = Enum.SurfaceType.Smooth
- Part8.Material = Enum.Material.ForceField
- Part8.TopSurface = Enum.SurfaceType.Smooth
- Part8.Shape = Enum.PartType.Ball
- BodyGyro9.Parent = Part8
- BodyPosition10.Parent = Part8
- Script11.Name = "Aim"
- Script11.Parent = Part8
- table.insert(cors,sandbox(Script11,function()
- bin = script.Parent
- function move(target)
- local dir = (target.Position - bin.Position).unit
- local spawnPos = bin.Position
- local pos = spawnPos + (dir * 1)
- bin:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
- bin:findFirstChild("BodyGyro").maxTorque = Vector3.new(9000,9000,9000)
- end
- function moveTo(target)
- bin.BodyPosition.position = target.Position
- bin.BodyPosition.maxForce = Vector3.new(10000,10000,10000) * bin.Speed.Value
- end
- function findNearestTorso(pos)
- local list = game.Workspace:GetChildren()
- 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 ~= script.Parent) then
- temp = temp2:findFirstChild("Head")
- 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 torso = findNearestTorso(bin.Position)
- if torso~=nil then
- move(torso)
- moveTo(torso)
- end
- wait()
- end
- end))
- NumberValue12.Name = "Speed"
- NumberValue12.Parent = Part8
- NumberValue12.Value = 0.2
- Decal13.Name = "ROBLOX Old Default Face"
- Decal13.Parent = Part8
- Decal13.Texture = "http://www.roblox.com/asset/?id=138437944"
- Model14.Parent = mas
- Part15.Name = "Head"
- Part15.Parent = Model14
- Part15.CFrame = CFrame.new(13.2279701, 82.0888443, 87.9855957, -0.999935091, 0.00857119635, -0.00751148583, 0.00857600104, 0.999963105, -0.000607622438, 0.00750600081, -0.000672001508, -0.999971628)
- Part15.Orientation = Vector3.new(0.0299999993, -179.570007, 0.49000001)
- Part15.Position = Vector3.new(13.2279701, 82.0888443, 87.9855957)
- Part15.Rotation = Vector3.new(179.970001, -0.430000007, -179.509995)
- Part15.Size = Vector3.new(2.04000163, 2.04000163, 2.04000163)
- Part15.BottomSurface = Enum.SurfaceType.Smooth
- Part15.Material = Enum.Material.ForceField
- Part15.TopSurface = Enum.SurfaceType.Smooth
- Part15.Shape = Enum.PartType.Ball
- BodyGyro16.Parent = Part15
- BodyPosition17.Parent = Part15
- Script18.Name = "Aim"
- Script18.Parent = Part15
- table.insert(cors,sandbox(Script18,function()
- bin = script.Parent
- function move(target)
- local dir = (target.Position - bin.Position).unit
- local spawnPos = bin.Position
- local pos = spawnPos + (dir * 1)
- bin:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
- bin:findFirstChild("BodyGyro").maxTorque = Vector3.new(9000,9000,9000)
- end
- function moveTo(target)
- bin.BodyPosition.position = target.Position
- bin.BodyPosition.maxForce = Vector3.new(10000,10000,10000) * bin.Speed.Value
- end
- function findNearestTorso(pos)
- local list = game.Workspace:GetChildren()
- 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 ~= script.Parent) then
- temp = temp2:findFirstChild("Head")
- 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 torso = findNearestTorso(bin.Position)
- if torso~=nil then
- move(torso)
- moveTo(torso)
- end
- wait()
- end
- end))
- NumberValue19.Name = "Speed"
- NumberValue19.Parent = Part15
- NumberValue19.Value = 0.2
- Decal20.Name = "ROBLOX Old Default Face"
- Decal20.Parent = Part15
- Decal20.Texture = "http://www.roblox.com/asset/?id=138437944"
- Model21.Parent = mas
- Part22.Name = "Head"
- Part22.Parent = Model21
- Part22.CFrame = CFrame.new(13.2279701, 90.2489624, 87.9855957, -0.999935091, 0.00857119635, -0.00751148583, 0.00857600104, 0.999963105, -0.000607622438, 0.00750600081, -0.000672001508, -0.999971628)
- Part22.Orientation = Vector3.new(0.0299999993, -179.570007, 0.49000001)
- Part22.Position = Vector3.new(13.2279701, 90.2489624, 87.9855957)
- Part22.Rotation = Vector3.new(179.970001, -0.430000007, -179.509995)
- Part22.Size = Vector3.new(2.04000163, 2.04000163, 2.04000163)
- Part22.BottomSurface = Enum.SurfaceType.Smooth
- Part22.Material = Enum.Material.ForceField
- Part22.TopSurface = Enum.SurfaceType.Smooth
- Part22.Shape = Enum.PartType.Ball
- BodyGyro23.Parent = Part22
- BodyPosition24.Parent = Part22
- Script25.Name = "Aim"
- Script25.Parent = Part22
- table.insert(cors,sandbox(Script25,function()
- bin = script.Parent
- function move(target)
- local dir = (target.Position - bin.Position).unit
- local spawnPos = bin.Position
- local pos = spawnPos + (dir * 1)
- bin:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
- bin:findFirstChild("BodyGyro").maxTorque = Vector3.new(9000,9000,9000)
- end
- function moveTo(target)
- bin.BodyPosition.position = target.Position
- bin.BodyPosition.maxForce = Vector3.new(10000,10000,10000) * bin.Speed.Value
- end
- function findNearestTorso(pos)
- local list = game.Workspace:GetChildren()
- 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 ~= script.Parent) then
- temp = temp2:findFirstChild("Head")
- 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 torso = findNearestTorso(bin.Position)
- if torso~=nil then
- move(torso)
- moveTo(torso)
- end
- wait()
- end
- end))
- NumberValue26.Name = "Speed"
- NumberValue26.Parent = Part22
- NumberValue26.Value = 0.2
- Decal27.Name = "ROBLOX Old Default Face"
- Decal27.Parent = Part22
- Decal27.Texture = "http://www.roblox.com/asset/?id=138437944"
- Model28.Parent = mas
- Part29.Name = "Head"
- Part29.Parent = Model28
- Part29.CFrame = CFrame.new(13.2279701, 88.2089539, 87.9855957, -0.999935091, 0.00857119635, -0.00751148583, 0.00857600104, 0.999963105, -0.000607622438, 0.00750600081, -0.000672001508, -0.999971628)
- Part29.Orientation = Vector3.new(0.0299999993, -179.570007, 0.49000001)
- Part29.Position = Vector3.new(13.2279701, 88.2089539, 87.9855957)
- Part29.Rotation = Vector3.new(179.970001, -0.430000007, -179.509995)
- Part29.Size = Vector3.new(2.04000163, 2.04000163, 2.04000163)
- Part29.BottomSurface = Enum.SurfaceType.Smooth
- Part29.Material = Enum.Material.ForceField
- Part29.TopSurface = Enum.SurfaceType.Smooth
- Part29.Shape = Enum.PartType.Ball
- BodyGyro30.Parent = Part29
- BodyPosition31.Parent = Part29
- Script32.Name = "Aim"
- Script32.Parent = Part29
- table.insert(cors,sandbox(Script32,function()
- bin = script.Parent
- function move(target)
- local dir = (target.Position - bin.Position).unit
- local spawnPos = bin.Position
- local pos = spawnPos + (dir * 1)
- bin:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
- bin:findFirstChild("BodyGyro").maxTorque = Vector3.new(9000,9000,9000)
- end
- function moveTo(target)
- bin.BodyPosition.position = target.Position
- bin.BodyPosition.maxForce = Vector3.new(10000,10000,10000) * bin.Speed.Value
- end
- function findNearestTorso(pos)
- local list = game.Workspace:GetChildren()
- 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 ~= script.Parent) then
- temp = temp2:findFirstChild("Head")
- 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 torso = findNearestTorso(bin.Position)
- if torso~=nil then
- move(torso)
- moveTo(torso)
- end
- wait()
- end
- end))
- NumberValue33.Name = "Speed"
- NumberValue33.Parent = Part29
- NumberValue33.Value = 0.2
- Decal34.Name = "ROBLOX Old Default Face"
- Decal34.Parent = Part29
- Decal34.Texture = "http://www.roblox.com/asset/?id=138437944"
- Model35.Parent = mas
- Part36.Name = "Head"
- Part36.Parent = Model35
- Part36.CFrame = CFrame.new(13.2279701, 92.2890015, 87.9855957, -0.999935091, 0.00857119635, -0.00751148583, 0.00857600104, 0.999963105, -0.000607622438, 0.00750600081, -0.000672001508, -0.999971628)
- Part36.Orientation = Vector3.new(0.0299999993, -179.570007, 0.49000001)
- Part36.Position = Vector3.new(13.2279701, 92.2890015, 87.9855957)
- Part36.Rotation = Vector3.new(179.970001, -0.430000007, -179.509995)
- Part36.Size = Vector3.new(2.04000163, 2.04000163, 2.04000163)
- Part36.BottomSurface = Enum.SurfaceType.Smooth
- Part36.Material = Enum.Material.ForceField
- Part36.TopSurface = Enum.SurfaceType.Smooth
- Part36.Shape = Enum.PartType.Ball
- BodyGyro37.Parent = Part36
- BodyPosition38.Parent = Part36
- Script39.Name = "Aim"
- Script39.Parent = Part36
- table.insert(cors,sandbox(Script39,function()
- bin = script.Parent
- function move(target)
- local dir = (target.Position - bin.Position).unit
- local spawnPos = bin.Position
- local pos = spawnPos + (dir * 1)
- bin:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
- bin:findFirstChild("BodyGyro").maxTorque = Vector3.new(9000,9000,9000)
- end
- function moveTo(target)
- bin.BodyPosition.position = target.Position
- bin.BodyPosition.maxForce = Vector3.new(10000,10000,10000) * bin.Speed.Value
- end
- function findNearestTorso(pos)
- local list = game.Workspace:GetChildren()
- 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 ~= script.Parent) then
- temp = temp2:findFirstChild("Head")
- 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 torso = findNearestTorso(bin.Position)
- if torso~=nil then
- move(torso)
- moveTo(torso)
- end
- wait()
- end
- end))
- NumberValue40.Name = "Speed"
- NumberValue40.Parent = Part36
- NumberValue40.Value = 0.2
- Decal41.Name = "ROBLOX Old Default Face"
- Decal41.Parent = Part36
- Decal41.Texture = "http://www.roblox.com/asset/?id=138437944"
- Model42.Parent = mas
- Part43.Name = "Head"
- Part43.Parent = Model42
- Part43.CFrame = CFrame.new(13.2279701, 71.8887024, 87.9855957, -0.999935091, 0.00857119635, -0.00751148583, 0.00857600104, 0.999963105, -0.000607622438, 0.00750600081, -0.000672001508, -0.999971628)
- Part43.Orientation = Vector3.new(0.0299999993, -179.570007, 0.49000001)
- Part43.Position = Vector3.new(13.2279701, 71.8887024, 87.9855957)
- Part43.Rotation = Vector3.new(179.970001, -0.430000007, -179.509995)
- Part43.Size = Vector3.new(2.04000163, 2.04000163, 2.04000163)
- Part43.BottomSurface = Enum.SurfaceType.Smooth
- Part43.Material = Enum.Material.ForceField
- Part43.TopSurface = Enum.SurfaceType.Smooth
- Part43.Shape = Enum.PartType.Ball
- BodyGyro44.Parent = Part43
- BodyPosition45.Parent = Part43
- Script46.Name = "Aim"
- Script46.Parent = Part43
- table.insert(cors,sandbox(Script46,function()
- bin = script.Parent
- function move(target)
- local dir = (target.Position - bin.Position).unit
- local spawnPos = bin.Position
- local pos = spawnPos + (dir * 1)
- bin:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
- bin:findFirstChild("BodyGyro").maxTorque = Vector3.new(9000,9000,9000)
- end
- function moveTo(target)
- bin.BodyPosition.position = target.Position
- bin.BodyPosition.maxForce = Vector3.new(10000,10000,10000) * bin.Speed.Value
- end
- function findNearestTorso(pos)
- local list = game.Workspace:GetChildren()
- 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 ~= script.Parent) then
- temp = temp2:findFirstChild("Head")
- 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 torso = findNearestTorso(bin.Position)
- if torso~=nil then
- move(torso)
- moveTo(torso)
- end
- wait()
- end
- end))
- NumberValue47.Name = "Speed"
- NumberValue47.Parent = Part43
- NumberValue47.Value = 0.2
- Decal48.Name = "ROBLOX Old Default Face"
- Decal48.Parent = Part43
- Decal48.Texture = "http://www.roblox.com/asset/?id=138437944"
- Model49.Parent = mas
- Part50.Name = "Head"
- Part50.Parent = Model49
- Part50.CFrame = CFrame.new(13.2279701, 69.8486938, 87.9855881, -0.999935091, 0.00857119635, -0.00751148583, 0.00857600104, 0.999963105, -0.000607622438, 0.00750600081, -0.000672001508, -0.999971628)
- Part50.Orientation = Vector3.new(0.0299999993, -179.570007, 0.49000001)
- Part50.Position = Vector3.new(13.2279701, 69.8486938, 87.9855881)
- Part50.Rotation = Vector3.new(179.970001, -0.430000007, -179.509995)
- Part50.Size = Vector3.new(2.04000163, 2.04000163, 2.04000163)
- Part50.BottomSurface = Enum.SurfaceType.Smooth
- Part50.Material = Enum.Material.ForceField
- Part50.TopSurface = Enum.SurfaceType.Smooth
- Part50.Shape = Enum.PartType.Ball
- BodyGyro51.Parent = Part50
- BodyPosition52.Parent = Part50
- Script53.Name = "Aim"
- Script53.Parent = Part50
- table.insert(cors,sandbox(Script53,function()
- bin = script.Parent
- function move(target)
- local dir = (target.Position - bin.Position).unit
- local spawnPos = bin.Position
- local pos = spawnPos + (dir * 1)
- bin:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
- bin:findFirstChild("BodyGyro").maxTorque = Vector3.new(9000,9000,9000)
- end
- function moveTo(target)
- bin.BodyPosition.position = target.Position
- bin.BodyPosition.maxForce = Vector3.new(10000,10000,10000) * bin.Speed.Value
- end
- function findNearestTorso(pos)
- local list = game.Workspace:GetChildren()
- 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 ~= script.Parent) then
- temp = temp2:findFirstChild("Head")
- 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 torso = findNearestTorso(bin.Position)
- if torso~=nil then
- move(torso)
- moveTo(torso)
- end
- wait()
- end
- end))
- NumberValue54.Name = "Speed"
- NumberValue54.Parent = Part50
- NumberValue54.Value = 0.2
- Decal55.Name = "ROBLOX Old Default Face"
- Decal55.Parent = Part50
- Decal55.Texture = "http://www.roblox.com/asset/?id=138437944"
- Model56.Parent = mas
- Part57.Name = "Head"
- Part57.Parent = Model56
- Part57.CFrame = CFrame.new(13.2279701, 73.9287262, 87.9855957, -0.999935091, 0.00857119635, -0.00751148583, 0.00857600104, 0.999963105, -0.000607622438, 0.00750600081, -0.000672001508, -0.999971628)
- Part57.Orientation = Vector3.new(0.0299999993, -179.570007, 0.49000001)
- Part57.Position = Vector3.new(13.2279701, 73.9287262, 87.9855957)
- Part57.Rotation = Vector3.new(179.970001, -0.430000007, -179.509995)
- Part57.Size = Vector3.new(2.04000163, 2.04000163, 2.04000163)
- Part57.BottomSurface = Enum.SurfaceType.Smooth
- Part57.Material = Enum.Material.ForceField
- Part57.TopSurface = Enum.SurfaceType.Smooth
- Part57.Shape = Enum.PartType.Ball
- BodyGyro58.Parent = Part57
- BodyPosition59.Parent = Part57
- Script60.Name = "Aim"
- Script60.Parent = Part57
- table.insert(cors,sandbox(Script60,function()
- bin = script.Parent
- function move(target)
- local dir = (target.Position - bin.Position).unit
- local spawnPos = bin.Position
- local pos = spawnPos + (dir * 1)
- bin:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
- bin:findFirstChild("BodyGyro").maxTorque = Vector3.new(9000,9000,9000)
- end
- function moveTo(target)
- bin.BodyPosition.position = target.Position
- bin.BodyPosition.maxForce = Vector3.new(10000,10000,10000) * bin.Speed.Value
- end
- function findNearestTorso(pos)
- local list = game.Workspace:GetChildren()
- 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 ~= script.Parent) then
- temp = temp2:findFirstChild("Head")
- 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 torso = findNearestTorso(bin.Position)
- if torso~=nil then
- move(torso)
- moveTo(torso)
- end
- wait()
- end
- end))
- NumberValue61.Name = "Speed"
- NumberValue61.Parent = Part57
- NumberValue61.Value = 0.2
- Decal62.Name = "ROBLOX Old Default Face"
- Decal62.Parent = Part57
- Decal62.Texture = "http://www.roblox.com/asset/?id=138437944"
- Model63.Parent = mas
- Part64.Name = "Head"
- Part64.Parent = Model63
- Part64.CFrame = CFrame.new(13.2279701, 94.3290329, 87.9855957, -0.999935091, 0.00857119635, -0.00751148583, 0.00857600104, 0.999963105, -0.000607622438, 0.00750600081, -0.000672001508, -0.999971628)
- Part64.Orientation = Vector3.new(0.0299999993, -179.570007, 0.49000001)
- Part64.Position = Vector3.new(13.2279701, 94.3290329, 87.9855957)
- Part64.Rotation = Vector3.new(179.970001, -0.430000007, -179.509995)
- Part64.Size = Vector3.new(2.04000163, 2.04000163, 2.04000163)
- Part64.BottomSurface = Enum.SurfaceType.Smooth
- Part64.Material = Enum.Material.ForceField
- Part64.TopSurface = Enum.SurfaceType.Smooth
- Part64.Shape = Enum.PartType.Ball
- BodyGyro65.Parent = Part64
- BodyPosition66.Parent = Part64
- Script67.Name = "Aim"
- Script67.Parent = Part64
- table.insert(cors,sandbox(Script67,function()
- bin = script.Parent
- function move(target)
- local dir = (target.Position - bin.Position).unit
- local spawnPos = bin.Position
- local pos = spawnPos + (dir * 1)
- bin:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
- bin:findFirstChild("BodyGyro").maxTorque = Vector3.new(9000,9000,9000)
- end
- function moveTo(target)
- bin.BodyPosition.position = target.Position
- bin.BodyPosition.maxForce = Vector3.new(10000,10000,10000) * bin.Speed.Value
- end
- function findNearestTorso(pos)
- local list = game.Workspace:GetChildren()
- 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 ~= script.Parent) then
- temp = temp2:findFirstChild("Head")
- 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 torso = findNearestTorso(bin.Position)
- if torso~=nil then
- move(torso)
- moveTo(torso)
- end
- wait()
- end
- end))
- NumberValue68.Name = "Speed"
- NumberValue68.Parent = Part64
- NumberValue68.Value = 0.2
- Decal69.Name = "ROBLOX Old Default Face"
- Decal69.Parent = Part64
- Decal69.Texture = "http://www.roblox.com/asset/?id=138437944"
- Model70.Parent = mas
- Part71.Name = "Head"
- Part71.Parent = Model70
- Part71.CFrame = CFrame.new(13.2279701, 102.489113, 87.9855957, -0.999935091, 0.00857119635, -0.00751148583, 0.00857600104, 0.999963105, -0.000607622438, 0.00750600081, -0.000672001508, -0.999971628)
- Part71.Orientation = Vector3.new(0.0299999993, -179.570007, 0.49000001)
- Part71.Position = Vector3.new(13.2279701, 102.489113, 87.9855957)
- Part71.Rotation = Vector3.new(179.970001, -0.430000007, -179.509995)
- Part71.Size = Vector3.new(2.04000163, 2.04000163, 2.04000163)
- Part71.BottomSurface = Enum.SurfaceType.Smooth
- Part71.Material = Enum.Material.ForceField
- Part71.TopSurface = Enum.SurfaceType.Smooth
- Part71.Shape = Enum.PartType.Ball
- BodyGyro72.Parent = Part71
- BodyPosition73.Parent = Part71
- Script74.Name = "Aim"
- Script74.Parent = Part71
- table.insert(cors,sandbox(Script74,function()
- bin = script.Parent
- function move(target)
- local dir = (target.Position - bin.Position).unit
- local spawnPos = bin.Position
- local pos = spawnPos + (dir * 1)
- bin:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
- bin:findFirstChild("BodyGyro").maxTorque = Vector3.new(9000,9000,9000)
- end
- function moveTo(target)
- bin.BodyPosition.position = target.Position
- bin.BodyPosition.maxForce = Vector3.new(10000,10000,10000) * bin.Speed.Value
- end
- function findNearestTorso(pos)
- local list = game.Workspace:GetChildren()
- 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 ~= script.Parent) then
- temp = temp2:findFirstChild("Head")
- 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 torso = findNearestTorso(bin.Position)
- if torso~=nil then
- move(torso)
- moveTo(torso)
- end
- wait()
- end
- end))
- NumberValue75.Name = "Speed"
- NumberValue75.Parent = Part71
- NumberValue75.Value = 0.2
- Decal76.Name = "ROBLOX Old Default Face"
- Decal76.Parent = Part71
- Decal76.Texture = "http://www.roblox.com/asset/?id=138437944"
- Model77.Parent = mas
- Part78.Name = "Head"
- Part78.Parent = Model77
- Part78.CFrame = CFrame.new(13.2279701, 96.3690414, 87.9855957, -0.999935091, 0.00857119635, -0.00751148583, 0.00857600104, 0.999963105, -0.000607622438, 0.00750600081, -0.000672001508, -0.999971628)
- Part78.Orientation = Vector3.new(0.0299999993, -179.570007, 0.49000001)
- Part78.Position = Vector3.new(13.2279701, 96.3690414, 87.9855957)
- Part78.Rotation = Vector3.new(179.970001, -0.430000007, -179.509995)
- Part78.Size = Vector3.new(2.04000163, 2.04000163, 2.04000163)
- Part78.BottomSurface = Enum.SurfaceType.Smooth
- Part78.Material = Enum.Material.ForceField
- Part78.TopSurface = Enum.SurfaceType.Smooth
- Part78.Shape = Enum.PartType.Ball
- BodyGyro79.Parent = Part78
- BodyPosition80.Parent = Part78
- Script81.Name = "Aim"
- Script81.Parent = Part78
- table.insert(cors,sandbox(Script81,function()
- bin = script.Parent
- function move(target)
- local dir = (target.Position - bin.Position).unit
- local spawnPos = bin.Position
- local pos = spawnPos + (dir * 1)
- bin:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
- bin:findFirstChild("BodyGyro").maxTorque = Vector3.new(9000,9000,9000)
- end
- function moveTo(target)
- bin.BodyPosition.position = target.Position
- bin.BodyPosition.maxForce = Vector3.new(10000,10000,10000) * bin.Speed.Value
- end
- function findNearestTorso(pos)
- local list = game.Workspace:GetChildren()
- 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 ~= script.Parent) then
- temp = temp2:findFirstChild("Head")
- 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 torso = findNearestTorso(bin.Position)
- if torso~=nil then
- move(torso)
- moveTo(torso)
- end
- wait()
- end
- end))
- NumberValue82.Name = "Speed"
- NumberValue82.Parent = Part78
- NumberValue82.Value = 0.2
- Decal83.Name = "ROBLOX Old Default Face"
- Decal83.Parent = Part78
- Decal83.Texture = "http://www.roblox.com/asset/?id=138437944"
- Model84.Parent = mas
- Part85.Name = "Head"
- Part85.Parent = Model84
- Part85.CFrame = CFrame.new(13.2279701, 80.0488129, 87.9855957, -0.999935091, 0.00857119635, -0.00751148583, 0.00857600104, 0.999963105, -0.000607622438, 0.00750600081, -0.000672001508, -0.999971628)
- Part85.Orientation = Vector3.new(0.0299999993, -179.570007, 0.49000001)
- Part85.Position = Vector3.new(13.2279701, 80.0488129, 87.9855957)
- Part85.Rotation = Vector3.new(179.970001, -0.430000007, -179.509995)
- Part85.Size = Vector3.new(2.04000163, 2.04000163, 2.04000163)
- Part85.BottomSurface = Enum.SurfaceType.Smooth
- Part85.Material = Enum.Material.ForceField
- Part85.TopSurface = Enum.SurfaceType.Smooth
- Part85.Shape = Enum.PartType.Ball
- BodyGyro86.Parent = Part85
- BodyPosition87.Parent = Part85
- Script88.Name = "Aim"
- Script88.Parent = Part85
- table.insert(cors,sandbox(Script88,function()
- bin = script.Parent
- function move(target)
- local dir = (target.Position - bin.Position).unit
- local spawnPos = bin.Position
- local pos = spawnPos + (dir * 1)
- bin:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
- bin:findFirstChild("BodyGyro").maxTorque = Vector3.new(9000,9000,9000)
- end
- function moveTo(target)
- bin.BodyPosition.position = target.Position
- bin.BodyPosition.maxForce = Vector3.new(10000,10000,10000) * bin.Speed.Value
- end
- function findNearestTorso(pos)
- local list = game.Workspace:GetChildren()
- 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 ~= script.Parent) then
- temp = temp2:findFirstChild("Head")
- 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 torso = findNearestTorso(bin.Position)
- if torso~=nil then
- move(torso)
- moveTo(torso)
- end
- wait()
- end
- end))
- NumberValue89.Name = "Speed"
- NumberValue89.Parent = Part85
- NumberValue89.Value = 0.2
- Decal90.Name = "ROBLOX Old Default Face"
- Decal90.Parent = Part85
- Decal90.Texture = "http://www.roblox.com/asset/?id=138437944"
- Model91.Parent = mas
- Part92.Name = "Head"
- Part92.Parent = Model91
- Part92.CFrame = CFrame.new(13.2279701, 98.4090805, 87.9855957, -0.999935091, 0.00857119635, -0.00751148583, 0.00857600104, 0.999963105, -0.000607622438, 0.00750600081, -0.000672001508, -0.999971628)
- Part92.Orientation = Vector3.new(0.0299999993, -179.570007, 0.49000001)
- Part92.Position = Vector3.new(13.2279701, 98.4090805, 87.9855957)
- Part92.Rotation = Vector3.new(179.970001, -0.430000007, -179.509995)
- Part92.Size = Vector3.new(2.04000163, 2.04000163, 2.04000163)
- Part92.BottomSurface = Enum.SurfaceType.Smooth
- Part92.Material = Enum.Material.ForceField
- Part92.TopSurface = Enum.SurfaceType.Smooth
- Part92.Shape = Enum.PartType.Ball
- BodyGyro93.Parent = Part92
- BodyPosition94.Parent = Part92
- Script95.Name = "Aim"
- Script95.Parent = Part92
- table.insert(cors,sandbox(Script95,function()
- bin = script.Parent
- function move(target)
- local dir = (target.Position - bin.Position).unit
- local spawnPos = bin.Position
- local pos = spawnPos + (dir * 1)
- bin:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
- bin:findFirstChild("BodyGyro").maxTorque = Vector3.new(9000,9000,9000)
- end
- function moveTo(target)
- bin.BodyPosition.position = target.Position
- bin.BodyPosition.maxForce = Vector3.new(10000,10000,10000) * bin.Speed.Value
- end
- function findNearestTorso(pos)
- local list = game.Workspace:GetChildren()
- 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 ~= script.Parent) then
- temp = temp2:findFirstChild("Head")
- 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 torso = findNearestTorso(bin.Position)
- if torso~=nil then
- move(torso)
- moveTo(torso)
- end
- wait()
- end
- end))
- NumberValue96.Name = "Speed"
- NumberValue96.Parent = Part92
- NumberValue96.Value = 0.2
- Decal97.Name = "ROBLOX Old Default Face"
- Decal97.Parent = Part92
- Decal97.Texture = "http://www.roblox.com/asset/?id=138437944"
- Model98.Parent = mas
- Part99.Name = "Head"
- Part99.Parent = Model98
- Part99.CFrame = CFrame.new(13.2279701, 104.529129, 87.9855957, -0.999935091, 0.00857119635, -0.00751148583, 0.00857600104, 0.999963105, -0.000607622438, 0.00750600081, -0.000672001508, -0.999971628)
- Part99.Orientation = Vector3.new(0.0299999993, -179.570007, 0.49000001)
- Part99.Position = Vector3.new(13.2279701, 104.529129, 87.9855957)
- Part99.Rotation = Vector3.new(179.970001, -0.430000007, -179.509995)
- Part99.Size = Vector3.new(2.04000163, 2.04000163, 2.04000163)
- Part99.BottomSurface = Enum.SurfaceType.Smooth
- Part99.Material = Enum.Material.ForceField
- Part99.TopSurface = Enum.SurfaceType.Smooth
- Part99.Shape = Enum.PartType.Ball
- BodyGyro100.Parent = Part99
- BodyPosition101.Parent = Part99
- Script102.Name = "Aim"
- Script102.Parent = Part99
- table.insert(cors,sandbox(Script102,function()
- bin = script.Parent
- function move(target)
- local dir = (target.Position - bin.Position).unit
- local spawnPos = bin.Position
- local pos = spawnPos + (dir * 1)
- bin:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
- bin:findFirstChild("BodyGyro").maxTorque = Vector3.new(9000,9000,9000)
- end
- function moveTo(target)
- bin.BodyPosition.position = target.Position
- bin.BodyPosition.maxForce = Vector3.new(10000,10000,10000) * bin.Speed.Value
- end
- function findNearestTorso(pos)
- local list = game.Workspace:GetChildren()
- 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 ~= script.Parent) then
- temp = temp2:findFirstChild("Head")
- 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 torso = findNearestTorso(bin.Position)
- if torso~=nil then
- move(torso)
- moveTo(torso)
- end
- wait()
- end
- end))
- NumberValue103.Name = "Speed"
- NumberValue103.Parent = Part99
- NumberValue103.Value = 0.2
- Decal104.Name = "ROBLOX Old Default Face"
- Decal104.Parent = Part99
- Decal104.Texture = "http://www.roblox.com/asset/?id=138437944"
- Model105.Parent = mas
- Part106.Name = "Head"
- Part106.Parent = Model105
- Part106.CFrame = CFrame.new(13.2279701, 100.449104, 87.9855957, -0.999935091, 0.00857119635, -0.00751148583, 0.00857600104, 0.999963105, -0.000607622438, 0.00750600081, -0.000672001508, -0.999971628)
- Part106.Orientation = Vector3.new(0.0299999993, -179.570007, 0.49000001)
- Part106.Position = Vector3.new(13.2279701, 100.449104, 87.9855957)
- Part106.Rotation = Vector3.new(179.970001, -0.430000007, -179.509995)
- Part106.Size = Vector3.new(2.04000163, 2.04000163, 2.04000163)
- Part106.BottomSurface = Enum.SurfaceType.Smooth
- Part106.Material = Enum.Material.ForceField
- Part106.TopSurface = Enum.SurfaceType.Smooth
- Part106.Shape = Enum.PartType.Ball
- BodyGyro107.Parent = Part106
- BodyPosition108.Parent = Part106
- Script109.Name = "Aim"
- Script109.Parent = Part106
- table.insert(cors,sandbox(Script109,function()
- bin = script.Parent
- function move(target)
- local dir = (target.Position - bin.Position).unit
- local spawnPos = bin.Position
- local pos = spawnPos + (dir * 1)
- bin:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
- bin:findFirstChild("BodyGyro").maxTorque = Vector3.new(9000,9000,9000)
- end
- function moveTo(target)
- bin.BodyPosition.position = target.Position
- bin.BodyPosition.maxForce = Vector3.new(10000,10000,10000) * bin.Speed.Value
- end
- function findNearestTorso(pos)
- local list = game.Workspace:GetChildren()
- 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 ~= script.Parent) then
- temp = temp2:findFirstChild("Head")
- 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 torso = findNearestTorso(bin.Position)
- if torso~=nil then
- move(torso)
- moveTo(torso)
- end
- wait()
- end
- end))
- NumberValue110.Name = "Speed"
- NumberValue110.Parent = Part106
- NumberValue110.Value = 0.2
- Decal111.Name = "ROBLOX Old Default Face"
- Decal111.Parent = Part106
- Decal111.Texture = "http://www.roblox.com/asset/?id=138437944"
- Model112.Parent = mas
- Part113.Name = "Head"
- Part113.Parent = Model112
- Part113.CFrame = CFrame.new(13.2279701, 106.569138, 87.9855957, -0.999935091, 0.00857119635, -0.00751148583, 0.00857600104, 0.999963105, -0.000607622438, 0.00750600081, -0.000672001508, -0.999971628)
- Part113.Orientation = Vector3.new(0.0299999993, -179.570007, 0.49000001)
- Part113.Position = Vector3.new(13.2279701, 106.569138, 87.9855957)
- Part113.Rotation = Vector3.new(179.970001, -0.430000007, -179.509995)
- Part113.Size = Vector3.new(2.04000163, 2.04000163, 2.04000163)
- Part113.BottomSurface = Enum.SurfaceType.Smooth
- Part113.Material = Enum.Material.ForceField
- Part113.TopSurface = Enum.SurfaceType.Smooth
- Part113.Shape = Enum.PartType.Ball
- BodyGyro114.Parent = Part113
- BodyPosition115.Parent = Part113
- Script116.Name = "Aim"
- Script116.Parent = Part113
- table.insert(cors,sandbox(Script116,function()
- bin = script.Parent
- function move(target)
- local dir = (target.Position - bin.Position).unit
- local spawnPos = bin.Position
- local pos = spawnPos + (dir * 1)
- bin:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
- bin:findFirstChild("BodyGyro").maxTorque = Vector3.new(9000,9000,9000)
- end
- function moveTo(target)
- bin.BodyPosition.position = target.Position
- bin.BodyPosition.maxForce = Vector3.new(10000,10000,10000) * bin.Speed.Value
- end
- function findNearestTorso(pos)
- local list = game.Workspace:GetChildren()
- 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 ~= script.Parent) then
- temp = temp2:findFirstChild("Head")
- 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 torso = findNearestTorso(bin.Position)
- if torso~=nil then
- move(torso)
- moveTo(torso)
- end
- wait()
- end
- end))
- NumberValue117.Name = "Speed"
- NumberValue117.Parent = Part113
- NumberValue117.Value = 0.2
- Decal118.Name = "ROBLOX Old Default Face"
- Decal118.Parent = Part113
- Decal118.Texture = "http://www.roblox.com/asset/?id=138437944"
- Model119.Parent = mas
- Part120.Name = "Head"
- Part120.Parent = Model119
- Part120.CFrame = CFrame.new(13.2279701, 84.1288834, 87.9855957, -0.999935091, 0.00857119635, -0.00751148583, 0.00857600104, 0.999963105, -0.000607622438, 0.00750600081, -0.000672001508, -0.999971628)
- Part120.Orientation = Vector3.new(0.0299999993, -179.570007, 0.49000001)
- Part120.Position = Vector3.new(13.2279701, 84.1288834, 87.9855957)
- Part120.Rotation = Vector3.new(179.970001, -0.430000007, -179.509995)
- Part120.Size = Vector3.new(2.04000163, 2.04000163, 2.04000163)
- Part120.BottomSurface = Enum.SurfaceType.Smooth
- Part120.Material = Enum.Material.ForceField
- Part120.TopSurface = Enum.SurfaceType.Smooth
- Part120.Shape = Enum.PartType.Ball
- BodyGyro121.Parent = Part120
- BodyPosition122.Parent = Part120
- Script123.Name = "Aim"
- Script123.Parent = Part120
- table.insert(cors,sandbox(Script123,function()
- bin = script.Parent
- function move(target)
- local dir = (target.Position - bin.Position).unit
- local spawnPos = bin.Position
- local pos = spawnPos + (dir * 1)
- bin:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
- bin:findFirstChild("BodyGyro").maxTorque = Vector3.new(9000,9000,9000)
- end
- function moveTo(target)
- bin.BodyPosition.position = target.Position
- bin.BodyPosition.maxForce = Vector3.new(10000,10000,10000) * bin.Speed.Value
- end
- function findNearestTorso(pos)
- local list = game.Workspace:GetChildren()
- 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 ~= script.Parent) then
- temp = temp2:findFirstChild("Head")
- 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 torso = findNearestTorso(bin.Position)
- if torso~=nil then
- move(torso)
- moveTo(torso)
- end
- wait()
- end
- end))
- NumberValue124.Name = "Speed"
- NumberValue124.Parent = Part120
- NumberValue124.Value = 0.2
- Decal125.Name = "ROBLOX Old Default Face"
- Decal125.Parent = Part120
- Decal125.Texture = "http://www.roblox.com/asset/?id=138437944"
- Model126.Parent = mas
- Part127.Name = "Head"
- Part127.Parent = Model126
- Part127.CFrame = CFrame.new(13.2279701, 86.1689224, 87.9855957, -0.999935091, 0.00857119635, -0.00751148583, 0.00857600104, 0.999963105, -0.000607622438, 0.00750600081, -0.000672001508, -0.999971628)
- Part127.Orientation = Vector3.new(0.0299999993, -179.570007, 0.49000001)
- Part127.Position = Vector3.new(13.2279701, 86.1689224, 87.9855957)
- Part127.Rotation = Vector3.new(179.970001, -0.430000007, -179.509995)
- Part127.Size = Vector3.new(2.04000163, 2.04000163, 2.04000163)
- Part127.BottomSurface = Enum.SurfaceType.Smooth
- Part127.Material = Enum.Material.ForceField
- Part127.TopSurface = Enum.SurfaceType.Smooth
- Part127.Shape = Enum.PartType.Ball
- BodyGyro128.Parent = Part127
- BodyPosition129.Parent = Part127
- Script130.Name = "Aim"
- Script130.Parent = Part127
- table.insert(cors,sandbox(Script130,function()
- bin = script.Parent
- function move(target)
- local dir = (target.Position - bin.Position).unit
- local spawnPos = bin.Position
- local pos = spawnPos + (dir * 1)
- bin:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
- bin:findFirstChild("BodyGyro").maxTorque = Vector3.new(9000,9000,9000)
- end
- function moveTo(target)
- bin.BodyPosition.position = target.Position
- bin.BodyPosition.maxForce = Vector3.new(10000,10000,10000) * bin.Speed.Value
- end
- function findNearestTorso(pos)
- local list = game.Workspace:GetChildren()
- 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 ~= script.Parent) then
- temp = temp2:findFirstChild("Head")
- 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 torso = findNearestTorso(bin.Position)
- if torso~=nil then
- move(torso)
- moveTo(torso)
- end
- wait()
- end
- end))
- NumberValue131.Name = "Speed"
- NumberValue131.Parent = Part127
- NumberValue131.Value = 0.2
- Decal132.Name = "ROBLOX Old Default Face"
- Decal132.Parent = Part127
- Decal132.Texture = "http://www.roblox.com/asset/?id=138437944"
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = workspace
- pcall(function() v:MakeJoints() end)
- end
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement