Advertisement
firebudgy

Untitled

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