So i am making a admin tool but i’m using dictonary or table (whatever you guys call it) and i’m kinda stuck on this script. Can someone help me.
local players = game:GetService("Players")
local admintool = game.ServerStorage.Admin
local admins = {
"ulric3456",
"ulric345" -- Random Alt Account
}
game.Players.PlayerAdded:Connect(function()
for i, v in ipairs(admins) do
admintool:Clone().Parent = v.Backpack
end
end)
local players = game:GetService("Players")
local admintool = game.ServerStorage.Admin
local admins = {
"ulric3456",
"ulric345" -- Random Alt Account
}
game.Players.PlayerAdded:Connect(function(plr)
for i, v in ipairs(admins) do
if v == plr.Name then
admintool:Clone().Parent = plr.Backpack
end
end
end)
--//Services
local Players = game:GetService("Players")
local ServerStorage = game:GetService("ServerStorage")
--//Variables
local AdminTool = ServerStorage.Admin
--//Tables
local admins = {
"ulric3456",
"ulric345",
}
--//Functions
Players.PlayerAdded:Connect(function(player)
if table.find(admins, player.Name) then
local Tool = AdminTool:Clone()
Tool.Parent = player.StarterGear
end
end)
local players = game:GetService("Players")
local admintool = game.ReplicatedStorage.Admin -- MOVE YOUR ADMIN TOOL TO THE REPLICATED STORAGE.
local admins = {
"ulric3456",
"ulric345" -- Random Alt Account
}
game.Players.PlayerAdded:Connect(function(player)
for i, v in pairs(admins) do
if v == player.Name then
admintool:Clone().Parent = player.Backpack
break
end
end
end)