Advertisement
Guest User

Nuke button ROBLOX

a guest
Apr 16th, 2018
1,373
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.45 KB | None | 0 0
  1. function sandbox(var,func)
  2. local env = getfenv(func)
  3. local newenv = setmetatable({},{
  4. __index = function(self,k)
  5. if k=="script" then
  6. return var
  7. else
  8. return env[k]
  9. end
  10. end,
  11. })
  12. setfenv(func,newenv)
  13. return func
  14. end
  15. cors = {}
  16. mas = Instance.new("Model",game:GetService("Lighting"))
  17. local chil = workspace:GetChildren()
  18. for i,v in pairs(chil) do
  19. if not (v==script or v:IsA("Camera") or v:IsA("Terrain") or game:GetService("Players"):GetPlayerFromCharacter(v)~=nil) then
  20. v:Destroy()
  21. end
  22. end
  23. Part0 = Instance.new("Part")
  24. Model1 = Instance.new("Model")
  25. Part2 = Instance.new("Part")
  26. CylinderMesh3 = Instance.new("CylinderMesh")
  27. Part4 = Instance.new("Part")
  28. CylinderMesh5 = Instance.new("CylinderMesh")
  29. Script6 = Instance.new("Script")
  30. Part0.Name = "Baseplate"
  31. Part0.Parent = mas
  32. Part0.BrickColor = BrickColor.new("Dark stone grey")
  33. Part0.Anchored = true
  34. Part0.Locked = true
  35. Part0.FormFactor = Enum.FormFactor.Symmetric
  36. Part0.Size = Vector3.new(512, 20, 512)
  37. Part0.CFrame = CFrame.new(0, -10, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  38. Part0.Color = Color3.new(0.388235, 0.372549, 0.384314)
  39. Part0.Position = Vector3.new(0, -10, 0)
  40. Part0.Color = Color3.new(0.388235, 0.372549, 0.384314)
  41. Model1.Name = "DO NOT PUSH"
  42. Model1.Parent = mas
  43. Part2.Parent = Model1
  44. Part2.Reflectance = 0.5
  45. Part2.Anchored = true
  46. Part2.Size = Vector3.new(5, 1.20000005, 5)
  47. Part2.CFrame = CFrame.new(-16.6799984, 0.600009322, 4.19997883, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  48. Part2.Position = Vector3.new(-16.6799984, 0.600009322, 4.19997883)
  49. CylinderMesh3.Parent = Part2
  50. Part4.Name = "Head"
  51. Part4.Parent = Model1
  52. Part4.BrickColor = BrickColor.new("Really red")
  53. Part4.Anchored = true
  54. Part4.Size = Vector3.new(5, 1.20000005, 5)
  55. Part4.CFrame = CFrame.new(-16.6799984, 1.79999101, 4.19997883, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  56. Part4.Color = Color3.new(1, 0, 0)
  57. Part4.Position = Vector3.new(-16.6799984, 1.79999101, 4.19997883)
  58. Part4.Color = Color3.new(1, 0, 0)
  59. CylinderMesh5.Parent = Part4
  60. CylinderMesh5.Scale = Vector3.new(0.75, 1, 0.75)
  61. CylinderMesh5.Scale = Vector3.new(0.75, 1, 0.75)
  62. Script6.Parent = Part4
  63. table.insert(cors,sandbox(Script6,function()
  64. --[[local ONOES = Instance.new("Sound")
  65. ONOES.SoundId = "d5609845694b62f45afd8da79aa190f7"
  66. ONOES.Volume = 1
  67. ONOES.Looped = false
  68. ONOES.archivable = false
  69. ONOES.Parent = workspace]]
  70.  
  71. --game:GetService("Debris").MaxItems = 500 -- Decrease if you have a laggy computer
  72. local s = Instance.new("Sound")
  73. s.Volume = 1
  74. sounds = {"rbxasset://sounds\\rocket shot.wav", "rbxasset://sounds\\collide.wav"}
  75. local workspace = game.Workspace
  76.  
  77. function check(object)
  78.  
  79. if object.className == "Model" and object:findFirstChild("Humanoid") == nil then
  80. for i, v in ipairs(object:getChildren()) do
  81. check(v)
  82. wait()
  83. end
  84. end
  85. if object:IsA("Part") then
  86. local soundclone = s:Clone()
  87. soundclone.SoundId = sounds[math.random(1, 2)]
  88. game:GetService("Debris"):AddItem(object, 300)
  89. soundclone.Pitch = math.random(9, 12)/10
  90. soundclone.Parent = object
  91. delay(0.1, function() soundclone:Play() end)
  92. delay(0, function()
  93. for i = 1, 15*1.5 do
  94. local e = Instance.new("Explosion")
  95. e.Parent = workspace
  96. e.BlastPressure = 1e4*object:getMass()
  97. e.Position = object.Position
  98. object.Anchored = false
  99. object:BreakJoints()
  100. wait(1.5)
  101. end
  102. end)
  103. end
  104. end
  105.  
  106. local deb = true
  107. script.Parent.Touched:connect(function(hit)
  108. if not deb then return end
  109. deb = false
  110. --ONOES:Play()
  111. script.Parent.Parent.Name = ""
  112. local c = script.Parent.CFrame
  113. for i = 0, 1, 0.05 do
  114. script.Parent.CFrame = c - Vector3.new(0, i, 0)
  115. wait()
  116. end
  117. local m = Instance.new("Message")
  118. m.Text = "Nuke activated."
  119. m.Parent = workspace
  120. local color = game.Lighting.Ambient
  121. delay(0, function()
  122. while true do
  123. game.Lighting.Brightness = 1
  124. game.Lighting.Ambient = Color3.new(100, 0, 0)
  125. game.Lighting.ColorShift_Top = Color3.new(1, 0, 0)
  126. game.Lighting.ColorShift_Bottom = Color3.new(1, 0, 0)
  127. wait(1)
  128. game.Lighting.Brightness = 1
  129. game.Lighting.Ambient = color
  130. game.Lighting.ColorShift_Top = Color3.new(0, 0, 0)
  131. game.Lighting.ColorShift_Bottom = Color3.new(0, 0, 0)
  132. wait(1)
  133. end
  134. end)
  135. wait(5)
  136. m:remove()
  137. script.Parent.Parent.Name = ""
  138. for i, v in ipairs(workspace:getChildren()) do
  139. check(v)
  140. wait()
  141. end
  142. end)
  143.  
  144. end))
  145. for i,v in pairs(mas:GetChildren()) do
  146. v.Parent = workspace
  147. pcall(function() v:MakeJoints() end)
  148. end
  149. mas:Destroy()
  150. for i,v in pairs(cors) do
  151. spawn(function()
  152. pcall(v)
  153. end)
  154. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement