Advertisement
ERROR_CODE

Emotes

Aug 17th, 2023 (edited)
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 18.26 KB | None | 0 0
  1. game:GetService("StarterGui"):SetCore("SendNotification",{
  2.                 Title = "Tips!",
  3.                 Text = "Wait 1 - 15 seconds to show gui if it don't show try execute again",
  4.                  Duration = 0})
  5.  
  6. if game:GetService("CoreGui"):FindFirstChild("Emotes") then
  7.     game:GetService("CoreGui"):FindFirstChild("Emotes"):Destroy()
  8. end
  9.  
  10. local ContextActionService = game:GetService("ContextActionService")
  11. local HttpService = game:GetService("HttpService")
  12. local GuiService = game:GetService("GuiService")
  13. local CoreGui = game:GetService("CoreGui")
  14. local Open = Instance.new("TextButton")
  15. UICorner = Instance.new("UICorner")
  16. local MarketplaceService = game:GetService("MarketplaceService")
  17. local Players = game:GetService("Players")
  18. local StarterGui = game:GetService("StarterGui")
  19. local UserInputService = game:GetService("UserInputService")
  20.  
  21. local Emotes = {}
  22. local LoadedEmotes = {}
  23. local function AddEmote(name: string, id: IntValue, price: IntValue?)
  24.     LoadedEmotes[id] = false
  25.     task.spawn(function()
  26.         if not (name and id) then
  27.             return
  28.         end
  29.         local success, date = pcall(function()
  30.             local info = MarketplaceService:GetProductInfo(id)
  31.             local updated = info.Updated
  32.             return DateTime.fromIsoDate(updated):ToUniversalTime()
  33.         end)
  34.         if not success then
  35.             task.wait(10)
  36.             AddEmote(name, id, price)
  37.             return
  38.         end
  39.         local unix = os.time({
  40.             year = date.Year,
  41.             month = date.Month,
  42.             day = date.Day,
  43.             hour = date.Hour,
  44.             min = date.Minute,
  45.             sec = date.Second
  46.         })
  47.         LoadedEmotes[id] = true
  48.         table.insert(Emotes, {
  49.             ["name"] = name,
  50.             ["id"] = id,
  51.             ["icon"] = "rbxthumb://type=Asset&id=".. id .."&w=150&h=150",
  52.             ["price"] = price or 0,
  53.             ["lastupdated"] = unix,
  54.             ["sort"] = {}
  55.         })
  56.     end)
  57. end
  58. local CurrentSort = "recentfirst"
  59.  
  60. local FavoriteOff = "rbxassetid://10651060677"
  61. local FavoriteOn = "rbxassetid://10651061109"
  62. local FavoritedEmotes = {}
  63.  
  64. local ScreenGui = Instance.new("ScreenGui")
  65. ScreenGui.Name = "Emotes"
  66. ScreenGui.DisplayOrder = 2
  67. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  68. ScreenGui.Enabled = true
  69.  
  70. local BackFrame = Instance.new("Frame")
  71. BackFrame.Size = UDim2.new(0.9, 0, 0.5, 0)
  72. BackFrame.AnchorPoint = Vector2.new(0.5, 0.5)
  73. BackFrame.Position = UDim2.new(0.5, 0, 0.5, 0)
  74. BackFrame.SizeConstraint = Enum.SizeConstraint.RelativeYY
  75. BackFrame.BackgroundTransparency = 1
  76. BackFrame.BorderSizePixel = 0
  77. BackFrame.Parent = ScreenGui
  78.  
  79. Open.Name = "Open"
  80. Open.Parent = ScreenGui
  81. Open.Draggable = true
  82. Open.Size = UDim2.new(0.05,0,0.114,0)
  83. Open.Position = UDim2.new(0.05, 0, 0.25, 0)
  84. Open.Text = "Close"
  85. Open.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  86. Open.TextColor3 = Color3.fromRGB(255, 255, 255)
  87. Open.TextScaled = true
  88. Open.TextSize = 20
  89. Open.Visible = true
  90. Open.BackgroundTransparency = .5
  91. Open.MouseButton1Up:Connect(function()
  92. if Open.Text == "Open" then
  93.         Open.Text = "Close"
  94.         BackFrame.Visible = true
  95. else
  96.         if Open.Text == "Close" then
  97.             Open.Text = "Open"
  98.             BackFrame.Visible = false
  99.         end
  100. end
  101. end)
  102.  
  103. UICorner.Name = "UICorner"
  104. UICorner.Parent = Open
  105. UICorner.CornerRadius = UDim.new(1, 0)
  106.  
  107. local EmoteName = Instance.new("TextLabel")
  108. EmoteName.Name = "EmoteName"
  109. EmoteName.TextScaled = true
  110. EmoteName.AnchorPoint = Vector2.new(0.5, 0.5)
  111. EmoteName.Position = UDim2.new(-0.1, 0, 0.5, 0)
  112. EmoteName.Size = UDim2.new(0.2, 0, 0.2, 0)
  113. EmoteName.SizeConstraint = Enum.SizeConstraint.RelativeYY
  114. EmoteName.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  115. EmoteName.TextColor3 = Color3.new(1, 1, 1)
  116. EmoteName.BorderSizePixel = 0
  117. EmoteName.Parent = BackFrame
  118.  
  119. local Corner = Instance.new("UICorner")
  120. Corner.Parent = EmoteName
  121.  
  122. local Loading = Instance.new("TextLabel", BackFrame)
  123. Loading.AnchorPoint = Vector2.new(0.5, 0.5)
  124. Loading.Text = "Loading..."
  125. Loading.TextColor3 = Color3.new(1, 1, 1)
  126. Loading.BackgroundColor3 = Color3.new(0, 0, 0)
  127. Loading.TextScaled = true
  128. Loading.BackgroundTransparency = 0.5
  129. Loading.Size = UDim2.fromScale(0.2, 0.1)
  130. Loading.Position = UDim2.fromScale(0.5, 0.2)
  131. Corner:Clone().Parent = Loading
  132.  
  133. local Frame = Instance.new("ScrollingFrame")
  134. Frame.Size = UDim2.new(1, 0, 1, 0)
  135. Frame.CanvasSize = UDim2.new(0, 0, 0, 0)
  136. Frame.AutomaticCanvasSize = Enum.AutomaticSize.Y
  137. Frame.ScrollingDirection = Enum.ScrollingDirection.Y
  138. Frame.AnchorPoint = Vector2.new(0.5, 0.5)
  139. Frame.Position = UDim2.new(0.5, 0, 0.5, 0)
  140. Frame.BackgroundTransparency = 1
  141. Frame.ScrollBarThickness = 5
  142. Frame.BorderSizePixel = 0
  143. Frame.MouseLeave:Connect(function()
  144.     EmoteName.Text = "Select an Emote"
  145. end)
  146. Frame.Parent = BackFrame
  147.  
  148. local Grid = Instance.new("UIGridLayout")
  149. Grid.CellSize = UDim2.new(0.105, 0, 0, 0)
  150. Grid.CellPadding = UDim2.new(0.006, 0, 0.006, 0)
  151. Grid.SortOrder = Enum.SortOrder.LayoutOrder
  152. Grid.Parent = Frame
  153.  
  154. local SortFrame = Instance.new("Frame")
  155. SortFrame.Visible = false
  156. SortFrame.BorderSizePixel = 0
  157. SortFrame.Position = UDim2.new(1, 5, -0.125, 0)
  158. SortFrame.Size = UDim2.new(0.2, 0, 0, 0)
  159. SortFrame.AutomaticSize = Enum.AutomaticSize.Y
  160. SortFrame.BackgroundTransparency = 1
  161. Corner:Clone().Parent = SortFrame
  162. SortFrame.Parent = BackFrame
  163.  
  164. local SortList = Instance.new("UIListLayout")
  165. SortList.Padding = UDim.new(0.02, 0)
  166. SortList.HorizontalAlignment = Enum.HorizontalAlignment.Center
  167. SortList.VerticalAlignment = Enum.VerticalAlignment.Top
  168. SortList.SortOrder = Enum.SortOrder.LayoutOrder
  169. SortList.Parent = SortFrame
  170.  
  171. local function SortEmotes()
  172.     for i,Emote in pairs(Emotes) do
  173.         local EmoteButton = Frame:FindFirstChild(Emote.id)
  174.         if not EmoteButton then
  175.             continue
  176.         end
  177.         local IsFavorited = table.find(FavoritedEmotes, Emote.id)
  178.         EmoteButton.LayoutOrder = Emote.sort[CurrentSort] + ((IsFavorited and 0) or #Emotes)
  179.         EmoteButton.number.Text = Emote.sort[CurrentSort]
  180.     end
  181. end
  182.  
  183. local function createsort(order, text, sort)
  184.     local CreatedSort = Instance.new("TextButton")
  185.     CreatedSort.SizeConstraint = Enum.SizeConstraint.RelativeXX
  186.     CreatedSort.Size = UDim2.new(1, 0, 0.2, 0)
  187.     CreatedSort.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  188.     CreatedSort.LayoutOrder = order
  189.     CreatedSort.TextColor3 = Color3.new(1, 1, 1)
  190.     CreatedSort.Text = text
  191.     CreatedSort.TextScaled = true
  192.     CreatedSort.BorderSizePixel = 0
  193.     Corner:Clone().Parent = CreatedSort
  194.     CreatedSort.Parent = SortFrame
  195.     CreatedSort.MouseButton1Click:Connect(function()
  196.         SortFrame.Visible = false
  197.         Open.Text = "Open"
  198.         CurrentSort = sort
  199.         SortEmotes()
  200.     end)
  201.     return CreatedSort
  202. end
  203.  
  204. createsort(1, "Recently Updated First", "recentfirst")
  205. createsort(2, "Recently Updated Last", "recentlast")
  206. createsort(3, "Alphabetically First", "alphabeticfirst")
  207. createsort(4, "Alphabetically Last", "alphabeticlast")
  208. createsort(5, "Highest Price", "highestprice")
  209. createsort(6, "Lowest Price", "lowestprice")
  210.  
  211. local SortButton = Instance.new("TextButton")
  212. SortButton.BorderSizePixel = 0
  213. SortButton.AnchorPoint = Vector2.new(0.5, 0.5)
  214. SortButton.Position = UDim2.new(0.925, -5, -0.075, 0)
  215. SortButton.Size = UDim2.new(0.15, 0, 0.1, 0)
  216. SortButton.TextScaled = true
  217. SortButton.TextColor3 = Color3.new(1, 1, 1)
  218. SortButton.BackgroundColor3 = Color3.new(0, 0, 0)
  219. SortButton.BackgroundTransparency = 0.3
  220. SortButton.Text = "Sort"
  221. SortButton.MouseButton1Click:Connect(function()
  222.     SortFrame.Visible = not SortFrame.Visible
  223.     Open.Text = "Open"
  224. end)
  225. Corner:Clone().Parent = SortButton
  226. SortButton.Parent = BackFrame
  227.  
  228. local CloseButton = Instance.new("TextButton")
  229. CloseButton.BorderSizePixel = 0
  230. CloseButton.AnchorPoint = Vector2.new(0.5, 0.5)
  231. CloseButton.Position = UDim2.new(0.075, 0, -0.075, 0)
  232. CloseButton.Size = UDim2.new(0.15, 0, 0.1, 0)
  233. CloseButton.TextScaled = true
  234. CloseButton.TextColor3 = Color3.new(1, 1, 1)
  235. CloseButton.BackgroundColor3 = Color3.new(0.5, 0, 0)
  236. CloseButton.BackgroundTransparency = 0.3
  237. CloseButton.Text = "Kill Gui"
  238. CloseButton.MouseButton1Click:Connect(function()
  239.     ScreenGui:Destroy()
  240. end)
  241. Corner:Clone().Parent = CloseButton
  242. CloseButton.Parent = BackFrame
  243.  
  244. local SearchBar = Instance.new("TextBox")
  245. SearchBar.BorderSizePixel = 0
  246. SearchBar.AnchorPoint = Vector2.new(0.5, 0.5)
  247. SearchBar.Position = UDim2.new(0.5, 0, -0.075, 0)
  248. SearchBar.Size = UDim2.new(0.55, 0, 0.1, 0)
  249. SearchBar.TextScaled = true
  250. SearchBar.PlaceholderText = "Search"
  251. SearchBar.TextColor3 = Color3.new(1, 1, 1)
  252. SearchBar.BackgroundColor3 = Color3.new(0, 0, 0)
  253. SearchBar.BackgroundTransparency = 0.3
  254. SearchBar:GetPropertyChangedSignal("Text"):Connect(function()
  255.     local text = SearchBar.Text:lower()
  256.     local buttons = Frame:GetChildren()
  257.     if text ~= text:sub(1,50) then
  258.         SearchBar.Text = SearchBar.Text:sub(1,50)
  259.         text = SearchBar.Text:lower()
  260.     end
  261.     if text ~= ""  then
  262.         for i,button in pairs(buttons) do
  263.             if button:IsA("GuiButton") then
  264.                 local name = button:GetAttribute("name"):lower()
  265.                 if name:match(text) then
  266.                     button.Visible = true
  267.                 else
  268.                     button.Visible = false
  269.                 end
  270.             end
  271.         end
  272.     else
  273.         for i,button in pairs(buttons) do
  274.             if button:IsA("GuiButton") then
  275.                 button.Visible = true
  276.             end
  277.         end
  278.     end
  279. end)
  280. Corner:Clone().Parent = SearchBar
  281. SearchBar.Parent = BackFrame
  282.  
  283. local function openemotes(name, state, input)
  284.     if state == Enum.UserInputState.Begin then
  285.         BackFrame.Visible = not BackFrame.Visible
  286.         Open.Text = "Open"
  287.     end
  288. end
  289.  
  290. ContextActionService:BindCoreActionAtPriority(
  291.     "Emote Menu",
  292.     openemotes,
  293.     true,
  294.     2001,
  295.     Enum.KeyCode.Comma
  296. )
  297.  
  298. local inputconnect
  299. ScreenGui:GetPropertyChangedSignal("Enabled"):Connect(function()
  300.     if BackFrame.Visible == false then
  301.         EmoteName.Text = "Select an Emote"
  302.         SearchBar.Text = ""
  303.         SortFrame.Visible = false
  304.         GuiService:SetEmotesMenuOpen(false)
  305.         inputconnect = UserInputService.InputBegan:Connect(function(input, processed)
  306.             if not processed then
  307.                 if input.UserInputType == Enum.UserInputType.MouseButton1 then
  308.                     BackFrame.Visible = false
  309.                     Open.Text = "Open"
  310.                 end
  311.             end
  312.         end)
  313.     else
  314.         inputconnect:Disconnect()
  315.     end
  316. end)
  317.  
  318. GuiService.EmotesMenuOpenChanged:Connect(function(isopen)
  319.     if isopen then
  320.         BackFrame.Visible = false
  321.         Open.Text = "Open"
  322.     end
  323. end)
  324.  
  325. GuiService.MenuOpened:Connect(function()
  326.     BackFrame.Visible = false
  327.     Open.Text = "Open"
  328. end)
  329.  
  330. if not game:IsLoaded() then
  331.     game.Loaded:Wait()
  332. end
  333.  
  334. --thanks inf yield
  335. local SynV3 = syn and DrawingImmediate
  336. if (not is_sirhurt_closure) and (not SynV3) and (syn and syn.protect_gui) then
  337.     syn.protect_gui(ScreenGui)
  338.     ScreenGui.Parent = CoreGui
  339. elseif get_hidden_gui or gethui then
  340.     local hiddenUI = get_hidden_gui or gethui
  341.     ScreenGui.Parent = hiddenUI()
  342. else
  343.     ScreenGui.Parent = CoreGui
  344. end
  345.  
  346. local function SendNotification(title, text)
  347.     if syn and syn.toast_notification then
  348.         syn.toast_notification({
  349.             Type = ToastType.Error,
  350.             Title = title,
  351.             Content = text
  352.         })
  353.     else
  354.         StarterGui:SetCore("SendNotification", {
  355.             Title = title,
  356.             Text = text
  357.         })
  358.     end
  359. end
  360.  
  361. local LocalPlayer = Players.LocalPlayer
  362.  
  363. local function PlayEmote(name: string, id: IntValue)
  364.     BackFrame.Visible = false
  365.     Open.Text = "Open"
  366.     SearchBar.Text = ""
  367.     local Humanoid = LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
  368.     local Description = Humanoid and Humanoid:FindFirstChildOfClass("HumanoidDescription")
  369.     if not Description then
  370.         return
  371.     end
  372.     if LocalPlayer.Character.Humanoid.RigType ~= Enum.HumanoidRigType.R6 then
  373.         local succ, err = pcall(function()
  374.             Humanoid:PlayEmoteAndGetAnimTrackById(id)
  375.         end)
  376.         if not succ then
  377.             Description:AddEmote(name, id)
  378.             Humanoid:PlayEmoteAndGetAnimTrackById(id)
  379.         end
  380.     else
  381.         SendNotification(
  382.             "r6? lol",
  383.             "you gotta be r15 dude"
  384.         )
  385.     end
  386. end
  387.  
  388. local function WaitForChildOfClass(parent, class)
  389.     local child = parent:FindFirstChildOfClass(class)
  390.     while not child or child.ClassName ~= class do
  391.         child = parent.ChildAdded:Wait()
  392.     end
  393.     return child
  394. end
  395.  
  396. local Cursor = ""
  397. while true do
  398.     local function Request()
  399.         local success, Response = pcall(function()
  400.             return game:HttpGetAsync("https://catalog.roblox.com/v1/search/items/details?Category=12&Subcategory=39&SortType=1&SortAggregation=&limit=30&IncludeNotForSale=true&cursor=".. Cursor)
  401.         end)
  402.         if not success then
  403.             task.wait(10)
  404.             return Request()
  405.         end
  406.         return Response
  407.     end
  408.     local Response = Request()
  409.     local Body = HttpService:JSONDecode(Response)
  410.     for i,v in pairs(Body.data) do
  411.         AddEmote(v.name, v.id, v.price)
  412.     end
  413.     if Body.nextPageCursor ~= nil then
  414.         Cursor = Body.nextPageCursor
  415.     else
  416.         break
  417.     end
  418. end
  419.  
  420. --unreleased emotes
  421. AddEmote("Arm Wave", 5915773155)
  422. AddEmote("Head Banging", 5915779725)
  423. AddEmote("Face Calisthenics", 9830731012)
  424.  
  425. --wait for emotes to finish loading
  426.  
  427. local function EmotesLoaded()
  428.     for i, loaded in pairs(LoadedEmotes) do
  429.         if not loaded then
  430.             return false
  431.         end
  432.     end
  433.     return true
  434. end
  435. while not EmotesLoaded() do
  436.     task.wait()
  437. end
  438. Loading:Destroy()
  439.  
  440. --sorting options setup
  441. table.sort(Emotes, function(a, b)
  442.     return a.lastupdated > b.lastupdated
  443. end)
  444. for i,v in pairs(Emotes) do
  445.     v.sort.recentfirst = i
  446. end
  447.  
  448. table.sort(Emotes, function(a, b)
  449.     return a.lastupdated < b.lastupdated
  450. end)
  451. for i,v in pairs(Emotes) do
  452.     v.sort.recentlast = i
  453. end
  454.  
  455. table.sort(Emotes, function(a, b)
  456.     return a.name:lower() < b.name:lower()
  457. end)
  458. for i,v in pairs(Emotes) do
  459.     v.sort.alphabeticfirst = i
  460. end
  461.  
  462. table.sort(Emotes, function(a, b)
  463.     return a.name:lower() > b.name:lower()
  464. end)
  465. for i,v in pairs(Emotes) do
  466.     v.sort.alphabeticlast = i
  467. end
  468.  
  469. table.sort(Emotes, function(a, b)
  470.     return a.price < b.price
  471. end)
  472. for i,v in pairs(Emotes) do
  473.     v.sort.lowestprice = i
  474. end
  475.  
  476. table.sort(Emotes, function(a, b)
  477.     return a.price > b.price
  478. end)
  479. for i,v in pairs(Emotes) do
  480.     v.sort.highestprice = i
  481. end
  482.  
  483. if isfile("FavoritedEmotes.txt") then
  484.     if not pcall(function()
  485.         FavoritedEmotes = HttpService:JSONDecode(readfile("FavoritedEmotes.txt"))
  486.     end) then
  487.         FavoritedEmotes = {}
  488.     end
  489. else
  490.     writefile("FavoritedEmotes.txt", HttpService:JSONEncode(FavoritedEmotes))
  491. end
  492.  
  493. local UpdatedFavorites = {}
  494. for i,name in pairs(FavoritedEmotes) do
  495.     if typeof(name) == "string" then
  496.         for i,emote in pairs(Emotes) do
  497.             if emote.name == name then
  498.                 table.insert(UpdatedFavorites, emote.id)
  499.                 break
  500.             end
  501.         end
  502.     end
  503. end
  504. if #UpdatedFavorites ~= 0 then
  505.     FavoritedEmotes = UpdatedFavorites
  506.     writefile("FavoritedEmotes.txt", HttpService:JSONEncode(FavoritedEmotes))
  507. end
  508.  
  509. local function CharacterAdded(Character)
  510.     for i,v in pairs(Frame:GetChildren()) do
  511.         if not v:IsA("UIGridLayout") then
  512.             v:Destroy()
  513.         end
  514.     end
  515.     local Humanoid = WaitForChildOfClass(Character, "Humanoid")
  516.     local Description = Humanoid:WaitForChild("HumanoidDescription", 5) or Instance.new("HumanoidDescription", Humanoid)
  517.     local random = Instance.new("TextButton")
  518.     local Ratio = Instance.new("UIAspectRatioConstraint")
  519.     Ratio.AspectType = Enum.AspectType.ScaleWithParentSize
  520.     Ratio.Parent = random
  521.     random.LayoutOrder = 0
  522.     random.TextColor3 = Color3.new(1, 1, 1)
  523.     random.BorderSizePixel = 0
  524.     random.BackgroundTransparency = 0.5
  525.     random.BackgroundColor3 = Color3.new(0, 0, 0)
  526.     random.TextScaled = true
  527.     random.Text = "Random"
  528.     random:SetAttribute("name", "")
  529.     Corner:Clone().Parent = random
  530.     random.MouseButton1Click:Connect(function()
  531.         local randomemote = Emotes[math.random(1, #Emotes)]
  532.         PlayEmote(randomemote.name, randomemote.id)
  533.     end)
  534.     random.MouseEnter:Connect(function()
  535.         EmoteName.Text = "Random"
  536.     end)
  537.     random.Parent = Frame
  538.     for i,Emote in pairs(Emotes) do
  539.         Description:AddEmote(Emote.name, Emote.id)
  540.         local EmoteButton = Instance.new("ImageButton")
  541.         local IsFavorited = table.find(FavoritedEmotes, Emote.id)
  542.         EmoteButton.LayoutOrder = Emote.sort[CurrentSort] + ((IsFavorited and 0) or #Emotes)
  543.         EmoteButton.Name = Emote.id
  544.         EmoteButton:SetAttribute("name", Emote.name)
  545.         Corner:Clone().Parent = EmoteButton
  546.         EmoteButton.Image = Emote.icon
  547.         EmoteButton.BackgroundTransparency = 0.5
  548.         EmoteButton.BackgroundColor3 = Color3.new(0, 0, 0)
  549.         EmoteButton.BorderSizePixel = 0
  550.         Ratio:Clone().Parent = EmoteButton
  551.         local EmoteNumber = Instance.new("TextLabel")
  552.         EmoteNumber.Name = "number"
  553.         EmoteNumber.TextScaled = true
  554.         EmoteNumber.BackgroundTransparency = 1
  555.         EmoteNumber.TextColor3 = Color3.new(1, 1, 1)
  556.         EmoteNumber.BorderSizePixel = 0
  557.         EmoteNumber.AnchorPoint = Vector2.new(0.5, 0.5)
  558.         EmoteNumber.Size = UDim2.new(0.2, 0, 0.2, 0)
  559.         EmoteNumber.Position = UDim2.new(0.1, 0, 0.9, 0)
  560.         EmoteNumber.Text = Emote.sort[CurrentSort]
  561.         EmoteNumber.TextXAlignment = Enum.TextXAlignment.Center
  562.         EmoteNumber.TextYAlignment = Enum.TextYAlignment.Center
  563.         local UIStroke = Instance.new("UIStroke")
  564.         UIStroke.Transparency = 0.5
  565.         UIStroke.Parent = EmoteNumber
  566.         EmoteNumber.Parent = EmoteButton
  567.         EmoteButton.Parent = Frame
  568.         EmoteButton.MouseButton1Click:Connect(function()
  569.             PlayEmote(Emote.name, Emote.id)
  570.         end)
  571.         EmoteButton.MouseEnter:Connect(function()
  572.             EmoteName.Text = Emote.name
  573.         end)
  574.         local Favorite = Instance.new("ImageButton")
  575.         Favorite.Name = "favorite"
  576.         if table.find(FavoritedEmotes, Emote.id) then
  577.             Favorite.Image = FavoriteOn
  578.         else
  579.             Favorite.Image = FavoriteOff
  580.         end
  581.         Favorite.AnchorPoint = Vector2.new(0.5, 0.5)
  582.         Favorite.Size = UDim2.new(0.2, 0, 0.2, 0)
  583.         Favorite.Position = UDim2.new(0.9, 0, 0.9, 0)
  584.         Favorite.BorderSizePixel = 0
  585.         Favorite.BackgroundTransparency = 1
  586.         Favorite.Parent = EmoteButton
  587.         Favorite.MouseButton1Click:Connect(function()
  588.             local index = table.find(FavoritedEmotes, Emote.id)
  589.             if index then
  590.                 table.remove(FavoritedEmotes, index)
  591.                 Favorite.Image = FavoriteOff
  592.                 EmoteButton.LayoutOrder = Emote.sort[CurrentSort] + #Emotes
  593.             else
  594.                 table.insert(FavoritedEmotes, Emote.id)
  595.                 Favorite.Image = FavoriteOn
  596.                 EmoteButton.LayoutOrder = Emote.sort[CurrentSort]
  597.             end
  598.             writefile("FavoritedEmotes.txt", HttpService:JSONEncode(FavoritedEmotes))
  599.         end)
  600.     end
  601.     for i=1,9 do
  602.         local EmoteButton = Instance.new("Frame")
  603.         EmoteButton.LayoutOrder = 2147483647
  604.         EmoteButton.Name = "filler"
  605.         EmoteButton.BackgroundTransparency = 1
  606.         EmoteButton.BorderSizePixel = 0
  607.         Ratio:Clone().Parent = EmoteButton
  608.         EmoteButton.Visible = true
  609.         EmoteButton.Parent = Frame
  610.         EmoteButton.MouseEnter:Connect(function()
  611.             EmoteName.Text = "Select an Emote"
  612.         end)
  613.     end
  614. end
  615.  
  616. if LocalPlayer.Character then
  617.     CharacterAdded(LocalPlayer.Character)
  618. end
  619. LocalPlayer.CharacterAdded:Connect(CharacterAdded)
  620.  
  621. wait(1)
  622.  
  623. game.CoreGui.Emotes.Enabled = true
  624.  
  625.  
  626.  
  627. game.Players.LocalPlayer.PlayerGui.ContextActionGui:Destroy()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement