Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- groupid = 3592403 --Write your group's id right here, you don't need to worry about anything else, unless you plan on changing colors.
- game.Players.PlayerAdded:connect(onPlayerRespawned) --Connection for the function right below.
- function onPlayerRespawned(newPlayer) --When a player joins the "Players" service.
- wait(1) --Obviously waits to start the script
- if newPlayer then --Just checking if the player exist.
- gui=Instance.new("BillboardGui") --Creating a new BillboardGui
- gui.Parent=newPlayer.Character.Head --Inserting the BillboardGui into the player.
- gui.Adornee=newPlayer.Character.Head
- gui.Size=UDim2.new(4,0,2,0) --Leave this one be.
- gui.StudsOffset=Vector3.new(0,3,0) --Leave this one be.
- texta=Instance.new("TextBox") --Creating a new TextBox
- texta.Size=UDim2.new(1,0,1,0) --Leave this one be.
- texta.BackgroundTransparency = 1 --1 Makes the background invisible, 0 will show it.
- texta.Text = ("- " .. newPlayer:GetRoleInGroup(groupid) .. " -") --This changes the text to the rank in a group.
- texta.TextColor3 = Color3.new(50,10,255) --This is the text color of non-group members.(50,10,255) is white; (0,2,44) is teal
- texta.Parent=gui --Inserting the TextBox to the BillBoardGui
- if newPlayer:IsInGroup(groupid) then --Checking if the player actually belongs to the group.
- texta.TextColor3 = Color3.new(0,0,128) --This is the text color of group members.(0,0,128) is blue;(23/255,14/255,80/255) is dark purple
- end
- end
- end
- function onPlayerEntered(newPlayer)
- newPlayer.Changed:connect(function (property)
- if (property == "Character") then
- onPlayerRespawned(newPlayer)
- end
- end)
- end
- game.Players.PlayerAdded:connect(onPlayerEntered)
Advertisement
Add Comment
Please, Sign In to add comment