Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[ Edit the following line to the players you want to be able to use the GUI. --]
- shared.adminlist = {"ZtripleZ","","","","",""}
- --[ Change the following line to the admin t-shirt asset ID --]
- shared.guishirt = ""
- --[ Edit the following line to specify the entry message that users will see when they enter the place. --]
- entermsg = "Welcome to my place!"
- --[ If the following line is set to true, the entry message will be displated, if false it wont. --]
- entermsgon = false
- --[ Put how long you want the entry message to stay up on the following line. --]
- entermsgtime = 5
- --[ Put people that you dotn want to be able to play your place here --]
- bannedlist = {"exploiter", "hackerperson"}
- --[Edit the follow lines to specify if you want them in the game (true or false)--]
- reset = true --The reset GUI (All users can use it)
- ffgui = true --The forcefield GUI (Only admins can use this)
- --[ If you dont want t-shirt admins to be able to ban/kick/reset/explode anyone, set the following line to false, true if you do. --]
- shared.tshirtabuseable = false
- --[ If you have added things to the modding API, change this to true and they will be added to the root of the GUI --]
- moddingapi = false
- --[~+~+~+~+~+~+~+~+~~+~+~+~+~+~+~+~+~~+~+~+~+~+~+~+~+~~+~+~+~+~+~+~+~+~+~+]
- --[~+~+~+~+~+~+~+~+~ Dont edit anything below this line! ~+~+~+~+~+~+~+~+~]
- --***********Note, this GUI will ONLY work in online mode!*****************
- g = game:GetService("InsertService"):LoadAsset(26931665)
- if g == "No assetUrl set" then
- error ("Admin GUI error! Admin GUI only works in a real game server.", 0)
- end
- gu = game.StarterGui:findFirstChild("Kick")
- if gu ~= nil then
- gu:remove()
- end
- gu = game.StarterGui:findFirstChild("Reset")
- if gu ~= nil then
- gu:remove()
- end
- gu = game.StarterGui:findFirstChild("ForceFieldGUI")
- if gu ~= nil then
- gu:remove()
- end
- kickgu = g.Kick
- kickgu.Parent = game.StarterGui
- if moddingapi then
- o = script.ModdingAPI:GetChildren()
- for i = 1, #o do
- o[i]:clone().Parent = kickgu
- end
- end
- if ffgui == true then
- g.ForceFieldGUI.Parent = game.StarterGui
- end
- if reset == true then
- g.Reset.Parent = game.StarterGui
- end
- function checkOkToLetIn(name)
- for i = 1,#shared.adminlist do
- -- convert strings to all upper case, otherwise we will let in
- -- "Username" but not "username" or "uSERNAME"
- if (string.upper(name) == string.upper(shared.adminlist[i])) then return true end
- end
- return false
- end
- function banPlayer(p)
- print("childadded")
- if checkOkToLetIn(p.Value) ~= true then
- table.insert(bannedlist, p.Value)
- if game.Players:findFirstChild(p.Value) ~= nil then
- game.Players:findFirstChild(p.Value):remove()
- end
- print("banned a player")
- end
- end
- function addAdmin(p)
- if p.Value ~= "" then
- table.insert(shared.adminlist, p.Value)
- end
- end
- --Made by bubby4j
- function onPlayerAdded(p)
- for i =1,#bannedlist do
- if string.lower(bannedlist[i]) == string.lower(p.Name) and (checkOkToLetIn(p.Name) ~= true) then
- p:remove()
- end
- end
- if entermsgon == true then
- m = Instance.new("Hint")
- m.Text = entermsg
- m.Parent = p
- wait(entermsgtime)
- m:remove()
- end
- end
- game.Players.PlayerAdded:connect(onPlayerAdded)
- script.AddAdmin.ChildAdded:connect(addAdmin)
- script.BanPlayer.ChildAdded:connect(banPlayer)
Advertisement
Add Comment
Please, Sign In to add comment