├── .vscode └── settings.json ├── README.md └── VisionLibV2 ├── README.md └── source.lua /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "robloxLsp.diagnostics.globals": [ 3 | "setclipboard", 4 | "getgenv", 5 | ] 6 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vision Lib 2 | 3 | ![Vison Lib](https://user-images.githubusercontent.com/112562956/198793556-9b5a6b92-c938-4703-b7f4-a477f604c367.png) 4 | 5 | - v2 [Documentation](https://github.com/Loco-CTO/UI-Library/blob/main/VisionLibV2/README.md) 6 | 7 | ![Layer 1](https://user-images.githubusercontent.com/112562956/198802344-1e69debc-8ba5-4a78-a3cf-8c0076a8948c.png) 8 | 9 | Discord: https://discord.gg/Bp7wFcZeUn 10 | -------------------------------------------------------------------------------- /VisionLibV2/README.md: -------------------------------------------------------------------------------- 1 | ![Vison Lib Title only](https://user-images.githubusercontent.com/112562956/198860495-6f486850-4919-4b28-9692-6b4125ae116c.png) 2 | 3 | # Vision UI Lib v2 4 | 5 | - Desigend by Sius and BruhOOFBoi 6 | - Scripted by Loco_CTO 7 | 8 | _Heavily inspired by [Rayfield UI Library](https://github.com/shlexware/Rayfield/blob/main/Documentation.md)_ 9 | 10 | ## Preview 11 | 12 | ![image](https://user-images.githubusercontent.com/112562956/198860516-a5f74c21-d911-4bed-aabc-06e350faeae0.png) 13 | 14 | **:warning: The UI Library is still under development, not all functions in the preview are included.** 15 | 16 | ## 🔴Loading the library 17 | 18 | ```lua 19 | local Library = loadstring(game:HttpGet('https://raw.githubusercontent.com/Loco-CTO/UI-Library/main/VisionLibV2/source.lua'))() 20 | ``` 21 | 22 | ### Destroy the library 23 | 24 | ```lua 25 | Library:Destroy() 26 | ``` 27 | 28 | ## 🟡Creating a Notify 29 | 30 | ```lua 31 | Library:Notify({ 32 | Name = "Ring Ring", -- String 33 | Text = "Notification!!", -- String 34 | Icon = "rbxassetid://11401835376", -- String 35 | Sound = "rbxassetid://6647898215", -- String 36 | Duration = 5, -- Integer 37 | Callback = function() 38 | -- Function 39 | end 40 | }) 41 | ``` 42 | 43 | ## 🟡Creating a Pop-up/Prompt 44 | 45 | ```lua 46 | Library:Popup({ 47 | Name = "Popup", -- String 48 | Text = "Do you want to accept?", -- String 49 | Options = { "Yes", "No" }, -- Table 50 | Callback = function(option) 51 | -- Function (Returns the option) 52 | end, 53 | }) 54 | ``` 55 | 56 | ## 🟡Customise UI theme 57 | 58 | ```lua 59 | Library:SetTheme({ 60 | Main = Color3.fromRGB(45, 45, 45), -- Color3 61 | Secondary = Color3.fromRGB(31, 31, 31), -- Color3 62 | Tertiary = Color3.fromRGB(31, 31, 31), -- Color3 63 | Text = Color3.fromRGB(255, 255, 255), -- Color3 64 | PlaceholderText = Color3.fromRGB(175, 175, 175), -- Color3 65 | Textbox = Color3.fromRGB(61, 61, 61), -- Color3 66 | NavBar = Color3.fromRGB(35, 35, 35), -- Color3 67 | Theme = Color3.fromRGB(232, 202, 35), -- Color3 68 | }) 69 | ``` 70 | 71 | ## 🟡Changing UI DragSpeed 72 | 73 | ```lua 74 | Library:SetDragSpeed(7) -- Default 7, Ranging from 0 - 100 75 | ``` 76 | 77 | ## 🟡Changing UI Sound Effects Volume 78 | 79 | ```lua 80 | Library:SetVolume(50) -- Default 50, Ranging from 0 - 100 81 | ``` 82 | 83 | ## 🟡Changing Controls Hover Sound 84 | 85 | ```lua 86 | ibrary:SetHoverSound("") -- Sound ID 87 | ``` 88 | 89 | ## 🟡Changing Controls Click Sound 90 | 91 | ```lua 92 | Library:SetClickSound("") -- Sound ID 93 | ``` 94 | 95 | ## 🟡Changing Pop-up Sound 96 | 97 | ```lua 98 | Library:SetPopupSound("") -- Sound ID 99 | ``` 100 | 101 | ## 🟡Creating a Window 102 | 103 | ```lua 104 | local Window = Library:Create({ 105 | Name = "Vision UI Lib v2", -- String 106 | Footer = "By Loco_CTO, Sius and BruhOOFBoi", -- String 107 | ToggleKey = Enum.KeyCode.RightShift, -- Enum.KeyCode 108 | LoadedCallback = function() 109 | -- Function 110 | end, 111 | 112 | KeySystem = true, -- Boolean 113 | Key = "keyabc123", -- String 114 | MaxAttempts = 5, -- Integer 115 | DiscordLink = "https://discord.gg/Bp7wFcZeUn", -- String (Set it to nil if you do not have one, the button will not pop out) 116 | ToggledRelativeYOffset = 5 -- Number (Y Offset from bottom of your screen. Set it to nil if you want it to be centred) 117 | }) 118 | ``` 119 | 120 | ### Updating toggle key 121 | 122 | ```lua 123 | Window:ChangeTogglekey(Enum.KeyCode.LeftAlt) -- Enum.KeyCode 124 | ``` 125 | 126 | ### Toggle UI 127 | 128 | ```lua 129 | Window:Toggled(true) -- Boolean 130 | ``` 131 | 132 | ### Updating toggle taskbar only 133 | 134 | ```lua 135 | Window:TaskBarOnly(true) -- Boolean 136 | ``` 137 | 138 | ## 🔵Creating a Tab 139 | 140 | ```lua 141 | local Tab = Window:Tab({ 142 | Name = "Main", -- String 143 | Icon = "rbxassetid://11396131982", -- String 144 | Color = Color3.new(1, 0, 0) -- Color3 145 | ActivationCallback = function() 146 | -- Function 147 | end, 148 | DeativationCallback = function() 149 | -- Function 150 | end, 151 | }) 152 | ``` 153 | 154 | ## 🟢Creating a Section 155 | 156 | ```lua 157 | local Section = Tab:Section({ 158 | Name = "Section" -- String 159 | }) 160 | ``` 161 | 162 | ## 🟣Creating a Label 163 | 164 | ```lua 165 | local Label = Section:Label({ 166 | Name = "Label", -- String 167 | }) 168 | ``` 169 | 170 | ### Updating label name 171 | 172 | ```lua 173 | Label:SetName("New Label Name") -- String 174 | ``` 175 | 176 | ### Deleting the label 177 | 178 | ```lua 179 | Label:Destroy() 180 | ``` 181 | 182 | ## 🟣Creating a Button 183 | 184 | ```lua 185 | local Button = Section:Button({ 186 | Name = "Button", -- String 187 | Callback = function() 188 | -- Function 189 | end 190 | }) 191 | ``` 192 | 193 | ### Updating button name 194 | 195 | ```lua 196 | Button:SetName("New Button Name") -- String 197 | ``` 198 | 199 | ## 🟣Creating a Toggle 200 | 201 | ```lua 202 | local Toggle = Section:Toggle({ 203 | Name = "Toggle", -- String 204 | Default = true, -- Boolean 205 | Callback = function(Bool) 206 | -- Function 207 | end 208 | }) 209 | ``` 210 | 211 | ### Updating toggle name 212 | 213 | ```lua 214 | Toggle:SetName("New Toggle Name") -- String 215 | ``` 216 | 217 | ### Updating toggle value 218 | 219 | ```lua 220 | Toggle:Set(false) -- Boolean 221 | ``` 222 | 223 | ### Deleting the toggle 224 | 225 | ```lua 226 | Toggle:Destroy() 227 | ``` 228 | 229 | ## 🟣Creating a Slider 230 | 231 | ```lua 232 | local Slider = Section:Slider({ 233 | Name = "Slider", -- String 234 | Max = 100, -- Integer 235 | Min = 0, -- Integer 236 | Default = 50, -- Integer 237 | Callback = function(Value) 238 | -- Function 239 | end 240 | }) 241 | ``` 242 | 243 | ### Updating slider name 244 | 245 | ```lua 246 | Slider:SetName("New Slider Name") -- String 247 | ``` 248 | 249 | ### Updating slider value 250 | 251 | ```lua 252 | Slider:SetValue(100) -- Integer 253 | ``` 254 | 255 | ### Deleting the slider 256 | 257 | ```lua 258 | Slider:Destroy() 259 | ``` 260 | 261 | ## 🟣Creating a Keybind 262 | 263 | ```lua 264 | local Keybind = Section:Keybind({ 265 | Name = "Keybind", 266 | Default = Enum.KeyCode.Return, 267 | Callback = function() 268 | -- Function 269 | end, 270 | UpdateKeyCallback = function(Key) 271 | -- Function 272 | end 273 | }) 274 | ``` 275 | 276 | ### Updating keybind name 277 | 278 | ```lua 279 | Keybind:SetName("New keybind Name") -- String 280 | ``` 281 | 282 | ### Deleting the keybind 283 | 284 | ```lua 285 | Keybind:Destroy() 286 | ``` 287 | 288 | ## 🟣Creating a Small Textbox 289 | 290 | ```lua 291 | local SmallTextbox = Section:SmallTextbox({ 292 | Name = "Small Textbox", -- String 293 | Default = "Default Text", -- String 294 | Callback = function(Text) 295 | -- Function 296 | end 297 | }) 298 | ``` 299 | 300 | ### Updating small textbox name 301 | 302 | ```lua 303 | SmallTextbox:SetName("New Textbox name") -- String 304 | ``` 305 | 306 | ### Updating small textbox text 307 | 308 | ```lua 309 | SmallTextbox:SetText("Another text") -- String 310 | ``` 311 | 312 | ### Deleting the small textbox 313 | 314 | ```lua 315 | SmallTextbox:Destroy() 316 | ``` 317 | 318 | ## 🟣Creating a Big Textbox 319 | 320 | ```lua 321 | local BigTextbox = Section:BigTextbox({ 322 | Name = "Big Textbox", -- String 323 | Default = "Default Text", -- String 324 | PlaceHolderText = "Textbox | Placeholder Text", -- String 325 | ResetOnFocus = true, -- Bool 326 | Callback = function(Text) 327 | -- Function 328 | end 329 | }) 330 | ``` 331 | 332 | ### Updating big textbox name 333 | 334 | ```lua 335 | BigTextbox:SetName("New Textbox name") -- String 336 | ``` 337 | 338 | ### Updating big textbox text 339 | 340 | ```lua 341 | BigTextbox:SetText("Another text") -- String 342 | ``` 343 | 344 | ### Deleting the big textbox 345 | 346 | ```lua 347 | BigTextbox:Destroy() 348 | ``` 349 | 350 | ## 🟣Creating a Dropdown 351 | 352 | ```lua 353 | local Dropdown = Section:Dropdown({ 354 | Name = "Dropdown", -- String 355 | Items = {1, 2, 3, 4, "Item"}, -- Table 356 | Callback = function(item) 357 | -- Function 358 | end 359 | }) 360 | ``` 361 | 362 | ### Updating a Dropdown 363 | 364 | ```lua 365 | Dropdown:UpdateList({ 366 | Items = {"New item", 1, 2, 3}, -- Table 367 | Replace = true -- Boolean (Clear all items in the dropdown) 368 | }) 369 | ``` 370 | 371 | ### Adding an item to dropdown 372 | 373 | ```lua 374 | Dropdown:AddItem("Item") -- String, Integer, Instance 375 | ``` 376 | 377 | ### Clear the dropdown 378 | 379 | ```lua 380 | Dropdown:Clear() 381 | ``` 382 | 383 | ### Deleting the dropdown 384 | 385 | ```lua 386 | Dropdown:Destroy() 387 | ``` 388 | 389 | ## 🟣Creating a Colour Picker 390 | 391 | ```lua 392 | local Colorpicker = Section:Colorpicker({ 393 | Name = "Colorpicker", -- String 394 | DefaultColor = Color3.new(1, 1, 1), -- Color3 395 | Callback = function(Color) 396 | -- Function, Color3 397 | end 398 | }) 399 | ``` 400 | 401 | ### Set the colour 402 | 403 | ```lua 404 | Colorpicker:SetColor(Colorpicker:SetColor(Color3.new(0, 0, 0))) -- Color 3 405 | ``` 406 | 407 | ### Deleting the colour picker 408 | 409 | ```lua 410 | Colorpicker:Destroy() 411 | ``` 412 | 413 | ## ⚪Use this to test 414 | 415 | ```lua 416 | local Library = loadstring(game:HttpGet('https://raw.githubusercontent.com/Loco-CTO/UI-Library/main/VisionLibV2/source.lua'))() 417 | 418 | Window = Library:Create({ 419 | Name = "Vision UI Lib v2", 420 | Footer = "By Loco_CTO, Sius and BruhOOFBoi", 421 | ToggleKey = Enum.KeyCode.RightShift, 422 | LoadedCallback = function() 423 | Window:TaskBarOnly(false) 424 | end, 425 | KeySystem = true, 426 | Key = "123456", 427 | MaxAttempts = 5, 428 | DiscordLink = nil, 429 | }) 430 | 431 | Window:ChangeTogglekey(Enum.KeyCode.RightShift) 432 | 433 | local Tab = Window:Tab({ 434 | Name = "Main", 435 | Icon = "rbxassetid://11396131982", 436 | Color = Color3.new(1, 0, 0), 437 | }) 438 | 439 | local Section1 = Tab:Section({ 440 | Name = "Basic controls", 441 | }) 442 | 443 | local Label = Section1:Label({ 444 | Name = "Lame\nTest", 445 | }) 446 | 447 | Label:SetName("LMAOOOOOOOO\n\n\n\n\nXD") 448 | 449 | local Label = Section1:Label({ 450 | Name = "Holy jesus loco is so handsome because i said so and he have not got a girlfriend what a shamelss sucker but idk i wanna have fun but minecraft doesnt let me", 451 | }) 452 | 453 | local Button = Section1:Button({ 454 | Name = "Real Button", 455 | Callback = function() 456 | Library:Notify({ 457 | Name = "Button", 458 | Text = "Clicked", 459 | Icon = "rbxassetid://11401835376", 460 | Duration = 3, 461 | }) 462 | end, 463 | }) 464 | 465 | local Toggle = Section1:Toggle({ 466 | Name = "Real Toggle", 467 | Default = false, 468 | Callback = function(Bool) 469 | Library:Notify({ 470 | Name = "Toggle", 471 | Text = tostring(Bool), 472 | Icon = "rbxassetid://11401835376", 473 | Duration = 3, 474 | }) 475 | end, 476 | }) 477 | 478 | local Section2 = Tab:Section({ 479 | Name = "Advance controls", 480 | }) 481 | 482 | local Slider = Section2:Slider({ 483 | Name = "Real Slider", 484 | Max = 50, 485 | Min = 0, 486 | Default = 25, 487 | Callback = function(Number) 488 | Library:Notify({ 489 | Name = "Slider", 490 | Text = tostring(Number), 491 | Icon = "rbxassetid://11401835376", 492 | Duration = 3, 493 | }) 494 | end, 495 | }) 496 | 497 | local Slider = Section2:Slider({ 498 | Name = "Real Slider", 499 | Max = 50, 500 | Min = 0, 501 | Default = 25, 502 | Callback = function(Number) 503 | Library:Notify({ 504 | Name = "Slider", 505 | Text = tostring(Number), 506 | Icon = "rbxassetid://11401835376", 507 | Duration = 3, 508 | }) 509 | end, 510 | }) 511 | 512 | local Keybind = Section2:Keybind({ 513 | Name = "Real Keybind", 514 | Default = Enum.KeyCode.Return, 515 | Callback = function() 516 | Library:Notify({ 517 | Name = "Keybind pressed", 518 | Text = "Idk sth here", 519 | Icon = "rbxassetid://11401835376", 520 | Duration = 3, 521 | }) 522 | end, 523 | UpdateKeyCallback = function(Key) 524 | Library:Notify({ 525 | Name = "Keybind updated", 526 | Text = tostring(Key), 527 | Icon = "rbxassetid://11401835376", 528 | Duration = 3, 529 | }) 530 | end, 531 | }) 532 | 533 | local SmallTextbox = Section2:SmallTextbox({ 534 | Name = "Real Small Textbox", 535 | Default = "Default Text", 536 | Callback = function(Text) 537 | Library:Notify({ 538 | Name = "Small Textbox updated", 539 | Text = Text, 540 | Icon = "rbxassetid://11401835376", 541 | Duration = 3, 542 | }) 543 | end, 544 | }) 545 | 546 | local Dropdown = Section2:Dropdown({ 547 | Name = "Real Dropdown", 548 | Items = { 1, 2, 3, 4, "XD" }, 549 | Callback = function(item) 550 | Library:Notify({ 551 | Name = "Dropdown", 552 | Text = item, 553 | Icon = "rbxassetid://11401835376", 554 | Duration = 3, 555 | }) 556 | end, 557 | }) 558 | 559 | local Button = Section2:Button({ 560 | Name = "Clear dropdown", 561 | Callback = function() 562 | Dropdown:Clear() 563 | end, 564 | }) 565 | 566 | local Button = Section2:Button({ 567 | Name = "Update dropdown", 568 | Callback = function() 569 | Dropdown:UpdateList({ 570 | Items = { "bruh", 1, 2, 3 }, 571 | Replace = true, 572 | }) 573 | end, 574 | }) 575 | 576 | local Button = Section2:Button({ 577 | Name = "Additem", 578 | Callback = function() 579 | Dropdown:AddItem("Item") 580 | end, 581 | }) 582 | 583 | local Colorpicker = Section2:Colorpicker({ 584 | Name = "Real Colorpicker", 585 | DefaultColor = Color3.new(1, 1, 1), 586 | Callback = function(Color) 587 | Library:Notify({ 588 | Name = "Small Textbox updated", 589 | Text = "Color: " .. tostring(Color), 590 | Icon = "rbxassetid://11401835376", 591 | Duration = 3, 592 | }) 593 | end, 594 | }) 595 | 596 | local Button = Section2:Button({ 597 | Name = "Random Color", 598 | Callback = function() 599 | Colorpicker:SetColor(Color3.fromRGB(math.random(1, 256), math.random(1, 256), math.random(1, 256))) 600 | end, 601 | }) 602 | 603 | local Button = Section2:Button({ 604 | Name = "Popup", 605 | Callback = function() 606 | Library:Popup({ 607 | Name = "Popup", 608 | Text = "Do you want to accept?", 609 | Options = { "Yes", "No" }, 610 | Callback = function(option) 611 | Library:Notify({ 612 | Name = "Prompt", 613 | Text = option, 614 | Icon = "rbxassetid://11401835376", 615 | Duration = 3, 616 | Callback = function() 617 | return 618 | end, 619 | }) 620 | end, 621 | }) 622 | end, 623 | }) 624 | 625 | local BigTextbox = Section2:BigTextbox({ 626 | Name = "Big Textbox", -- String 627 | Default = "Default Text", -- String 628 | PlaceHolderText = "Textbox | Placeholder Text", -- String 629 | ResetOnFocus = true, -- Bool 630 | Callback = function(Text) 631 | Library:Notify({ 632 | Name = "Big Text Box", 633 | Text = Text, 634 | Icon = "rbxassetid://11401835376", 635 | Duration = 3, 636 | Callback = function() 637 | return 638 | end, 639 | }) 640 | end, 641 | }) 642 | 643 | Library:Notify({ 644 | Name = "Test", 645 | Text = "This is just a test", 646 | Icon = "rbxassetid://11401835376", 647 | Duration = 3, 648 | Callback = function() 649 | Library:Notify({ 650 | Name = "Em", 651 | Text = "Notify Callback", 652 | Icon = "rbxassetid://11401835376", 653 | Duration = 3, 654 | }) 655 | end, 656 | }) 657 | 658 | local Tab = Window:Tab({ 659 | Name = "Others", 660 | Icon = "rbxassetid://11476626403", 661 | Color = Color3.new(0.474509, 0.474509, 0.474509), 662 | }) 663 | 664 | local Section = Tab:Section({ 665 | Name = "Miscs", 666 | }) 667 | 668 | local Button = Section:Button({ 669 | Name = "Destroy library", 670 | Callback = function() 671 | Library:Destroy() 672 | end, 673 | }) 674 | 675 | local Button = Section:Button({ 676 | Name = "Hide UI", 677 | Callback = function() 678 | Window:Toggled(false) 679 | 680 | task.wait(3) 681 | 682 | Window:Toggled(true) 683 | end, 684 | }) 685 | 686 | local Toggle = Section:Toggle({ 687 | Name = "Darkmode", 688 | Default = true, 689 | Callback = function(Bool) 690 | if Bool then 691 | Library:SetTheme({ 692 | Main = Color3.fromRGB(45, 45, 45), 693 | Secondary = Color3.fromRGB(31, 31, 31), 694 | Tertiary = Color3.fromRGB(31, 31, 31), 695 | Text = Color3.fromRGB(255, 255, 255), 696 | PlaceholderText = Color3.fromRGB(175, 175, 175), 697 | Textbox = Color3.fromRGB(61, 61, 61), 698 | NavBar = Color3.fromRGB(35, 35, 35), 699 | Theme = Color3.fromRGB(232, 202, 35), 700 | }) 701 | else 702 | Library:SetTheme({ 703 | Main = Color3.fromRGB(238, 238, 238), 704 | Secondary = Color3.fromRGB(194, 194, 194), 705 | Tertiary = Color3.fromRGB(163, 163, 163), 706 | Text = Color3.fromRGB(0, 0, 0), 707 | PlaceholderText = Color3.fromRGB(15, 15, 15), 708 | Textbox = Color3.fromRGB(255, 255, 255), 709 | NavBar = Color3.fromRGB(239, 239, 239), 710 | Theme = Color3.fromRGB(232, 55, 55), 711 | }) 712 | end 713 | end, 714 | }) 715 | 716 | local Toggle = Section:Toggle({ 717 | Name = "Darkmode", 718 | Default = true, 719 | Callback = function(Bool) 720 | if Bool then 721 | Library:SetTheme({ 722 | Main = Color3.fromRGB(45, 45, 45), 723 | Secondary = Color3.fromRGB(31, 31, 31), 724 | Tertiary = Color3.fromRGB(31, 31, 31), 725 | Text = Color3.fromRGB(255, 255, 255), 726 | PlaceholderText = Color3.fromRGB(175, 175, 175), 727 | Textbox = Color3.fromRGB(61, 61, 61), 728 | NavBar = Color3.fromRGB(35, 35, 35), 729 | Theme = Color3.fromRGB(232, 202, 35), 730 | }) 731 | else 732 | Library:SetTheme({ 733 | Main = Color3.fromRGB(238, 238, 238), 734 | Secondary = Color3.fromRGB(194, 194, 194), 735 | Tertiary = Color3.fromRGB(163, 163, 163), 736 | Text = Color3.fromRGB(0, 0, 0), 737 | PlaceholderText = Color3.fromRGB(15, 15, 15), 738 | Textbox = Color3.fromRGB(255, 255, 255), 739 | NavBar = Color3.fromRGB(239, 239, 239), 740 | Theme = Color3.fromRGB(232, 55, 55), 741 | }) 742 | end 743 | end, 744 | }) 745 | 746 | local Button = Section:Button({ 747 | Name = "Task Bar Only", 748 | Callback = function() 749 | Window:TaskBarOnly(true) 750 | 751 | task.wait(3) 752 | 753 | Window:TaskBarOnly(false) 754 | end, 755 | }) 756 | ``` 757 | 758 | ##### Created and mantained by Core Vision, Discord: https://discord.gg/Bp7wFcZeUn 759 | --------------------------------------------------------------------------------