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.

Warning

I don't recommend using this module as it has multiple issues. I'd recommend using something like AgeGroupAssistant for now.

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/talk_eligibility@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/talk-eligibility@version"

Replace version with the current version of the package.

Then, type this into your terminal and press enter:

wally install

Quick Start

Make sure to do this for both the server and client.

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 = {
    LOCKED = false,
    _VERSION = _versionToString(version),

    -- Repositories
    CODEBERG = "https://codeberg.org/project-roadwork/talk-eligibility.git",
	GITHUB = "https://github.com/project-roadwork/talk-eligibility.git",

	CodebergTags = "https://codeberg.org/api/v1/repos/project-roadwork/light-reflector/tags",

	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> `,
    BeginningString = ``,
    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.",
    RestrictedTemplate = "๐Ÿ”‡ You cannot talk to anyone in this server.",
    CanChatWithAllTemplate = "๐Ÿ”Š You can currently talk to everyone in this server.",
    CannotChatWithAllTemplate = "๐Ÿ”‡ You currently 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,

    CanDoSecondTests = false, 
    -- ^ This may not be neccesary, but it checks the other way around.
    --   e.g., if (player1 and player2) *AND* (player2 and player1)
    
    CanCheckOnNewPlayerJoin = true,
    -- ^ Check if the existing players can chat with any new player. 
    --   May spam the chat with servers which has high capacity

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

    -- Preview
    FontSize = 13,
    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.