GetServices - Styxling/Feather GitHub Wiki
This module compiles a list of Roblox services into a single table, so you don’t have to call game:GetService() repeatedly in your own scripts. It automatically adds a set of aliases for many services, allowing you to reference them using shorter or alternative names.
What It Does
-
Service Retrieval:
It loops through a predefined list of services and callsgame:GetService()for each one that meets the current environment’s criteria (for example, skipping Studio-only services when not in Studio). -
Alias Support:
If alias usage is enabled, the module adds additional keys (aliases) to the table. For example, you can access theAnalyticsServiceusing either its full name or one of its aliases likeAnalyticsorAnSer. -
Environment Awareness:
Some services are marked asClient_OnlyorStudio_Onlyto prevent them from being loaded in inappropriate environments.
Usage Example
local Directory = require(ServerStorage.Directory.MainModule)
local Services = Directory("_replicated", "GetServices")
-- Example usage:
local Players = Services.Players -- or Services.P
local RunService = Services.RunService -- or Services.RS
local TweenService = Services.TweenService -- or Services.Tween