Advertisement
lafur

Untitled

Aug 9th, 2020
397
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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 = {[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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement