Skip to content

Script Panel v2

c edited this page Aug 11, 2021 · 21 revisions

About

exploit gui lib script panel v2 with 4 scripts active in become fumo

Setup

panel demonstration

in order to get the panel, you first have to run

loadstring(game:HttpGet("https://raw.githubusercontent.com/ceat-ceat/stuff/main/scriptpanelv2"))()

in any script to load up the panel. this assigns a metatable to _G.ScriptPanelv2 that contains a function for you to add your interface. to add a script panel, you run _G.ScriptPanelv2:AddScript(string Name,) where Name is the text you want to display at the top of the column and returns a Script Interface Object. this will create the base of the entire interface for your script

the beginning of an interface

_G.ScriptPanelv2

Functions

Creates the base of the Script Interface Object's ui and returns a Script Interface Object

Item SortOrder determines how the interface should order its Items while Category SortOrder determines how the interface should order its Categories. Both accept Enum.SortOrder.Name, Enum.SortOrder.LayoutOrder, or nil, in which case it will default to Enum.SortOrder.Name

Script Interface Object GetScript(string Name)

returns a Script Interface Object with the same name as specified, if any

Script Interface Object

Functions

Item AddItem(string ItemType name, table Config table)

adds an interactable item to the script interface and returns and Item

Item GetItem(string Name)

returns an Item in the Script Interface Object with the same name as specified, if any

Category AddCategory(string Name,EnumItem SortOrder,double LayoutOrder)

adds a new list under the main script list with the specified name and the same color as the main script list and returns a Category

SortOrder determines how the Category will order its Items. It Accepts Enum.SortOrder.Name, Enum.SortOrder.LayoutOrder, or nil, in which case it will default to Enum.SortOrder.Name

LayoutOrder determines what order the category should be displayed with other categories if the Script Interface Object's SortOrder is Enum.SortOrder.LayoutOrder

Category GetCategory(string Name)

returns a Category in the Script Interface Object with the same name as specified, if any

void Remove()

removes the Script Interface Object and everything in it from the main interface, should be used in a kill script function

Category

Category

Functions

Item AddItem(string ItemType name, table Config table)

adds an interactable item to the Category ui and returns and Item

Item GetItem(string Name)

returns an Item in the Category with the same name as specified, if any

void Remove()

removes the Category and everything in it from the script interface

Item

Functions

void Remove()

removes the Item from the Script Interface Object/Category interface

ItemTypes

String

Gives the user a textbox to type in

String ItemType

Config table

type Name Required? Default Desc
string Name required nil the text to be displayed on the left side of the new item
string Default optional "" the value the item will default to if the text in the textbox is empty
double LayoutOrder optional 0 determines how the item will be displayed with other items if the Script's SortOrder is Enum.SortOrder.LayoutOrder

Events

RBXScriptSignal Changed (string Value)

Fires when the user stops focusing on the textbox created by AddItem() and passes the string typed in the textbox, if the textbox is empty, it will pass the default value instead

Number

Gives the user a textbox to type numbers in

Number ItemType

Config table

type Name Required? Default Desc
string Name required nil the text to be displayed on the left side of the new item
double Default optional 0 the value the item will default to if the text in the textbox cannot be convert to a number or is empty
double LayoutOrder optional 0 determines how the item will be displayed with other items if the Script's SortOrder is Enum.SortOrder.LayoutOrder

Events

RBXScriptSignal Changed (double Value)

Fires when the user stops focusing on the textbox created by AddItem() and passes the number typed in the textbox, if tonumber() cannot convert the text into a number or if the textbox is empty, it will pass the default value instead

Boolean

Gives the user a bar to click that alternates between true and false. When the value is true, the bar fades to the color of the script. When it's false, the bar fades to white.

Boolean ItemType in false state Boolean ItemType in true state

Config table

type Name Required? Default Desc
string Name required nil the text to be displayed on the left side of the new item
boolean Default optional false the starting value of the boolean item
double LayoutOrder optional 0 determines how the item will be displayed with other items if the Script's SortOrder is Enum.SortOrder.LayoutOrder

Events

RBXScriptSignal Changed (boolean Value)

Fires when the user clicks the row created by AddItem(), the passed boolean alternates each time

Button

Gives the user a button to click

Button ItemType without text Button ItemType with text

Config table

type Name Required? Default Desc
string Name required nil the text to be displayed on the left side of the new item
string Text optional nil the text to be displayed in the button
double LayoutOrder optional 0 determines how the item will be displayed with other items if the Script's SortOrder is Enum.SortOrder.LayoutOrder

Events

RBXScriptSignal Click ()

Fires when the user clicks the button created by AddItem()

Keybind

Gives the user a button that upon being clicked, will prompt the user with a "Press a key". The next time the user presses a key, the value will be changed to that KeyCode

Keybind ItemType Keybind ItemType in the 'Press a key' state

Config table

type Name Required? Default Desc
string Name required nil the text to be displayed on the left side of the new item
EnumItem KeyCode optional Enum.KeyCode.E the starting value of the KeyCode item
double LayoutOrder optional 0 determines how the item will be displayed with other items if the Script's SortOrder is Enum.SortOrder.LayoutOrder

Events

Fires when the user is finished inputting a new KeyCode into the item and passes a KeyCode

Dropdown

Gives the user a dropdown menu when clicked that gives one or more options defined by a script

Closed dropdown Open dropdown

Config table

type Name Required? Default Desc
string Name required nil the text to be displayed on the left side of the new item
string Default optional nil the starting value of the dropdown item, should be a string that corresponds with an index in the Values table, otherwise defaults to nil
double LayoutOrder optional 0 determines how the item will be displayed with other items if the Script's SortOrder is Enum.SortOrder.LayoutOrder
array Values required nil the values to be used in the dropdown menu where the index is the display text and the value is the value to set the item to when it is clicked, the value can be anything but nil because then it wont show on the menu

A value in the Values array

Index Value
string Value name something

Events

Fires when the user is finished inputting a new KeyCode into the item and passes a KeyCode

ListDropdown

Gives the user a dropdown menu that houses other items. It's like a subcategory. I'm pretty sure you can house ListDropdowns in ListDropdowns in ListDropdowns but the clipping is probably gonna be a problem until i do another way to do the opening animation

Closed listdropdown Open listdropdown with other items in it

Config table

type Name Required? Default Desc
string Name required nil the text to be displayed on the left side of the new item
double LayoutOrder optional 0 determines how the item will be displayed with other items if the Script's SortOrder is Enum.SortOrder.LayoutOrder

Functions

Item AddItem(string ItemType name, table Config table)

adds an interactable item to the ListDropdown and returns and Item

Item GetItem(string Name)

returns an Item in the ListDropdown with the same name as specified, if any