DogeOfTheDoges

Flashbang Library

Apr 19th, 2021 (edited)
499
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[
  2.  
  3. local ui = loadstring(game:HttpGet("https://pastebin.com/raw/k0vkeG3M"))()
  4.  
  5. ]]
  6. local FlashBangLib = Instance.new("ScreenGui")
  7. FlashBangLib.Name = math.random(1, 99999999)
  8. FlashBangLib.Parent = game.CoreGui
  9. FlashBangLib.ZIndexBehavior = Enum.ZIndexBehavior.Global
  10. local uis = game:GetService("UserInputService")
  11. local TweenService = game:GetService"TweenService"
  12. local Mouse = game.Players.LocalPlayer:GetMouse()
  13. local Library = {
  14.     windows = 0;
  15. }
  16. local toggled = false
  17.  
  18. local function pushanim(v)
  19.      --[[ButtonText.ImageTransparency = 0.3
  20.             wait()
  21.             ButtonText.ImageTransparency = 0]]
  22.     local c = Instance.new("ImageLabel", v)
  23.     c.BackgroundTransparency = 1
  24.     c.Image = "rbxassetid://3570695787"
  25.     c.ImageTransparency = 0.6
  26.     c.Position = UDim2.new(0, (Mouse.X - c.AbsolutePosition.X), 0, (Mouse.Y - c.AbsolutePosition.Y))
  27.     c.ScaleType = "Slice"
  28.     c.SliceCenter = Rect.new(100, 100, 100, 100)
  29.     c.SliceScale = 1
  30.     local Size = 0
  31.     if v.AbsoluteSize.X > v.AbsoluteSize.Y then
  32.         Size = v.AbsoluteSize.X*1.5
  33.     elseif v.AbsoluteSize.X < v.AbsoluteSize.Y then
  34.         Size = v.AbsoluteSize.Y*1.5
  35.     elseif v.AbsoluteSize.X == v.AbsoluteSize.Y then
  36.         Size = v.AbsoluteSize.X*1.5
  37.     end
  38.     c:TweenSizeAndPosition(UDim2.new(0, Size, 0, Size), UDim2.new(.5, -Size/2, .5, -Size/2), "Out", "Linear", .5)
  39.     v.MouseButton1Up:Connect(function()
  40.         while c.ImageTransparency ~= 1 do
  41.             wait()
  42.             c.ImageTransparency = c.ImageTransparency + 0.02
  43.             if c.ImageTransparency == 1 then c:Destroy() end
  44.         end
  45.     end)
  46. end
  47.  
  48. local function getNextWindowPos()
  49.     local biggest = 0;
  50.     local ok = nil;
  51.     for i,v in pairs(FlashBangLib:GetChildren()) do
  52.         if v.Position.X.Offset>biggest then
  53.             biggest = v.Position.X.Offset
  54.             ok = v;
  55.         end
  56.     end
  57.     if biggest == 0 then
  58.         biggest = biggest + 5;
  59.     else
  60.         biggest = biggest + ok.Size.X.Offset + 5;
  61.     end
  62.  
  63.     return biggest;
  64. end
  65.  
  66. function Library:CreateWindow(title)
  67.     Library.windows = Library.windows + 1;
  68.     local BodyYSize = 0
  69.     local InputService = game:GetService("UserInputService")
  70.  
  71.     local TopBar = Instance.new("ImageLabel")
  72.     local ContainerVisual = Instance.new("Frame")
  73.     local UICorner = Instance.new("UICorner")
  74.     local TitleText = Instance.new("TextLabel")
  75.     local Container = Instance.new("Frame")
  76.     local UIListLayout = Instance.new("UIListLayout")
  77.     local ToggleVisible = Instance.new("ImageButton")
  78.  
  79.     local function Resize(Value)
  80.         BodyYSize = BodyYSize + Value
  81.  
  82.         Container.Size = UDim2.new(0, 198, 0, BodyYSize)
  83.         ContainerVisual.Size = UDim2.new(0, 198, 0, BodyYSize)
  84.     end
  85.  
  86.     local dragging = false;
  87.     TopBar.Name = "TopBar"
  88.     TopBar.Parent = FlashBangLib
  89.     TopBar.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  90.     TopBar.BackgroundTransparency = 1.000
  91.     TopBar.BorderSizePixel = 0
  92.     TopBar.Position = UDim2.new(0, getNextWindowPos() + 10, 0, 10)
  93.     TopBar.Size = UDim2.new(0, 200, 0, 37)
  94.     TopBar.Image = "rbxassetid://6703829351"
  95.     TopBar.Active = true
  96.     local dragging
  97.     local dragInput
  98.     local dragStart
  99.     local startPos
  100.     local function update(input)
  101.         local delta = input.Position - dragStart
  102.         TopBar:TweenPosition(UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y), "Out", "Sine", 0.05, true)
  103.     end
  104.     TopBar.InputBegan:Connect(function(input)
  105.         if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  106.             dragging = true
  107.             dragStart = input.Position
  108.             startPos = TopBar.Position
  109.  
  110.             input.Changed:Connect(function()
  111.                 if input.UserInputState == Enum.UserInputState.End then
  112.                     dragging = false
  113.                 end
  114.             end)
  115.         end
  116.     end)
  117.     TopBar.InputChanged:Connect(function(input)
  118.         if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  119.             dragInput = input
  120.         end
  121.     end)
  122.     uis.InputChanged:Connect(function(input)
  123.         if input == dragInput and dragging then
  124.             update(input)
  125.         end
  126.     end)
  127.     ContainerVisual.Name = "ContainerVisual"
  128.     ContainerVisual.Parent = TopBar
  129.     ContainerVisual.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  130.     ContainerVisual.BackgroundTransparency = 0.780
  131.     ContainerVisual.BorderSizePixel = 0
  132.     ContainerVisual.ClipsDescendants = true
  133.     ContainerVisual.Position = UDim2.new(0, 1, 0.5, 0)
  134.     ContainerVisual.Size = UDim2.new(0, 198, 0, 289)
  135.  
  136.     UICorner.Parent = ContainerVisual
  137.  
  138.     Container.Name = "Container"
  139.     Container.Parent = TopBar
  140.     Container.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  141.     Container.BackgroundTransparency = 1.000
  142.     Container.BorderSizePixel = 0
  143.     Container.ClipsDescendants = true
  144.     Container.Position = UDim2.new(0, 1, 1.13816214, 0)
  145.     Container.Size = UDim2.new(0, 198, 0, 265)
  146.  
  147.     UIListLayout.Parent = Container
  148.     UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
  149.     UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  150.     UIListLayout.Padding = UDim.new(0, 8)
  151.  
  152.     TitleText.Name = "TitleText"
  153.     TitleText.Parent = TopBar
  154.     TitleText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  155.     TitleText.BackgroundTransparency = 1.000
  156.     TitleText.Size = UDim2.new(0, 167, 0, 35)
  157.     TitleText.Font = Enum.Font.SourceSansSemibold
  158.     TitleText.Text = title
  159.     TitleText.TextColor3 = Color3.fromRGB(59, 59, 59)
  160.     TitleText.TextScaled = true
  161.     TitleText.TextSize = 14.000
  162.     TitleText.TextWrapped = true
  163.  
  164.     ToggleVisible.Name = "ToggleVisible"
  165.     ToggleVisible.Parent = TopBar
  166.     ToggleVisible.Active = false
  167.     ToggleVisible.BackgroundColor3 = Color3.fromRGB(241, 241, 241)
  168.     ToggleVisible.BackgroundTransparency = 1.000
  169.     ToggleVisible.BorderSizePixel = 0
  170.     ToggleVisible.Position = UDim2.new(0.870000005, 0, 0.25, 0)
  171.     ToggleVisible.Rotation = 0
  172.     ToggleVisible.Selectable = false
  173.     ToggleVisible.Size = UDim2.new(0, 16, 0, 14)
  174.     ToggleVisible.Image = "rbxassetid://6704708192"
  175.  
  176.     local visibletweeninfo = TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
  177.     local visibletween1 = TweenService:Create(ToggleVisible, visibletweeninfo, {Rotation=90})
  178.     local visibletween2 = TweenService:Create(ToggleVisible, visibletweeninfo, {Rotation=0})
  179.  
  180.     ToggleVisible.MouseButton1Down:Connect(function()
  181.         if toggled then
  182.             toggled = false
  183.             visibletween1:Play()
  184.             Container:TweenSize(UDim2.new(0, 198,0, 0), "InOut", "Quad", 0.2)
  185.             ContainerVisual:TweenSize(UDim2.new(0, 198,0, 0), "InOut", "Quad", 0.2)
  186.         else
  187.             toggled = true
  188.             visibletween2:Play()
  189.             Container:TweenSize(UDim2.new(0, 198,0, BodyYSize), "InOut", "Quad", 0.2)
  190.             ContainerVisual:TweenSize(UDim2.new(0, 198,0, BodyYSize), "InOut", "Quad", 0.2)
  191.         end
  192.     end)
  193.  
  194.     local a = {}
  195.  
  196.     --[[
  197.         function a:CreateButton(text)
  198.             --thing
  199.         end
  200.     ]]
  201.  
  202.     function a:CreateButton(text, callback)
  203.         local callback = callback or function() end
  204.  
  205.         Resize(49)
  206.  
  207.         local ButtonSection = Instance.new("ImageLabel")
  208.         local ButtonText = Instance.new("TextButton")
  209.         local UICorner_3 = Instance.new("UICorner")
  210.  
  211.         ButtonSection.Name = "ButtonSection"
  212.         ButtonSection.Parent = Container
  213.         ButtonSection.BackgroundColor3 = Color3.fromRGB(241, 241, 241)
  214.         ButtonSection.BorderSizePixel = 0
  215.         ButtonSection.Position = UDim2.new(0.0723958313, 0, 0.0324074067, 0)
  216.         ButtonSection.Size = UDim2.new(0, 178, 0, 37)
  217.         ButtonSection.Image = "rbxassetid://6703829166"
  218.         ButtonSection.ClipsDescendants = true
  219.  
  220.         ButtonText.Name = "ButtonText"
  221.         ButtonText.Parent = ButtonSection
  222.         ButtonText.Active = false
  223.         ButtonText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  224.         ButtonText.BackgroundTransparency = 1.000
  225.         ButtonText.Selectable = false
  226.         ButtonText.Size = UDim2.new(0, 178, 0, 35)
  227.         ButtonText.Font = Enum.Font.SourceSans
  228.         ButtonText.Text = text
  229.         ButtonText.TextColor3 = Color3.fromRGB(59, 59, 59)
  230.         ButtonText.TextScaled = true
  231.         ButtonText.TextSize = 14.000
  232.         ButtonText.TextWrapped = true
  233.  
  234.         UICorner_3.Parent = ButtonSection
  235.  
  236.         ButtonText.MouseButton1Click:Connect(function()
  237.             pcall(callback)
  238.             pushanim(ButtonText)
  239.         end)
  240.     end
  241.  
  242.     function a:CreateLabel(text)
  243.         Resize(49)
  244.  
  245.         local LabelSection = Instance.new("ImageLabel")
  246.         local LabelText = Instance.new("TextLabel")
  247.         local UICorner_2 = Instance.new("UICorner")
  248.  
  249.         LabelSection.Name = "LabelSection"
  250.         LabelSection.Parent = Container
  251.         LabelSection.BackgroundColor3 = Color3.fromRGB(241, 241, 241)
  252.         LabelSection.BorderSizePixel = 0
  253.         LabelSection.Position = UDim2.new(0.0723958313, 0, 0.0324074067, 0)
  254.         LabelSection.Size = UDim2.new(0, 198, 0, 37)
  255.         LabelSection.Image = "rbxassetid://6703829226"
  256.         LabelSection.ImageTransparency = 1.000
  257.  
  258.         LabelText.Name = "LabelText"
  259.         LabelText.Parent = LabelSection
  260.         LabelText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  261.         LabelText.BackgroundTransparency = 1.000
  262.         LabelText.Size = UDim2.new(0, 200, 0, 35)
  263.         LabelText.Font = Enum.Font.SourceSans
  264.         LabelText.Text = text
  265.         LabelText.TextColor3 = Color3.fromRGB(59, 59, 59)
  266.         LabelText.TextScaled = true
  267.         LabelText.TextSize = 14.000
  268.         LabelText.TextWrapped = true
  269.  
  270.         UICorner_2.Parent = LabelSection
  271.     end
  272.  
  273.     function a:CreateHR()
  274.         Resize(30)
  275.  
  276.         local Devider = Instance.new("ImageLabel")
  277.  
  278.         Devider.Name = "Devider"
  279.         Devider.Parent = Container
  280.         Devider.BackgroundColor3 = Color3.fromRGB(241, 241, 241)
  281.         Devider.BorderSizePixel = 0
  282.         Devider.Position = UDim2.new(0.0723958313, 0, 0.0324074067, 0)
  283.         Devider.Size = UDim2.new(0, 198, 0, 5)
  284.         Devider.Image = "rbxassetid://6703829226"
  285.         Devider.ImageTransparency = 1.000
  286.     end
  287.  
  288.     function a:CreateInput(title, callback)
  289.         local callback = callback or function() end
  290.  
  291.         Resize(69)
  292.  
  293.         local InputSection = Instance.new("ImageLabel")
  294.         local InputImage = Instance.new("ImageLabel")
  295.         local InputText = Instance.new("TextBox")
  296.         local InputLabelText = Instance.new("TextLabel")
  297.         local UICorner_4 = Instance.new("UICorner")
  298.  
  299.         InputSection.Name = "InputSection"
  300.         InputSection.Parent = Container
  301.         InputSection.BackgroundColor3 = Color3.fromRGB(241, 241, 241)
  302.         InputSection.BorderSizePixel = 0
  303.         InputSection.Position = UDim2.new(0.0723958313, 0, 0.0324074067, 0)
  304.         InputSection.Size = UDim2.new(0, 198, 0, 61)
  305.         InputSection.Image = "rbxassetid://6703829080"
  306.  
  307.         InputImage.Name = "InputImage"
  308.         InputImage.Parent = InputSection
  309.         InputImage.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  310.         InputImage.BackgroundTransparency = 1.000
  311.         InputImage.BorderSizePixel = 0
  312.         InputImage.Position = UDim2.new(0.0500000007, 0, 0.342999995, 0)
  313.         InputImage.Size = UDim2.new(0, 180, 0, 33)
  314.         InputImage.Image = "rbxassetid://6703829016"
  315.  
  316.         InputText.Name = "InputText"
  317.         InputText.Parent = InputImage
  318.         InputText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  319.         InputText.BackgroundTransparency = 1.000
  320.         InputText.Position = UDim2.new(0, 5, 0.125, 0)
  321.         InputText.Size = UDim2.new(0, 175, 0, 25)
  322.         InputText.Font = Enum.Font.SourceSans
  323.         InputText.Text = "Input..."
  324.         InputText.TextColor3 = Color3.fromRGB(0, 0, 0)
  325.         InputText.TextScaled = true
  326.         InputText.TextSize = 14.000
  327.         InputText.TextTransparency = 0.480
  328.         InputText.TextWrapped = true
  329.         InputText.TextXAlignment = Enum.TextXAlignment.Left
  330.  
  331.         InputLabelText.Name = "InputLabelText"
  332.         InputLabelText.Parent = InputSection
  333.         InputLabelText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  334.         InputLabelText.BackgroundTransparency = 1.000
  335.         InputLabelText.Size = UDim2.new(0, 199, 0, 20)
  336.         InputLabelText.Font = Enum.Font.SourceSansLight
  337.         InputLabelText.Text = title
  338.         InputLabelText.TextColor3 = Color3.fromRGB(59, 59, 59)
  339.         InputLabelText.TextScaled = true
  340.         InputLabelText.TextSize = 14.000
  341.         InputLabelText.TextWrapped = true
  342.  
  343.         UICorner_4.Parent = InputSection
  344.  
  345.         local function Fire()
  346.             pcall(callback, InputText.Text)
  347.         end
  348.  
  349.         InputText.FocusLost:Connect(Fire)
  350.     end
  351.  
  352.     function a:CreateToggle(title, callback)
  353.         local callback = callback or function() end
  354.         local actions = {}
  355.         local enabled = false
  356.  
  357.         Resize(69)
  358.  
  359.         local ToggleSection = Instance.new("ImageLabel")
  360.         local Back = Instance.new("ImageLabel")
  361.         local Circle = Instance.new("ImageLabel")
  362.         local ToggleLabelText = Instance.new("TextLabel")
  363.         local UICorner_5 = Instance.new("UICorner")
  364.         local ToggleButton = Instance.new("ImageButton")
  365.  
  366.         ToggleSection.Name = "ToggleSection"
  367.         ToggleSection.Parent = Container
  368.         ToggleSection.BackgroundColor3 = Color3.fromRGB(241, 241, 241)
  369.         ToggleSection.BorderSizePixel = 0
  370.         ToggleSection.Size = UDim2.new(0, 139, 0, 61)
  371.         ToggleSection.Image = "rbxassetid://6703828858"
  372.         ToggleSection.ImageTransparency = 1.000
  373.  
  374.         Back.Name = "Back"
  375.         Back.Parent = ToggleSection
  376.         Back.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  377.         Back.BackgroundTransparency = 1.000
  378.         Back.BorderSizePixel = 0
  379.         Back.ClipsDescendants = true
  380.         Back.Position = UDim2.new(0.262307674, 0, 0.343373328, 0)
  381.         Back.Size = UDim2.new(0, 65, 0, 33)
  382.         Back.Image = "rbxassetid://6703828951"
  383.  
  384.         Circle.Name = "Circle"
  385.         Circle.Parent = Back
  386.         Circle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  387.         Circle.BackgroundTransparency = 1.000
  388.         Circle.BorderSizePixel = 0
  389.         Circle.ClipsDescendants = true
  390.         Circle.Size = UDim2.new(0, 33, 0, 33)
  391.         Circle.Image = "rbxassetid://6703829990"
  392.  
  393.         ToggleLabelText.Name = "ToggleLabelText"
  394.         ToggleLabelText.Parent = ToggleSection
  395.         ToggleLabelText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  396.         ToggleLabelText.BackgroundTransparency = 1.000
  397.         ToggleLabelText.Size = UDim2.new(0, 137, 0, 20)
  398.         ToggleLabelText.Font = Enum.Font.SourceSansLight
  399.         ToggleLabelText.Text = title
  400.         ToggleLabelText.TextColor3 = Color3.fromRGB(59, 59, 59)
  401.         ToggleLabelText.TextScaled = true
  402.         ToggleLabelText.TextSize = 14.000
  403.         ToggleLabelText.TextWrapped = true
  404.  
  405.         UICorner_5.Parent = ToggleSection
  406.  
  407.         ToggleButton.Name = "ToggleButton"
  408.         ToggleButton.Parent = ToggleSection
  409.         ToggleButton.Active = false
  410.         ToggleButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  411.         ToggleButton.BackgroundTransparency = 1.000
  412.         ToggleButton.BorderSizePixel = 0
  413.         ToggleButton.ClipsDescendants = true
  414.         ToggleButton.Position = UDim2.new(0.262307674, 0, 0.343373328, 0)
  415.         ToggleButton.Selectable = false
  416.         ToggleButton.Size = UDim2.new(0, 65, 0, 33)
  417.         ToggleButton.Image = "rbxassetid://6703828951"
  418.         ToggleButton.ImageTransparency = 1.000
  419.  
  420.         local TweenService = game:GetService("TweenService")
  421.         local TweenSettings_Toggle = TweenInfo.new(0.6,Enum.EasingStyle.Quad, Enum.EasingDirection.InOut, 0, false, 0)
  422.  
  423.         local onposition = {Position = UDim2.new(0.49,0,0,0)}
  424.         local offposition = {Position = UDim2.new(0,0,0,0)}
  425.  
  426.         local SymbolContainer_TweenIn = TweenService:Create(Circle, TweenSettings_Toggle, onposition)
  427.         local SymbolContainer_TweenOut = TweenService:Create(Circle, TweenSettings_Toggle, offposition)
  428.  
  429.         local function Fire()
  430.             enabled = not enabled
  431.             if enabled == true then
  432.                 SymbolContainer_TweenOut:Pause()
  433.                 SymbolContainer_TweenIn:Play()
  434.                 wait(0.6)
  435.                 Circle.ImageColor3 = Color3.fromRGB(138, 165, 255)
  436.             else
  437.                 SymbolContainer_TweenIn:Pause()
  438.                 SymbolContainer_TweenOut:Play()
  439.                 wait(0.6)
  440.                 Circle.ImageColor3 = Color3.fromRGB(255, 255, 255)
  441.             end
  442.             pcall(callback, enabled)
  443.         end
  444.  
  445.         ToggleButton.MouseButton1Click:Connect(Fire)
  446.     end
  447.  
  448.     return a;
  449. end
  450.  
  451. return Library;
RAW Paste Data