Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local library = {
- windowcount = 0;
- }
- function library:TextSizer(obj, num)
- local Sizer = Instance.new("UITextSizeConstraint")
- Sizer.MinTextSize = num
- Sizer.MaxTextSize = num
- Sizer.Parent = obj
- end
- function library:Resize(container)
- local y = 0
- for i, v in next, container:GetChildren() do
- if (not v:IsA("UIListLayout")) then
- y = y + v.AbsoluteSize.Y
- end
- end
- container.Size = UDim2.new(1, 0, 0, y)
- end
- function library:MakeWindow(text)
- for i,v in pairs(game.CoreGui:GetChildren()) do if string.find(v.Name, "Screen") then v:Destroy() end end
- library.windowcount = library.windowcount + 1
- local Shitty = Instance.new("ScreenGui")
- local HudShitty = Instance.new("Frame")
- local GuiTitle = Instance.new("TextLabel")
- local ContainerShitty = Instance.new("Frame")
- local Mini = Instance.new("TextButton")
- local UIListLayout = Instance.new("UIListLayout")
- Shitty.Name = "ScreenGui"
- Shitty.Parent = game.CoreGui
- Shitty.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- HudShitty.Name = "HudShitty"
- HudShitty.Parent = Shitty
- HudShitty.BackgroundColor3 = Color3.new(0.909804, 0.494118, 0.356863)
- HudShitty.BorderSizePixel = 0
- HudShitty.Active = true
- HudShitty.Selectable = true
- HudShitty.Draggable = true
- HudShitty.Position = UDim2.new(0, (15 + ((200 * library.windowcount) - 200)), 0, 15)
- HudShitty.Size = UDim2.new(0, 178, 0, 30)
- Mini.Name = "Mini"
- Mini.Parent = HudShitty
- Mini.BackgroundColor3 = Color3.new(1, 1, 1)
- Mini.BackgroundTransparency = 1
- Mini.Position = UDim2.new(0.803370774, 0, 0, 0)
- Mini.Size = UDim2.new(0, 35, 0, 31)
- Mini.Font = Enum.Font.SourceSansBold
- Mini.Text = "-"
- Mini.TextColor3 = Color3.new(1, 1, 1)
- Mini.TextScaled = true
- Mini.TextSize = 14
- Mini.TextWrapped = true
- Mini.MouseButton1Click:Connect(function()
- if ContainerShitty.Visible == true then
- ContainerShitty.Visible = false
- Mini.Text = "+"
- else
- ContainerShitty.Visible = true
- Mini.Text = "-"
- end
- end)
- GuiTitle.Name = "GuiTitle"
- GuiTitle.Parent = HudShitty
- GuiTitle.BackgroundColor3 = Color3.new(1, 1, 1)
- GuiTitle.BackgroundTransparency = 1
- GuiTitle.Size = UDim2.new(0, 178, 0, 30)
- GuiTitle.Font = Enum.Font.SourceSansBold
- GuiTitle.Text = text
- GuiTitle.TextColor3 = Color3.new(1, 1, 1)
- GuiTitle.TextSize = 30
- GuiTitle.TextWrapped = true
- library:TextSizer(GuiTitle, 30)
- ContainerShitty.Name = "ContainerShitty"
- ContainerShitty.Parent = HudShitty
- ContainerShitty.BackgroundColor3 = Color3.new(0.219608, 0.219608, 0.219608)
- ContainerShitty.BorderSizePixel = 0
- ContainerShitty.Position = UDim2.new(0, 0, 1, 0)
- ContainerShitty.Size = UDim2.new(0, 178, 0, 0)
- UIListLayout.Parent = ContainerShitty
- UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
- local epicLibrary = {}
- function epicLibrary:MakeSection(text)
- library.windowcount = library.windowcount + 1
- local toggled = false
- local Toggle = Instance.new("TextLabel")
- local ToggleButton = Instance.new("TextButton")
- local HudShittyD = Instance.new("Frame")
- local GuiTitleD = Instance.new("TextLabel")
- local ContainerShittyD = Instance.new("Frame")
- local DCLayout = Instance.new("UIListLayout")
- local MiniD = Instance.new("TextButton")
- HudShittyD.Name = "HudShittyD"
- HudShittyD.Parent = Shitty
- HudShittyD.BackgroundColor3 = Color3.new(0.909804, 0.494118, 0.356863)
- HudShittyD.BorderSizePixel = 0
- HudShittyD.Active = true
- HudShittyD.Selectable = true
- HudShittyD.Draggable = true
- HudShittyD.Position = UDim2.new(0, (15 + ((200 * library.windowcount) - 200)), 0, 15)
- HudShittyD.Size = UDim2.new(0, 178, 0, 30)
- HudShittyD.Visible = false
- GuiTitleD.Name = "GuiTitleDD"
- GuiTitleD.Parent = HudShittyD
- GuiTitleD.BackgroundColor3 = Color3.new(1, 1, 1)
- GuiTitleD.BackgroundTransparency = 1
- GuiTitleD.Size = UDim2.new(0, 178, 0, 30)
- GuiTitleD.Font = Enum.Font.SourceSansBold
- GuiTitleD.Text = text
- GuiTitleD.TextColor3 = Color3.new(1, 1, 1)
- GuiTitleD.TextSize = 30
- GuiTitleD.TextWrapped = true
- ContainerShittyD.Name = "ContainerSF"
- ContainerShittyD.Parent = HudShittyD
- ContainerShittyD.BackgroundColor3 = Color3.new(0.219608, 0.219608, 0.219608)
- ContainerShittyD.BorderSizePixel = 0
- ContainerShittyD.Position = UDim2.new(0, 0, 1, 0)
- ContainerShittyD.Size = UDim2.new(0, 178, 0, 0)
- MiniD.Name = "Mini"
- MiniD.Parent = HudShittyD
- MiniD.BackgroundColor3 = Color3.new(1, 1, 1)
- MiniD.BackgroundTransparency = 1
- MiniD.Position = UDim2.new(0.803370774, 0, 0, 0)
- MiniD.Size = UDim2.new(0, 35, 0, 31)
- MiniD.Font = Enum.Font.SourceSansBold
- MiniD.Text = "-"
- MiniD.TextColor3 = Color3.new(1, 1, 1)
- MiniD.TextScaled = true
- MiniD.TextSize = 14
- MiniD.TextWrapped = true
- MiniD.MouseButton1Click:Connect(function()
- if ContainerShittyD.Visible == true then
- ContainerShittyD.Visible = false
- MiniD.Text = "+"
- else
- ContainerShittyD.Visible = true
- MiniD.Text = "-"
- end
- end)
- DCLayout.Parent = ContainerShittyD
- DCLayout.SortOrder = Enum.SortOrder.LayoutOrder
- Toggle.Name = "Toggle"
- Toggle.Parent = ContainerShitty
- Toggle.BackgroundColor3 = Color3.new(1, 1, 1)
- Toggle.BackgroundTransparency = 1
- Toggle.Size = UDim2.new(0, 178, 0, 32)
- Toggle.Font = Enum.Font.SourceSansBold
- Toggle.Text = text
- Toggle.TextColor3 = Color3.new(1, 1, 1)
- Toggle.TextSize = 20
- library:TextSizer(Toggle, 24)
- ToggleButton.Name = "ToggleButton"
- ToggleButton.Parent = Toggle
- ToggleButton.BackgroundColor3 = Color3.new(1, 0, 0)
- ToggleButton.BackgroundTransparency = 1
- ToggleButton.Position = UDim2.new(0.803370774, 0, 0, 0)
- ToggleButton.Size = UDim2.new(0, 35, 0, 30)
- ToggleButton.Font = Enum.Font.SourceSansBold
- ToggleButton.Text = "OFF"
- ToggleButton.TextColor3 = Color3.new(1, 0, 0)
- ToggleButton.TextSize = 20
- ToggleButton.MouseButton1Click:Connect(function()
- if toggled then
- ToggleButton.Text = "OFF"
- ToggleButton.TextColor3 = Color3.new(1, 0, 0)
- toggled = false
- HudShittyD.Visible = false
- else
- ToggleButton.Text = "ON"
- ToggleButton.TextColor3 = Color3.fromRGB(0, 255, 0)
- toggled = true
- HudShittyD.Visible = true
- HudShittyD.Position = UDim2.new(0, (HudShitty.AbsolutePosition.X + ((200 * library.windowcount) - 200)), 0, HudShitty.AbsolutePosition.Y)
- end
- end)
- library:TextSizer(ToggleButton, 20)
- library:Resize(ContainerShitty)
- local epicL = {}
- function epicL:Button(text, callback)
- text = text or "Toggle"
- callback = callback or function() end;
- local Button = Instance.new("TextButton")
- Button.Name = "Toggle"
- Button.Parent = ContainerShittyD
- Button.BackgroundColor3 = Color3.new(1, 1, 1)
- Button.BackgroundTransparency = 1
- Button.Size = UDim2.new(0, 178, 0, 32)
- Button.Font = Enum.Font.SourceSansBold
- Button.Text = text
- Button.TextColor3 = Color3.new(1, 1, 1)
- Button.TextSize = 20
- Button.MouseButton1Click:Connect(callback);
- library:TextSizer(Button, 20)
- library:Resize(ContainerShittyD)
- end
- function epicL:Slider(text, min, max, callback)
- local mouse = game.Players.LocalPlayer:GetMouse()
- local uis = game:GetService("UserInputService")
- local Slider = Instance.new("Frame")
- local Title = Instance.new("TextLabel")
- local Value = Instance.new("TextLabel")
- local SliderButton = Instance.new("TextButton")
- local SliderFrame = Instance.new("Frame")
- local Val = 0;
- text = text or "Slider"
- min = min or 0
- max = max or 100
- callback = callback or function() end;
- Slider.Name = "Slider"
- Slider.Parent = ContainerShittyD
- Slider.BackgroundColor3 = Color3.new(0.247059, 0.247059, 0.247059)
- Slider.BorderSizePixel = 0
- Slider.Position = UDim2.new(0, 0, 0.183908045, 0)
- Slider.Size = UDim2.new(0, 178, 0, 52)
- Title.Name = "Title"
- Title.Parent = Slider
- Title.BackgroundColor3 = Color3.new(1, 1, 1)
- Title.BackgroundTransparency = 1
- Title.Size = UDim2.new(0, 143, 0, 23)
- Title.Font = Enum.Font.SourceSansBold
- Title.Text = text
- Title.TextColor3 = Color3.new(1, 1, 1)
- Title.TextSize = 20
- library:TextSizer(Title, 20)
- Value.Name = "Value"
- Value.Parent = Slider
- Value.BackgroundColor3 = Color3.new(1, 1, 1)
- Value.BackgroundTransparency = 1
- Value.Position = UDim2.new(0.803370774, 0, 0, 0)
- Value.Size = UDim2.new(0, 35, 0, 23)
- Value.Font = Enum.Font.SourceSansBold
- Value.Text = "0"
- Value.TextColor3 = Color3.new(1, 1, 1)
- Value.TextSize = 20
- library:TextSizer(Value, 20)
- SliderButton.Name = "SliderButton"
- SliderButton.Parent = Slider
- SliderButton.BackgroundColor3 = Color3.new(0.192157, 0.192157, 0.192157)
- SliderButton.BorderSizePixel = 0
- SliderButton.Position = UDim2.new(0.0224719085, 0, 0.397067219, 0)
- SliderButton.Size = UDim2.new(0, 169, 0, 20)
- SliderButton.Font = Enum.Font.SourceSansBold
- SliderButton.Text = ""
- SliderButton.TextColor3 = Color3.new(1, 1, 1)
- SliderButton.TextSize = 20
- library:TextSizer(SliderButton, 20)
- SliderFrame.Name = "SliderFrame"
- SliderFrame.Parent = SliderButton
- SliderFrame.BackgroundColor3 = Color3.new(0.85098, 0.431373, 0.294118)
- SliderFrame.BorderSizePixel = 0
- SliderFrame.Position = UDim2.new(-0.00166863948, 0, 0.0123846233, 0)
- SliderFrame.Size = UDim2.new(0, 0, 0, 20)
- SliderButton.MouseButton1Down:Connect(function()
- Val = math.floor((((tonumber(max) - tonumber(min)) / 169) * SliderFrame.AbsoluteSize.X) + tonumber(min)) or 0
- Value.Text = tostring(Val)
- pcall(function()
- callback(Val)
- end)
- SliderFrame.Size = UDim2.new(0, math.clamp(mouse.X - SliderFrame.AbsolutePosition.X, 0, 169), 0, 20)
- moveconnection = mouse.Move:Connect(function()
- Val = math.floor((((tonumber(max) - tonumber(min)) / 169) * SliderFrame.AbsoluteSize.X) + tonumber(min))
- Value.Text = tostring(Val)
- pcall(function()
- callback(Val);
- end)
- SliderFrame.Size = UDim2.new(0, math.clamp(mouse.X - SliderFrame.AbsolutePosition.X, 0, 169), 0, 20)
- end)
- releaseconnection = uis.InputEnded:Connect(function(Mouse)
- if Mouse.UserInputType == Enum.UserInputType.MouseButton1 then
- Val = math.floor((((tonumber(max) - tonumber(min)) / 169) * SliderFrame.AbsoluteSize.X) + tonumber(min))
- Value.Text = tostring(Val)
- pcall(function()
- callback(Val);
- end)
- SliderFrame.Size = UDim2.new(0, math.clamp(mouse.X - SliderFrame.AbsolutePosition.X, 0, 169), 0, 20)
- moveconnection:Disconnect()
- releaseconnection:Disconnect()
- end
- end)
- end)
- library:Resize(ContainerShittyD)
- end
- function epicL:Box(text, callback)
- local TextBox = Instance.new("TextBox")
- text = text or "Box"
- callback = callback or function() end;
- TextBox.Parent = ContainerShittyD
- TextBox.BackgroundColor3 = Color3.new(0.345098, 0.345098, 0.345098)
- TextBox.BorderSizePixel = 0
- TextBox.Position = UDim2.new(0, 0, 0.183908045, 0)
- TextBox.Size = UDim2.new(0, 178, 0, 37)
- TextBox.Font = Enum.Font.GothamBlack
- TextBox.PlaceholderColor3 = Color3.new(1, 1, 1)
- TextBox.PlaceholderText = text
- TextBox.Text = ""
- TextBox.TextColor3 = Color3.new(1, 1, 1)
- TextBox.TextSize = 22
- TextBox.TextWrapped = true
- TextBox.FocusLost:Connect(function()
- callback(TextBox.Text);
- end)
- library:TextSizer(TextBox, 22)
- library:Resize(ContainerShittyD)
- end
- function epicL:Toggle(text, callback)
- local toggled = false
- text = text or "Toggle"
- callback = callback or function() end;
- local Toggle = Instance.new("TextLabel")
- local ToggleButton = Instance.new("TextButton")
- Toggle.Name = "Toggle"
- Toggle.Parent = ContainerShittyD
- Toggle.BackgroundColor3 = Color3.new(1, 1, 1)
- Toggle.BackgroundTransparency = 1
- Toggle.Size = UDim2.new(0, 178, 0, 32)
- Toggle.Font = Enum.Font.SourceSansBold
- Toggle.Text = text
- Toggle.TextColor3 = Color3.new(1, 1, 1)
- Toggle.TextSize = 20
- library:TextSizer(Toggle, 20)
- ToggleButton.Name = "ToggleButton"
- ToggleButton.Parent = Toggle
- ToggleButton.BackgroundColor3 = Color3.new(1, 0, 0)
- ToggleButton.BackgroundTransparency = 1
- ToggleButton.Position = UDim2.new(0.803370774, 0, 0.03125, 0)
- ToggleButton.Size = UDim2.new(0, 35, 0, 30)
- ToggleButton.Font = Enum.Font.SourceSansBold
- ToggleButton.Text = "OFF"
- ToggleButton.TextColor3 = Color3.new(1, 0, 0)
- ToggleButton.TextSize = 20
- ToggleButton.MouseButton1Click:Connect(function()
- if toggled then
- ToggleButton.Text = "OFF"
- ToggleButton.TextColor3 = Color3.new(1, 0, 0)
- toggled = false
- else
- ToggleButton.Text = "ON"
- ToggleButton.TextColor3 = Color3.fromRGB(0, 255, 0)
- toggled = true
- end
- end)
- library:TextSizer(ToggleButton, 20)
- library:Resize(ContainerShittyD)
- spawn(function()
- while wait() do
- if toggled then
- callback(true);
- else
- callback(false)
- end
- end
- end)
- return ToggleButton;
- end
- return epicL;
- end
- return epicLibrary;
- end
- return library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement