RoScripter

Rainbow Nametag Script

Jul 5th, 2020
7,716
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.92 KB | None | 0 0
  1. local TweenService = game:GetService("TweenService")
  2. local MarketPlaceService = game:GetService("MarketplaceService")
  3.  
  4. local gamePassId = 1234567 --REPLACE THIS WITH YOUR GAMEPASSID
  5. local groupId = 1234567 --REPLACE THIS WITH YOUR GROUPID
  6.  
  7. game.Players.PlayerAdded:Connect(function(Player)
  8.     Player.CharacterAdded:Connect(function(Character)
  9.         local GuiClone = script.OverheadGui:Clone()
  10.         GuiClone.Parent = Character.Head
  11.        
  12.         local InformationLabel = GuiClone.InformationLabel
  13.        
  14.         local PlayerRank = Player:GetRoleInGroup(groupId)
  15.         InformationLabel.Text = Player.Name .. " - " .. PlayerRank
  16.  
  17.         if MarketPlaceService:UserOwnsGamePassAsync(Player.UserId, gamePassId) then
  18.             while true do
  19.                 local Color = Color3.new(math.random(), math.random(), math.random())
  20.                 local ColorTween = TweenService:Create(InformationLabel, TweenInfo.new(3), {TextColor3 = Color})
  21.                 ColorTween:Play()
  22.                 wait(3)
  23.             end
  24.         end
  25.     end)
  26. end)
Add Comment
Please, Sign In to add comment