i need a script

WizardOfHills

Active Member
Jul 21, 2018
254
48
28
Roblox
WizardOfHills
Following script should be placed in ServerScriptService.
Code:
local players = game.Players

ASSETID = 15727015

function AssetLocatedOnPlayer(player)
    -- do here what you want to happen when a player with         
    -- a given asset joins the game
    print (player.Name .. " has asset " .. ASSETID .. " equiped.")
end

players.PlayerAdded:Connect(function(player)
    local info = players:GetCharacterAppearanceInfoAsync(player.UserId)
    if info and info.assets then
        for _, o in ipairs(info.assets) do
            if o.id == ASSETID then
                AssetLocatedOnPlayer(player)
                break
            end
        end 
    end
end)