Wimpy1
|
  |
| Joined: 25 Oct 2009 |
| Total Posts: 20 |
|
|
| 23 Jan 2012 11:32 PM |
| How do i script a shirt so when people buy the shirt they get admin powers? i know how to script admin and add people on to the admin list |
|
|
| Report Abuse |
|
|
|
| 24 Jan 2012 12:47 AM |
shirt = {######} --Replace "######" with a number
function onPlayerAdded(player) if player:findFirstChild("ShirtGraphic") then if player.ShirtGraphic:IsA("ShirtGraphic") then for _,value in pairs(shirt) do if player.ShirtGraphic.Texture = "http://www.roblox.com/asset/?id="..value then ... end end end end end
game.Players:PlayerAdded:connect(onPlayerAdded) |
|
|
| Report Abuse |
|
|
|
| 24 Jan 2012 12:49 AM |
I made a mistake, here is the new script:
shirt = {######} --Replace "######" with a number
function onPlayerAdded(player) if player:findFirstChild("ShirtGraphic") then if player.ShirtGraphic:IsA("ShirtGraphic") then for _,value in pairs(shirt) do if player.ShirtGraphic.Graphic = "http://www.roblox.com/asset/?id="..value then ... end end end end end
game.Players:PlayerAdded:connect(onPlayerAdded) |
|
|
| Report Abuse |
|
|
|
| 24 Jan 2012 02:37 AM |
@cheat you just have to complicate things :P this script will work if the person has the shirt even if they aren't wearing it:
local shirt = ###### --Replace "######" with a number
function onPlayerAdded(player) if (game:GetService("BadgeService"):UserHasBadge(shirt,player.userId)) then ... end end
game.Players:PlayerAdded:connect(onPlayerAdded) |
|
|
| Report Abuse |
|
|
Wimpy1
|
  |
| Joined: 25 Oct 2009 |
| Total Posts: 20 |
|
|
| 15 Feb 2012 10:06 PM |
| ok guys thx i will use that when i get bc again to script shirts |
|
|
| Report Abuse |
|
|