Advertisement
Rafie_ArsyadYT

Roblox - Placable Nuke Script

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