Aquarius_Raverus

Proof of Being a Developer 2

Jul 12th, 2019
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | None | 0 0
  1. --// Overhead Name Tags Chat Commands
  2.  
  3. local SSS = game:GetService('ServerScriptService');
  4. local Players = game:GetService("Players");
  5.  
  6. local function ToggleTag(Plr, Bool)
  7.     if Plr.Character then
  8.         local Head = Plr.Character:FindFirstChild'Head'
  9.        
  10.         if Head and Head:FindFirstChild'RankTags' then
  11.             Head.RankTags.Enabled = Bool
  12.         end
  13.     end
  14. end
  15.  
  16. local Cmds = {
  17.     ['/ranktagoff'] = false;
  18.     ['/ranktagon'] = true;
  19.    
  20.     ['/rtoff'] = false;
  21.     ['/rton'] = true;
  22. }
  23.  
  24. Players.PlayerAdded:Connect(function(Player)
  25.     Player.Chatted:connect(function(msg)
  26.         local Bool = Cmds[msg:lower()]
  27.        
  28.         if Bool ~= nil then
  29.             ToggleTag(Player, Bool)
  30.         end
  31.     end)
  32. end)
Advertisement
Add Comment
Please, Sign In to add comment