Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Destroy if Duplicate
- if game:WaitForChild("Players").LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("Chat"):WaitForChild("Frame"):FindFirstChild("EmojiSelector") then
- game.Players.LocalPlayer.PlayerGui.Chat.Frame.EmojiSelector:Destroy()
- end
- -- Upgraded Emoji Chat by JustToSeePosts Modified by Overpower HUB
- -- Settings --
- autoFinish = false
- autoReplace = true -- keep dis on bru
- aliases = {}
- autoCompleteKey = Enum.KeyCode.F7
- down = Enum.KeyCode.F6
- up = Enum.KeyCode.F8
- loop = 0.05
- spaceAfterEmoji = true
- searchFunc = function(Str1, Str2)
- return string.match(Str1,Str2)
- -- Use
- --return string.sub(Str1, 1, #Str2) == Str2
- -- If you want to do startsWith
- end
- -- End Settings --
- local EmojiSelector = Instance.new("Frame")
- local Frame = Instance.new("Frame")
- local Emoji = Instance.new("TextLabel")
- local TextLabel = Instance.new("TextLabel")
- local ScrollingFrame = Instance.new("ScrollingFrame")
- local UIListLayout = Instance.new("UIListLayout")
- --Properties:
- EmojiSelector.Name = "EmojiSelector"
- EmojiSelector.Parent = game:WaitForChild("Players").LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("Chat"):WaitForChild("Frame")
- EmojiSelector.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- EmojiSelector.BackgroundTransparency = 0.600
- EmojiSelector.BorderSizePixel = 0
- EmojiSelector.ClipsDescendants = true
- EmojiSelector.Position = UDim2.new(1, 2, 0, 2)
- EmojiSelector.Size = UDim2.new(0.368219554, 0, 1, -46)
- Frame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- Frame.BackgroundTransparency = 1.000
- Frame.BorderSizePixel = 0
- Frame.Size = UDim2.new(1, -12, 0, 30)
- Emoji.Name = "Emoji"
- Emoji.Parent = Frame
- Emoji.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Emoji.BackgroundTransparency = 1.000
- Emoji.Size = UDim2.new(0, 30, 0, 30)
- Emoji.Font = Enum.Font.SourceSans
- Emoji.Text = "🍕"
- Emoji.TextColor3 = Color3.fromRGB(0, 0, 0)
- Emoji.TextScaled = true
- Emoji.TextSize = 14.000
- Emoji.TextWrapped = true
- TextLabel.Parent = Frame
- TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.BackgroundTransparency = 1.000
- TextLabel.Position = UDim2.new(0, 30, 0, 0)
- TextLabel.Size = UDim2.new(1, -30, 1, 0)
- TextLabel.Font = Enum.Font.SourceSans
- TextLabel.Text = "pizza"
- TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.TextScaled = true
- TextLabel.TextSize = 14.000
- TextLabel.TextWrapped = true
- ScrollingFrame.Parent = EmojiSelector
- ScrollingFrame.Active = true
- ScrollingFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- ScrollingFrame.BackgroundTransparency = 1.000
- ScrollingFrame.BorderSizePixel = 0
- ScrollingFrame.Size = UDim2.new(1, 0, 1, 0)
- ScrollingFrame.ScrollBarThickness = 7
- UIListLayout.Parent = ScrollingFrame
- UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
- UIListLayout.Padding = UDim.new(0, 5)
- -- Scripts:
- local function EOIJILT_fake_script() -- EmojiSelector.LocalScript
- local script = Instance.new('LocalScript', EmojiSelector)
- emogies = game:HttpGet("https://raw.githubusercontent.com/github/gemoji/master/db/emoji.json")
- emogies = game.HttpService:JSONDecode(emogies)
- status = "hidden"
- animating = false
- search = ""
- elements = {}
- selection = 1
- -- Build the emoji table
- emoji = {}
- for i,v in pairs(emogies) do
- for a,b in pairs(v.aliases) do
- emoji[b] = v.emoji
- end
- end
- for i,v in pairs(aliases) do
- if string.sub(v,1,1) == ":" then
- emoji[i] = emoji[string.sub(v,2,#v-1)]
- else
- emoji[i] = v
- end
- end
- function setCursor()
- script.Parent.Parent.ChatBarParentFrame.Frame.BoxFrame.Frame.ChatBar.CursorPosition = 5000000 -- bad way but it work
- if spaceAfterEmoji then
- script.Parent.Parent.ChatBarParentFrame.Frame.BoxFrame.Frame.ChatBar.Text = script.Parent.Parent.ChatBarParentFrame.Frame.BoxFrame.Frame.ChatBar.Text .. " "
- end
- end
- function hide()
- --script.Parent.ScrollingFrame.Visible = false
- script.Parent:TweenSize(UDim2.new(0, 0,1, -46), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.4)
- animating = true
- delay(0.4, function() animating = false end)
- status = "hidden"
- return
- end
- function show()
- script.Parent:TweenSize(UDim2.new(0.368, 0,1, -46), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.4)
- animating = true
- delay(0.4, function() animating = false end)
- status = "open"
- --script.Parent.ScrollingFrame.Visible = true
- return
- end
- function findEmoji(a)
- local results = 0
- local lastResult = nil
- for i,v in pairs(emoji) do
- if string.sub(i,1,#a) == a then
- results = results + 1
- lastResult = v
- end
- end
- if results == 1 then
- return lastResult
- else
- return a
- end
- end
- script.Parent.Size = UDim2.new(0, 0 , 1, -46)
- game:GetService("UserInputService").InputBegan:Connect(function(input)
- if #elements == 0 then return end
- if not pcall(function()string.reverse(string.match(string.reverse(a), ".-:"))end) then return end
- if input.KeyCode == up then
- elements[selection].BackgroundTransparency = 1
- selection = selection + 1
- selection = math.clamp(selection, 1, #elements)
- elements[selection].BackgroundTransparency = 0.8
- script.Parent.ScrollingFrame.CanvasPosition = Vector2.new(0, selection * 35 - 105)
- end
- if input.KeyCode == down then
- elements[selection].BackgroundTransparency = 1
- selection = selection - 1
- selection = math.clamp(selection, 1, #elements)
- elements[selection].BackgroundTransparency = 0.8
- script.Parent.ScrollingFrame.CanvasPosition = Vector2.new(0, selection * 35 - 105)
- end
- if input.KeyCode == autoCompleteKey then
- local a = script.Parent.Parent.ChatBarParentFrame.Frame.BoxFrame.Frame.ChatBar.Text
- local b = string.reverse(string.match(string.reverse(a), ".-:"))
- script.Parent.Parent.ChatBarParentFrame.Frame.BoxFrame.Frame.ChatBar.Text = string.gsub(a, b, ":"..elements[selection].TextLabel.Text..":")
- setCursor()
- end
- end)
- while wait(loop) do
- a = script.Parent.Parent.ChatBarParentFrame.Frame.BoxFrame.Frame.ChatBar.Text
- shouldOpen = false
- for i=0,#a do
- if string.sub(a,i, i) == ":" then
- shouldOpen = not shouldOpen
- end
- end
- if shouldOpen == true and status == "hidden" and not animating then
- show()
- end
- if shouldOpen == false and status == "open" and not animating then
- hide()
- end
- if shouldOpen == true then
- local b = string.reverse(string.match(string.reverse(a), ".-:"))
- if b ~= ":" and search ~= b then
- search = b
- script.Parent.ScrollingFrame.UIListLayout.Parent = script
- script.Parent.ScrollingFrame:ClearAllChildren()
- script.UIListLayout.Parent = script.Parent.ScrollingFrame
- b = string.sub(b,2)
- b = string.match(b, "[%d%a]+") or ""
- resultAmount = 0
- latestResultVal = nil
- elements = {}
- selection = 1
- for i,v in pairs(emoji) do
- if searchFunc(i, b) then
- MaClone = Frame:Clone()
- MaClone.Parent = ScrollingFrame
- MaClone.Emoji.Text = v
- MaClone.TextLabel.Text = i
- resultAmount = resultAmount+1
- latestResultVal = v
- table.insert(elements, MaClone)
- end
- end
- if resultAmount > 0 then
- elements[selection].BackgroundTransparency = 0.8
- end
- if resultAmount == 1 and autoFinish then
- script.Parent.Parent.ChatBarParentFrame.Frame.BoxFrame.Frame.ChatBar.Text = string.gsub(a, ":"..b, latestResultVal)
- setCursor()
- end
- end
- end
- if string.match(a, ":.-:") then
- script.Parent.Parent.ChatBarParentFrame.Frame.BoxFrame.Frame.ChatBar.Text = string.gsub(a, string.match(a, ":.-:"), emoji[string.sub(string.match(a, ":.-:"), 2, #string.match(a, ":.-:")-1)] or findEmoji(string.sub(string.match(a, ":.-:"), 2, #string.match(a, ":.-:")-1)))
- setCursor()
- end
- end
- end
- coroutine.wrap(EOIJILT_fake_script)()
- local function QMCU_fake_script() -- UIListLayout.LocalScript
- local script = Instance.new('LocalScript', UIListLayout)
- while wait() do
- script.Parent.Parent.CanvasSize = UDim2.new(0, script.Parent.AbsoluteContentSize.X, 0, script.Parent.AbsoluteContentSize.Y)
- end
- end
- coroutine.wrap(QMCU_fake_script)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement