Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local library = {
- windowcount = 0;
- }
- function library:CreateWindow(text)
- library.windowcount = library.windowcount + 1
- text = text or "Window"
- local HaxxLib = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local func = Instance.new("Frame")
- local TextLabel = Instance.new("TextLabel")
- local MinBtn = Instance.new("TextButton")
- local Diamond = Instance.new("ImageLabel")
- local Panel = Instance.new("Frame")
- local BtnFrames = Instance.new("Frame")
- local UIListLayout = Instance.new("UIListLayout")
- local Underline = Instance.new("Frame")
- HaxxLib.Name = "HaxxLib"
- HaxxLib.Parent = game.CoreGui
- HaxxLib.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- HaxxLib.ResetOnSpawn = false
- Frame.Parent = HaxxLib
- Frame.BackgroundColor3 = Color3.new(1, 1, 1)
- Frame.BackgroundTransparency = 1
- Frame.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
- Frame.Position = UDim2.new(0, (15 + ((200 * self.windowcount) - 200)), 0, 15)
- Frame.Size = UDim2.new(0, 1920, 0, 496)
- func.Name = "func"
- func.Parent = Frame
- func.Active = true
- func.BackgroundColor3 = Color3.new(0.184314, 0.184314, 0.184314)
- func.BorderSizePixel = 0
- func.Draggable = true
- func.Position = UDim2.new(0.0124454685, 0, 0.0345371962, 0)
- func.Selectable = true
- func.Size = UDim2.new(0, 177, 0, 43)
- TextLabel.Parent = func
- TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
- TextLabel.BackgroundTransparency = 1
- TextLabel.Position = UDim2.new(0.231792897, 0, 0.224843681, 0)
- TextLabel.Size = UDim2.new(0, 93, 0, 15)
- TextLabel.Font = Enum.Font.SourceSansBold
- TextLabel.Text = text
- TextLabel.TextColor3 = Color3.new(0.490196, 1, 0.788235)
- TextLabel.TextScaled = true
- TextLabel.TextSize = 14
- TextLabel.TextWrapped = true
- MinBtn.Name = "MinBtn"
- MinBtn.Parent = func
- MinBtn.BackgroundColor3 = Color3.new(1, 1, 1)
- MinBtn.BackgroundTransparency = 1
- MinBtn.Position = UDim2.new(0.754991829, 0, -0.0223813951, 0)
- MinBtn.Size = UDim2.new(0, 54, 0, 34)
- MinBtn.Font = Enum.Font.SourceSansBold
- MinBtn.Text = "-"
- MinBtn.TextColor3 = Color3.new(0.490196, 1, 0.788235)
- MinBtn.TextScaled = true
- MinBtn.TextSize = 14
- MinBtn.TextWrapped = true
- Diamond.Name = "Diamond"
- Diamond.Parent = func
- Diamond.BackgroundColor3 = Color3.new(1, 1, 1)
- Diamond.BackgroundTransparency = 1
- Diamond.Position = UDim2.new(0.0254812501, 0, 0.0999122635, 0)
- Diamond.Size = UDim2.new(0.172413319, 0, 0.141544059, 0)
- Diamond.SizeConstraint = Enum.SizeConstraint.RelativeXX
- Diamond.Image = "rbxassetid://4851247883"
- Diamond.ScaleType = Enum.ScaleType.Fit
- Panel.Name = "Panel"
- Panel.Parent = func
- Panel.BackgroundColor3 = Color3.new(0.184314, 0.184314, 0.184314)
- Panel.BorderSizePixel = 0
- Panel.Position = UDim2.new(0, 0, 0.966999829, 0)
- Panel.Size = UDim2.new(0, 177, 0, 395)
- BtnFrames.Name = "BtnFrames"
- BtnFrames.Parent = Panel
- BtnFrames.BackgroundColor3 = Color3.new(1, 1, 1)
- BtnFrames.BackgroundTransparency = 1
- BtnFrames.Position = UDim2.new(0, 0, 0.014581793, 0)
- BtnFrames.Size = UDim2.new(0, 176, 0, 0)
- UIListLayout.Parent = BtnFrames
- UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
- UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
- UIListLayout.Padding = UDim.new(0, 5)
- Underline.Name = "Underline"
- Underline.Parent = func
- Underline.BackgroundColor3 = Color3.new(0.490196, 1, 0.788235)
- Underline.BorderSizePixel = 0
- Underline.Position = UDim2.new(0, 0, 0.95348835, 0)
- Underline.Size = UDim2.new(0, 177, 0, 3)
- local epicLibrary = {}
- function epicLibrary:Button(text, callback)
- local Button = Instance.new("TextButton")
- local UITextSizeConstraint = Instance.new("UITextSizeConstraint")
- text = text or "Button"
- callback = callback or function() end;
- Button.Name = "Button"
- Button.Parent = BtnFrames
- Button.BackgroundColor3 = Color3.new(0.282353, 0.282353, 0.282353)
- Button.BorderSizePixel = 0
- Button.Position = UDim2.new(0.00651116669, 0, -0.135416672, 0)
- Button.Size = UDim2.new(0, 165, 0, 38)
- Button.Font = Enum.Font.SourceSansBold
- Button.Text = text
- Button.TextColor3 = Color3.new(1, 1, 1)
- Button.TextSize = 14
- Button.MouseButton1Click:Connect(callback)
- UITextSizeConstraint.MinTextSize = 14
- UITextSizeConstraint.MaxTextSize = 14
- UITextSizeConstraint.Parent = Button
- BtnFrames.Size = BtnFrames.Size + UDim2.new(0, 165, 0, 38)
- return Button;
- end
- function epicLibrary:Box(text, callback)
- local UITextSizeConstraint = Instance.new("UITextSizeConstraint")
- local Box = Instance.new("TextBox")
- text = text or "Box"
- callback = callback or function() end;
- Box.Name = "Box"
- Box.Parent = BtnFrames
- Box.BackgroundColor3 = Color3.new(0.156863, 0.156863, 0.156863)
- Box.BorderSizePixel = 0
- Box.Position = UDim2.new(0.0340568386, 0, 0.236666664, 0)
- Box.Size = UDim2.new(0, 164, 0, 19)
- Box.Font = Enum.Font.SourceSansBold
- Box.PlaceholderColor3 = Color3.new(1, 1, 1)
- Box.PlaceholderText = text
- Box.TextColor3 = Color3.new(1, 1, 1)
- Box.TextSize = 14
- box.FocusLost:connect(function(...)
- callback(box, ...)
- end)
- UITextSizeConstraint.MinTextSize = 14
- UITextSizeConstraint.MaxTextSize = 14
- UITextSizeConstraint.Parent = Box
- BtnFrames.Size = BtnFrames.Size + UDim2.new(0, 164, 0, 19)
- return Box;
- end
- function epicLibrary:Slider(text, min, max, callback)
- local mouse = game.Players.LocalPlayer:GetMouse()
- local uis = game:GetService("UserInputService")
- local Value = 0;
- text = text or "Slider"
- min = min or 0
- max = max or 100
- callback = callback or function() end;
- local Slider = Instance.new("Frame")
- local Title = Instance.new("TextLabel")
- local UITextSizeConstraint_2 = Instance.new("UITextSizeConstraint")
- local NumberValue = Instance.new("TextLabel")
- local UITextSizeConstraint_3 = Instance.new("UITextSizeConstraint")
- local SliderButton = Instance.new("TextButton")
- local SliderFrame = Instance.new("Frame")
- Slider.Name = "Slider"
- Slider.Parent = BtnFrames
- Slider.BackgroundColor3 = Color3.new(0.156863, 0.156863, 0.156863)
- Slider.BorderSizePixel = 0
- Slider.Position = UDim2.new(0.0397727266, 0, 0.316666663, 0)
- Slider.Size = UDim2.new(0, 162, 0, 63)
- Title.Name = "Title"
- Title.Parent = Slider
- Title.BackgroundColor3 = Color3.new(1, 1, 1)
- Title.BackgroundTransparency = 1
- Title.Position = UDim2.new(0.0432098769, 0, 0, 0)
- Title.Size = UDim2.new(0, 119, 0, 20)
- Title.Font = Enum.Font.SourceSansBold
- Title.TextColor3 = Color3.new(1, 1, 1)
- Title.Text = text
- Title.TextSize = 14
- Title.TextXAlignment = Enum.TextXAlignment.Left
- UITextSizeConstraint_2.Parent = Title
- UITextSizeConstraint_2.MaxTextSize = 14
- UITextSizeConstraint_2.MinTextSize = 14
- NumberValue.Name = "NumberValue"
- NumberValue.Parent = Slider
- NumberValue.BackgroundColor3 = Color3.new(1, 1, 1)
- NumberValue.BackgroundTransparency = 1
- NumberValue.Position = UDim2.new(0.777777731, 0, 0, 0)
- NumberValue.Size = UDim2.new(0, 34, 0, 20)
- NumberValue.Font = Enum.Font.SourceSansBold
- NumberValue.Text = 0
- NumberValue.TextColor3 = Color3.new(1, 1, 1)
- NumberValue.TextSize = 14
- UITextSizeConstraint_3.Parent = NumberValue
- UITextSizeConstraint_3.MaxTextSize = 14
- UITextSizeConstraint_3.MinTextSize = 14
- SliderButton.Name = "SliderButton"
- SliderButton.Parent = Slider
- SliderButton.BackgroundColor3 = Color3.new(0.129412, 0.129412, 0.129412)
- SliderButton.BorderSizePixel = 0
- SliderButton.Position = UDim2.new(0.0308641493, 0, 0.499673754, 0)
- SliderButton.Size = UDim2.new(0, 152, 0, 20)
- SliderButton.Font = Enum.Font.SourceSans
- SliderButton.Text = ""
- SliderButton.TextColor3 = Color3.new(0, 0, 0)
- SliderButton.TextSize = 14
- SliderFrame.Name = "SliderFrame"
- SliderFrame.Parent = SliderButton
- SliderFrame.BackgroundColor3 = Color3.new(0.894118, 0.384314, 0.270588)
- SliderFrame.BorderSizePixel = 0
- SliderFrame.Size = UDim2.new(0, 0, 0, 19)
- SliderButton.MouseButton1Down:Connect(function()
- Value = math.floor((((tonumber(max) - tonumber(min)) / 152) * SliderFrame.AbsoluteSize.X) + tonumber(min)) or 0
- pcall(function()
- callback(Value)
- end)
- SliderFrame.Size = UDim2.new(0, math.clamp(mouse.X - SliderFrame.AbsolutePosition.X, 0, 152), 0, 20)
- SliderFrame:GetPropertyChangedSignal("Size"):Connect(function()
- Value = math.floor((((tonumber(max) - tonumber(min)) / 152) * SliderFrame.AbsoluteSize.X) + tonumber(min)) or 0
- NumberValue.Text = Value
- pcall(function()
- callback(Value)
- end)
- end)
- moveconnection = mouse.Move:Connect(function()
- NumberValue.Text = Value
- Value = math.floor((((tonumber(max) - tonumber(min)) / 152) * SliderFrame.AbsoluteSize.X) + tonumber(min))
- pcall(function()
- callback(Value)
- end)
- SliderFrame.Size = UDim2.new(0, math.clamp(mouse.X - SliderFrame.AbsolutePosition.X, 0, 152), 0, 20)
- end)
- releaseconnection = uis.InputEnded:Connect(function(Mouse)
- if Mouse.UserInputType == Enum.UserInputType.MouseButton1 then
- Value = math.floor((((tonumber(max) - tonumber(min)) / 146) * SliderFrame.AbsoluteSize.X) + tonumber(min))
- pcall(function()
- callback(Value)
- end)
- SliderFrame.Size = UDim2.new(0, math.clamp(mouse.X - SliderFrame.AbsolutePosition.X, 0, 152), 0, 20)
- moveconnection:Disconnect()
- releaseconnection:Disconnect()
- end
- end)
- end)
- return SliderButton;
- end
- function epicLibrary:Toggle(text, callback)
- local Toggle = Instance.new("TextLabel")
- local Toggable = Instance.new("TextButton")
- local toggled = false
- text = text or "Toggle"
- callback = callback or function() end;
- Toggle.Name = "Toggle"
- Toggle.Parent = BtnFrames
- Toggle.BackgroundColor3 = Color3.new(1, 1, 1)
- Toggle.BackgroundTransparency = 1
- Toggle.Position = UDim2.new(0.0255681816, 0, 0.143333331, 0)
- Toggle.Size = UDim2.new(0, 166, 0, 23)
- Toggle.Font = Enum.Font.SourceSansBold
- Toggle.Text = text
- Toggle.TextColor3 = Color3.new(1, 1, 1)
- Toggle.TextSize = 14
- Toggle.TextXAlignment = Enum.TextXAlignment.Right
- Toggable.Name = "Toggable"
- Toggable.Parent = Toggle
- Toggable.BackgroundColor3 = Color3.new(0.14902, 0.14902, 0.14902)
- Toggable.BorderSizePixel = 0
- Toggable.Position = UDim2.new(0.00598797807, 0, 0, 0)
- Toggable.Size = UDim2.new(0, 23, 0, 23)
- Toggable.Font = Enum.Font.SourceSans
- Toggable.Text = ""
- Toggable.TextColor3 = Color3.new(1, 1, 1)
- Toggable.TextSize = 14
- Toggable.MouseButton1Click:Connect(function()
- if toggled then
- toggled = false
- Toggable.BackgroundColor3 = Color3.new(0.14902, 0.14902, 0.14902)
- else
- toggled = true
- Toggable.BackgroundColor3 = Color3.new(0.333333, 1, 0)
- end
- end)
- spawn(function()
- while wait() do
- if toggled then
- callback();
- end
- end
- end)
- end
- return epicLibrary
- end
- return library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement