# Documentation

Library

```lua
local Library = loadstring(game:HttpGet("https://pastebin.com/raw/ANetM5R1", true))()
```

Create the Gui

```lua
local Gui = Library:Create(Name, Light, Size)
```

| Argument | Type   | Default                   | Description                    |
| -------- | ------ | ------------------------- | ------------------------------ |
| Name     | String | Abstract UI               | The name at the top of the Gui |
| Light    | Bool   | false                     | Whether light mode is enabled  |
| Size     | UDim2  | UDim2.new(0, 500, 0, 300) | Size of the Gui                |

Change the Gui toggle key

```lua
Gui:ChangeToggle(Key)
```

| Argument | Type    | Default                 | Description                |
| -------- | ------- | ----------------------- | -------------------------- |
| Key      | KeyCode | Enum.KeyCode.RightShift | The toggle key for the Gui |

KeyCodes are here: <https://developer.roblox.com/en-us/api-reference/enum/KeyCode>

Create an option

```lua
local Option = Gui:Option(Name)
```

| Argument | Type   | Description                    |
| -------- | ------ | ------------------------------ |
| Name     | String | Changes the name of the option |

### Now for the interesting part!

These are all the current elements you can add

* Labels
* Buttons
* Toggles
* Boxes
* Dropdowns
* Sliders

#### Label

```lua
Option:Label(Content)
```

```lua
Option:Label("Label")
```

####

| Argument | Type   | Description          |
| -------- | ------ | -------------------- |
| Content  | String | Content of the label |

#### Button

```lua
Option:Button(Name, Callback)
```

Example

```lua
Option:Button("Button", function()
    print("Button")
end)
```

| Argument | Type     | Description                                          |
| -------- | -------- | ---------------------------------------------------- |
| Name     | String   | The name of the button                               |
| Callback | Function | The callback function for when the button is clicked |

#### Toggle

```lua
Option:Toggle(Name, Default, Callback)
```

Example

```lua
Option:Toggle("Toggle", false, function(Status)
    print(tostring(Status))
end)
```

| Argument | Type     | Description                                 |
| -------- | -------- | ------------------------------------------- |
| Name     | String   | The name of the toggle                      |
| Default  | Bool     | The starting status of the toggle           |
| Callback | function | The callback for when the toggle is clicked |

#### Box

```lua
Option:Box(Name, Default, PlaceholderText, ClearTextOnFoces, Callback)
```

Example

```lua
Option:Box("Box", "Box", "Box", false, function(Value)
    print(tostring(Value))
end)
```

| Argument         | Type     | Description                                   |
| ---------------- | -------- | --------------------------------------------- |
| Default          | String   | Default box value                             |
| PlaceholderText  | String   | PlaceholderText on the box                    |
| ClearTextOnFocus | Bool     | Whether or not the text gets cleared on focus |
| Callback         | function | The callback for when the focus is lost       |

#### Dropdown

```lua
Option:Dropdown(Name, Options, Callback)
```

Example

```lua
Option:Dropdown("Dropdown", {"#1", "#2", "#3"}, function(Value)
    print(tostring(Value))
end)
```

| Argument | Type     | Description                                 |
| -------- | -------- | ------------------------------------------- |
| Name     | String   | Name of the dropdown                        |
| Options  | Array    | The options for the dropdown                |
| Callback | function | The callback for when and option is clicked |

#### Slider

```lua
Option:Slider(Name, Minimum, Maximum, Default, Callback)
```

Example

```lua
Option:Slider("Slider", 16, 100, 16, function(Value)
    game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = tonumber(Value)
end)
```

| Argument | Type          | Description                               |
| -------- | ------------- | ----------------------------------------- |
| Name     | String        | Name of the slider                        |
| Minimum  | Number        | Minimum value for the slider              |
| Maximum  | Number        | Maximum value for the slider              |
| Default  | String/Number | Default value in the textbox              |
| Callback | function      | The callback for when the slider is moved |
