Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script.Name = "Trackers"
- local Trackers = {}
- -- Instances:
- local TrackerList = Instance.new("ScreenGui")
- local List = Instance.new("TextLabel")
- --Properties:
- TrackerList.Name = "TrackerList"
- TrackerList.Parent = owner.PlayerGui
- TrackerList.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- List.Name = "List"
- List.Parent = TrackerList
- List.BackgroundColor3 = Color3.new(1, 1, 1)
- List.Position = UDim2.new(0.849593461, 0, 0, 0)
- List.Size = UDim2.new(0.51, 0, 0.282, 0)
- List.Font = Enum.Font.SourceSans
- List.TextColor3 = Color3.new(0, 0, 0)
- List.TextSize = 20
- List.TextWrapped = true
- List.TextXAlignment = Enum.TextXAlignment.Left
- List.TextYAlignment = Enum.TextYAlignment.Top
- --Main:
- coroutine.resume(coroutine.create(function()
- while true do
- List.Text = ""
- for i,t in pairs(Trackers) do
- List.Text = List.Text .. t.Value.Name .. " - " .. string.format(t.Value.UserId) .. t.Value:GetRoleInGroup(3256759) .. "\n"
- end
- wait(0.01)
- end
- end))
- for _,Player in pairs(game.Players:GetPlayers()) do
- local Tracker = Instance.new("ObjectValue",script)
- Tracker.Name = Player.Name
- Tracker.Value = Player
- table.insert(Trackers,Tracker)
- coroutine.resume(coroutine.create(function()
- while true do
- if Tracker.Value == nil then
- Tracker:Remove()
- end
- wait(0.1)
- end
- end))
- end
- game.Players.PlayerAdded:Connect(function(Player)
- local Tracker = Instance.new("ObjectValue",script)
- Tracker.Name = Player.Name
- Tracker.Value = Player
- table.insert(Trackers,Tracker)
- coroutine.resume(coroutine.create(function()
- while true do
- if Tracker.Value == nil then
- Tracker:Remove()
- end
- wait(0.1)
- end
- end))
- end)
Add Comment
Please, Sign In to add comment