Cleanui
Cleanui
-- Example at bottom
--
local Library = {};
do
Library = {
Open = true;
Accent = Color3.fromRGB(85, 170, 255);
PageAmount = 0;
Pages = {};
Sections = {};
Flags = {};
UnNamedFlags = 0;
ThemeObjects = {};
Holder = nil;
Keys = {
[Enum.KeyCode.LeftShift] = "LShift",
[Enum.KeyCode.RightShift] = "RShift",
[Enum.KeyCode.LeftControl] = "LCtrl",
[Enum.KeyCode.RightControl] = "RCtrl",
[Enum.KeyCode.LeftAlt] = "LAlt",
[Enum.KeyCode.RightAlt] = "RAlt",
[Enum.KeyCode.CapsLock] = "Caps",
[Enum.KeyCode.One] = "1",
[Enum.KeyCode.Two] = "2",
[Enum.KeyCode.Three] = "3",
[Enum.KeyCode.Four] = "4",
[Enum.KeyCode.Five] = "5",
[Enum.KeyCode.Six] = "6",
[Enum.KeyCode.Seven] = "7",
[Enum.KeyCode.Eight] = "8",
[Enum.KeyCode.Nine] = "9",
[Enum.KeyCode.Zero] = "0",
[Enum.KeyCode.KeypadOne] = "Num1",
[Enum.KeyCode.KeypadTwo] = "Num2",
[Enum.KeyCode.KeypadThree] = "Num3",
[Enum.KeyCode.KeypadFour] = "Num4",
[Enum.KeyCode.KeypadFive] = "Num5",
[Enum.KeyCode.KeypadSix] = "Num6",
[Enum.KeyCode.KeypadSeven] = "Num7",
[Enum.KeyCode.KeypadEight] = "Num8",
[Enum.KeyCode.KeypadNine] = "Num9",
[Enum.KeyCode.KeypadZero] = "Num0",
[Enum.KeyCode.Minus] = "-",
[Enum.KeyCode.Equals] = "=",
[Enum.KeyCode.Tilde] = "~",
[Enum.KeyCode.LeftBracket] = "[",
[Enum.KeyCode.RightBracket] = "]",
[Enum.KeyCode.RightParenthesis] = ")",
[Enum.KeyCode.LeftParenthesis] = "(",
[Enum.KeyCode.Semicolon] = ",",
[Enum.KeyCode.Quote] = "'",
[Enum.KeyCode.BackSlash] = "\\",
[Enum.KeyCode.Comma] = ",",
[Enum.KeyCode.Period] = ".",
[Enum.KeyCode.Slash] = "/",
[Enum.KeyCode.Asterisk] = "*",
[Enum.KeyCode.Plus] = "+",
[Enum.KeyCode.Period] = ".",
[Enum.KeyCode.Backquote] = "`",
[Enum.UserInputType.MouseButton1] = "MB1",
[Enum.UserInputType.MouseButton2] = "MB2",
[Enum.UserInputType.MouseButton3] = "MB3"
};
Connections = {};
UIKey = Enum.KeyCode.End;
ScreenGUI = nil;
FSize = 12;
UIFont = nil;
SettingsPage = nil;
VisValues = {};
Cooldown = false;
Friends = {};
Priorities = {};
KeyList = nil;
Notifs = {};
}
-- // Ignores
local Flags = {}; -- Ignore
-- // Extension
Library.__index = Library
Library.Pages.__index = Library.Pages
Library.Sections.__index = Library.Sections
local LocalPlayer = game:GetService('Players').LocalPlayer;
local Mouse = LocalPlayer:GetMouse();
local TweenService = game:GetService("TweenService");
-- // Misc Functions
do
function Library:Connection(Signal, Callback)
local Con = Signal:Connect(Callback)
return Con
end
--
function Library:Disconnect(Connection)
Connection:Disconnect()
end
--
function Library:Round(Number, Float)
return Float * math.floor(Number / Float)
end
--
function Library.NextFlag()
Library.UnNamedFlags = Library.UnNamedFlags + 1
return string.format("%.14g", Library.UnNamedFlags)
end
--
function Library:RGBA(r, g, b)
local rgb = Color3.fromRGB(r, g, b)
return rgb
end
--
function Library:GetConfig()
local Config = ""
for Index, Value in pairs(self.Flags) do
if
Index ~= "ConfigConfig_List"
and Index ~= "ConfigConfig_Load"
and Index ~= "ConfigConfig_Save"
then
local Value2 = Value
local Final = ""
--
if typeof(Value2) == "Color3" then
local hue, sat, val = Value2:ToHSV()
--
Final = ("rgb(%s,%s,%s,%s)"):format(hue, sat,
val, 1)
elseif typeof(Value2) == "table" and Value2.Color and
Value2.Transparency then
local hue, sat, val = Value2.Color:ToHSV()
--
Final = ("rgb(%s,%s,%s,%s)"):format(hue, sat,
val, Value2.Transparency)
elseif typeof(Value2) == "table" and Value.Mode then
local Values = Value.current
--
Final = ("key(%s,%s,%s)"):format(Values[1] or
"nil", Values[2] or "nil", Value.Mode)
elseif Value2 ~= nil then
if typeof(Value2) == "boolean" then
Value2 =
("bool(%s)"):format(tostring(Value2))
elseif typeof(Value2) == "table" then
local New = "table("
--
for Index2, Value3 in pairs(Value2) do
New = New .. Value3 .. ","
end
--
if New:sub(#New) == "," then
New = New:sub(0, #New - 1)
end
--
Value2 = New .. ")"
elseif typeof(Value2) == "string" then
Value2 = ("string(%s)"):format(Value2)
elseif typeof(Value2) == "number" then
Value2 = ("number(%s)"):format(Value2)
end
--
Final = Value2
end
--
Config = Config .. Index .. ": " ..
tostring(Final) .. "\n"
end
end
--
return Config
end
--
function Library:LoadConfig(Config)
local Table = string.split(Config, "\n")
local Table2 = {}
for Index, Value in pairs(Table) do
local Table3 = string.split(Value, ":")
--
if Table3[1] ~= "ConfigConfig_List" and #Table3 >= 2 then
local Value = Table3[2]:sub(2, #Table3[2])
--
if Value:sub(1, 3) == "rgb" then
local Table4 = string.split(Value:sub(5, #Value
- 1), ",")
--
Value = Table4
elseif Value:sub(1, 3) == "key" then
local Table4 = string.split(Value:sub(5, #Value
- 1), ",")
--
if Table4[1] == "nil" and Table4[2] == "nil"
then
Table4[1] = nil
Table4[2] = nil
end
--
Value = Table4
elseif Value:sub(1, 4) == "bool" then
local Bool = Value:sub(6, #Value - 1)
--
Value = Bool == "true"
elseif Value:sub(1, 5) == "table" then
local Table4 = string.split(Value:sub(7, #Value
- 1), ",")
--
Value = Table4
elseif Value:sub(1, 6) == "string" then
local String = Value:sub(8, #Value - 1)
--
Value = String
elseif Value:sub(1, 6) == "number" then
local Number = tonumber(Value:sub(8, #Value -
1))
--
Value = Number
end
--
Table2[Table3[1]] = Value
end
end
--
for i, v in pairs(Table2) do
if Flags[i] then
if typeof(Flags[i]) == "table" then
Flags[i]:Set(v)
else
Flags[i](v)
end
end
end
end
--
function Library:SetOpen(bool)
if typeof(bool) == 'boolean' then
Library.Open = bool;
Library.Holder.Visible = bool;
end
end;
--
function Library:IsMouseOverFrame(Frame)
local AbsPos, AbsSize = Frame.AbsolutePosition,
Frame.AbsoluteSize;
return true;
end;
end;
--
function Library:ChangeAccent(Color)
Library.Accent = Color
Library:Connection(object.MouseButton1Down, function(input)
dragging = true
start = input
end)
Library:Connection(Mouse.Move, function(input)
if dragging then
local MouseLocation =
game:GetService("UserInputService"):GetMouseLocation()
local X = math.clamp(MouseLocation.X -
background.AbsolutePosition.X, 550, 9999)
local Y = math.clamp((MouseLocation.Y - 36) -
background.AbsolutePosition.Y, 600, 9999)
currentsize = UDim2.new(0,X,0,Y)
background.Size = currentsize
for Index, Page in pairs(Library.Pages) do
Page.Elements.Button.Size = UDim2.new(0,
Library.PageAmount and ((((background.Size.X.Offset - 35) - ((Library.PageAmount -
1) * 2)) / Library.PageAmount)) - 3 or 65, 1, 0);
end
end;
end)
Library:Connection(game:GetService("UserInputService").InputEnded,
function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1
then
dragging = false
end
end)
end
end;
-- // Colorpicker Element
do
function Library:NewPicker(name, default, defaultalpha, parent, count,
flag, callback)
-- // Instances
local Icon = Instance.new("TextButton", parent)
--
Icon.Name = "Icon"
Icon.AnchorPoint = Vector2.new(0, 0.5)
Icon.BackgroundColor3 = default
Icon.BorderColor3 = Color3.fromRGB(50,50,50)
Icon.BorderSizePixel = 1
if count == 1 then
Icon.Position = UDim2.new(1, - (count * 21),0.5,0)
else
Icon.Position = UDim2.new(1, - (count * 21) - (count *
4),0.5,0)
end
Icon.Size = UDim2.new(0, 20, 0, 8)
Icon.Text = ""
Icon.AutoButtonColor = false
Outline.Parent = Color
Color.Parent = ColorInline
local Hue = Instance.new("ImageButton")
Hue.Name = "Hue"
Hue.Image = "http://www.roblox.com/asset/?id=14684557999"
Hue.AutoButtonColor = false
Hue.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Hue.BorderColor3 = Color3.fromRGB(50, 50, 50)
Hue.Position = UDim2.new(1, -16, 0, 6)
Hue.Size = UDim2.new(0, 10, 1, -12)
Outline2.Parent = Hue
Hue.Parent = ColorInline
ColorInline.Parent = ColorWindow
-- // Connections
local mouseover = false
local hue, sat, val = default:ToHSV()
local hsv = default:ToHSV()
local alpha = defaultalpha
local oldcolor = hsv
local slidingsaturation = false
local slidinghue = false
local slidingalpha = false
if flag then
Library.Flags[flag] = Library:RGBA(hsv.r * 255, hsv.g
* 255, hsv.b * 255)
end
if flag then
Library.Flags[flag] = Library:RGBA(hsv.r * 255,
hsv.g * 255, hsv.b * 255)
end
Flags[flag] = set
set(default, defaultalpha)
Sat.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1
then
slidingsaturation = true
update()
end
end)
Sat.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1
then
slidingsaturation = false
update()
end
end)
Hue.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1
then
slidinghue = true
update()
end
end)
Hue.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1
then
slidinghue = false
update()
end
end)
Library:Connection(game:GetService("UserInputService").InputChanged,
function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement
then
if slidinghue then
update()
end
if slidingsaturation then
update()
end
end
end)
local colorpickertypes = {}
Library:Connection(game:GetService("UserInputService").InputBegan,
function(Input)
if ColorWindow.Visible and Input.UserInputType ==
Enum.UserInputType.MouseButton1 then
if not Library:IsMouseOverFrame(ColorWindow) and not
Library:IsMouseOverFrame(Icon) and not Library:IsMouseOverFrame(parent) then
ColorWindow.Visible = false
parent.ZIndex = 1
end
end
end)
Icon.MouseButton1Down:Connect(function()
ColorWindow.Visible = true
parent.ZIndex = 5
if slidinghue then
slidinghue = false
end
if slidingsaturation then
slidingsaturation = false
end
end)
function Library:updateNotifsPositions(position)
for i, v in pairs(Library.Notifs) do
local Position = Vector2.new(20, 20)
game:GetService("TweenService"):Create(v.Container,
TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Position =
UDim2.new(0,Position.X,0,Position.Y + (i * 25))}):Play()
end
end
Value.Parent = Inline
Inline.Parent = Outline
function notification:remove()
table.remove(Library.Notifs, table.find(Library.Notifs,
notification))
Library:updateNotifsPositions(Position)
task.wait(0.5)
notification.Container:Destroy()
end
task.spawn(function()
Outline.AnchorPoint = Vector2.new(1,0)
for i,v in next, notification.Objects do
if v:IsA("Frame") then
game:GetService("TweenService"):Create(v,
TweenInfo.new(1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
{BackgroundTransparency = 0}):Play()
elseif v:IsA("UIStroke") then
game:GetService("TweenService"):Create(v,
TweenInfo.new(1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Transparency =
0.8}):Play()
end
end
local Tween1 = game:GetService("TweenService"):Create(Outline,
TweenInfo.new(1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {AnchorPoint =
Vector2.new(0,0)}):Play()
game:GetService("TweenService"):Create(Value, TweenInfo.new(1,
Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {TextTransparency = 0}):Play()
task.wait(duration)
game:GetService("TweenService"):Create(Outline, TweenInfo.new(1,
Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {AnchorPoint =
Vector2.new(1,0)}):Play()
for i,v in next, notification.Objects do
if v:IsA("Frame") then
game:GetService("TweenService"):Create(v,
TweenInfo.new(1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
{BackgroundTransparency = 1}):Play()
elseif v:IsA("UIStroke") then
game:GetService("TweenService"):Create(v,
TweenInfo.new(1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Transparency =
1}):Play()
end
end
game:GetService("TweenService"):Create(Value, TweenInfo.new(1,
Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {TextTransparency = 1}):Play()
end)
task.delay(duration, function()
notification:remove()
end)
table.insert(Library.Notifs, notification)
NotifContainer.Position = UDim2.new(0,Position.X,0,Position.Y +
(table.find(Library.Notifs, notification) * 25))
Library:updateNotifsPositions(Position)
return notification
end
do
local Pages = Library.Pages;
local Sections = Library.Sections;
--
function Library:Window(Options)
local Window = {
Pages = {};
Sections = {};
Elements = {};
PageAmount = Options.Amount or Options.amount or 5;
Dragging = { false, UDim2.new(0, 0, 0, 0) };
Name = (Options.Name or Options.name or "Name");
};
--
local UI = Instance.new("ScreenGui",
game:GetService("RunService"):IsStudio() and game.Players.LocalPlayer.PlayerGui or
game.CoreGui)
UI.Name = "UI"
UI.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
Library.ScreenGUI = UI
PageOutline.Parent = HolderInline
Tabs.Parent = HolderInline
HolderInline.Parent = HolderOutline
HolderOutline.Parent = Inline
Inline.Parent = AccentOutline
AccentOutline.Parent = UI
-- // Elements
Window.Elements = {
TabHolder = Tabs,
Holder = PageInline,
Base = AccentOutline,
}
-- // Dragging
Library:Connection(AccentOutline.MouseButton1Down, function()
local Location =
game:GetService("UserInputService"):GetMouseLocation()
Window.Dragging[1] = true
Window.Dragging[2] = UDim2.new(0, Location.X -
AccentOutline.AbsolutePosition.X, 0, Location.Y - AccentOutline.AbsolutePosition.Y)
end)
Library:Connection(game:GetService("UserInputService").InputEnded,
function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1
and Window.Dragging[1] then
local Location =
game:GetService("UserInputService"):GetMouseLocation()
Window.Dragging[1] = false
Window.Dragging[2] = UDim2.new(0, 0, 0, 0)
end
end)
Library:Connection(game:GetService("UserInputService").InputChanged,
function(Input)
local Location =
game:GetService("UserInputService"):GetMouseLocation()
local ActualLocation = nil
-- Dragging
if Window.Dragging[1] then
AccentOutline.Position = UDim2.new(
0,
Location.X - Window.Dragging[2].X.Offset +
(AccentOutline.Size.X.Offset * AccentOutline.AnchorPoint.X),
0,
Location.Y - Window.Dragging[2].Y.Offset +
(AccentOutline.Size.Y.Offset * AccentOutline.AnchorPoint.Y)
)
end
end)
Library:Connection(game:GetService("UserInputService").InputBegan,
function(Input)
if Input.KeyCode == Library.UIKey then
Library:SetOpen(not Library.Open)
end
end)
Library:Resize(Resize, AccentOutline)
-- // Functions
function Window:UpdateTabs()
for Index, Page in pairs(Window.Pages) do
Page:Turn(Page.Open)
end
end
-- // Returns
Library.Holder = AccentOutline
Library.PageAmount = Window.PageAmount;
return setmetatable(Window, Library)
end;
--
function Library:Page(Properties)
if not Properties then
Properties = {}
end
--
local Page = {
Name = Properties.Name or Properties.name or "Page",
Window = self,
Open = false,
Sections = {},
Pages = {},
Elements = {},
Weapons = {},
Size = Properties.Size or 65,
Icons = Properties.Weapons or Properties.weapons or false,
}
--
local NewButton = Instance.new("TextButton")
NewButton.Name = "NewButton"
NewButton.FontFace =
Font.new("rbxasset://fonts/families/SourceSansPro.json")
NewButton.Text = ""
NewButton.TextColor3 = Color3.fromRGB(0, 0, 0)
NewButton.TextSize = 14
NewButton.AutoButtonColor = false
NewButton.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
NewButton.BorderColor3 = Color3.fromRGB(0, 0, 0)
NewButton.Size = UDim2.new(0, Page.Window.PageAmount and
((((Page.Window.Elements.Base.Size.X.Offset - 35) - ((Page.Window.PageAmount - 1) *
2)) / Page.Window.PageAmount)) - 3 or Page.Size, 1, 0);
ButtonInline.Parent = NewButton
Line.Parent = NewButton
NewButton.Parent = Page.Window.Elements.TabHolder
Left.Parent = NewPage
Right.Parent = NewPage
Holder.Parent = WeaponInline
WeaponInline.Parent = Weapons
function Page:Turn(bool)
Page.Open = bool
if not Page.Icons then
NewPage.Visible = Page.Open
else
Weapons.Visible = Page.Open
for Index, Weapon in pairs(Page.Weapons) do
Weapon:Turn(Weapon.Open)
end
end
ButtonInline.BackgroundColor3 = Page.Open and
Color3.fromRGB(30, 30, 30) or Color3.fromRGB(20, 20, 20)
PageName.TextColor3 = Page.Open and Color3.fromRGB(255,
255, 255) or Color3.fromRGB(145,145,145)
Line.Size = Page.Open and UDim2.new(1, -2, 0, 4) or
UDim2.new(1, -2, 0, 3)
Line.BackgroundColor3 = Page.Open and Color3.fromRGB(30,
30, 30) or Color3.fromRGB(20, 20, 20)
Accent.Visible = Page.Open
end
--
Library:Connection(NewButton.MouseButton1Down, function()
if not Page.Open then
for _, Pages in pairs(Page.Window.Pages) do
if Pages.Open and Pages ~= Page then
Pages:Turn(false)
end
end
Page:Turn(true)
end
end)
function Page:UpdateWeapons()
for Index, Weapon in pairs(Page.Weapons) do
Weapon.Elements.Button.Size =
UDim2.new(1/#Page.Weapons,0,1,0)
Weapon:Turn(Weapon.Open)
end
end
-- // Elements
Page.Elements = {
Left = Page.Icons and nil or Left,
Right = Page.Icons and nil or Right,
Main = NewPage,
Button = NewButton,
WeaponOutline = Weapons,
WeaponInline = Holder,
}
-- // Drawings
if #Page.Window.Pages == 0 then
Page:Turn(true)
end
Page.Window.Pages[#Page.Window.Pages + 1] = Page
Library.Pages[#Library.Pages + 1] = Page
Page.Window:UpdateTabs()
return setmetatable(Page, Library.Pages)
end
--
function Library:Watermark(Properties)
local Watermark = {
Name = (Properties.Name or Properties.name or "watermark
text | placeholder");
}
--
local Outline = Instance.new("Frame")
Outline.Name = "Outline"
Outline.AutomaticSize = Enum.AutomaticSize.X
Outline.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
Outline.BorderColor3 = Color3.fromRGB(0, 0, 0)
Outline.Position = UDim2.new(0.01, 0,0.02, 0)
Outline.Size = UDim2.new(0, 0, 0, 16)
Outline.Visible = false
Outline.Parent = Library.ScreenGUI
Value.Parent = Inline
Inline.Parent = Outline
-- // Functions
function Watermark:UpdateText(NewText)
Value.Text = NewText;
end;
function Watermark:SetVisible(State)
Outline.Visible = State;
end;
return Watermark
end
--
function Pages:Weapon(Properties)
if not Properties then
Properties = {}
end
--
local Weapon = {
Icon = Properties.Icon or Properties.icon or
"rbxassetid://6034281935",
Page = self,
Open = false,
Sections = {},
Elements = {},
}
--
--Weapon.Window.Elements.WeaponOutline.Visible = true
Right.Parent = NewPage
function Weapon:Turn(bool)
Weapon.Open = bool
NewPage.Visible = Weapon.Open and Weapon.Page.Open
NewWeapon.ImageColor3 = Weapon.Open and Color3.new(1,1,1)
or Color3.fromRGB(145,145,145)
end
--
Library:Connection(NewWeapon.MouseButton1Down, function()
if not Weapon.Open then
Weapon:Turn(true)
for _, Weapons in pairs(Weapon.Page.Weapons) do
if Weapons.Open and Weapons ~= Weapon then
Weapons:Turn(false)
end
end
end
end)
--
-- // Elements
Weapon.Elements = {
Left = Left,
Right = Right,
Button = NewWeapon,
Main = NewPage
}
-- // Drawings
if #Weapon.Page.Weapons == 0 then
Weapon:Turn(true)
end
Weapon.Page.Weapons[#Weapon.Page.Weapons + 1] = Weapon
Weapon.Page:UpdateWeapons()
return setmetatable(Weapon, Library.Pages)
end
--
function Pages:Section(Properties)
if not Properties then
Properties = {}
end
--
local Section = {
Name = Properties.Name or "Section",
Page = self,
Side = (Properties.side or Properties.Side or
"left"):lower(),
Zindex = (Properties.Zindex or Properties.zindex or 1),
Elements = {},
Content = {},
Sections = {},
}
--
local SectionOutline = Instance.new("Frame")
SectionOutline.Name = "SectionOutline"
SectionOutline.AutomaticSize = Enum.AutomaticSize.Y
SectionOutline.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
SectionOutline.BorderColor3 = Color3.fromRGB(0, 0, 0)
SectionOutline.Size = UDim2.new(1, 0, 0, 20)
SectionOutline.Parent = Section.Side == "left" and
Section.Page.Elements.Left or Section.Side == "right" and
Section.Page.Elements.Right
SectionOutline.ZIndex = 10 - #Section.Page.Sections
SectionContent.Parent = SectionInline
SectionInline.Parent = SectionOutline
-- // Elements
Section.Elements = {
SectionContent = SectionContent;
}
-- // Returning
Section.Page.Sections[#Section.Page.Sections + 1] = Section
return setmetatable(Section, Library.Sections)
end
--
function Sections:Toggle(Properties)
if not Properties then
Properties = {}
end
--
local Toggle = {
Window = self.Window,
Page = self.Page,
Section = self,
Risk = Properties.Risk or false,
Name = Properties.Name or "Toggle",
State = (
Properties.state
or Properties.State
or Properties.def
or Properties.Def
or Properties.default
or Properties.Default
or false
),
Callback = (
Properties.callback
or Properties.Callback
or Properties.callBack
or Properties.CallBack
or function() end
),
Flag = (
Properties.flag
or Properties.Flag
or Properties.pointer
or Properties.Pointer
or Library.NextFlag()
),
Toggled = false,
Colorpickers = 0,
}
--
local NewToggle = Instance.new("TextButton")
NewToggle.Name = "NewToggle"
NewToggle.FontFace =
Font.new("rbxasset://fonts/families/SourceSansPro.json")
NewToggle.Text = ""
NewToggle.TextColor3 = Color3.fromRGB(0, 0, 0)
NewToggle.TextSize = 14
NewToggle.AutoButtonColor = false
NewToggle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
NewToggle.BackgroundTransparency = 1
NewToggle.BorderColor3 = Color3.fromRGB(0, 0, 0)
NewToggle.BorderSizePixel = 0
NewToggle.Size = UDim2.new(1, 0, 0, 10)
NewToggle.Parent = Toggle.Section.Elements.SectionContent
Inline.Parent = Outline
Outline.Parent = NewToggle
-- // Functions
local function SetState()
Toggle.Toggled = not Toggle.Toggled
Accent.Visible = Toggle.Toggled
Library.Flags[Toggle.Flag] = Toggle.Toggled
Toggle.Callback(Toggle.Toggled)
end
--
Library:Connection(NewToggle.MouseButton1Down, SetState)
function Toggle:Keybind(Properties)
local Properties = Properties or {}
local Keybind = {
Section = self,
Name = Properties.name or Properties.Name or
"Keybind",
State = (
Properties.state
or Properties.State
or Properties.def
or Properties.Def
or Properties.default
or Properties.Default
or nil
),
Mode = (Properties.mode or Properties.Mode or
"Toggle"),
UseKey = (Properties.UseKey or false),
Ignore = (Properties.ignore or Properties.Ignore or
false),
Callback = (
Properties.callback
or Properties.Callback
or Properties.callBack
or Properties.CallBack
or function() end
),
Flag = (
Properties.flag
or Properties.Flag
or Properties.pointer
or Properties.Pointer
or Library.NextFlag()
),
Binding = nil,
}
local Key
local State = false
--
local ModeBox = Instance.new("Frame")
local Hold = Instance.new("TextButton")
local Toggle = Instance.new("TextButton")
local Always = Instance.new("TextButton")
--
local kOutline = Instance.new("Frame")
kOutline.Name = "Outline"
kOutline.AnchorPoint = Vector2.new(0, 0.5)
kOutline.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
kOutline.BorderColor3 = Color3.fromRGB(0, 0, 0)
kOutline.Position = UDim2.new(1, -35, 0.5, 0)
kOutline.Size = UDim2.new(0, 35, 0, 12)
KInline.Parent = kOutline
kOutline.Parent = NewToggle
ModeBox.Name = "ModeBox"
ModeBox.Parent = kOutline
ModeBox.AnchorPoint = Vector2.new(0,0.5)
ModeBox.BackgroundColor3 = Color3.fromRGB(25,25,25)
ModeBox.BorderColor3 = Color3.fromRGB(50,50,50)
ModeBox.BorderSizePixel = 1
ModeBox.Size = UDim2.new(0, 65, 0, 60)
ModeBox.Position = UDim2.new(0,40,0.5,0)
ModeBox.Visible = false
Hold.Name = "Hold"
Hold.Parent = ModeBox
Hold.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Hold.BackgroundTransparency = 1.000
Hold.BorderColor3 = Color3.fromRGB(0, 0, 0)
Hold.BorderSizePixel = 0
Hold.Size = UDim2.new(1, 0, 0.333000004, 0)
Hold.ZIndex = 2
Hold.FontFace = Font.fromEnum(Enum.Font.RobotoMono)
Hold.Text = "Hold"
Hold.TextColor3 = Keybind.Mode == "Hold" and
Color3.fromRGB(255,255,255) or Color3.fromRGB(145,145,145)
Hold.TextSize = Library.FSize
Hold.TextStrokeTransparency = 0
Toggle.Name = "Toggle"
Toggle.Parent = ModeBox
Toggle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Toggle.BackgroundTransparency = 1.000
Toggle.BorderColor3 = Color3.fromRGB(0, 0, 0)
Toggle.BorderSizePixel = 0
Toggle.Position = UDim2.new(0, 0, 0.333000004, 0)
Toggle.Size = UDim2.new(1, 0, 0.333000004, 0)
Toggle.ZIndex = 2
Toggle.FontFace = Font.fromEnum(Enum.Font.RobotoMono)
Toggle.Text = "Toggle"
Toggle.TextColor3 = Keybind.Mode == "Toggle" and
Color3.fromRGB(255,255,255) or Color3.fromRGB(145,145,145)
Toggle.TextSize = Library.FSize
Toggle.TextStrokeTransparency = 0
Always.Name = "Always"
Always.Parent = ModeBox
Always.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Always.BackgroundTransparency = 1.000
Always.BorderColor3 = Color3.fromRGB(0, 0, 0)
Always.BorderSizePixel = 0
Always.Position = UDim2.new(0, 0, 0.666999996, 0)
Always.Size = UDim2.new(1, 0, 0.333000004, 0)
Always.ZIndex = 2
Always.FontFace = Font.fromEnum(Enum.Font.RobotoMono)
Always.Text = "Always"
Always.TextColor3 = Keybind.Mode == "Always" and
Color3.fromRGB(255,255,255) or Color3.fromRGB(145,145,145)
Always.TextSize = Library.FSize
Always.TextStrokeTransparency = 0
-- // Functions
local function set(newkey)
if string.find(tostring(newkey), "Enum") then
if c then
c:Disconnect()
if Keybind.Flag then
Library.Flags[Keybind.Flag] = false
end
Keybind.Callback(false)
end
if tostring(newkey):find("Enum.KeyCode.") then
newkey =
Enum.KeyCode[tostring(newkey):gsub("Enum.KeyCode.", "")]
elseif
tostring(newkey):find("Enum.UserInputType.") then
newkey =
Enum.UserInputType[tostring(newkey):gsub("Enum.UserInputType.", "")]
end
if newkey == Enum.KeyCode.Backspace then
Key = nil
if Keybind.UseKey then
if Keybind.Flag then
Library.Flags[Keybind.Flag] =
Key
end
Keybind.Callback(Key)
end
local text = "None"
Value.Text = text
elseif newkey ~= nil then
Key = newkey
if Keybind.UseKey then
if Keybind.Flag then
Library.Flags[Keybind.Flag] =
Key
end
Keybind.Callback(Key)
end
local text = (Library.Keys[newkey] or
tostring(newkey):gsub("Enum.KeyCode.", ""))
Value.Text = text
end
Value.Text = "..."
Keybind.Binding = Library:Connection(
game:GetService("UserInputService").InputBegan,
function(input, gpe)
set(
input.UserInputType ==
Enum.UserInputType.Keyboard and input.KeyCode
or input.UserInputType
)
Library:Disconnect(Keybind.Binding)
task.wait()
Keybind.Binding = nil
end
)
end
end)
--
Library:Connection(game:GetService("UserInputService").InputBegan,
function(inp)
if (inp.KeyCode == Key or inp.UserInputType == Key)
and not Keybind.Binding and not Keybind.UseKey then
if Keybind.Mode == "Hold" then
if Keybind.Flag then
Library.Flags[Keybind.Flag] = true
end
c =
Library:Connection(game:GetService("RunService").RenderStepped, function()
if Keybind.Callback then
Keybind.Callback(true)
end
end)
elseif Keybind.Mode == "Toggle" then
State = not State
if Keybind.Flag then
Library.Flags[Keybind.Flag] = State
end
Keybind.Callback(State)
end
end
end)
--
Library:Connection(game:GetService("UserInputService").InputEnded,
function(inp)
if Keybind.Mode == "Hold" and not Keybind.UseKey then
if Key ~= "" or Key ~= nil then
if inp.KeyCode == Key or
inp.UserInputType == Key then
if c then
c:Disconnect()
if Keybind.Flag then
Library.Flags[Keybind.Flag] = false
end
if Keybind.Callback then
Keybind.Callback(false)
end
end
end
end
end
end)
--
Library:Connection(KInline.MouseButton2Down, function()
ModeBox.Visible = true
NewToggle.ZIndex = 5
end)
--
Library:Connection(Hold.MouseButton1Down, function()
set("Hold")
Hold.TextColor3 = Color3.fromRGB(255,255,255)
Toggle.TextColor3 = Color3.fromRGB(145,145,145)
Always.TextColor3 = Color3.fromRGB(145,145,145)
ModeBox.Visible = false
NewToggle.ZIndex = 1
end)
--
Library:Connection(Toggle.MouseButton1Down, function()
set("Toggle")
Hold.TextColor3 = Color3.fromRGB(145,145,145)
Toggle.TextColor3 = Color3.fromRGB(255,255,255)
Always.TextColor3 = Color3.fromRGB(145,145,145)
ModeBox.Visible = false
NewToggle.ZIndex = 1
end)
--
Library:Connection(Always.MouseButton1Down, function()
set("Always")
Hold.TextColor3 = Color3.fromRGB(145,145,145)
Toggle.TextColor3 = Color3.fromRGB(145,145,145)
Always.TextColor3 = Color3.fromRGB(255,255,255)
ModeBox.Visible = false
NewToggle.ZIndex = 1
end)
--
Library:Connection(game:GetService("UserInputService").InputBegan,
function(Input)
if ModeBox.Visible and Input.UserInputType ==
Enum.UserInputType.MouseButton1 then
if not Library:IsMouseOverFrame(ModeBox) then
ModeBox.Visible = false
NewToggle.ZIndex = 1
end
end
end)
--
Library.Flags[Keybind.Flag .. "_KEY"] = Keybind.State
Library.Flags[Keybind.Flag .. "_KEY STATE"] = Keybind.Mode
Flags[Keybind.Flag] = set
Flags[Keybind.Flag .. "_KEY"] = set
Flags[Keybind.Flag .. "_KEY STATE"] = set
--
function Keybind:Set(key)
set(key)
end
-- // Returning
return Keybind
end
function Toggle:Colorpicker(Properties)
local Properties = Properties or {}
local Colorpicker = {
State = (
Properties.state
or Properties.State
or Properties.def
or Properties.Def
or Properties.default
or Properties.Default
or Color3.fromRGB(255, 0, 0)
),
Alpha = (
Properties.alpha
or Properties.Alpha
or Properties.transparency
or Properties.Transparency
or 1
),
Callback = (
Properties.callback
or Properties.Callback
or Properties.callBack
or Properties.CallBack
or function() end
),
Flag = (
Properties.flag
or Properties.Flag
or Properties.pointer
or Properties.Pointer
or Library.NextFlag()
),
}
-- // Functions
Toggle.Colorpickers = Toggle.Colorpickers + 1
local colorpickertypes = Library:NewPicker(
"",
Colorpicker.State,
Colorpicker.Alpha,
NewToggle,
Toggle.Colorpickers,
Colorpicker.Flag,
Colorpicker.Callback
)
function Colorpicker:Set(color)
colorpickertypes:set(color)
end
-- // Returning
return Colorpicker
end
-- // Misc Functions
function Toggle.Set(bool)
bool = type(bool) == "boolean" and bool or false
if Toggle.Toggled ~= bool then
SetState()
end
end
Toggle.Set(Toggle.State)
Library.Flags[Toggle.Flag] = Toggle.State
Flags[Toggle.Flag] = Toggle.Set
-- // Returning
return Toggle
end
--
function Sections:Slider(Properties)
if not Properties then
Properties = {}
end
--
local Slider = {
Window = self.Window,
Page = self.Page,
Section = self,
Name = Properties.Name or nil,
Min = (Properties.min or Properties.Min or
Properties.minimum or Properties.Minimum or 0),
State = (
Properties.state
or Properties.State
or Properties.def
or Properties.Def
or Properties.default
or Properties.Default
or 10
),
Max = (Properties.max or Properties.Max or
Properties.maximum or Properties.Maximum or 100),
Sub = (
Properties.suffix
or Properties.Suffix
or Properties.ending
or Properties.Ending
or Properties.prefix
or Properties.Prefix
or Properties.measurement
or Properties.Measurement
or ""
),
Decimals = (Properties.decimals or Properties.Decimals or
1),
Callback = (
Properties.callback
or Properties.Callback
or Properties.callBack
or Properties.CallBack
or function() end
),
Flag = (
Properties.flag
or Properties.Flag
or Properties.pointer
or Properties.Pointer
or Library.NextFlag()
),
Disabled = (Properties.Disabled or Properties.disable or
nil),
}
local TextValue = ("[value]" .. Slider.Sub)
--
local NewSlider = Instance.new("Frame")
NewSlider.Name = "NewSlider"
NewSlider.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
NewSlider.BackgroundTransparency = 1
NewSlider.BorderColor3 = Color3.fromRGB(0, 0, 0)
NewSlider.BorderSizePixel = 0
NewSlider.Size = UDim2.new(1, 0, 0, Slider.Name ~= nil and 26 or
12)
NewSlider.Parent = Slider.Section.Elements.SectionContent
Inline.Parent = Outline
Outline.Parent = NewSlider
-- // Functions
local Sliding = false
local Val = Slider.State
local function Set(value)
value = math.clamp(Library:Round(value, Slider.Decimals),
Slider.Min, Slider.Max)
Library.Flags[Slider.Flag] = value
Slider.Callback(value)
end
--
local function ISlide(input)
local sizeX = (input.Position.X -
Inline.AbsolutePosition.X) / Inline.AbsoluteSize.X
local value = ((Slider.Max - Slider.Min) * sizeX) +
Slider.Min
Set(value)
end
--
Library:Connection(Inline.InputBegan, function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1
then
Sliding = true
ISlide(input)
end
end)
Library:Connection(Inline.InputEnded, function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1
then
Sliding = false
end
end)
Library:Connection(Accent.InputBegan, function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1
then
Sliding = true
ISlide(input)
end
end)
Library:Connection(Accent.InputEnded, function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1
then
Sliding = false
end
end)
Library:Connection(game:GetService("UserInputService").InputChanged,
function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement
then
if Sliding then
ISlide(input)
end
end
end)
--
function Slider:Set(Value)
Set(Value)
end
--
Flags[Slider.Flag] = Set
Library.Flags[Slider.Flag] = Slider.State
Set(Slider.State)
-- // Returning
return Slider
end
--
function Sections:List(Properties)
local Properties = Properties or {};
local Dropdown = {
Window = self.Window,
Page = self.Page,
Section = self,
Open = false,
Name = Properties.Name or Properties.name or nil,
Options = (Properties.options or Properties.Options or
Properties.values or Properties.Values or {
"1",
"2",
"3",
}),
Max = (Properties.Max or Properties.max or nil),
ScrollMax = (Properties.ScrollingMax or
Properties.scrollingmax or nil),
State = (
Properties.state
or Properties.State
or Properties.def
or Properties.Def
or Properties.default
or Properties.Default
or nil
),
Callback = (
Properties.callback
or Properties.Callback
or Properties.callBack
or Properties.CallBack
or function() end
),
Flag = (
Properties.flag
or Properties.Flag
or Properties.pointer
or Properties.Pointer
or Library.NextFlag()
),
OptionInsts = {},
}
--
local NewList = Instance.new("Frame")
NewList.Name = "NewList"
NewList.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
NewList.BackgroundTransparency = 1
NewList.BorderColor3 = Color3.fromRGB(0, 0, 0)
NewList.BorderSizePixel = 0
NewList.Size = UDim2.new(1, 0, 0, Dropdown.Name ~= nil and 30 or
16)
NewList.Parent = Dropdown.Section.Elements.SectionContent
local Outline = Instance.new("Frame")
Outline.Name = "Outline"
Outline.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
Outline.BorderColor3 = Color3.fromRGB(0, 0, 0)
Outline.Position = UDim2.new(0, 0, 1, -16)
Outline.Size = UDim2.new(1, 0, 0, 16)
Inline.Parent = Outline
ContentInline.Parent = ContentOutline
ContentOutline.Parent = Outline
Outline.Parent = NewList
-- // Connections
Library:Connection(Inline.MouseButton1Down, function()
ContentOutline.Visible = not ContentOutline.Visible
if ContentOutline.Visible then
Icon.Text = "-"
NewList.ZIndex = 5
else
Icon.Text = "+"
NewList.ZIndex = 1
end
end)
Library:Connection(game:GetService("UserInputService").InputBegan,
function(Input)
if ContentOutline.Visible and Input.UserInputType ==
Enum.UserInputType.MouseButton1 then
if not Library:IsMouseOverFrame(ContentOutline) and
not Library:IsMouseOverFrame(Inline) then
ContentOutline.Visible = false
NewList.ZIndex = 1
Icon.Text = "+"
end
end
end)
--
local chosen = Dropdown.Max and {} or nil
local Count = 0
--
local function handleoptionclick(option, button, text)
button.MouseButton1Down:Connect(function()
if Dropdown.Max then
if table.find(chosen, option) then
table.remove(chosen, table.find(chosen,
option))
local textchosen = {}
local cutobject = false
Library.Flags[Dropdown.Flag] = chosen
Dropdown.Callback(chosen)
else
if #chosen == Dropdown.Max then
Dropdown.OptionInsts[chosen[1]].accent.Visible = false
table.remove(chosen, 1)
end
table.insert(chosen, option)
local textchosen = {}
local cutobject = false
NewOption.Parent = ContentInline
Dropdown.OptionInsts[option].text = OptionLabel
Count = Count + 1
local textchosen = {}
local cutobject = false
Library.Flags[Dropdown.Flag] = chosen
Dropdown.Callback(chosen)
end
end
--
function Dropdown:Set(option)
if Dropdown.Max then
set(option)
else
for opt, tbl in next, Dropdown.OptionInsts do
if opt ~= option then
tbl.text.TextColor3 =
Color3.fromRGB(145,145,145)
end
end
if table.find(Dropdown.Options, option) then
chosen = option
Dropdown.OptionInsts[option].text.TextColor3 =
Color3.fromRGB(255,255,255)
Value.Text = option
Library.Flags[Dropdown.Flag] = chosen
Dropdown.Callback(chosen)
else
chosen = nil
Value.Text = "None"
Library.Flags[Dropdown.Flag] = chosen
Dropdown.Callback(chosen)
end
end
end
--
function Dropdown:Refresh(tbl)
for _, opt in next, Dropdown.OptionInsts do
coroutine.wrap(function()
opt.button:Destroy()
end)()
end
table.clear(Dropdown.OptionInsts)
createoptions(tbl)
if Dropdown.Max then
table.clear(chosen)
else
chosen = nil
end
Library.Flags[Dropdown.Flag] = chosen
Dropdown.Callback(chosen)
end
-- // Returning
if Dropdown.Max then
Flags[Dropdown.Flag] = set
else
Flags[Dropdown.Flag] = Dropdown
end
Dropdown:Set(Dropdown.State)
return Dropdown
end
--
function Sections:ListBox(Properties)
local Properties = Properties or {};
local Dropdown = {
Window = self.Window,
Page = self.Page,
Section = self,
Open = false,
Options = (Properties.options or Properties.Options or
Properties.values or Properties.Values or {
"1",
"2",
"3",
}),
Max = (Properties.Max or Properties.max or nil),
ScrollMax = (Properties.ScrollingMax or
Properties.scrollingmax or nil),
State = (
Properties.state
or Properties.State
or Properties.def
or Properties.Def
or Properties.default
or Properties.Default
or nil
),
Callback = (
Properties.callback
or Properties.Callback
or Properties.callBack
or Properties.CallBack
or function() end
),
Flag = (
Properties.flag
or Properties.Flag
or Properties.pointer
or Properties.Pointer
or Library.NextFlag()
),
OptionInsts = {},
}
--
local NewList = Instance.new("TextButton")
NewList.Name = "NewList"
NewList.FontFace =
Font.new("rbxasset://fonts/families/SourceSansPro.json")
NewList.Text = ""
NewList.TextColor3 = Color3.fromRGB(0, 0, 0)
NewList.TextSize = 14
NewList.AutoButtonColor = false
NewList.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
NewList.BackgroundTransparency = 1
NewList.BorderColor3 = Color3.fromRGB(0, 0, 0)
NewList.BorderSizePixel = 0
NewList.Size = UDim2.new(1, 0, 0, (14 * Dropdown.ScrollMax) + (2
* Dropdown.ScrollMax) + 4)
NewList.Parent = Dropdown.Section.Elements.SectionContent
ContentInline.Parent = ContentOutline
ContentOutline.Parent = NewList
--
local chosen = Dropdown.Max and {} or nil
local Count = 0
--
local function handleoptionclick(option, button, text)
button.MouseButton1Down:Connect(function()
if Dropdown.Max then
if table.find(chosen, option) then
table.remove(chosen, table.find(chosen,
option))
local textchosen = {}
local cutobject = false
text.TextColor3 =
Color3.fromRGB(145,145,145)
Library.Flags[Dropdown.Flag] = chosen
Dropdown.Callback(chosen)
else
if #chosen == Dropdown.Max then
Dropdown.OptionInsts[chosen[1]].accent.Visible = false
table.remove(chosen, 1)
end
table.insert(chosen, option)
local textchosen = {}
local cutobject = false
text.TextColor3 =
Color3.fromRGB(255,255,255)
Library.Flags[Dropdown.Flag] = chosen
Dropdown.Callback(chosen)
end
else
for opt, tbl in next, Dropdown.OptionInsts do
if opt ~= option then
tbl.text.TextColor3 =
Color3.fromRGB(145,145,145)
end
end
chosen = option
text.TextColor3 = Color3.fromRGB(255,255,255)
Library.Flags[Dropdown.Flag] = option
Dropdown.Callback(option)
end
end)
end
--
local function createoptions(tbl)
for _, option in next, tbl do
Dropdown.OptionInsts[option] = {}
--
local NewOption = Instance.new("TextButton")
NewOption.Name = "NewOption"
NewOption.FontFace =
Font.new("rbxasset://fonts/families/SourceSansPro.json")
NewOption.Text = ""
NewOption.TextColor3 = Color3.fromRGB(255, 255, 255)
NewOption.TextSize = 12
NewOption.TextStrokeTransparency = 0
NewOption.TextWrapped = true
NewOption.TextXAlignment = Enum.TextXAlignment.Left
NewOption.AutoButtonColor = false
NewOption.BackgroundColor3 = Color3.fromRGB(255, 255,
255)
NewOption.BackgroundTransparency = 1
NewOption.BorderColor3 = Color3.fromRGB(0, 0, 0)
NewOption.BorderSizePixel = 0
NewOption.Size = UDim2.new(1, 0, 0, 14)
NewOption.Parent = ContentInline
Dropdown.OptionInsts[option].text = OptionLabel
Count = Count + 1
local textchosen = {}
local cutobject = false
Library.Flags[Dropdown.Flag] = chosen
Dropdown.Callback(chosen)
end
end
--
function Dropdown:Set(option)
if Dropdown.Max then
set(option)
else
for opt, tbl in next, Dropdown.OptionInsts do
if opt ~= option then
tbl.text.TextColor3 =
Color3.fromRGB(145,145,145)
end
end
if table.find(Dropdown.Options, option) then
chosen = option
Dropdown.OptionInsts[option].text.TextColor3 =
Color3.fromRGB(255,255,255)
Library.Flags[Dropdown.Flag] = chosen
Dropdown.Callback(chosen)
else
chosen = nil
Library.Flags[Dropdown.Flag] = chosen
Dropdown.Callback(chosen)
end
end
end
--
function Dropdown:Refresh(tbl)
for _, opt in next, Dropdown.OptionInsts do
coroutine.wrap(function()
opt.button:Destroy()
end)()
end
table.clear(Dropdown.OptionInsts)
createoptions(tbl)
if Dropdown.Max then
table.clear(chosen)
else
chosen = nil
end
Library.Flags[Dropdown.Flag] = chosen
Dropdown.Callback(chosen)
end
-- // Returning
if Dropdown.Max then
Flags[Dropdown.Flag] = set
else
Flags[Dropdown.Flag] = Dropdown
end
Dropdown:Set(Dropdown.State)
return Dropdown
end
--
function Sections:Colorpicker(Properties)
local Properties = Properties or {}
local Colorpicker = {
Window = self.Window,
Page = self.Page,
Section = self,
Name = (Properties.Name or "Colorpicker"),
State = (
Properties.state
or Properties.State
or Properties.def
or Properties.Def
or Properties.default
or Properties.Default
or Color3.fromRGB(255, 0, 0)
),
Alpha = (
Properties.alpha
or Properties.Alpha
or Properties.transparency
or Properties.Transparency
or 1
),
Callback = (
Properties.callback
or Properties.Callback
or Properties.callBack
or Properties.CallBack
or function() end
),
Flag = (
Properties.flag
or Properties.Flag
or Properties.pointer
or Properties.Pointer
or Library.NextFlag()
),
Colorpickers = 0,
}
--
local NewColor = Instance.new("TextButton")
NewColor.Name = "NewColor"
NewColor.FontFace =
Font.new("rbxasset://fonts/families/SourceSansPro.json")
NewColor.Text = ""
NewColor.TextColor3 = Color3.fromRGB(0, 0, 0)
NewColor.TextSize = 14
NewColor.AutoButtonColor = false
NewColor.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
NewColor.BackgroundTransparency = 1
NewColor.BorderColor3 = Color3.fromRGB(0, 0, 0)
NewColor.BorderSizePixel = 0
NewColor.Size = UDim2.new(1, 0, 0, 10)
NewColor.Parent = Colorpicker.Section.Elements.SectionContent
-- // Functions
Colorpicker.Colorpickers = Colorpicker.Colorpickers + 1
local colorpickertypes = Library:NewPicker(
Colorpicker.Name,
Colorpicker.State,
Colorpicker.Alpha,
NewColor,
Colorpicker.Colorpickers,
Colorpicker.Flag,
Colorpicker.Callback
)
function Colorpicker:Set(color)
colorpickertypes:set(color, false, true)
end
function Colorpicker:Colorpicker(Properties)
local Properties = Properties or {}
local NewColorpicker = {
State = (
Properties.state
or Properties.State
or Properties.def
or Properties.Def
or Properties.default
or Properties.Default
or Color3.fromRGB(255, 0, 0)
),
Alpha = (
Properties.alpha
or Properties.Alpha
or Properties.transparency
or Properties.Transparency
or 1
),
Callback = (
Properties.callback
or Properties.Callback
or Properties.callBack
or Properties.CallBack
or function() end
),
Flag = (
Properties.flag
or Properties.Flag
or Properties.pointer
or Properties.Pointer
or Library.NextFlag()
),
}
-- // Functions
Colorpicker.Colorpickers = Colorpicker.Colorpickers + 1
local Newcolorpickertypes = Library:NewPicker(
"",
NewColorpicker.State,
NewColorpicker.Alpha,
NewColor,
Colorpicker.Colorpickers,
NewColorpicker.Flag,
NewColorpicker.Callback
)
function NewColorpicker:Set(color)
Newcolorpickertypes:Set(color)
end
-- // Returning
return NewColorpicker
end
-- // Returning
return Colorpicker
end
--
function Sections:Keybind(Properties)
local Properties = Properties or {}
local Keybind = {
Section = self,
Name = Properties.name or Properties.Name or "Keybind",
State = (
Properties.state
or Properties.State
or Properties.def
or Properties.Def
or Properties.default
or Properties.Default
or nil
),
Mode = (Properties.mode or Properties.Mode or "Toggle"),
UseKey = (Properties.UseKey or false),
Ignore = (Properties.ignore or Properties.Ignore or false),
Callback = (
Properties.callback
or Properties.Callback
or Properties.callBack
or Properties.CallBack
or function() end
),
Flag = (
Properties.flag
or Properties.Flag
or Properties.pointer
or Properties.Pointer
or Library.NextFlag()
),
Binding = nil,
}
local Key
local State = false
--
local ModeBox = Instance.new("Frame")
local Hold = Instance.new("TextButton")
local Toggle = Instance.new("TextButton")
local Always = Instance.new("TextButton")
--
local NewBind = Instance.new("Frame")
NewBind.Name = "NewBind"
NewBind.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
NewBind.BackgroundTransparency = 1
NewBind.BorderColor3 = Color3.fromRGB(0, 0, 0)
NewBind.BorderSizePixel = 0
NewBind.Size = UDim2.new(1, 0, 0, 10)
NewBind.Parent = Keybind.Section.Elements.SectionContent
Outline.Parent = NewBind
ModeBox.Name = "ModeBox"
ModeBox.Parent = Outline
ModeBox.AnchorPoint = Vector2.new(0,0.5)
ModeBox.BackgroundColor3 = Color3.fromRGB(25,25,25)
ModeBox.BorderColor3 = Color3.fromRGB(50,50,50)
ModeBox.BorderSizePixel = 1
ModeBox.Size = UDim2.new(0, 65, 0, 60)
ModeBox.Position = UDim2.new(0,40,0.5,0)
ModeBox.Visible = false
Hold.Name = "Hold"
Hold.Parent = ModeBox
Hold.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Hold.BackgroundTransparency = 1.000
Hold.BorderColor3 = Color3.fromRGB(0, 0, 0)
Hold.BorderSizePixel = 0
Hold.Size = UDim2.new(1, 0, 0.333000004, 0)
Hold.ZIndex = 2
Hold.FontFace = Font.fromEnum(Enum.Font.RobotoMono)
Hold.Text = "Hold"
Hold.TextColor3 = Keybind.Mode == "Hold" and
Color3.fromRGB(255,255,255) or Color3.fromRGB(145,145,145)
Hold.TextSize = Library.FSize
Hold.TextStrokeTransparency = 0
Toggle.Name = "Toggle"
Toggle.Parent = ModeBox
Toggle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Toggle.BackgroundTransparency = 1.000
Toggle.BorderColor3 = Color3.fromRGB(0, 0, 0)
Toggle.BorderSizePixel = 0
Toggle.Position = UDim2.new(0, 0, 0.333000004, 0)
Toggle.Size = UDim2.new(1, 0, 0.333000004, 0)
Toggle.ZIndex = 2
Toggle.FontFace = Font.fromEnum(Enum.Font.RobotoMono)
Toggle.Text = "Toggle"
Toggle.TextColor3 = Keybind.Mode == "Toggle" and
Color3.fromRGB(255,255,255) or Color3.fromRGB(145,145,145)
Toggle.TextSize = Library.FSize
Toggle.TextStrokeTransparency = 0
Always.Name = "Always"
Always.Parent = ModeBox
Always.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Always.BackgroundTransparency = 1.000
Always.BorderColor3 = Color3.fromRGB(0, 0, 0)
Always.BorderSizePixel = 0
Always.Position = UDim2.new(0, 0, 0.666999996, 0)
Always.Size = UDim2.new(1, 0, 0.333000004, 0)
Always.ZIndex = 2
Always.FontFace = Font.fromEnum(Enum.Font.RobotoMono)
Always.Text = "Always"
Always.TextColor3 = Keybind.Mode == "Always" and
Color3.fromRGB(255,255,255) or Color3.fromRGB(145,145,145)
Always.TextSize = Library.FSize
Always.TextStrokeTransparency = 0
-- // Functions
local function set(newkey)
if string.find(tostring(newkey), "Enum") then
if c then
c:Disconnect()
if Keybind.Flag then
Library.Flags[Keybind.Flag] = false
end
Keybind.Callback(false)
end
if tostring(newkey):find("Enum.KeyCode.") then
newkey =
Enum.KeyCode[tostring(newkey):gsub("Enum.KeyCode.", "")]
elseif tostring(newkey):find("Enum.UserInputType.")
then
newkey =
Enum.UserInputType[tostring(newkey):gsub("Enum.UserInputType.", "")]
end
if newkey == Enum.KeyCode.Backspace then
Key = nil
if Keybind.UseKey then
if Keybind.Flag then
Library.Flags[Keybind.Flag] = Key
end
Keybind.Callback(Key)
end
local text = "None"
Value.Text = text
elseif newkey ~= nil then
Key = newkey
if Keybind.UseKey then
if Keybind.Flag then
Library.Flags[Keybind.Flag] = Key
end
Keybind.Callback(Key)
end
local text = (Library.Keys[newkey] or
tostring(newkey):gsub("Enum.KeyCode.", ""))
Value.Text = text
end
Library.Flags[Keybind.Flag .. "_KEY"] = newkey
elseif table.find({ "Always", "Toggle", "Hold" }, newkey)
then
if not Keybind.UseKey then
Library.Flags[Keybind.Flag .. "_KEY STATE"] =
newkey
Keybind.Mode = newkey
if Keybind.Mode == "Always" then
State = true
if Keybind.Flag then
Library.Flags[Keybind.Flag] = State
end
Keybind.Callback(true)
end
end
else
State = newkey
if Keybind.Flag then
Library.Flags[Keybind.Flag] = newkey
end
Keybind.Callback(newkey)
end
end
--
set(Keybind.State)
set(Keybind.Mode)
Inline.MouseButton1Click:Connect(function()
if not Keybind.Binding then
Value.Text = "..."
Keybind.Binding = Library:Connection(
game:GetService("UserInputService").InputBegan,
function(input, gpe)
set(
input.UserInputType ==
Enum.UserInputType.Keyboard and input.KeyCode
or input.UserInputType
)
Library:Disconnect(Keybind.Binding)
task.wait()
Keybind.Binding = nil
end
)
end
end)
--
Library:Connection(game:GetService("UserInputService").InputBegan,
function(inp)
if (inp.KeyCode == Key or inp.UserInputType == Key) and not
Keybind.Binding and not Keybind.UseKey then
if Keybind.Mode == "Hold" then
if Keybind.Flag then
Library.Flags[Keybind.Flag] = true
end
c =
Library:Connection(game:GetService("RunService").RenderStepped, function()
if Keybind.Callback then
Keybind.Callback(true)
end
end)
elseif Keybind.Mode == "Toggle" then
State = not State
if Keybind.Flag then
Library.Flags[Keybind.Flag] = State
end
Keybind.Callback(State)
end
end
end)
--
Library:Connection(game:GetService("UserInputService").InputEnded,
function(inp)
if Keybind.Mode == "Hold" and not Keybind.UseKey then
if Key ~= "" or Key ~= nil then
if inp.KeyCode == Key or inp.UserInputType ==
Key then
if c then
c:Disconnect()
if Keybind.Flag then
Library.Flags[Keybind.Flag] =
false
end
if Keybind.Callback then
Keybind.Callback(false)
end
end
end
end
end
end)
--
Library:Connection(Inline.MouseButton2Down, function()
ModeBox.Visible = true
NewBind.ZIndex = 5
end)
--
Library:Connection(Hold.MouseButton1Down, function()
set("Hold")
Hold.TextColor3 = Color3.fromRGB(255,255,255)
Toggle.TextColor3 = Color3.fromRGB(145,145,145)
Always.TextColor3 = Color3.fromRGB(145,145,145)
ModeBox.Visible = false
NewBind.ZIndex = 1
end)
--
Library:Connection(Toggle.MouseButton1Down, function()
set("Toggle")
Hold.TextColor3 = Color3.fromRGB(145,145,145)
Toggle.TextColor3 = Color3.fromRGB(255,255,255)
Always.TextColor3 = Color3.fromRGB(145,145,145)
ModeBox.Visible = false
NewBind.ZIndex = 1
end)
--
Library:Connection(Always.MouseButton1Down, function()
set("Always")
Hold.TextColor3 = Color3.fromRGB(145,145,145)
Toggle.TextColor3 = Color3.fromRGB(145,145,145)
Always.TextColor3 = Color3.fromRGB(255,255,255)
ModeBox.Visible = false
NewBind.ZIndex = 1
end)
--
Library:Connection(game:GetService("UserInputService").InputBegan,
function(Input)
if ModeBox.Visible and Input.UserInputType ==
Enum.UserInputType.MouseButton1 then
if not Library:IsMouseOverFrame(ModeBox) then
ModeBox.Visible = false
NewBind.ZIndex = 1
end
end
end)
--
Library.Flags[Keybind.Flag .. "_KEY"] = Keybind.State
Library.Flags[Keybind.Flag .. "_KEY STATE"] = Keybind.Mode
Flags[Keybind.Flag] = set
Flags[Keybind.Flag .. "_KEY"] = set
Flags[Keybind.Flag .. "_KEY STATE"] = set
--
function Keybind:Set(key)
set(key)
end
-- // Returning
return Keybind
end
--
function Sections:Textbox(Properties)
local Properties = Properties or {}
local Textbox = {
Window = self.Window,
Page = self.Page,
Section = self,
Name = (Properties.Name or Properties.name or nil),
Placeholder = (
Properties.placeholder
or Properties.Placeholder
or Properties.holder
or Properties.Holder
or ""
),
State = (
Properties.state
or Properties.State
or Properties.def
or Properties.Def
or Properties.default
or Properties.Default
or ""
),
Callback = (
Properties.callback
or Properties.Callback
or Properties.callBack
or Properties.CallBack
or function() end
),
Flag = (
Properties.flag
or Properties.Flag
or Properties.pointer
or Properties.Pointer
or Library.NextFlag()
),
}
--
local NewBox = Instance.new("TextButton")
NewBox.Name = "NewBox"
NewBox.FontFace =
Font.new("rbxasset://fonts/families/SourceSansPro.json")
NewBox.Text = ""
NewBox.TextColor3 = Color3.fromRGB(0, 0, 0)
NewBox.TextSize = 14
NewBox.AutoButtonColor = false
NewBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
NewBox.BackgroundTransparency = 1
NewBox.BorderColor3 = Color3.fromRGB(0, 0, 0)
NewBox.BorderSizePixel = 0
NewBox.Size = UDim2.new(1, 0, 0, Textbox.Name ~= nil and 30 or
16)
NewBox.Parent = Textbox.Section.Elements.SectionContent
Inline.Parent = Outline
Outline.Parent = NewBox
-- // Connections
Value.FocusLost:Connect(function()
Textbox.Callback(Value.Text)
Library.Flags[Textbox.Flag] = Value.Text
end)
--
local function set(str)
Value.Text = str
Library.Flags[Textbox.Flag] = str
Textbox.Callback(str)
end
-- // Return
Flags[Textbox.Flag] = set
return Textbox
end
--
function Sections:Button(Properties)
local Properties = Properties or {}
local Button = {
Window = self.Window,
Page = self.Page,
Section = self,
Name = Properties.Name or "button",
Callback = (
Properties.callback
or Properties.Callback
or Properties.callBack
or Properties.CallBack
or function() end
),
}
--
local NewButton = Instance.new("Frame")
NewButton.Name = "NewButton"
NewButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
NewButton.BackgroundTransparency = 1
NewButton.BorderColor3 = Color3.fromRGB(0, 0, 0)
NewButton.BorderSizePixel = 0
NewButton.Size = UDim2.new(1, 0, 0, 16)
NewButton.Parent = Button.Section.Elements.SectionContent
Inline.Parent = Outline
Outline.Parent = NewButton
--
Library:Connection(Inline.MouseButton1Down, function()
Button.Callback()
Value.TextColor3 = Library.Accent
task.wait(0.1)
Value.TextColor3 = Color3.fromRGB(255,255,255)
end)
function Button:Button(Properties)
local Properties = Properties or {}
local InButton = {
Window = self.Window,
Page = self.Page,
Section = self,
Name = Properties.Name or "button",
Callback = (
Properties.callback
or Properties.Callback
or Properties.callBack
or Properties.CallBack
or function() end
),
}
--
Outline.Size = UDim2.new(0.5, -4, 0, 16)
local iOutline = Instance.new("Frame")
iOutline.Name = "Outline"
iOutline.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
iOutline.BorderColor3 = Color3.fromRGB(0, 0, 0)
iOutline.Position = UDim2.new(0.5, 4, 1, -16)
iOutline.Size = UDim2.new(0.5, -4, 0, 16)
iOutline.Parent = NewButton
iInline.Parent = iOutline
--
Library:Connection(iInline.MouseButton1Down, function()
InButton.Callback()
iValue.TextColor3 = Library.Accent
task.wait(0.1)
iValue.TextColor3 = Color3.fromRGB(255,255,255)
end)
end
return Button
end
--
function Pages:PlayerList(Properties)
if not Properties then
Properties = {}
end
--
local Playerlist = {
Page = self,
Players = {},
CurrentPlayer = nil;
LastPlayer = nil;
Flag = (
Properties.flag
or Properties.Flag
or Properties.pointer
or Properties.Pointer
or Library.NextFlag()
),
}
--
local NewPlayer = Instance.new("Frame")
NewPlayer.Name = "NewPlayer"
NewPlayer.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
NewPlayer.BorderColor3 = Color3.fromRGB(50,50,50)
NewPlayer.BorderSizePixel = 1
NewPlayer.Size = UDim2.new(1, 0, 0,342)
NewPlayer.Parent = Playerlist.Page.Elements.Main
SectionTop.Parent = NewPlayer
List.Parent = NewPlayer
Priority.Parent = NewPlayer
Friend.Parent = NewPlayer
-- // Main
local chosen = nil
local optioninstances = {}
local function handleoptionclick(option, button, accent)
button.MouseButton1Click:Connect(function()
chosen = option
Library.Flags[Playerlist.Flag] = option
Playerlist.CurrentPlayer = option
--
for opt, tbl in next, optioninstances do
if opt ~= option then
tbl.accent.Visible = false
end
end
accent.Visible = true
--
if Playerlist.CurrentPlayer ~= Playerlist.LastPlayer
then
Playerlist.LastPlayer =
Playerlist.CurrentPlayer;
PlayerName1.Text = ("Id : %s\nDisplay Name :
%s\nName : %s\nAccount Age : %s"):format(Playerlist.CurrentPlayer.UserId,
Playerlist.CurrentPlayer.DisplayName ~= "" and Playerlist.CurrentPlayer.DisplayName
or Playerlist.CurrentPlayer.Name, Playerlist.CurrentPlayer.Name,
Playerlist.CurrentPlayer.AccountAge)
--
local imagedata =
game:GetService("Players"):GetUserThumbnailAsync(Playerlist.CurrentPlayer.UserId,
Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size420x420)
ImageLabel.Image = imagedata
end;
end)
end
--
local function createoptions(tbl)
for i, option in next, tbl do
optioninstances[option] = {}
NewPlayer1.Parent = List
optioninstances[option].button = NewPlayer1
optioninstances[option].text = PlayerName
optioninstances[option].status = PlayerStatus
optioninstances[option].accent = AccentLine
ImageLabel.Image = imagedata
end;
end
table.clear(optioninstances)
createoptions(content)
if dontchange then
chosen = Playerlist.CurrentPlayer
Playerlist.CurrentPlayer = chosen
else
chosen = nil
Playerlist.CurrentPlayer = nil
end
Library.Flags[Playerlist.Flag] = chosen
end
--
Priority.MouseButton1Click:Connect(function()
if Playerlist.CurrentPlayer ~= nil and
table.find(Library.Friends, Playerlist.CurrentPlayer) then
table.remove(Library.Friends,
table.find(Library.Friends, Playerlist.CurrentPlayer))
end
if Playerlist.CurrentPlayer ~= nil and not
table.find(Library.Priorities, Playerlist.CurrentPlayer) then
table.insert(Library.Priorities,
Playerlist.CurrentPlayer)
optioninstances[Playerlist.CurrentPlayer].status.Text
= "Priority"
optioninstances[Playerlist.CurrentPlayer].status.TextColor3 =
Color3.fromRGB(255, 0, 0)
elseif Playerlist.CurrentPlayer ~= nil and
table.find(Library.Priorities, Playerlist.CurrentPlayer) then
table.remove(Library.Priorities,
table.find(Library.Priorities, Playerlist.CurrentPlayer))
optioninstances[Playerlist.CurrentPlayer].status.Text
= "None"
optioninstances[Playerlist.CurrentPlayer].status.TextColor3 =
Color3.fromRGB(255,255,255)
end
end)
--
Friend.MouseButton1Click:Connect(function()
if Playerlist.CurrentPlayer ~= nil and
table.find(Library.Priorities, Playerlist.CurrentPlayer) then
table.remove(Library.Priorities,
table.find(Library.Priorities, Playerlist.CurrentPlayer))
end
if Playerlist.CurrentPlayer ~= nil and not
table.find(Library.Friends, Playerlist.CurrentPlayer) then
table.insert(Library.Friends,
Playerlist.CurrentPlayer)
optioninstances[Playerlist.CurrentPlayer].status.Text
= "Friendly"
optioninstances[Playerlist.CurrentPlayer].status.TextColor3 =
Color3.fromRGB(0, 255, 0)
elseif Playerlist.CurrentPlayer ~= nil and
table.find(Library.Friends, Playerlist.CurrentPlayer) then
table.remove(Library.Friends,
table.find(Library.Friends, Playerlist.CurrentPlayer))
optioninstances[Playerlist.CurrentPlayer].status.Text
= "None"
optioninstances[Playerlist.CurrentPlayer].status.TextColor3 =
Color3.fromRGB(255,255,255)
end
end)
--
createoptions(game.Players:GetPlayers())
--
game.Players.PlayerAdded:Connect(function()
Playerlist:Refresh(game.Players:GetPlayers(), true)
end)
--
game.Players.PlayerRemoving:Connect(function()
Playerlist:Refresh(game.Players:GetPlayers(), true)
end)
-- Fix
Playerlist.Page.Elements.Left.Size = UDim2.new(0.5, -5,0.5, -80)
Playerlist.Page.Elements.Right.Size = UDim2.new(0.5, -5,0.5, -80)
Playerlist.Page.Elements.Left.Position = UDim2.new(0, 0,0.5, 85)
Playerlist.Page.Elements.Right.Position = UDim2.new(0.5, 5,0.5,
85)
end
--
function Sections:Divider(Properties)
local Properties = Properties or {}
local Divider = {
Window = self.Window,
Page = self.Page,
Section = self,
Name = Properties.Name or "divider",
}
--
local NewDivider = Instance.new("TextButton")
NewDivider.Name = "NewDivider"
NewDivider.FontFace =
Font.new("rbxasset://fonts/families/SourceSansPro.json")
NewDivider.Text = ""
NewDivider.TextColor3 = Color3.fromRGB(0, 0, 0)
NewDivider.TextSize = 14
NewDivider.AutoButtonColor = false
NewDivider.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
NewDivider.BackgroundTransparency = 1
NewDivider.BorderColor3 = Color3.fromRGB(0, 0, 0)
NewDivider.BorderSizePixel = 0
NewDivider.Size = UDim2.new(1, 0, 0, 8)
NewDivider.Parent = Divider.Section.Elements.SectionContent
Value.Parent = Inline
Inline.Parent = Outline
Outline.Parent = NewDivider
return Divider
end
--
function Sections:Label(Properties)
local Properties = Properties or {}
local Label = {
Window = self.Window,
Page = self.Page,
Section = self,
Name = Properties.Name or "button",
}
--
local NewButton = Instance.new("TextButton")
NewButton.Name = "NewButton"
NewButton.FontFace =
Font.new("rbxasset://fonts/families/SourceSansPro.json")
NewButton.Text = ""
NewButton.TextColor3 = Color3.fromRGB(0, 0, 0)
NewButton.TextSize = 14
NewButton.AutoButtonColor = false
NewButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
NewButton.BackgroundTransparency = 1
NewButton.BorderColor3 = Color3.fromRGB(0, 0, 0)
NewButton.BorderSizePixel = 0
NewButton.Size = UDim2.new(1, 0, 0, 8)
NewButton.Parent = Label.Section.Elements.SectionContent
return Label
end
--
function Library:Indicator(Properties)
local Indicator = {
Title = Properties.Name or Properties.name or "New
Indicator";
Elements = {};
Dragging = { false, UDim2.new(0, 0, 0, 0) };
};
--
local Outline = Instance.new("TextButton")
Outline.Name = "Outline"
Outline.AutomaticSize = Enum.AutomaticSize.Y
Outline.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
Outline.BorderColor3 = Color3.fromRGB(0, 0, 0)
Outline.Position = UDim2.new(0,200,0.5,0)
Outline.Size = UDim2.new(0, 200, 0, 15)
Outline.AnchorPoint = Vector2.new(0.5,0.5)
Outline.Parent = Library.ScreenGUI
Outline.Visible = false
Outline.Text = ""
Outline.AutoButtonColor = false
HolderInline.Parent = HolderOutline
HolderOutline.Parent = Inline
Inline.Parent = Outline
-- // Dragging
Library:Connection(Outline.MouseButton1Down, function()
local Location =
game:GetService("UserInputService"):GetMouseLocation()
Indicator.Dragging[1] = true
Indicator.Dragging[2] = UDim2.new(0, Location.X -
Outline.AbsolutePosition.X, 0, Location.Y - Outline.AbsolutePosition.Y)
end)
Library:Connection(game:GetService("UserInputService").InputEnded,
function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1
and Indicator.Dragging[1] then
local Location =
game:GetService("UserInputService"):GetMouseLocation()
Indicator.Dragging[1] = false
Indicator.Dragging[2] = UDim2.new(0, 0, 0, 0)
end
end)
Library:Connection(game:GetService("UserInputService").InputChanged,
function(Input)
local Location =
game:GetService("UserInputService"):GetMouseLocation()
local ActualLocation = nil
-- Dragging
if Indicator.Dragging[1] then
Outline.Position = UDim2.new(
0,
Location.X - Indicator.Dragging[2].X.Offset +
(Outline.Size.X.Offset * Outline.AnchorPoint.X),
0,
Location.Y - Indicator.Dragging[2].Y.Offset +
(Outline.Size.Y.Offset * Outline.AnchorPoint.Y)
)
end
end)
-- // Functions
function Indicator:NewValue(Properties)
local NewIndicator = {
Name = Properties.Name or Properties.name or "New
Value";
Value = Properties.Value or Properties.value or
"false";
};
--
local NewInd = Instance.new("Frame")
NewInd.Name = "NewInd"
NewInd.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
NewInd.BackgroundTransparency = 1
NewInd.BorderColor3 = Color3.fromRGB(0, 0, 0)
NewInd.BorderSizePixel = 0
NewInd.Size = UDim2.new(1, 0, 0, 15)
NewInd.Parent = HolderInline
-- // Functions
function NewIndicator:UpdateValue(NewValue)
IndValue.Text = tostring(NewValue)
end
return NewIndicator
end
--
function Indicator:NewBar(Properties)
local NewBarInd = {
Name = Properties.Name or Properties.name or "New
Value";
Min = (Properties.min or Properties.Min or
Properties.minimum or Properties.Minimum or 0);
Max = (Properties.max or Properties.Max or
Properties.maximum or Properties.Maximum or 100);
State = (Properties.state or Properties.State or
Properties.def or Properties.Def or Properties.default or Properties.Default or 0);
};
local TextValue = ("[value]")
--
local NewBar = Instance.new("Frame")
NewBar.Name = "NewBar"
NewBar.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
NewBar.BackgroundTransparency = 1
NewBar.BorderColor3 = Color3.fromRGB(0, 0, 0)
NewBar.BorderSizePixel = 0
NewBar.Size = UDim2.new(1, 0, 0, 25)
BarOutline.Parent = NewBar
NewBar.Parent = HolderInline
-- // Functions
function NewBarInd:UpdateValue(NewValue)
NewValue = math.clamp(Library:Round(NewValue, 1),
NewBarInd.Min, NewBarInd.Max)
local sizeX = ((NewValue - NewBarInd.Min) /
(NewBarInd.Max - NewBarInd.Min))
Bar.Size = UDim2.new(sizeX, 0, 1, 0)
IndValue1.Text = TextValue:gsub("%[value%]",
string.format("%.14g", NewValue))
end
NewBarInd:UpdateValue(NewBarInd.State)
return NewBarInd
end
--
function Indicator:SetVisible(State)
Outline.Visible = State
end
return Indicator
end
--
end;
end;
-- Local Variables
local Flags = Library.Flags
local Pointers = Library.Pointers
local Utility = Library.Utility
local Bodyparts = {}
-- Example
local Window = Library:Window({Name = "bitchbot.crack | ui", Amount = 6})
local Watermark = Library:Watermark({Name = "watermark | $portal$ | private"})
local Indicator = Library:Indicator({Name = "New Indicator"})
-- Indicator Options
local TextIndicator = Indicator:NewValue({Name = "New Text", Value = "value here"})
local BarIndicator = Indicator:NewBar({Name = "New Bar", Value = 10, Min = 0, Max =
100})
--
local Page = Window:Page({Name = "Legit", Weapons = true})
Window:Page({Name = "Rage"})
Window:Page({Name = "Visuals"})
Window:Page({Name = "Misc"})
local Players = Window:Page({Name = "Players"})
local Settings = Window:Page({Name = "Settings"})
--
local SubPage1 = Page:Weapon({})
local SubPage2 = Page:Weapon({Icon = "rbxassetid://16997762295"})
SubPage2:PlayerList({})
--
local Section = SubPage1:Section({Name = "New Section"})
local Section2 = SubPage1:Section({Name = "New Section", Side ="Right"})
SubPage1:Section({Name = "wave is detected"})
--
Section:Toggle({Name = "Toggle Indicator", Callback = function(State)
Indicator:SetVisible(State) end}):Colorpicker({Default = Color3.new(0,1,0)})
Section:Slider({Suffix = "%"})
Section:Toggle({Name = "type shi"}):Keybind({Name = "key", Default =
Enum.KeyCode.E})
Section:Slider({Name = "update indicator bar", Min = 0, Max = 100, Default = 10,
Decimals = 1, Callback = function(State) BarIndicator:UpdateValue(State) end})
Section:List({Name = "list", Options = {"1","2","3","4"}, Default = "1"})
Section:List({Name = "multilist", Options = {"1","2","3","4"}, Default = {"1"}, Max
= 4})
Section:Colorpicker({Name = "color"})
Section:Keybind({Name = "key", Default = Enum.KeyCode.E})
--
local toggle = Section2:Toggle({Name = "fentanyl"})
toggle:Colorpicker({})
toggle:Colorpicker({})
Section2:List({Options = {"1","2","3","4"}, Default = {"1"}, Max = 4})
Section2:Textbox({Name = "textbox", Placeholder = "placeholder"})
Section2:Button({Name = "sub1"}):Button({Name = "sub2"})
Section2:Button({Name = "new notification", Callback = function(State)
Library:Notification("testing lol", 5) end})
Section2:Divider({Name = "new divider"})
Section2:Label({Name = "new label omg"})
Section2:ListBox({Options = {"1","2","3","4","5","6","7"}, Default = "1",
ScrollingMax = 5})
--
Players:PlayerList({})
--
do -- Settings
local CFG = Settings:Section({Name = "Config", Zindex = 2})
--
local ConfigList = CFG:List({Name = "Config", Flag =
"SettingConfigurationList", Options = {}})
CFG:Textbox({Flag = "SettingsConfigurationName", Name = "Config Name"})
--
CFG:Keybind({Name = "Menu Key", Flag = "MenuKey", UseKey = true, Default =
Enum.KeyCode.End, Callback = function(State) Library.UIKey = State end})
CFG:Colorpicker({Name = "Menu Accent", Flag = "MenuAccent", Default =
Library.Accent, Callback = function(State) Library:ChangeAccent(State) end})
CFG:Toggle({Name = "Show Watermark", Flag = "Watermark", Callback =
function(State) Watermark:SetVisible(State) end})
CFG:Textbox({Flag = "WatermarkText", Name = "Watermark Text", State =
"watermark | $portal$ | private", Callback = function(State)
Watermark:UpdateText(State) end})
end