So I have an if else and elseif all after one another like this:
function lever(click)
local cn = click.Name
local b = game.ServerStorage.Script:Clone()
local a = Instance.new("BoolValue", game.Players[cn].PlayerGui)
a.Name = "Value"
a.Value = false
if click.Name == "doctorbenny2011" or click.Name == "CaptainTheTimeLord" or click.Name == "Player1" or click.Name == "Player" then
if game.Players[cn].PlayerGui.Value.Value == false then -- A value so the gui only shows once.
b.Parent = game.Players[cn].PlayerGui.Notify.Text
b.Disabled = false
a.Value = true
game.Players[cn].PlayerGui.Notify.Text.Visible = true
game.Players[cn].PlayerGui.Notify.Text.BackgroundTransparency = .8
game.Players[cn].PlayerGui.Notify.Text.TextTransprency = 0
game.Players[cn].PlayerGui.Notify.Text.Text = "YOU are authorized."
game.Players[cn].PlayerGui.Notify.Sound:Play()
else
--codey stuff
elseif click.Name ~= "doctorbenny2011" or click.Name ~= "CaptainTheTimeLord" or click.Name ~= "Player" or click.Name ~= "Player1" then
print(click.Name)
b.Parent = game.Players[cn].PlayerGui.Notify.Text
b.Disabled = false
game.Players[cn].PlayerGui.Notify.Text.Visible = true
game.Players[cn].PlayerGui.Notify.Text.BackgroundTransparency = .8
game.Players[cn].PlayerGui.Notify.Text.TextTransparency = 0
game.Players[cn].PlayerGui.Notify.Text.Text = "YOU are un-authorized."
game.Players[cn].PlayerGui.Notify.Sound:Play()
end
script.Parent.ClickDetector.MouseClick:connect(lever)
But for me It says I am authorized(As expected) For my friend Cap it says Un-Authorized. (Not expected) And for my un-authorized friends it says they are authorized (Not expected) so it is basically vise-versa for everyone in the script except me.
