I’m no longer using this method I needed help with.
It’s probably because you are invoking the RemoteFunction a lot, can we see the code which you used to invoke the RemoteFunction?
I’m just gonna state the obvious here and say that this whole system is asking for trouble.
An exploiter could easily write a short script to continually request new songs with nothing preventing them from doing so. This then would cause your webhook to flood Discord’s API with requests (You would be at fault for this, not the exploiter.). I would strongly veto against adding such a system.
Also, whenever posting scripts about help with HTTPService you should NEVER post the URL used to access said thing.
Now, looking over your code you are both using communication between the server and client as long with an external module so the issue could likely be something not shown in the script you posted.
--// Variables
local InputBox = script.Parent:WaitForChild("Input")
local SubmitButton = script.Parent:WaitForChild("Submit")
local RemoteFunction = game.ReplicatedStorage.Remotes.SongPasser
--// Code
SubmitButton.MouseButton1Click:Connect(function()
RemoteFunction:InvokeServer(InputBox.Text)
wait(0.1)
script.Parent.Alert.Visible = true
wait(3)
script.Parent.Alert.Visible = false
end)
script.Parent.Close.MouseButton1Click:Connect(function()
script.Parent.Parent.MusicControl:TweenPosition(UDim2.new(0.203, 0,1.33, 0),"Out","Sine",0.5,false)
script.Parent.Parent.MainBackground:TweenPosition(UDim2.new(0.156, 0,0.79, 0),"Out","Sine",0.5,false)
end)
I’ve just added a quick rank detection.
game.ReplicatedStorage.Remotes.SongPasser.OnServerInvoke = function(plr,Id)
local rank = plr:GetRankInGroup(8342423)
if rank <= 5 then
game.Workspace.PlayingSound.SoundId = "rbxassetid://"..Id
wait(0.1)
game.Workspace.PlayingSound:Play()
--Embed
local Asset = game:GetService("MarketplaceService"):GetProductInfo(Id)
local embed = MessageEmbed.new("https://discord.com/api/webhooks/777965496838127656/a_ST8gBXyQO04pjrxtBKXXku46iYPtBAnhlqoydVHw4zlO1XhOTtLt8Niw4BEr0f91FL")
embed:SetTitle("A new song was just played! :eyes:")
embed:SetDescription("User that played the song in the server: **"..plr.Name.."**\nThe song name: **"..Asset.Name.."**\nThe song ID: **"..Id.."**\nTheir group rank: **"..plr:GetRoleInGroup(8342423).."**")
embed:SetFooter("This message was sent automatically by "..game.JobId)
embed:PostAsync()
else
local name = plr.Name
local Id = plr.UserId
local link = "https://www.roblox.com/users/"..Id.."/profile"
local e = MessageEmbed.new("https://discord.com/api/webhooks/779778468904304670/biMWpkMvs3uLdhhoOzFSldb7qGxT24Yee4ZMY1fuoVXDMp687tRd9AMhxvhsWqvx_uZJ")
e:SetTitle("Exploiter detected")
e:SetDescription("USERNAME: **"..name.."**\nID: **"..Id.."**\nLINK: "..link)
e:SetColor(16711680)
e:PostAsync()
wait(1)
plr:Kick("Exploit Detected | Your account has been logged into our system.")
end
end