View difference between Paste ID: 8ZGUHHGc and v6Nar5fP
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-
Part1 = Instance.new("Part")
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-
Script9 = Instance.new("Script")
28+
Part9 = Instance.new("Part")
29-
BoolValue10 = Instance.new("BoolValue")
29+
Script10 = Instance.new("Script")
30-
Model0.Name = "Omega Slime"
30+
Model0.Name = "Sonic Slime"
31
Model0.Parent = mas
32-
Part1.Name = "TehSlime"
32+
Script1.Parent = Model0
33-
Part1.Parent = Model0
33+
table.insert(cors,sandbox(Script1,function()
34-
Part1.BrickColor = BrickColor.new("Bright yellow")
34+
--Particle Slime by timwood1104--
35-
Part1.Reflectance = 0.40000000596046
35+
-- Particle Slime is an interesting concept of Roblox enemy completely designed and built by 
36-
Part1.Transparency = 0.40000000596046
36+
-- timwood1104(aka, me). Originally inspired by an episode from Star Treck, I designed this using the 
37-
Part1.Anchored = true
37+
38-
Part1.FormFactor = Enum.FormFactor.Symmetric
38+
-- To move closer to the target, the slime takes the particle farthest away and puts it in a random 
39-
Part1.Size = Vector3.new(1, 1, 1)
39+
40-
Part1.CFrame = CFrame.new(-25.5, 0.500011981, -14.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
40+
-- prey. Obviously, the slime has no Humanoid, meaning that it can't be killed unless somebody 
41-
Part1.BackSurface = Enum.SurfaceType.Glue
41+
-- constructs a specific tool to do so. Remember, I made this first! Enjoy :P 
42-
Part1.BottomSurface = Enum.SurfaceType.Glue
42+
43-
Part1.FrontSurface = Enum.SurfaceType.Glue
43+
44-
Part1.LeftSurface = Enum.SurfaceType.Glue
44+
45-
Part1.RightSurface = Enum.SurfaceType.Glue
45+
speed = 30 -- How fast it goes, just put any number I guess :P
46-
Part1.TopSurface = Enum.SurfaceType.Glue
46+
grabslime = true -- Whether the slime will grab Slimeys from Workspace or not; it doesn't affect much 
47-
Part1.Color = Color3.new(0.960784, 0.803922, 0.188235)
47+
------------- though. Basically, if there is any bricks in Workspace named "Slimey", it will add them to itself.
48-
Part1.Position = Vector3.new(-25.5, 0.500011981, -14.5)
48+
49-
Part1.Color = Color3.new(0.960784, 0.803922, 0.188235)
49+
50-
Part2.Name = "TehSlime"
50+
function findTarget() -- Ah, the findTarget() command. This command lets the slime find it's next victem.
51
	g = game.Workspace:getChildren()
52-
Part2.BrickColor = BrickColor.new("Bright yellow")
52+
	for i=1, #g do
53-
Part2.Reflectance = 0.40000000596046
53+
	if g[i]:findFirstChild("Torso") ~= nil then
54-
Part2.Transparency = 0.40000000596046
54+
		if T == nil then
55
			T = g[i].Torso
56
		else
57
			if (g[i].Torso.Position - script.Parent.Slimey.Position).magnitude < (T.Position - script.Parent.Slimey.Position).magnitude then
58-
Part2.CFrame = CFrame.new(-25.5, 0.500011981, -13.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
58+
				T = g[i].Torso
59
			end
60
		end
61
	end
62
	if grabslime == true and g[i].Name == "Slimey" and g[i].className == "Part" and g[i].Size == Vector3.new(1,1,1) then
63
		g[i].Parent = script.Parent
64
	end
65-
Part2.Color = Color3.new(0.960784, 0.803922, 0.188235)
65+
	end
66-
Part2.Position = Vector3.new(-25.5, 0.500011981, -13.5)
66+
67-
Part2.Color = Color3.new(0.960784, 0.803922, 0.188235)
67+
68-
Part3.Name = "TehSlime"
68+
69
	while b.Transparency < 1 do-- easily unless the slime is at a slow speed.
70-
Part3.BrickColor = BrickColor.new("Bright yellow")
70+
		b.Transparency = b.Transparency + 0.01*speed*#p/4
71-
Part3.Reflectance = 0.40000000596046
71+
		wait(0.001)
72-
Part3.Transparency = 0.40000000596046
72+
	end
73
	b.Transparency = 1
74
end
75
76-
Part3.CFrame = CFrame.new(-25.5, 1.50001204, -14.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
76+
function unfade(b) -- This lets a brick appear by "fading" into visibility, but you can't see the effect very  
77
	while b.Transparency > 0 do -- easily unless the slime is at a slow speed.
78
		b.Transparency = b.Transparency - 0.01*speed*#p/4
79
		wait(0.001)
80
	end
81
	b.Transparency = 0
82
end
83-
Part3.Color = Color3.new(0.960784, 0.803922, 0.188235)
83+
84-
Part3.Position = Vector3.new(-25.5, 1.50001204, -14.5)
84+
85-
Part3.Color = Color3.new(0.960784, 0.803922, 0.188235)
85+
86-
Part4.Name = "TehSlime"
86+
	T = nil -- Erases previous target from memory.
87
	findTarget() -- Finds the new closest target!
88-
Part4.BrickColor = BrickColor.new("Bright yellow")
88+
89-
Part4.Reflectance = 0.40000000596046
89+
	r = math.random(1,20) --This little bit is supposed to allow the slime to take bigger "steps" every
90-
Part4.Transparency = 0.40000000596046
90+
	if r == 1 or r == 2 or r == 3 then -- once and a while, thus allowing it to travel through thick walls.
91
		space = spaces + 1
92
	elseif r == 4 or r == 5 then
93
		space = spaces + 2
94-
Part4.CFrame = CFrame.new(-25.5, 1.50001204, -13.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
94+
	elseif r == 6 then
95
		space = spaces + 3
96
	else
97
		space = spaces
98
	end
99
100
	if T ~= nil then --If target exists, then attack!		
101-
Part4.Color = Color3.new(0.960784, 0.803922, 0.188235)
101+
		p = script.Parent:getChildren() -- Makes a list of the slime's "Slimeys"
102-
Part4.Position = Vector3.new(-25.5, 1.50001204, -13.5)
102+
		for i=1, #p do
103-
Part4.Color = Color3.new(0.960784, 0.803922, 0.188235)
103+
		if p[i].Name == "Slimey" then
104-
Part5.Name = "TehSlime"
104+
			if prev == nil then
105
				prev = p[i]
106-
Part5.BrickColor = BrickColor.new("Bright yellow")
106+
				prev2 = p[i]
107-
Part5.Reflectance = 0.40000000596046
107+
108-
Part5.Transparency = 0.40000000596046
108+
			if (p[i].Position - T.Position).magnitude > (prev.Position - T.Position).magnitude then
109
				prev = p[i]   -- This finds the Slimey closest to the target.
110
			end
111
			if (p[i].Position - T.Position).magnitude < (prev2.Position - T.Position).magnitude then
112-
Part5.CFrame = CFrame.new(-24.5, 0.500011981, -13.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
112+
				prev2 = p[i] -- This finds the Slimey farthest away from the target.
113
			end
114
		end
115
		end
116
			fade(prev) --Make Slimey dissappear.     VV- Make Slimey move closer to target.
117
			prev.Position = Vector3.new(prev2.Position.x+math.random(-space,space), prev2.Position.y-1, prev2.Position.z+math.random(-space,space))
118
			unfade(prev) -- Make Slimey appear again.
119-
Part5.Color = Color3.new(0.960784, 0.803922, 0.188235)
119+
	end
120-
Part5.Position = Vector3.new(-24.5, 0.500011981, -13.5)
120+
	wait(0.01) -- And then wait... :P
121-
Part5.Color = Color3.new(0.960784, 0.803922, 0.188235)
121+
end -- Repeat!!
122-
Part6.Name = "TehSlime"
122+
123
124-
Part6.BrickColor = BrickColor.new("Bright yellow")
124+
125-
Part6.Reflectance = 0.40000000596046
125+
Part2.Name = "Slimey"
126-
Part6.Transparency = 0.40000000596046
126+
127
Part2.BrickColor = BrickColor.new("Navy blue")
128
Part2.Anchored = true
129
Part2.Locked = true
130-
Part6.CFrame = CFrame.new(-24.5, 1.50001204, -13.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
130+
131
Part2.Size = Vector3.new(1, 1, 1)
132
Part2.CFrame = CFrame.new(-26.5, 0.50001502, -11.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
133
Part2.BackSurface = Enum.SurfaceType.Glue
134
Part2.BottomSurface = Enum.SurfaceType.Glue
135
Part2.FrontSurface = Enum.SurfaceType.Glue
136
Part2.LeftSurface = Enum.SurfaceType.Glue
137-
Part6.Color = Color3.new(0.960784, 0.803922, 0.188235)
137+
138-
Part6.Position = Vector3.new(-24.5, 1.50001204, -13.5)
138+
139-
Part6.Color = Color3.new(0.960784, 0.803922, 0.188235)
139+
Part2.Color = Color3.new(0, 0.12549, 0.376471)
140-
Part7.Name = "TehSlime"
140+
Part2.Position = Vector3.new(-26.5, 0.50001502, -11.5)
141
Part2.Color = Color3.new(0, 0.12549, 0.376471)
142-
Part7.BrickColor = BrickColor.new("Bright yellow")
142+
Part3.Name = "Slimey"
143-
Part7.Reflectance = 0.40000000596046
143+
144-
Part7.Transparency = 0.40000000596046
144+
Part3.BrickColor = BrickColor.new("Navy blue")
145
Part3.Anchored = true
146
Part3.Locked = true
147
Part3.FormFactor = Enum.FormFactor.Symmetric
148-
Part7.CFrame = CFrame.new(-24.5, 1.50001204, -14.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
148+
149
Part3.CFrame = CFrame.new(-26.5, 0.50001502, -10.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
150
Part3.BackSurface = Enum.SurfaceType.Glue
151
Part3.BottomSurface = Enum.SurfaceType.Glue
152
Part3.FrontSurface = Enum.SurfaceType.Glue
153
Part3.LeftSurface = Enum.SurfaceType.Glue
154
Part3.RightSurface = Enum.SurfaceType.Glue
155-
Part7.Color = Color3.new(0.960784, 0.803922, 0.188235)
155+
156-
Part7.Position = Vector3.new(-24.5, 1.50001204, -14.5)
156+
Part3.Color = Color3.new(0, 0.12549, 0.376471)
157-
Part7.Color = Color3.new(0.960784, 0.803922, 0.188235)
157+
Part3.Position = Vector3.new(-26.5, 0.50001502, -10.5)
158-
Part8.Name = "TehSlime"
158+
Part3.Color = Color3.new(0, 0.12549, 0.376471)
159
Part4.Name = "Slimey"
160-
Part8.BrickColor = BrickColor.new("Bright yellow")
160+
161-
Part8.Reflectance = 0.40000000596046
161+
Part4.BrickColor = BrickColor.new("Navy blue")
162-
Part8.Transparency = 0.40000000596046
162+
163
Part4.Locked = true
164
Part4.FormFactor = Enum.FormFactor.Symmetric
165
Part4.Size = Vector3.new(1, 1, 1)
166-
Part8.CFrame = CFrame.new(-24.5, 0.500011981, -14.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
166+
Part4.CFrame = CFrame.new(-26.5, 1.50001395, -11.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
167
Part4.BackSurface = Enum.SurfaceType.Glue
168
Part4.BottomSurface = Enum.SurfaceType.Glue
169
Part4.FrontSurface = Enum.SurfaceType.Glue
170
Part4.LeftSurface = Enum.SurfaceType.Glue
171
Part4.RightSurface = Enum.SurfaceType.Glue
172
Part4.TopSurface = Enum.SurfaceType.Glue
173-
Part8.Color = Color3.new(0.960784, 0.803922, 0.188235)
173+
Part4.Color = Color3.new(0, 0.12549, 0.376471)
174-
Part8.Position = Vector3.new(-24.5, 0.500011981, -14.5)
174+
Part4.Position = Vector3.new(-26.5, 1.50001395, -11.5)
175-
Part8.Color = Color3.new(0.960784, 0.803922, 0.188235)
175+
Part4.Color = Color3.new(0, 0.12549, 0.376471)
176-
Script9.Parent = Model0
176+
Part5.Name = "Slimey"
177-
table.insert(cors,sandbox(Script9,function()
177+
178-
--Particle Slime V3 by timwood1104--
178+
Part5.BrickColor = BrickColor.new("Navy blue")
179
Part5.Anchored = true
180-
-- V3: Wow, it's been about 8 months since I created Particle Slime V1!! :D (May 28, 2010 right now)
180+
Part5.Locked = true
181-
-- Thank you everybody who has given me encouraging comments and feedback!
181+
182-
-- And to those who think they created it themselves or swear that their friends made it,
182+
183-
-- you can stop reading this and go away. lol
183+
Part5.CFrame = CFrame.new(-26.5, 1.50001395, -10.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
184
Part5.BackSurface = Enum.SurfaceType.Glue
185-
-- Anyways, V3 is pretty much the same as V2 except for two useless features have been
185+
186-
-- been removed: Grabslime and Combine.
186+
187-
-- Also, it has been changed a little bit to fit into one script for convenience. :)
187+
188-
-- And the script has been tidied up a little bit.
188+
189
Part5.TopSurface = Enum.SurfaceType.Glue
190-
-- And they slimeys are unlocked. :D
190+
Part5.Color = Color3.new(0, 0.12549, 0.376471)
191
Part5.Position = Vector3.new(-26.5, 1.50001395, -10.5)
192-
-- But that's about it. Haha, :P
192+
Part5.Color = Color3.new(0, 0.12549, 0.376471)
193
Part6.Name = "Slimey"
194
Part6.Parent = Model0
195-
-- Here is my original description of the particle slime:
195+
Part6.BrickColor = BrickColor.new("Navy blue")
196
Part6.Anchored = true
197-
-- "Particle Slime is an interesting concept of Roblox enemy completely designed and built by
197+
Part6.Locked = true
198-
-- timwood1104(aka, me). Originally inspired by an episode from Star Trek, I designed this using the
198+
199
Part6.Size = Vector3.new(1, 1, 1)
200-
-- To move closer to the target, the slime takes the particle farthest away and puts it in a random
200+
Part6.CFrame = CFrame.new(-25.5, 0.50001502, -10.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
201
Part6.BackSurface = Enum.SurfaceType.Glue
202-
-- prey. Obviously, the slime has no Humanoid, meaning that it can't be killed unless somebody
202+
203-
-- constructs a specific tool to do so. Remember, I made this first! Enjoy :P"
203+
204
Part6.LeftSurface = Enum.SurfaceType.Glue
205
Part6.RightSurface = Enum.SurfaceType.Glue
206
Part6.TopSurface = Enum.SurfaceType.Glue
207
Part6.Color = Color3.new(0, 0.12549, 0.376471)
208-
speed = 8 -- How fast it goes, just put any number I guess :P
208+
Part6.Position = Vector3.new(-25.5, 0.50001502, -10.5)
209-
range = 75 -- How far the slime "sees"; if it can't see ya it won't get ya! lol
209+
Part6.Color = Color3.new(0, 0.12549, 0.376471)
210-
ooze = true -- This is whether the slime will squeeze through really thick walls or not.
210+
Part7.Name = "Slimey"
211
Part7.Parent = Model0
212
Part7.BrickColor = BrickColor.new("Navy blue")
213
Part7.Anchored = true
214-
local partname = "TehSlime" -- Name of the "Slimeys". So you don't have to change it throughout the entire script. :P
214+
Part7.Locked = true
215-
local targetname = "Torso" -- Kinda obvious....... lol
215+
216-
local food = {"Head", "Torso", "Right Arm", "Left Arm", "Right Leg", "Left Arm", "zarm"} -- OM NOMS!!! :D
216+
217
Part7.CFrame = CFrame.new(-25.5, 1.50001395, -10.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
218
Part7.BackSurface = Enum.SurfaceType.Glue
219
Part7.BottomSurface = Enum.SurfaceType.Glue
220
Part7.FrontSurface = Enum.SurfaceType.Glue
221-
function findTarget() -- Ah, the findTarget() command. This command lets the slime find it's next victim.
221+
222-
g = game.Workspace:getChildren()
222+
223-
for i=1, #g do
223+
224-
if g[i]:findFirstChild(targetname) ~= nil then
224+
Part7.Color = Color3.new(0, 0.12549, 0.376471)
225-
if (g[i]:findFirstChild(targetname).Position - script.Parent:findFirstChild(partname).Position).magnitude < range then
225+
Part7.Position = Vector3.new(-25.5, 1.50001395, -10.5)
226-
if T == nil then
226+
Part7.Color = Color3.new(0, 0.12549, 0.376471)
227-
T = g[i]:findFirstChild(targetname)
227+
Part8.Name = "Slimey"
228-
else
228+
229-
if (g[i]:findFirstChild(targetname).Position - script.Parent:findFirstChild(partname).Position).magnitude < (T.Position - script.Parent:findFirstChild(partname).Position).magnitude then
229+
Part8.BrickColor = BrickColor.new("Navy blue")
230-
T = g[i]:findFirstChild(targetname)
230+
231
Part8.Locked = true
232
Part8.FormFactor = Enum.FormFactor.Symmetric
233
Part8.Size = Vector3.new(1, 1, 1)
234
Part8.CFrame = CFrame.new(-25.5, 1.50001395, -11.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
235
Part8.BackSurface = Enum.SurfaceType.Glue
236
Part8.BottomSurface = Enum.SurfaceType.Glue
237
Part8.FrontSurface = Enum.SurfaceType.Glue
238
Part8.LeftSurface = Enum.SurfaceType.Glue
239-
while b.Transparency < 1 do-- easily unless the slime is at a slow speed.
239+
240-
b.Transparency = b.Transparency + 0.01*speed*#p/4
240+
241-
wait()
241+
Part8.Color = Color3.new(0, 0.12549, 0.376471)
242
Part8.Position = Vector3.new(-25.5, 1.50001395, -11.5)
243-
b.Transparency = 1
243+
Part8.Color = Color3.new(0, 0.12549, 0.376471)
244
Part9.Name = "Slimey"
245
Part9.Parent = Model0
246-
local tran = script.Parent:findFirstChild(partname).Transparency
246+
Part9.BrickColor = BrickColor.new("Navy blue")
247-
function unfade(b) -- This lets a brick appear by "fading" into visibility, but you can't see the effect very
247+
Part9.Anchored = true
248-
while b.Transparency > 0 do -- easily unless the slime is at a slow speed.
248+
Part9.Locked = true
249-
b.Transparency = b.Transparency - 0.01*speed*#p/4
249+
Part9.FormFactor = Enum.FormFactor.Symmetric
250-
wait()
250+
Part9.Size = Vector3.new(1, 1, 1)
251
Part9.CFrame = CFrame.new(-25.5, 0.50001502, -11.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
252-
b.Transparency = tran
252+
Part9.BackSurface = Enum.SurfaceType.Glue
253
Part9.BottomSurface = Enum.SurfaceType.Glue
254
Part9.FrontSurface = Enum.SurfaceType.Glue
255
Part9.LeftSurface = Enum.SurfaceType.Glue
256
Part9.RightSurface = Enum.SurfaceType.Glue
257
Part9.TopSurface = Enum.SurfaceType.Glue
258
Part9.Color = Color3.new(0, 0.12549, 0.376471)
259
Part9.Position = Vector3.new(-25.5, 0.50001502, -11.5)
260
Part9.Color = Color3.new(0, 0.12549, 0.376471)
261
Script10.Name = "Touch"
262
Script10.Parent = Model0
263-
local refl = script.Parent:findFirstChild(partname).Reflectance
263+
table.insert(cors,sandbox(Script10,function()
264
ting = false
265
function onTouched(p)
266
if ting == false then
267
ting = true
268
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
269-
b.Reflectance = refl
269+
270
reflect(p)
271
part = Instance.new("Part")
272
part.Parent = game.Workspace
273-
function onTouched(p) -- This is for when it catches you. O_o
273+
274
p:remove()
275
part.Reflectance = 1
276-
chyeah = false
276+
part.formFactor = "Symmetric"
277-
for w=1, #food do
277+
part.TopSurface = "Glue"
278-
if p.Name == food[w] then
278+
part.BottomSurface = "Glue"
279-
chyeah = true
279+
part.LeftSurface = "Glue"
280
part.RightSurface = "Glue"
281
part.BackSurface = "Glue"
282-
if chyeah == true then
282+
part.FrontSurface = "Glue"
283
part.Locked = true
284
part.Anchored = true
285-
part = script.Parent:findFirstChild(partname):clone()
285+
part.Size = Vector3.new(1,1,1)
286
unreflect(part)
287
part.BrickColor = script.Parent.Slimey.BrickColor
288
part.Parent = script.Parent
289
part.Name = "Slimey"
290
part.Touched:connect(onTouched)
291
end
292
ting = false
293-
wait(0.5)
293+
294
end
295
296
function reflect(b)
297
while b.Reflectance < 1 do
298
b.Reflectance = b.Reflectance + 0.05
299
wait(0.01)
300
end
301-
if e[i].Name == partname then
301+
302
end
303
304
function unreflect(b)
305
while b.Reflectance > 0 do
306
b.Reflectance = b.Reflectance - 0.05
307
wait(0.01)
308
end
309-
T = nil -- Erases previous target from memory.
309+
b.Reflectance = 0
310-
findTarget() -- Finds the new closest target!
310+
311
312-
if ooze == true then
312+
313-
r = math.random(1,36) --This little bit is supposed to allow the slime to take bigger "steps" every
313+
314-
if r == 1 or r == 2 or r == 3 then -- once and a while, thus allowing it to travel through thick walls.
314+
if e[i].Name == "Slimey" then
315-
space = spaces + 1
315+
316-
elseif r == 4 or r == 5 then
316+
317-
space = spaces + 2
317+
318-
elseif r == 6 then
318+
319-
space = spaces + 3
319+
320-
else
320+
321-
space = spaces
321+
322
	pcall(function() v:MakeJoints() end)
323
end
324
mas:Destroy()
325-
if T ~= nil and script.Parent:findFirstChild("power") ~= nil then -- If target exists, then attack!
325+
326-
if script.Parent:findFirstChild("power").Value == true then -- (and if we're turned on...)
326+
327-
p = script.Parent:getChildren() -- Makes a list of the slime's "Slimeys"
327+
328-
for i=1, #p do
328+
329-
if p[i].Name == partname then
329+