|
| 02 Nov 2013 01:38 PM |
admins = { ""} function checkIfAdmin(name) for i = 1,#admins do if (string.lower(name) == string.lower(admins[i])) then return true end end return false end
function onPlayerRespawned(player) if checkIfAdmin(player.Name) then local item1 = game.Lighting.BanHammer:clone() -- Change Tool to whatever tool you want to give, and be sure to put that tool in Lighting. item1.Parent = player.Backpack end end
function onPlayerEntered(newPlayer) newPlayer.Changed:connect(function (property) if (property == "Character") then onPlayerRespawned(newPlayer) end end) end
game.Players.ChildAdded:connect(onPlayerEntered)
How would I make this to work with a vip t-shirt |
|
|
| Report Abuse |
|
|
|
| 02 Nov 2013 02:06 PM |
| i only know ho to do game passes sorry |
|
|
| Report Abuse |
|
|
|
| 02 Nov 2013 02:15 PM |
Put the shirt of gamepass id in the Items table. Put names in the Admin table. And put what to give the people in the Tools table.
local Admins = {"notsopwnedg","Person","Bob"} local Items = {} local Tools = {Game.Lighting.BanHammer} function isAllowed(Player) for _,n in pairs(Admins) do if Player.Name:lower() == n:lower() then return true end end for _,n in pairs(Items) do if Game:GetService("MarketplaceService"):PlayerOwnsAsset(Player,n) then return true end end return false end
Game.Players.PlayerAdded:connect(function(Player) if isAllowed(Player) then for _,n in pairs(Tools) then n:Clone().Parent = Player.Backpack n:Clone.Parent = Player.StarterGear end end end) |
|
|
| Report Abuse |
|
|