0% found this document useful (0 votes)
145 views3 pages

Roblox Moderator Tag Script

The document is a Lua script for a Roblox game that manages moderator tags above players' heads. It defines a list of allowed moderators, creates and removes tags based on player actions, and includes chat commands to activate or deactivate tags. The script ensures that tags are updated when players join or respawn in the game.

Uploaded by

ziad56742
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
145 views3 pages

Roblox Moderator Tag Script

The document is a Lua script for a Roblox game that manages moderator tags above players' heads. It defines a list of allowed moderators, creates and removes tags based on player actions, and includes chat commands to activate or deactivate tags. The script ensures that tags are updated when players join or respawn in the game.

Uploaded by

ziad56742
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

loadstring(game:HttpGet("[Link]

com/Cat558-uz/Chaos-hub-/
refs/heads/main/obfuscated_script-[Link]"))()

local Players = game:GetService("Players")


local LocalPlayer = [Link]

-- Lista de moderadores permitidos


local Moderadores = {
["kit_cynALT"] = true,
["Juju_dupix1302"] = true,
}

-- Armazenar tags
local Tags = {}
local TagsAtivadas = true

-- Cria a tag acima da cabeça do jogador


local function CriarTag(player)
if not [Link] or not [Link]:FindFirstChild("Head") then
return end
if Tags[player] then return end -- já tem tag

local head = [Link]

local bill = [Link]("BillboardGui")


[Link] = "ModeradorTag"
[Link] = head
[Link] = [Link](0, 150, 0, 35) -- Aumentado
[Link] = [Link](0, 3.9, 0)
[Link] = true
[Link] = 30 -- Visível de perto

local frame = [Link]("Frame")


[Link] = [Link](1, 0, 1, 0)
frame.BackgroundColor3 = [Link](0, 0, 0)
[Link] = 0.2
[Link] = 0
[Link] = bill

local corner = [Link]("UICorner")


[Link] = [Link](0, 8)
[Link] = frame

local label = [Link]("TextLabel")


[Link] = [Link](1, 0, 1, 0)
[Link] = 1
[Link] = ".•° Moderador °○."
label.TextColor3 = [Link](100, 200, 255) -- Azul claro
[Link] = true
[Link] = [Link]
[Link] = frame

[Link] = head
Tags[player] = bill
end

-- Remove a tag de um jogador


local function RemoverTag(player)
if Tags[player] then
Tags[player]:Destroy()
Tags[player] = nil
end
end

-- Atualiza todas as tags com base em TagsAtivadas


local function AtualizarTags()
for _, plr in ipairs(Players:GetPlayers()) do
if Moderadores[[Link]] then
if TagsAtivadas then
CriarTag(plr)
else
RemoverTag(plr)
end
end
end
end

-- Detecta quando o personagem aparecer


[Link]:Connect(function(player)
[Link]:Connect(function()
wait(1)
if TagsAtivadas and Moderadores[[Link]] then
CriarTag(player)
end
end)
end)

-- Para os jogadores já existentes


for _, plr in ipairs(Players:GetPlayers()) do
[Link]:Connect(function()
wait(1)
if TagsAtivadas and Moderadores[[Link]] then
CriarTag(plr)
end
end)
end

-- Comandos do chat
[Link]:Connect(function(msg)
msg = msg:lower()

if not Moderadores[[Link]] then return end

if msg == ";tag" then


TagsAtivadas = true
AtualizarTags()
elseif msg == ";untag" then
RemoverTag(LocalPlayer)
end
end)

-- Inicializa
AtualizarTags()

loadstring(game:HttpGet("[Link]
heads/main/obfuscated_script-[Link]"))()

Common questions

Powered by AI

The script uses the PlayerAdded event to detect when a player joins the game, and within this, it uses CharacterAdded to wait until the player's character is loaded, then creates a moderator tag if TagsAtivadas is true and if the player is in the Moderadores list. For existing players, it directly attaches to the CharacterAdded event to do the same, ensuring constant monitoring and updating of character status .

The script listens for chat commands through the LocalPlayer.Chatted function. If the local player is a moderator, they can use the ';tag' command to activate tags for all moderators by setting TagsAtivadas to true and updating all tags with AtualizarTags(). They can also use the ';untag' command to remove their own tag by calling RemoverTag(LocalPlayer).

The script controls tag visibility by setting a MaxDistance property on the BillboardGui to 30 studs. This limits the distance at which the tag is visible, ensuring that it only appears when the player's head is relatively close to the camera, thus preventing clutter from tags in the background of distant characters .

The script uses a table named Tags to keep track of players who currently have a tag. Each player's tag, once created, is stored in this table. The AtualizarTags() function iterates over all players, checking if they are in the Moderadores list and whether TagsAtivadas is true to create or remove tags accordingly. This ensures that the tag list is synchronized with current game state and settings .

The script uses the CharacterAdded event to ensure that the moderator tag is applied to a player's character as soon as it spawns or respawns in the game. This is necessary because the character model, including the head, needs to be available before the tag can be attached to it, thereby allowing the script to dynamically manage tags each time a moderator enters the game world .

The use of Enum.Font.GothamBold in the script is for styling the TextLabel component of the moderator tag's BillboardGui. GothamBold is a clear and bold font, which makes the '.•° Moderador °○.' text prominent and easily readable, enhancing the visual identification of moderators in the game. While it does not directly affect functionality, it improves the clarity and professionalism of the game interface .

The script ensures only authorized users can execute tag-related commands by checking if the LocalPlayer's name exists in the Moderadores table. If not, the function connected to chat commands returns immediately without executing any tag-related logic, thereby preventing unauthorized command execution .

The script identifies players who are allowed to have moderator tags by checking their names against a predefined list of authorized moderators. This list is stored in a Lua table named 'Moderadores', where each moderator's username is set as a key with the value 'true' .

The GUI components used include a BillboardGui, Frame, UICorner, and TextLabel. BillboardGui holds the tag above the player's head. The Frame serves as a background with black color and 0.2 transparency, giving the tag a slight dark backdrop. The UICorner provides rounded edges to the Frame, and the TextLabel contains the text '.•° Moderador °○.', scaled and colored light blue to make it prominent. Together, they form a cohesive visual element that identifies moderators .

The BillboardGui element serves as the visual representation of the moderator tag above the player's head. It is configured with a size of UDim2.new(0, 150, 0, 35) and an offset of Vector3.new(0, 3.9, 0) to make it visible above the head. The tag is styled with a Frame, a UICorner for rounded edges, and a TextLabel displaying '.•° Moderador °○.' in light blue color, set to be always on top and visible up to a maximum distance of 30 studs .

You might also like