Advertisement
End_Wolf

Untitled

Jun 19th, 2018
186
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. MeshPart0 = Instance.new("MeshPart")
  20. BodyPosition1 = Instance.new("BodyPosition")
  21. Script2 = Instance.new("Script")
  22. NumberValue3 = Instance.new("NumberValue")
  23. Script4 = Instance.new("Script")
  24. Script5 = Instance.new("Script")
  25. SpecialMesh6 = Instance.new("SpecialMesh")
  26. BindableEvent7 = Instance.new("BindableEvent")
  27. Sound8 = Instance.new("Sound")
  28. Sound9 = Instance.new("Sound")
  29. Script10 = Instance.new("Script")
  30. BodyGyro11 = Instance.new("BodyGyro")
  31. MeshPart0.Name = "BlueShell"
  32. MeshPart0.Parent = mas
  33. MeshPart0.CFrame = CFrame.new(60.3269997, 2.5, -7.68099976, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  34. MeshPart0.Position = Vector3.new(60.3269997, 2.5, -7.68099976)
  35. MeshPart0.Size = Vector3.new(5.34600019, 5, 5.36199999)
  36. MeshPart0.TextureID = "rbxassetid://813414075"
  37. BodyPosition1.Parent = MeshPart0
  38. BodyPosition1.Position = Vector3.new(-264.600006, 215.598999, 330.799988)
  39. BodyPosition1.P = 20000
  40. BodyPosition1.MaxForce = Vector3.new(400000000, 0, 400000000)
  41. BodyPosition1.maxForce = Vector3.new(400000000, 0, 400000000)
  42. BodyPosition1.position = Vector3.new(-264.600006, 215.598999, 330.799988)
  43. Script2.Name = "FindTarget"
  44. Script2.Parent = MeshPart0
  45. table.insert(cors,sandbox(Script2,function()
  46. local part = script.Parent
  47. mode = 1
  48. active = false
  49. function moveTo(target)
  50. if mode == 1 then
  51. part.BodyPosition.position = target.Position + Vector3.new(0, script.Parent.AltDifference.Value, 0)
  52. elseif mode == 2 then
  53. if active == false then
  54. active = true
  55. for i = 1, 3 do
  56. script.Parent.BodyPosition.Position = target.Position + Vector3.new(0, script.Parent.AltDifference.Value, 24)
  57. wait(0.125)
  58. script.Parent.BodyPosition.Position = target.Position + Vector3.new(24, script.Parent.AltDifference.Value, 0)
  59. wait(0.125)
  60. script.Parent.BodyPosition.Position = target.Position + Vector3.new(0, script.Parent.AltDifference.Value, -24)
  61. wait(0.125)
  62. script.Parent.BodyPosition.Position = target.Position + Vector3.new(-24, script.Parent.AltDifference.Value, 0)
  63. wait(0.125)
  64. end
  65. part.BodyPosition.position = target.Position + Vector3.new(0, script.Parent.AltDifference.Value, 0)
  66. for i = 1, 10 do
  67. script.Parent.BodyGyro.CFrame = CFrame.Angles(math.rad(-45), math.rad(-180), math.rad(180))
  68. part.BodyPosition.position = target.Position + Vector3.new(0, script.Parent.AltDifference.Value, 0)
  69. wait(0.05)
  70. end
  71. script.Parent.BodyGyro.CFrame = CFrame.Angles(math.rad(-45), math.rad(0), math.rad(0))
  72. wait(0.5)
  73. script.Parent.GoToTarget.Disabled = false
  74. script.Parent.AltDifference.Value = -36
  75. part.BodyPosition.position = target.Position + Vector3.new(0, script.Parent.AltDifference.Value, 0)
  76. end
  77. end
  78. end
  79.  
  80. function findNearestTorso(pos)
  81. local nearest = {
  82. torso = nil,
  83. distance = 100000
  84. }
  85.  
  86. for _, object in ipairs(game.Workspace:GetChildren()) do
  87. if object:isA("Model") and object ~= script.Parent then
  88. local torso = object:findFirstChild("Torso")
  89. local human = object:findFirstChild("Humanoid")
  90. if torso and human and human.Health > 0 then
  91. local this = {
  92. torso = torso,
  93. distance = (torso.Position - pos).magnitude
  94. }
  95. if this.distance < nearest.distance then
  96. nearest = this
  97. end
  98. if this.distance < 50 then
  99. script.Parent.BodyPosition.MaxForce = Vector3.new(400000000, 400000000, 400000000)
  100. end
  101. if this.distance < 10 then
  102. mode = 2
  103. end
  104. end
  105. end
  106. end
  107. return nearest.torso, nearest.distance
  108. end
  109.  
  110. while true do
  111. local torso = findNearestTorso(part.Position)
  112. if torso ~= nil then
  113. moveTo(torso)
  114. end
  115. wait()
  116. end
  117. end))
  118. NumberValue3.Name = "AltDifference"
  119. NumberValue3.Parent = MeshPart0
  120. NumberValue3.Value = 9
  121. Script4.Name = "Damage"
  122. Script4.Parent = MeshPart0
  123. table.insert(cors,sandbox(Script4,function()
  124. local damage = 75
  125. debris = game:GetService("Debris")
  126. function SplashDamage(r, p)
  127. local explosion = Instance.new('Explosion')
  128. explosion.BlastPressure = p -- Completely safe explosion
  129. explosion.BlastRadius = r
  130. explosion.ExplosionType = Enum.ExplosionType.NoCraters
  131. explosion.Position = script.Parent.Position
  132. explosion.Parent = game.Workspace
  133. local e = Instance.new("Part")
  134. e.Parent = workspace
  135. e.BrickColor = BrickColor.new("Dark blue")
  136. e.Anchored = true
  137. e.CanCollide = false
  138. e.Size = Vector3.new(1, 1, 1)
  139. e.Position = script.Parent.Position
  140. explosion.Hit:connect(function(part)
  141. local humanoid = part.Parent:FindFirstChild("Humanoid")
  142. if humanoid then
  143. if humanoid.Health > 0 and part.Parent:FindFirstChild("ForceField") == nil and humanoid:FindFirstChild("damaged") == nil then
  144. local d = script.damaged:Clone()
  145. d.Parent = humanoid
  146. debris:AddItem(d, 2)
  147. humanoid.Health = humanoid.Health - damage
  148. part.Parent:FindFirstChild("Torso").Velocity = Vector3.new(0, 200, 0)
  149. humanoid.Sit = true
  150. end
  151. end
  152. end)
  153. script.Mesh:Clone().Parent = e
  154. local s = script.Vanish:Clone()
  155. s.Parent = e
  156. s.Disabled = false
  157. debris:AddItem(script.Parent, 0.1)
  158. end
  159.  
  160. function Explode(part)
  161. if part.Parent:FindFirstChild("Humanoid") then
  162. SplashDamage(5,0)
  163. end
  164. end
  165. script.Parent.Touched:connect(Explode)
  166. end))
  167. Script5.Name = "Vanish"
  168. Script5.Parent = Script4
  169. table.insert(cors,sandbox(Script5,function()
  170. for i = 1, 20 do
  171. script.Parent.Transparency = script.Parent.Transparency + 0.05
  172. wait(0.05)
  173. end
  174. script.Parent:Destroy()
  175. end))
  176. Script5.Disabled = true
  177. SpecialMesh6.Parent = Script4
  178. SpecialMesh6.Scale = Vector3.new(150, 150, 150)
  179. SpecialMesh6.MeshType = Enum.MeshType.Sphere
  180. BindableEvent7.Name = "damaged"
  181. BindableEvent7.Parent = Script4
  182. Sound8.Name = "Move"
  183. Sound8.Parent = MeshPart0
  184. Sound8.Looped = true
  185. Sound8.Playing = true
  186. Sound8.SoundId = "rbxassetid://785539625"
  187. Sound8.Volume = 1
  188. Sound9.Name = "Explosion"
  189. Sound9.Parent = MeshPart0
  190. Sound9.Looped = true
  191. Sound9.PlayOnRemove = true
  192. Sound9.SoundId = "rbxassetid://847757071"
  193. Sound9.Volume = 1
  194. Script10.Name = "GoToTarget"
  195. Script10.Parent = MeshPart0
  196. table.insert(cors,sandbox(Script10,function()
  197. local part = script.Parent
  198.  
  199. function moveTo(target)
  200. part.BodyPosition.position = target.Position
  201. end
  202.  
  203. function findNearestTorso(pos)
  204. local nearest = {
  205. torso = nil,
  206. distance = 10000
  207. }
  208.  
  209. for _, object in ipairs(game.Workspace:GetChildren()) do
  210. if object:isA("Model") and object ~= script.Parent then
  211. local torso = object:findFirstChild("Torso")
  212. local human = object:findFirstChild("Humanoid")
  213. if torso and human and human.Health > 0 then
  214. local this = {
  215. torso = torso,
  216. distance = (torso.Position - pos).magnitude
  217. }
  218. if this.distance < nearest.distance then
  219. nearest = this
  220. end
  221. end
  222. end
  223. end
  224. return nearest.torso, nearest.distance
  225. end
  226.  
  227. while true do
  228. local torso = findNearestTorso(part.Position)
  229. if torso ~= nil then
  230. moveTo(torso)
  231. end
  232. wait()
  233. end
  234. end))
  235. Script10.Disabled = true
  236. BodyGyro11.Parent = MeshPart0
  237. BodyGyro11.MaxTorque = Vector3.new(9.99999994e+32, 9.99999994e+32, 9.99999994e+32)
  238. BodyGyro11.P = 6000
  239. BodyGyro11.maxTorque = Vector3.new(9.99999994e+32, 9.99999994e+32, 9.99999994e+32)
  240. for i,v in pairs(mas:GetChildren()) do
  241. v.Parent = workspace
  242. pcall(function() v:MakeJoints() end)
  243. end
  244. mas:Destroy()
  245. for i,v in pairs(cors) do
  246. spawn(function()
  247. pcall(v)
  248. end)
  249. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement