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 calls game: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 the AnalyticsService using either its full name or one of its aliases like Analytics or AnSer.

  • Environment Awareness:
    Some services are marked as Client_Only or Studio_Only to 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