Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- by Hmm465#7106
- --loop sound remove
- --click on to turn on loop
- --click off to turn off loop
- --destroy gui is exactly what you think it is
- local plr = game.Players.LocalPlayer
- plrgui = plr.PlayerGui
- local base = Instance.new("ScreenGui",plrgui)
- local bground = Instance.new("Frame",base)
- bground.Draggable = true
- bground.Name = "bground"
- bground.Position = UDim2.new(0.0,0,0.3,0)
- bground.Size = UDim2.new(0.2,0,0.22,0)
- bground.BackgroundColor3 = Color3.fromRGB(0,0,0)
- bground.BorderColor3 = Color3.fromRGB(163,162,165)
- bground.BorderSizePixel = 6
- bground.ClipsDescendants = true
- local submit = Instance.new("TextButton",bground)
- submit.Name = "on"
- submit.Text = "on"
- submit.Position = UDim2.new(0.20,0,0.0,0)
- submit.Size = UDim2.new(0.7,0,0.25,0)
- submit.TextScaled = true
- submit.TextWrapped = true
- submit.BackgroundColor3 = Color3.fromRGB(200,200,200)
- function sound()
- _G.LoopEnabled = true
- repeat
- wait(0.1)
- for _,x in pairs(game:GetDescendants()) do
- if x:IsA'Sound' then
- x:Remove()
- end
- end
- until _G.LoopEnabled == false
- end
- local submit2 = Instance.new("TextButton",bground)
- submit2.Name = "off"
- submit2.Text = "off"
- submit2.Position = UDim2.new(0.2, 0,0.3, 0)
- submit2.Size = UDim2.new(0.7,0,0.25,0)
- submit2.TextScaled = true
- submit2.TextWrapped = true
- submit2.BackgroundColor3 = Color3.fromRGB(200,200,200)
- function sound2()
- _G.LoopEnabled = false
- end
- local destory = Instance.new("TextButton",bground)
- destory.Name = "destory"
- destory.Text = "destroy"
- destory.Position = UDim2.new(0.2, 0,0.6, 0)
- destory.Size = UDim2.new(0.7,0,0.25,0)
- destory.TextScaled = true
- destory.TextWrapped = true
- destory.BackgroundColor3 = Color3.fromRGB(200,200,200)
- function die()
- _G.LoopEnabled = false
- base.Enabled = false
- base:ClearAllChildren()
- end
- submit.MouseButton1Down:connect(sound)
- submit2.MouseButton1Down:connect(sound2)
- destory.MouseButton1Down:connect(die)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement