I am making a script where if you are a mod, then you will be given a kick gui, but it ends up giving me the gui when my name isn't in the if
statement
Script:
local notification = script.Parent.Moderator local Console = script.Parent.Mod local button = script.Parent.ModButton local exit = script.Parent.Mod.Exit game.Players.LocalPlayer.CharacterAdded:Connect(function() if game.Players.LocalPlayer.Name == 'toxiccitron123' or 'LexiPadmore' or 'stephencurry90909' then notification:TweenPosition(UDim2.new(0.5, -244, 0, 0)) button:TweenPosition(UDim2.new(1, -105, 1, -55), 'In', 1) wait(5) notification:TweenPosition(UDim2.new(0.5, -244, -1, 0)) end end) button.MouseButton1Click:Connect(function() Console:TweenPosition(UDim2.new(1, -150, 0.5, -119), 'In', 1) end) exit.MouseButton1Click:Connect(function() Console:TweenPosition(UDim2.new(2, -150, 0.5, -119), 'Out', 1) end)
LocalScript
Here's an easier way for checking if the player is a moderator:
local mods = { ['toxiccitron123'] = {}; ['LexiPadmore'] = {}; ['stephencurry90909'] = {}; } if mods[game.Players.LocalPlayer.Name] then -- replace like 6 with this