Skip to content

GenericService documentation

ResourceName edited this page Dec 12, 2024 · 1 revision

What is it?

The GenericService is a service that handles miscellaneous functions in G-Gui that don't require a seperate module.

GenericService is located at game.ServerScriptService.GGuiRuntime.GenericService

image

Current functions

GenericService.GetUserColorPreference(ctype, user)

Returns a Color3 value in DataStore that the user set in their user settings to be their default background colour.

user is a player instance.

ctype indicates the type that should be required, either "Outline" or "Fill".

GenericService.SetUserColorPreference(ctype, user, color)

Sets a Color3 in DataStore value that is specified in Color.

user is a player instance.

ctype indicates the type that should be set, either "Outline" or "Fill".

color is a valid Color3 value. Any Color3 value will do.

GenericService.GetDonorPrivileges(player)

Returns if the user is a G-Gui donor [true, false].

player is a player instance.