-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautodelpet
More file actions
59 lines (52 loc) · 1.86 KB
/
Copy pathautodelpet
File metadata and controls
59 lines (52 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
local Remote_ = workspace.__THINGS.__REMOTES["delete several pets"];
local Library = nil;
_G.Enabled = true;
_G.Settings = {MinimumStats = "6.63k"};
-- ^ deletes pets with stats under this value
-- scripted by RebirthTestAcc. Do not re-release without credit
coroutine.wrap(function()
Library = require(game.ReplicatedStorage:WaitForChild("Framework"):WaitForChild("Library"));
end)();
-- [1]
local PlayerData = Library.Save.Get(Library.LocalPlayer);
local Pets = PlayerData.Pets;
local UI = game:GetService("Players").LocalPlayer.PlayerGui.Inventory.Frame.Main.Pets;
local suffixes = {'k','m'};
local function reverseString(str)
if not (str and type(str) == 'string') then
error('invalid parameters.\nP1 - string: string', 2)
end
local totalMagnitude = 1
for key, suffix in pairs(suffixes) do
str = string.gsub(str, suffix, function()
totalMagnitude = totalMagnitude * (10 ^ (key * 3))
return ''
end)
end
if not tonumber(str) then
error('invalid parameter #1: Expected a string which could be converted to a number, got "'..str..'"', 2)
end
return totalMagnitude * str
end
function GetPetInfo(uid_)
for i,v in pairs(Pets) do
if v.uid == uid_ then
return v.nk;
end
end
end
UI.ChildAdded:Connect(function(littlekid)
if _G.Enabled == true then
local PetStat = littlekid:FindFirstChild("Level");
if PetStat then
PetStat = tostring(PetStat.Text);
if type(PetStat) == "string" then
if reverseString(PetStat) < reverseString(_G.Settings.MinimumStats) then
print("aww rip")
Remote_:InvokeServer({{tostring(littlekid.Name)}});
print(string.format("a %s pet deleted from your inventory!", PetStat));
end
end
end
end
end)