generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Help with VIP starter tools script

Previous Thread :: Next Thread 
EmeraldRooster is not online. EmeraldRooster
Joined: 18 Aug 2013
Total Posts: 2553
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
Drybones3363 is not online. Drybones3363
Joined: 16 Aug 2013
Total Posts: 1547
02 Nov 2013 02:06 PM
i only know ho to do game passes sorry
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image