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

How do I get this script that I want a Gamepass to give the player the VIP/Group Rank name tag?

Asked by
dog6779 25
7 years ago
Edited 7 years ago

I have a script here but whenever I use a GUI for a gamepass I wanted it where the image button whenever its clicked they can buy the gamepass such as the

MarketPlaceService

getRole

IsInGroup

Yeah more like that...

Script 1:

01local billboardgui = game:GetService("ServerStorage"):WaitForChild("BillboardGui")
02game.Players.PlayerAdded:Connect(function(player)
03    player.CharacterAdded:Connect(function(char)
04 
05 
06        if player.Name == "VIP" then
07            local clonedgui = billboardgui:Clone()
08            clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head
09            clonedgui.TextLabel.Text = "VIP"..player.Name
10            clonedgui.TextLabel.TextColor3 = Color3.fromRGB(239, 184, 56)
11        else
12            local clonedgui = billboardgui:Clone()
13            clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head
14            clonedgui.TextLabel.Text = " "..player.Name
15            clonedgui.TextLabel.TextColor3 = Color3(239, 184, 56)
16        end
17    end)
18end)

I wanted to have this script where when the person has the gamepass the VIP name is top of the rank name because I have another script here that I want where there is a group rank too!

Script 2:

01local groupID = 4010855;
02local before_name = false;
03local ts = tostring
04game.Players.PlayerAdded:connect(function(player)
05repeat wait() until player.Character
06    local char = player.Character
07    getRole(player)
08    player.Changed:connect(function()
09        repeat wait() until player.Character
10            wait()
11            getRole(player)
12    end)
13end)
14function createTitle(p, s)
15    local gui = script.Title
View all 37 lines...

Is there a way that these both scripts could combine together which hard to tell if it's a local script or normal script.

And as you know so far I don't know where to add the > MarketPlaceService in the first script but I also wanted these scripts where the person buys the gamepass and then when they rejoin there is a VIP name tag there and the group rank name tag too.

Here are some pictures I did what I am trying to do when a player to try to buy the gamepass.

Pictures

Picture 1: https://gyazo.com/f7c7c7c434e9bb8c81efa7d01baecbdd

Picture 2: https://gyazo.com/2c170ebaf2fce0676c6d10d6c113193b

So yeah I felt like this is too much but make sure you take your time.

1
You should setup the gui all in one script amd the humanoid. User#5423 17 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

-- place this script into the server script service

local gps = game:GetService("GamePassService") local rf = game:GetService("ReplicatedStorage"):WaitForChild("gamepassChecker")

local function returnPassInfo(player, actual, passid) -- 'player' is the player of the client, not the speaker; 'actual' represents the player of the speaker if gps:PlayerHasPass(actual, passid) then return true else return false end end

rf.OnServerInvoke = returnPassInfo

for the rest it is really complicated this should help it has stuff that will work

https://www.roblox.com/library/1396880050/Chat-Title-System-2-6-18

Ad

Answer this question