Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,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")
- Part2 = Instance.new("Part")
- Part3 = Instance.new("Part")
- Part4 = Instance.new("Part")
- Part5 = Instance.new("Part")
- Part6 = Instance.new("Part")
- Part7 = Instance.new("Part")
- Part8 = Instance.new("Part")
- Script9 = Instance.new("Script")
- BoolValue10 = Instance.new("BoolValue")
- Model0.Name = "Omega Slime"
- Model0.Parent = mas
- Part1.Name = "TehSlime"
- Part1.Parent = Model0
- Part1.BrickColor = BrickColor.new("Black")
- Part1.Anchored = true
- Part1.FormFactor = Enum.FormFactor.Symmetric
- Part1.Size = Vector3.new(1, 1, 1)
- Part1.CFrame = CFrame.new(-0.5, 0.500005007, -0.499938995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part1.BackSurface = Enum.SurfaceType.Glue
- Part1.BottomSurface = Enum.SurfaceType.Glue
- Part1.FrontSurface = Enum.SurfaceType.Glue
- Part1.LeftSurface = Enum.SurfaceType.Glue
- Part1.RightSurface = Enum.SurfaceType.Glue
- Part1.TopSurface = Enum.SurfaceType.Glue
- Part1.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part1.Position = Vector3.new(-0.5, 0.500005007, -0.499938995)
- Part1.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part2.Name = "TehSlime"
- Part2.Parent = Model0
- Part2.BrickColor = BrickColor.new("Black")
- Part2.Anchored = true
- Part2.FormFactor = Enum.FormFactor.Symmetric
- Part2.Size = Vector3.new(1, 1, 1)
- Part2.CFrame = CFrame.new(0.5, 0.500005007, -0.499938995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part2.BackSurface = Enum.SurfaceType.Glue
- Part2.BottomSurface = Enum.SurfaceType.Glue
- Part2.FrontSurface = Enum.SurfaceType.Glue
- Part2.LeftSurface = Enum.SurfaceType.Glue
- Part2.RightSurface = Enum.SurfaceType.Glue
- Part2.TopSurface = Enum.SurfaceType.Glue
- Part2.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part2.Position = Vector3.new(0.5, 0.500005007, -0.499938995)
- Part2.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part3.Name = "TehSlime"
- Part3.Parent = Model0
- Part3.BrickColor = BrickColor.new("Black")
- Part3.Anchored = true
- Part3.FormFactor = Enum.FormFactor.Symmetric
- Part3.Size = Vector3.new(1, 1, 1)
- Part3.CFrame = CFrame.new(0.5, 1.49982202, -0.499938995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part3.BackSurface = Enum.SurfaceType.Glue
- Part3.BottomSurface = Enum.SurfaceType.Glue
- Part3.FrontSurface = Enum.SurfaceType.Glue
- Part3.LeftSurface = Enum.SurfaceType.Glue
- Part3.RightSurface = Enum.SurfaceType.Glue
- Part3.TopSurface = Enum.SurfaceType.Glue
- Part3.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part3.Position = Vector3.new(0.5, 1.49982202, -0.499938995)
- Part3.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part4.Name = "TehSlime"
- Part4.Parent = Model0
- Part4.BrickColor = BrickColor.new("Black")
- Part4.Anchored = true
- Part4.FormFactor = Enum.FormFactor.Symmetric
- Part4.Size = Vector3.new(1, 1, 1)
- Part4.CFrame = CFrame.new(0.5, 1.49982202, 0.499938995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part4.BackSurface = Enum.SurfaceType.Glue
- Part4.BottomSurface = Enum.SurfaceType.Glue
- Part4.FrontSurface = Enum.SurfaceType.Glue
- Part4.LeftSurface = Enum.SurfaceType.Glue
- Part4.RightSurface = Enum.SurfaceType.Glue
- Part4.TopSurface = Enum.SurfaceType.Glue
- Part4.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part4.Position = Vector3.new(0.5, 1.49982202, 0.499938995)
- Part4.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part5.Name = "TehSlime"
- Part5.Parent = Model0
- Part5.BrickColor = BrickColor.new("Black")
- Part5.Anchored = true
- Part5.FormFactor = Enum.FormFactor.Symmetric
- Part5.Size = Vector3.new(1, 1, 1)
- Part5.CFrame = CFrame.new(0.5, 0.500005007, 0.499938995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part5.BackSurface = Enum.SurfaceType.Glue
- Part5.BottomSurface = Enum.SurfaceType.Glue
- Part5.FrontSurface = Enum.SurfaceType.Glue
- Part5.LeftSurface = Enum.SurfaceType.Glue
- Part5.RightSurface = Enum.SurfaceType.Glue
- Part5.TopSurface = Enum.SurfaceType.Glue
- Part5.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part5.Position = Vector3.new(0.5, 0.500005007, 0.499938995)
- Part5.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part6.Name = "TehSlime"
- Part6.Parent = Model0
- Part6.BrickColor = BrickColor.new("Black")
- Part6.Anchored = true
- Part6.FormFactor = Enum.FormFactor.Symmetric
- Part6.Size = Vector3.new(1, 1, 1)
- Part6.CFrame = CFrame.new(-0.5, 1.49982202, 0.499938995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part6.BackSurface = Enum.SurfaceType.Glue
- Part6.BottomSurface = Enum.SurfaceType.Glue
- Part6.FrontSurface = Enum.SurfaceType.Glue
- Part6.LeftSurface = Enum.SurfaceType.Glue
- Part6.RightSurface = Enum.SurfaceType.Glue
- Part6.TopSurface = Enum.SurfaceType.Glue
- Part6.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part6.Position = Vector3.new(-0.5, 1.49982202, 0.499938995)
- Part6.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part7.Name = "TehSlime"
- Part7.Parent = Model0
- Part7.BrickColor = BrickColor.new("Black")
- Part7.Anchored = true
- Part7.FormFactor = Enum.FormFactor.Symmetric
- Part7.Size = Vector3.new(1, 1, 1)
- Part7.CFrame = CFrame.new(-0.5, 1.49982202, -0.499938995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part7.BackSurface = Enum.SurfaceType.Glue
- Part7.BottomSurface = Enum.SurfaceType.Glue
- Part7.FrontSurface = Enum.SurfaceType.Glue
- Part7.LeftSurface = Enum.SurfaceType.Glue
- Part7.RightSurface = Enum.SurfaceType.Glue
- Part7.TopSurface = Enum.SurfaceType.Glue
- Part7.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part7.Position = Vector3.new(-0.5, 1.49982202, -0.499938995)
- Part7.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part8.Name = "TehSlime"
- Part8.Parent = Model0
- Part8.BrickColor = BrickColor.new("Black")
- Part8.Anchored = true
- Part8.FormFactor = Enum.FormFactor.Symmetric
- Part8.Size = Vector3.new(1, 1, 1)
- Part8.CFrame = CFrame.new(-0.5, 0.500005007, 0.499938995, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part8.BackSurface = Enum.SurfaceType.Glue
- Part8.BottomSurface = Enum.SurfaceType.Glue
- Part8.FrontSurface = Enum.SurfaceType.Glue
- Part8.LeftSurface = Enum.SurfaceType.Glue
- Part8.RightSurface = Enum.SurfaceType.Glue
- Part8.TopSurface = Enum.SurfaceType.Glue
- Part8.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part8.Position = Vector3.new(-0.5, 0.500005007, 0.499938995)
- Part8.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Script9.Parent = Model0
- table.insert(cors,sandbox(Script9,function()
- --Particle Slime V3 by timwood1104--
- -- V3: Wow, it's been about 8 months since I created Particle Slime V1!! :D (May 28, 2010 right now)
- -- Thank you everybody who has given me encouraging comments and feedback!
- -- And to those who think they created it themselves or swear that their friends made it,
- -- you can stop reading this and go away. lol
- -- Anyways, V3 is pretty much the same as V2 except for two useless features have been
- -- been removed: Grabslime and Combine.
- -- Also, it has been changed a little bit to fit into one script for convenience. :)
- -- And the script has been tidied up a little bit.
- -- And they slimeys are unlocked. :D
- -- But that's about it. Haha, :P
- -- Here is my original description of the particle slime:
- -- "Particle Slime is an interesting concept of Roblox enemy completely designed and built by
- -- timwood1104(aka, me). Originally inspired by an episode from Star Trek, I designed this using the
- -- .magnitude as a way to determine which slime particle is closest and farthest away from the target.
- -- To move closer to the target, the slime takes the particle farthest away and puts it in a random
- -- position closer to the target it is chasing. This causes the slime to move slowly, but surely towards it's
- -- prey. Obviously, the slime has no Humanoid, meaning that it can't be killed unless somebody
- -- constructs a specific tool to do so. Remember, I made this first! Enjoy :P"
- -------------
- -------------
- spaces = 2 -- How many spaces it travels per move(1-3 is the best, preferably 2)
- speed = 8 -- How fast it goes, just put any number I guess :P
- range = 75 -- How far the slime "sees"; if it can't see ya it won't get ya! lol
- ooze = true -- This is whether the slime will squeeze through really thick walls or not.
- -------------
- -------------
- local partname = "TehSlime" -- Name of the "Slimeys". So you don't have to change it throughout the entire script. :P
- local targetname = "Torso" -- Kinda obvious....... lol
- local food = {"Head", "Torso", "Right Arm", "Left Arm", "Right Leg", "Left Arm", "zarm","Part","Baseplate","Base"} -- OM NOMS!!! :D
- -------------
- -------------
- function findTarget() -- Ah, the findTarget() command. This command lets the slime find it's next victim.
- g = game.Workspace:getChildren()
- for i=1, #g do
- if g[i]:findFirstChild(targetname) ~= nil then
- if (g[i]:findFirstChild(targetname).Position - script.Parent:findFirstChild(partname).Position).magnitude < range then
- if T == nil then
- T = g[i]:findFirstChild(targetname)
- else
- if (g[i]:findFirstChild(targetname).Position - script.Parent:findFirstChild(partname).Position).magnitude < (T.Position - script.Parent:findFirstChild(partname).Position).magnitude then
- T = g[i]:findFirstChild(targetname)
- end
- end
- end
- end
- end
- end
- function fade(b)-- This lets a brick disappear by "fading" into invisibility, but you can't see the effect very
- while b.Transparency < 1 do-- easily unless the slime is at a slow speed.
- b.Transparency = b.Transparency + 0.01*speed*#p/4
- wait()
- end
- b.Transparency = 1
- end
- local tran = script.Parent:findFirstChild(partname).Transparency
- function unfade(b) -- This lets a brick appear by "fading" into visibility, but you can't see the effect very
- while b.Transparency > 0 do -- easily unless the slime is at a slow speed.
- b.Transparency = b.Transparency - 0.01*speed*#p/4
- wait()
- end
- b.Transparency = tran
- end
- function reflect(b)
- while b.Reflectance < 1 do
- b.Reflectance = b.Reflectance + 0.05
- wait(0.01)
- end
- b.Reflectance = 1
- end
- local refl = script.Parent:findFirstChild(partname).Reflectance
- function unreflect(b)
- while b.Reflectance > 0 do
- b.Reflectance = b.Reflectance - 0.05
- wait(0.01)
- end
- b.Reflectance = refl
- end
- ting = false
- function onTouched(p) -- This is for when it catches you. O_o
- if ting == false then
- ting = true
- chyeah = false
- for w=1, #food do
- if p.Name == food[w] then
- chyeah = true
- end
- end
- if chyeah == true then
- p.Anchored = true
- reflect(p)
- part = script.Parent:findFirstChild(partname):clone()
- part.Parent = game.Workspace
- part.Position = p.Position
- p:remove()
- part.Reflectance = 1
- unreflect(part)
- part.Parent = script.Parent
- part.Touched:connect(onTouched)
- wait(0.5)
- end
- ting = false
- end
- end
- e = script.Parent:getChildren()
- for i=1, #e do
- if e[i].Name == partname then
- e[i].Touched:connect(onTouched)
- end
- end
- while true do
- T = nil -- Erases previous target from memory.
- findTarget() -- Finds the new closest target!
- if ooze == true then
- r = math.random(1,36) --This little bit is supposed to allow the slime to take bigger "steps" every
- if r == 1 or r == 2 or r == 3 then -- once and a while, thus allowing it to travel through thick walls.
- space = spaces + 1
- elseif r == 4 or r == 5 then
- space = spaces + 2
- elseif r == 6 then
- space = spaces + 3
- else
- space = spaces
- end
- end
- if T ~= nil and script.Parent:findFirstChild("power") ~= nil then -- If target exists, then attack!
- if script.Parent:findFirstChild("power").Value == true then -- (and if we're turned on...)
- p = script.Parent:getChildren() -- Makes a list of the slime's "Slimeys"
- for i=1, #p do
- if p[i].Name == partname then
- if prev == nil then
- prev = p[i]
- prev2 = p[i]
- end
- if (p[i].Position - T.Position).magnitude > (prev.Position - T.Position).magnitude then
- prev = p[i] -- This finds the Slimey closest to the target.
- end
- if (p[i].Position - T.Position).magnitude < (prev2.Position - T.Position).magnitude then
- prev2 = p[i] -- This finds the Slimey farthest away from the target.
- end
- end
- end
- fade(prev) --Make Slimey dissappear. VV- Make Slimey move closer to target.
- prev.Position = Vector3.new(prev2.Position.x+math.random(-space,space), prev2.Position.y-1, prev2.Position.z+math.random(-space,space))
- unfade(prev) -- Make Slimey appear again.
- end
- end
- wait(0.01) -- And then wait... :P
- end -- Repeat!!
- end))
- BoolValue10.Name = "power"
- BoolValue10.Parent = Model0
- BoolValue10.Value = true
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = workspace
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement