Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How come my Discord webhook donation script isn't working?

Asked by 5 years ago

So basically this script is supposed to make it so when a player has donated 5+ robux it sends a message on Discord telling the moderators to give them the Donator role. When I test the game it gives this error 'ServerScriptService.Discord Webhook:15: ')' expected (to close '(' at line 4) near 'end''. How would I fix this?

local url = 'https://discord.osyr.is/api/webhooks/removedcodeforsecurity'
local http = game:GetService("HttpService")

game.Players.PlayerAdded:Connect(function(player)
    wait(1)
    repeat wait() until player.leaderstats.Donated.Value == 0
        repeat wait() until player.leaderstats.Donated.Value >= 5
            local data = {
                ['username'] = "???? NEW DONATION ????",
                ['content'] = "Looks like, **".. player.Name.. "** has donated over 5 Robux! Looks like they deserve the donator role <@roleidremovedforsecurity>!"
            }
            local newdata = http:JSONEncode(data)
            http:PostAsync(url,newdata)
    end
end)
0
These errors are self explanatory User#5423 17 — 5y

2 answers

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

too many end

game.Players.PlayerAdded:Connect(function(player)
    wait(1)
    repeat wait() until player.leaderstats.Donated.Value == 0
        repeat wait() until player.leaderstats.Donated.Value >= 5
            local data = {
                ['username'] = "???? NEW DONATION ????",
                ['content'] = "Looks like, **".. player.Name.. "** has donated over 5 Robux! Looks like they deserve the donator role <@roleidremovedforsecurity>!"
            }
            local newdata = http:JSONEncode(data)
            http:PostAsync(url,newdata)
end)
0
ty TypicallyPacific 61 — 5y
Ad
Log in to vote
0
Answered by
s_21 74
5 years ago

Roblox removed discord webhooks

Answer this question