View difference between Paste ID: G2Jri5Zj and NFHcP64L
SHOW: | | - or go back to the newest paste.
1
2
--Converted with ttyyuu12345's model to script plugin v4
3
function sandbox(var,func)
4
	local env = getfenv(func)
5
	local newenv = setmetatable({},{
6
		__index = function(self,k)
7
			if k=="script" then
8
				return var
9
			else
10
				return env[k]
11
			end
12
		end,
13
	})
14
	setfenv(func,newenv)
15
	return func
16
end
17
cors = {}
18
mas = Instance.new("Model",game:GetService("Lighting"))
19
Model0 = Instance.new("Model")
20
Script1 = Instance.new("Script")
21-
Part2 = Instance.new("Part")
21+
Script2 = Instance.new("Script")
22-
Part3 = Instance.new("Part")
22+
BoolValue3 = Instance.new("BoolValue")
23
Part4 = Instance.new("Part")
24
Part5 = Instance.new("Part")
25
Part6 = Instance.new("Part")
26
Part7 = Instance.new("Part")
27
Part8 = Instance.new("Part")
28
Part9 = Instance.new("Part")
29-
Script10 = Instance.new("Script")
29+
Part10 = Instance.new("Part")
30-
Model0.Name = "Electric Slime"
30+
Part11 = Instance.new("Part")
31
Model0.Name = "Hercules Slime"
32
Model0.Parent = mas
33
Script1.Parent = Model0
34-
--Particle Slime by timwood1104--
34+
35
--Particle Slime V2 by timwood1104--
36
37
-- V2 includes more customizable options including "range, combine and ooze"! Enjoi :D
38
39
-- Particle Slime is an interesting concept of Roblox enemy completely designed and built by 
40
-- timwood1104(aka, me). Originally inspired by an episode from Star Treck, I designed this using the 
41
-- .magnitude as a way to determine which slime particle is closest and farthest away from the target.
42
-- To move closer to the target, the slime takes the particle farthest away and puts it in a random 
43
-- position closer to the target it is chasing. This causes the slime to move slowly, but surely towards it's
44
-- prey. Obviously, the slime has no Humanoid, meaning that it can't be killed unless somebody 
45-
speed = 12 -- How fast it goes, just put any number I guess :P
45+
46
47
-------------
48
spaces = 2 -- How many spaces it travels per move(1-3 is the best, preferably 2)
49
speed = 8 -- How fast it goes, just put any number I guess :P
50-
function findTarget() -- Ah, the findTarget() command. This command lets the slime find it's next victem.
50+
range = 75 -- How far the slime "sees"; if it can't see ya it won't get ya! lol
51
combine = true -- If there are multiple slimes of the same kind, they will combine together if this is true.
52
ooze = true -- This is whether the slime will squeeze through thick walls or not.
53
grabslime = true -- Whether the slime will grab Slimeys from Workspace or not; it doesn't affect much 
54-
		if T == nil then
54+
55-
			T = g[i].Torso
55+
56-
		else
56+
57-
			if (g[i].Torso.Position - script.Parent.Slimey.Position).magnitude < (T.Position - script.Parent.Slimey.Position).magnitude then
57+
function findTarget() -- Ah, the findTarget() command. This command lets the slime find it's next victim.
58
	g = game.Workspace:getChildren()
59
	for i=1, #g do
60
	if g[i]:findFirstChild("Torso") ~= nil then
61
		if (g[i].Torso.Position - script.Parent.Slimey.Position).magnitude < range then
62
			if T == nil then
63
				T = g[i].Torso
64
			else
65
				if (g[i].Torso.Position - script.Parent.Slimey.Position).magnitude < (T.Position - script.Parent.Slimey.Position).magnitude then
66
					T = g[i].Torso
67
				end
68
			end
69
		end
70
	end
71
	if grabslime == true and g[i].Name == "Slimey" and g[i].className == "Part" and g[i].Size == Vector3.new(1,1,1) then
72
		g[i].Parent = script.Parent
73
	end
74
	end
75
end
76
77
function fade(b)-- This lets a brick disappear by "fading" into invisibility, but you can't see the effect very
78
	while b.Transparency < 1 do-- easily unless the slime is at a slow speed.
79
		b.Transparency = b.Transparency + 0.01*speed*#p/4
80
		wait(0.001)
81
	end
82
	b.Transparency = 1
83
end
84
85
function unfade(b) -- This lets a brick appear by "fading" into visibility, but you can't see the effect very  
86
	while b.Transparency > 0 do -- easily unless the slime is at a slow speed.
87
		b.Transparency = b.Transparency - 0.01*speed*#p/4
88
		wait(0.001)
89-
	r = math.random(1,20) --This little bit is supposed to allow the slime to take bigger "steps" every
89+
90
	b.Transparency = 0
91
end
92
93
if combine == true then
94
k = game.Workspace:getChildren()
95
wait(math.random(1,10)/20)
96
for i=1, #k do
97
if k[i]:findFirstChild("Touch") ~= nil and k[i]:findFirstChild("Slimey") ~= nil and k[i] ~= script.Parent then
98
if k[i]:findFirstChild("Slimey").BrickColor == script.Parent.Slimey.BrickColor then
99
h = k[i]:getChildren()
100-
	if T ~= nil then --If target exists, then attack!		
100+
for o=1, #h do
101-
		p = script.Parent:getChildren() -- Makes a list of the slime's "Slimeys"
101+
if h[o].Name == "Slimey" then 
102-
		for i=1, #p do
102+
h[o].Parent = script.Parent
103-
		if p[i].Name == "Slimey" then
103+
104-
			if prev == nil then
104+
105-
				prev = p[i]
105+
k[i]:remove()
106-
				prev2 = p[i]
106+
107
end
108-
			if (p[i].Position - T.Position).magnitude > (prev.Position - T.Position).magnitude then
108+
109-
				prev = p[i]   -- This finds the Slimey closest to the target.
109+
110
111-
			if (p[i].Position - T.Position).magnitude < (prev2.Position - T.Position).magnitude then
111+
112-
				prev2 = p[i] -- This finds the Slimey farthest away from the target.
112+
113
114
	T = nil -- Erases previous target from memory.
115
	findTarget() -- Finds the new closest target!
116-
			fade(prev) --Make Slimey dissappear.     VV- Make Slimey move closer to target.
116+
117-
			prev.Position = Vector3.new(prev2.Position.x+math.random(-space,space), prev2.Position.y-1, prev2.Position.z+math.random(-space,space))
117+
	if ooze == true then
118-
			unfade(prev) -- Make Slimey appear again.
118+
	r = math.random(1,36) --This little bit is supposed to allow the slime to take bigger "steps" every
119
	if r == 1 or r == 2 or r == 3 then -- once and a while, thus allowing it to travel through thick walls.
120
		space = spaces + 1
121
	elseif r == 4 or r == 5 then
122
		space = spaces + 2
123
	elseif r == 6 then
124
		space = spaces + 3
125-
Part2.Name = "Slimey"
125+
126-
Part2.Parent = Model0
126+
127-
Part2.BrickColor = BrickColor.new("Cool yellow")
127+
128-
Part2.Anchored = true
128+
129-
Part2.Locked = true
129+
130-
Part2.FormFactor = Enum.FormFactor.Symmetric
130+
	if T ~= nil and script.Parent:findFirstChild("on") ~= nil then --If target exists, then attack!		
131-
Part2.Size = Vector3.new(1, 1, 1)
131+
		if script.Parent:findFirstChild("on").Value == true then
132-
Part2.CFrame = CFrame.new(-5.5, 0.50000298, -55.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
132+
			p = script.Parent:getChildren() -- Makes a list of the slime's "Slimeys"
133-
Part2.BackSurface = Enum.SurfaceType.Glue
133+
			for i=1, #p do
134-
Part2.BottomSurface = Enum.SurfaceType.Glue
134+
			if p[i].Name == "Slimey" then
135-
Part2.FrontSurface = Enum.SurfaceType.Glue
135+
				if prev == nil then
136-
Part2.LeftSurface = Enum.SurfaceType.Glue
136+
					prev = p[i]
137-
Part2.RightSurface = Enum.SurfaceType.Glue
137+
					prev2 = p[i]
138-
Part2.TopSurface = Enum.SurfaceType.Glue
138+
				end
139-
Part2.Color = Color3.new(0.992157, 0.917647, 0.552941)
139+
				if (p[i].Position - T.Position).magnitude > (prev.Position - T.Position).magnitude then
140-
Part2.Position = Vector3.new(-5.5, 0.50000298, -55.5)
140+
					prev = p[i]   -- This finds the Slimey closest to the target.
141-
Part2.Color = Color3.new(0.992157, 0.917647, 0.552941)
141+
				end
142-
Part3.Name = "Slimey"
142+
				if (p[i].Position - T.Position).magnitude < (prev2.Position - T.Position).magnitude then
143-
Part3.Parent = Model0
143+
					prev2 = p[i] -- This finds the Slimey farthest away from the target.
144-
Part3.BrickColor = BrickColor.new("Cool yellow")
144+
				end
145-
Part3.Anchored = true
145+
146-
Part3.Locked = true
146+
147-
Part3.FormFactor = Enum.FormFactor.Symmetric
147+
				fade(prev) --Make Slimey dissappear.     VV- Make Slimey move closer to target.
148-
Part3.Size = Vector3.new(1, 1, 1)
148+
				prev.Position = Vector3.new(prev2.Position.x+math.random(-space,space)*2, prev2.Position.y-1*2, prev2.Position.z+math.random(-space,space)*2)
149-
Part3.CFrame = CFrame.new(-5.5, 0.50000298, -54.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
149+
				unfade(prev) -- Make Slimey appear again.
150-
Part3.BackSurface = Enum.SurfaceType.Glue
150+
151-
Part3.BottomSurface = Enum.SurfaceType.Glue
151+
152-
Part3.FrontSurface = Enum.SurfaceType.Glue
152+
153-
Part3.LeftSurface = Enum.SurfaceType.Glue
153+
154-
Part3.RightSurface = Enum.SurfaceType.Glue
154+
155-
Part3.TopSurface = Enum.SurfaceType.Glue
155+
156-
Part3.Color = Color3.new(0.992157, 0.917647, 0.552941)
156+
157-
Part3.Position = Vector3.new(-5.5, 0.50000298, -54.5)
157+
Script2.Name = "Touch"
158-
Part3.Color = Color3.new(0.992157, 0.917647, 0.552941)
158+
Script2.Parent = Model0
159
table.insert(cors,sandbox(Script2,function()
160
ting = false
161-
Part4.BrickColor = BrickColor.new("Cool yellow")
161+
162
if ting == false then
163
ting = true
164
if p.Name == "Left Arm" or p.Name == "Right Arm" or p.Name == "Left Leg" or p.Name == "Right Leg" or p.Name == "Head" or p.Name == "Torso" or p.Name == "zarm" then
165-
Part4.Size = Vector3.new(1, 1, 1)
165+
166-
Part4.CFrame = CFrame.new(-5.5, 1.50000095, -55.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
166+
167
part = Instance.new("Part")
168
part.Parent = game.Workspace
169
part.Position = p.Position
170
p:remove()
171
part.Reflectance = 1
172
part.formFactor = "Symmetric"
173-
Part4.Color = Color3.new(0.992157, 0.917647, 0.552941)
173+
174-
Part4.Position = Vector3.new(-5.5, 1.50000095, -55.5)
174+
175-
Part4.Color = Color3.new(0.992157, 0.917647, 0.552941)
175+
176
part.RightSurface = "Glue"
177
part.BackSurface = "Glue"
178-
Part5.BrickColor = BrickColor.new("Cool yellow")
178+
179
part.Locked = true
180
part.Anchored = true
181
part.Size = Vector3.new(2,2,2)
182-
Part5.Size = Vector3.new(1, 1, 1)
182+
183-
Part5.CFrame = CFrame.new(-5.5, 1.50000095, -54.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
183+
184
part.Parent = script.Parent
185
part.Name = "Slimey"
186
part.Touched:connect(onTouched)
187
end
188
ting = false
189
end
190-
Part5.Color = Color3.new(0.992157, 0.917647, 0.552941)
190+
191-
Part5.Position = Vector3.new(-5.5, 1.50000095, -54.5)
191+
192-
Part5.Color = Color3.new(0.992157, 0.917647, 0.552941)
192+
193
while b.Reflectance < 1 do
194
b.Reflectance = b.Reflectance + 0.05
195-
Part6.BrickColor = BrickColor.new("Cool yellow")
195+
196
end
197
b.Reflectance = 1
198
end
199-
Part6.Size = Vector3.new(1, 1, 1)
199+
200-
Part6.CFrame = CFrame.new(-4.5, 0.50000298, -54.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
200+
201
while b.Reflectance > 0 do
202
b.Reflectance = b.Reflectance - 0.05
203
wait(0.01)
204
end
205
b.Reflectance = 0
206
end
207-
Part6.Color = Color3.new(0.992157, 0.917647, 0.552941)
207+
208-
Part6.Position = Vector3.new(-4.5, 0.50000298, -54.5)
208+
209-
Part6.Color = Color3.new(0.992157, 0.917647, 0.552941)
209+
210
if e[i].Name == "Slimey" then
211
e[i].Touched:connect(onTouched)
212-
Part7.BrickColor = BrickColor.new("Cool yellow")
212+
213
end
214
215
end))
216-
Part7.Size = Vector3.new(1, 1, 1)
216+
BoolValue3.Name = "on"
217-
Part7.CFrame = CFrame.new(-4.5, 1.50000095, -54.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
217+
BoolValue3.Parent = Model0
218
BoolValue3.Value = true
219
Part4.Name = "Slimey"
220
Part4.Parent = Model0
221
Part4.BrickColor = BrickColor.new("Cyan")
222
Part4.Anchored = true
223
Part4.Locked = true
224-
Part7.Color = Color3.new(0.992157, 0.917647, 0.552941)
224+
225-
Part7.Position = Vector3.new(-4.5, 1.50000095, -54.5)
225+
Part4.Size = Vector3.new(2, 2, 2)
226-
Part7.Color = Color3.new(0.992157, 0.917647, 0.552941)
226+
Part4.CFrame = CFrame.new(-26, 3.00001407, 91, 1, 0, 0, 0, 1, 0, 0, 0, 1)
227
Part4.BackSurface = Enum.SurfaceType.Glue
228
Part4.BottomSurface = Enum.SurfaceType.Glue
229-
Part8.BrickColor = BrickColor.new("Cool yellow")
229+
230
Part4.LeftSurface = Enum.SurfaceType.Glue
231
Part4.RightSurface = Enum.SurfaceType.Glue
232
Part4.TopSurface = Enum.SurfaceType.Glue
233-
Part8.Size = Vector3.new(1, 1, 1)
233+
Part4.Color = Color3.new(0.0156863, 0.686275, 0.92549)
234-
Part8.CFrame = CFrame.new(-4.5, 1.50000095, -55.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
234+
Part4.Position = Vector3.new(-26, 3.00001407, 91)
235
Part4.Color = Color3.new(0.0156863, 0.686275, 0.92549)
236
Part5.Name = "Slimey"
237
Part5.Parent = Model0
238
Part5.BrickColor = BrickColor.new("Cyan")
239
Part5.Anchored = true
240
Part5.Locked = true
241-
Part8.Color = Color3.new(0.992157, 0.917647, 0.552941)
241+
242-
Part8.Position = Vector3.new(-4.5, 1.50000095, -55.5)
242+
Part5.Size = Vector3.new(2, 2, 2)
243-
Part8.Color = Color3.new(0.992157, 0.917647, 0.552941)
243+
Part5.CFrame = CFrame.new(-24, 1.00001299, 89, 1, 0, 0, 0, 1, 0, 0, 0, 1)
244
Part5.BackSurface = Enum.SurfaceType.Glue
245
Part5.BottomSurface = Enum.SurfaceType.Glue
246-
Part9.BrickColor = BrickColor.new("Cool yellow")
246+
247
Part5.LeftSurface = Enum.SurfaceType.Glue
248
Part5.RightSurface = Enum.SurfaceType.Glue
249
Part5.TopSurface = Enum.SurfaceType.Glue
250-
Part9.Size = Vector3.new(1, 1, 1)
250+
Part5.Color = Color3.new(0.0156863, 0.686275, 0.92549)
251-
Part9.CFrame = CFrame.new(-4.5, 0.50000298, -55.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
251+
Part5.Position = Vector3.new(-24, 1.00001299, 89)
252
Part5.Color = Color3.new(0.0156863, 0.686275, 0.92549)
253
Part6.Name = "Slimey"
254
Part6.Parent = Model0
255
Part6.BrickColor = BrickColor.new("Cyan")
256
Part6.Anchored = true
257
Part6.Locked = true
258-
Part9.Color = Color3.new(0.992157, 0.917647, 0.552941)
258+
259-
Part9.Position = Vector3.new(-4.5, 0.50000298, -55.5)
259+
Part6.Size = Vector3.new(2, 2, 2)
260-
Part9.Color = Color3.new(0.992157, 0.917647, 0.552941)
260+
Part6.CFrame = CFrame.new(-24, 1.00001299, 91, 1, 0, 0, 0, 1, 0, 0, 0, 1)
261-
Script10.Name = "Touch"
261+
262-
Script10.Parent = Model0
262+
263-
table.insert(cors,sandbox(Script10,function()
263+
264
Part6.LeftSurface = Enum.SurfaceType.Glue
265
Part6.RightSurface = Enum.SurfaceType.Glue
266
Part6.TopSurface = Enum.SurfaceType.Glue
267
Part6.Color = Color3.new(0.0156863, 0.686275, 0.92549)
268
Part6.Position = Vector3.new(-24, 1.00001299, 91)
269
Part6.Color = Color3.new(0.0156863, 0.686275, 0.92549)
270
Part7.Name = "Slimey"
271
Part7.Parent = Model0
272
Part7.BrickColor = BrickColor.new("Cyan")
273
Part7.Anchored = true
274
Part7.Locked = true
275
Part7.FormFactor = Enum.FormFactor.Symmetric
276
Part7.Size = Vector3.new(2, 2, 2)
277
Part7.CFrame = CFrame.new(-26, 1.00001299, 89, 1, 0, 0, 0, 1, 0, 0, 0, 1)
278
Part7.BackSurface = Enum.SurfaceType.Glue
279
Part7.BottomSurface = Enum.SurfaceType.Glue
280
Part7.FrontSurface = Enum.SurfaceType.Glue
281
Part7.LeftSurface = Enum.SurfaceType.Glue
282
Part7.RightSurface = Enum.SurfaceType.Glue
283
Part7.TopSurface = Enum.SurfaceType.Glue
284
Part7.Color = Color3.new(0.0156863, 0.686275, 0.92549)
285-
part.Size = Vector3.new(1,1,1)
285+
Part7.Position = Vector3.new(-26, 1.00001299, 89)
286
Part7.Color = Color3.new(0.0156863, 0.686275, 0.92549)
287
Part8.Name = "Slimey"
288
Part8.Parent = Model0
289
Part8.BrickColor = BrickColor.new("Cyan")
290
Part8.Anchored = true
291
Part8.Locked = true
292
Part8.FormFactor = Enum.FormFactor.Symmetric
293
Part8.Size = Vector3.new(2, 2, 2)
294
Part8.CFrame = CFrame.new(-26, 3.00001407, 89, 1, 0, 0, 0, 1, 0, 0, 0, 1)
295
Part8.BackSurface = Enum.SurfaceType.Glue
296
Part8.BottomSurface = Enum.SurfaceType.Glue
297
Part8.FrontSurface = Enum.SurfaceType.Glue
298
Part8.LeftSurface = Enum.SurfaceType.Glue
299
Part8.RightSurface = Enum.SurfaceType.Glue
300
Part8.TopSurface = Enum.SurfaceType.Glue
301
Part8.Color = Color3.new(0.0156863, 0.686275, 0.92549)
302
Part8.Position = Vector3.new(-26, 3.00001407, 89)
303
Part8.Color = Color3.new(0.0156863, 0.686275, 0.92549)
304
Part9.Name = "Slimey"
305
Part9.Parent = Model0
306
Part9.BrickColor = BrickColor.new("Cyan")
307
Part9.Anchored = true
308
Part9.Locked = true
309
Part9.FormFactor = Enum.FormFactor.Symmetric
310
Part9.Size = Vector3.new(2, 2, 2)
311
Part9.CFrame = CFrame.new(-24, 3.00001407, 89, 1, 0, 0, 0, 1, 0, 0, 0, 1)
312
Part9.BackSurface = Enum.SurfaceType.Glue
313
Part9.BottomSurface = Enum.SurfaceType.Glue
314
Part9.FrontSurface = Enum.SurfaceType.Glue
315
Part9.LeftSurface = Enum.SurfaceType.Glue
316
Part9.RightSurface = Enum.SurfaceType.Glue
317
Part9.TopSurface = Enum.SurfaceType.Glue
318
Part9.Color = Color3.new(0.0156863, 0.686275, 0.92549)
319
Part9.Position = Vector3.new(-24, 3.00001407, 89)
320
Part9.Color = Color3.new(0.0156863, 0.686275, 0.92549)
321
Part10.Name = "Slimey"
322
Part10.Parent = Model0
323
Part10.BrickColor = BrickColor.new("Cyan")
324
Part10.Anchored = true
325
Part10.Locked = true
326
Part10.FormFactor = Enum.FormFactor.Symmetric
327
Part10.Size = Vector3.new(2, 2, 2)
328
Part10.CFrame = CFrame.new(-26, 1.00001299, 91, 1, 0, 0, 0, 1, 0, 0, 0, 1)
329
Part10.BackSurface = Enum.SurfaceType.Glue
330
Part10.BottomSurface = Enum.SurfaceType.Glue
331
Part10.FrontSurface = Enum.SurfaceType.Glue
332
Part10.LeftSurface = Enum.SurfaceType.Glue
333
Part10.RightSurface = Enum.SurfaceType.Glue
334
Part10.TopSurface = Enum.SurfaceType.Glue
335
Part10.Color = Color3.new(0.0156863, 0.686275, 0.92549)
336
Part10.Position = Vector3.new(-26, 1.00001299, 91)
337
Part10.Color = Color3.new(0.0156863, 0.686275, 0.92549)
338
Part11.Name = "Slimey"
339
Part11.Parent = Model0
340
Part11.BrickColor = BrickColor.new("Cyan")
341
Part11.Anchored = true
342
Part11.Locked = true
343
Part11.FormFactor = Enum.FormFactor.Symmetric
344
Part11.Size = Vector3.new(2, 2, 2)
345
Part11.CFrame = CFrame.new(-24, 3.00001407, 91, 1, 0, 0, 0, 1, 0, 0, 0, 1)
346
Part11.BackSurface = Enum.SurfaceType.Glue
347
Part11.BottomSurface = Enum.SurfaceType.Glue
348
Part11.FrontSurface = Enum.SurfaceType.Glue
349
Part11.LeftSurface = Enum.SurfaceType.Glue
350
Part11.RightSurface = Enum.SurfaceType.Glue
351
Part11.TopSurface = Enum.SurfaceType.Glue
352
Part11.Color = Color3.new(0.0156863, 0.686275, 0.92549)
353
Part11.Position = Vector3.new(-24, 3.00001407, 91)
354
Part11.Color = Color3.new(0.0156863, 0.686275, 0.92549)
355
for i,v in pairs(mas:GetChildren()) do
356
	v.Parent = workspace
357
	pcall(function() v:MakeJoints() end)
358
end
359
mas:Destroy()
360
for i,v in pairs(cors) do
361
	spawn(function()
362
		pcall(v)
363
	end)
364
end