project_roadwork/talk_eligibility

Checks which players can chat with one another based on ROBLOX chat permissions.

Talk Eligibility

A typed library that checks which players can chat with one another based on ROBLOX chat permissions.

Note

You must have the new Luau type solver enabled in Workspace in order to receive proper types.

Installation

You may get the .rbxm file directly from Codeberg Releases, or install via Wally or Pesde:*

Install via pesde:

pesde add project_roadwork/light_reflector@version
pesde install

Replace version with the current version of the package.

Or install via Wally: Add this to your wally.toml file:

[dependencies]
lightreflector = "illinois-roadbuff/light-reflector@version"

Replace version with the current version of the package.

Then, type this into your terminal and press enter:

wally install

Quick Start

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TalkEligibility = require(ReplicatedStorage.Packages["talk-eligibility"])

task.wait(5) -- Make sure to wait for a few seconds

TalkEligibility.init()
TalkEligibility.start()

Configuration

local BASE_CONFIG = {

	  CheckForUpdates = true,
	  ShowPrints = true,
	  ShowWarns = true,

    TextChatService = game:GetService("TextChatService"),
    --^ Change this if you are using something like OpenTextChatService

    BeginningString = `<b><font color="#{Color3.fromRGB(210, 210, 210):ToHex()}">[Talk Eligibility]</font></b> `,
    CanChatTemplate = "๐Ÿ”Š %s joined. You are able to talk with this player.",
    CannotChatTemplate = "๐Ÿ”‡ %s joined. You are not able to talk with this player.",
    NotDeterminedTemplate = "โ”%s joined. You may or may not be able to talk with this player.",
    NoRestrictionsTemplate = "๐Ÿ”Š You can talk to everyone in this server.",
    CannotChatWithAllTemplate = "๐Ÿ”‡ You cannot talk to anyone in this server.",
    OnlyOneTemplate = "๐Ÿ”‡ You are the only person in this server.",

    CanChatWithMultiple = "๐Ÿ”Š You can talk with the following players: %s.",
    CannotChatWithMultiple = "๐Ÿ”‡ However, you cannot talk with the following players: %s.",

    ShowTalkablePlayers = true,
    ShowNonTalkablePlayers = true,

    -- Max amount shown until cutoff (e.g., plr1, plr2, and 2 others)
    MaxTalkablePlayersShown = 10,
    MaxNonTalkablePlayersShown = 10,

    FontSize = 15,
    FontFace = "Gotham",
    CanChatColor3 = Color3.fromRGB(198, 255, 192),
    CannotChatColor3 = Color3.fromRGB(255, 142, 142),
    NotDeterminedColor3 = Color3.fromRGB(210, 210, 210),
}

License

Licensed under the Apache License 2.0 WITH the LLVM exception.