Advertisement
The_Newt

[ROBLOX] Character Appearance Script v4.2

Sep 28th, 2014
12,689
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.04 KB | None | 0 0
  1. --[[
  2. updated 30-09-2014
  3. my version of the loadcharacter script
  4. replace values if you want to
  5. programmed by NewtPewt
  6. ]]--
  7.  
  8. local characterappearancestore = {}
  9. function storecharacterappearance(player)
  10.     storedappearance = {
  11.         characterappearance = {},
  12.         hats = {}
  13.     }
  14.     for i,v in ipairs(character:getchildren()) do
  15.         if v:isa("characterappearance") then
  16.             table.insert(storedappearance.characterappearance, v)
  17.         end
  18.         if v:is("accoutrement") then
  19.             table.insert(storedappearance.hats, v)
  20.         end
  21.     end
  22.     characterappearancestore[player] = storedappearance
  23. end
  24. function restorecharacterappearance(player)
  25.     player:clearcharacterappearance()
  26.     local storedappearance = characterappearancestore[player]
  27.     for i,v in ipairs(storedappearance.hats) do
  28.         v.parent = player.character
  29.     end
  30. end
  31. function playerspawn(character)
  32.     local player = game.players:getplayerfromcharacter(character)
  33.     storecharacterappearance(player)
  34. end
  35. function playeradded(player)
  36.     player.characteradded:connect(playerspawn)
  37. end
  38. game.players.playeradded:connect(playeradded)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement