Advertisement
BluCreeperGuy123

TsunamiButton

Sep 21st, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.72 KB | None | 0 0
  1. -- Objects
  2.  
  3. local ScreenGui = Instance.new("ScreenGui")
  4. local Frame = Instance.new("Frame")
  5. local TextButton = Instance.new("TextButton")
  6.  
  7. -- Properties
  8.  
  9. ScreenGui.Parent = game.CoreGui
  10.  
  11. Frame.Parent = ScreenGui
  12. Frame.BackgroundColor3 = Color3.new(1, 1, 1)
  13. Frame.Position = UDim2.new(0, 0, 0.551383376, 0)
  14. Frame.Size = UDim2.new(0, 201, 0, 51)
  15. Frame.Active = true
  16. Frame.Draggable = true
  17.  
  18. TextButton.Parent = Frame
  19. TextButton.BackgroundColor3 = Color3.new(1, 1, 0.498039)
  20. TextButton.Position = UDim2.new(0, 0, 0.020833334, 0)
  21. TextButton.Size = UDim2.new(0, 200, 0, 50)
  22. TextButton.Font = Enum.Font.SourceSans
  23. TextButton.FontSize = Enum.FontSize.Size14
  24. TextButton.Text = "CLICK FOR TSUNAMI!"
  25. TextButton.TextSize = 14
  26.  
  27. -- Functions
  28.  
  29. TextButton.MouseButton1Down:connect(function()
  30. o1 = Instance.new("Part")
  31. o1.Name = "WAVE"
  32. o1.Parent = workspace
  33. o1.Material = Enum.Material.Granite
  34. o1.BrickColor = BrickColor.new("Electric blue")
  35. o1.Transparency = 0.30000001192093
  36. o1.Position = Vector3.new(-277.570068, 15.4718628, -1565.60864)
  37. o1.Anchored = true
  38. o1.CanCollide = false
  39. o1.Size = Vector3.new(2048, 155.029999, 1968.98999)
  40. o1.CFrame = CFrame.new(-277.570068, 15.4718628, -1565.60864, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  41. o1.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  42. o1.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  43. o1.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  44. o1.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  45. o1.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  46. o1.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  47. o1.Color = Color3.new(0.0352941, 0.537255, 0.811765)
  48.  
  49. function FLOAT (part)
  50. for i,v in pairs(part:GetChildren()) do
  51. if v:IsA("BodyPosition") then
  52. v:Destroy()
  53. end
  54. end
  55. local m = Instance.new("BodyPosition")
  56.  
  57. m.Parent = part
  58.  
  59. m.maxForce = Vector3.new(4e+006,4e+006,4e+006)
  60.  
  61. m.position = Vector3.new(part.Position.X,workspace.WAVE.Position.Y,part.Position.Z)
  62. end
  63. function DestroyHorrible (part)
  64. if part.Name ~= "Baseplate" then
  65. if part.Transparency < .5 then
  66. FLOAT(part)
  67. part.Anchored = false part.Size = part.Size/1.5
  68. for i=1,4 do
  69. part:Clone()
  70. end
  71. local o1g = Instance.new("Sound")
  72. o1g.Parent = part
  73. o1g.SoundId = "rbxassetid://516789356"
  74. o1g:Play()
  75. elseif part.Material == "Wood" or part.Material == "WoodPlanks" then
  76. part.Anchored = false part.Size = part.Size/1.5
  77. FLOAT(part)
  78. for i=1,4 do
  79. part:Clone()
  80. end
  81. local o1j = Instance.new("Sound")
  82. o1j.Parent = part
  83. o1j.Volume = 2
  84. o1j.SoundId = "rbxassetid://516777998"
  85. o1j:Play()
  86. else
  87. FLOAT(part)
  88. part.Anchored = false part.Size = part.Size/1.5
  89. for i=1,4 do
  90. part:Clone()
  91. end
  92. local go1 = Instance.new("Sound")
  93. go1.Parent = part
  94. go1.Volume = 1
  95. go1.SoundId = "rbxassetid://516777998"
  96. go1:Play()
  97. end
  98. end
  99. end
  100. myears = Instance.new('Sound')
  101. myears.Parent = workspace
  102. myears.Looped = false
  103. myears.Name = "Ruski"
  104. myears.Playing = true
  105. myears.SoundId = "rbxassetid://557673018"
  106. myears.Volume = .5
  107. myears.TimePosition = 0
  108. myears:Play()
  109. workspace.WAVE.Touched:Connect(DestroyHorrible)
  110. workspace.WAVE.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame + Vector3.new(-2200,0,0)
  111. o1 = Instance.new("Sound")
  112. o1.Parent = workspace
  113. o1.SoundId = "rbxassetid://135560679"
  114. o1.Volume = 1
  115. o1:Play()
  116. h = 0
  117. j = 1
  118. for i=1,2000 do
  119. j = j+1
  120. wait()
  121. workspace.WAVE.CFrame = workspace.WAVE.CFrame + Vector3.new(4,0,0)
  122. if j == 400 then
  123. game.workspace.Terrain:FillBlock(workspace.WAVE.CFrame,workspace.WAVE.Size,Enum.Material.Water)
  124. a = function(instance)
  125. for i,v in pairs(instance:GetChildren()) do
  126. if v.className == "Part" and v.Name ~="Baseplate" then
  127. v.Anchored = false
  128. end
  129. a(v)
  130. end
  131. end
  132. a(workspace)
  133. end
  134. end
  135. workspace.WAVE:Destroy()
  136. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement