Description:
I made a script which when you executed a command, the target’s imagelabel will be visible. But when you reset, it makes the visibility back to false again.
Script:
local koscommand = "kos"
local revokekoscommand = "revoke"
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
player.Chatted:Connect(function(msg)
local SplitString = string.split(msg, " ")
if SplitString[1] == koscommand then
for _, players in pairs(game.Players:GetPlayers()) do
local target = players.Name
for i = 1, #target do
if SplitString[2] == string.sub(target, 1, i) then
game.Workspace:FindFirstChild(target).Head.OverheadIcon2.KoS.Visible = true
end
end
end
elseif SplitString[1] == revokekoscommand and SplitString[2] == koscommand then
for _, players in pairs(game.Players:GetPlayers()) do
local target = players.Name
for i = 1, #target do
if SplitString[3] == string.sub(target, 1, i) then
game.Workspace:FindFirstChild(target).Head.OverheadIcon2.KoS.Visible = false
end
end
end
end
end)
end)
end)
(Sorry if my script wasn’t that good)