Skip to content

Instantly share code, notes, and snippets.

View BeboKhouja's full-sized avatar

BeboKhouja

View GitHub Profile
import java.util.*;
public class HasSameLetters {
public static boolean madeOutOfSameLetters(String a, String b) {
if (a == null) {
return b == null;
} else if (b == null) {
return false;
}
char[] left = a.toCharArray();
@BeboKhouja
BeboKhouja / ChatSender.Lua
Created January 24, 2023 03:32
To send messages via a textbox.
local Chat = game:GetService('Chat')
local Players = game:GetService('Players')
local Player = Players.LocalPlayer
script.Parent.FocusLost:Connect(function(enter) -- when the enter key is pressed
if enter then -- if the enter key is pressed
game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer(Chat:FilterStringAsync(script.Parent.Text, game:GetService('Players').LocalPlayer, game:GetService('Players').LocalPlayer), "All") -- Filters the string, sends it to chat.
end
end)