· 5 years ago · Dec 24, 2020, 03:26 AM
1if not _G.require then
2 _G.require = require
3end
4
5--// API References
6local GUIData = (function()
7 -- Variables
8 _V = 1.11
9
10 local screenGui = (script:FindFirstChild("ScreenGui")) or game:GetObjects("rbxassetid://2718157603")[1]:FindFirstChild("ScreenGui", true)
11 --local screenGui = game:GetService("ReplicatedStorage").CardinalityUI:Clone()
12 local Container = screenGui.Frame
13 local Opt = Container.OptionsFrame
14 local Checkbox = Opt.Checkbox
15 local Color = Opt.Color
16 local Frame = Opt.Frame
17 local Execute = Opt.Execute
18 local Mode = Opt.Mode
19 local Number = Opt.Number
20 local Toggle = Opt.Toggle
21 local Mods = screenGui.Mods
22 local ModLabel = Mods.Example
23
24 local TextService = game:GetService("TextService")
25 local UserInputService = game:GetService("UserInputService")
26 local HttpService = game:GetService("HttpService")
27 local Player = game:GetService("Players").LocalPlayer
28 local Mouse = Player:GetMouse()
29 syn = syn or nil
30 if syn then
31 syn.protect_gui(screenGui)
32 end
33 local err,errcode=pcall(function()
34 screenGui.Parent = game:GetService("CoreGui")
35 end)
36 if not err then
37 print("ERR:",errcode)
38 screenGui.Parent = Player.PlayerGui
39 end
40
41 Container.Parent = nil
42 Checkbox.Parent = nil
43 Color.Parent = nil
44 Frame.Parent = nil
45 Execute.Parent = nil
46 Mode.Parent = nil
47 Number.Parent = nil
48 Toggle.Parent = nil
49 ModLabel.Parent = nil
50
51 local settingsArray = {{Object = screenGui},{}}
52 local saveData = {Options = {}, Hotkeys = {}}
53
54 local hotkeyFunctions = {}
55 local gui = {}
56
57 -- Save Functions
58 local writefile = writefile or function() end
59 local function Save()
60 local JSONData = HttpService:JSONEncode(saveData)
61 writefile("OpenGui.txt", JSONData)
62 end
63
64 -- Color Functions
65 local color = {}
66 local colors = {
67 TextDisabled = Color3.fromRGB(200, 200, 200),
68 TextEnabled = Color3.fromRGB(255, 255, 255),
69 }
70
71 local Colors = {
72 Color3.fromRGB(255, 73, 73),
73 Color3.fromRGB(255, 161, 66),
74 Color3.fromRGB(255, 233, 62),
75 Color3.fromRGB(137, 255, 64),
76 Color3.fromRGB(64, 255, 140),
77 Color3.fromRGB(66, 252, 255),
78 Color3.fromRGB(64, 147, 255),
79 Color3.fromRGB(255, 93, 253),
80 Color3.fromRGB(195, 110, 255),
81 Color3.fromRGB(255, 90, 134),
82 Color3.fromRGB(255, 255, 255),
83 Color3.fromRGB(209, 209, 209),
84 }
85
86 local function h2rgb(m1, m2, h)
87 if h<0 then h = h+1 end
88 if h>1 then h = h-1 end
89 if h*6<1 then
90 return m1+(m2-m1)*h*6
91 elseif h*2<1 then
92 return m2
93 elseif h*3<2 then
94 return m1+(m2-m1)*(2/3-h)*6
95 else
96 return m1
97 end
98 end
99
100 function color:rgbToHsv(r, g, b)
101 local a = 0
102 r, g, b, a = r / 255, g / 255, b / 255, a / 255
103 local max, min = math.max(r, g, b), math.min(r, g, b)
104 local h, s, v
105 v = max
106
107 local d = max - min
108 if max == 0 then s = 0 else s = d / max end
109
110 if max == min then
111 h = 0 -- achromatic
112 else
113 if max == r then
114 h = (g - b) / d
115 if g < b then h = h + 6 end
116 elseif max == g then h = (b - r) / d + 2
117 elseif max == b then h = (r - g) / d + 4
118 end
119 h = h / 6
120 end
121
122 return h, s, v
123 end
124
125 function color:hslToRgb(h, s, L)
126 h = h / 360
127 local m2 = L <= .5 and L*(s+1) or L+s-L*s
128 local m1 = L*2-m2
129 return
130 h2rgb(m1, m2, h+1/3), h2rgb(m1, m2, h), h2rgb(m1, m2, h-1/3)
131 end
132
133 function color:rgbToHsl(r, g, b)
134 local min = math.min(r, g, b)
135 local max = math.max(r, g, b)
136 local delta = max - min
137
138 local h, s, l = 0, 0, (min + max) / 2
139
140 if l > 0 and l < 0.5 then s = delta / (max + min) end
141 if l >= 0.5 and l < 1 then s = delta / (2 - max - min) end
142
143 if delta > 0 then
144 if max == r and max ~= g then h = h + (g-b) / delta end
145 if max == g and max ~= b then h = h + 2 + (b-r) / delta end
146 if max == b and max ~= r then h = h + 4 + (r-g) / delta end
147 h = h / 6
148 end
149
150 if h < 0 then h = h + 1 end
151 if h > 1 then h = h - 1 end
152
153 return h * 360, s, l
154 end
155
156 function color:adjustLightness(color3, amount)
157 local h, s, l = self:rgbToHsl(color3.r, color3.g, color3.b)
158 return Color3.new(self:hslToRgb(h, s, l + amount))
159 end
160
161 -- UI Functions
162 function gui.tween(object,style,direction,t,goal)
163 local tweenservice = game:GetService("TweenService")
164 local tweenInfo = TweenInfo.new(t,Enum.EasingStyle[style],Enum.EasingDirection[direction])
165 local tween = tweenservice:Create(object,tweenInfo,goal)
166 tween.Completed:Connect(function()
167 tween:Destroy()
168 end)
169 tween:Play()
170 return tween
171 end
172
173 function gui:makeDraggable(ui, callback)
174 local UserInputService = game:GetService("UserInputService")
175
176 local dragging
177 local dragInput
178 local dragStart
179 local startPos
180
181 local function update(input)
182 local delta = input.Position - dragStart
183 ui.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
184
185 if callback then
186 callback(ui.Position.X.Offset, ui.Position.Y.Offset)
187 end
188 end
189
190 ui.InputBegan:Connect(function(input)
191 if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
192 dragging = true
193 dragStart = input.Position
194 startPos = ui.Position
195
196 input.Changed:Connect(function()
197 if input.UserInputState == Enum.UserInputState.End then
198 dragging = false
199 end
200 end)
201 end
202 end)
203
204 ui.InputChanged:Connect(function(input)
205 if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
206 dragInput = input
207 end
208 end)
209
210 UserInputService.InputChanged:Connect(function(input)
211 if input == dragInput and dragging then
212 update(input)
213 end
214 end)
215 end
216
217 function gui:unpack(data, type)
218 if data == nil then return end
219 if type == "UDim2" then
220 return data and UDim2.new(data[1], data[2], data[3], data[4])
221 elseif type == "boolean" then
222 return data == 1 and true or false
223 elseif type == "Color3" then
224 return Color3.new(data[1], data[2], data[3])
225 end
226 return data
227 end
228
229 function gui:pack(data)
230 if typeof(data) == "UDim2" then
231 return {data.X.Scale, data.X.Offset, data.Y.Scale, data.Y.Offset}
232 elseif typeof(data) == "boolean" then
233 return data and 1 or 0
234 elseif typeof(data) == "Color3" then
235 return {data.r, data.g, data.b}
236 end
237 return data
238 end
239
240 function gui:getn(array)
241 local n = 0
242 for _, v in pairs(array) do
243 n = n + 1
244 end
245 return n
246 end
247
248 function gui:setText(textLabel, text)
249 text = tostring(text)
250 textLabel.Text = text
251 if textLabel:FindFirstChild("Opaque") then
252 textLabel.Opaque.Text = text
253 end
254 if textLabel:FindFirstChild("Shadow") then
255 textLabel.Shadow.Text = text
256 end
257 end
258
259 function gui:onDoubleTap(guiObject, callback)
260 local lastTap = tick()
261 guiObject.InputBegan:Connect(function(input)
262 if input.UserInputType == Enum.UserInputType.MouseButton1 then
263 if tick() - lastTap < 0.25 then
264 callback()
265 end
266 lastTap = tick()
267 end
268 end)
269 end
270
271 local connections = {}
272 function gui:connect(func)
273 table.insert(connections, func)
274 end
275
276 function gui:createList(guiObject, guiData)
277 local ListLayout = guiObject.OptionsFrame.UIListLayout
278 local Padding = guiObject.OptionsFrame.UIPadding
279 guiObject.OptionsFrame.UIListLayout.Changed:Connect(function(Property)
280 if Property == "AbsoluteContentSize" then
281 guiData.ySize = ListLayout.AbsoluteContentSize.Y + 2 + Padding.PaddingTop.Offset + ListLayout.Padding.Offset * 2
282 end
283 end)
284
285 gui:connect(function()
286 if guiObject:FindFirstChild("Title") then
287 local yRes = Mouse.ViewSizeY
288 local diff = yRes - (guiData.yPos + guiData.ySize)
289 local difference = math.clamp(diff, 0, 5000)
290 guiObject.OptionsFrame.CanvasSize = UDim2.new(1, 0, 1.001, guiData.ySize - 35)
291
292 if guiData.Open then
293 guiObject.OptionsFrame.Size = guiObject.OptionsFrame.Size:Lerp(UDim2.new(1, 0, 0, guiData.ySize + math.clamp(diff, -5000, 0)), 0.3)
294 else
295 guiObject.OptionsFrame.Size = guiObject.OptionsFrame.Size:Lerp(UDim2.new(1, 0, 0, 0), 0.3)
296 end
297
298 guiObject.Frame.Size = guiObject.OptionsFrame.Size
299 else
300 if guiData.Open then
301 guiObject.Size = guiObject.Size:Lerp(UDim2.new(1, -8, 0, 35 + guiData.ySize), 0.3)
302 else
303 guiObject.Size = guiObject.Size:Lerp(UDim2.new(1, -8, 0, 35), 0.3)
304 end
305 end
306 end)
307
308 if guiObject:FindFirstChild("Dropdown") then
309 guiObject.Dropdown.Visible = false
310 guiObject.Dropdown.MouseButton1Down:Connect(function()
311 guiData.Open = not guiData.Open
312 if guiData.Open then
313 guiObject.Dropdown.Image = "rbxassetid://3559638428"
314 else
315 guiObject.Dropdown.Image = "rbxassetid://3554238678"
316 end
317 end)
318 else
319 gui:onDoubleTap(guiObject, function()
320 guiData.Open = not guiData.Open
321 end)
322 end
323 end
324
325 function gui:textColorOnHover(guiObject, guiData)
326 local hover = guiData.baseColor or guiObject.TextColor3
327 local default = color:adjustLightness(hover, -0.075)
328 local mdown = color:adjustLightness(hover, -0.15)
329 local mouseIn
330
331 local function update()
332 if guiData.baseColor then
333 hover = guiData.baseColor or guiObject.TextColor3
334 default = color:adjustLightness(hover, -0.075)
335 mdown = color:adjustLightness(hover, -0.15)
336 end
337 end
338
339 guiObject.MouseEnter:Connect(function()
340 update()
341 gui.tween(guiObject, "Sine", "Out", 0.25, {
342 TextColor3 = hover;
343 })
344 mouseIn = true
345 end)
346
347 guiObject.MouseLeave:Connect(function()
348 mouseIn = false
349 update()
350 gui.tween(guiObject, "Sine", "Out", 0.25, {
351 TextColor3 = default;
352 })
353 end)
354
355 guiObject.InputBegan:Connect(function(input)
356 if input.UserInputType == Enum.UserInputType.MouseButton1 then
357 update()
358 gui.tween(guiObject, "Sine", "Out", 0.25, {
359 TextColor3 = mdown;
360 })
361 end
362 end)
363
364 guiObject.InputEnded:Connect(function(input)
365 if input.UserInputType == Enum.UserInputType.MouseButton1 then
366 update()
367 gui.tween(guiObject, "Sine", "Out", 0.25, {
368 TextColor3 = mouseIn and hover or default;
369 })
370 end
371 end)
372
373 guiObject.TextColor3 = default
374 end
375
376 function gui:sliderXY(sliderFrame, inputObjects, callback)
377 local inputDown = false
378
379 local function refresh(c1, c2)
380 local sliderX = sliderFrame.AbsolutePosition.X + sliderFrame.AbsoluteSize.X
381 local sliderY = sliderFrame.AbsolutePosition.Y + sliderFrame.AbsoluteSize.Y
382
383 local distX = sliderX - Mouse.X
384 local distY = sliderY - Mouse.Y
385
386 local deltaX = 1-math.clamp(distX / sliderFrame.AbsoluteSize.X, 0, 1)
387 local deltaY = 1-math.clamp(distY / sliderFrame.AbsoluteSize.Y, 0, 1)
388
389 if callback then
390 callback(c1 or deltaX, c2 or deltaY)
391 end
392 end
393
394 for _, obj in pairs(inputObjects) do
395 obj.InputBegan:Connect(function(input)
396 if input.UserInputType == Enum.UserInputType.MouseButton1 then
397 inputDown = true
398 refresh()
399 end
400 end)
401 obj.InputEnded:Connect(function(input)
402 if input.UserInputType == Enum.UserInputType.MouseButton1 then
403 inputDown = false
404 refresh()
405 end
406 end)
407 obj.InputChanged:Connect(function(input)
408 if input == nil or input.UserInputType == Enum.UserInputType.MouseMovement then
409 if inputDown then
410 refresh()
411 end
412 end
413 end)
414 end
415
416 return refresh
417 end
418
419 function gui:createSlider(sliderFrame, inputObjects, callback)
420 local slider = sliderFrame.Value
421 local inputDown = false
422
423 local absPos = sliderFrame.AbsolutePosition.X + sliderFrame.AbsoluteSize.X
424 local absSize = sliderFrame.AbsoluteSize.X
425
426 local function refresh(custom)
427 local mouseX = Mouse.X
428 local sliderX = absPos
429 local dist = sliderX - mouseX
430 local delta = 1 - math.clamp(dist / absSize, 0, 1)
431
432 if custom then
433 delta = custom
434 end
435
436 slider.Size = UDim2.new(delta, 0, 1, 0)
437 if callback then
438 callback(delta, custom)
439 end
440 end
441
442 for _, obj in pairs(inputObjects) do
443 obj.InputBegan:Connect(function(input)
444 if input.UserInputType == Enum.UserInputType.MouseButton1 then
445 inputDown = true
446 absPos = sliderFrame.AbsolutePosition.X + sliderFrame.AbsoluteSize.X
447 absSize = sliderFrame.AbsoluteSize.X
448 refresh()
449 end
450 end)
451 obj.InputEnded:Connect(function(input)
452 if input.UserInputType == Enum.UserInputType.MouseButton1 then
453 inputDown = false
454 refresh()
455 end
456 end)
457 obj.InputChanged:Connect(function(input)
458 if input == nil or input.UserInputType == Enum.UserInputType.MouseMovement then
459 if inputDown then
460 refresh()
461 end
462 end
463 end)
464 end
465
466 return refresh
467 end
468
469 function gui:textSize(txt, vSize)
470 return TextService:GetTextSize(txt.Text, txt.TextSize, txt.Font, vSize)
471 end
472
473 local currentHint = 0
474
475 function gui:addHint(guiObject, hintText)
476 local hintKey = math.random()
477 guiObject.MouseEnter:Connect(function()
478 hintKey = math.random()
479 currentHint = hintKey
480
481 wait(2)
482
483 if currentHint == hintKey then
484 gui:setText(screenGui.Hint, " " .. hintText .. " ")
485 local textSize = gui:textSize(screenGui.Hint, Vector2.new(2500, 500))
486 screenGui.Hint.Position = UDim2.new(0, Mouse.X, 0, Mouse.Y + 4)
487 screenGui.Hint.Size = UDim2.new(0, textSize.X, 0, textSize.Y)
488 screenGui.Hint.Visible = true
489 end
490 end)
491
492 guiObject.MouseLeave:Connect(function()
493 hintKey = math.random()
494 end)
495
496 Mouse.Move:Connect(function()
497 if currentHint == hintKey then
498 screenGui.Hint.Visible = false
499 end
500 end)
501 end
502
503 -- UI Type Library
504 local lib = {}
505
506 function lib.Color(data, dataArray)
507 local guiObject = Color:Clone()
508 local color3Value = gui:unpack(saveData.Options[data.ID].Value, "Color3") or data.Default or Color3.new(1, 1, 1)
509 local guiData = {}
510
511 local HSV = color3Value
512 local H, S, V = color:rgbToHsv(HSV.r * 255, HSV.g * 255, HSV.b * 255)
513
514 local newValue = function()
515 HSV = Color3.fromHSV(H, S, V)
516 guiObject.SV.BackgroundColor3 = Color3.fromHSV(H, 1, 1)
517 guiObject.Indicator.BackgroundColor3 = HSV
518 saveData.Options[data.ID].Value = gui:pack(HSV, "Color3")
519
520 guiObject.R.Text = math.floor(HSV.r * 255)
521 guiObject.G.Text = math.floor(HSV.g * 255)
522 guiObject.B.Text = math.floor(HSV.b * 255)
523
524 if data.Callback then
525 data.Callback(HSV)
526 end
527 end
528
529 local function updateHSV()
530 H, S, V = color:rgbToHsv(HSV.r * 255, HSV.g * 255, HSV.b * 255)
531 end
532
533 local H_set = gui:sliderXY(guiObject.H, {guiObject.H}, function(X, Y, u)
534 if not u then H = 1 - Y end
535 guiObject.H.Locator.Position = UDim2.new(0.5, 0, Y, 0)
536 newValue()
537 end)
538
539 local SV_set = gui:sliderXY(guiObject.SV, {guiObject.SV}, function(X, Y, u)
540 if not u then S = X; V = 1 - Y; end
541 guiObject.SV.Locator.Position = UDim2.new(X, 0, Y, 0)
542 newValue()
543 end)
544
545 guiObject.R.FocusLost:Connect(function()
546 HSV = Color3.new(guiObject.R.Text / 255, HSV.g, HSV.b)
547 updateHSV()
548 newValue()
549 end)
550 guiObject.G.FocusLost:Connect(function()
551 HSV = Color3.new(HSV.r, guiObject.G.Text / 255, HSV.b)
552 updateHSV()
553 newValue()
554 end)
555 guiObject.B.FocusLost:Connect(function()
556 HSV = Color3.new(HSV.r, HSV.g, guiObject.B.Text / 255)
557 updateHSV()
558 newValue()
559 end)
560
561 newValue()
562 SV_set(S, 1 - V)
563 H_set(0, H)
564
565 guiData.ySize = 0
566 guiData.Open = false
567 guiData.baseColor = colors.TextEnabled
568
569 gui:setText(guiObject.Label, data.Name)
570 gui:textColorOnHover(guiObject.Label, guiData)
571
572 return guiObject
573 end
574
575 function lib.Number(data, dataArray)
576 local guiObject = Number:Clone()
577 local Value = gui:unpack(saveData.Options[data.ID].Value, "number") or data.Default or math.floor(data.Min + (data.Max - data.Min) / 2)
578 local guiData = {}
579
580 local dMax = data.Max - data.Min
581 local dValue = (Value - data.Min) / dMax
582
583 data.Round = data.Round or 1
584
585 local newValue = function(delta)
586 local exactValue = data.Min + (data.Max - data.Min) * delta
587 Value = math.floor(exactValue / data.Round) * data.Round
588 Value = math.clamp(Value, data.Min, data.Max)
589 guiObject.Indicator.Value.Text = tostring(Value)
590
591 if data.Callback then
592 data.Callback(Value)
593 end
594 saveData.Options[data.ID].Value = gui:pack(Value, "number")
595 end
596
597 local slideSet = gui:createSlider(guiObject.ValueFrame, {guiObject.Label, guiObject.Indicator}, newValue)
598 slideSet(math.clamp(dValue, 0, 1))
599
600 guiObject.Indicator.MouseButton1Down:Connect(newValue)
601 guiObject.Label.MouseButton1Down:Connect(newValue)
602 newValue(math.clamp(dValue, 0, 1))
603
604 guiData.ySize = 0
605 guiData.Open = false
606 guiData.baseColor = colors.TextEnabled
607
608 gui:createList(guiObject, guiData)
609 gui:setText(guiObject.Label, data.Name)
610 gui:textColorOnHover(guiObject.Label, guiData)
611
612 return guiObject
613 end
614
615 function lib.Execute(data, dataArray)
616 local guiObject = Execute:Clone()
617 local guiData = {}
618
619 local newValue = function(val)
620 if data.Callback then
621 data.Callback()
622 end
623 end
624
625 guiObject.MouseEnter:Connect(function()
626 gui.tween(guiObject.Indicator, "Sine", "Out", .25, {Size = UDim2.new(0, 40, 0, 25)})
627 end)
628
629 guiObject.MouseLeave:Connect(function()
630 gui.tween(guiObject.Indicator, "Sine", "Out", .25, {Size = UDim2.new(0, 0, 0, 25)})
631 end)
632
633 guiObject.Indicator.MouseButton1Down:Connect(newValue)
634 guiObject.Label.MouseButton1Down:Connect(newValue)
635 newValue(true)
636
637 guiData.ySize = 0
638 guiData.Open = false
639 guiData.baseColor = colors.TextEnabled
640
641 gui:createList(guiObject, guiData)
642 gui:setText(guiObject.Label, data.Name)
643 gui:textColorOnHover(guiObject.Label, guiData)
644
645 return guiObject
646 end
647
648 function lib.Mode(data, dataArray)
649 local guiObject = Mode:Clone()
650 local valueIndex = gui:unpack(saveData.Options[data.ID].Value, "number") or data.Default or 1
651 local guiData = {}
652
653 local newValue = function(val)
654 if val == true then else
655 valueIndex = (valueIndex % #data.Modes) + 1
656 end
657
658 local Value = data.Modes[valueIndex]
659 gui:setText(guiObject.Mode, Value)
660
661 if data.Callback then
662 data.Callback(Value)
663 end
664 saveData.Options[data.ID].Value = gui:pack(valueIndex)
665 end
666
667 guiObject.Mode.MouseButton1Down:Connect(newValue)
668 guiObject.Label.MouseButton1Down:Connect(newValue)
669 newValue(true)
670
671 guiData.ySize = 0
672 guiData.Open = false
673 guiData.baseColor = colors.TextEnabled
674
675 gui:createList(guiObject, guiData)
676 gui:setText(guiObject.Label, data.Name)
677 gui:textColorOnHover(guiObject.Label, guiData)
678
679 return guiObject
680 end
681
682 function lib.Hotkey(data, dataArray)
683 local guiObject = Mode:Clone()
684 local hotkeyInput = gui:unpack(saveData.Hotkeys[data.ID], "string") or data.Hotkey or ""
685 local guiData = {}
686
687 local lastInput = hotkeyInput
688 local mouseIn = false
689
690 guiObject.Name = "Z"
691
692 local newValue = function(val)
693 local input
694 gui:setText(guiObject.Mode, "...")
695 saveData.Hotkeys[data.ID] = nil
696
697 if not val then
698 input = lastInput
699 mouseIn = true
700
701 lastInput = nil
702
703 repeat wait() until mouseIn == false or lastInput
704 end
705
706 if not lastInput then
707 lastInput = hotkeyInput
708 end
709
710 saveData.Hotkeys[data.ID] = tostring(lastInput)
711 hotkeyFunctions[data.ID] = data.callback
712
713 hotkeyInput = tostring(lastInput)
714 saveData.Options[data.ID].Value = hotkeyInput
715 gui:setText(guiObject.Mode, hotkeyInput:sub(14))
716 end
717
718 UserInputService.InputBegan:Connect(function(input)
719 if input.KeyCode == Enum.KeyCode.Unknown then return end
720 if input.KeyCode == Enum.KeyCode.Backspace then lastInput = "" return end
721 lastInput = tostring(input.KeyCode)
722 end)
723
724 guiObject.Mode.MouseButton1Down:Connect(function() newValue() end)
725 guiObject.Label.MouseButton1Down:Connect(function() newValue() end)
726 guiObject.MouseLeave:Connect(function()
727 mouseIn = false
728 end)
729 newValue(true)
730
731 guiData.ySize = 0
732 guiData.Open = false
733 guiData.baseColor = colors.TextEnabled
734
735 gui:createList(guiObject, guiData)
736 gui:setText(guiObject.Label, "Hotkey")
737 gui:textColorOnHover(guiObject.Label, guiData)
738
739 guiObject.Parent = dataArray.Object.OptionsFrame
740
741 return guiObject
742 end
743
744 function lib.Toggle(data, dataArray)
745 local guiObject = Toggle:Clone()
746 local Value = gui:unpack(saveData.Options[data.ID].Value, "boolean") or data.Default or false
747 local guiData = {}
748
749 local modFrame = ModLabel:Clone()
750 modFrame.Parent = Mods
751 modFrame.TextColor3 = Colors[math.random(1, #Colors)]
752 modFrame.Visible = false
753 gui:setText(modFrame, data.Name)
754
755 guiObject.Name = data.Name
756
757 local newValue = function(val, set)
758 if val == true then
759 else
760 if set then
761 Value = set
762 else
763 Value = not Value
764 end
765 end
766
767 if Value then
768 gui.tween(guiObject.Indicator, "Sine", "Out", .25, {BackgroundColor3 = Color3.fromRGB(60, 222, 60)})
769 guiObject.Indicator.Text = "ON"
770 guiData.baseColor = colors.TextEnabled
771 else
772 gui.tween(guiObject.Indicator, "Sine", "Out", .25, {BackgroundColor3 = Color3.fromRGB(222, 60, 60)})
773 guiObject.Indicator.Text = "OFF"
774 guiData.baseColor = colors.TextDisabled
775 end
776
777 if data.Callback then
778 data.Callback(Value)
779 end
780
781 saveData.Options[data.ID].Value = gui:pack(Value)
782 modFrame.Visible = Value
783
784 end
785
786 guiObject.MouseEnter:Connect(function()
787 gui.tween(guiObject.Indicator, "Sine", "Out", .25, {Size = UDim2.new(0, 40, 0, 25)})
788 end)
789
790 guiObject.MouseLeave:Connect(function()
791 gui.tween(guiObject.Indicator, "Sine", "Out", .25, {Size = UDim2.new(0, 0, 0, 25)})
792 end)
793
794 gui.tween(guiObject.Indicator, "Sine", "Out", .25, {Size = UDim2.new(0, 0, 0, 25)})
795 guiObject.Indicator.MouseButton1Down:Connect(function() newValue() end)
796 guiObject.Label.MouseButton1Down:Connect(function() newValue() end)
797 newValue(true)
798
799 guiData.ySize = 0
800 guiData.Open = false
801 guiData.baseColor = colors.TextDisabled
802
803 gui:createList(guiObject, guiData)
804 gui:setText(guiObject.Label, data.Name)
805 gui:textColorOnHover(guiObject.Label, guiData)
806
807 data.callback = newValue
808
809 return guiObject
810 end
811
812 function lib.Checkbox(data, dataArray)
813 local guiObject = Checkbox:Clone()
814 local Value = gui:unpack(saveData.Options[data.ID].Value, "boolean") or data.Default or false
815 local guiData = {}
816
817 guiObject.Name = "0"
818
819 local newValue = function(val)
820 if val == true then else
821 Value = not Value
822 end
823 if Value then
824 gui.tween(guiObject.Indicator, "Sine", "Out", .35, {Size = UDim2.new(0, 35, 0, 35)})
825 guiData.baseColor = colors.TextEnabled
826 else
827 gui.tween(guiObject.Indicator, "Sine", "Out", .35, {Size = UDim2.new(0, 0, 0, 35)})
828 guiData.baseColor = colors.TextDisabled
829 end
830 if data.Callback then
831 data.Callback(Value)
832 end
833 saveData.Options[data.ID].Value = gui:pack(Value)
834 end
835
836 guiObject.Indicator.MouseButton1Down:Connect(newValue)
837 guiObject.Label.MouseButton1Down:Connect(newValue)
838 newValue(true)
839
840 guiData.ySize = 0
841 guiData.Open = false
842 guiData.baseColor = colors.TextDisabled
843
844 gui:createList(guiObject, guiData)
845 gui:setText(guiObject.Label, data.Name)
846 gui:textColorOnHover(guiObject.Label, guiData)
847
848 return guiObject
849 end
850
851 function lib.Frame(data, dataArray)
852 local guiObject = Frame:Clone()
853
854 local guiData = {}
855 guiData.ySize = 0
856 guiData.Open = false
857
858 gui:createList(guiObject, guiData)
859 gui:setText(guiObject.Label, data.Name)
860 gui:textColorOnHover(guiObject.Label, guiData)
861
862 return guiObject
863 end
864
865 function lib.Container(data, dataArray)
866 local guiObject = Container:Clone()
867
868 guiObject.Position = gui:unpack(saveData.Options[data.ID].Position, "UDim2") or UDim2.new(0, 3, 0, 3 + gui:getn(settingsArray[2]) * 38)
869
870 local guiData = {}
871 guiData.yPos = 0
872 guiData.ySize = 0
873 guiData.Open = false
874
875 gui:textColorOnHover(guiObject.Title, guiData)
876 gui:createList(guiObject, guiData)
877 gui:setText(guiObject.Title, data.Name)
878 gui:makeDraggable(guiObject, function(x, y)
879 guiData.yPos = y
880 saveData.Options[data.ID].Position = gui:pack(guiObject.Position)
881 end)
882
883 return guiObject
884 end
885
886 -- UI Creation Library
887 function gui.create(self, guiType, data)
888 if self == gui then
889 self = settingsArray
890 end
891
892 data.ID = data.Name .. "_" .. (self[1].Name or "TOP")
893
894 if not saveData.Options[data.ID] then
895 saveData.Options[data.ID] = {}
896 end
897
898 if self[1].Object:FindFirstChild("Dropdown") then
899 self[1].Object.Dropdown.Visible = true
900 end
901
902 local dataArray = {}
903 local objectArray = {}
904 local selfArray = {dataArray, objectArray, create = gui.create, callback = data.Callback}
905 dataArray.Name = data.Name
906 dataArray.Data = data
907 dataArray.Object = lib[guiType](data, dataArray)
908 dataArray.self = selfArray
909
910 if guiType == "Toggle" then
911 lib.Hotkey(data, dataArray)
912 end
913 if data.Hint then
914 local Object = dataArray.Object
915 gui:addHint(Object:FindFirstChild("Title") or Object:FindFirstChild("Label"), data.Hint)
916 end
917
918 self[1][data.Name] = selfArray
919 self[2][data.Name] = dataArray.Object
920
921 dataArray.Object.Parent = self[1].Object:FindFirstChild("OptionsFrame") or self[1].Object
922
923 return dataArray
924 end
925
926 -- Connection Stuff
927 game:GetService("RunService").RenderStepped:Connect(function()
928 for _, func in pairs(connections) do
929 func()
930 end
931 end)
932
933 UserInputService.InputBegan:Connect(function(input, gameProcessed)
934 if gameProcessed then return end
935 for id, key in pairs(saveData.Hotkeys) do
936 if key == tostring(input.KeyCode) then
937 hotkeyFunctions[id]()
938 end
939 end
940 end)
941
942 Mods.Text = "OpenGui " .. _V
943
944 game.Close:Connect(function()
945 Save()
946 end)
947
948 return {gui, saveData, screenGui}
949end)()
950
951local notify = {Title ="HENTAI", Text ="Got It?", Duration = 120, Button1 = "OK"}
952local sound
953-- modify esp
954local _ESP = (function()
955 --// Variables
956 local module = {}
957
958 local RunService = game:GetService("RunService")
959 local Players = game:GetService("Players")
960 local Player = Players.LocalPlayer
961
962 module.Options = {
963 Enabled = false,
964 Parent = script.Parent or game.CoreGui,
965 Color = Color3.new(1, 0, 0),
966 LegendaryOrMagicalShow = true,
967 Magical_Color=Color3.new(0, 1, 1),
968 Legendary_Color=Color3.new(1, 1, 0),
969 Npcs_Color=Color3.new(1, 1, 1),
970 MagicalOrLegendary = false,
971 Opacity = 1,
972 MaxDistance = 25000,
973 }
974
975 function module:Enable()
976 module.Options.Enabled = true
977 end
978
979 function module:Disable()
980 module.Options.Enabled = false
981 end
982
983 game:GetService("RunService").RenderStepped:Connect(function()
984 if module.Options.Enabled then
985 local shit = workspace.NPCS:GetChildren()
986 for i = 1, #shit do
987 local sex = shit[i]
988 local enemy = sex:FindFirstChildOfClass("Model")
989 if enemy and sex:FindFirstChild("Status") and enemy:FindFirstChild("HumanoidRootPart") then
990 --espfunction(sex)
991 local s = sex.Status
992 local box = enemy:FindFirstChild("EGG")
993 if not box then
994 box = Instance.new("BoxHandleAdornment")
995 end
996 box.Size = enemy.HumanoidRootPart.Size
997 box.Name = "EGG"
998 box.Adornee = enemy.HumanoidRootPart
999 box.AlwaysOnTop = true
1000 box.ZIndex = 5
1001 box.Transparency = module.Options.Opacity
1002 box.Color3 = module.Options.Color
1003 if sex:FindFirstChild("ChatInfo") then
1004 box.Color3 = module.Options.Npcs_Color
1005 end
1006 if module.Options.MagicalOrLegendary then
1007 if s:FindFirstChild("Legendary") and s.Legendary.Value then
1008 box.Color3 = module.Options.Legendary_Color
1009 if not s.Legendary:FindFirstChild("TAGGED") then
1010 local Tag=Instance.new("Folder",s.Legendary)
1011 Tag.Name = "TAGGED"
1012 notify.Title ="Notification Legendary"
1013 game:GetService("StarterGui"):SetCore("SendNotification",notify)
1014 if not sound then
1015 sound = Instance.new("Sound",game:GetService("CoreGui"))
1016 end
1017 sound.SoundId = "rbxassetid://131072261"
1018 sound.Volume = 10
1019 sound:Play()
1020 end
1021 elseif s:FindFirstChild("Magical") and s.Magical.Value then
1022 box.Color3 = module.Options.Magical_Color
1023 if not s.Magical:FindFirstChild("TAGGED") then
1024 local Tag=Instance.new("Folder",s.Magical)
1025 Tag.Name = "TAGGED"
1026 notify.Title ="Notification Magical"
1027 game:GetService("StarterGui"):SetCore("SendNotification",notify)
1028 if not sound then
1029 sound = Instance.new("Sound",game:GetService("CoreGui"))
1030 end
1031 sound.SoundId = "rbxassetid://130766856"
1032 sound.Volume = 5
1033 sound:Play()
1034 end
1035 end
1036 end
1037 box.Parent = enemy
1038 box.Name = "EGG"
1039 end
1040 end
1041 end
1042 end)
1043 return module
1044end)()
1045
1046local _ManaFly = (function()
1047 --// Variables
1048 local module = {}
1049
1050 local RunService = game:GetService("RunService")
1051 local Players = game:GetService("Players")
1052 local Player = Players.LocalPlayer
1053
1054 local MANAFLY = nil
1055 local leftorright,upordown,backorforward = 0,0,0
1056
1057 module.Options = {
1058 Enabled = false,
1059 Color = Color3.new(1, 0, 0),
1060 speed = 0,
1061 Opacity = 0,
1062 PartMaterial = Enum.Material.Air,
1063 Up="x",
1064 Down="z",
1065 }
1066 function module:Enable()
1067 module.Options.Enabled = true
1068 leftorright,upordown,backorforward = 0,0,0
1069 end
1070
1071 function module:Disable()
1072 module.Options.Enabled = false
1073 leftorright,upordown,backorforward = 0,0,0
1074 end
1075 function module:SpeedChange(Speed)
1076 if leftorright > 0 then
1077 leftorright = Speed
1078 elseif leftorright < 0 then
1079 leftorright = -Speed
1080 end
1081 if upordown > 0 then
1082 upordown = Speed
1083 elseif upordown < 0 then
1084 upordown = -Speed
1085 end
1086 if backorforward > 0 then
1087 backorforward = Speed
1088 elseif backorforward < 0 then
1089 backorforward = -Speed
1090 end
1091 end
1092 RunService.RenderStepped:Connect(function()
1093 if module.Options.Enabled then
1094 Player.Character:SetPrimaryPartCFrame(Player.Character:GetPrimaryPartCFrame():Lerp(Player.Character:GetPrimaryPartCFrame()*CFrame.new(leftorright,upordown,backorforward),1))
1095 if not MANAFLY then
1096 MANAFLY = Instance.new("Part")
1097 end
1098 MANAFLY.Parent = workspace
1099 MANAFLY.Size = Vector3.new(2,1,2)
1100 MANAFLY.CFrame = Player.Character:GetPrimaryPartCFrame() * CFrame.new(0,-5,0)
1101 MANAFLY.Transparency = module.Options.Opacity
1102 MANAFLY.Name = "MANAFLYPART"
1103 MANAFLY.Material = module.Options.PartMaterial
1104 MANAFLY.Color = module.Options.Color
1105 MANAFLY.Anchored = true
1106 end
1107 end)
1108 Player:GetMouse().KeyDown:Connect(function(k)
1109 if k == "w" then
1110 backorforward = backorforward - module.Options.speed
1111 elseif k == "s" then
1112 backorforward = backorforward + module.Options.speed
1113 elseif k == "a" then
1114 leftorright = leftorright - module.Options.speed
1115 elseif k == "d" then
1116 leftorright = leftorright + module.Options.speed
1117 elseif k == module.Options.Down then
1118 upordown = upordown - module.Options.speed
1119 elseif k == module.Options.Up then
1120 upordown = upordown + module.Options.speed
1121 end
1122 end)
1123 Player:GetMouse().KeyUp:Connect(function(k)
1124 if k == "w" then
1125 backorforward = backorforward + module.Options.speed
1126 elseif k == "s" then
1127 backorforward = backorforward - module.Options.speed
1128 elseif k == "a" then
1129 leftorright = leftorright + module.Options.speed
1130 elseif k == "d" then
1131 leftorright = leftorright - module.Options.speed
1132 elseif k == module.Options.Down then
1133 upordown = upordown + module.Options.speed
1134 elseif k == module.Options.Up then
1135 upordown = upordown - module.Options.speed
1136 end
1137 end)
1138 return module
1139end)()
1140local _Noclip = (function()
1141 --// Variables
1142 local module = {}
1143
1144 local RunService = game:GetService("RunService")
1145 local Players = game:GetService("Players")
1146 local Player = Players.LocalPlayer
1147 local MANAFLY = nil
1148
1149 module.Options = {
1150 Enabled = false,
1151 Color = Color3.new(1, 0, 0),
1152 speed = 0,
1153 Opacity = 0,
1154 Up="x",
1155 Down="z",
1156 }
1157
1158 function module:Enable()
1159 module.Options.Enabled = true
1160 end
1161
1162 function module:Disable()
1163 module.Options.Enabled = false
1164 end
1165 RunService.Stepped:Connect(function()
1166 if module.Options.Enabled then
1167 for _,v in pairs(Player.Character:GetDescendants())do
1168 if v:IsA("BasePart") then
1169 v.CanCollide = false
1170 end
1171 end
1172 end
1173 end)
1174 return module
1175end)()
1176
1177
1178--// Variables
1179local RunService = game:GetService("RunService")
1180local HttpService = game:GetService("HttpService")
1181local UserInputService = game:GetService("UserInputService")
1182local Players = game:GetService("Players")
1183local Player = Players.LocalPlayer
1184local Mouse = Player:GetMouse()
1185
1186local gui = GUIData[1]
1187local saveData = GUIData[2]
1188local screenGui = GUIData[3]
1189
1190local screenscale = 250
1191local opacity = 1
1192local backcolor = Color3.new()
1193
1194--// Saving
1195local readfile = readfile or function() end
1196pcall(function()
1197 local JSONData = readfile("OpenGui.txt")
1198 if JSONData then
1199 local LUAData = HttpService:JSONDecode(JSONData)
1200 saveData.Options = LUAData.Options
1201 saveData.Hotkeys = LUAData.Hotkeys
1202 print("Save Data found")
1203 else
1204 print("Save Data not found")
1205 end
1206end)
1207
1208
1209--// UI Creation
1210
1211--// Render Frame
1212local Render = gui:create("Container", {
1213 Name = "Render",
1214})--|
1215local OpenGui = Render.self:create("Toggle", {
1216 Name = "OpenGui",
1217 Default = true,
1218 Hotkey = tostring(Enum.KeyCode.RightControl),
1219 Hint = "The navigation GUI",
1220 Callback = function(enabled)
1221 for _, frame in pairs(screenGui:GetChildren()) do
1222 if frame:IsA("Frame") then
1223 frame.Visible = enabled
1224 end
1225 end
1226 screenGui.Modal.Visible = enabled
1227 screenGui.Hint.Visible = false
1228 end,
1229})--|
1230local Opacity = OpenGui.self:create("Number", {
1231 Name = "Opacity",
1232 Min = 0,
1233 Max = 1,
1234 Round = 0.01,
1235 Default = 0.75,
1236 Hint = "Transparency of the navigation GUI",
1237 Callback = function(alpha)
1238 opacity = 1 - alpha
1239 for _, frame in pairs(screenGui:GetChildren()) do
1240 if frame:IsA("Frame") then
1241 frame.BackgroundTransparency = 1 - alpha
1242 frame.OptionsFrame.BackgroundTransparency = 1 - alpha
1243 end
1244 end
1245 end,
1246})
1247local Width = OpenGui.self:create("Number", {
1248 Name = "Width",
1249 Min = 200,
1250 Max = 400,
1251 Round = 1,
1252 Default = 300,
1253 Hint = "Width of the navigation GUI",
1254 Callback = function(scale)
1255 screenscale = scale
1256 for _, frame in pairs(screenGui:GetChildren()) do
1257 if frame:IsA("Frame") then
1258 frame.Size = UDim2.new(0, scale, 0, frame.Size.Y.Offset)
1259 end
1260 end
1261 end,
1262})
1263local Color = OpenGui.self:create("Color", {
1264 Name = "Background Color",
1265 Default = Color3.fromRGB(40, 40, 40),
1266 Hint = "Background color of the navigation GUI",
1267 Callback = function(color)
1268 backcolor = color
1269 for _, frame in pairs(screenGui:GetChildren()) do
1270 if frame:IsA("Frame") then
1271 frame.BackgroundColor3 = color
1272 frame.OptionsFrame.BackgroundColor3 = color
1273 end
1274 end
1275 end,
1276})
1277--[[
1278Options = {
1279 Enabled = false,
1280 Parent = script.Parent or game.CoreGui,
1281 Color = Color3.new(1, 0, 0),
1282 LegendaryOrMagicalShow = true,
1283 Magical_Color=Color3.new(0, 1, 1),
1284 Legendary_Color=Color3.new(1, 1, 0),
1285 MagicalOrLegendary = false,
1286 Opacity = 1,
1287 MaxDistance = 25000,
1288}
1289--]]
1290local ESP = Render.self:create("Toggle", {
1291 Name = "ESP",
1292 Default = false,
1293 Hint = "Toggle enemy ESP",
1294 Callback = function(enabled)
1295 _ESP.Options.Enabled = enabled
1296 if enabled then
1297 _ESP:Enable()
1298 else
1299 _ESP:Disable()
1300 end
1301 end,
1302})--|
1303local ESPColor = ESP.self:create("Color", {
1304 Name = "ESP Color",
1305 Default = Color3.new(1, 1, 1),
1306 Hint = "Color of the enemy ESP",
1307 Callback = function(color)
1308 _ESP.Options.Color = color
1309 end,
1310})
1311local ESPNpcsColor = ESP.self:create("Color", {
1312 Name = "Npcs Color",
1313 Default = Color3.new(1, 1, 1),
1314 Hint = "Color of Npcs enemy ESP",
1315 Callback = function(color)
1316 _ESP.Options.Npcs_Color = color
1317 end,
1318})
1319local ESPShowTeam = ESP.self:create("Checkbox", {
1320 Name = "Show Magical/Legendary",
1321 Default = false,
1322 Hint = "Magical/Legendary are highlighted",
1323 Callback = function(enabled)
1324 _ESP.Options.MagicalOrLegendary = enabled
1325 end,
1326})
1327local ESPMagicalColor = ESP.self:create("Color", {
1328 Name = "Magical Color",
1329 Default = Color3.new(0, 1, 1),
1330 Hint = "Color of Magical enemy ESP",
1331 Callback = function(color)
1332 _ESP.Options.Magical_Color = color
1333 end,
1334})
1335local ESPLegendaryColor = ESP.self:create("Color", {
1336 Name = "Legendary Color",
1337 Default = Color3.new(1, 1, 0),
1338 Hint = "Color of Legendary enemy ESP",
1339 Callback = function(color)
1340 _ESP.Options.Legendary_Color = color
1341 end,
1342})
1343local ESPOpacity = ESP.self:create("Number", {
1344 Name = "Opacity",
1345 Default = 0.5,
1346 Min = 0,
1347 Max = 1,
1348 Round = 0.001,
1349 Hint = "Visibility of the ESP",
1350 Callback = function(opacity)
1351 _ESP.Options.Opacity = opacity
1352 end,
1353})
1354--MANAFLY IN GAIA
1355local Mana = gui:create("Container", {
1356 Name = "Mana",
1357})
1358--]]
1359local ManaFly = Mana.self:create("Toggle", {
1360 Name = "ManaFly",
1361 Default = false,
1362 Hint = "Toggle ManaFly",
1363 Callback = function(enabled)
1364 _ManaFly.Options.Enabled = enabled
1365 if enabled then
1366 _ManaFly:Enable()
1367 else
1368 _ManaFly:Disable()
1369 end
1370 end,
1371})--|
1372local ManaFlySpeed = Mana.self:create("Number", {
1373 Name = "FlySpeed",
1374 Default = 0,
1375 Min = 0,
1376 Max = 5,
1377 Round = 0.001,
1378 Hint = "Visibility of the ESP",
1379 Callback = function(Speed)
1380 _ManaFly:SpeedChange(Speed)
1381 _ManaFly.Options.speed = tonumber(Speed)
1382 end,
1383})
1384local ManaFlyOpacity = Mana.self:create("Number", {
1385 Name = "Opacity",
1386 Default = 0,
1387 Min = 0,
1388 Max = 1,
1389 Round = 0.001,
1390 Hint = "Visibility of the ESP",
1391 Callback = function(opacity)
1392 _ManaFly.Options.Opacity = opacity
1393 end,
1394})
1395local ManaFly = Mana.self:create("Toggle", {
1396 Name = "ManaSoul",
1397 Default = false,
1398 Hint = "Toggle Noclip",
1399 Callback = function(enabled)
1400 _Noclip.Options.Enabled = enabled
1401 if enabled then
1402 _Noclip:Enable()
1403 else
1404 _Noclip:Disable()
1405 end
1406 end,
1407})
1408
1409local ManaPartMaterial = Mana.self:create("Mode", {
1410 Name = "ManaPart Material",
1411 Hint = "Change ManaPart Material",
1412 Default = 1,
1413 Modes = {
1414 Enum.Material.Air,
1415 Enum.Material.ForceField
1416 },
1417 Callback = function(value)
1418 _ManaFly.Options.PartMaterial = value
1419 end,
1420})
1421--// UI Functionality
1422RunService.RenderStepped:Connect(function()
1423 for _, frame in pairs(screenGui:GetChildren()) do
1424 if frame:IsA("Frame") then
1425 frame.Size = UDim2.new(0, screenscale, 0, frame.Size.Y.Offset)
1426
1427 frame.BackgroundTransparency = opacity
1428 frame.OptionsFrame.BackgroundTransparency = opacity
1429
1430 frame.BackgroundColor3 = backcolor
1431 frame.OptionsFrame.BackgroundColor3 = backcolor
1432 end
1433 end
1434end)