Advertisement
Nutgear

nuke 2.0

Nov 13th, 2020
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.10 KB | None | 0 0
  1.  
  2. local MEGATONS = 20
  3. local nukecolor = "Bright yellow"
  4. local fireballcolor = "Bright yellow"
  5. local nuked = false
  6.  
  7. script.Parent = workspace
  8. local pos = owner.Character.Head.Position
  9.  
  10.  
  11. local radius = 2048/(100/MEGATONS)
  12.  
  13. if radius <= 61.45 then
  14. fireballcolor = "Institutional white"
  15. end
  16.  
  17. local rumbling = Instance.new("Sound",owner.Character.Head)
  18. local mainexplode = Instance.new("Sound",owner.Character.Head)
  19.  
  20. rumbling.SoundId = "rbxassetid://923073285"
  21. mainexplode.SoundId = "rbxassetid://5174255131"
  22.  
  23. rumbling.Volume = 10
  24. rumbling.MaxDistance = 38000
  25. mainexplode.Volume = 10
  26. mainexplode.MaxDistance = 10000
  27.  
  28. function nuke()
  29. if nuked == false then
  30. --local sky = script.Sky:Clone()
  31. -- pos.CanCollide = false
  32. -- script.Parent.Transparency = 1
  33. nuked = true
  34. local incineration = Instance.new("Explosion",workspace)
  35. incineration.Visible = false
  36. incineration.Position = pos
  37. incineration.BlastRadius = radius*1.25
  38. incineration.Hit:connect(function(hit,float)
  39. if float > 0 then
  40. hit.Size = Vector3.new(hit.Size.X / 10,hit.Size.Y / 10,hit.Size.Z / 10)
  41. hit.Material = "CorrodedMetal"
  42. hit.Anchored = false
  43. hit.Velocity = Vector3.new(0,0,0)
  44.  
  45. hit.Touched:connect(function(huma)
  46. local h = huma.Parent:FindFirstChildOfClass("Humanoid")
  47. if h ~= nil then
  48. huma:BreakJoints()
  49. huma.BrickColor = BrickColor.Red()
  50. end
  51. end)
  52.  
  53. local fire = Instance.new("Fire",hit)
  54. fire.Size = hit.Size.X
  55. fire.Heat = 0
  56. wait(10)
  57. fire.Enabled = false
  58. fire:Destroy()
  59. end
  60. end)
  61. rumbling:Play()
  62. mainexplode:Play()
  63. -- sky.Parent = game.Lighting
  64. game.Lighting.Brightness = 5000
  65. wait(0.05)
  66. game.Lighting.Brightness = 500
  67. wait(0.05)
  68. game.Lighting.Brightness = 50
  69. wait(0.05)
  70. game.Lighting.Brightness = 25
  71. wait(0.05)
  72. game.Lighting.Brightness = 12
  73. wait(0.05)
  74. game.Lighting.Brightness = 1
  75. local cloud = Instance.new("Model",workspace)
  76. cloud.Name = "NUCLEARBLAST"
  77. local cloudbody = Instance.new("Part",cloud)
  78. cloudbody.Name = "CloudBody"
  79. cloudbody.Anchored = true
  80. cloudbody.CanCollide = false
  81. cloudbody.Locked = true
  82. if radius > 299 then
  83. cloudbody.BrickColor = BrickColor.new(nukecolor)
  84. end
  85. cloudbody.Position = pos
  86. local mesh1 = Instance.new("FileMesh",cloudbody)
  87. mesh1.MeshId = "http://www.roblox.com/asset/?id=1095708"
  88. mesh1.Scale = Vector3.new(radius / 10, radius, radius / 10)
  89. local cloudhead = Instance.new("Part",cloud)
  90. cloudhead.Name = "CloudHead"
  91. cloudhead.Anchored = true
  92. if radius > 299 then
  93. cloudhead.BrickColor = BrickColor.new(nukecolor)
  94. end
  95. cloudhead.Locked = true
  96. cloudhead.Locked = true
  97. cloudhead.Position = Vector3.new(pos.X, mesh1.Scale.Y / 3, pos.Z)
  98. local mesh2 = Instance.new("FileMesh",cloudhead)
  99. mesh2.MeshId = "http://www.roblox.com/asset/?id=1095708"
  100. mesh2.Scale = Vector3.new(450*(radius/1000), 225*(radius/1000), 650*(radius/1000))
  101. local fireball = Instance.new("Part",cloud)
  102. fireball.CanCollide = false
  103. -- fireball.Anchored = true
  104. fireball.Name = "Fireball"
  105. fireball.Locked = true
  106. fireball.BrickColor = BrickColor.new(fireballcolor)
  107. fireball.Material = "Neon"
  108. fireball.Transparency = 0.5
  109. fireball.Position = pos
  110. fireball.Shape = 0
  111. fireball.Size = Vector3.new(radius/20,radius/20,radius/20)
  112.  
  113. fireball.Touched:connect(function(hit)
  114. if not hit.Anchored then
  115. -- hit.BrickColor = BrickColor.new("Black")
  116. hit.Velocity = CFrame.new(hit.Position,fireball.Position):vectorToWorldSpace(Vector3.new(math.random(-500,500),2,500))
  117. -- hit.Velocity = hit.Velocity + Vector3.new(50,50,50)
  118. end
  119.  
  120. if not hit.Locked then
  121. hit.Material = "CorrodedMetal"
  122. hit.Anchored = false
  123. hit.Touched:connect(function(huma)
  124. local h = huma.Parent:FindFirstChildOfClass("Humanoid")
  125. if h ~= nil then
  126. huma:BreakJoints()
  127. huma.BrickColor = BrickColor.Red()
  128. end
  129. end)
  130. end
  131. local h = hit.Parent:FindFirstChild("Humanoid")
  132. if h~=nil then
  133. h.Sit = true
  134. h:TakeDamage(math.random(1,100))
  135. else
  136. hit:BreakJoints()
  137. end
  138. end)
  139. local fbCframe = fireball.CFrame
  140. local orCFrame = fbCframe
  141. for i = 1,radius/5 do
  142. fireball.CFrame = orCFrame
  143. fireball.Velocity = Vector3.new(0,0,0)
  144. fireball.Size = fireball.Size + Vector3.new(5,5,5)
  145. fireball.Transparency = i/(radius/5)
  146. mesh2.VertexColor = mesh2.VertexColor - Vector3.new(0.01,0.01,0.01)
  147. mesh1.VertexColor = mesh1.VertexColor - Vector3.new(0.01,0.01,0.01)
  148. mesh1.Scale = mesh1.Scale + Vector3.new(0.5,0.375,0.5)
  149. mesh2.Scale = mesh2.Scale + Vector3.new(0.5,0.375,0.5)
  150.  
  151. wait()
  152. end
  153. fireball:Destroy()
  154. --sky:Destroy()
  155. cloudbody.BrickColor = BrickColor.Gray()
  156. cloudhead.BrickColor = BrickColor.Gray()
  157. for i = 1,1000 do
  158. cloudhead.Transparency = i/1000
  159. cloudbody.Transparency = i/1000
  160. mesh1.Scale = mesh1.Scale + Vector3.new(0.5,0,0.5)
  161. mesh2.Scale = mesh2.Scale + Vector3.new(1.5,0.25,1.5)
  162. wait(0.01)
  163. end
  164.  
  165. end
  166. end
  167.  
  168. nuke()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement