Star Creator Join Notifier!

Greetings,

I am gonna be showing you guys a clean method to using HTTPService to notify you when a star creator joins you game!
This can be useful for engagement of your game and also to let you/your team know when a star creator joins. (Proud moment eh?)

So lets get into the procedure,

Step 1
Create a RemoteEvent and name it whatever you wish like, here I have named it as “StarCreatorEvent”

image

Step 2
Create a script in ServerScriptService and name it CreatorJoin (Your wish to rename)

image

Step 3
Create your discord Webhook!
image
Click on the Gear icon


Click on Integrations and Create a New Webhook


Copy Webhook URL and save changes!

Step 4
Lets get into scripting! :-

Open the CreatorJoin script and enter the following -

local Group = 4199740 --The Star Creators' Group ID
local Minimum = 1
local ReplicatedEvent = game:GetService("ReplicatedStorage").StarCreatorEvent
local Webhook = "Your webhook here"
local HTTPService = game:GetService("HttpService")
local Format = 'https://www.roblox.com/headshot-thumbnail/image?userId=%s&width=420&height=420&format=png'

game:GetService("Players").PlayerAdded:Connect(function(Player)
	if Player:GetRankInGroup(Group) >= Minimum or Player.UserId == 1612496695 then -- Test it using your own Player ID

		local TimeFormat = os.date('%I:%M | %x')

		local PlayerUserId = Player.UserId
		local Thumbnail = string.format(Format,PlayerUserId)
		local data = {
			['embeds'] = {
				{
					['author'] = {name=Player.Name,icon_url=Thumbnail},
					['title'] = "**⭐ A Star Creator Has Joined! ⭐ **",
					['description'] = Player.Name.." has joined your game :D !",
					['fields'] ={
						{name='Name 💬',value=Player.Name,inline=true},
						{name='UserId 🕵️‍♀️',value=Player.UserId,inline=true},
						{name='Game Name 🎮',value=game.Name,inline=false},
						{name='Game ID 🗂',value=game.GameId,inline=true},
						{name='Time ⌚',value=TimeFormat,inline=false}

					},
					['url'] = "https://www.roblox.com/users/".. PlayerUserId .. "/profile",
				}
			}
		}
		ReplicatedEvent:FireAllClients(Player.Name, Player.UserId)
		local FinalData = HTTPService:JSONEncode(data)
		HTTPService:PostAsync(Webhook, FinalData)
	end
end)

CAUTION : DO NOT REVEAL YOUR WEBHOOK URL IN PUBLIC

There you go! This can also be done using Roblox Admin’s group ID for example to notify when an Admin joins and editting the embedded a little bit :smiley: (Any group can be used!)

Result: (Example)

image


I hope this tutorial would help you in your future projects C:
Remember, you can always edit the group ID and embedded features to experience this feature your own way!
All the best :>

31 Likes

Can I change the data variable to one of my existing join notfirers? I will try it later to see if I can actually make it.

The code is okay I guess. A lot of these variables are constant, so there is no reason to redefine them each time the event fires. So I’ve cleaned it up using better practices. It can still improve though. You can completely ditch the rank checks, just check if the user is in the group via Player:IsInGroup ! I don’t recommend having sensitive information in scripts, but sadly there isn’t really a way around it, therefore I suggest something like a ModuleScript in ServerScriptService to store API keys and such, and just require the module. This also decreases the chance of accidentally leaking the webhook if you need to share your version this specific script.

local GROUP_ID = 4199740 --The Star Creators' Group ID

local Players = game:GetService("Players")
local HttpService = game:GetService("HttpService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local StarCreatorEvent = ReplicatedStorage:WaitForChild("StarCreatorEvent") :: RemoteEvent -- assert that it's a remote
local Webhook = "Discord Webhook Here" -- no

Players.PlayerAdded:Connect(function(Player: Player)
	if Player:IsInGroup(GROUP_ID) or Player.UserId == "User ID" then -- Test it using your own Player ID
		local PlayerUserId = Player.UserId
		local data = {
			embeds = {
				{
					title = "**A Star Creator Has Joined!**",
					description = Player.Name.." has joined your game :D !",
					url = "https://www.roblox.com/users/".. PlayerUserId .. "/profile"
				}
			}
		}

		StarCreatorEvent:FireAllClients(Player.Name, Player.UserId)

		local FinalData = HttpService:JSONEncode(data)
		HttpService:PostAsync(Webhook, FinalData)
	end
end)
8 Likes

Why? Why do you need a Discord webhook for logging when a star creator joins your game?

1 Like
1 Like

For a matter of record over the game?

This can not be quoted under anyone and hence would be considered false. HTTPServices have this very functional value

1 Like

Cool but forcing them to record a video about your game is just gonna make them not do it. It’s their choice whenever they want to make a video about your game or not.

When and where did i ever mention about them being forced to make a video?
The webhook is used to just log the username of the star creator who joined

This is going off topic now. Logging usernames as a comparative datastore is not considered spamming and it is no where stated in the Roblox or Discord TOS that this is punishable

ok but still, your discord account can be deleted if you spam webhooks

Aand there’s no reason to do that. It’s just as useful as having a join log, aka it’s not.

logging and notifying are 2 different things, when you use discord webhooks to log who chatted what or some similar ridiculous stuff, that might be a violation of discord TOS but this is a different case.

1 Like

I mean, what’s the problem with it? The star creator won’t spam join?

5 Likes

No. BGS (Bubble Gum Simulator) has been using webhook for a few years now and no ban. I’ve been using it for a year and I never got my account deleted. 50% of simulators have discord webhooks.

3 Likes

I don’t understand the use of this. A star creator is like any other player and shouldn’t be treated differently from fans. Logging them joining is pretty useless you wish to bombard their server with your group’s staff to scare them off, yeah it’s not really useful, sorry. On top of the use to roblox to discord webhook use instead of using something like a node server to carry it across.

4 Likes

Get to reality, they are STAR CREATORS.
And using this depends completely on you guys so yeah lol

2 Likes

They already suffer enough from having to create alt accounts just to play games. You shouldn’t make their life harder.

3 Likes

I generally don’t see any difference. And exactly what @RealExoctic said, they do suffer.

It’s a pretty good tutorial for me. I never used the HTTP service. And if a Star creator joins my game and I’ll be notified it’s great! Can you make a tutorial to verify a player on the Discord server? Like they need a code. Then they join a game and get the code. Then paste it on Discord and gets his Roblox account verified?

1 Like

I didn’t know how much I want to do that before this post, TY ^^

1 Like

Sure, I would be doing that soon