RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"Create a admin only tool script inside serverscript and tool located in replicatedstorage"
-- server script (ServerScriptService) local ReplicatedStorage = game:GetService("ReplicatedStorage") local tool = ReplicatedStorage:WaitForChild("AdminTool") local Players = game:GetService("Players") local function isAdmin(player) -- Add admin user IDs here local adminIds = {123456, 789012} for _, id in ipairs(adminIds) do if player.UserId == id then return true end end return false end local function onPlayerAdded(player) if isAdmin(player) then local toolClone = tool:Clone() toolClone.Parent = player.Backpack end end Players.PlayerAdded:Connect(onPlayerAdded) for _, player in ipairs(Players:GetPlayers()) do onPlayerAdded(player) end