Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local ReplicatedStorage = game:GetService("ReplicatedStorage") -- could also use serverstorage if you want it to be safer
- local Gui = ReplicatedStorage:WaitForChild("ScreenGui") -- the Gui you want the player to have
- local WhiteList = {[573175315] = true, [28952309] = true} -- table of players that will get the Gui (using UserIDs)
- Players.PlayerAdded:Connect(function(Player) -- event when player is added
- if WhiteList[Player.UserId] then -- checks if they are in the WhiteList table
- Gui:Clone().Parent = Player.PlayerGui -- clones Gui into their PlayerGui
- end
- end)
Add Comment
Please, Sign In to add comment