-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample.lua
More file actions
163 lines (147 loc) · 4.47 KB
/
example.lua
File metadata and controls
163 lines (147 loc) · 4.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
local GUI = loadstring(game:HttpGet("https://raw.githubusercontent.com/BloodLetters/Ash-Libs/refs/heads/main/source.lua"))()
GUI:CreateMain({
Name = "Ashlabs",
title = "Ashlabs GUI",
ToggleUI = "K",
WindowIcon = "home", -- you can use lucid icons
-- WindowHeight = 600, -- default height
-- WindowWidth = 800, -- default width
alwaysIconOnly = false, -- always show icons only in navigation
Theme = {
Background = Color3.fromRGB(15, 15, 25),
Secondary = Color3.fromRGB(25, 25, 35),
Accent = Color3.fromRGB(138, 43, 226),
AccentSecondary = Color3.fromRGB(118, 23, 206),
Text = Color3.fromRGB(255, 255, 255),
TextSecondary = Color3.fromRGB(180, 180, 180),
Border = Color3.fromRGB(45, 45, 55),
NavBackground = Color3.fromRGB(20, 20, 30),
Surface = Color3.fromRGB(30, 30, 40),
SurfaceVariant = Color3.fromRGB(35, 35, 45),
Success = Color3.fromRGB(40, 201, 64),
Warning = Color3.fromRGB(255, 189, 46),
Error = Color3.fromRGB(255, 95, 87),
Shadow = Color3.fromRGB(0, 0, 0)
},
Blur = { -- Buggy
Enable = false, -- transparent option
value = 0.2
},
Config = {
Enabled = false, -- Auto save config feature
FileName = "AshLabs", -- name of the config file
FolerName = "AshDir", -- folder to save configs
}
})
local main = GUI:CreateTab("Main", "home") -- You can use IconID we didnt impleemnt lucid or any external icons
GUI:CreateSection({
parent = main,
text = "Section"
})
GUI:CreateButton({
parent = main,
text = "Click Me",
flag = "ClickMeBtn",
callback = function()
GUI:CreateNotify({title = "Button Clicked", description = "You clicked the button!"})
end
})
GUI:CreateButton({
parent = main,
text = "Notify",
flag = "NotifyBtn",
callback = function()
GUI:CreateNotify({title = "Welcome", description = "Welcome to the Ashlabs GUI! This is a notification exampled. You can use this to inform users about important events or actions. You can customize the title and description to fit your needs. description can be multiple lines long and will adjust its size based on the content."})
end
})
GUI:CreateToggle({
parent = main,
text = "Toggle Me",
default = false,
flag = "ToggleMe",
callback = function(state)
print("Toggle state:", state)
end
})
GUI:CreateSlider({
parent = main,
text = "Slider",
min = 0,
max = 100,
default = 50,
flag = "SliderValue",
function(value)
print("Slider value changed:", value)
end
})
GUI:CreateDropdown({
parent = main,
text = "Select Option",
options = {"Option 1", "Option 2", "Option 3"},
default = "Option 1",
flag = "DropdownOption",
callback = function(selected)
print("Selected option:", selected)
end
})
GUI:CreateKeyBind({
parent = main,
text = "Press a Key",
default = "K",
flag = "KeyBind",
callback = function(key, input, isPressed)
if isPressed then
print("Key pressed:", key)
else
print("Key released:", key)
end
end
})
GUI:CreateInput({
parent = main,
text = "Enter Text",
placeholder = "Placeholder",
flaag = "InputText",
callback = function(text)
print("Input text:", text)
end
})
GUI:CreateParagraph({
parent = main,
title = "title",
text = "This is a paragraph explaining something important. It can be multiple lines long and will adjust its size based on the content."
})
GUI:CreateColorPicker({
parent = main,
text = "Pick a Color",
default = Color3.fromRGB(255, 0, 0),
flag = "ColorPicker",
callback = function(color)
print("Selected color:", color)
end
})
local settings = GUI:CreateTab("Settings", "settings")
GUI:CreateSection({
parent = settings,
text = "Settings Section"
})
GUI:CreateButton({
parent = settings,
text = "Reset Settings",
flag = "ResetSettingsBtn",
callback = function()
GUI:CreateNotify({ title = "Settings Reset", text = "All settings have been reset to default."})
end
})
GUI:CreateDivider({
parent = settings
})
GUI:CreateButton({
parent = settings,
text = "Reset 2",
flag = "ResetSettingsBtn2",
callback = function()
GUI:CreateNotify({ title = "Settings Reset", text = "All settings have been reset to default."})
end
})
local move = GUI:CreateTab("Settings")