1 | for i,v in pairs(game.CoreGui:GetChildren()) do |
2 | if v.Name == "UiLib" then |
3 | v:Destroy() |
4 | end |
5 | end |
6 | |
7 | local UiLib = Instance.new("ScreenGui") |
8 | UiLib.Name = "UiLib" |
9 | UiLib.Parent = game.CoreGui |
10 | UiLib.ZIndexBehavior = Enum.ZIndexBehavior.Sibling |
11 | |
12 | local function getNextWindowPos() |
13 | local biggest = 0; |
14 | local ok = nil; |
15 | for i, v in pairs(UiLib:GetChildren()) do |
16 | if v.Position.X.Offset > biggest then |
17 | biggest = v.Position.X.Offset |
18 | ok = v; |
19 | end |
20 | end |
21 | if biggest == 0 then |
22 | biggest = biggest + 15; |
23 | else |
24 | biggest = biggest + ok.Size.X.Offset + 10; |
25 | end |
26 | |
27 | return biggest; |
28 | end |
29 | |
30 | local Library = {} |
31 | |
32 | function Library:Window(title) |
33 | local Top = Instance.new("Frame") |
34 | local UICorner = Instance.new("UICorner") |
35 | local Container = Instance.new("Frame") |
36 | local UIListLayout_2 = Instance.new("UIListLayout") |
37 | local Line = Instance.new("Frame") |
38 | local Title = Instance.new("TextLabel") |
39 | local Minimize = Instance.new("ImageButton") |
40 | |
41 | Top.Name = "Top" |
42 | Top.Parent = UiLib |
43 | Top.BackgroundColor3 = Color3.fromRGB(30, 30, 30) |
44 | Top.BorderSizePixel = 0 |
45 | Top.Position = UDim2.new(0, getNextWindowPos(), 0.01, 0) |
46 | Top.Size = UDim2.new(0, 204, 0, 28) |
47 | Top.Active = true |
48 | Top.Draggable = true |
49 | |
50 | UICorner.CornerRadius = UDim.new(0, 4) |
51 | UICorner.Parent = Top |
52 | |
53 | Container.Name = "Container" |
54 | Container.Parent = Top |
55 | Container.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
56 | Container.BackgroundTransparency = 1.000 |
57 | Container.ClipsDescendants = true |
58 | Container.Position = UDim2.new(0, 0, 1, 0) |
59 | Container.Size = UDim2.new(0, 204, 0, 762) |
60 | |
61 | UIListLayout_2.Parent = Container |
62 | UIListLayout_2.HorizontalAlignment = Enum.HorizontalAlignment.Center |
63 | UIListLayout_2.SortOrder = Enum.SortOrder.LayoutOrder |
64 | |
65 | Line.Name = "Line" |
66 | Line.Parent = Top |
67 | Line.BackgroundColor3 = Color3.fromRGB(30, 30, 30) |
68 | Line.BorderSizePixel = 0 |
69 | Line.Position = UDim2.new(0, 0, 0.892857134, 0) |
70 | Line.Size = UDim2.new(0, 204, 0, 3) |
71 | |
72 | Title.Name = "Title" |
73 | Title.Parent = Top |
74 | Title.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
75 | Title.BackgroundTransparency = 1.000 |
76 | Title.Position = UDim2.new(0.0245098043, 0, 0.142857149, 0) |
77 | Title.Size = UDim2.new(0, 174, 0, 20) |
78 | Title.Font = Enum.Font.GothamSemibold |
79 | Title.Text = title |
80 | Title.TextColor3 = Color3.fromRGB(255, 255, 255) |
81 | Title.TextScaled = true |
82 | Title.TextSize = 14.000 |
83 | Title.TextWrapped = true |
84 | Title.TextXAlignment = Enum.TextXAlignment.Left |
85 | |
86 | Minimize.Name = "Minimize" |
87 | Minimize.Parent = Top |
88 | Minimize.BackgroundTransparency = 1.000 |
89 | Minimize.Position = UDim2.new(0.877451003, 0, 0, 0) |
90 | Minimize.Rotation = 90.000 |
91 | Minimize.Size = UDim2.new(0, 25, 0, 25) |
92 | Minimize.ZIndex = 2 |
93 | Minimize.Image = "rbxassetid://3926307971" |
94 | Minimize.ImageColor3 = Color3.fromRGB(0, 255, 102) |
95 | Minimize.ImageRectOffset = Vector2.new(764, 244) |
96 | Minimize.ImageRectSize = Vector2.new(36, 36) |
97 | |
98 | local function UZVNGAL_fake_script() |
99 | local script = Instance.new('Script', Minimize) |
100 | |
101 | script.Parent.MouseButton1Click:Connect(function() |
102 | if script.Parent.Parent.Container.Size == UDim2.new(0, 204,0, 762) then |
103 | game:GetService("TweenService"):Create(script.Parent, TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Rotation = 180}):Play(); |
104 | game:GetService("TweenService"):Create(script.Parent, TweenInfo.new(0.25), {ImageColor3 = Color3.fromRGB(255, 0, 68)}):Play() |
105 | script.Parent.Parent.Container:TweenSize(UDim2.new(0, 204,0, 0), "InOut", "Sine", 0.25, true) |
106 | wait(0.25) |
107 | script.Parent.Parent.Line.Visible = false |
108 | else |
109 | game:GetService("TweenService"):Create(script.Parent, TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Rotation = 90}):Play(); |
110 | game:GetService("TweenService"):Create(script.Parent, TweenInfo.new(0.25), {ImageColor3 = Color3.fromRGB(0, 255, 102)}):Play() |
111 | script.Parent.Parent.Container:TweenSize(UDim2.new(0, 204,0, 762), "InOut", "Sine", 0.2, true) |
112 | script.Parent.Parent.Line.Visible = true |
113 | end |
114 | end) |
115 | end |
116 | coroutine.wrap(UZVNGAL_fake_script)() |
117 | |
118 | local Lib = {} |
119 | |
120 | function Lib:Button(name, callback) |
121 | local ButtonContainer = Instance.new("Frame") |
122 | local Button = Instance.new("TextButton") |
123 | local ButtonAni = Instance.new("Frame") |
124 | local UICorner_2 = Instance.new("UICorner") |
125 | local UIListLayout = Instance.new("UIListLayout") |
126 | local ButtonName = Instance.new("TextLabel") |
127 | |
128 | ButtonContainer.Name = "ButtonContainer" |
129 | ButtonContainer.Parent = Container |
130 | ButtonContainer.BackgroundColor3 = Color3.fromRGB(30, 30, 30) |
131 | ButtonContainer.BorderSizePixel = 0 |
132 | ButtonContainer.Size = UDim2.new(0, 204, 0, 28) |
133 | |
134 | Button.Name = "Button" |
135 | Button.Parent = ButtonContainer |
136 | Button.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
137 | Button.BackgroundTransparency = 1.000 |
138 | Button.Size = UDim2.new(0, 204, 0, 28) |
139 | Button.Font = Enum.Font.SourceSans |
140 | Button.Text = "" |
141 | Button.TextColor3 = Color3.fromRGB(0, 0, 0) |
142 | Button.TextSize = 14.000 |
143 | Button.MouseButton1Click:Connect(function() |
144 | callback() |
145 | end) |
146 | |
147 | ButtonAni.Name = "ButtonAni" |
148 | ButtonAni.Parent = Button |
149 | ButtonAni.BackgroundColor3 = Color3.fromRGB(0, 255, 102) |
150 | ButtonAni.Position = UDim2.new(0.0245098043, 0, 0.0714285746, 0) |
151 | |
152 | UICorner_2.CornerRadius = UDim.new(0, 4) |
153 | UICorner_2.Parent = ButtonAni |
154 | |
155 | UIListLayout.Parent = Button |
156 | UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center |
157 | UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder |
158 | UIListLayout.VerticalAlignment = Enum.VerticalAlignment.Center |
159 | |
160 | ButtonName.Name = "ButtonName" |
161 | ButtonName.Parent = ButtonContainer |
162 | ButtonName.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
163 | ButtonName.BackgroundTransparency = 1.000 |
164 | ButtonName.Position = UDim2.new(0.0245098043, 0, 0.142857149, 0) |
165 | ButtonName.Size = UDim2.new(0, 194, 0, 20) |
166 | ButtonName.ZIndex = 3 |
167 | ButtonName.Font = Enum.Font.GothamSemibold |
168 | ButtonName.Text = name |
169 | ButtonName.TextColor3 = Color3.fromRGB(255, 255, 255) |
170 | ButtonName.TextScaled = true |
171 | ButtonName.TextSize = 14.000 |
172 | ButtonName.TextWrapped = true |
173 | |
174 | local function ZNVYM_fake_script() |
175 | local script = Instance.new('Script', Button) |
176 | |
177 | script.Parent.MouseButton1Click:Connect(function() |
178 | script.Parent.ButtonAni:TweenSize(UDim2.new(0, 194,0, 24), 'InOut', "Sine", 0.3, true) |
179 | wait(0.45) |
180 | script.Parent.ButtonAni:TweenSize(UDim2.new(0, 0, 0, 0), "InOut", "Sine", 0.3, true) |
181 | end) |
182 | end |
183 | coroutine.wrap(ZNVYM_fake_script)() |
184 | end |
185 | |
186 | function Lib:Toggle(name, callback) |
187 | local ToggleContainer = Instance.new("Frame") |
188 | local ToggleName = Instance.new("TextLabel") |
189 | local Toggle = Instance.new("TextButton") |
190 | local UICorner_3 = Instance.new("UICorner") |
191 | local Off = Instance.new("ImageLabel") |
192 | local On = Instance.new("ImageLabel") |
193 | |
194 | ToggleContainer.Name = "ToggleContainer" |
195 | ToggleContainer.Parent = Container |
196 | ToggleContainer.BackgroundColor3 = Color3.fromRGB(30, 30, 30) |
197 | ToggleContainer.BorderSizePixel = 0 |
198 | ToggleContainer.Size = UDim2.new(0, 204, 0, 30) |
199 | |
200 | ToggleName.Name = "ToggleName" |
201 | ToggleName.Parent = ToggleContainer |
202 | ToggleName.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
203 | ToggleName.BackgroundTransparency = 1.000 |
204 | ToggleName.Position = UDim2.new(0.0245098043, 0, 0.142857105, 0) |
205 | ToggleName.Size = UDim2.new(0, 169, 0, 20) |
206 | ToggleName.Font = Enum.Font.GothamSemibold |
207 | ToggleName.Text = name |
208 | ToggleName.TextColor3 = Color3.fromRGB(255, 255, 255) |
209 | ToggleName.TextScaled = true |
210 | ToggleName.TextSize = 14.000 |
211 | ToggleName.TextWrapped = true |
212 | ToggleName.TextXAlignment = Enum.TextXAlignment.Left |
213 | |
214 | Toggle.Name = "Toggle" |
215 | Toggle.Parent = ToggleContainer |
216 | Toggle.BackgroundColor3 = Color3.fromRGB(39, 39, 39) |
217 | Toggle.BorderColor3 = Color3.fromRGB(27, 42, 53) |
218 | Toggle.Position = UDim2.new(0.852941215, 0, 0.0666666627, 0) |
219 | Toggle.Size = UDim2.new(0, 25, 0, 23) |
220 | Toggle.AutoButtonColor = false |
221 | Toggle.Font = Enum.Font.SourceSans |
222 | Toggle.Text = "" |
223 | Toggle.TextColor3 = Color3.fromRGB(0, 0, 0) |
224 | Toggle.TextSize = 14.000 |
225 | local Toggled = false |
226 | Toggle.MouseButton1Click:Connect(function() |
227 | if Toggled == false then |
228 | Toggled = true |
229 | else |
230 | Toggled = false |
231 | end |
232 | callback(Toggled) |
233 | end) |
234 | |
235 | UICorner_3.CornerRadius = UDim.new(0, 3) |
236 | UICorner_3.Parent = Toggle |
237 | |
238 | Off.Name = "Off" |
239 | Off.Parent = Toggle |
240 | Off.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
241 | Off.BackgroundTransparency = 1.000 |
242 | Off.Size = UDim2.new(0, 25, 0, 25) |
243 | Off.Image = "rbxassetid://3926305904" |
244 | Off.ImageColor3 = Color3.fromRGB(255, 0, 68) |
245 | Off.ImageRectOffset = Vector2.new(924, 724) |
246 | Off.ImageRectSize = Vector2.new(36, 36) |
247 | |
248 | On.Name = "On" |
249 | On.Parent = Toggle |
250 | On.BackgroundColor3 = Color3.fromRGB(255, 255, 255) |
251 | On.BackgroundTransparency = 1.000 |
252 | On.Size = UDim2.new(0, 25, 0, 25) |
253 | On.Visible = false |
254 | On.Image = "rbxassetid://3926305904" |
255 | On.ImageColor3 = Color3.fromRGB(0, 255, 102) |
256 | On.ImageRectOffset = Vector2.new(312, 4) |
257 | On.ImageRectSize = Vector2.new(24, 24) |
258 | |
259 | local function XLZZDX_fake_script() |
260 | local script = Instance.new('Script', Toggle) |
261 | |
262 | script.Parent.MouseButton1Click:Connect(function() |
263 | if script.Parent.Off.Rotation == 0 then |
264 | script.Parent.On.Rotation = 0 |
265 | game:GetService("TweenService"):Create(script.Parent.Off, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Rotation = 360}):Play(); |
266 | wait(0.3) |
267 | script.Parent.Off.Visible = false |
268 | script.Parent.On.Visible = true |
269 | else |
270 | script.Parent.Off.Rotation = 0 |
271 | game:GetService("TweenService"):Create(script.Parent.On, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Rotation = -360}):Play(); |
272 | wait(0.3) |
273 | script.Parent.On.Visible = false |
274 | script.Parent.Off.Visible = true |
275 | end |
276 | end) |
277 | end |
278 | coroutine.wrap(XLZZDX_fake_script)() |
279 | end |
280 | |
281 | return Lib |
282 | |
283 | end |
284 | |
285 | return Library |