Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Allowed = {"Robohead999", "Embolden", "Clv2"}
- function GiveGui()
- local players = game.Players:GetPlayers()
- for i = 1, #players do
- for k = 1, 3 do
- plr = players[i].Name
- player = game.Players:FindFirstChild(plr)
- if players[i].Name == Allowed[k] then
- print(Allowed[k])
- players[i].Chatted:connect(function(msg)
- local Message = string.sub(msg, 1,5)
- if Message == "/Cmds" and string.sub(msg, 1,8) ~= '/Cmdsoff' then
- ScreenGui = Instance.new("ScreenGui", player.PlayerGui)
- Frame = Instance.new("Frame", player.PlayerGui.ScreenGui)
- Frame.Position = UDim2.new(0, 400, 0.1, 0)
- Frame.Size = UDim2.new(0, 500, 0, 500)
- Frame.Style = "DropShadow"
- Title = Instance.new("TextLabel", player.PlayerGui.ScreenGui.Frame)
- Title.BackgroundTransparency = 1
- Title.TextColor3 = Color3.new(167/255, 170/255, 0/255)
- Title.Text = "Adminons Gui"
- Title.TextSize = 30
- Title.Position = UDim2.new(0, 150, 0.01, 0)
- Title.Size = UDim2.new(0, 200, 0, 30)
- Title.TextStrokeTransparency = 0
- Kick = Instance.new("TextButton", player.PlayerGui.ScreenGui.Frame)
- Kick.Position = UDim2.new(0,0,0.3,0)
- Kick.BackgroundTransparency = 0.8
- Kick.Size = UDim2.new(0,100,0,50)
- Kick.Text = "Kick"
- Kick.TextSize = 20
- Kick.TextStrokeTransparency = 0
- Kick.TextColor3 = Color3.new(76/255, 134/255, 41/255)
- FindPlayer = Instance.new("TextBox", player.PlayerGui.ScreenGui.Frame)
- FindPlayer.Position = UDim2.new(0, 100, 0.3, 0)
- FindPlayer.Size = UDim2.new(0, 200,0, 50)
- FindPlayer.Text = "Type Player Name here"
- FindPlayer.Visible = false
- player.PlayerGui.ScreenGui.Frame.TextButton.MouseButton1Down:connect(function()
- if FindPlayer.Visible == false then
- FindPlayer.Visible = true
- else if FindPlayer.Visible == true then
- FindPlayer.Visible = false
- end
- end
- end)
- print("Admin Cmds Loaded For: "..player.Name.. " Hope you enjoy!")
- else if string.sub(msg, 1,8) == "/Cmdsoff" then
- ScreenGui:Destroy()
- end
- if string.sub(msg, 1,5) == "/Kick" then
- print("Kicking "..FindPlayer.Text)
- for i,v in pairs(game.Players:GetChildren()) do
- if v.Name == FindPlayer.Text then
- v:Kick()
- end
- end
- end
- end
- end)
- end
- end
- end
- end
- game.Players.ChildAdded:connect(function()
- GiveGui()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement