-- ModuleScript Shared (via decompile) local RunService_upv_1 = game:GetService("RunService") local _ = game:GetService("CollectionService") local tbl_upv_1 = {} function tbl_upv_1.RandomizeDirection(a1, a2, a3, a4) --[[ name: RandomizeDirection line: 6 ]] local v1 = a4.SprayAngle * 100 local v2 = a3:NextInteger(-v1, v1) / 100 local v3 = a3:NextInteger(-v1, v1) / 100 local v4 = math.rad(v2) local v5 = math.rad(v3) return (CFrame.new(a1, a1 + a2) * CFrame.Angles(v4 * a4.SpreadFactor, v5 * a4.SpreadFactor, 0)).LookVector end tbl_upv_1.Coroutine = function(a1, ...) --[[ line: 13 ]] if not a1 then return end task.spawn(a1, ...) end function tbl_upv_1.AwaitCharacter(a1) --[[ name: AwaitCharacter line: 32 upvalues: RunService_upv_1 (copy, index: 1) ]] local Character_1 = a1.Character while true do if not (Character_1) then Character_1 = a1.Character RunService_upv_1.Heartbeat:Wait() continue end if Character_1.Parent then break end Character_1 = a1.Character RunService_upv_1.Heartbeat:Wait() end return Character_1 end function tbl_upv_1.SetValues(a1, a2) --[[ name: SetValues line: 41 upvalues: tbl_upv_1 (copy, index: 1) ]] local v6 = tbl_upv_1.AwaitCharacter(a2) a1.Player = a2 a1.Character = v6 a1.Humanoid = v6:WaitForChild("Humanoid") a1.RootPart = v6:WaitForChild("HumanoidRootPart", 10) return a1 end function tbl_upv_1.GetPlayerFromTool(a1) --[[ name: GetPlayerFromTool line: 52 ]] local Parent_1 = a1.Parent if not Parent_1 then return end if Parent_1:FindFirstChildWhichIsA("Humanoid") then return game:GetService("Players"):GetPlayerFromCharacter(Parent_1) elseif Parent_1:IsA("Backpack") then return Parent_1.Parent end end local function Update(a1) --[[ name: Update line: 65 upvalues: Update (copy, index: 1) tbl_upv_1 (copy, index: 2) ]] if a1.IsDestroyed then return end local Parent_2 = a1.Instance.Parent local Character_2 = a1.Character if Parent_2 then a1._DestroyPending = false if Parent_2 ~= Character_2 then a1.IsEquipped = false a1.Unequipped:Fire() a1.EquipTrove:Destroy(true) tbl_upv_1.Coroutine(a1.OnUnequip, a1) else a1.IsEquipped = true a1.Equipped:Fire() tbl_upv_1.Coroutine(a1.OnEquip, a1) end elseif not a1._DestroyPending then a1._DestroyPending = true task.delay( 0.1, function() --[[ line: 80 upvalues: a1 (copy, index: 1) Update (copy, index: 2) tbl_upv_1 (copy, index: 3) ]] a1._DestroyPending = false if a1.IsDestroyed then return end if a1.Instance.Parent == nil then a1.IsEquipped = false a1.IsDestroyed = true a1.EquipTrove:Destroy(true) a1.Trove:Destroy(true) tbl_upv_1.Coroutine(a1.OnDestroy, a1) if a1.aimAssistController then a1.aimAssistController:destroy() end else Update(a1) end end ) end end function tbl_upv_1.Client_BindEvents(a1) --[[ name: Client_BindEvents line: 119 upvalues: tbl_upv_1 (copy, index: 1) Update (copy, index: 2) ]] local u1 = nil local u2 = nil local function UpdateObject() --[[ name: UpdateObject line: 124 upvalues: tbl_upv_1 (copy, index: 1) a1 (copy, index: 2) u1 (ref, index: 3) u2 (ref, index: 4) Update (copy, index: 5) ]] if tbl_upv_1.GetPlayerFromTool(a1.Instance) ~= a1.Player then if u1 then a1.Trove:Remove(u1) u1:Disconnect() end if u2 then a1.Trove:Remove(u2) u2:Disconnect() end end Update(a1) end UpdateObject() u1 = a1.Trove:Add(a1.Instance:GetPropertyChangedSignal("Parent"):Connect(UpdateObject)) local v7 = a1.Trove:Add( a1.Character:GetPropertyChangedSignal("Parent"):Connect( function() --[[ line: 142 upvalues: a1 (copy, index: 1) ]] if a1.Character.Parent then return end local Character_upv_3 = a1.Character task.delay( 2, function() --[[ line: 148 upvalues: a1 (copy, index: 1) Character_upv_3 (copy, index: 2) ]] if not a1.Instance or not a1.Instance.Parent then return end if (not Character_upv_3 or not Character_upv_3.Parent) and (not a1.Player or not a1.Player.Character or a1.Player.Character == Character_upv_3) then a1.Instance:Destroy() return end end ) end ) ) u2 = v7 end function tbl_upv_1.Server_BindEvents(a1) --[[ name: Server_BindEvents line: 166 upvalues: tbl_upv_1 (copy, index: 1) Update (copy, index: 2) ]] local Instance_upv_1 = a1.Instance local u3 = false local u4 = nil local u5 = nil local function UpdateObject_2() --[[ name: UpdateObject line: 171 upvalues: tbl_upv_1 (copy, index: 1) Instance_upv_1 (copy, index: 2) u3 (ref, index: 3) u4 (ref, index: 4) u5 (ref, index: 5) a1 (copy, index: 6) Update (copy, index: 7) ]] local v8 = tbl_upv_1.GetPlayerFromTool(Instance_upv_1) if v8 then if v8 == a1.Player then Update(a1) else if u3 then u4:Disconnect() u5:Disconnect() Update(a1) end u3 = true tbl_upv_1.SetValues(a1, v8) if Instance_upv_1.Parent == a1.Character then Update(a1) end local u6 = nil local v9 = a1.Humanoid.Died:Connect( function() --[[ line: 199 upvalues: u6 (ref, index: 1) tbl_upv_1 (copy, index: 2) a1 (copy, index: 3) ]] if u6 then task.cancel(u6) u6 = nil end local v10 = task.delay( 2, function() --[[ line: 205 upvalues: tbl_upv_1 (copy, index: 1) a1 (copy, index: 2) ]] local v11 = tbl_upv_1.GetPlayerFromTool(a1.Instance) if not a1.Instance then return end if (v11 == nil or v11 == a1.Player) and (a1.Humanoid) and (a1.Humanoid.Health <= 0) then a1.Instance:Destroy() end end ) u6 = v10 end ) u4 = v9 local v12 = a1.Character:GetPropertyChangedSignal("Parent"):Connect( function() --[[ line: 214 upvalues: a1 (copy, index: 1) ]] if a1.Character.Parent then return end local Character_upv_4 = a1.Character task.delay( 2, function() --[[ line: 220 upvalues: a1 (copy, index: 1) Character_upv_4 (copy, index: 2) ]] if not a1.Instance or not a1.Instance.Parent then return end if (not Character_upv_4 or not Character_upv_4.Parent) and (not a1.Player or not a1.Player.Character or a1.Player.Character == Character_upv_4) then a1.Instance:Destroy() return end end ) end ) u5 = v12 end elseif u3 then u3 = false u4:Disconnect() u5:Disconnect() a1.Player = nil Update(a1) elseif not Instance_upv_1.Parent then Update(a1) end end task.spawn(UpdateObject_2) Instance_upv_1:GetPropertyChangedSignal("Parent"):Connect(UpdateObject_2) end return tbl_upv_1