rahuliscool

Nuke

Dec 25th, 2017
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.11 KB | None | 0 0
  1. for i,v in pairs (game.Workspace:GetChildren()) do
  2. if v.Name == "Nuke" then
  3. v:Destroy()
  4. end
  5. end
  6. wait(1)
  7. local Tool = Instance.new("HopperBin", game.Players.LocalPlayer.Backpack)
  8. Tool.Name = "Detonater"
  9. local Mouse = game.Players.LocalPlayer:GetMouse()
  10.  
  11. local Place = Instance.new("HopperBin", game.Players.LocalPlayer.Backpack)
  12. Place.Name = "Placer"
  13. Nuke = Instance.new("Model")
  14. Nuke.Parent = game.Workspace
  15. Nuke.Name = "Nuke"
  16.  
  17. x5 = 1
  18. Mouse.Button1Down:connect(function()
  19. if x5 == 1 then
  20. if Place.Active == true then
  21. local name = game.Players.LocalPlayer.Name
  22. local Part1 = Instance.new("Part")
  23. Part1.Name = "Part"
  24. Part1.Parent = Nuke
  25. Part1.Size = Vector3.new(12,1,6)
  26. Part1.Position = Mouse.Hit.p
  27. Part1.BottomSurface = "Smooth"
  28. Part1.TopSurface = "Smooth"
  29. Part1.Material = "Metal"
  30. Part1.BrickColor = BrickColor.new("Really black")
  31. Part1.Anchored = true
  32. local x1 = game.Workspace.Nuke.Part.Position.X
  33. local y1 = game.Workspace.Nuke.Part.Position.Y
  34. local z1 = game.Workspace.Nuke.Part.Position.Z
  35. local Part2 = Instance.new("Part")
  36. Part2.Name = "Detonate"
  37. Part2.Parent = Nuke
  38. Part2.Size = Vector3.new(10, 5, 5)
  39. Part2.Position = Vector3.new(x1,y1+2,z1)
  40. Part2.BottomSurface = "Smooth"
  41. Part2.TopSurface = "Smooth"
  42. Part2.Material = "Metal"
  43. Part2.BrickColor = BrickColor.new("Really black")
  44. Part2.Anchored = true
  45. Part2.Shape = "Cylinder"
  46. x5 = x5+1
  47. local Decal = Instance.new("Decal")
  48. Decal.Texture = "http://www.roblox.com/asset/?id=14301975"
  49. Decal.Parent = Part2
  50. Decal.Face = "Back"
  51. end
  52. end
  53. end)
  54.  
  55.  
  56. Mouse.Button1Down:connect(function()
  57. if Tool.Active == true then
  58. local nuke = Instance.new("Part")
  59. nuke.Position = game.Workspace.Nuke.Detonate.Position
  60. nuke.Anchored = true
  61. nuke.Parent = game.Workspace
  62. local x, y, z = 5, 5, 5
  63. nuke.BrickColor = BrickColor.new ("New Yeller")
  64. nuke.Size = Vector3.new(x, y, z)
  65. nuke.CanCollide = false
  66. nuke.Name = "nuke"
  67. nuke.Shape = "Ball"
  68. nuke.Transparency = 0.3
  69. nuke.Material = "Neon"
  70. nuke.Locked = true
  71. game.Workspace.Nuke:Destroy()
  72. while x <= 100 do
  73. x, y, z = x+1, y+1, z+1
  74. nuke.Size = Vector3.new(x, y, z)
  75. local explosion = Instance.new("Explosion")
  76. explosion.BlastPressure = 1000000
  77. explosion.BlastRadius = x-15
  78. explosion.DestroyJointRadiusPercent = 1
  79. explosion.ExplosionType = "Craters"
  80. explosion.Parent = game.Workspace
  81. explosion.Position = game.Workspace.nuke.Position
  82. explosion.Hit:connect(function(Part, Distance)
  83. if Part.Name ~= "nuke" then
  84. Part.Anchored = false
  85. Part:BreakJoints()
  86. end
  87. end)
  88. wait(0.01)
  89. end
  90. while x <= 200 do
  91. x, y, z = x+3, y+3, z+3
  92. nuke.Size = Vector3.new(x, y, z)
  93. local explosion = Instance.new("Explosion")
  94. explosion.BlastPressure = 1000000
  95. explosion.BlastRadius = x+50
  96. explosion.DestroyJointRadiusPercent = 1
  97. explosion.ExplosionType = "Craters"
  98. explosion.Parent = game.Workspace
  99. explosion.Position = game.Workspace.nuke.Position
  100. explosion.Hit:connect(function(Part, Distance)
  101. if Part.Name ~= "nuke" then
  102. Part.Anchored = false
  103. Part:BreakJoints()
  104. end
  105. end)
  106. wait(0.01)
  107. end
  108. game.Workspace.nuke:Destroy()
  109. x5 = 1
  110. Nuke = Instance.new("Model")
  111. Nuke.Parent = game.Workspace
  112. Nuke.Name = "Nuke"
  113. Tool.Active = false
  114. end
  115. end)
Add Comment
Please, Sign In to add comment