Advertisement
firebudgy

Untitled

Jan 22nd, 2018
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.62 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. Script10 = Instance.new("Script")
  30. Model0.Name = "Fire Slime"
  31. Model0.Parent = mas
  32. Part1.Name = "Slimey"
  33. Part1.Parent = Model0
  34. Part1.BrickColor = BrickColor.new("Bright red")
  35. Part1.Anchored = true
  36. Part1.Locked = true
  37. Part1.FormFactor = Enum.FormFactor.Symmetric
  38. Part1.Size = Vector3.new(1, 1, 1)
  39. Part1.CFrame = CFrame.new(-29.5, 0.500001013, 90.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  40. Part1.BackSurface = Enum.SurfaceType.Glue
  41. Part1.BottomSurface = Enum.SurfaceType.Glue
  42. Part1.FrontSurface = Enum.SurfaceType.Glue
  43. Part1.LeftSurface = Enum.SurfaceType.Glue
  44. Part1.RightSurface = Enum.SurfaceType.Glue
  45. Part1.TopSurface = Enum.SurfaceType.Glue
  46. Part1.Color = Color3.new(0.768628, 0.156863, 0.109804)
  47. Part1.Position = Vector3.new(-29.5, 0.500001013, 90.5)
  48. Part1.Color = Color3.new(0.768628, 0.156863, 0.109804)
  49. Part2.Name = "Slimey"
  50. Part2.Parent = Model0
  51. Part2.BrickColor = BrickColor.new("Bright red")
  52. Part2.Anchored = true
  53. Part2.Locked = true
  54. Part2.FormFactor = Enum.FormFactor.Symmetric
  55. Part2.Size = Vector3.new(1, 1, 1)
  56. Part2.CFrame = CFrame.new(-29.5, 0.500001013, 91.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  57. Part2.BackSurface = Enum.SurfaceType.Glue
  58. Part2.BottomSurface = Enum.SurfaceType.Glue
  59. Part2.FrontSurface = Enum.SurfaceType.Glue
  60. Part2.LeftSurface = Enum.SurfaceType.Glue
  61. Part2.RightSurface = Enum.SurfaceType.Glue
  62. Part2.TopSurface = Enum.SurfaceType.Glue
  63. Part2.Color = Color3.new(0.768628, 0.156863, 0.109804)
  64. Part2.Position = Vector3.new(-29.5, 0.500001013, 91.5)
  65. Part2.Color = Color3.new(0.768628, 0.156863, 0.109804)
  66. Part3.Name = "Slimey"
  67. Part3.Parent = Model0
  68. Part3.BrickColor = BrickColor.new("Bright red")
  69. Part3.Anchored = true
  70. Part3.Locked = true
  71. Part3.FormFactor = Enum.FormFactor.Symmetric
  72. Part3.Size = Vector3.new(1, 1, 1)
  73. Part3.CFrame = CFrame.new(-29.5, 1.50000095, 90.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  74. Part3.BackSurface = Enum.SurfaceType.Glue
  75. Part3.BottomSurface = Enum.SurfaceType.Glue
  76. Part3.FrontSurface = Enum.SurfaceType.Glue
  77. Part3.LeftSurface = Enum.SurfaceType.Glue
  78. Part3.RightSurface = Enum.SurfaceType.Glue
  79. Part3.TopSurface = Enum.SurfaceType.Glue
  80. Part3.Color = Color3.new(0.768628, 0.156863, 0.109804)
  81. Part3.Position = Vector3.new(-29.5, 1.50000095, 90.5)
  82. Part3.Color = Color3.new(0.768628, 0.156863, 0.109804)
  83. Part4.Name = "Slimey"
  84. Part4.Parent = Model0
  85. Part4.BrickColor = BrickColor.new("Bright red")
  86. Part4.Anchored = true
  87. Part4.Locked = true
  88. Part4.FormFactor = Enum.FormFactor.Symmetric
  89. Part4.Size = Vector3.new(1, 1, 1)
  90. Part4.CFrame = CFrame.new(-29.5, 1.50000095, 91.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  91. Part4.BackSurface = Enum.SurfaceType.Glue
  92. Part4.BottomSurface = Enum.SurfaceType.Glue
  93. Part4.FrontSurface = Enum.SurfaceType.Glue
  94. Part4.LeftSurface = Enum.SurfaceType.Glue
  95. Part4.RightSurface = Enum.SurfaceType.Glue
  96. Part4.TopSurface = Enum.SurfaceType.Glue
  97. Part4.Color = Color3.new(0.768628, 0.156863, 0.109804)
  98. Part4.Position = Vector3.new(-29.5, 1.50000095, 91.5)
  99. Part4.Color = Color3.new(0.768628, 0.156863, 0.109804)
  100. Part5.Name = "Slimey"
  101. Part5.Parent = Model0
  102. Part5.BrickColor = BrickColor.new("Bright red")
  103. Part5.Anchored = true
  104. Part5.Locked = true
  105. Part5.FormFactor = Enum.FormFactor.Symmetric
  106. Part5.Size = Vector3.new(1, 1, 1)
  107. Part5.CFrame = CFrame.new(-28.5, 0.500001013, 91.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  108. Part5.BackSurface = Enum.SurfaceType.Glue
  109. Part5.BottomSurface = Enum.SurfaceType.Glue
  110. Part5.FrontSurface = Enum.SurfaceType.Glue
  111. Part5.LeftSurface = Enum.SurfaceType.Glue
  112. Part5.RightSurface = Enum.SurfaceType.Glue
  113. Part5.TopSurface = Enum.SurfaceType.Glue
  114. Part5.Color = Color3.new(0.768628, 0.156863, 0.109804)
  115. Part5.Position = Vector3.new(-28.5, 0.500001013, 91.5)
  116. Part5.Color = Color3.new(0.768628, 0.156863, 0.109804)
  117. Part6.Name = "Slimey"
  118. Part6.Parent = Model0
  119. Part6.BrickColor = BrickColor.new("Bright red")
  120. Part6.Anchored = true
  121. Part6.Locked = true
  122. Part6.FormFactor = Enum.FormFactor.Symmetric
  123. Part6.Size = Vector3.new(1, 1, 1)
  124. Part6.CFrame = CFrame.new(-28.5, 1.50000095, 91.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  125. Part6.BackSurface = Enum.SurfaceType.Glue
  126. Part6.BottomSurface = Enum.SurfaceType.Glue
  127. Part6.FrontSurface = Enum.SurfaceType.Glue
  128. Part6.LeftSurface = Enum.SurfaceType.Glue
  129. Part6.RightSurface = Enum.SurfaceType.Glue
  130. Part6.TopSurface = Enum.SurfaceType.Glue
  131. Part6.Color = Color3.new(0.768628, 0.156863, 0.109804)
  132. Part6.Position = Vector3.new(-28.5, 1.50000095, 91.5)
  133. Part6.Color = Color3.new(0.768628, 0.156863, 0.109804)
  134. Part7.Name = "Slimey"
  135. Part7.Parent = Model0
  136. Part7.BrickColor = BrickColor.new("Bright red")
  137. Part7.Anchored = true
  138. Part7.Locked = true
  139. Part7.FormFactor = Enum.FormFactor.Symmetric
  140. Part7.Size = Vector3.new(1, 1, 1)
  141. Part7.CFrame = CFrame.new(-28.5, 1.50000095, 90.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  142. Part7.BackSurface = Enum.SurfaceType.Glue
  143. Part7.BottomSurface = Enum.SurfaceType.Glue
  144. Part7.FrontSurface = Enum.SurfaceType.Glue
  145. Part7.LeftSurface = Enum.SurfaceType.Glue
  146. Part7.RightSurface = Enum.SurfaceType.Glue
  147. Part7.TopSurface = Enum.SurfaceType.Glue
  148. Part7.Color = Color3.new(0.768628, 0.156863, 0.109804)
  149. Part7.Position = Vector3.new(-28.5, 1.50000095, 90.5)
  150. Part7.Color = Color3.new(0.768628, 0.156863, 0.109804)
  151. Part8.Name = "Slimey"
  152. Part8.Parent = Model0
  153. Part8.BrickColor = BrickColor.new("Bright red")
  154. Part8.Anchored = true
  155. Part8.Locked = true
  156. Part8.FormFactor = Enum.FormFactor.Symmetric
  157. Part8.Size = Vector3.new(1, 1, 1)
  158. Part8.CFrame = CFrame.new(-28.5, 0.500001013, 90.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  159. Part8.BackSurface = Enum.SurfaceType.Glue
  160. Part8.BottomSurface = Enum.SurfaceType.Glue
  161. Part8.FrontSurface = Enum.SurfaceType.Glue
  162. Part8.LeftSurface = Enum.SurfaceType.Glue
  163. Part8.RightSurface = Enum.SurfaceType.Glue
  164. Part8.TopSurface = Enum.SurfaceType.Glue
  165. Part8.Color = Color3.new(0.768628, 0.156863, 0.109804)
  166. Part8.Position = Vector3.new(-28.5, 0.500001013, 90.5)
  167. Part8.Color = Color3.new(0.768628, 0.156863, 0.109804)
  168. Script9.Parent = Model0
  169. table.insert(cors,sandbox(Script9,function()
  170. --Particle Slime by timwood1104--
  171. -- Particle Slime is an interesting concept of Roblox enemy completely designed and built by
  172. -- timwood1104(aka, me). Originally inspired by an episode from Star Treck, I designed this using the
  173. -- .magnitude as a way to determine which slime particle is closest and farthest away from the target.
  174. -- To move closer to the target, the slime takes the particle farthest away and puts it in a random
  175. -- position closer to the target it is chasing. This causes the slime to move slowly, but surely towards it's
  176. -- prey. Obviously, the slime has no Humanoid, meaning that it can't be killed unless somebody
  177. -- constructs a specific tool to do so. Remember, I made this first! Enjoy :P
  178.  
  179. -------------
  180. spaces = 3 -- How many spaces it travels per move(1-3 is the best, preferably 2)
  181. speed = 6 -- How fast it goes, just put any number I guess :P
  182. grabslime = true -- Whether the slime will grab Slimeys from Workspace or not; it doesn't affect much
  183. ------------- though. Basically, if there is any bricks in Workspace named "Slimey", it will add them to itself.
  184.  
  185.  
  186. function findTarget() -- Ah, the findTarget() command. This command lets the slime find it's next victem.
  187. g = game.Workspace:getChildren()
  188. for i=1, #g do
  189. if g[i]:findFirstChild("Torso") ~= nil then
  190. if T == nil then
  191. T = g[i].Torso
  192. else
  193. if (g[i].Torso.Position - script.Parent.Slimey.Position).magnitude < (T.Position - script.Parent.Slimey.Position).magnitude then
  194. T = g[i].Torso
  195. end
  196. end
  197. end
  198. if grabslime == true and g[i].Name == "Slimey" and g[i].className == "Part" and g[i].Size == Vector3.new(1,1,1) then
  199. g[i].Parent = script.Parent
  200. end
  201. end
  202. end
  203.  
  204. function fade(b)-- This lets a brick disappear by "fading" into invisibility, but you can't see the effect very
  205. while b.Transparency < 1 do-- easily unless the slime is at a slow speed.
  206. b.Transparency = b.Transparency + 0.01*speed*#p/4
  207. wait(0.001)
  208. end
  209. b.Transparency = 1
  210. end
  211.  
  212. function unfade(b) -- This lets a brick appear by "fading" into visibility, but you can't see the effect very
  213. while b.Transparency > 0 do -- easily unless the slime is at a slow speed.
  214. b.Transparency = b.Transparency - 0.01*speed*#p/4
  215. wait(0.001)
  216. end
  217. b.Transparency = 0
  218. end
  219.  
  220. while true do
  221.  
  222. T = nil -- Erases previous target from memory.
  223. findTarget() -- Finds the new closest target!
  224.  
  225. r = math.random(1,20) --This little bit is supposed to allow the slime to take bigger "steps" every
  226. if r == 1 or r == 2 or r == 3 then -- once and a while, thus allowing it to travel through thick walls.
  227. space = spaces + 1
  228. elseif r == 4 or r == 5 then
  229. space = spaces + 2
  230. elseif r == 6 then
  231. space = spaces + 3
  232. else
  233. space = spaces
  234. end
  235.  
  236. if T ~= nil then --If target exists, then attack!
  237. p = script.Parent:getChildren() -- Makes a list of the slime's "Slimeys"
  238. for i=1, #p do
  239. if p[i].Name == "Slimey" then
  240. if prev == nil then
  241. prev = p[i]
  242. prev2 = p[i]
  243. end
  244. if (p[i].Position - T.Position).magnitude > (prev.Position - T.Position).magnitude then
  245. prev = p[i] -- This finds the Slimey closest to the target.
  246. end
  247. if (p[i].Position - T.Position).magnitude < (prev2.Position - T.Position).magnitude then
  248. prev2 = p[i] -- This finds the Slimey farthest away from the target.
  249. end
  250. end
  251. end
  252. fade(prev) --Make Slimey dissappear. VV- Make Slimey move closer to target.
  253. prev.Position = Vector3.new(prev2.Position.x+math.random(-space,space), prev2.Position.y-1, prev2.Position.z+math.random(-space,space))
  254. unfade(prev) -- Make Slimey appear again.
  255. end
  256. wait(0.01) -- And then wait... :P
  257. end -- Repeat!!
  258.  
  259.  
  260. end))
  261. Script10.Name = "Touch"
  262. Script10.Parent = Model0
  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. p.Anchored = true
  270. reflect(p)
  271. part = Instance.new("Part")
  272. part.Parent = game.Workspace
  273. part.Position = p.Position
  274. p:remove()
  275. part.Reflectance = 1
  276. part.formFactor = "Symmetric"
  277. part.TopSurface = "Glue"
  278. part.BottomSurface = "Glue"
  279. part.LeftSurface = "Glue"
  280. part.RightSurface = "Glue"
  281. part.BackSurface = "Glue"
  282. part.FrontSurface = "Glue"
  283. part.Locked = true
  284. part.Anchored = true
  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. end
  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. b.Reflectance = 1
  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. b.Reflectance = 0
  310. end
  311.  
  312. e = script.Parent:getChildren()
  313. for i=1, #e do
  314. if e[i].Name == "Slimey" then
  315. e[i].Touched:connect(onTouched)
  316. end
  317. end
  318.  
  319. end))
  320. for i,v in pairs(mas:GetChildren()) do
  321. v.Parent = workspace
  322. pcall(function() v:MakeJoints() end)
  323. end
  324. mas:Destroy()
  325. for i,v in pairs(cors) do
  326. spawn(function()
  327. pcall(v)
  328. end)
  329. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement