Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[HELP] - aHUD Mod Menu; How can I make it s only certain players in a table can use the gui?

Asked by 8 years ago

No errors came to sprint to mind in output, f9 console nothing- I just can't see the gui; please help!

local version = "v1.0.9"

local player = game:GetService("Players").LocalPlayer
local permission = {"Asperanator", "uZelt"}

local hud = script.Parent
local ControlsUI = hud:WaitForChild("ControlsUI")
local infolbl = hud:WaitForChild("Infolbl")

local shutdown = ControlsUI:WaitForChild("Shutdown")

for _, staff in pairs (permission) do
    if staff == player.Name then    

ControlsUI.Visible = true
    infolbl.Visible = true

    else

ControlsUI.Visible = false
    infolbl.Visible = false

    end 
end

shutdown.MouseButton1Down:connect(function()

for j, v in pairs(game:GetService("Players"):GetPlayers()) do

v:Kick("aHUD - Console: Server successfully updated; please re-join, and sorry for any inconvience caused!")

    end 
end)

Answer this question