Assuming you have the billboard gui in.l replicated storage, and the VIP text Is already inthe gui
local mps = game:GetService("MarketPlaceService")
game.Players.PlayerAdded:Connect(function(plr)
if mps:UserOwnsGamepassAsync(plr.UserId,11149440) then
local name = plr.Name
local clone = game.ReplicatedStorage.BillBoardName:Clone()
clone.Parent = game.Workspace.name.Head
end)
local mps = game:GetService("MarketplaceService")
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
if mps:UserOwnsGamepassAsync(plr.UserId, 11149440) then
local PlayerName = plr.Name
local OverheadGuiClone = game.ServerStorage.BillBoardName:Clone()
OverheadGuiClone.Parent = char.Head
end
end)
end)
@LovinqAidenn, I suggest you to place the OverheadGui in ServerStorage, and keep the script at ServerScriptService.
@TwyPlasma, ReplicatedStorage can be accessed from both the client and the server, and, anything on the client is exploitable (Well, yes, this might not influence it all, but… Why not use ServerStorage, right?), but Server-Sided, exploiters can’t access at all.
But I cannot stress enough how important it is to properly place your elements in the right places. I would only do server scripts within the ServerScriptService and nothing more.
Other elements can go into their rightful places and you can define those places from your script. This script is essentially a great a example and guide of how you should be achieving.