Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- || 📜 AUTHOR: @4zx16 || PRIVATE GUI (WHITELIST)
- ]]
- local ServerAction = {
- ["F"] = true -- make sure this is set to true or it will not work!
- }
- --[[
- || 📜 Whitelisted Usernames (Not Recommended)
- ]]
- local StoredData = {""} -- any amount of people can be on the list
- local StoredGUI = game:GetService("ReplicatedStorage").Name -- the name of ur gui use ["gui name"] if spaced.
- game.Players.PlayerAdded:Connect(function(JoinAction)
- local function SendData()
- StoredGUI:Clone().Parent = JoinAction:WaitForChild("PlayerGui")
- end
- if ServerAction.F == true then
- -- Was enabled via Studio
- for _, Yes in pairs(StoredData) do
- if JoinAction.Name == Yes then
- SendData()
- -- Stops Here
- end
- end
- end
- end)
- --[[
- || 📜 Whitelisted UserIds (Recommended)
- ]]
- local StoredData_IDs = {""} -- any amount of people can be on the list (PLAYER IDs ONLY)
- game.Players.PlayerAdded:Connect(function(JoinAction)
- local function SendData() -- Sends GUI to the client
- StoredGUI:Clone().Parent = JoinAction:WaitForChild("PlayerGui")
- end
- if ServerAction.F == true then
- -- Was enabled via Studio
- for _, Yes in pairs(StoredData_IDs) do
- if JoinAction.UserId == Yes then
- SendData() -- Sends GUI to the client
- -- Stops Here
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement