Hi Guys! This is my first post here, as I just got promoted to member. I have been dying to ask this question. So I want to make a ServerScriptService script where it makes tags for the player if they are above or below a certain number of the leaderstats. Here is the code I already have
game.Players.PlayerAdded:connect(function(plr)
local tags = Instance.new("Folder",plr)
tags.Name = "Tags";
if false == true then
elseif plr.Name == "NightHowlersYT" then -- Player Name
local newTag = Instance.new("IntValue",tags);local chatColor = Instance.new("Color3Value",newTag);local tagColor = Instance.new("Color3Value",newTag);chatColor.Name = "ChatColor";tagColor.Name = "TagColor"
--EDIT BELOW
newTag.Name = "DriftBoss" -- Tag Name
chatColor.Value = Color3.fromRGB(159, 243, 233) -- Chat Color (default is 255,255,255)
tagColor.Value = Color3.fromRGB(159, 243, 233) -- Tag Color
elseif plr.Name == "ThatDiamondMustache" then -- Player Name
local newTag = Instance.new("IntValue",tags);local chatColor = Instance.new("Color3Value",newTag);local tagColor = Instance.new("Color3Value",newTag);chatColor.Name = "ChatColor";tagColor.Name = "TagColor"
--EDIT BELOW
newTag.Name = "Administrator" -- Tag Name
chatColor.Value = Color3.fromRGB(159, 243, 233) -- Chat Color (default is 255,255,255)
tagColor.Value = Color3.fromRGB(159, 243, 233) -- Tag Color
elseif plr.Name == "graydog97" then -- Player Name
local newTag = Instance.new("IntValue",tags);local chatColor = Instance.new("Color3Value",newTag);local tagColor = Instance.new("Color3Value",newTag);chatColor.Name = "ChatColor";tagColor.Name = "TagColor"
--EDIT BELOW
newTag.Name = "yes" -- Tag Name
chatColor.Value = Color3.fromRGB(159, 243, 233) -- Chat Color (default is 255,255,255)
tagColor.Value = Color3.fromRGB(159, 243, 233) -- Tag Color
elseif plr.Name == "ServverMessage" then -- Player Name
local newTag = Instance.new("IntValue",tags);local chatColor = Instance.new("Color3Value",newTag);local tagColor = Instance.new("Color3Value",newTag);chatColor.Name = "ChatColor";tagColor.Name = "TagColor"
--EDIT BELOW
newTag.Name = "s h i r t" -- Tag Name
chatColor.Value = Color3.fromRGB(159, 243, 233) -- Chat Color (default is 255,255,255)
tagColor.Value = Color3.fromRGB(159, 243, 233) -- Tag Color
elseif plr.Name == "AmirLyra" then -- Player Name
local newTag = Instance.new("IntValue",tags);local chatColor = Instance.new("Color3Value",newTag);local tagColor = Instance.new("Color3Value",newTag);chatColor.Name = "ChatColor";tagColor.Name = "TagColor"
--EDIT BELOW
newTag.Name = "MR. NUKE" -- Tag Name
chatColor.Value = Color3.fromRGB(159, 243, 233) -- Chat Color (default is 255,255,255)
tagColor.Value = Color3.fromRGB(159, 243, 233) -- Tag Color
elseif plr.Name == "PitSteel07" then -- Player Name
local newTag = Instance.new("IntValue",tags);local chatColor = Instance.new("Color3Value",newTag);local tagColor = Instance.new("Color3Value",newTag);chatColor.Name = "ChatColor";tagColor.Name = "TagColor"
--EDIT BELOW
newTag.Name = "Drift Legend" -- Tag Name
chatColor.Value = Color3.fromRGB(159, 243, 233) -- Chat Color (default is 255,255,255)
tagColor.Value = Color3.fromRGB(159, 243, 233) -- Tag Color
elseif plr.Name == "NIFFER99" then -- Player Name
local newTag = Instance.new("IntValue",tags);local chatColor = Instance.new("Color3Value",newTag);local tagColor = Instance.new("Color3Value",newTag);chatColor.Name = "ChatColor";tagColor.Name = "TagColor"
--EDIT BELOW
newTag.Name = "Most Wanted" -- Tag Name
chatColor.Value = Color3.fromRGB(159, 243, 233) -- Chat Color (default is 255,255,255)
tagColor.Value = Color3.fromRGB(159, 243, 233) -- Tag Color
elseif plr.Name ~= "PitSteel07" or "AmirLyra" or "Servver Message" or "graydog97" or "ThadDiamondMustache" or "NightHowlersYT" or "NIFFER99" or "Trashnoob362" then -- Player Name
local newTag = Instance.new("IntValue",tags);local chatColor = Instance.new("Color3Value",newTag);local tagColor = Instance.new("Color3Value",newTag);chatColor.Name = "ChatColor";tagColor.Name = "TagColor"
--EDIT BELOW
newTag.Name = "Ameteur Drifter" -- Tag Name
tagColor.Value = Color3.fromRGB(255,255,255) -- Tag Color
chatColor.Value = Color3.fromRGB(255,255,255) -- Chat Color (default is 255,255,255)
elseif plr.Name == "Trashnoob362" then -- Player Name
local newTag = Instance.new("IntValue",tags);local chatColor = Instance.new("Color3Value",newTag);local tagColor = Instance.new("Color3Value",newTag);chatColor.Name = "ChatColor";tagColor.Name = "TagColor"
--EDIT BELOW
newTag.Name = "big brain driver" -- Tag Name
chatColor.Value = Color3.fromRGB(159, 243, 233) -- Chat Color (default is 255,255,255)
tagColor.Value = Color3.fromRGB(159, 243, 233) -- Tag Color
end
end)
I tried something like: if player.leaderstats.MilesDriven.Value > 19.9 then
tag code
but that didn’t work. I have not seen a solution anywhere, checking the devforums, YouTube, the Toolbox, etc. Thank you in advance!