Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Decompiled with the Synapse X Luau decompiler.
- local v1 = {};
- local v2 = require(game.ReplicatedStorage.Assets.Modules.Services);
- local v3 = require(script.PetClass);
- v1.PetClass = v3;
- local l__Dot__4 = Vector2.new().Dot;
- local l__Vector2_new__1 = Vector2.new;
- local u2 = v2:GetService("Library")("ShinyModifier");
- local u3 = {};
- function v1.CreatePet(p1, p2, p3, p4)
- local v5 = p2.Character.PrimaryPart.Position - Vector3.new(0, 2.5, 0);
- if p3.Shiny.Value == true then
- u2:Modify(p3);
- end;
- local v6 = v3.new(p2, p3, p4);
- u3[v6] = true;
- p1:UpdateOffsets(p2);
- v6:Spawn(v5);
- if p3.Name == "Beta TV" and not p3.Decore.Screen:FindFirstChild("TVManager") then
- spawn(function()
- require(script.TVManager)(p3);
- end);
- end;
- if p3:FindFirstChild("AnimateColor") then
- p3.AnimateColor.Disabled = false;
- end;
- end;
- function v1.RemovePet(p5, p6, p7)
- for v7, v8 in next, u3 do
- if v7.Owner == p6 and v7.GUID == p7 then
- v7:Destroy();
- u3[v7] = nil;
- return;
- end;
- end;
- end;
- function v1.UpdateOffsets(p8, p9)
- local v9 = {};
- for v10, v11 in next, u3 do
- if v10.Owner == p9 then
- v9[#v9 + 1] = v10;
- end;
- end;
- local v12 = #v9;
- local v13 = Random.new();
- local v14 = math.pi * 2 / v12;
- for v15 = 1, v12 do
- local v16 = v9[v15];
- v16.Offset = CFrame.Angles(0, v14 * v15 + v13:NextNumber(-v14 * 0.3, v14 * 0.3), 0) * Vector3.new(0, -2.5, v16.Radius);
- end;
- end;
- local u4 = require(game.ReplicatedStorage.Assets.Modules.SoundService);
- local l__TweenService__5 = v2:GetService("TweenService");
- local l__LocalPlayer__6 = game.Players.LocalPlayer;
- local function u7(p10, p11)
- local v17 = script.Glow:Clone();
- v17.Parent = p10.PrimaryPart;
- v17:Emit(100);
- local v18 = game.ReplicatedStorage.Assets.LevelUp:Clone();
- v18.Icon.ImageTransparency = 1;
- v18.Icon.Size = UDim2.new();
- v18.Amount.TextTransparency = 1;
- v18.Amount.TextStrokeTransparency = 1;
- v18.Amount.Text = p11;
- v18.Parent = p10.PrimaryPart;
- u4:Play({
- Parent = p10.PrimaryPart,
- Name = "LevelUp",
- Volume = 0.25
- });
- local l__Icon__19 = v18:FindFirstChild("Icon");
- if l__Icon__19 then
- l__TweenService__5:Create(l__Icon__19, TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0), {
- Rotation = 720,
- ImageTransparency = 0,
- Size = UDim2.new(1, 0, 1, 0)
- }):Play();
- end;
- wait(0.5);
- if v18:FindFirstChild("Amount") then
- l__TweenService__5:Create(v18.Amount, TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0), {
- TextTransparency = 0,
- TextStrokeTransparency = 0.5
- }):Play();
- delay(1.5, function()
- l__TweenService__5:Create(v18.Amount, TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0), {
- TextTransparency = 1,
- TextStrokeTransparency = 1
- }):Play();
- l__TweenService__5:Create(v18.Icon, TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0), {
- ImageTransparency = 1
- }):Play();
- end);
- end;
- delay(2, function()
- v18:Destroy();
- end);
- delay(5, function()
- v17:Destroy();
- end);
- end;
- local function u8(p12, p13)
- local v20 = game.ReplicatedStorage.Assets.XP:Clone();
- v20.Parent = p12.PrimaryPart;
- if p13 == "MAXED" then
- v20.Amount.Text = "MAX LEVEL!";
- else
- v20.Amount.Text = "+" .. p13;
- end;
- local v21 = math.random(75, 150) / 100;
- l__TweenService__5:Create(v20, TweenInfo.new(v21, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0), {
- StudsOffset = Vector3.new(0, 5, 0)
- }):Play();
- delay(v21, function()
- l__TweenService__5:Create(v20.Amount, TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0), {
- TextTransparency = 1,
- TextStrokeTransparency = 1
- }):Play();
- l__TweenService__5:Create(v20.Icon, TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0), {
- ImageTransparency = 1
- }):Play();
- wait(0.5);
- v20:Destroy();
- end);
- end;
- local l__RunService__9 = v2:GetService("RunService");
- function v1.Initialize(p14, p15)
- for v22, v23 in pairs(game.Workspace.Pets:GetChildren()) do
- local l__Value__24 = v23.Owner.Value;
- if l__Value__24 and l__Value__24.Parent then
- v1:CreatePet(l__Value__24, v23, v23.GUID.Value);
- else
- v23:Destroy();
- end;
- end;
- p15:Bind("SpawnPet", function(p16, p17, p18)
- v1:CreatePet(p16, p17, p18);
- p14:UpdateOffsets(p16);
- end);
- p15:Bind("DespawnPet", function(p19, p20)
- v1:RemovePet(p19, p20);
- p14:UpdateOffsets(p19);
- end);
- p15:Bind("LevelPetUp", function(p21, p22)
- for v25, v26 in next, u3 do
- if v25.Owner == l__LocalPlayer__6 and v25.GUID == p21 then
- u7(v25.Model, p22);
- return;
- end;
- end;
- end);
- p15:Bind("DisplayPetXP", function(p23)
- for v27 = 1, #p23 do
- for v28, v29 in next, u3 do
- if v28.Owner == l__LocalPlayer__6 and v28.GUID == p23[v27][1] then
- u8(v28.Model, p23[v27][2]);
- break;
- end;
- end;
- end;
- end);
- l__RunService__9:BindToRenderStep("PetRendering", Enum.RenderPriority.Character.Value + 1, function(p24)
- for v30, v31 in next, u3 do
- if not v30.Owner.Parent then
- v30:Destroy();
- u3[v30] = nil;
- else
- v30:Update();
- end;
- end;
- end);
- end;
- game.Players.PlayerRemoving:Connect(function(p25)
- for v32, v33 in next, u3 do
- if v32.Owner == p25 then
- v32:Destroy();
- u3[v32] = nil;
- end;
- end;
- end);
- return v1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement