#admin gui

10 messages · Page 1 of 1 (latest)

sacred socket
#

first problem, the admin gui is appearing for normal and admin players i want to appear for admin only but idk how i tried lots of tires
second problem, the skip button is the skip a intro but it is not working also
third problem, the mute, kick, ban button is not working too (i added remote events already)

stuck siren
#

show server script

fallow vesselBOT
#

studio** You are now Level 11! **studio

ancient sundial
#

It sucks

sacred socket
# stuck siren show server script

local ReplicatedStorage = game:GetService("ReplicatedStorage")

local banPlayerEvent = ReplicatedStorage:WaitForChild("BanPlayer")
local kickPlayerEvent = ReplicatedStorage:WaitForChild("KickPlayer")
local mutePlayerEvent = ReplicatedStorage:WaitForChild("MutePlayer")

banPlayerEvent.OnServerEvent:Connect(function(admin, reason)
if isAdmin(admin) then
local playerToBan = game.Players:FindFirstChild(admin.Name)
if playerToBan then
playerToBan:Kick("Banned: " .. reason)
print(admin.Name .. " banned " .. playerToBan.Name .. " for reason: " .. reason)
end
end
end)

kickPlayerEvent.OnServerEvent:Connect(function(admin, reason)
if isAdmin(admin) then
local playerToKick = game.Players:FindFirstChild(admin.Name)
if playerToKick then
playerToKick:Kick("Kicked: " .. reason)
print(admin.Name .. " kicked " .. playerToKick.Name .. " for reason: " .. reason)
end
end
end)

mutePlayerEvent.OnServerEvent:Connect(function(admin)
if isAdmin(admin) then
local playerToMute = game.Players:FindFirstChild(admin.Name)
if playerToMute then
print(admin.Name .. " muted " .. playerToMute.Name)
end
end
end)

function isAdmin(player)
local developerIds = {123456789, 987654321}
for _, developerId in ipairs(developerIds) do
if player.UserId == developerId then
return true
end
end
return false
end

stuck siren
timid basin
#

Yeah what pyro said. What ur doing is the admin is kicking the admin. U want to have another arg in the remotevent for the playertokick

#

And yeah chatgpt special on this one