Run it
Copy the script and paste it into your executor.
Players = :()
TCS = :()
StarterGui = :()
UIS = :()
TweenService = :()
RunService = :()
ReplicatedStorage = :()
Workspace = :()
LP = Players.LocalPlayer
PG = LP:()
VERSION =
Config = {
Width = ,
Height = ,
MinWidth = ,
MinHeight = ,
MaxWidth = ,
MaxHeight = ,
ScanInterval = ,
MaxMessages = ,
WindowTitle =
}
C = {
Background = .(, , ),
Header = .(, , ),
Panel = .(, , ),
PanelHover = .(, , ),
Selected = .(, , ),
SelectedBorder = .(, , ),
Input = .(, , ),
Message = .(, , ),
White = .(, , ),
Gray = .(, , ),
Muted = .(, , ),
Border = .(, , ),
BorderLight = .(, , ),
BgGradStart = .(, , ),
BgGradMid = .(, , ),
BgGradEnd = .(, , ),
HeaderGradStart = .(, , ),
HeaderGradMid = .(, , ),
HeaderGradEnd = .(, , ),
TitleGradStart = .(, , ),
TitleGradMid = .(, , ),
TitleGradEnd = .(, , ),
BorderGrad1 = .(, , ),
BorderGrad2 = .(, , ),
BorderGrad3 = .(, , ),
GoldBright = .(, , ),
GoldMid = .(, , ),
GoldDeep = .(, , ),
GoldBg = .(, , ),
GoldBgUnselected = .(, , )
}
FontPresets = {
{ id = , label = , regular = .Font.BuilderSans, bold = .Font.BuilderSansBold, title = .Font.GothamBlack },
{ id = , label = , regular = .Font.GothamMedium, bold = .Font.GothamBold, title = .Font.GothamBlack },
{ id = , label = , regular = .Font.FredokaOne, bold = .Font.FredokaOne, title = .Font.FredokaOne },
{ id = , label = , regular = .Font.Code, bold = .Font.RobotoMono, title = .Font.Code },
{ id = , label = , regular = .Font.SourceSansSemibold, bold = .Font.SourceSansBold, title = .Font.SourceSansBold },
{ id = , label = , regular = .Font.Arcade, bold = .Font.Arcade, title = .Font.Arcade },
{ id = , label = , regular = .Font.Antique, bold = .Font.Antique, title = .Font.Antique }
}
CurrentFontIndex =
FontDropdownOpen =
()
FontPresets[CurrentFontIndex] FontPresets[]
(obj, duration, props, style, direction)
obj obj.Parent
info = TweenInfo.(duration , style .EasingStyle.Quart, direction .EasingDirection.Out)
t = TweenService:(obj, info, props)
t:()
t
Text = {
English = {
langLabel = ,
here = ,
placeholder = ,
noChannels = ,
noMessages = ,
copyHistory = ,
copied = ,
unavailable = ,
noChannel = ,
system = ,
interfaceLang = ,
fontSetting = ,
fontApplied = ,
exportTitle = ,
channel = ,
messages = ,
date = ,
time = ,
username = ,
displayName = ,
message = ,
resend = ,
copyUser = ,
copyText = ,
forwardTo = ,
repeatCount = ,
targetChannel = ,
sendError = ,
highlightPlayer = ,
deactivateHighlight = ,
teleportToPlayer = ,
back = ,
targetUnavailable = ,
highlightEnabled = ,
highlightDisabled = ,
invalidPlayer = ,
localCharacterUnavailable = ,
teleportSucceeded = ,
teleportFailed = ,
betaNotice = ,
loaded = ,
rateLimited = ,
channelUnavailable = ,
acceptedCount = ,
notSentChannels =
},
Spanish = {
langLabel = ,
here = ,
placeholder = ,
noChannels = ,
noMessages = ,
copyHistory = ,
copied = ,
unavailable = ,
noChannel = ,
system = ,
interfaceLang = ,
fontSetting = ,
fontApplied = ,
exportTitle = ,
channel = ,
messages = ,
date = ,
time = ,
username = ,
displayName = ,
message = ,
resend = ,
copyUser = ,
copyText = ,
forwardTo = ,
repeatCount = ,
targetChannel = ,
sendError = ,
highlightPlayer = ,
deactivateHighlight = ,
teleportToPlayer = ,
back = ,
targetUnavailable = ,
highlightEnabled = ,
highlightDisabled = ,
invalidPlayer = ,
localCharacterUnavailable = ,
teleportSucceeded = ,
teleportFailed = ,
betaNotice = ,
loaded = ,
rateLimited = ,
channelUnavailable = ,
acceptedCount = ,
notSentChannels =
}
}
LanguageOrder = { , }
InterfaceLanguage =
LanguageDropdownOpen =
(key)
dictionary = Text[InterfaceLanguage] Text.English
dictionary[key] Text.English[key] key
Channels = {}
History = {}
TabButtons = {}
GoldTabGradients = {}
SelectedChannel =
MessageOrder =
UsernameCache = {}
AvatarCache = {}
SendRepeatCount =
TargetChannelsOverride = {}
GUI, Chat, Header, HeaderTitle, Tabs, Scroll, EmptyLabel, InputArea, Input, Dots, SendBtn, Resize, Menu, MenuScale
MenuButton, BuildMenu, RenderMessageFunc
()
() ==
success, env = ()
success (env) == env
Environment = ()
Environment.REXTextServiceConnections
_, connection (Environment.REXTextServiceConnections)
(() connection:() )
Environment.REXTextServiceConnections = {}
Connections = Environment.REXTextServiceConnections
(connection)
.(Connections, connection)
connection
old = PG:()
old old:()
(()
StarterGui:(.CoreGuiType.Chat, )
)
(()
TCS.ChatWindowConfiguration.Enabled =
TCS.ChatInputBarConfiguration.Enabled =
)
(class, props, parent)
obj = .(class)
key, value (props {}) obj[key] = value
obj.Parent = parent
obj
(obj, radius)
(, { CornerRadius = .(, radius) }, obj)
(obj, color, thickness, transparency)
(, {
Color = color C.Border,
Thickness = thickness ,
Transparency = transparency
}, obj)
(parent, value, size, color, font)
(, {
BackgroundTransparency = ,
Text = value ,
TextSize = size ,
TextColor3 = color C.White,
Font = font ().regular,
TextXAlignment = .TextXAlignment.Left,
TextYAlignment = .TextYAlignment.Center
}, parent)
(value, duration)
GUI GUI.Parent
toast = (, {
AnchorPoint = .(, ),
Position = .(, , , -),
Size = .(, ),
BackgroundColor3 = .(, , ),
BackgroundTransparency = ,
BorderSizePixel = ,
ZIndex =
}, GUI)
(toast, )
outline = (toast, C.BorderLight, , )
(, {
Color = ColorSequence.({
ColorSequenceKeypoint.(, .(, , )),
ColorSequenceKeypoint.(, .(, , ))
}),
Rotation =
}, toast)
accent = (, {
Position = .(, ),
Size = .(, , , -),
BackgroundColor3 = C.BorderLight,
BorderSizePixel = ,
ZIndex =
}, toast)
(accent, )
title = (toast, , , C.White, ().bold)
title.Position = .(, )
title.Size = .(, -, , )
title.ZIndex =
title:(, )
body = (toast, (value ), , C.Gray, ().regular)
body.Position = .(, )
body.Size = .(, -, , )
body.TextWrapped =
body.TextYAlignment = .TextYAlignment.Top
body.ZIndex =
(toast, , {Position = .(, -, , -)}, .EasingStyle.Quint, .EasingDirection.Out)
.(duration , ()
toast toast.Parent
out = (toast, , {Position = .(, , , -), BackgroundTransparency = }, .EasingStyle.Quint, .EasingDirection.In)
(title, , {TextTransparency = })
(body, , {TextTransparency = })
(accent, , {BackgroundTransparency = })
(outline, , {Transparency = })
out out.Completed:()
toast toast.Parent toast:()
)
GameFontConnection =
(obj, fontPreset)
obj
obj:() obj:() obj:()
obj == HeaderTitle
obj.Font = fontPreset.title
obj:()
obj.Font = .Font.GothamBlack
isBold = obj:()
obj.Font = isBold fontPreset.bold fontPreset.regular
()
preset = ()
GUI
_, desc (GUI:())
(desc, preset)
_, guiObj (PG:())
guiObj:(GUI)
(() (guiObj, preset) )
GameFontConnection
(() GameFontConnection:() )
GameFontConnection = (PG.DescendantAdded:((desc)
GUI GUI.Parent
desc:(GUI)
(() (desc, ()) )
))
(value)
(setclipboard) ==
success = (setclipboard, (value))
success
(())
(())
(userId)
userId ()
UsernameCache[userId] UsernameCache[userId]
player = Players:(userId)
player
UsernameCache[userId] = player.Name
player.Name
(userId)
(userId, callback)
userId
UsernameCache[userId]
callback (UsernameCache[userId])
.(()
success, result = (()
Players:(userId)
)
success result
UsernameCache[userId] = result
callback (result)
)
(userId)
userId
AvatarCache[userId] AvatarCache[userId]
success, image = (()
Players:(userId, .ThumbnailType.HeadShot, .ThumbnailSize.Size100x100)
)
success image
AvatarCache[userId] = image
image
(userId)
userId (userId) ~=
.(, , )
hue = ((.(userId) % ) * ) %
.(hue, , )
GUI = (, {
Name = ,
ResetOnSpawn = ,
DisplayOrder = ,
ZIndexBehavior = .ZIndexBehavior.Sibling
}, PG)
Chat = (, {
Position = .(, ),
Size = .(Config.Width, Config.Height),
BackgroundColor3 = C.Background,
BorderSizePixel = ,
Active = ,
ClipsDescendants =
}, GUI)
ChatBgGrad = (, {
Color = ColorSequence.({
ColorSequenceKeypoint.(, C.BgGradStart),
ColorSequenceKeypoint.(, C.BgGradMid),
ColorSequenceKeypoint.(, C.BgGradEnd)
}),
Rotation =
}, Chat)
(Chat, )
ChatStroke = (Chat, .(, , ), )
ChatStrokeGrad = (, {
Color = ColorSequence.({
ColorSequenceKeypoint.(, C.BorderGrad1),
ColorSequenceKeypoint.(, C.BorderGrad2),
ColorSequenceKeypoint.(, C.BorderGrad3)
}),
Rotation =
}, ChatStroke)
Header = (, {
Size = .(, , , ),
BackgroundColor3 = C.Header,
BorderSizePixel = ,
Active =
}, Chat)
HeaderGrad = (, {
Color = ColorSequence.({
ColorSequenceKeypoint.(, C.HeaderGradStart),
ColorSequenceKeypoint.(, C.HeaderGradMid),
ColorSequenceKeypoint.(, C.HeaderGradEnd)
}),
Rotation =
}, Header)
(Header, )
HeaderBottom = (, {
Position = .(, , , -),
Size = .(, , , ),
BackgroundColor3 = C.Header,
BorderSizePixel =
}, Header)
HeaderBottomGrad = (, {
Color = ColorSequence.({
ColorSequenceKeypoint.(, C.HeaderGradStart),
ColorSequenceKeypoint.(, C.HeaderGradMid),
ColorSequenceKeypoint.(, C.HeaderGradEnd)
}),
Rotation =
}, HeaderBottom)
HeaderTitle = (Header, Config.WindowTitle, , .(, , ), ().title)
HeaderTitle.Position = .(, )
HeaderTitle.Size = .(, -, , )
TitleGrad = (, {
Color = ColorSequence.({
ColorSequenceKeypoint.(, C.TitleGradStart),
ColorSequenceKeypoint.(, C.TitleGradMid),
ColorSequenceKeypoint.(, C.TitleGradEnd)
}),
Rotation =
}, HeaderTitle)
TabsContainer = (, {
Position = .(, ),
Size = .(, , , ),
BackgroundColor3 = C.Panel,
BackgroundTransparency = ,
BorderSizePixel = ,
ClipsDescendants =
}, Chat)
Tabs = (, {
Position = .(, ),
Size = .(, -, , -),
BackgroundTransparency = ,
BorderSizePixel = ,
ScrollBarThickness = ,
ScrollingDirection = .ScrollingDirection.X,
AutomaticCanvasSize = .AutomaticSize.X,
CanvasSize = .()
}, TabsContainer)
(, {
FillDirection = .FillDirection.Horizontal,
SortOrder = .SortOrder.LayoutOrder,
Padding = .(, )
}, Tabs)
Scroll = (, {
Position = .(, ),
Size = .(, , , -),
BackgroundTransparency = ,
BorderSizePixel = ,
ScrollBarThickness = ,
ScrollBarImageColor3 = C.BorderLight,
AutomaticCanvasSize = .AutomaticSize.Y,
CanvasSize = .()
}, Chat)
(, {
PaddingLeft = .(, ),
PaddingRight = .(, ),
PaddingTop = .(, ),
PaddingBottom = .(, )
}, Scroll)
(, {
Padding = .(, ),
SortOrder = .SortOrder.LayoutOrder
}, Scroll)
EmptyLabel = (Scroll, (), , C.Muted, ().regular)
EmptyLabel.Size = .(, , , )
EmptyLabel.TextXAlignment = .TextXAlignment.Center
InputArea = (, {
Position = .(, , , -),
Size = .(, -, , ),
BackgroundColor3 = C.Input,
BackgroundTransparency = ,
BorderSizePixel =
}, Chat)
(InputArea, )
InputStroke = (InputArea, C.Border, )
Input = (, {
Position = .(, ),
Size = .(, -, , ),
BackgroundTransparency = ,
Text = ,
PlaceholderText = (),
PlaceholderColor3 = C.Muted,
TextColor3 = C.White,
TextSize = ,
Font = ().regular,
ClearTextOnFocus = ,
TextXAlignment = .TextXAlignment.Left
}, InputArea)
(Input.Focused:(()
(InputStroke, , { Color = C.SelectedBorder, Thickness = })
))
(Input.FocusLost:(()
(InputStroke, , { Color = C.Border, Thickness = })
))
SendBtn = (, {
AnchorPoint = .(, ),
Position = .(, -, , ),
Size = .(, ),
BackgroundColor3 = C.Selected,
Text = ,
TextColor3 = C.White,
TextSize = ,
Font = ().bold,
AutoButtonColor =
}, InputArea)
SendBtn:(, )
(SendBtn, )
SendBtnStroke = (SendBtn, C.BorderLight, )
SendBtn.MouseEnter:(()
(SendBtn, , { BackgroundColor3 = C.PanelHover })
(SendBtnStroke, , { Color = C.SelectedBorder })
)
SendBtn.MouseLeave:(()
(SendBtn, , { BackgroundColor3 = C.Selected })
(SendBtnStroke, , { Color = C.BorderLight })
)
Dots = (, {
AnchorPoint = .(, ),
Position = .(, -, , ),
Size = .(, ),
BackgroundColor3 = C.Panel,
Text = ,
TextColor3 = C.White,
TextSize = ,
Font = ().bold,
AutoButtonColor =
}, InputArea)
Dots:(, )
(Dots, )
DotsStroke = (Dots, C.Border, )
Dots.MouseEnter:(()
(Dots, , { BackgroundColor3 = C.PanelHover })
(DotsStroke, , { Color = C.BorderLight })
)
Dots.MouseLeave:(()
(Dots, , { BackgroundColor3 = C.Panel })
(DotsStroke, , { Color = C.Border })
)
Resize = (, {
AnchorPoint = .(, ),
Position = .(, -, , -),
Size = .(, ),
BackgroundColor3 = C.Panel,
Text = ,
TextColor3 = C.Gray,
TextSize = ,
AutoButtonColor = ,
ZIndex =
}, Chat)
(Resize, )
Resize.MouseEnter:(()
(Resize, , { BackgroundColor3 = C.PanelHover, TextColor3 = C.White })
)
Resize.MouseLeave:(()
(Resize, , { BackgroundColor3 = C.Panel, TextColor3 = C.Gray })
)
Menu = (, {
Name = ,
Size = .(, ),
AutomaticSize = .AutomaticSize.Y,
BackgroundColor3 = .(, , ),
BorderSizePixel = ,
Visible = ,
ZIndex =
}, GUI)
MenuBgGrad = (, {
Color = ColorSequence.({
ColorSequenceKeypoint.(, .(, , )),
ColorSequenceKeypoint.(, .(, , ))
}),
Rotation =
}, Menu)
MenuScale = (, { Scale = }, Menu)
(Menu, )
MenuStroke = (Menu, .(, , ), )
MenuStrokeGrad = (, {
Color = ColorSequence.({
ColorSequenceKeypoint.(, C.BorderGrad1),
ColorSequenceKeypoint.(, C.BorderGrad2)
}),
Rotation =
}, MenuStroke)
(, {
PaddingTop = .(, ),
PaddingBottom = .(, ),
PaddingLeft = .(, ),
PaddingRight = .(, )
}, Menu)
(, {
Padding = .(, ),
SortOrder = .SortOrder.LayoutOrder
}, Menu)
MenuClosing =
()
Menu.Visible MenuClosing
MenuClosing =
LanguageDropdownOpen =
FontDropdownOpen =
(MenuScale, , { Scale = }, .EasingStyle.Quad, .EasingDirection.In)
(Menu, , { BackgroundTransparency = })
(MenuStroke, , { Transparency = })
.(, ()
Menu Menu.Parent
Menu.Visible =
Menu.BackgroundTransparency =
MenuStroke.Transparency =
MenuScale.Scale =
MenuClosing =
)
()
MenuClosing =
Menu.Visible =
Menu.BackgroundTransparency =
MenuStroke.Transparency =
MenuScale.Scale =
(MenuScale, , { Scale = }, .EasingStyle.Back, .EasingDirection.Out)
(Menu, , { BackgroundTransparency = })
(MenuStroke, , { Transparency = })
(container)
_, child (container:())
child:() child:() child:() child:()
child:()
MenuButton = (container, value, callback, isSubItem, isActive, customFont)
baseColor = isActive C.Selected (isSubItem C.Input C.Panel)
preset = ()
button = (, {
Size = .(, , , isSubItem ),
BackgroundColor3 = baseColor,
BorderSizePixel = ,
Text = .. value,
TextColor3 = isActive .(, , ) C.White,
TextSize = isSubItem ,
Font = customFont (isActive preset.bold preset.regular),
TextXAlignment = .TextXAlignment.Left,
AutoButtonColor = ,
ZIndex =
}, container)
isActive button:(, )
(button, )
btnStroke = (button, isActive C.SelectedBorder C.Border, , )
button.MouseEnter:(()
isActive
(button, , { BackgroundColor3 = C.PanelHover })
(btnStroke, , { Color = C.BorderLight, Transparency = })
)
button.MouseLeave:(()
isActive
(button, , { BackgroundColor3 = baseColor })
(btnStroke, , { Color = C.Border, Transparency = })
)
callback
button.MouseButton1Click:(() () )
button
(menu, button)
camera = .CurrentCamera
camera
viewport = camera.ViewportSize
pos = button.AbsolutePosition
size = menu.AbsoluteSize
x = .(pos.X, , .(, viewport.X - size.X))
y = pos.Y - size.Y -
y < y = pos.Y + button.AbsoluteSize.Y +
y = .(y, , .(, viewport.Y - size.Y))
menu.Position = .(x, y)
TextChannels = TCS:()
(channel)
channel channel:()
ok, descendants = (()
channel:()
)
ok
_, instance (descendants)
instance:() instance.UserId == LP.UserId
instance
(channel)
channel channel:()
channel.Parent channel.Name == channel.Name ==
source = (channel)
source
ok, canSend = (()
source.CanSend
)
ok canSend ==
(channel)
channel.Name == channel.Name == ()
channel.Name
GetSendStatusName
(channel)
History[channel] = History[channel] {}
History[channel]
()
channel, button (TabButtons)
button button.Parent
selected = channel == SelectedChannel
halo = button:()
selected
(button, , { BackgroundColor3 = C.GoldBg, BackgroundTransparency = })
halo (halo, , { ImageTransparency = })
(button, , { BackgroundColor3 = C.GoldBgUnselected, BackgroundTransparency = })
halo (halo, , { ImageTransparency = })
VisualTransitionId =
(row, duration)
row row.Parent
duration = duration
_, object (row:())
object:() object:() object:()
(object, duration, { TextTransparency = })
object.BackgroundTransparency <
(object, duration, { BackgroundTransparency = })
object:() object:()
(object, duration, { ImageTransparency = , BackgroundTransparency = })
object:()
(object, duration, { Transparency = })
object:() object.BackgroundTransparency <
(object, duration, { BackgroundTransparency = })
(row, duration, { BackgroundTransparency = })
.(duration + , ()
row row.Parent row:()
)
(animate)
VisualTransitionId +=
transitionId = VisualTransitionId
_, child (Scroll:())
child:() child.Name ==
animate
(child, )
child:()
_, channelHistory (History)
_, data (channelHistory)
data._uiRow =
animate .()
transitionId
RenderMessageFunc = (data, animate)
MessageOrder +=
preset = ()
Row = (, {
Name = ,
Size = .(, -, , ),
AutomaticSize = .AutomaticSize.Y,
BackgroundColor3 = C.Message,
BackgroundTransparency = animate ,
BorderSizePixel = ,
LayoutOrder = MessageOrder
}, Scroll)
data._uiRow = Row
(Row, )
rowStroke = (Row, C.Border, , animate )
(, {
PaddingTop = .(, ),
PaddingBottom = .(, ),
PaddingLeft = .(, ),
PaddingRight = .(, )
}, Row)
Avatar = (, {
Position = .(, ),
Size = .(, ),
BackgroundColor3 = C.Panel,
BorderSizePixel = ,
Image = data.avatar ,
ImageTransparency = animate ,
ScaleType = .ScaleType.Crop
}, Row)
(Avatar, )
avatarStroke = (Avatar, C.BorderLight, , animate )
displayText = data.displayName data.username
username = data.usernameReal data.username
fullName = displayText
username ~= username ~= displayText
fullName = displayText .. .. username ..
Name = (Row, fullName, , (data.userId), preset.bold)
Name:(, )
Name.Position = .(, )
Name.Size = .(, -, , )
Name.TextTruncate = .TextTruncate.AtEnd
Name.TextTransparency = animate
Body = (Row, data.original, , C.White, preset.regular)
Body.Position = .(, )
Body.Size = .(, -, , )
Body.AutomaticSize = .AutomaticSize.Y
Body.TextWrapped =
Body.TextYAlignment = .TextYAlignment.Top
Body.TextTransparency = animate
animate
(Row, , { BackgroundTransparency = })
(rowStroke, , { Transparency = })
(Avatar, , { ImageTransparency = })
(avatarStroke, , { Transparency = })
(Name, , { TextTransparency = })
(Body, , { TextTransparency = })
MsgDots = (, {
AnchorPoint = .(, ),
Position = .(, -, , ),
Size = .(, ),
BackgroundColor3 = C.Panel,
Text = ,
TextColor3 = C.White,
TextSize = ,
Font = preset.bold,
AutoButtonColor = ,
ZIndex =
}, Row)
MsgDots:(, )
(MsgDots, )
(MsgDots, C.Border, )
MsgDots.MouseButton1Click:(()
()
(Menu)
(Menu, (), ()
()
target = SelectedChannel
target (target)
.(()
(() target:(data.original) )
)
(())
)
(Menu, (), ()
()
(data.usernameReal data.displayName )
)
(Menu, (), ()
()
(data.original)
)
authorId = (data.userId)
authorId authorId ~= LP.UserId
authorPlayer = Players:(authorId)
authorPlayer
currentHighlight = Workspace:()
isHighlighted = currentHighlight currentHighlight.Adornee == authorPlayer.Character
(Menu, (isHighlighted ), ()
()
oldHighlight = Workspace:()
oldHighlight oldHighlight.Adornee == authorPlayer.Character
oldHighlight:()
(())
character = authorPlayer.Character
character character.Parent
(())
oldHighlight oldHighlight:()
highlight = .()
highlight.Name =
highlight.Adornee = character
highlight.FillColor = (authorId)
highlight.OutlineColor = C.BorderLight
highlight.FillTransparency =
highlight.OutlineTransparency =
highlight.DepthMode = .HighlightDepthMode.Occluded
highlight.Parent = Workspace
(.((), authorPlayer.Name))
)
(Menu, (), ()
()
authorPlayer authorPlayer == LP authorPlayer.Parent ~= Players
(())
targetCharacter = authorPlayer.Character
targetRoot = targetCharacter targetCharacter:()
targetCharacter targetRoot targetRoot:()
()
localCharacter = LP.Character
localHumanoid = localCharacter localCharacter:()
localRoot = localCharacter localCharacter:()
localCharacter localHumanoid localRoot localRoot:()
(())
ok, err = (()
localCharacter:(targetRoot.CFrame * .(, , ))
)
ok
(.((), authorPlayer.Name), )
( .. (err))
(())
)
(Menu, () .. , ()
(Menu)
(Menu, (), () , )
forwardChannels = {}
channel (Channels)
.(forwardChannels, channel)
.(forwardChannels, (a, b)
(a.Name):() < (b.Name):()
)
_, channelRef (forwardChannels)
targetChannel = channelRef
channelLabelName = (targetChannel)
(Menu, .. channelLabelName, ()
()
.(()
canSend = (targetChannel)
canSend
( .. channelLabelName .. )
ok, result = (()
targetChannel:(data.original)
)
ok
( .. targetChannel:() .. .. (result))
( .. channelLabelName)
status = GetSendStatusName (result)
( .. targetChannel:() .. .. (status))
status ==
( .. channelLabelName)
( .. channelLabelName .. .. (status) .. )
)
, )
)
(Menu, MsgDots)
()
)
data.userId
(data.userId, (realName)
data.usernameReal = realName
Name Name.Parent
currentDisplay = data.displayName realName
currentDisplay ~= realName
Name.Text = currentDisplay .. .. realName ..
Name.Text = realName
)
(channel)
Channels[channel]
SelectedChannel = channel
()
()
transitionId = ()
history = (channel)
transitionId ~= VisualTransitionId SelectedChannel ~= channel Channels[channel]
EmptyLabel.Text = #history == ()
EmptyLabel.Visible = #history ==
_, data (history)
(data, )
.(()
SelectedChannel == channel
Scroll.CanvasPosition = .(, .(, Scroll.AbsoluteCanvasSize.Y))
)
(channel)
(channel)
Channels[channel]
Channels[channel] =
(channel)
Button = (, {
Size = .(, ),
BackgroundColor3 = C.GoldBgUnselected,
BackgroundTransparency = ,
BorderSizePixel = ,
Text = (channel),
TextColor3 = .(, , ),
TextTransparency = ,
TextSize = ,
Font = .Font.GothamBlack,
AutoButtonColor =
}, Tabs)
(Button, )
Button:(, )
GoldenHalo = (, {
Name = ,
AnchorPoint = .(, ),
Position = .(, ),
Size = .(, , , ),
BackgroundTransparency = ,
Image = ,
ImageColor3 = C.GoldMid,
ImageTransparency = ,
ScaleType = .ScaleType.Slice,
SliceCenter = Rect.(, , , ),
ZIndex = Button.ZIndex -
}, Button)
GoldTextGrad = (, {
Color = ColorSequence.({
ColorSequenceKeypoint.(, C.GoldBright),
ColorSequenceKeypoint.(, C.GoldMid),
ColorSequenceKeypoint.(, C.GoldDeep)
}),
Rotation =
}, Button)
.(GoldTabGradients, GoldTextGrad)
TabButtons[channel] = Button
(Button, , { BackgroundTransparency = , TextTransparency = })
(GoldenHalo, , { ImageTransparency = })
Button.MouseEnter:(()
SelectedChannel ~= channel
(Button, , { BackgroundColor3 = .(, , ), BackgroundTransparency = })
GoldenHalo (GoldenHalo, , { ImageTransparency = })
)
Button.MouseLeave:(()
SelectedChannel ~= channel
(Button, , { BackgroundColor3 = C.GoldBgUnselected, BackgroundTransparency = })
GoldenHalo (GoldenHalo, , { ImageTransparency = })
)
Button.MouseButton1Click:(() (channel) )
SelectedChannel
(channel)
()
(channel)
Channels[channel]
button = TabButtons[channel]
halo = button button:()
button
(button, , { BackgroundTransparency = , TextTransparency = })
halo (halo, , { ImageTransparency = })
.(, ()
Channels[channel] ==
button button.Parent button:()
)
Channels[channel] =
History[channel] =
TabButtons[channel] =
TargetChannelsOverride[channel] =
SelectedChannel == channel
SelectedChannel =
other (Channels)
(other)
SelectedChannel
.(()
()
SelectedChannel
EmptyLabel.Text = ()
EmptyLabel.Visible =
)
()
()
found = {}
_, channel (TextChannels:())
(channel)
found[channel] =
(channel)
_, channel (TextChannels:())
(channel)
found[channel] =
(channel)
channel (Channels)
found[channel] channel.Parent (channel)
(channel)
()
(TextChannels.DescendantAdded:((channel)
.(()
(channel) (channel)
)
))
(TextChannels.DescendantRemoving:((channel)
(channel)
))
.(()
GUI.Parent
.(Config.ScanInterval)
GUI.Parent
()
)
SeenMessageIds = {}
SeenMessageOrder = {}
MAX_SEEN_MESSAGE_IDS =
(message)
message
messageId = message.MessageId
messageId messageId ~=
SeenMessageIds[messageId]
SeenMessageIds[messageId] =
.(SeenMessageOrder, messageId)
#SeenMessageOrder > MAX_SEEN_MESSAGE_IDS
expiredId = .(SeenMessageOrder, )
SeenMessageIds[expiredId] =
channel = message.TextChannel
channel (channel)
Channels[channel]
(channel)
original = message.Text
original original ==
source = message.TextSource
userId = source source.UserId
player = userId Players:(userId)
displayName, usernameReal
player
displayName = player.DisplayName
usernameReal = player.Name
userId
displayName = (userId)
usernameReal = (userId)
displayName = ()
usernameReal = ()
data = {
displayName = displayName,
username = displayName,
usernameReal = usernameReal,
userId = userId,
original = original,
avatar = userId (userId) ,
channel = channel.Name,
date = .(),
time = .(),
timestamp = .()
}
history = (channel)
.(history, data)
#history > Config.MaxMessages
expired = .(history, )
expired expired._uiRow
(expired._uiRow, )
expired._uiRow =
SelectedChannel == channel
EmptyLabel.Visible =
(data, )
.(()
Scroll.CanvasPosition = .(, .(, Scroll.AbsoluteCanvasSize.Y))
)
(TCS.MessageReceived:(HandleIncomingMessage))
IsSending =
SINGLE_SEND_GUARD_SECONDS =
LastSingleSendKey =
LastSingleSendAt =
SEND_INTERVAL_SECONDS =
()
targets = {}
invalidTargets = {}
seen = {}
hasExplicitSelection =
channel, active (TargetChannelsOverride)
active
hasExplicitSelection =
channel seen[channel]
seen[channel] =
(channel)
.(targets, channel)
.(invalidTargets, channel)
hasExplicitSelection #targets == #invalidTargets ==
SelectedChannel
(SelectedChannel)
.(targets, SelectedChannel)
.(invalidTargets, SelectedChannel)
(a, b)
(a.Name):() < (b.Name):()
.(targets, byName)
.(invalidTargets, byName)
targets, hasExplicitSelection, invalidTargets
GetSendStatusName = (result)
result
ok, status = (() result.Status )
ok status
status.Name
(targetChannel, messageText)
ok, result = (()
targetChannel:(messageText)
)
ok
( .. targetChannel:() .. .. (result))
,
statusName = (result)
( .. targetChannel:() .. .. (statusName))
statusName ~=
, statusName
,
()
IsSending
value = Input.Text
value value:()
repeatCount = .((SendRepeatCount) )
repeatCount = .(repeatCount, , )
targets, hasExplicitSelection, invalidTargets = ()
#invalidTargets >
names = {}
_, channel (invalidTargets)
.(names, (channel.Name))
(.((), .(names, )))
#targets ==
hasExplicitSelection
()
(())
targetNames = {}
_, channel (targets)
.(targetNames, channel:())
( .. (#targetNames > .(targetNames, ) ))
sendKey = value .. .. .(targetNames, )
now = .()
repeatCount == sendKey == LastSingleSendKey
(now - LastSingleSendAt) < SINGLE_SEND_GUARD_SECONDS
Input.Text =
repeatCount ==
LastSingleSendKey = sendKey
LastSingleSendAt = now
IsSending =
Input.Text =
.(()
sentCount =
failureReason =
isCommand = value:(, ) ==
ok, unexpectedError = (()
isCommand
commandChannel = SelectedChannel
commandChannel (commandChannel)
commandChannel = targets[]
commandChannel (commandChannel)
failureReason =
commandOk, commandResult = (()
commandChannel:(value)
)
commandOk
failureReason =
statusName = (commandResult)
statusName ~=
failureReason = statusName
repetition = , repeatCount
_, targetChannel (targets)
(targetChannel)
failureReason =
sent, statusName = (targetChannel, value)
sent
failureReason = statusName
sentCount +=
repetition < repeatCount targetChannel ~= targets[#targets]
.(SEND_INTERVAL_SECONDS)
failureReason
, (err)
(err)
)
ok
warn("[REX TextService] SendMessage error: " .. tostring(unexpectedError))
failureReason = "Error"
end
-- Liberar el bloqueo ANTES de notificar: un fallo en Notify nunca
-- puede dejar el cuadro de texto permanentemente bloqueado.
IsSending = false
if failureReason then
if failureReason == "Floodchecked" then
Notify(L("rateLimited"))
elseif failureReason == "InvalidTextChannelPermissions" then
Notify(L("channelUnavailable"))
else
Notify(L("sendError") .. " (" .. tostring(failureReason) .. ")")
end
elseif not isCommand then
Notify(string.format(L("acceptedCount"), tostring(sentCount)))
end
-- FocusLost libera el TextBox al pulsar Enter. Recuperamos el foco para
-- permitir escribir otro mensaje o comando sin tener que reabrirlo.
task.delay(0.2, function()
if GUI and GUI.Parent and Input and Input.Parent then
pcall(function() Input:CaptureFocus() end)
end
end)
end)
end
-- Una sola conexión para Enter.
if Environment.REXInputConnection then
Environment.REXInputConnection:Disconnect()
end
Environment.REXInputConnection = Track(Input.FocusLost:Connect(function(enterPressed)
if enterPressed then
SendMessage()
end
end))
-- Una sola conexión para la flecha.
SendBtn.MouseButton1Click:Connect(SendMessage)
--==================================================
-- SETTINGS MENU (3-DOTS MAIN MENU ⚙️ / ...)
--==================================================
local function FormatHistory()
local lines = {
"==================================================",
L("exportTitle"),
"==================================================",
"",
"Exported: " .. os.date("%Y-%m-%d %H:%M:%S"),
"Player: " .. LP.DisplayName .. " (@" .. LP.Name .. ")",
""
}
local channelList = {}
for channel in pairs(History) do table.insert(channelList, channel) end
table.sort(channelList, function(a, b) return GetChannelLabel(a):lower() < GetChannelLabel(b):lower() end)
local totalMessages = 0
for _, channel in ipairs(channelList) do
local messages = History[channel]
table.insert(lines, "")
table.insert(lines, "==================================================")
local channelLabelName = GetChannelLabel(channel)
table.insert(lines, L("channel") .. ": " .. channelLabelName)
table.insert(lines, "==================================================")
for index, data in ipairs(messages) do
totalMessages += 1
table.insert(lines, "")
table.insert(lines, "----------------------------------------")
table.insert(lines, L("messages") .. " #" .. index)
table.insert(lines, L("date") .. ": " .. tostring(data.date or "Unknown"))
table.insert(lines, L("time") .. ": " .. tostring(data.time or "Unknown"))
table.insert(lines, L("displayName") .. ": " .. tostring(data.displayName or "Unknown"))
table.insert(lines, L("username") .. ": @" .. tostring(data.usernameReal or data.username or "Unknown"))
table.insert(lines, L("message") .. ":")
table.insert(lines, tostring(data.original or ""))
table.insert(lines, "----------------------------------------")
end
end
table.insert(lines, "")
table.insert(lines, "==================================================")
table.insert(lines, "TOTAL MESSAGES: " .. totalMessages)
table.insert(lines, "TOTAL CHANNELS: " .. #channelList)
table.insert(lines, "==================================================")
return table.concat(lines, "\n")
end
BuildMenu = function()
ClearContainer(Menu)
local preset = GetCurrentFont()
local PreviewCard = New("Frame", {
Size = UDim2.new(1, 0, 0, 46),
BackgroundColor3 = C.Panel,
BorderSizePixel = 0,
ZIndex = 51
}, Menu)
Corner(PreviewCard, 7)
Stroke(PreviewCard, C.BorderLight, 0.9, 0.25)
local PreviewAvatar = New("ImageLabel", {
Position = UDim2.fromOffset(7, 7),
Size = UDim2.fromOffset(32, 32),
BackgroundColor3 = C.Input,
BorderSizePixel = 0,
Image = GetAvatar(LP.UserId),
ScaleType = Enum.ScaleType.Crop,
ZIndex = 52
}, PreviewCard)
Corner(PreviewAvatar, 50)
Stroke(PreviewAvatar, C.BorderLight, 1)
local previewText = LP.DisplayName .. " (@" .. LP.Name .. ")"
local PreviewLabel = Label(PreviewCard, previewText, 12, UserColor(LP.UserId), preset.bold)
PreviewLabel:SetAttribute("IsBold", true)
PreviewLabel.Position = UDim2.fromOffset(46, 0)
PreviewLabel.Size = UDim2.new(1, -52, 1, 0)
PreviewLabel.TextTruncate = Enum.TextTruncate.AtEnd
PreviewLabel.ZIndex = 52
MenuButton(Menu, L("copyHistory"), function()
CloseMenus()
local completeHistory = FormatHistory()
Clipboard(completeHistory)
end)
local langArrow = LanguageDropdownOpen and "v" or ">"
local currentLangName = Text[InterfaceLanguage] and Text[InterfaceLanguage].langLabel or InterfaceLanguage
MenuButton(Menu, L("interfaceLang") .. ": " .. currentLangName .. " " .. langArrow, function()
LanguageDropdownOpen = not LanguageDropdownOpen
if LanguageDropdownOpen then FontDropdownOpen = false end
BuildMenu()
task.defer(function() if Menu.Visible then PositionMenu(Menu, Dots) end end)
end)
if LanguageDropdownOpen then
for _, langKey in ipairs(LanguageOrder) do
local langInfo = Text[langKey]
local isCurrent = (InterfaceLanguage == langKey)
local btn = MenuButton(Menu, " " .. langInfo.langLabel, function()
InterfaceLanguage = langKey
LanguageDropdownOpen = false
BuildMenu()
task.defer(function() if Menu.Visible then PositionMenu(Menu, Dots) end end)
end, true, isCurrent)
if isCurrent then
btn.BackgroundColor3 = C.Selected
end
end
end
local fontArrow = FontDropdownOpen and "v" or ">"
MenuButton(Menu, L("fontSetting") .. ": " .. preset.id .. " " .. fontArrow, function()
FontDropdownOpen = not FontDropdownOpen
if FontDropdownOpen then LanguageDropdownOpen = false end
BuildMenu()
task.defer(function() if Menu.Visible then PositionMenu(Menu, Dots) end end)
end)
if FontDropdownOpen then
for index, fontInfo in ipairs(FontPresets) do
local isCurrent = (CurrentFontIndex == index)
local btn = MenuButton(Menu, " " .. fontInfo.label, function()
CurrentFontIndex = index
FontDropdownOpen = false
ApplySelectedFontEverywhere()
BuildMenu()
Notify(L("fontApplied") .. " (" .. fontInfo.id .. ")")
task.defer(function() if Menu.Visible then PositionMenu(Menu, Dots) end end)
end, true, isCurrent, fontInfo.bold)
if isCurrent then
btn.BackgroundColor3 = C.Selected
end
end
end
end
BuildMenu()
task.delay(1.0, function()
Notify(L("betaNotice"), 7)
end)
Dots.MouseButton1Click:Connect(function()
if Menu.Visible and not MenuClosing then
CloseMenus()
else
BuildMenu()
OpenMenu()
task.defer(function() if Menu.Visible then PositionMenu(Menu, Dots) end end)
end
end)
--==================================================
-- OUTSIDE CLICK CLOSING
--==================================================
local function PointInside(guiObject, point)
if not guiObject or not guiObject.Visible then return false end
local pos = guiObject.AbsolutePosition
local size = guiObject.AbsoluteSize
return point.X >= pos.X and point.X <= pos.X + size.X and point.Y >= pos.Y and point.Y <= pos.Y + size.Y
end
Track(UIS.InputBegan:Connect(function(input)
if input.UserInputType ~= Enum.UserInputType.MouseButton1 and input.UserInputType ~= Enum.UserInputType.Touch then return end
if not Menu.Visible then return end
local point = input.Position
local insideMenu = PointInside(Menu, point)
local insideDots = PointInside(Dots, point)
if not insideMenu and not insideDots then
CloseMenus()
end
end))
--==================================================
-- WINDOW MOVEMENT & RESIZE
--==================================================
local dragging, resizing = false, false
local dragInput, dragStart, startPosition
local resizeStart, startSize
local function Viewport()
return workspace.CurrentCamera and workspace.CurrentCamera.ViewportSize or Vector2.new(1280, 720)
end
local function ClampWindow()
local viewport = Viewport()
local width = math.clamp(Chat.AbsoluteSize.X, Config.MinWidth, math.min(Config.MaxWidth, viewport.X))
local height = math.clamp(Chat.AbsoluteSize.Y, Config.MinHeight, math.min(Config.MaxHeight, viewport.Y))
local x = math.clamp(Chat.AbsolutePosition.X, 0, math.max(0, viewport.X - width))
local y = math.clamp(Chat.AbsolutePosition.Y, 0, math.max(0, viewport.Y - height))
Chat.Size = UDim2.fromOffset(width, height)
Chat.Position = UDim2.fromOffset(x, y)
end
Track(Header.InputBegan:Connect(function(input)
if input.UserInputType ~= Enum.UserInputType.MouseButton1 and input.UserInputType ~= Enum.UserInputType.Touch then return end
dragging = true
resizing = false
dragStart = input.Position
startPosition = Chat.Position
dragInput = input
CloseMenus()
end))
Track(Resize.InputBegan:Connect(function(input)
if input.UserInputType ~= Enum.UserInputType.MouseButton1 and input.UserInputType ~= Enum.UserInputType.Touch then return end
resizing = true
dragging = false
resizeStart = input.Position
startSize = Chat.AbsoluteSize
dragInput = input
CloseMenus()
end))
Track(UIS.InputChanged:Connect(function(input)
if not dragInput then return end
local valid = input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch
if not valid then return end
if dragging then
local delta = input.Position - dragStart
Chat.Position = UDim2.fromOffset(startPosition.X.Offset + delta.X, startPosition.Y.Offset + delta.Y)
ClampWindow()
elseif resizing then
local delta = input.Position - resizeStart
local viewport = Viewport()
local maxWidth = math.max(Config.MinWidth, math.min(Config.MaxWidth, viewport.X - Chat.AbsolutePosition.X))
local maxHeight = math.max(Config.MinHeight, math.min(Config.MaxHeight, viewport.Y - Chat.AbsolutePosition.Y))
Chat.Size = UDim2.fromOffset(
math.clamp(startSize.X + delta.X, Config.MinWidth, maxWidth),
math.clamp(startSize.Y + delta.Y, Config.MinHeight, maxHeight)
)
end
end))
Track(UIS.InputEnded:Connect(function(input)
if input == dragInput then
dragging = false
resizing = false
dragInput = nil
end
end))
--==================================================
-- RESPONSIVE LAYOUT & SLASH KEY
--==================================================
Track(Chat:GetPropertyChangedSignal("AbsoluteSize"):Connect(function()
if not Chat or not Chat.Parent then return end
Scroll.Position = UDim2.fromOffset(0, 82)
Scroll.Size = UDim2.new(1, 0, 1, -132)
InputArea.Position = UDim2.new(0, 8, 1, -43)
InputArea.Size = UDim2.new(1, -16, 0, 35)
Resize.Position = UDim2.new(1, -3, 1, -3)
end))
Track(UIS.InputBegan:Connect(function(input, processed)
if processed then return end
if input.KeyCode == Enum.KeyCode.Slash then
Input:CaptureFocus()
end
end))
--==================================================
-- PLAYER CACHE
--==================================================
Track(Players.PlayerAdded:Connect(function(player)
UsernameCache[player.UserId] = player.Name
end))
for _, player in ipairs(Players:GetPlayers()) do
UsernameCache[player.UserId] = player.Name
end
--==================================================
-- ANIMATED EPIC GRADIENTS & GOLDEN HALO LOOP
--==================================================
local animTime = 0
Track(RunService.Heartbeat:Connect(function(dt)
if not GUI or not GUI.Parent then return end
animTime += dt
ChatBgGrad.Rotation = (135 + math.sin(animTime * 0.65) * 45) % 360
ChatBgGrad.Offset = Vector2.new(math.sin(animTime * 0.55) * 0.18, math.cos(animTime * 0.45) * 0.18)
ChatStrokeGrad.Rotation = (animTime * 55) % 360
local headerRot = math.sin(animTime * 0.8) * 18
HeaderGrad.Rotation = headerRot
HeaderBottomGrad.Rotation = headerRot
TitleGrad.Rotation = math.sin(animTime * 1.1) * 20
TitleGrad.Offset = Vector2.new(math.sin(animTime * 1.3) * 0.25, 0)
for idx = #GoldTabGradients, 1, -1 do
local grad = GoldTabGradients[idx]
if grad and grad.Parent then
grad.Offset = Vector2.new(math.sin(animTime * 2.2) * 0.35, 0)
grad.Rotation = math.sin(animTime * 1.5) * 12
else
table.remove(GoldTabGradients, idx)
end
end
if Menu and Menu.Visible then
MenuStrokeGrad.Rotation = (animTime * 75) % 360
MenuBgGrad.Rotation = (135 + math.cos(animTime * 0.7) * 35) % 360
end
end))
--==================================================
-- FINISHED
--==================================================
print("--------------------------------------")
print(" REX TextService BETA 11.2")
print("--------------------------------------")
print("Multi-channel diagnostics / bounded repeats / focus recovery / stable player colors")
print("--------------------------------------")
Notify(L("loaded"))REX TextService is a script that replaces Roblox's default chat system with its own enhanced version, offering significantly more features, functionality, and improvements than Roblox's original chat.

Universal