-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEmote_Bypass_Script.lua
568 lines (518 loc) · 15.8 KB
/
Emote_Bypass_Script.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
local IsStudio = false
local ContextActionService = game:GetService("ContextActionService")
local HttpService = game:GetService("HttpService")
local GuiService = game:GetService("GuiService")
local CoreGui = game:GetService("CoreGui")
local AvatarEditorService = game:GetService("AvatarEditorService")
local Players = game:GetService("Players")
local StarterGui = game:GetService("StarterGui")
local UserInputService = game:GetService("UserInputService")
local Emotes = {}
local function AddEmote(name: string, id: IntValue, price: IntValue?)
if not (name and id) then
return
end
table.insert(Emotes, {
["name"] = name,
["id"] = id,
["icon"] = "rbxthumb://type=Asset&id=".. id .."&w=150&h=150",
["price"] = price or 0,
["index"] = #Emotes + 1,
["sort"] = {}
})
end
local CurrentSort = "newestfirst"
local FavoriteOff = "rbxassetid://10651060677"
local FavoriteOn = "rbxassetid://10651061109"
local FavoritedEmotes = {}
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "TEMPORARY_CONTAINER"
ScreenGui.DisplayOrder = 2
ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
ScreenGui.ResetOnSpawn = false
ScreenGui.Enabled = false
local BackFrame = Instance.new("Frame")
BackFrame.Size = UDim2.new(0.5, 0, 0.5, 0)
BackFrame.AnchorPoint = Vector2.new(1, 0.5)
BackFrame.Position = UDim2.new(0.4, 0, 0.5, 0)
BackFrame.SizeConstraint = Enum.SizeConstraint.RelativeYY
BackFrame.BackgroundTransparency = 1
BackFrame.BorderSizePixel = 0
BackFrame.Parent = ScreenGui
local EmoteName = Instance.new("TextLabel")
EmoteName.Name = "EmoteName"
EmoteName.TextScaled = true
EmoteName.AnchorPoint = Vector2.new(0.5, 0.5)
EmoteName.Position = UDim2.new(-0.1, 0, 0.5, 0)
EmoteName.Size = UDim2.new(0.2, 0, 0.2, 0)
EmoteName.SizeConstraint = Enum.SizeConstraint.RelativeYY
EmoteName.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
EmoteName.TextColor3 = Color3.new(1, 1, 1)
EmoteName.BorderSizePixel = 0
EmoteName.Parent = BackFrame
local Corner = Instance.new("UICorner")
Corner.Parent = EmoteName
local Loading = Instance.new("TextLabel", BackFrame)
Loading.AnchorPoint = Vector2.new(0.5, 0.5)
Loading.Text = "Loading..."
Loading.TextColor3 = Color3.new(1, 1, 1)
Loading.BackgroundColor3 = Color3.new(0, 0, 0)
Loading.TextScaled = true
Loading.BackgroundTransparency = 0.5
Loading.Size = UDim2.fromScale(0.2, 0.1)
Loading.Position = UDim2.fromScale(0.5, 0.2)
Corner:Clone().Parent = Loading
local Frame = Instance.new("ScrollingFrame")
Frame.Size = UDim2.new(1, 0, 1, 0)
Frame.CanvasSize = UDim2.new(0, 0, 0, 0)
Frame.AutomaticCanvasSize = Enum.AutomaticSize.Y
Frame.ScrollingDirection = Enum.ScrollingDirection.Y
Frame.AnchorPoint = Vector2.new(0.5, 0.5)
Frame.Position = UDim2.new(0.5, 0, 0.5, 0)
Frame.BackgroundTransparency = 1
Frame.ScrollBarThickness = 5
Frame.BorderSizePixel = 0
Frame.MouseLeave:Connect(function()
EmoteName.Text = "Select an Emote"
end)
Frame.Parent = BackFrame
local Grid = Instance.new("UIGridLayout")
Grid.CellSize = UDim2.new(0.199, 0, 0, 0)
Grid.CellPadding = UDim2.new(0.00, 0, 0.006, 0)
Grid.SortOrder = Enum.SortOrder.LayoutOrder
Grid.Parent = Frame
local SortFrame = Instance.new("Frame")
SortFrame.Visible = false
SortFrame.BorderSizePixel = 0
SortFrame.Position = UDim2.new(1, 5, -0.125, 0)
SortFrame.Size = UDim2.new(0.2, 0, 0, 0)
SortFrame.AutomaticSize = Enum.AutomaticSize.Y
SortFrame.BackgroundTransparency = 1
Corner:Clone().Parent = SortFrame
SortFrame.Parent = BackFrame
local SortList = Instance.new("UIListLayout")
SortList.Padding = UDim.new(0.02, 0)
SortList.HorizontalAlignment = Enum.HorizontalAlignment.Center
SortList.VerticalAlignment = Enum.VerticalAlignment.Top
SortList.SortOrder = Enum.SortOrder.LayoutOrder
SortList.Parent = SortFrame
local function SortEmotes()
for i,Emote in pairs(Emotes) do
local EmoteButton = Frame:FindFirstChild(Emote.id)
if not EmoteButton then
continue
end
local IsFavorited = table.find(FavoritedEmotes, Emote.id)
EmoteButton.LayoutOrder = Emote.sort[CurrentSort] + ((IsFavorited and 0) or #Emotes)
EmoteButton.number.Text = Emote.sort[CurrentSort]
end
end
local function createsort(order, text, sort)
local CreatedSort = Instance.new("TextButton")
CreatedSort.SizeConstraint = Enum.SizeConstraint.RelativeXX
CreatedSort.Size = UDim2.new(1, 0, 0.2, 0)
CreatedSort.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
CreatedSort.LayoutOrder = order
CreatedSort.TextColor3 = Color3.new(1, 1, 1)
CreatedSort.Text = text
CreatedSort.TextScaled = true
CreatedSort.BorderSizePixel = 0
Corner:Clone().Parent = CreatedSort
CreatedSort.Parent = SortFrame
CreatedSort.MouseButton1Click:Connect(function()
SortFrame.Visible = false
CurrentSort = sort
SortEmotes()
end)
return CreatedSort
end
createsort(1, "Newest First", "newestfirst")
createsort(2, "Oldest First", "oldestfirst")
createsort(3, "Alphabetically First", "alphabeticfirst")
createsort(4, "Alphabetically Last", "alphabeticlast")
createsort(5, "Highest Price", "highestprice")
createsort(6, "Lowest Price", "lowestprice")
local SortButton = Instance.new("TextButton")
SortButton.BorderSizePixel = 0
SortButton.AnchorPoint = Vector2.new(0.5, 0.5)
SortButton.Position = UDim2.new(0.925, -5, -0.075, 0)
SortButton.Size = UDim2.new(0.15, 0, 0.1, 0)
SortButton.TextScaled = true
SortButton.TextColor3 = Color3.new(1, 1, 1)
SortButton.BackgroundColor3 = Color3.new(1, 0, 0)
SortButton.BackgroundTransparency = 0.3
SortButton.Text = "Sort"
SortButton.MouseButton1Click:Connect(function()
SortFrame.Visible = not SortFrame.Visible
end)
Corner:Clone().Parent = SortButton
SortButton.Parent = BackFrame
local CloseButton = Instance.new("TextButton")
CloseButton.BorderSizePixel = 0
CloseButton.AnchorPoint = Vector2.new(0.5, 0.5)
CloseButton.Position = UDim2.new(0.075, 0, -0.075, 0)
CloseButton.Size = UDim2.new(0.15, 0, 0.1, 0)
CloseButton.TextScaled = true
CloseButton.TextColor3 = Color3.new(1, 1, 1)
CloseButton.BackgroundColor3 = Color3.new(27, 0, 0)
CloseButton.BackgroundTransparency = 0.3
CloseButton.Text = "Close"
CloseButton.MouseButton1Click:Connect(function()
ScreenGui.Enabled = false
end)
Corner:Clone().Parent = CloseButton
CloseButton.Parent = BackFrame
local SearchBar = Instance.new("TextBox")
SearchBar.BorderSizePixel = 0
SearchBar.AnchorPoint = Vector2.new(0.5, 0.5)
SearchBar.Position = UDim2.new(0.5, 0, -0.075, 0)
SearchBar.Size = UDim2.new(0.55, 0, 0.1, 0)
SearchBar.TextScaled = true
SearchBar.PlaceholderText = "Search"
SearchBar.TextColor3 = Color3.new(1, 1, 1)
SearchBar.BackgroundColor3 = Color3.new(0, 0, 0)
SearchBar.BackgroundTransparency = 0.3
SearchBar:GetPropertyChangedSignal("Text"):Connect(function()
local text = SearchBar.Text:lower()
local buttons = Frame:GetChildren()
if text ~= text:sub(1,50) then
SearchBar.Text = SearchBar.Text:sub(1,50)
text = SearchBar.Text:lower()
end
if text ~= "" then
for i,button in pairs(buttons) do
if button:IsA("GuiButton") then
local name = button:GetAttribute("name"):lower()
if name:match(text) then
button.Visible = false
else
button.Visible = false
end
end
end
else
for i,button in pairs(buttons) do
if button:IsA("GuiButton") then
button.Visible = false
end
end
end
end)
Corner:Clone().Parent = SearchBar
SearchBar.Parent = BackFrame
if not IsStudio then
GuiService.EmotesMenuOpenChanged:Connect(function(isopen)
if isopen then
ScreenGui.Enabled = false
end
end)
end
GuiService.MenuOpened:Connect(function()
ScreenGui.Enabled = false
end)
if not game:IsLoaded() then
game.Loaded:Wait()
end
local LocalPlayer = Players.LocalPlayer
if IsStudio then
ScreenGui.Parent = LocalPlayer:WaitForChild("PlayerGui")
else
ScreenGui.Parent = CoreGui
end
wait()
local function SendNotification(title, text)
if (not IsStudio) and syn and syn.toast_notification then
syn.toast_notification({
Type = ToastType.Error,
Title = title,
Content = text
})
else
StarterGui:SetCore("SendNotification", {
Title = title,
Text = text
})
end
end
local function HumanoidPlayEmote(humanoid, name, id)
if IsStudio then
return humanoid:PlayEmote(name)
else
return humanoid:PlayEmoteAndGetAnimTrackById(id)
end
end
local function PlayEmote(name: string, id: IntValue)
ScreenGui.Enabled = false
SearchBar.Text = ""
local Humanoid = LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
local Description = Humanoid and Humanoid:FindFirstChildOfClass("HumanoidDescription")
if not Description then
return
end
if LocalPlayer.Character.Humanoid.RigType ~= Enum.HumanoidRigType.R6 then
local succ, err = pcall(function()
HumanoidPlayEmote(Humanoid, name, id)
end)
if not succ then
Description:AddEmote(name, id)
HumanoidPlayEmote(Humanoid, name, id)
end
else
SendNotification(
"r6? lol",
"you gotta be r15 dude"
)
end
end
local function WaitForChildOfClass(parent, class)
local child = parent:FindFirstChildOfClass(class)
while not child or child.ClassName ~= class do
child = parent.ChildAdded:Wait()
end
return child
end
local params = CatalogSearchParams.new()
params.AssetTypes = {Enum.AvatarAssetType.EmoteAnimation}
params.SortType = Enum.CatalogSortType.RecentlyCreated
params.SortAggregation = Enum.CatalogSortAggregation.AllTime
params.IncludeOffSale = true
params.CreatorName = "Roblox"
params.Limit = 120
local function getCatalogPage()
local success, catalogPage = pcall(function()
return AvatarEditorService:SearchCatalog(params)
end)
if not success then
task.wait(5)
return getCatalogPage()
end
return catalogPage
end
local catalogPage = getCatalogPage()
local pages = {}
while true do
local currentPage = catalogPage:GetCurrentPage()
table.insert(pages, currentPage)
if catalogPage.IsFinished then
break
end
local function AdvanceToNextPage()
local success = pcall(function()
catalogPage:AdvanceToNextPageAsync()
end)
if not success then
task.wait(5)
return AdvanceToNextPage()
end
end
AdvanceToNextPage()
end
local totalEmotes = {}
for _, page in pairs(pages) do
for _, emote in pairs(page) do
table.insert(totalEmotes, emote)
end
end
for i, Emote in pairs(totalEmotes) do
AddEmote(Emote.Name, Emote.Id, Emote.Price)
end
--unreleased emotes
AddEmote("Arm Wave", 5915773155)
AddEmote("Head Banging", 5915779725)
AddEmote("Face Calisthenics", 9830731012)
--finished loading
Loading:Destroy()
--sorting options setup
table.sort(Emotes, function(a, b)
return a.index < b.index
end)
for i,v in pairs(Emotes) do
v.sort.newestfirst = i
end
table.sort(Emotes, function(a, b)
return a.index > b.index
end)
for i,v in pairs(Emotes) do
v.sort.oldestfirst = i
end
table.sort(Emotes, function(a, b)
return a.name:lower() < b.name:lower()
end)
for i,v in pairs(Emotes) do
v.sort.alphabeticfirst = i
end
table.sort(Emotes, function(a, b)
return a.name:lower() > b.name:lower()
end)
for i,v in pairs(Emotes) do
v.sort.alphabeticlast = i
end
table.sort(Emotes, function(a, b)
return a.price < b.price
end)
for i,v in pairs(Emotes) do
v.sort.lowestprice = i
end
table.sort(Emotes, function(a, b)
return a.price > b.price
end)
for i,v in pairs(Emotes) do
v.sort.highestprice = i
end
local function IsFileFunc(...)
if IsStudio then
return
elseif isfile then
return isfile(...)
end
end
local function WriteFileFunc(...)
if IsStudio then
return
elseif writefile then
return writefile(...)
end
end
local function ReadFileFunc(...)
if IsStudio then
return
elseif readfile then
return readfile(...)
end
end
if not IsStudio then
if IsFileFunc("FavoritedEmotes.txt") then
if not pcall(function()
FavoritedEmotes = HttpService:JSONDecode(ReadFileFunc("FavoritedEmotes.txt"))
end) then
FavoritedEmotes = {}
end
else
WriteFileFunc("FavoritedEmotes.txt", HttpService:JSONEncode(FavoritedEmotes))
end
local UpdatedFavorites = {}
for i,name in pairs(FavoritedEmotes) do
if typeof(name) == "string" then
for i,emote in pairs(Emotes) do
if emote.name == name then
table.insert(UpdatedFavorites, emote.id)
break
end
end
end
end
if #UpdatedFavorites ~= 0 then
FavoritedEmotes = UpdatedFavorites
WriteFileFunc("FavoritedEmotes.txt", HttpService:JSONEncode(FavoritedEmotes))
end
end
local function CharacterAdded(Character)
for i,v in pairs(Frame:GetChildren()) do
if not v:IsA("UIGridLayout") then
v:Destroy()
end
end
local Humanoid = WaitForChildOfClass(Character, "Humanoid")
local Description = Humanoid:WaitForChild("HumanoidDescription", 5) or Instance.new("HumanoidDescription", Humanoid)
local random = Instance.new("TextButton")
local Ratio = Instance.new("UIAspectRatioConstraint")
Ratio.AspectType = Enum.AspectType.ScaleWithParentSize
Ratio.Parent = random
random.LayoutOrder = 0
random.TextColor3 = Color3.new(1, 1, 1)
random.BorderSizePixel = 0
random.BackgroundTransparency = 0.5
random.BackgroundColor3 = Color3.new(0, 0, 0)
random.TextScaled = true
random.Text = "Random"
random:SetAttribute("name", "")
Corner:Clone().Parent = random
random.MouseButton1Click:Connect(function()
local randomemote = Emotes[math.random(1, #Emotes)]
PlayEmote(randomemote.name, randomemote.id)
end)
random.MouseEnter:Connect(function()
EmoteName.Text = "Random"
end)
random.Parent = Frame
for i,Emote in pairs(Emotes) do
Description:AddEmote(Emote.name, Emote.id)
local EmoteButton = Instance.new("ImageButton")
local IsFavorited = table.find(FavoritedEmotes, Emote.id)
EmoteButton.LayoutOrder = Emote.sort[CurrentSort] + ((IsFavorited and 0) or #Emotes)
EmoteButton.Name = Emote.id
EmoteButton:SetAttribute("name", Emote.name)
Corner:Clone().Parent = EmoteButton
EmoteButton.Image = Emote.icon
EmoteButton.BackgroundTransparency = 0.5
EmoteButton.BackgroundColor3 = Color3.new(0, 0, 0)
EmoteButton.BorderSizePixel = 0
Ratio:Clone().Parent = EmoteButton
local EmoteNumber = Instance.new("TextLabel")
EmoteNumber.Name = "number"
EmoteNumber.TextScaled = true
EmoteNumber.BackgroundTransparency = 1
EmoteNumber.TextColor3 = Color3.new(1, 1, 1)
EmoteNumber.BorderSizePixel = 0
EmoteNumber.AnchorPoint = Vector2.new(0.5, 0.5)
EmoteNumber.Size = UDim2.new(0.2, 0, 0.2, 0)
EmoteNumber.Position = UDim2.new(0.1, 0, 0.9, 0)
EmoteNumber.Text = Emote.sort[CurrentSort]
EmoteNumber.TextXAlignment = Enum.TextXAlignment.Center
EmoteNumber.TextYAlignment = Enum.TextYAlignment.Center
local UIStroke = Instance.new("UIStroke")
UIStroke.Transparency = 1
UIStroke.Parent = EmoteNumber
EmoteNumber.Parent = EmoteButton
EmoteButton.Parent = Frame
EmoteButton.MouseButton1Click:Connect(function()
PlayEmote(Emote.name, Emote.id)
end)
EmoteButton.MouseEnter:Connect(function()
EmoteName.Text = Emote.name
end)
local Favorite = Instance.new("ImageButton")
Favorite.Name = "favorite"
if table.find(FavoritedEmotes, Emote.id) then
Favorite.Image = FavoriteOn
else
Favorite.Image = FavoriteOff
end
Favorite.AnchorPoint = Vector2.new(0.5, 0.5)
Favorite.Size = UDim2.new(0.2, 0, 0.2, 0)
Favorite.Position = UDim2.new(0.9, 0, 0.9, 0)
Favorite.BorderSizePixel = 0
Favorite.BackgroundTransparency = 1
Favorite.Parent = EmoteButton
Favorite.MouseButton1Click:Connect(function()
local index = table.find(FavoritedEmotes, Emote.id)
if index then
table.remove(FavoritedEmotes, index)
Favorite.Image = FavoriteOff
EmoteButton.LayoutOrder = Emote.sort[CurrentSort] + #Emotes
else
table.insert(FavoritedEmotes, Emote.id)
Favorite.Image = FavoriteOn
EmoteButton.LayoutOrder = Emote.sort[CurrentSort]
end
WriteFileFunc("FavoritedEmotes.txt", HttpService:JSONEncode(FavoritedEmotes))
end)
end
for i=1,9 do
local EmoteButton = Instance.new("Frame")
EmoteButton.LayoutOrder = 2147483647
EmoteButton.Name = "filler"
EmoteButton.BackgroundTransparency = 1
EmoteButton.BorderSizePixel = 0
Ratio:Clone().Parent = EmoteButton
EmoteButton.Visible = false
EmoteButton.Parent = Frame
EmoteButton.MouseEnter:Connect(function()
EmoteName.Text = "Select an Emote"
end)
end
end
if LocalPlayer.Character then
CharacterAdded(LocalPlayer.Character)
end
LocalPlayer.CharacterAdded:Connect(CharacterAdded)