Skip to content

Features



KHLib:GetInfo()

Returns a table of information about the library. It does not need the library to be first initialized as it is always constant. | Element Name | Description | | :---------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | builder | A string containing the default builder link that it uses. | | executorstested | A table containing all the executors that had been tested with this; if the elements value is 0 it means that it is working and had been tested, if 1 it means it is not working & soon to be supported for a patch, and if it is 2 it means it is not going to be supported in the same major & minor version. | | library | A string containing the name of the library | | uiversion | A number containing the builder's major version that was used for the library. | | version | A table with the elements "major", "minor" and "patch" which are all numbers, shows the version of the library. |

KHLib:IsReady()

Checks if the library has already been initialized, or for more specification it checks if it already has a "dump folder"

This function is useless for now as you cannot directly change DumpFolder without using KHLib:Initialize() nor does it find other dump folder that already exists in the explorer, it only checks if the variable "DumpFolder" is not nil.

This function will be fixed in the next minor update for KHLib.

Example Use:

if not KHLib:IsReady() then -- Checks if the library has not been initialized
  KHLib:Initialize() -- Initializes the library if not initialized
end


KHLib.New(Config)

ℹ️ This will be referred to as "LibUI" in this documentation

Creates a new UI for users to interact with

This should be the base of your script

Function Arguments: | Arguments | Type | Description | | --------- | ----- | ----------------------------------------------------------------------------------- | | Config | Array | Initial or default config of the Library can be edited later on as KHLibUI.Config |

Config Table: | Element | Type | Description | Required | Default | | -------------- | -------- | ------------------------------------------------------------------------------------------------- | -------- | ------------------------------------ | | Location | Instance | The location of the ScreenGui should be at game.CoreGui or game.Players.LocalPlayer.PlayerGui | false | game.Players.LocalPlayer.PlayerGui | | Title | String | The text displayed at the top of the window | false | "Koala Scripts" | | DestroyOnClose | Boolean | If true pressing the X button on the UI window will destroy the whole UI | false | false |

Returning Elements: (Accessed by KHLibUI.(element)) | Element | Type | Description | | ---------- | ------ | ------------------------------------------------------------------- | | ButtonIcon | String | The image id of the button to open the UI | | Config | Array | Configurations of the UI to see what it contains go to Config Table | | CurrentTab | String | The text displayed at the top of the window (subtitle) |

Example Use:

local LibUI = KHLib.New({
  Location = game.CoreGui,
  Title = "Example Title"
})


LibUI:Update()

Updates the UI to the new configurations set or the "returning elements"

Example Use:

local LibUI = KHLib.New({
  Location = game.CoreGui
}) -- Initially set the location to game.CoreGui

LibUI.Config.Location = game.Players.LocalPlayer.PlayerGui -- Sets the location configuration to game.Players.LocalPlayer.PlayerGui

LibUI:Update() -- Updates the location to game.Players.LocalPlayer.PlayerGui
-- Output: Should be at game.Players.LocalPlayer.PlayerGui