Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- slime = Instance.new("Model",game.Workspace)
- slime.Name = "slime"
- blob2 = Instance.new("Part",slime)
- blob2.Velocity = Vector3.new(-1.7623788118362,-0.021285310387611,48.390308380127)
- blob2.FormFactor = Enum.FormFactor.Symmetric
- blob2.Elasticity = 0
- blob2.Transparency = 0.40000000596046
- blob2.TopSurface = Enum.SurfaceType.Smooth
- blob2.RotVelocity = Vector3.new(-0.043584678322077,-0.21588079631329,-0.041304044425488)
- blob2.Size = Vector3.new(8,8,8)
- blob2.Name = "Blob2"
- blob2.CFrame = CFrame.new(86.441627502441,3.9890384674072,-50.019386291504) * CFrame.Angles(2.7670059204102, 0.72412210702896, -2.8864076137543)
- blob2.BrickColor = BrickColor.new("Bright green")
- blob2.Friction = 0
- blob2.Shape = Enum.PartType.Ball
- blob2.BottomSurface = Enum.SurfaceType.Smooth
- blob1 = Instance.new("Part",slime)
- blob1.Velocity = Vector3.new(-1.7623788118362,-0.021285310387611,48.390308380127)
- blob1.FormFactor = Enum.FormFactor.Symmetric
- blob1.LeftSurface = Enum.SurfaceType.Glue
- blob1.Elasticity = 0
- blob1.TopSurface = Enum.SurfaceType.Glue
- blob1.RotVelocity = Vector3.new(-0.043584678322077,-0.21588079631329,-0.041304044425488)
- blob1.Size = Vector3.new(3,3,3)
- blob1.Name = "Blob1"
- blob1.FrontSurface = Enum.SurfaceType.Glue
- blob1.CFrame = CFrame.new(86.441627502441,3.9890384674072,-50.019386291504) * CFrame.Angles(2.7670059204102, 0.72412204742432, -2.8864076137543)
- blob1.RightSurface = Enum.SurfaceType.Glue
- blob1.BackSurface = Enum.SurfaceType.Glue
- blob1.BrickColor = BrickColor.new("Bright green")
- blob1.Friction = 0
- blob1.Shape = Enum.PartType.Ball
- blob1.BottomSurface = Enum.SurfaceType.Glue
- mesh = Instance.new("SpecialMesh",blob1)
- mesh.Scale = Vector3.new(0.69999998807907,0.69999998807907,0.69999998807907)
- mesh.MeshType = Enum.MeshType.Sphere
- speed = Instance.new("NumberValue",blob2)
- speed.Name = "Speed"
- speed.Value = 0.2
- bodygyro = Instance.new("BodyGyro",blob2)
- bodygyro.maxTorque = Vector3.new(9000,9000,9000)
- bodygyro.cframe = CFrame.new(85.811500549316,4.2727932929993,-50.957424163818) * CFrame.Angles(2.7415568828583, 0.75453597307205, -2.8596844673157)
- bodyposition = Instance.new("BodyPosition",blob2)
- bodyposition.maxForce = Vector3.new(2000,2000,2000)
- bodyposition.position = Vector3.new(-6.4771208763123,42.504699707031,39.460441589355)
- weld = Instance.new("Weld",blob2)
- weld.Part1 = Blob2
- weld.Part0 = Blob1
- weld.C1 = CFrame.new(0,0,0) * CFrame.Angles(-0.56438058614731, 1.3102374076843, 0.0021327317226678)
- weld.C0 = CFrame.new(0,0,0) * CFrame.Angles(-0.56438058614731, 1.3102374076843, 0.0021327317226678)
- speed = Instance.new("NumberValue",slime)
- speed.Name = "Speed"
- speed.Value = 0.2
- bodygyro = Instance.new("BodyGyro",slime)
- bodygyro.maxTorque = Vector3.new(9000,9000,9000)
- bodygyro.cframe = CFrame.new(78.518280029297,2.7634258270264,20.855653762817) * CFrame.Angles(2.7586266994476, 3.0517565392074e-005, -3.1415803432465)
- bodyposition = Instance.new("BodyPosition",slime)
- bodyposition.maxForce = Vector3.new(2000,2000,2000)
- bodyposition.position = Vector3.new(78.51823425293,3.3874299526215,22.40460395813)
- speed = Instance.new("NumberValue",slime)
- speed.Name = "Speed"
- speed.Value = 0.2
- bodygyro = Instance.new("BodyGyro",slime)
- bodygyro.maxTorque = Vector3.new(9000,9000,9000)
- bodygyro.cframe = CFrame.new(78.520431518555,2.7606685161591,21.012775421143) * CFrame.Angles(2.761394739151, -0.00064849876798689, 3.1413335800171)
- bodyposition = Instance.new("BodyPosition",slime)
- bodyposition.maxForce = Vector3.new(2000,2000,2000)
- bodyposition.position = Vector3.new(78.521507263184,3.3747184276581,22.549276351929)
- local prev
- local parts = slime:GetChildren()
- for i = 1,#parts do
- if (parts[i].className == "Part") then
- if (prev ~= nil)then
- local weld = Instance.new("Weld")
- weld.Part0 = prev
- weld.Part1 = parts[i]
- weld.C0 = prev.CFrame:inverse()
- weld.C1 = parts[i].CFrame:inverse()
- weld.Parent = prev
- end
- prev = parts[i]
- end
- end
- bin = slime
- 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 ~= slime) 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
- function shoot(pos)
- dir = (pos - bin.CFrame.p).unit
- for i = 1, 50 do
- local ex = Instance.new("Explosion")
- ex.BlastRadius = 1
- ex.Position = bin.Position + (dir * 10 * i) + (dir * 7)
- ex.Parent = game.Workspace
- end
- end
- function shootAt(torso)
- local dir = (torso.Position - bin.Position).unit
- local spawnPos = bin.Position
- local pos = spawnPos + (dir * 1)
- shoot(pos)
- end
- while true do
- local torso = findNearestTorso(bin.Position)
- if torso~=nil then
- move(torso)
- moveTo(torso)
- end
- wait()
- end
- function Stick(A,B)
- A.CFrame = B.CFrame
- local weld = Instance.new("Weld")
- weld.Part0 = A
- weld.Part1 = B
- local HitPos = B.Position
- local CJ = CFrame.new(HitPos)
- local C0 = B.CFrame:inverse() *CJ
- local C1 = A.CFrame:inverse() * CJ
- weld.C0 = C0
- weld.C1 = C1
- weld.Parent = B
- end
- Stick(slime.Blob1,slime.Blob2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement