Advertisement
firebudgy

Untitled

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