Disclaimer: I do not own the original model, credit to @Sub2HTR
Get model here: Character Skin Crate System - Roblox
What does yours offer that the original model doesn’t?
- Delete Button: Allow players to delete/sell their duplicated character
elseif instruction == "Delete Skin" then
local character = plr.OwnedCharacters:FindFirstChild(selected)
if plr.EquippedCharacter.Value == selected then
plr.EquippedCharacter.Value = ""
changeCharacter(plr, playerChars[plr.Name])
end
plr.leaderstats.Token.Value += 1
character:Destroy()
end
Preview
-
Weighted: Custom character rarity
You need to add or copy from example character, insert IntValue under a Configuration and you can set any value in the rarity. (50 = 50%)
elseif instruction == "Open Crate" then
local crate = crates:FindFirstChild(selected)
if crate then
local price = crate.Price.Value
if plr.leaderstats.Token.Value >= price then
plr.leaderstats.Token.Value -= price
local unboxableChars = crate.UnboxableCharacters:GetChildren()
local TotalWeight = 0
for i,char in pairs(unboxableChars) do
TotalWeight = TotalWeight + char.Configuration.Rarity.Value
end
local Chance = math.random(1,TotalWeight)
local Counter = 0
for i,char in pairs(unboxableChars) do
Counter = Counter + char.Configuration.Rarity.Value
if Counter >= Chance then
local unboxedChar = char
unboxedChar:Clone().Parent = plr.OwnedCharacters
re:FireClient(plr, "Open Crate", crate, unboxedChar)
end
end
end
end
Preview
I hope you’re able to find this resource useful. Please report any bugs/issues you’re having as a reply to this thread and I’ll get to you when I can!