EmojiCustomText
CustomEmojiText (CET) is a free to use, no-attribution module that allows you to take the Roblox’s TextLabel and TextButton objects to the next level by being able to type custom emoji’s in your text!
Creator store link:
https://create.roblox.com/store/asset/87170065017872/CustomEmojiText
Features
- Make your experience look more vibrant by adding (custom) emoji’s!
- Easily add emoji’s by using the ’ : ’ symbol , just like on Discord and many other platforms!
- More than 1500 emoji’s to use!
- Easy and intuitive
- To make usage even easier, the module is typed!
- Support for both TextLabels and TextButtons
- Add a maximum amount of symbols used!
License
Developers may use this module completely for free, and are not required to credit or otherwise refer to EmojiCustomText. The developer of this module is not responsible for any misuage of this module. If any problems occur, developers may notice the develop by sending a DM or respond to this post, and the develop will try to help you out.
Setting up CustomEmojiText
Installing CustomEmojiText is a very straightforward process. First, add CustomEmojiText to your Roblox inventory by clicking on the link at the very top of this post, then clicking on ‘Get Model’. Then, go into Studio, and paste the file into your place. Place the ‘CustomEmojiText’ module inside of ReplicatedStorage, and you’re good to go!
Information
How CET works
CET works very easily; in a LocalScript, you can create a CET TextLabel or TextButton by calling the .New(guiType) operator (guiType is a string, being whether TextLabel or TextButton). Just like with the regular object, you can easily change the properties of the custom class. An example:
local CustomEmojiText = require(ReplicatedStorage:WaitForChild("CustomEmojiText"))
local myTextLabelClass = CustomEmojiText.New("TextLabel")
myTextLabelClass.BackgroundTransparency = .9
myTextLabelClass.BackgroundColor3 = Color3.new(0.647059, 0.658824, 0.533333)
myTextLabelClass.TextColor3 = Color3.new(1, 1, 1)
myTextLabelClass.TextSize = 50
myTextLabelClass.Parent = LocalPlayer.PlayerGui:WaitForChild("ScreenGui")
Adding emojis is very easy as well. Just add 2 ’ : ’ symbols, with the name of the emoji in between. In the image for example:
myTextLabelClass.Text = "Look at the pretty emoji's :super_happy_face: in this text! :stone_noob: Isn't it cool? :joy:"
Setting up callbacks is somewhat different than with the regular GuiObject. This is the way to set up events:
local inputBeganConnection = myTextLabelClass:Connect("InputBegan", function()
print("InputBegan fired!")
end)
How to add custom emoji's?
Parented to the CustomEmojiText is a module script named ‘EmojiData’. Inside of this script, you can find a long list of emoji keybinds, settings, and a place to store your custom emoji IDs. You can add your own emoji’s in the same place as stone_noob and super_happy_face!
local EmojiData = {
Settings = {
MAX_SYMBOLS = nil; --Optional; if amount of symbols is unlimited, type 'nil'
};
Emojis = {
---- // Enter your custom emojis here (AspectRatio means the ratio between the X- and Y-axis; 2 means very wide, whereas 0.5 means a very narrow emoji) // ----
stone_noob = { Id = 9011713759, AspectRatio = 1 },
super_happy_face = { Id = 74286001482802, AspectRatio = 1 },
---------------------------------------------
---- // List of built-in emojis // ----
thinking = "🤔",
thinking_face = "🤔",
joy = "😂",
thumbsup = "👍",
...list goes on
}
return EmojiData
How to change the font
Changing the font of a GuiObject by script isn’t necessarily hard and has nothing do to with this specific module, but many people tend to get confused on how to do this. Therefore, I’ve decided to add a section on how to do this in this post!
The ‘FontFace’ property needs to be set to a Font object.
myTextLabelClass.FontFace = Font.fromEnum(Enum.Font.FredokaOne)
You can also paste the json font code in manually
myTextLabelClass.FontFace = Font.new("rbxasset://fonts/families/FredokaOne.json")
You can find more information on json font codes here:
Font | Documentation - Roblox Creator Hub
Documentation
Documentation
Here, you can find the documentation of the CET class.
Constructor:
New
CustomEmojiText.New(guiType: GuiType): CustomEmojiText
Used to create a new CET object. For all available GuiTypetypes, take a look at the top of the CustomEmojiText script. You can find them there.
Methods:
SetTextZIndex
CustomEmojiText:SetTextZIndex(zindex: number): ()
Function that sets the ZIndex of the text/emojis inside of the label.
WillTextFit
CustomEmojiText:WillTextFit(text: string): boolean
Function that returns whether the text will fit in the given class’s TextLabel
Connect
CustomEmojiText:Connect(connectionType: TextGuiEvent, func: (...any) -> ()): RBXScriptConnection
Connect method with a typed event string, for example, InputBegan. For all available TextGuiEvent types, take a look at the top of the CustomEmojiText script. You can find them there.
Destroy
CustomEmojiText:Destroy(): ()
Method that fully destroys the class, by removing the GuiObject with all of it’s descendants, and all of the connections that have been set up.
If you want specific information about the TextLabel/TextButton classes, you can find it here:
Link to Roblox’s TextLabel documentation:
https://create.roblox.com/docs/reference/engine/classes/TextLabel
Link to Roblox’s TextButton documentation:
TextButton | Documentation - Roblox Creator Hub
Notes
-KiriNini1234