Skip to content

Commit 661bb52

Browse files
chore: add plugins from Discord [skip ci]
1 parent 905ad0f commit 661bb52

3 files changed

Lines changed: 122 additions & 1 deletion

File tree

.last_message_id

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1525033828169810062
1+
1526012168556777493

plugins.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
[
2+
{
3+
"author": "Felix",
4+
"name": "emotemanager.iy",
5+
"description": "emotemanager.iy plugin for Infinite Yield",
6+
"url": "https://raw.githubusercontent.com/corecommit/plugin-store/main/plugins/emotemanager.iy",
7+
"message_id": "1526012168556777493"
8+
},
29
{
310
"author": "SteamUser#9483",
411
"name": "flingme.iy",

plugins/emotemanager.iy

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
local eEmotes = {}
2+
local emotes
3+
local addedCon
4+
5+
local Plugin = {
6+
["PluginName"] = "Rocky's Emote Manager",
7+
["PluginDescription"] = "Allows you add emotes to your character even if you don't own them!",
8+
["Commands"] = {
9+
["addemote"] = {
10+
["ListName"] = "addemote [id]",
11+
["Description"] = "Adds an emote by its ID.",
12+
["Aliases"] = {"adde", "setemote"},
13+
["Function"] = function(args, speaker)
14+
local hum = speaker.Character and speaker.Character:FindFirstChildOfClass("Humanoid")
15+
local desc = hum and hum:GetAppliedDescription()
16+
local emoteId = tonumber(args[1])
17+
if not (desc and emoteId) then return notify("Error", "Bad argument or no humanoid") end
18+
19+
local success, tEmote = pcall(MarketplaceService.GetProductInfoAsync, MarketplaceService, emoteId, Enum.InfoType.Asset)
20+
if success and tEmote and tEmote.Name and tEmote.ProductType == "Collectible Item" then
21+
if #eEmotes < 1 then
22+
for _, e in next, desc:GetEquippedEmotes() do
23+
table.insert(eEmotes, e.Name)
24+
end
25+
end
26+
27+
desc:AddEmote(tEmote.Name, emoteId)
28+
table.insert(eEmotes, tEmote.Name)
29+
emotes = desc:GetEmotes()
30+
desc:SetEquippedEmotes(eEmotes)
31+
hum:ApplyDescriptionClientServer(desc)
32+
if not addedCon then
33+
addedCon = speaker.CharacterAdded:Connect(function(char)
34+
local hum = char:FindFirstChildOfClass("Humanoid") or task.wait(.3) and char:FindFirstChildOfClass("Humanoid")
35+
local desc = hum and hum:GetAppliedDescription()
36+
if desc then
37+
desc:SetEmotes(emotes)
38+
desc:SetEquippedEmotes(eEmotes)
39+
hum:ApplyDescriptionClientServer(desc)
40+
end
41+
end)
42+
end
43+
notify("Success", "Added " .. tEmote.Name)
44+
else
45+
notify("Error", "Could not add the provided emote. Did you get the right ID?")
46+
end
47+
end
48+
},
49+
50+
["delemote"] = {
51+
["ListName"] = "delemote [name / id]",
52+
["Description"] = "Remove an emote by its name or ID.",
53+
["Aliases"] = {"unsetemote", "rmemote", "removeemote", "deleteemote"},
54+
["Function"] = function(args, speaker)
55+
local hum = speaker.Character and speaker.Character:FindFirstChildOfClass("Humanoid")
56+
local desc = hum and hum:GetAppliedDescription()
57+
58+
local tEmote = tonumber(args[1]) or getstring(1, args)
59+
if desc then
60+
for name, ids in next, desc:GetEmotes() do
61+
if name == tEmote or table.find(ids, tEmote) then
62+
tEmote = name
63+
break
64+
end
65+
end
66+
elseif not desc then
67+
return notify("Error", "Missing humanoid")
68+
end
69+
70+
local emote = table.find(eEmotes, tEmote)
71+
if typeof(tEmote) == "string" and emote and desc then
72+
desc:RemoveEmote(tEmote)
73+
table.remove(eEmotes, emote)
74+
desc:SetEquippedEmotes(eEmotes)
75+
hum:ApplyDescriptionClientServer(desc)
76+
if #eEmotes < 1 then
77+
addedCon:Disconnect()
78+
addedCon = nil
79+
end
80+
notify("Success", "Removed " .. tEmote)
81+
else
82+
notify("Error", "Could not remove the provided emote. Did you get the right name/ID?")
83+
end
84+
end
85+
},
86+
87+
["clearemotes"] = {
88+
["ListName"] = "clearemotes",
89+
["Description"] = "Removes all equipped emotes, including ones you own.",
90+
["Aliases"] = {},
91+
["Function"] = function(args, speaker)
92+
local hum = speaker.Character and speaker.Character:FindFirstChildOfClass("Humanoid")
93+
local desc = hum and hum:GetAppliedDescription()
94+
95+
if desc then
96+
for _, tbl in next, {emotes, eEmotes} do
97+
table.clear(tbl)
98+
desc:SetEmotes(tbl)
99+
desc:SetEquippedEmotes(tbl)
100+
end
101+
addedCon:Disconnect()
102+
addedCon = nil
103+
hum:ApplyDescriptionClientServer(desc)
104+
105+
notify("Cleared Emotes", "Cleared all equipped emotes!")
106+
else
107+
notify("Error", "Could not remove the provided emote. Did you get the right name/ID?")
108+
end
109+
end
110+
}
111+
}
112+
}
113+
114+
return Plugin

0 commit comments

Comments
 (0)