-- KI Whitelist (OP Users who cannot be touched) local OP_Users = { [YourUserIDHere] = true -- Change this to YOUR Roblox ID }
if command == "Kick" then if OP_Users[target.UserId] then player:Kick("Attempted to kick an OP user. Access denied.") else target:Kick(reason) end elseif command == "Ban" then banPlayer(player, target, reason) end end) op player kick ban panel gui script fe ki better
-- Kick immunity override local oldKick = Players.Player.Kick function Players.Player:Kick(reason) if OP_Users[self.UserId] then return false -- BLOCKED: User has KI end return oldKick(self, reason or "Kicked by admin") end -- KI Whitelist (OP Users who cannot be
A local GUI cannot directly kick or ban. It must communicate with a server-side script. Reason = reason
local ReplicatedStorage = game:GetService("ReplicatedStorage") local Players = game:GetService("Players") local DataStoreService = game:GetService("DataStoreService") local banStore = DataStoreService:GetDataStore("BannedPlayers") local remote = Instance.new("RemoteEvent") remote.Name = "AdminCommand" remote.Parent = ReplicatedStorage
-- Ban function function banPlayer(executor, target, reason) if OP_Users[target.UserId] then executor:Kick("You cannot ban an OP user with KI.") return end local data = { Banner = executor.Name, Reason = reason, Time = os.time() } banStore:SetAsync(target.UserId, data) target:Kick("Banned: " .. reason) end