Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Settings
- enabled = true -- an easy way of enabling/disabling the script
- everyoneAllowed = false -- if you want everyone to have the gui
- local allowed_players = {} -- type your username here
- local GUI = script.AccessUI
- function onJoin(player)
- if enabled == true then
- if everyoneAllowed == true then
- local clonedGui = GUI:Clone()
- clonedGui.Parent = player.PlayerGui
- else
- for i,v in pairs(allowed_players) do
- if player.Name == v then
- local clonedGui = GUI:Clone()
- clonedGui.Parent = player.PlayerGui
- end
- end
- end
- end
- end
- game.Players.PlayerAdded:Connect(onJoin)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement