Guest User

all emotes

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