Zeje
|
  |
| Joined: 20 Feb 2014 |
| Total Posts: 1452 |
|
|
| 18 Jul 2016 01:46 PM |
Looking for a script that kicks you from a game if you don't have on a specific tshirt.
Can anyone toss a free model script at me thats like this or something? Thank you~
|
|
|
| Report Abuse |
|
|
robomax11
|
  |
| Joined: 07 Jul 2011 |
| Total Posts: 6828 |
|
|
| 18 Jul 2016 01:48 PM |
if own shirt then plr:Kick('dont own this shirt') end
R$6,227 | 39,365 |
|
|
| Report Abuse |
|
|
Zeje
|
  |
| Joined: 20 Feb 2014 |
| Total Posts: 1452 |
|
|
| 18 Jul 2016 01:50 PM |
So where would the shirt ID go in there?
|
|
|
| Report Abuse |
|
|
Smeers
|
  |
| Joined: 14 Feb 2013 |
| Total Posts: 797 |
|
|
| 18 Jul 2016 01:52 PM |
local ms = game:GetService("MarketplaceService") local itemID = 0
game.Players.PlayerAdded:connect(function(player) if not ms:PlayerOwnsAsset(player,itemID) then player:Kick("You don't own the item needed to play!" end end)
-- Script in workspace/serverscriptservice |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 18 Jul 2016 01:54 PM |
local shirtId = 'http://www.roblox.com/asset/?id=114722068'
HasShirt = function(torso) for i,v in next, torso:GetChildren() do if v:IsA('Decal') then return v end end end
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(char) player.CharacterAppearanceLoaded:connect(function() local shirt = HasShirt(char.Torso) if shirt and not shirt.Texture == shirtId then player:Kick() end end) end) end)
|
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 18 Jul 2016 01:55 PM |
@Smeers that check if the player owns the asset, not if he has it on.
|
|
|
| Report Abuse |
|
|
Zeje
|
  |
| Joined: 20 Feb 2014 |
| Total Posts: 1452 |
|
|
| 18 Jul 2016 01:57 PM |
None of them are working..
|
|
|
| Report Abuse |
|
|
Zeje
|
  |
| Joined: 20 Feb 2014 |
| Total Posts: 1452 |
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 18 Jul 2016 02:03 PM |
if shirt and shirt.Texture ~= shirtId then player:Kick() end
*
|
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 18 Jul 2016 02:04 PM |
Actually i just forgot the parenthesis in my original script.
if shirt and not (shirt.Texture == shirtId) then player:Kick() end
There you go. Have fun with your freebie.
|
|
|
| Report Abuse |
|
|
Zeje
|
  |
| Joined: 20 Feb 2014 |
| Total Posts: 1452 |
|
|
| 18 Jul 2016 02:05 PM |
I guess I should re-word this...
Can someone make a script that would kick someone if they didn't HAVE ON T-Shirt ID 218471695 ???
|
|
|
| Report Abuse |
|
|
Zeje
|
  |
| Joined: 20 Feb 2014 |
| Total Posts: 1452 |
|
| |
|
DinoSal
|
  |
| Joined: 24 Oct 2013 |
| Total Posts: 1117 |
|
|
| 18 Jul 2016 02:14 PM |
game.Players.PlayerAdded:connect(function(plr) wait(1) local player = plr.Character if player:FindFirstChild("Shirt Graphic") then if player:FindFirstChild("Shirt Graphic").Graphic ~= "http://www.roblox.com/asset/?id=IDHERE" then player:remove() end end end)
|
|
|
| Report Abuse |
|
|
Zeje
|
  |
| Joined: 20 Feb 2014 |
| Total Posts: 1452 |
|
| |
|
DinoSal
|
  |
| Joined: 24 Oct 2013 |
| Total Posts: 1117 |
|
|
| 19 Jul 2016 05:11 PM |
mine should work... i tested it
|
|
|
| Report Abuse |
|
|