Kit API - Realshadow62/Kits GitHub Wiki
Properties
int Tickets
The amount of times the kit may be claimed before it is used up. Everytime the kit is claimed, this value drops down by 1. You can increase/decrease this amount by writing to it.
Added by kit:limit
team Team
The team the player must be on to claim this kit. Changing this to nil will unrestrict the kit.
Added by kit:restrict
table Uniform
An array containing the shirt and pants' id that will be given to the player when the kit is claimed, where index 1 is the shirt id and index 2 is the pants id.
Added by kit:uniform
table Equipment
An array containing objects that will be cloned and parented to a player's backpack when the kit is claimed. Meant to be used for tools.
Added by kit:equip
table Webbings
An array containing objects that will be cloned, CFramed and welded to a player's character when the kit is claimed.
Added by kit:attach
Functions
void kit:give (player player)
Gives a kit to a target player. Behaviour is dependent on what modifiers were called on the kit. Does nothing when called on an empty kit.
kit Kit:limit (int tickets)
Modifies a kit to have a limited number of uses.
Adds the Ticket property and the Exhausted event
Note: If a number with decimals is given as an argument, the decimals will be lost (i.e 9.178 becomes 9)
kit Kit:restrict (Team team)
Restricts a kit to a single team. The player must be on the team specified to be able to claim the kit.
Adds the Team property
kit Kit:uniform (int shirtId, int pantsId)
Modifies a kit to give an outfit. It will modify the existing character's shirts/pants' template, or create a new instance if one is not present.
Adds the Uniform property
kit Kit:equip (table equipment)
When the kit is claimed, clones and parents instances inside the table to the player's backpack.
Adds the Equipment property
kit attach (table webbings)
When the kit is claimed, attaches a model to the player's character. See here for more details on configuring webbings.
Adds the Webbings property
Events
RBXScriptSignal Exhausted ()
Fired when a kit modified with kit:limit is used up.
Webbings
Webbings are models that can be attached to a player's character. To create one, simply set a primary part in the model and name that part the body part that it should be attached to
e.g. For a helmet, you would name the primary part "Head"