View difference between Paste ID: 1dr7E8Av and Gw1F0Ri8
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")
22
Part3 = Instance.new("Part")
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")
30
BoolValue11 = Instance.new("BoolValue")
31-
Model0.Name = "Roblotic Slime"
31+
Model0.Name = "Clumsy Slime"
32
Model0.Parent = mas
33
Script1.Parent = Model0
34
table.insert(cors,sandbox(Script1,function()
35-
--Particle Slime by timwood1104--
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
-- constructs a specific tool to do so. Remember, I made this first! Enjoy :P 
46
47
-------------
48
spaces = 2 -- How many spaces it travels per move(1-3 is the best, preferably 2)
49
speed = 6 -- How fast it goes, just put any number I guess :P
50
range = 75 -- How far the slime "sees"; if it can't see ya it won't get ya! lol
51-
function findTarget() -- Ah, the findTarget() command. This command lets the slime find it's next victem.
51+
combine = false -- 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
------------- though. Basically, if there is any bricks in Workspace named "Slimey", it will add them to itself.
55-
		if T == nil then
55+
56-
			T = g[i].Torso
56+
57-
		else
57+
function findTarget() -- Ah, the findTarget() command. This command lets the slime find it's next victim.
58-
			if (g[i].Torso.Position - script.Parent.Slimey.Position).magnitude < (T.Position - script.Parent.Slimey.Position).magnitude then
58+
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
	end
90-
	r = math.random(1,20) --This little bit is supposed to allow the slime to take bigger "steps" every
90+
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
for o=1, #h do
101
if h[o].Name == "Slimey" then 
102
h[o].Parent = script.Parent
103
end
104
end
105
k[i]:remove()
106
end
107
end
108
end
109
end
110
111
112
while true do
113
114
	T = nil -- Erases previous target from memory.
115
	findTarget() -- Finds the new closest target!
116
117
	if ooze == true then
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
	else
126
		space = spaces
127
	end
128
	end
129
130-
Part2.BrickColor = BrickColor.new("Dark stone grey")
130+
131-
Part2.Anchored = true
131+
132
			p = script.Parent:getChildren() -- Makes a list of the slime's "Slimeys"
133
			for i=1, #p do
134
			if p[i].Name == "Slimey" then
135-
Part2.CFrame = CFrame.new(-32.5, 0.50000602, -9.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
135+
136
					prev = p[i]
137
					prev2 = p[i]
138
				end
139
				if (p[i].Position - T.Position).magnitude > (prev.Position - T.Position).magnitude then
140
					prev = p[i]   -- This finds the Slimey closest to the target.
141
				end
142-
Part2.Color = Color3.new(0.388235, 0.372549, 0.384314)
142+
143-
Part2.Position = Vector3.new(-32.5, 0.50000602, -9.5)
143+
144-
Part2.Color = Color3.new(0.388235, 0.372549, 0.384314)
144+
145
			end
146
			end
147-
Part3.BrickColor = BrickColor.new("Dark stone grey")
147+
148-
Part3.Anchored = true
148+
149
				unfade(prev) -- Make Slimey appear again.
150
		end
151
	end
152-
Part3.CFrame = CFrame.new(-32.5, 0.50000602, -8.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
152+
153
end -- Repeat!!
154
155
156
end))
157
Part2.Name = "Slimey"
158
Part2.Parent = Model0
159-
Part3.Color = Color3.new(0.388235, 0.372549, 0.384314)
159+
Part2.BrickColor = BrickColor.new("Bright orange")
160-
Part3.Position = Vector3.new(-32.5, 0.50000602, -8.5)
160+
161-
Part3.Color = Color3.new(0.388235, 0.372549, 0.384314)
161+
162
Part2.Size = Vector3.new(1, 1, 1)
163
Part2.CFrame = CFrame.new(-30.5, 0.500012994, -19.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
164-
Part4.BrickColor = BrickColor.new("Dark stone grey")
164+
165-
Part4.Anchored = true
165+
166
Part2.FrontSurface = Enum.SurfaceType.Glue
167
Part2.LeftSurface = Enum.SurfaceType.Glue
168
Part2.RightSurface = Enum.SurfaceType.Glue
169-
Part4.CFrame = CFrame.new(-32.5, 1.50000501, -9.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
169+
170
Part2.Color = Color3.new(0.854902, 0.521569, 0.254902)
171
Part2.Position = Vector3.new(-30.5, 0.500012994, -19.5)
172
Part2.Color = Color3.new(0.854902, 0.521569, 0.254902)
173
Part3.Name = "Slimey"
174
Part3.Parent = Model0
175
Part3.BrickColor = BrickColor.new("Bright orange")
176-
Part4.Color = Color3.new(0.388235, 0.372549, 0.384314)
176+
177-
Part4.Position = Vector3.new(-32.5, 1.50000501, -9.5)
177+
178-
Part4.Color = Color3.new(0.388235, 0.372549, 0.384314)
178+
179
Part3.CFrame = CFrame.new(-30.5, 0.500012994, -18.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
180
Part3.BackSurface = Enum.SurfaceType.Glue
181-
Part5.BrickColor = BrickColor.new("Dark stone grey")
181+
182-
Part5.Anchored = true
182+
183
Part3.LeftSurface = Enum.SurfaceType.Glue
184
Part3.RightSurface = Enum.SurfaceType.Glue
185
Part3.TopSurface = Enum.SurfaceType.Glue
186-
Part5.CFrame = CFrame.new(-32.5, 1.50000501, -8.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
186+
Part3.Color = Color3.new(0.854902, 0.521569, 0.254902)
187
Part3.Position = Vector3.new(-30.5, 0.500012994, -18.5)
188
Part3.Color = Color3.new(0.854902, 0.521569, 0.254902)
189
Part4.Name = "Slimey"
190
Part4.Parent = Model0
191
Part4.BrickColor = BrickColor.new("Bright orange")
192
Part4.Locked = true
193-
Part5.Color = Color3.new(0.388235, 0.372549, 0.384314)
193+
194-
Part5.Position = Vector3.new(-32.5, 1.50000501, -8.5)
194+
195-
Part5.Color = Color3.new(0.388235, 0.372549, 0.384314)
195+
Part4.CFrame = CFrame.new(-30.5, 1.50001204, -19.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
196
Part4.BackSurface = Enum.SurfaceType.Glue
197
Part4.BottomSurface = Enum.SurfaceType.Glue
198-
Part6.BrickColor = BrickColor.new("Dark stone grey")
198+
199-
Part6.Anchored = true
199+
200
Part4.RightSurface = Enum.SurfaceType.Glue
201
Part4.TopSurface = Enum.SurfaceType.Glue
202
Part4.Color = Color3.new(0.854902, 0.521569, 0.254902)
203-
Part6.CFrame = CFrame.new(-31.5, 0.50000602, -8.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
203+
Part4.Position = Vector3.new(-30.5, 1.50001204, -19.5)
204
Part4.Color = Color3.new(0.854902, 0.521569, 0.254902)
205
Part5.Name = "Slimey"
206
Part5.Parent = Model0
207
Part5.BrickColor = BrickColor.new("Bright orange")
208
Part5.Locked = true
209
Part5.FormFactor = Enum.FormFactor.Symmetric
210-
Part6.Color = Color3.new(0.388235, 0.372549, 0.384314)
210+
211-
Part6.Position = Vector3.new(-31.5, 0.50000602, -8.5)
211+
Part5.CFrame = CFrame.new(-30.5, 1.50001204, -18.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
212-
Part6.Color = Color3.new(0.388235, 0.372549, 0.384314)
212+
213
Part5.BottomSurface = Enum.SurfaceType.Glue
214
Part5.FrontSurface = Enum.SurfaceType.Glue
215-
Part7.BrickColor = BrickColor.new("Dark stone grey")
215+
216-
Part7.Anchored = true
216+
217
Part5.TopSurface = Enum.SurfaceType.Glue
218
Part5.Color = Color3.new(0.854902, 0.521569, 0.254902)
219
Part5.Position = Vector3.new(-30.5, 1.50001204, -18.5)
220-
Part7.CFrame = CFrame.new(-31.5, 1.50000501, -8.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
220+
Part5.Color = Color3.new(0.854902, 0.521569, 0.254902)
221
Part6.Name = "Slimey"
222
Part6.Parent = Model0
223
Part6.BrickColor = BrickColor.new("Bright orange")
224
Part6.Locked = true
225
Part6.FormFactor = Enum.FormFactor.Symmetric
226
Part6.Size = Vector3.new(1, 1, 1)
227-
Part7.Color = Color3.new(0.388235, 0.372549, 0.384314)
227+
Part6.CFrame = CFrame.new(-29.5, 0.500012994, -18.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
228-
Part7.Position = Vector3.new(-31.5, 1.50000501, -8.5)
228+
229-
Part7.Color = Color3.new(0.388235, 0.372549, 0.384314)
229+
230
Part6.FrontSurface = Enum.SurfaceType.Glue
231
Part6.LeftSurface = Enum.SurfaceType.Glue
232-
Part8.BrickColor = BrickColor.new("Dark stone grey")
232+
233-
Part8.Anchored = true
233+
234
Part6.Color = Color3.new(0.854902, 0.521569, 0.254902)
235
Part6.Position = Vector3.new(-29.5, 0.500012994, -18.5)
236
Part6.Color = Color3.new(0.854902, 0.521569, 0.254902)
237-
Part8.CFrame = CFrame.new(-31.5, 1.50000501, -9.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
237+
238
Part7.Parent = Model0
239
Part7.BrickColor = BrickColor.new("Bright orange")
240
Part7.Locked = true
241
Part7.FormFactor = Enum.FormFactor.Symmetric
242
Part7.Size = Vector3.new(1, 1, 1)
243
Part7.CFrame = CFrame.new(-29.5, 1.50001204, -18.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
244-
Part8.Color = Color3.new(0.388235, 0.372549, 0.384314)
244+
245-
Part8.Position = Vector3.new(-31.5, 1.50000501, -9.5)
245+
246-
Part8.Color = Color3.new(0.388235, 0.372549, 0.384314)
246+
247
Part7.LeftSurface = Enum.SurfaceType.Glue
248
Part7.RightSurface = Enum.SurfaceType.Glue
249-
Part9.BrickColor = BrickColor.new("Dark stone grey")
249+
250-
Part9.Anchored = true
250+
Part7.Color = Color3.new(0.854902, 0.521569, 0.254902)
251
Part7.Position = Vector3.new(-29.5, 1.50001204, -18.5)
252
Part7.Color = Color3.new(0.854902, 0.521569, 0.254902)
253
Part8.Name = "Slimey"
254-
Part9.CFrame = CFrame.new(-31.5, 0.50000602, -9.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
254+
255
Part8.BrickColor = BrickColor.new("Bright orange")
256
Part8.Locked = true
257
Part8.FormFactor = Enum.FormFactor.Symmetric
258
Part8.Size = Vector3.new(1, 1, 1)
259
Part8.CFrame = CFrame.new(-29.5, 1.50001204, -19.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
260
Part8.BackSurface = Enum.SurfaceType.Glue
261-
Part9.Color = Color3.new(0.388235, 0.372549, 0.384314)
261+
262-
Part9.Position = Vector3.new(-31.5, 0.50000602, -9.5)
262+
263-
Part9.Color = Color3.new(0.388235, 0.372549, 0.384314)
263+
264
Part8.RightSurface = Enum.SurfaceType.Glue
265
Part8.TopSurface = Enum.SurfaceType.Glue
266
Part8.Color = Color3.new(0.854902, 0.521569, 0.254902)
267
Part8.Position = Vector3.new(-29.5, 1.50001204, -19.5)
268
Part8.Color = Color3.new(0.854902, 0.521569, 0.254902)
269
Part9.Name = "Slimey"
270
Part9.Parent = Model0
271
Part9.BrickColor = BrickColor.new("Bright orange")
272-
p.Anchored = true
272+
273
Part9.FormFactor = Enum.FormFactor.Symmetric
274
Part9.Size = Vector3.new(1, 1, 1)
275
Part9.CFrame = CFrame.new(-29.5, 0.500012994, -19.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
276
Part9.BackSurface = Enum.SurfaceType.Glue
277
Part9.BottomSurface = Enum.SurfaceType.Glue
278
Part9.FrontSurface = Enum.SurfaceType.Glue
279
Part9.LeftSurface = Enum.SurfaceType.Glue
280
Part9.RightSurface = Enum.SurfaceType.Glue
281
Part9.TopSurface = Enum.SurfaceType.Glue
282
Part9.Color = Color3.new(0.854902, 0.521569, 0.254902)
283
Part9.Position = Vector3.new(-29.5, 0.500012994, -19.5)
284
Part9.Color = Color3.new(0.854902, 0.521569, 0.254902)
285
Script10.Name = "Touch"
286
Script10.Parent = Model0
287
table.insert(cors,sandbox(Script10,function()
288
ting = false
289
function onTouched(p)
290
if ting == false then
291
ting = true
292
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
293
p.Anchored = false --OMG!!
294
reflect(p)
295
part = Instance.new("Part")
296
part.Parent = game.Workspace
297
part.Position = p.Position
298
p:remove()
299
part.Reflectance = 1
300
part.formFactor = "Symmetric"
301
part.TopSurface = "Glue"
302
part.BottomSurface = "Glue"
303
part.LeftSurface = "Glue"
304
part.RightSurface = "Glue"
305
part.BackSurface = "Glue"
306
part.FrontSurface = "Glue"
307
part.Locked = true
308
part.Anchored = true
309
part.Size = Vector3.new(1,1,1)
310
unreflect(part)
311
part.BrickColor = script.Parent.Slimey.BrickColor
312
part.Parent = script.Parent
313
part.Name = "Slimey"
314
part.Touched:connect(onTouched)
315
end
316
ting = false
317
end
318
end
319
320
function reflect(b)
321
while b.Reflectance < 1 do
322
b.Reflectance = b.Reflectance + 0.05
323
wait(0.01)
324
end
325
b.Reflectance = 1
326
end
327
328
function unreflect(b)
329
while b.Reflectance > 0 do
330
b.Reflectance = b.Reflectance - 0.05
331
wait(0.01)
332
end
333
b.Reflectance = 0
334
end
335
336
e = script.Parent:getChildren()
337
for i=1, #e do
338
if e[i].Name == "Slimey" then
339
e[i].Touched:connect(onTouched)
340
end
341
end
342
343
end))
344
BoolValue11.Name = "on"
345
BoolValue11.Parent = Model0
346
BoolValue11.Value = true
347
for i,v in pairs(mas:GetChildren()) do
348
	v.Parent = workspace
349
	pcall(function() v:MakeJoints() end)
350
end
351
mas:Destroy()
352
for i,v in pairs(cors) do
353
	spawn(function()
354
		pcall(v)
355
	end)
356
end