Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
local DataStoreService = game:GetService("DataStoreService") local PlayerDataStore = DataStoreService:GetDataStore("PlayerDataStore") -- IDs de las texturas predeterminadas en el catálogo de Roblox local DefaultShirtTextureID = -- ID de la textura de la camiseta predeterminada local DefaultPantsTextureID = -- ID de la textura de los pantalones predeterminados game.Players.PlayerAdded:Connect(function(player) local userId = tostring(player.UserId) -- Intentar cargar las texturas guardadas del jugador local success, savedTextures = pcall(function() return PlayerDataStore:GetAsync(userId) end) local character = player.Character if character then character:ClearAllChildren() character.HumanoidRootPart.Anchored = true local humanoid = character:FindFirstChild("Humanoid") humanoid:RemoveAccessories() -- Quitar accesorios existentes local shirt = Instance.new("Shirt") local pants = Instance.new("Pants") if success and savedTextures then shirt.ShirtTemplate = savedTextures.ShirtTemplate or DefaultShirtTextureID pants.PantsTemplate = savedTextures.PantsTemplate or DefaultPantsTextureID else shirt.ShirtTemplate = DefaultShirtTextureID pants.PantsTemplate = DefaultPantsTextureID end shirt.Parent = character pants.Parent = character humanoid:BuildRigFromAttachments() -- Reconstruir el esqueleto character.HumanoidRootPart.Anchored = false end end) game.Players.PlayerRemoving:Connect(function(player) local userId = tostring(player.UserId) local character = player.Character if character then local shirtTemplate = character:FindFirstChild("Shirt"):GetAttribute("ShirtTemplate") local pantsTemplate = character:FindFirstChild("Pants"):GetAttribute("PantsTemplate") local texturesData = { ShirtTemplate = shirtTemplate, PantsTemplate = pantsTemplate } -- Guardar las texturas actuales del jugador en el DataStore pcall(function() PlayerDataStore:SetAsync(userId, texturesData) end) end end)
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)