nebula ui
nebula ui
local milkyboy = {
target_selection = {
player = nil,
time = os.clock(),
pass = false,
},
misc = {
auto_shoot_clock = os.clock(),
buying_armor = false
},
config = {
saving = {current = {}},
luas = {},
},
drawings = {},
instances = {},
connections = {},
typing_check = false,
delta = nil,
radians = 0,
-- library init
local library = {
directory = "MilkyBoy Skibidi",
folders = {
"/fonts",
"/configs"
},
flags = {},
config_flags = {},
guis = {},
connections = {},
current_tab,
current_element_open,
dock_button_holder,
font,
keybind_list
}
local themes = {
preset = {
["outline"] = rgb(32, 32, 38), --
["inline"] = rgb(60, 55, 75), --
["accent"] = hex("#7D98AF"), --
["high_contrast"] = rgb(41, 41, 55),
["low_contrast"] = rgb(35, 35, 47),
["text"] = rgb(180, 180, 180),
["text_outline"] = rgb(0, 0, 0),
["glow"] = hex("#7D98AF"),
},
utility = {
["outline"] = {
["BackgroundColor3"] = {},
["Color"] = {},
},
["inline"] = {
["BackgroundColor3"] = {},
},
["accent"] = {
["BackgroundColor3"] = {},
["TextColor3"] = {},
["ImageColor3"] = {},
["ScrollBarImageColor3"] = {}
},
["contrast"] = {
["Color"] = {},
},
["text"] = {
["TextColor3"] = {},
},
["text_outline"] = {
["Color"] = {},
},
["glow"] = {
["ImageColor3"] = {},
},
},
find = {
["Frame"] = "BackgroundColor3",
["TextLabel"] = "TextColor3",
["UIGradient"] = "Color",
["UIStroke"] = "Color",
["ImageLabel"] = "ImageColor3",
["TextButton"] = "BackgroundColor3",
["ScrollingFrame"] = "ScrollBarImageColor3"
}
}
local keys = {
[Enum.KeyCode.LeftShift] = "LS",
[Enum.KeyCode.RightShift] = "RS",
[Enum.KeyCode.LeftControl] = "LC",
[Enum.KeyCode.RightControl] = "RC",
[Enum.KeyCode.Insert] = "INS",
[Enum.KeyCode.Backspace] = "BS",
[Enum.KeyCode.Return] = "Ent",
[Enum.KeyCode.LeftAlt] = "LA",
[Enum.KeyCode.RightAlt] = "RA",
[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",
[Enum.KeyCode.Escape] = "ESC",
[Enum.KeyCode.Space] = "SPC",
}
library.__index = library
if setreadonly then
if not isfile(library.directory .. "/fonts/main.ttf") then
writefile(library.directory .. "/fonts/main.ttf",
game:HttpGet("https://github.com/f1nobe7650/other/raw/main/uis/font.ttf"))
end
local tahoma = {
name = "SmallestPixel7",
faces = {
{
name = "Regular",
weight = 400,
style = "normal",
assetId = getcustomasset(library.directory ..
"/fonts/main.ttf")
}
}
}
local config_holder
--
-- library functions
-- misc functions
function library:make_resizable(frame)
local Frame = Instance.new("TextButton")
Frame.Position = dim2(1, -10, 1, -10)
Frame.BorderColor3 = rgb(0, 0, 0)
Frame.Size = dim2(0, 10, 0, 10)
Frame.BorderSizePixel = 0
Frame.BackgroundColor3 = rgb(255, 255, 255)
Frame.Parent = frame
Frame.BackgroundTransparency = 1
Frame.Text = ""
Frame.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
resizing = true
start = input.Position
start_size = frame.Size
end
end)
Frame.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
resizing = false
end
end)
table.insert(milkyboy.drawings, ins)
return ins
end
table.insert(milkyboy.instances, ins)
return ins
end
function library:convert_enum(enum)
local enum_parts = {}
enum_table = enum_item
end
return enum_table
end
function library:config_list_update()
if not config_holder then return end
local list = {}
config_holder.refresh_options(list)
end
function library:get_config()
local Config = {}
for _, v in flags do
if type(v) == "table" and v.key then
Config[_] = {active = v.active, mode = v.mode, key =
tostring(v.key)}
elseif type(v) == "table" and v["Transparency"] and v["Color"] then
Config[_] = {Transparency = v["Transparency"], Color =
v["Color"]:ToHex()}
else
Config[_] = v
end
end
return http_service:JSONEncode(Config)
end
function library:load_config(config_json)
local config = http_service:JSONDecode(config_json)
if function_set then
if type(v) == "table" and v["Transparency"] and v["Color"] then
function_set(hex(v["Color"]), v["Transparency"])
elseif type(v) == "table" and v["active"] then
function_set(v)
else
function_set(v)
end
end
end
end
themes.preset[theme] = color
end
table.insert(library.connections, connection)
return connection
end
function library:apply_stroke(parent)
local stroke = library:create("UIStroke", {
Parent = parent,
Color = themes.preset.text_outline,
LineJoinMode = Enum.LineJoinMode.Miter
})
return ins
end
--
-- elements
function library:panel(options)
local cfg = {
name = options.text or options.name or "Window",
size = options.size or dim2(0, 530, 0, 590),
position = options.position or dim2(0, 500, 0, 500),
anchor_point = options.anchor_point or vec2(0, 0)
}
function library:window(properties)
local window = {}
-- local button_holder
button.MouseButton1Click:Connect(function()
cfg.open = not cfg.open
cfg.callback(cfg.open)
end)
end ]]
-- main window
local holder, path = library:panel({
name = properties and properties.name or "milkyboy.tech",
size = dim2(0, 500, 0, 500),
position = dim2(0, (camera.ViewportSize.X / 2) - 250, 0,
(camera.ViewportSize.Y / 2) - 250),
})
library.frame = path
-- create_dock_button({
-- image = "rbxassetid://100959383267514",
-- callback = function(open)
-- path.Enabled = open
-- end
-- })
window["tab_holder"] = library:create("Frame", {
Parent = holder,
Name = " ",
BackgroundTransparency = 1,
Size = dim2(1, 0, 0, 22),
BorderColor3 = rgb(0, 0, 0),
ZIndex = 5,
BorderSizePixel = 0,
BackgroundColor3 = rgb(255, 255, 255)
})
library:create("UIListLayout", {
Parent = window["tab_holder"],
FillDirection = Enum.FillDirection.Horizontal,
HorizontalFlex = Enum.UIFlexAlignment.Fill,
Padding = dim(0, 2),
SortOrder = Enum.SortOrder.LayoutOrder
})
library.section_holder = background
library:create("UIPadding", {
Parent = background,
PaddingTop = dim(0, 4),
PaddingBottom = dim(0, 4),
PaddingRight = dim(0, 4),
PaddingLeft = dim(0, 4)
})
library:make_resizable(path:FindFirstChildOfClass("Frame"))
--
-- keybind list
local outline = library:create("Frame", {
Parent = sgui,
Name = "",
Visible = false,
Position = UDim2.new(0.04290718212723732, 0,
0.4762658178806305, 0),
BorderColor3 = Color3.fromRGB(0, 0, 0),
Size = UDim2.new(0, 182, 0, 25),
BorderSizePixel = 0,
BackgroundColor3 = themes.preset.outline
})
library:apply_theme(outline, "outline", "BackgroundColor3")
library.keybind_list_frame = outline
local bg = library:create("Frame", {
Parent = background,
Name = "a",
BorderColor3 = Color3.fromRGB(0, 0, 0),
Size = UDim2.new(1, 0, 0, 2),
BorderSizePixel = 0,
BackgroundColor3 = themes.preset.accent
}); library:apply_theme(bg, "accent", "BackgroundColor3")
library:create("UIGradient", {
Parent = bg,
Name = "",
Enabled = true,
Rotation = 90,
Color = ColorSequence.new{
ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 255,
255)),
ColorSequenceKeypoint.new(1, Color3.fromRGB(167, 167, 167))
}
})
library:create("UIListLayout", {
Parent = background,
Name = "",
Padding = UDim.new(0, -1),
SortOrder = Enum.SortOrder.LayoutOrder
})
library:create("UIPadding", {
Parent = background,
Name = "",
PaddingBottom = UDim.new(0, 4),
PaddingLeft = UDim.new(0, 5)
})
--
-- -- dock innit
-- local dock_outline = library:create("Frame", {
-- Parent = sgui,
-- Name = "",
-- Visible = true,
-- BorderColor3 = rgb(0, 0, 0),
-- AnchorPoint = vec2(0.5, 0),
-- Position = dim2(0.5, 0, 0, 20),
-- Size = dim2(0, 127, 0, 39),
-- BorderSizePixel = 0,
-- BackgroundColor3 = rgb(32, 32, 38)
-- })library:apply_theme(dock_outline, "outline",
"BackgroundColor3")
-- button_holder = library:create("Frame", {
-- Parent = dock_holder,
-- Name = "",
-- BackgroundTransparency = 1,
-- Size = dim2(1, 0, 1, 0),
-- BorderColor3 = rgb(0, 0, 0),
-- BorderSizePixel = 0,
-- BackgroundColor3 = rgb(255, 255, 255)
-- })
-- -- cfg holder
-- create_dock_button({
-- image = "rbxassetid://79856374238119",
-- callback = function(open)
-- config_path.Enabled = open
-- end
-- })
-- --
-- -- playerlist
-- window["playerlist"], playerlist_gui = library:panel({
-- name = "Playerlist",
-- anchor_point = vec2(-1, 0),
-- size = dim2(0, 385, 0, 399),
-- position = dim2(0, holder.AbsolutePosition.X - 395, 0,
holder.AbsolutePosition.Y - 22)
-- })
-- create_dock_button({
-- image = "rbxassetid://115194686863276",
-- callback = function(open)
-- playerlist_gui.Enabled = open
-- end
-- })
-- --
-- -- theming
-- window["themes"], themes_gui = library:panel({
-- name = "Style",
-- anchor_point = vec2(-1, 0),
-- size = dim2(0, 322, 0, 391),
-- position = dim2(0, window["configs"].AbsolutePosition.X +
window["configs"].AbsoluteSize.X + 10, 0, window["configs"].AbsolutePosition.Y -
22)
-- })
-- create_dock_button({
-- image = "rbxassetid://115194686863276",
-- callback = function(open)
-- themes_gui.Enabled = open
-- end
-- })
-- --
function library:watermark(options)
local cfg = {
default = options.text or options.default or os.date('drain.lol |
%b %d %Y | %H:%M') -- highly skidded by finobe
}
library:create("UIStroke", {
Parent = text,
Name = "",
LineJoinMode = Enum.LineJoinMode.Miter
})
function cfg.change_text(input)
text.Text = " ".. input .." "
end
cfg.change_text(cfg.default)
return cfg
end
function library:tab(options)
local cfg = {
name = options.name or "tab",
enabled = false,
}
-- button instances
local tab_holder = library:create("TextButton", {
Parent = self.tab_holder,
FontFace = library.font,
TextColor3 = rgb(180, 180, 180),
BorderColor3 = rgb(0, 0, 0),
Text = "",
Name = "\0",
BorderSizePixel = 0,
Size = dim2(0, 0, 1, -2),
ZIndex = 5,
TextSize = 12,
BackgroundColor3 = rgb(32, 32, 38),
AutoButtonColor = false
})library:apply_theme(tab_holder, "outline", "BackgroundColor3")
-- section instances
local section_holder = library:create("Frame", {
Parent = library.section_holder,
BackgroundTransparency = 1,
Name = "\0",
BorderColor3 = rgb(0, 0, 0),
Size = dim2(1, 0, 1, 0),
BorderSizePixel = 0,
Visible = false,
BackgroundColor3 = rgb(255, 255, 255)
})
cfg["holder"] = section_holder
library:create("UIListLayout", {
Parent = section_holder,
FillDirection = Enum.FillDirection.Horizontal,
HorizontalFlex = Enum.UIFlexAlignment.Fill,
Padding = dim(0, 4),
SortOrder = Enum.SortOrder.LayoutOrder
})
function cfg.open_tab()
if library.current_tab and library.current_tab[1] ~= background
then
local button = library.current_tab[1]
button.Size = dim2(1, -2, 1, -1)
button:FindFirstChildOfClass("UIGradient").Rotation = 90
button:FindFirstChildOfClass("TextLabel").TextColor3 =
themes.preset.text
library.current_tab[2].Visible = false
library.current_tab = nil
end
library.current_tab = {
background, section_holder
}
library.current_tab[2].Visible = true
tab_holder.MouseButton1Click:Connect(cfg.open_tab)
function library:column(path)
local cfg = {}
library:create("UIListLayout", {
Parent = column,
Padding = dim(0, 4),
SortOrder = Enum.SortOrder.LayoutOrder,
VerticalFlex = Enum.UIFlexAlignment.Fill
})
cfg["holder"] = column
function library:section(options)
local cfg = {
name = options.name or "Section",
}
library:create("UIStroke", {
Parent = text,
LineJoinMode = Enum.LineJoinMode.Miter
})
local accent = library:create("Frame", {
Parent = background,
Name = "\0",
BorderColor3 = rgb(0, 0, 0),
Size = dim2(1, 0, 0, 2),
BorderSizePixel = 0,
BackgroundColor3 = themes.preset.accent
})library:apply_theme(accent, "accent", "BackgroundColor3")
library:create("UIListLayout", {
Parent = elements,
Padding = dim(0, 4),
HorizontalAlignment = Enum.HorizontalAlignment.Center,
SortOrder = Enum.SortOrder.LayoutOrder
})
library:create("UIPadding", {
Parent = ScrollingFrame,
PaddingBottom = dim(0, 10)
})
function library:slider(options)
local cfg = {
name = options.name or nil,
suffix = options.suffix or "",
flag = options.flag or tostring(2^789),
callback = options.callback or function() end,
dragging = false,
value = options.default or 10,
previous_holder = self
}
if cfg.name then
local left_components = library:create("Frame", {
Parent = slider,
Name = "left_components",
BackgroundTransparency = 1,
Position = dim2(0, 2, 0, -1),
BorderColor3 = rgb(0, 0, 0),
Size = dim2(0, 0, 0, 14),
BorderSizePixel = 0,
BackgroundColor3 = rgb(255, 255, 255)
})
library:create("UIListLayout", {
Parent = left_components,
Padding = dim(0, 5),
Name = "_",
FillDirection = Enum.FillDirection.Horizontal
})
end
library:create("UIListLayout", {
Parent = bottom_components,
Padding = dim(0, 10),
Name = "_",
SortOrder = Enum.SortOrder.LayoutOrder
})
library:create("UIPadding", {
Parent = slider,
PaddingLeft = dim(0, 1)
})
function cfg.set(value)
cfg.value = math.clamp(library:round(value, cfg.intervals),
cfg.min, cfg.max)
cfg.callback(flags[cfg.flag])
end
library:connection(uis.InputChanged, function(input)
if cfg.dragging and input.UserInputType ==
Enum.UserInputType.MouseMovement then
local size_x = (input.Position.X - slider.AbsolutePosition.X) /
slider.AbsoluteSize.X
local value = ((cfg.max - cfg.min) * size_x) + cfg.min
cfg.set(value)
end
end)
library:connection(uis.InputEnded, function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
cfg.dragging = false
end
end)
slider.MouseButton1Down:Connect(function()
cfg.dragging = true
end)
cfg.set(cfg.default)
config_flags[cfg.flag] = cfg.set
library.config_flags[cfg.flag] = cfg.set
return self
end
function library:toggle(options)
local cfg = {
enabled = options.enabled or nil,
name = options.name or "Toggle",
flag = options.flag or tostring(math.random(1,9999999)),
callback = options.callback or function() end,
default = options.default or false,
colorpicker = options.color or nil,
previous_holder = self
}
-- instances
local toggle_holder = library:create("TextButton", {
Parent = self.holder,
FontFace = library.font,
TextColor3 = rgb(151, 151, 151),
BorderColor3 = rgb(0, 0, 0),
Text = "",
Name = "toggle",
ZIndex = 1,
Size = dim2(1, -8, 0, 12),
BorderSizePixel = 0,
BackgroundTransparency = 1,
TextXAlignment = Enum.TextXAlignment.Left,
AutomaticSize = Enum.AutomaticSize.Y,
TextYAlignment = Enum.TextYAlignment.Top,
TextSize = 11,
BackgroundColor3 = rgb(255, 255, 255)
})
library:create("UIPadding", {
Parent = toggle_holder
})
library:create("UIStroke", {
Parent = text,
LineJoinMode = Enum.LineJoinMode.Miter
})
library:create("UIListLayout", {
Parent = left_components,
Padding = dim(0, 5),
Name = "_",
FillDirection = Enum.FillDirection.Horizontal
})
function cfg.set(bool)
background.BackgroundColor3 = bool and themes.preset.accent or
themes.preset.inline
flags[cfg.flag] = bool
cfg.callback(bool)
end
library:connection(toggle_holder.MouseButton1Click, function()
cfg.enabled = not cfg.enabled
cfg.set(cfg.enabled)
end)
library:connection(toggle.MouseButton1Click, function()
cfg.enabled = not cfg.enabled
cfg.set(cfg.enabled)
end)
cfg.set(cfg.default)
self.previous_holder = left_components
self.right_holder = right_components
library.config_flags[cfg.flag] = cfg.set
return self
end
function library:colorpicker(options)
local parent = self.right_holder
local cfg = {
name = options.name or "Color",
flag = options.flag or tostring(2^789),
color = options.color or Color3.new(1, 1, 1), -- Default to white
color if not provided
alpha = options.alpha or 1,
callback = options.callback or function() end,
holder = self.previous_holder
}
local h, s, v = cfg.color:ToHSV()
local a = cfg.alpha
-- colorpicker button
local colorpicker_button = library:create("TextButton", {
Parent = parent,
Name = "outline",
BorderColor3 = rgb(0, 0, 0),
Size = dim2(0, 24, 0, 14),
BorderSizePixel = 0,
BackgroundColor3 = rgb(32, 32, 38),
Text = "",
AutoButtonColor = false,
})library:apply_theme(colorpicker_button, "outline",
"BackgroundColor3")
-- colorpicker instances
local colorpicker_holder = library:create("Frame", {
Parent = sgui,
Name = "colorpicker",
Position = dim2(0, colorpicker_button.AbsolutePosition.X + 1,
0, colorpicker_button.AbsolutePosition.Y + 17),
BorderColor3 = rgb(0, 0, 0),
Size = dim2(0, 190, 0, 190),
BorderSizePixel = 0,
BackgroundColor3 = rgb(32, 32, 38),
Visible = false,
ZIndex = 1
})library:apply_theme(colorpicker_holder, "outline",
"BackgroundColor3")
library:make_resizable(colorpicker_holder)
library:create("UIPadding", {
Parent = window_holder,
Name = "_",
PaddingBottom = dim(0, 4),
PaddingRight = dim(0, 4),
PaddingLeft = dim(0, 4)
})
library:create("UIPadding", {
Parent = main_holder_background,
PaddingTop = dim(0, 4),
Name = "_",
PaddingBottom = dim(0, 4),
PaddingRight = dim(0, 4),
PaddingLeft = dim(0, 4)
})
function cfg.set_visible(bool)
colorpicker_holder.Visible = bool
if bool then
if library.current_element_open and
library.current_element_open ~= cfg then
library.current_element_open.set_visible(false)
library.current_element_open.open = false
end
library.current_element_open = cfg
end
end
colorpicker_button.MouseButton1Click:Connect(function()
cfg.open = not cfg.open
cfg.set_visible(cfg.open)
end)
colorpicker_button:GetPropertyChangedSignal("AbsolutePosition"):Connect(function()
colorpicker_holder.Position = dim2(0,
colorpicker_button.AbsolutePosition.X + 1, 0, colorpicker_button.AbsolutePosition.Y
+ 17)
end)
if alpha then
a = alpha
end
local value = 1 - h
local offset = (value < 1) and 0 or -4
hue_picker.Position = dim2(0, 0, value, offset)
alpha_drag.BackgroundColor3 = Color3.fromHSV(h, s, v)
visualize.BackgroundColor3 = Color
handler.BackgroundColor3 = Color
colorpicker.BackgroundColor3 = Color3.fromHSV(h, 1, 1)
cfg.color = Color
cfg.alpha = a
local s_offset = (s < 1) and 0 or -3
local v_offset = (1 - v < 1) and 0 or -3
satval_picker_REAL.Position = dim2(s, s_offset, 1 - v, v_offset)
flags[cfg.flag] = {}
flags[cfg.flag]["Color"] = Color
flags[cfg.flag]["Transparency"] = a
cfg.callback(Color, a)
end
function cfg.update_color()
local mouse = uis:GetMouseLocation()
if dragging_sat then
s = math.clamp((vec2(mouse.X, mouse.Y - gui_offset) -
val.AbsolutePosition).X / val.AbsoluteSize.X, 0, 1)
v = 1 - math.clamp((vec2(mouse.X, mouse.Y - gui_offset) -
sat.AbsolutePosition).Y / sat.AbsoluteSize.Y, 0, 1)
elseif dragging_hue then
h = math.clamp(1 - (vec2(mouse.X, mouse.Y - gui_offset) -
hue.AbsolutePosition).Y / hue.AbsoluteSize.Y, 0, 1)
elseif dragging_alpha then
a = math.clamp((vec2(mouse.X, mouse.Y - gui_offset) -
alpha.AbsolutePosition).X / alpha.AbsoluteSize.X, 0, 1)
end
cfg.set(nil, nil)
end
alpha.MouseButton1Down:Connect(function()
dragging_alpha = true
end)
hue.MouseButton1Down:Connect(function()
dragging_hue = true
end)
sat.MouseButton1Down:Connect(function()
dragging_sat = true
end)
uis.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
dragging_sat = false
dragging_hue = false
dragging_alpha = false
end
end)
uis.InputChanged:Connect(function(input)
if (dragging_sat or dragging_hue or dragging_alpha) and
input.UserInputType == Enum.UserInputType.MouseMovement then
cfg.update_color()
end
end)
cfg.set(cfg.color, cfg.alpha)
self.previous_holder = parent
library.config_flags[cfg.flag] = cfg.set
return self
end
function library:keybind(options)
local parent = self.right_holder
local cfg = {
flag = options.flag or "SET ME A FLAG NOWWW!!!!",
callback = options.callback or function() end,
open = false,
binding = nil,
name = options.name or nil,
ignore_key = options.ignore or false,
hold_instances = {},
}
flags[cfg.flag] = {}
local KEYBIND_ELEMENT;
if cfg.name then
KEYBIND_ELEMENT = library:create("TextLabel", {
Parent = library.keybind_list,
Name = "",
FontFace = library.font,
TextColor3 = Color3.fromRGB(180, 180, 180),
BorderColor3 = Color3.fromRGB(0, 0, 0),
Text = "[ Hold ] Fly - X",
Size = UDim2.new(1, -5, 0, 18),
Visible = false,
Position = UDim2.new(0, 5, 0, -1),
BorderSizePixel = 0,
BackgroundTransparency = 1,
TextXAlignment = Enum.TextXAlignment.Left,
TextTruncate = Enum.TextTruncate.AtEnd,
AutomaticSize = Enum.AutomaticSize.Y,
TextSize = 12,
BackgroundColor3 = themes.preset.text
}, "text")
end
-- mode selector
local keybind_selector = library:create("Frame", {
Parent = sgui,
Name = "",
Position = dim2(0, element_outline.AbsolutePosition.X + 1, 0,
element_outline.AbsolutePosition.Y + 17),
BorderColor3 = rgb(255, 255, 255),
BorderSizePixel = 2,
Visible = false,
AutomaticSize = Enum.AutomaticSize.XY,
BackgroundColor3 = rgb(255, 255, 255)
})
library:create("UIListLayout", {
Parent = keybind_selector,
Name = "",
SortOrder = Enum.SortOrder.LayoutOrder,
HorizontalFlex = Enum.UIFlexAlignment.Fill,
Padding = dim(0, 2)
})
library:create("UIStroke", {
Parent = hold_button,
Name = "",
LineJoinMode = Enum.LineJoinMode.Miter
})
library:create("UIPadding", {
Parent = keybind_selector,
Name = "",
PaddingTop = dim(0, 3),
PaddingBottom = dim(0, 5),
PaddingRight = dim(0, 5),
PaddingLeft = dim(0, 5)
})
library:create("UIStroke", {
Parent = toggle_button,
Name = "",
LineJoinMode = Enum.LineJoinMode.Miter
})
local always_button = library:create("TextButton", {
Parent = keybind_selector,
Name = "",
FontFace = library.font,
TextColor3 = rgb(180, 180, 180),
BorderColor3 = rgb(0, 0, 0),
Text = "always",
BackgroundTransparency = 1,
AutomaticSize = Enum.AutomaticSize.XY,
BorderSizePixel = 0,
ZIndex = 2,
TextSize = 12,
BackgroundColor3 = rgb(255, 255, 255)
})
library:create("UIStroke", {
Parent = always_button,
Name = "",
LineJoinMode = Enum.LineJoinMode.Miter
})
-- init
element_outline:GetPropertyChangedSignal("AbsolutePosition"):Connect(function()
keybind_selector.Position = dim2(0,
element_outline.AbsolutePosition.X + 1, 0, element_outline.AbsolutePosition.Y + 17)
end)
function cfg.set_visible(bool)
keybind_selector.Visible = bool
if bool then
if library.current_element_open and
library.current_element_open ~= cfg then
library.current_element_open.set_visible(false)
library.current_element_open.open = false
end
library.current_element_open = cfg
end
end
function cfg.set_mode(mode)
cfg.mode = mode
flags[cfg.flag]["mode"] = mode
end
function cfg.set(input)
if type(input) == "boolean" then
local __cached = input
cfg.active = __cached
flags[cfg.flag]["active"] = __cached
cfg.callback(__cached)
elseif tostring(input):find("Enum") then
input = input.Name == "Escape" and "..." or input
flags[cfg.flag]["mode"] = cfg.mode
flags[cfg.flag]["key"] = cfg.key
key_text.Text = string.lower(_text2)
cfg.callback(cfg.active or false)
elseif table.find({"toggle", "hold", "always"}, input) then
cfg.set_mode(input)
cfg.callback(cfg.active or false)
elseif type(input) == "table" then
input.key = type(input.key) == "string" and input.key ~=
"..." and library:convert_enum(input.key) or input.key
flags[cfg.flag] = {
mode = cfg.mode,
key = cfg.key,
active = cfg.active
}
if cfg.name then
KEYBIND_ELEMENT.Visible = cfg.active
end
if cfg.name then
KEYBIND_ELEMENT.Text = "[ " ..
string.upper(string.sub(cfg.mode, 1, 1)) .. string.sub(cfg.mode, 2) .. " ] " ..
cfg.name .. " - " .. __text
end
end
hold_button.MouseButton1Click:Connect(function()
cfg.set_mode("hold")
cfg.set_visible(false)
cfg.open = false
end)
toggle_button.MouseButton1Click:Connect(function()
cfg.set_mode("toggle")
cfg.set_visible(false)
cfg.open = false
end)
always_button.MouseButton1Click:Connect(function()
cfg.set_mode("always")
cfg.set_visible(false)
cfg.open = false
end)
element_outline.MouseButton2Click:Connect(function()
cfg.open = not cfg.open
cfg.set_visible(cfg.open)
end)
element_outline.MouseButton1Down:Connect(function()
task.wait()
key_text.Text = "..."
cfg.binding = library:connection(uis.InputBegan,
function(keycode, game_event)
cfg.set(keycode.KeyCode)
cfg.binding:Disconnect()
cfg.binding = nil
end)
end)
library.config_flags[cfg.flag] = cfg.set
--
self.previous_holder = parent
library.config_flags[cfg.flag] = cfg.set
return self
end
function library:dropdown(options)
local parent = self.holder
local cfg = {
name = options.name or nil,
flag = options.flag or tostring(math.random(1,9999999)),
previous_holder = self,
open = false,
option_instances = {},
multi_items = {},
scrolling = options.scrolling or false,
previous_holder = self
}
cfg.default = options.default or (cfg.multi and {cfg.items[1]}) or
cfg.items[1] or nil
-- dropdown elements
local dropdown = library:create("TextLabel", {
Parent = parent,
FontFace = library.font,
TextColor3 = rgb(180, 180, 180),
BorderColor3 = rgb(0, 0, 0),
Text = "",
Name = "dropdown",
ZIndex = 2,
Size = dim2(1, -8, 0, 12),
BorderSizePixel = 0,
BackgroundTransparency = 1,
TextXAlignment = Enum.TextXAlignment.Left,
AutomaticSize = Enum.AutomaticSize.Y,
TextYAlignment = Enum.TextYAlignment.Top,
TextSize = 11,
BackgroundColor3 = rgb(255, 255, 255)
})
local main_text
if cfg.name then
local left_components = library:create("Frame", {
Parent = dropdown,
Name = "left_components",
BackgroundTransparency = 1,
Position = dim2(0, 2, 0, -1),
BorderColor3 = rgb(0, 0, 0),
Size = dim2(0, 0, 0, 14),
BorderSizePixel = 0,
BackgroundColor3 = rgb(255, 255, 255)
})
main_text = library:create("TextLabel", {
Parent = left_components,
FontFace = library.font,
TextColor3 = rgb(180, 180, 180),
BorderColor3 = rgb(0, 0, 0),
Text = cfg.name,
Name = "text",
BackgroundTransparency = 1,
Size = dim2(0, 0, 1, -1),
BorderSizePixel = 0,
AutomaticSize = Enum.AutomaticSize.X,
TextSize = 12,
BackgroundColor3 = rgb(255, 255, 255)
})
library:create("UIStroke", {
Parent = main_text,
LineJoinMode = Enum.LineJoinMode.Miter
})
library:create("UIListLayout", {
Parent = left_components,
Padding = dim(0, 5),
Name = "_",
FillDirection = Enum.FillDirection.Horizontal
})
self.previous_holder = left_components
self.right_holder = right_components
end
library:create("UIStroke", {
Parent = plus,
LineJoinMode = Enum.LineJoinMode.Miter
})
library:create("UIStroke", {
Parent = text,
LineJoinMode = Enum.LineJoinMode.Miter
})
library:create("UIListLayout", {
Parent = bottom_components,
Padding = dim(0, 10),
Name = "_",
SortOrder = Enum.SortOrder.LayoutOrder
})
--
-- dropdown holder
local dropdown_holder = library:create("Frame", {
Parent = sgui,
BorderColor3 = rgb(0, 0, 0),
Name = "dropdown_holder",
BackgroundTransparency = 1,
Position = dim2(0, dropdown.AbsolutePosition.X + 1, 0,
dropdown.AbsolutePosition.Y + 22),
Size = dim2(0, dropdown.AbsoluteSize.X, 0, cfg.scrolling and
180 or 0),
BorderSizePixel = 0,
AutomaticSize = cfg.scrolling and Enum.AutomaticSize.None or
Enum.AutomaticSize.Y,
BackgroundColor3 = rgb(32, 32, 38),
Visible = false
})
local background;
if not cfg.scrolling then
background = library:create("Frame", {
Parent = inline,
BorderColor3 = rgb(0, 0, 0),
Name = "background",
BackgroundTransparency = 1,
Position = dim2(0, 1, 0, 1),
Size = dim2(1, -2, 1, 1),
ZIndex = 2,
BorderSizePixel = 0,
BackgroundColor3 = themes.preset.accent
})
library:apply_theme(background, "accent", "BackgroundColor3")
else
background = library:create("ScrollingFrame", {
Parent = inline,
BorderColor3 = rgb(0, 0, 0),
Name = "background",
BackgroundTransparency = 1,
Position = dim2(0, 1, 0, 1),
Size = dim2(1, -2, 1, 1),
ZIndex = 2,
BorderSizePixel = 0,
BackgroundColor3 = themes.preset.accent,
CanvasSize = dim2(0, 0, 0, 0),
AutomaticCanvasSize = Enum.AutomaticSize.Y,
ScrollBarThickness = 2,
ScrollBarImageColor3 = themes.preset.accent
})
library:apply_theme(background, "accent", "BackgroundColor3")
end
library:create("UIListLayout", {
Parent = contrast,
Padding = dim(0, 5),
SortOrder = Enum.SortOrder.LayoutOrder
})library:apply_theme(UIGradient, "contrast", "Color")
dropdown:GetPropertyChangedSignal("AbsoluteSize"):Connect(function()
dropdown_holder.Size = dim2(0, dropdown.AbsoluteSize.X, 0, 0)
end)
dropdown:GetPropertyChangedSignal("AbsolutePosition"):Connect(function()
dropdown_holder.Position = dim2(0, dropdown.AbsolutePosition.X
+ 1, 0, dropdown.AbsolutePosition.Y + 22)
end)
--
function cfg.set_visible(bool)
dropdown_holder.Visible = bool
if bool then
if library.current_element_open and
library.current_element_open ~= cfg then
library.current_element_open.set_visible(false)
library.current_element_open.open = false
end
library.current_element_open = cfg
end
end
function cfg.set(value)
local selected = {}
end
function cfg:refresh_options(refreshed_list)
for _, v in next, cfg.option_instances do
v:Destroy()
end
cfg.option_instances = {}
library:create("UIStroke", {
Parent = TextButton,
LineJoinMode = Enum.LineJoinMode.Miter
})
table.insert(cfg.option_instances, TextButton)
TextButton.MouseButton1Down:Connect(function()
if cfg.multi then
local selected_index = table.find(cfg.multi_items,
TextButton.Text)
if selected_index then
table.remove(cfg.multi_items, selected_index)
else
table.insert(cfg.multi_items, TextButton.Text)
end
cfg.set(cfg.multi_items)
else
cfg.set_visible(false)
cfg.open = false
cfg.set(TextButton.Text)
end
end)
end
end
dropdown.MouseButton1Click:Connect(function()
cfg.open = not cfg.open
cfg.set_visible(cfg.open)
end)
cfg:refresh_options(cfg.items)
cfg.set(cfg.default)
library.config_flags[cfg.flag] = cfg.set
return self
end
function library:list(options)
local cfg = {
callback = options and options.callback or function() end,
option_instances = {},
current_instance = nil,
flag = options.flag or "SET A FLAG U NIGGER",
previous_holder = self
}
library:create("UIListLayout", {
Parent = bottom_components,
Name = "",
Padding = dim(0, 10),
SortOrder = Enum.SortOrder.LayoutOrder
})
function cfg.render_option(text)
local TextButton = library:create("TextButton", {
Parent = ScrollingFrame,
Name = "",
Text = tostring(text),
FontFace = library.font,
TextColor3 = rgb(180, 180, 180),
BorderColor3 = rgb(0, 0, 0),
BackgroundTransparency = 1,
Size = dim2(1, 0, 0, 0),
BorderSizePixel = 0,
AutomaticSize = Enum.AutomaticSize.Y,
TextSize = 12,
BackgroundColor3 = rgb(255, 255, 255)
})
return TextButton
end
function cfg.refresh_options(options)
if type(options) == "function" then return end
for _, v in next, cfg.option_instances do
v:Destroy()
end
table.insert(cfg.option_instances, button)
button.MouseButton1Click:Connect(function()
if cfg.current_instance and cfg.current_instance ~= button
then
cfg.current_instance.TextColor3 = themes.preset.text
end
cfg.current_instance = button
button.TextColor3 = themes.preset.accent
flags[cfg.flag] = button.text
cfg.callback(button.text)
end)
end
end
function cfg.filter_options(text)
for _, v in next, cfg.option_instances do
if string.find(v.Text, text) then
v.Visible = true
else
v.Visible = false
end
end
end
cfg.refresh_options(cfg.items)
function library:textbox(options)
local cfg = {
placeholder = options.placeholder or options.placeholdertext or
options.holder or options.holdertext or "type here...",
default = options.default,
flag = options.flag or "SET ME NIGGA",
callback = options.callback or function() end
}
library:create("UIPadding", {
Parent = textbox_holder,
Name = "",
PaddingLeft = dim(0, 1)
})
library:create("UIStroke", {
Parent = textbox_holder,
Name = ""
})
local button = library:create("Frame", {
Parent = textbox_holder,
Name = "",
Position = dim2(0, 0, 0, 2),
BorderColor3 = rgb(0, 0, 0),
Size = dim2(1, -27, 0, 18),
BorderSizePixel = 0,
BackgroundColor3 = rgb(32, 32, 38)
})
library:create("UIStroke", {
Parent = TextBox,
Name = ""
})
library:create("UIListLayout", {
Parent = textbox_holder,
Name = "",
FillDirection = Enum.FillDirection.Horizontal,
HorizontalFlex = Enum.UIFlexAlignment.Fill,
Padding = dim(0, 4),
SortOrder = Enum.SortOrder.LayoutOrder
})
TextBox:GetPropertyChangedSignal("Text"):Connect(function()
flags[cfg.flag] = TextBox.text
cfg.callback(TextBox.text)
end)
function cfg.set(text)
flags[cfg.flag] = text
TextBox.Text = text
cfg.callback(text)
end
if cfg.default then
cfg.set(cfg.default)
end
library.config_flags[cfg.flag] = cfg.set
return self
end
function library:button_holder(options)
local button_holder = library:create("TextLabel", {
Parent = self.holder,
Name = "",
FontFace = library.font,
TextColor3 = rgb(180, 180, 180),
BorderColor3 = rgb(0, 0, 0),
Text = "",
ZIndex = 2,
Size = dim2(1, -8, 0, 12),
BorderSizePixel = 0,
BackgroundTransparency = 1,
TextXAlignment = Enum.TextXAlignment.Left,
AutomaticSize = Enum.AutomaticSize.Y,
TextYAlignment = Enum.TextYAlignment.Top,
TextSize = 11,
BackgroundColor3 = rgb(255, 255, 255),
})
self.current_holder = button_holder
library:create("UIStroke", {
Parent = button_holder,
Name = ""
})
library:create("UIListLayout", {
Parent = button_holder,
Name = "",
FillDirection = Enum.FillDirection.Horizontal,
HorizontalFlex = Enum.UIFlexAlignment.Fill,
Padding = dim(0, 4),
SortOrder = Enum.SortOrder.LayoutOrder
})
return self
end
function library:button(options)
local cfg = {
callback = options.callback or function() end,
name = options.text or options.name or "Button",
}
button.MouseButton1Click:Connect(function()
cfg.callback()
end)
return self
end
function library:label(options)
local cfg = {name = options.text or options.name or "Label",
previous_holder = self}
function cfg.change_text(text)
TextLabel.Text = text
end
self.previous_holder = left_components
self.right_holder = right_components
function library:playerlist(options)
local cfg = {
players = {},
callback = options.callback or function() end,
selected_player,
labels = {
name,
display,
uid,
}
}
local patterns = {
["Priority"] = Color3.fromRGB(255, 255, 0),
["Enemy"] = Color3.fromRGB(255, 0, 0),
["Neutral"] = themes.preset.text,
["Friendly"] = Color3.fromRGB(0, 255, 255)
}
-- elements
local playerlist_holder = library:create("TextLabel", {
Parent = self.holder,
Name = "",
FontFace = library.font,
TextColor3 = rgb(180, 180, 180),
BorderColor3 = rgb(0, 0, 0),
Text = "",
ZIndex = 2,
Size = dim2(1, -8, 0, 12),
BorderSizePixel = 0,
BackgroundTransparency = 1,
TextXAlignment = Enum.TextXAlignment.Left,
AutomaticSize = Enum.AutomaticSize.Y,
TextYAlignment = Enum.TextYAlignment.Top,
TextSize = 11,
BackgroundColor3 = rgb(255, 255, 255)
})
library:create("UIListLayout", {
Parent = bottom_components,
Name = "",
Padding = dim(0, 10),
SortOrder = Enum.SortOrder.LayoutOrder
})
function cfg.create_player(player)
cfg.players[tostring(player)] = {}
local path = cfg.players[tostring(player)]
path.instance = TextButton
path.line = line
function path.set_priority(text)
priority_text.Text = text
priority_text.TextColor3 = patterns[text]
end
TextButton.MouseButton1Click:Connect(function()
if cfg.selected_player then
cfg.selected_player.TextColor3 = themes.preset.text
end
cfg.selected_player = player_name
player_name.TextColor3 = themes.preset.accent
cfg.callback(players[tostring(player)])
if cfg.labels.name then
cfg.labels.name.change_text("User: " .. tostring(player))
cfg.labels.display.change_text("DisplayName: " ..
players[tostring(player)].DisplayName)
cfg.labels.uid.change_text("User Id: " ..
players[tostring(player)].UserId)
end
end)
return path
end
function cfg.remove_player(player)
cfg.players[tostring(player)].instance:Destroy()
cfg.players[tostring(player)].line:Destroy()
cfg.players[tostring(player)] = nil
end
players.PlayerAdded:Connect(cfg.create_player)
players.PlayerRemoving:Connect(cfg.remove_player)
return self
end
--
--
-- documentation
local window = library:window({name = os.date('nigger - %b %d %Y'), size =
dim2(0, 614, 0, 639)})
local watermark = library:watermark({default = os.date('nigger - %b %d %Y - %H:
%M:%S')})
-- Aiming
local column = Aiming:column()
column:section({name = "Target Selection"})
:toggle({name = "Toggle With Keybind", flag = "e", callback =
function(bool)
print("Toggle With Keybind On/Off") -- im not making shit for
this
end})
:keybind({name = "Aiming", flag = "e", callback = function(bool)
bounding_box_fill.CFrame = cfr(9e9, 9e9, 9e9) -- keybind
end})
:toggle({name = "Normal Toggle", flag = "e", callback =
function(bool)
print("Tggole On/Off")
end})
:slider({name = "Slide", min = 0, max = 1000, default = 40,
interval = 1, suffix = "ms", flag = "e", callback = function(bool)
print("This Is A Slide")
end})
:dropdown({name = "Multi Dropdown", flag = "e", items = {"Juju",
"Temple", "Eagle", "Unnamed"}, multi = true
})
:toggle({name = "Toggle With ColorPicker", flag = "e"})
:colorpicker({name = "Color Picker", flag = "e", color =
Color3.fromHex("#000000"), callback = function(color, alpha)
end})
:dropdown({name = "Dropdown", flag = "e", items = {"Hentai",
"Porn", "Milfs"}, multi = false, callback = function(option)
print("Real")
end})
:textbox({name = "TextBox", flag = "e"})
local column = Aiming:column()
column:section({name = "Section"})
:toggle({name = "Toggle", flag = "e"})
column:section({name = "Section"})
:toggle({name = "Toggle", flag = "e"})
--
-- Misc
local column = Misc:column()
column:section({name = "Combat"})
:toggle({name = "Speed", flag = "cframe_speed"})
:keybind({name = "Speed", flag = "cframe_speed_bind", mode =
"toggle"})
:slider({name = "Amount", flag = 'speed_increments', min = 0, max =
100, default = 10, interval = 1})
:toggle({name = "Auto Jump", flag = "auto_jump"})
:toggle({name = "Fly", flag = "fly"})
:keybind({name = "Fly", flag = "fly_bind", mode = "toggle"})
:slider({name = "Amount", flag = 'fly_increments', min = 0, max =
100, default = 20, interval = 1})
:toggle({name = "No Slow", flag = "no_slow"})
:toggle({name = "No Jump Cooldown", flag = "no_jump_cooldown",
callback = function(bool)
lp.Character.Humanoid.UseJumpPower = not bool
end})
:toggle({name = "Auto Reload", flag = "auto_reload"})
:toggle({name = "Auto Shoot", flag = "auto_shoot", callback =
function(bool)
end})
:slider({name = "Delay", flag = 'auto_shoot_delay', min = 0, max =
1000, default = 50, interval = 1, suffix = "ms"})
:toggle({name = "Auto Armor", flag = "auto_armor"})
:toggle({name = "Anti Void Kill", flag = "anti_void_kill", callback
= function(bool)
ws.FallenPartsDestroyHeight = bool and -50000 or -500
end})
-- :toggle({name = "Anti Stomp", flag = "anti_stomp"})
:toggle({name = "Infinite Zoom", flag = "infinite_zoom", callback =
function(bool)
lp.CameraMaxZoomDistance = bool and 9e9 or 30
end})
--
-- Settings
local column = Settings:column()
local section = column:section({name = "Options"})
local old_config = library:get_config()
_, config_holder = section:list({flag = "config_name_list"})
section:textbox({flag = "config_name_text_box"})
section:button_holder({})
section:button({name = "Create", callback = function()
writefile(library.directory .. "/configs/" ..
flags["config_name_text_box"] .. ".cfg", library:get_config())
library:config_list_update()
end})
section:button({name = "Delete", callback = function()
delfile(library.directory .. "/configs/" ..
flags["config_name_list"] .. ".cfg")
library:config_list_update()
end})
section:button_holder({})
section:button({name = "Load", callback = function()
library:load_config(readfile(library.directory ..
"/configs/" .. flags["config_name_list"] .. ".cfg"))
end})
section:button({name = "Save", callback = function()
writefile(library.directory .. "/configs/" ..
flags["config_name_text_box"] .. ".cfg", library:get_config())
library:config_list_update()
end})
section:button_holder({})
section:button({name = "Unload Config", callback = function()
library:load_config(old_config)
end})
section:button({name = "Unload Menu", callback = function()
for _, gui in next, library.guis do
gui:Destroy()
end
--
library:config_list_update()