Skip to content

Instantly share code, notes, and snippets.

@1923812371283127398123712893126793
Last active June 27, 2024 08:35
Show Gist options
  • Save 1923812371283127398123712893126793/a63525ae7874916ff947bd7ce18d3414 to your computer and use it in GitHub Desktop.
Save 1923812371283127398123712893126793/a63525ae7874916ff947bd7ce18d3414 to your computer and use it in GitHub Desktop.
Key = ">"
Chars = {
{Char = ":", Replace = "Д"},
{Char = "/", Replace = "П"},
{Char = "0", Replace = "零"},
{Char = "1", Replace = "一"},
{Char = "2", Replace = "二"},
{Char = "3", Replace = "三"},
{Char = "4", Replace = "四"},
{Char = "5", Replace = "五"},
{Char = "6", Replace = "六"},
{Char = "7", Replace = "七"},
{Char = "8", Replace = "八"},
{Char = "9", Replace = "九"},
{Char = "a", Replace = "К"},
{Char = "b", Replace = "У"},
{Char = "c", Replace = "Ф"},
{Char = "d", Replace = "Г"},
{Char = "e", Replace = "Ч"},
{Char = "f", Replace = "Б"},
{Char = "g", Replace = "Й"},
{Char = "h", Replace = "З"},
{Char = "i", Replace = "В"},
{Char = "j", Replace = "Ш"},
{Char = "k", Replace = "Ж"},
{Char = "l", Replace = "И"},
{Char = "m", Replace = "Л"},
{Char = "n", Replace = "Ю"},
{Char = "o", Replace = "Щ"},
{Char = "p", Replace = "Ц"},
{Char = "q", Replace = "Ы"},
{Char = "r", Replace = "Ь"},
{Char = "s", Replace = "Э"},
{Char = "t", Replace = "Я"},
{Char = "u", Replace = "Р"},
{Char = "v", Replace = "С"},
{Char = "w", Replace = "Н"},
{Char = "x", Replace = "М"},
}
check1 = false
check2 = false
if game:GetService("TextChatService").ChatVersion == Enum.ChatVersion.LegacyChatService then
check1 = true
end
if hookmetamethod then
check2 = true
end
function SendNotification(Title,Text)
game:GetService("StarterGui"):SetCore("SendNotification",{
Title = Title, -- Required
Text = Text, -- Required
Icon = "" -- Optional
})
end
if not check1 then
SendNotification("Incompatable game","Hacker chat only works with legacy chat")
return
end
if not check2 then
SendNotification("Incompatable executor","Hacker chat requires hookmetamethod")
return
end
ReplicatedStorage = game:GetService("ReplicatedStorage")
RunService = game:GetService("RunService")
Players = game:GetService("Players")
LocalPlayer = Players.LocalPlayer
ChatUi = LocalPlayer.PlayerGui.Chat.Frame
ChatBarParentFrame = ChatUi.ChatBarParentFrame
ChatBox = ChatBarParentFrame.Frame.BoxFrame.Frame
HackerChatEnabled = false
ChatBox.TextLabel.Text = "Click button on right to toggle hacker chat"
ChatBarParentFrame.Frame.Size = UDim2.new(.885,0,1)
ToggleButton = Instance.new("TextButton",ChatBarParentFrame)
ToggleButton.Size = UDim2.new(.11,0,1)
ToggleButton.AnchorPoint = Vector2.new(1,0)
ToggleButton.Position = UDim2.new(1,0,0)
ToggleButton.BorderSizePixel = 0
ToggleButton.BackgroundColor3 = Color3.new()
ToggleButton.TextColor3 = Color3.new(1,0,0)
ToggleButton.TextScaled = true
ToggleButton.Text = "H"
ToggleButton.Font = Enum.Font.Ubuntu
ToggleButton.FontFace.Weight = Enum.FontWeight.Bold
ToggleButton.MouseButton1Up:Connect(function()
HackerChatEnabled = not HackerChatEnabled
if HackerChatEnabled then do
ToggleButton.TextColor3 = Color3.new(0,1,0)
end else
ToggleButton.TextColor3 = Color3.new(1,0,0)
end
end)
RenderLoop = RunService.RenderStepped:Connect(function()
local Trans = ChatBarParentFrame.Frame.BackgroundTransparency
ToggleButton.BackgroundTransparency = Trans
ToggleButton.TextTransparency = Trans
end)
Bindable = ReplicatedStorage.DefaultChatSystemChatEvents.SayMessageRequest
local refs = {}
refs.__namecall = hookmetamethod(game, "__namecall", function(...)
local self = ...
local Args = {...}
local method = getnamecallmethod()
if self == Bindable and method == "FireServer" and HackerChatEnabled == true then
local Message = string.lower(Args[2])
for i,v in Chars do
Message = Message:gsub(v.Char, v.Replace)
end
return refs.__namecall(Args[1],Key..Message,Args[3])
end
return refs.__namecall(...)
end)
function Convert(Object)
if not Object:IsA("TextLabel") then return end
if string.match(Object.Text,Key) then
Object.TextColor3 = Color3.new(1,0,0)
local Message = Object.Text:gsub(Key,"")
for i,v in Chars do
Message = Message:gsub(v.Replace, v.Char)
end
Object.Text = Message
end
end
LocalPlayer.PlayerGui.BubbleChat.DescendantAdded:Connect(Convert)
game:GetService("CoreGui").BubbleChat.DescendantAdded:Connect(Convert)
ChatUi.ChatChannelParentFrame.Frame_MessageLogDisplay.Scroller.DescendantAdded:Connect(function(Object)
if not Object:IsA("TextLabel") then return end
if string.match(Object.Text,Key) then
Object.Text = ""
Object:GetPropertyChangedSignal("Text"):Wait()
end
if string.match(Object.Text,"__") then
Object:GetPropertyChangedSignal("Text"):Wait()
end
Convert(Object)
end)
SendNotification("\72\97\99\107\101\114\32\67\104\97\116\32\76\111\97\100\101\100","\83\99\114\105\112\116\101\100\32\98\121\32\66\117\114\103\117\110\100\121\40\56\48\48\48\45\50\48\41")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment