SHOW:
|
|
- or go back to the newest paste.
1 | local Players = game:GetService("Players") | |
2 | local ReplicatedStorage = game:GetService("ReplicatedStorage") -- could also use serverstorage if you want it to be safer | |
3 | local Gui = ReplicatedStorage:WaitForChild("ScreenGui") -- the Gui you want the player to have | |
4 | ||
5 | - | local WhiteList = {[573175315] = true, [28952309] = true} -- table of players that will get the Gui (using UserIDs) |
5 | + | local WhiteList = {[673462376] = true, [28952309] = true} -- table of players that will get the Gui (using UserIDs) |
6 | ||
7 | Players.PlayerAdded:Connect(function(Player) -- event when player is added | |
8 | ||
9 | if WhiteList[Player.UserId] then -- checks if they are in the WhiteList table | |
10 | Gui:Clone().Parent = Player.PlayerGui -- clones Gui into their PlayerGui | |
11 | end | |
12 | ||
13 | end) |