Advertisement
Azzz_4565

Untitled

Jul 8th, 2025
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 20.03 KB | None | 0 0
  1. -- SERVICES
  2. local Players = game:GetService("Players")
  3. local TweenService = game:GetService("TweenService")
  4. local RunService = game:GetService("RunService")
  5. local LocalPlayer = Players.LocalPlayer
  6.  
  7. -- COLORS (Updated to Reaper theme)
  8. local pitchBlack = Color3.fromRGB(5, 5, 10)
  9. local bloodGlow = Color3.fromRGB(170, 0, 0)
  10. local ghostWhite = Color3.fromRGB(255, 255, 255)
  11. local dimGray = Color3.fromRGB(30, 30, 30)
  12. local standardBtnColor = dimGray
  13. local darkGold = Color3.fromRGB(180, 140, 30)
  14. local whiteText = ghostWhite
  15. local defaultBtnColor = pitchBlack
  16.  
  17. -- STATES
  18. local toggleOpen = false
  19. local loopList = {}
  20. local playerButtons = {}
  21. local speedBoostOn = false
  22. local antiLagOn = false
  23. local frontLoopMode = false
  24. local loopbringAllActive = false
  25. local attachModeOn = false
  26. local twoSidePositionOn = false
  27. local myDeaths = 0
  28.  
  29. -- ENHANCED KILL TRACKING DATA
  30. local killCounts = {}
  31. local damageTracker = {}
  32. local killConnections = {}
  33. local proximityTracker = {}
  34. local interactionTracker = {}
  35. local bodyDestructionTracker = {}
  36.  
  37. -- GUI
  38. local gui = Instance.new("ScreenGui", LocalPlayer:WaitForChild("PlayerGui"))
  39. gui.Name = "ReaperLoopbringUI"
  40. gui.ResetOnSpawn = false
  41. gui.IgnoreGuiInset = true
  42.  
  43. -- Toggle Button (Updated to Reaper theme)
  44. local toggle = Instance.new("TextButton", gui)
  45. toggle.Size = UDim2.new(0, 130, 0, 30)
  46. toggle.Position = UDim2.new(0, 10, 0, 60) -- Positioned on the left side, pulled down more
  47. toggle.BackgroundColor3 = bloodGlow
  48. toggle.TextColor3 = ghostWhite
  49. toggle.Font = Enum.Font.Antique
  50. toggle.Text = "☠ Reaper Toll ☠"
  51. toggle.TextScaled = true
  52. toggle.BorderSizePixel = 0
  53. toggle.ZIndex = 10
  54.  
  55. -- Floating Words (Reaper theme effect)
  56. local horrorWords = {"DEATH", "SOULS", "FEAR"}
  57. for i = 1, 3 do
  58.     local word = horrorWords[i]
  59.     local lbl = Instance.new("TextLabel", toggle)
  60.     lbl.Size = UDim2.new(0, 35, 0, 12)
  61.     lbl.BackgroundTransparency = 1
  62.     lbl.TextColor3 = Color3.fromRGB(255, 50, 50) -- Bright red color
  63.     lbl.Text = word
  64.     lbl.Font = Enum.Font.GothamBlack
  65.     lbl.TextSize = 8
  66.     lbl.TextScaled = false
  67.     lbl.Rotation = math.random(-15, 15) -- Random slight rotation
  68.     lbl.ZIndex = 12
  69.     -- Position words below the toggle button
  70.     local xOffset = (i - 2) * 35 -- Space them out horizontally
  71.     lbl.Position = UDim2.new(0.5, xOffset - 17, 1, 2) -- Below toggle (y = 1 + 2 offset)
  72.    
  73.     -- Add a subtle glow effect
  74.     lbl.TextStrokeTransparency = 0.5
  75.     lbl.TextStrokeColor3 = Color3.fromRGB(100, 0, 0)
  76. end
  77.  
  78. -- Main Frame (Updated to Reaper theme) - Positioned on the left side
  79. local frame = Instance.new("Frame", gui)
  80. frame.Size = UDim2.new(0, 230, 0, 340)
  81. frame.Position = UDim2.new(0, 10, 0, 100) -- Positioned on the left side, below the toggle
  82. frame.BackgroundColor3 = pitchBlack
  83. frame.BorderSizePixel = 0
  84. frame.Visible = false
  85. frame.Active = true
  86. frame.Draggable = true
  87.  
  88. -- Title (Updated to Reaper theme)
  89. local title = Instance.new("TextLabel", frame)
  90. title.Size = UDim2.new(1, -20, 0, 30)
  91. title.Position = UDim2.new(0, 10, 0, 5)
  92. title.BackgroundTransparency = 1
  93. title.Text = "☠ Psycho Loopbring ☠"
  94. title.TextColor3 = bloodGlow
  95. title.TextScaled = true
  96. title.Font = Enum.Font.Fondamento
  97. title.TextXAlignment = Enum.TextXAlignment.Left
  98.  
  99. -- Death Counter (Updated to Reaper theme)
  100. local myDeathLabel = Instance.new("TextLabel", frame)
  101. myDeathLabel.Size = UDim2.new(1, -20, 0, 30)
  102. myDeathLabel.Position = UDim2.new(0, 10, 0, 35)
  103. myDeathLabel.BackgroundTransparency = 1
  104. myDeathLabel.Text = "☠ My Deaths: 0"
  105. myDeathLabel.TextColor3 = bloodGlow
  106. myDeathLabel.TextScaled = true
  107. myDeathLabel.Font = Enum.Font.Antique
  108. myDeathLabel.TextXAlignment = Enum.TextXAlignment.Left
  109.  
  110. -- Scroll Panel
  111. local scroll = Instance.new("ScrollingFrame", frame)
  112. scroll.Position = UDim2.new(0, 10, 0, 70)
  113. scroll.Size = UDim2.new(1, -20, 1, -80)
  114. scroll.BackgroundTransparency = 1
  115. scroll.BorderSizePixel = 0
  116. scroll.CanvasSize = UDim2.new(0, 0, 0, 0)
  117. scroll.AutomaticCanvasSize = Enum.AutomaticSize.Y
  118. scroll.ScrollBarThickness = 5
  119. scroll.ClipsDescendants = true
  120.  
  121. local layout = Instance.new("UIListLayout", scroll)
  122. layout.SortOrder = Enum.SortOrder.LayoutOrder
  123. layout.Padding = UDim.new(0, 3)
  124.  
  125. -- UTILITIES
  126. local function tweenColor(object, color, duration)
  127.     TweenService:Create(object, TweenInfo.new(duration or 0.25), {BackgroundColor3 = color}):Play()
  128. end
  129.  
  130. local function setNoClip(character, state)
  131.     for _, part in pairs(character:GetDescendants()) do
  132.         if part:IsA("BasePart") then
  133.             part.CanCollide = not state
  134.         end
  135.     end
  136. end
  137.  
  138. -- COMPREHENSIVE KILL TRACKING SYSTEM
  139. local function registerKill(playerName, method)
  140.     killCounts[playerName] = (killCounts[playerName] or 0) + 1
  141.     print("☠ KILL REGISTERED: " .. playerName .. " via " .. method .. " (Total: " .. killCounts[playerName] .. ")")
  142.    
  143.     -- Update display
  144.     local button = playerButtons[playerName]
  145.     if button then
  146.         local killLabel = button:FindFirstChild("KillLabel")
  147.         if killLabel then
  148.             killLabel.Text = "Kills: " .. killCounts[playerName]
  149.         end
  150.     end
  151. end
  152.  
  153. local function isPlayerCausedDeath(player)
  154.     local myChar = LocalPlayer.Character
  155.     if not myChar or not myChar:FindFirstChild("HumanoidRootPart") then return false end
  156.    
  157.     -- Check if we're actively loopbringing this player
  158.     if loopList[player.Name] then
  159.         return true
  160.     end
  161.    
  162.     -- Check proximity (within 25 studs)
  163.     local targetChar = player.Character
  164.     if targetChar and targetChar:FindFirstChild("HumanoidRootPart") then
  165.         local distance = (myChar.HumanoidRootPart.Position - targetChar.HumanoidRootPart.Position).Magnitude
  166.         if distance <= 25 then
  167.             return true
  168.         end
  169.     end
  170.    
  171.     -- Check recent damage interaction
  172.     local damageData = damageTracker[player.Name]
  173.     if damageData and damageData.attacker == LocalPlayer then
  174.         local timeSinceDamage = tick() - damageData.timestamp
  175.         if timeSinceDamage <= 8 then -- 8 second window
  176.             return true
  177.         end
  178.     end
  179.    
  180.     -- Check recent interaction
  181.     local interactionData = interactionTracker[player.Name]
  182.     if interactionData then
  183.         local timeSinceInteraction = tick() - interactionData.timestamp
  184.         if timeSinceInteraction <= 10 then -- 10 second window
  185.             return true
  186.         end
  187.     end
  188.    
  189.     return false
  190. end
  191.  
  192. local function setupKillTracking(player)
  193.     if not killCounts[player.Name] then
  194.         killCounts[player.Name] = 0
  195.     end
  196.    
  197.     local function trackCharacter(character)
  198.         local humanoid = character:WaitForChild("Humanoid", 10)
  199.         if not humanoid then return end
  200.        
  201.         -- Clean up old connections
  202.         if killConnections[player.Name] then
  203.             for _, conn in pairs(killConnections[player.Name]) do
  204.                 if conn then conn:Disconnect() end
  205.             end
  206.         end
  207.         killConnections[player.Name] = {}
  208.        
  209.         -- Method 1: Direct creator tag detection (most reliable)
  210.         local creatorConnection = humanoid.Died:Connect(function()
  211.             task.wait(0.1) -- Allow time for creator tag to appear
  212.             local creatorTag = humanoid:FindFirstChild("creator")
  213.             if creatorTag and creatorTag.Value == LocalPlayer then
  214.                 registerKill(player.Name, "Creator Tag")
  215.                 return
  216.             end
  217.            
  218.             -- If no creator tag, check our tracking methods
  219.             if isPlayerCausedDeath(player) then
  220.                 registerKill(player.Name, "Tracked Death")
  221.             end
  222.         end)
  223.         table.insert(killConnections[player.Name], creatorConnection)
  224.        
  225.         -- Method 2: Health change tracking
  226.         local lastHealth = humanoid.Health
  227.         local healthConnection = humanoid.HealthChanged:Connect(function(newHealth)
  228.             if newHealth < lastHealth and newHealth >= 0 then
  229.                 -- Player took damage, mark us as potential killer
  230.                 damageTracker[player.Name] = {
  231.                     attacker = LocalPlayer,
  232.                     timestamp = tick(),
  233.                     lastDamage = lastHealth - newHealth
  234.                 }
  235.             end
  236.             lastHealth = newHealth
  237.         end)
  238.         table.insert(killConnections[player.Name], healthConnection)
  239.        
  240.         -- Method 3: Body destruction tracking
  241.         local function trackBodyParts()
  242.             for _, part in pairs(character:GetChildren()) do
  243.                 if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
  244.                     local partConnection = part.AncestryChanged:Connect(function()
  245.                         if not part.Parent and isPlayerCausedDeath(player) then
  246.                             -- Body part was destroyed and we're the cause
  247.                             interactionTracker[player.Name] = {
  248.                                 timestamp = tick(),
  249.                                 type = "Body Destruction"
  250.                             }
  251.                         end
  252.                     end)
  253.                     table.insert(killConnections[player.Name], partConnection)
  254.                 end
  255.             end
  256.         end
  257.        
  258.         -- Method 4: Joint breaking tracking
  259.         local function trackJoints()
  260.             for _, joint in pairs(character:GetDescendants()) do
  261.                 if joint:IsA("Motor6D") or joint:IsA("Weld") or joint:IsA("WeldConstraint") then
  262.                     local jointConnection = joint.AncestryChanged:Connect(function()
  263.                         if not joint.Parent and isPlayerCausedDeath(player) then
  264.                             -- Joint was broken and we're the cause
  265.                             interactionTracker[player.Name] = {
  266.                                 timestamp = tick(),
  267.                                 type = "Joint Breaking"
  268.                             }
  269.                         end
  270.                     end)
  271.                     table.insert(killConnections[player.Name], jointConnection)
  272.                 end
  273.             end
  274.         end
  275.        
  276.         -- Method 5: Character destruction tracking
  277.         local charConnection = character.AncestryChanged:Connect(function()
  278.             if not character.Parent and isPlayerCausedDeath(player) then
  279.                 -- Character was destroyed and we're the cause
  280.                 registerKill(player.Name, "Character Destruction")
  281.             end
  282.         end)
  283.         table.insert(killConnections[player.Name], charConnection)
  284.        
  285.         -- Method 6: Humanoid state change tracking
  286.         local stateConnection = humanoid.StateChanged:Connect(function(oldState, newState)
  287.             if newState == Enum.HumanoidStateType.Dead and isPlayerCausedDeath(player) then
  288.                 -- Mark interaction for potential kill attribution
  289.                 interactionTracker[player.Name] = {
  290.                     timestamp = tick(),
  291.                     type = "State Change"
  292.                 }
  293.             end
  294.         end)
  295.         table.insert(killConnections[player.Name], stateConnection)
  296.        
  297.         -- Initialize tracking
  298.         trackBodyParts()
  299.         trackJoints()
  300.        
  301.         -- Track new parts/joints added during character lifetime
  302.         local childAddedConnection = character.ChildAdded:Connect(function(child)
  303.             if child:IsA("BasePart") and child.Name ~= "HumanoidRootPart" then
  304.                 local partConnection = child.AncestryChanged:Connect(function()
  305.                     if not child.Parent and isPlayerCausedDeath(player) then
  306.                         interactionTracker[player.Name] = {
  307.                             timestamp = tick(),
  308.                             type = "New Body Part Destruction"
  309.                         }
  310.                     end
  311.                 end)
  312.                 table.insert(killConnections[player.Name], partConnection)
  313.             end
  314.         end)
  315.         table.insert(killConnections[player.Name], childAddedConnection)
  316.        
  317.         -- Track descendant changes for joints
  318.         local descendantConnection = character.DescendantAdded:Connect(function(descendant)
  319.             if descendant:IsA("Motor6D") or descendant:IsA("Weld") or descendant:IsA("WeldConstraint") then
  320.                 local jointConnection = descendant.AncestryChanged:Connect(function()
  321.                     if not descendant.Parent and isPlayerCausedDeath(player) then
  322.                         interactionTracker[player.Name] = {
  323.                             timestamp = tick(),
  324.                             type = "New Joint Breaking"
  325.                         }
  326.                     end
  327.                 end)
  328.                 table.insert(killConnections[player.Name], jointConnection)
  329.             end
  330.         end)
  331.         table.insert(killConnections[player.Name], descendantConnection)
  332.     end
  333.    
  334.     -- Setup for current character
  335.     if player.Character then
  336.         trackCharacter(player.Character)
  337.     end
  338.    
  339.     -- Setup for future characters
  340.     local charAddedConnection = player.CharacterAdded:Connect(trackCharacter)
  341.     if not killConnections[player.Name] then
  342.         killConnections[player.Name] = {}
  343.     end
  344.     table.insert(killConnections[player.Name], charAddedConnection)
  345. end
  346.  
  347. -- TOGGLE UI
  348. toggle.MouseButton1Click:Connect(function()
  349.     toggleOpen = not toggleOpen
  350.     frame.Visible = toggleOpen
  351.    
  352.     -- Update floating words when toggle is opened
  353.     if toggleOpen then
  354.         for i, child in pairs(toggle:GetChildren()) do
  355.             if child:IsA("TextLabel") then
  356.                 local word = child.Text
  357.                 if word == "DEATH" then
  358.                     child.Text = "DEATH"
  359.                 elseif word == "SOULS" then
  360.                     child.Text = "SOULS"
  361.                 elseif word == "FEAR" then
  362.                     child.Text = "FEAR"
  363.                 end
  364.             end
  365.         end
  366.     end
  367. end)
  368.  
  369. -- SPEED BOOST BUTTON
  370. local speedButton = Instance.new("TextButton", scroll)
  371. speedButton.Size = UDim2.new(1, 0, 0, 28)
  372. speedButton.BackgroundColor3 = standardBtnColor
  373. speedButton.TextColor3 = whiteText
  374. speedButton.Font = Enum.Font.GothamBold
  375. speedButton.TextSize = 13
  376. speedButton.Text = "Speed Boost"
  377. speedButton.LayoutOrder = 0
  378.  
  379. local function applySpeedBoost(state)
  380.     local char = LocalPlayer.Character
  381.     if char then
  382.         local humanoid = char:FindFirstChildOfClass("Humanoid")
  383.         if humanoid then
  384.             humanoid.WalkSpeed = state and 120 or 16
  385.             humanoid.JumpPower = state and 120 or 50
  386.             tweenColor(speedButton, state and darkGold or standardBtnColor)
  387.         end
  388.     end
  389. end
  390.  
  391. speedButton.MouseButton1Click:Connect(function()
  392.     speedBoostOn = not speedBoostOn
  393.     applySpeedBoost(speedBoostOn)
  394. end)
  395.  
  396. -- LOOPBRING POSITION TOGGLE
  397. local loopbringToggleButton = Instance.new("TextButton", scroll)
  398. loopbringToggleButton.Size = UDim2.new(1, 0, 0, 28)
  399. loopbringToggleButton.BackgroundColor3 = standardBtnColor
  400. loopbringToggleButton.TextColor3 = whiteText
  401. loopbringToggleButton.Font = Enum.Font.GothamBold
  402. loopbringToggleButton.TextSize = 13
  403. loopbringToggleButton.Text = "Toggle Loopbring Position"
  404. loopbringToggleButton.LayoutOrder = 1
  405.  
  406. loopbringToggleButton.MouseButton1Click:Connect(function()
  407.     frontLoopMode = not frontLoopMode
  408.     tweenColor(loopbringToggleButton, frontLoopMode and darkGold or standardBtnColor)
  409. end)
  410.  
  411. -- LOOPBRING ALL BUTTON
  412. local loopbringAllButton = Instance.new("TextButton", scroll)
  413. loopbringAllButton.Size = UDim2.new(1, 0, 0, 28)
  414. loopbringAllButton.BackgroundColor3 = standardBtnColor
  415. loopbringAllButton.TextColor3 = whiteText
  416. loopbringAllButton.Font = Enum.Font.GothamBold
  417. loopbringAllButton.TextSize = 13
  418. loopbringAllButton.Text = "Loopbring All"
  419. loopbringAllButton.LayoutOrder = 2
  420.  
  421. loopbringAllButton.MouseButton1Click:Connect(function()
  422.     loopbringAllActive = not loopbringAllActive
  423.     tweenColor(loopbringAllButton, loopbringAllActive and darkGold or standardBtnColor)
  424.     for _, player in pairs(Players:GetPlayers()) do
  425.         if player ~= LocalPlayer and playerButtons[player.Name] then
  426.             loopList[player.Name] = loopbringAllActive or nil
  427.             tweenColor(playerButtons[player.Name], loopbringAllActive and darkGold or defaultBtnColor)
  428.         end
  429.     end
  430. end)
  431.  
  432. -- TWO SIDE POSITION BUTTON
  433. local twoSidePositionButton = Instance.new("TextButton", scroll)
  434. twoSidePositionButton.Size = UDim2.new(1, 0, 0, 28)
  435. twoSidePositionButton.BackgroundColor3 = standardBtnColor
  436. twoSidePositionButton.TextColor3 = whiteText
  437. twoSidePositionButton.Font = Enum.Font.GothamBold
  438. twoSidePositionButton.TextSize = 13
  439. twoSidePositionButton.Text = "2 Side Position: OFF"
  440. twoSidePositionButton.LayoutOrder = 2.5
  441.  
  442. twoSidePositionButton.MouseButton1Click:Connect(function()
  443.     twoSidePositionOn = not twoSidePositionOn
  444.     tweenColor(twoSidePositionButton, twoSidePositionOn and darkGold or standardBtnColor)
  445.     twoSidePositionButton.Text = twoSidePositionOn and "2 Side Position: ON" or "2 Side Position: OFF"
  446. end)
  447.  
  448. -- ATTACH MODE BUTTON
  449. local attachModeButton = Instance.new("TextButton", scroll)
  450. attachModeButton.Size = UDim2.new(1, 0, 0, 28)
  451. attachModeButton.BackgroundColor3 = standardBtnColor
  452. attachModeButton.TextColor3 = whiteText
  453. attachModeButton.Font = Enum.Font.GothamBold
  454. attachModeButton.TextSize = 13
  455. attachModeButton.Text = "Attach Mode: OFF"
  456. attachModeButton.LayoutOrder = 3
  457.  
  458. attachModeButton.MouseButton1Click:Connect(function()
  459.     attachModeOn = not attachModeOn
  460.     attachModeButton.Text = attachModeOn and "Attach Mode: ON" or "Attach Mode: OFF"
  461.     tweenColor(attachModeButton, attachModeOn and darkGold or standardBtnColor)
  462. end)
  463.  
  464. -- ADD PLAYER BUTTONS
  465. local function addPlayerButton(targetPlayer)
  466.     if targetPlayer == LocalPlayer then return end
  467.  
  468.     local button = Instance.new("TextButton")
  469.     button.Size = UDim2.new(1, 0, 0, 28)
  470.     button.BackgroundColor3 = defaultBtnColor
  471.     button.TextColor3 = whiteText
  472.     button.Font = Enum.Font.GothamBold
  473.     button.TextSize = 13
  474.     button.Text = targetPlayer.Name
  475.     button.LayoutOrder = 100
  476.     button.Parent = scroll
  477.  
  478.     local killLabel = Instance.new("TextLabel", button)
  479.     killLabel.Name = "KillLabel"
  480.     killLabel.Size = UDim2.new(0, 60, 1, 0)
  481.     killLabel.Position = UDim2.new(1, -65, 0, 0)
  482.     killLabel.BackgroundTransparency = 1
  483.     killLabel.TextColor3 = Color3.new(1, 0.2, 0.2)
  484.     killLabel.Font = Enum.Font.GothamBold
  485.     killLabel.TextSize = 12
  486.     killLabel.TextXAlignment = Enum.TextXAlignment.Right
  487.     killLabel.Text = "Kills: 0"
  488.  
  489.     -- Initialize kill tracking for this player
  490.     setupKillTracking(targetPlayer)
  491.  
  492.     button.MouseButton1Click:Connect(function()
  493.         local name = targetPlayer.Name
  494.         loopList[name] = not loopList[name]
  495.         tweenColor(button, loopList[name] and darkGold or defaultBtnColor)
  496.     end)
  497.  
  498.     playerButtons[targetPlayer.Name] = button
  499. end
  500.  
  501. -- CLEANUP ON PLAYER LEAVE
  502. Players.PlayerRemoving:Connect(function(player)
  503.     if playerButtons[player.Name] then
  504.         playerButtons[player.Name]:Destroy()
  505.         playerButtons[player.Name] = nil
  506.     end
  507.    
  508.     -- Clean up all tracking data
  509.     if killConnections[player.Name] then
  510.         for _, conn in pairs(killConnections[player.Name]) do
  511.             if conn then conn:Disconnect() end
  512.         end
  513.         killConnections[player.Name] = nil
  514.     end
  515.    
  516.     killCounts[player.Name] = nil
  517.     damageTracker[player.Name] = nil
  518.     interactionTracker[player.Name] = nil
  519.     proximityTracker[player.Name] = nil
  520.     bodyDestructionTracker[player.Name] = nil
  521.     loopList[player.Name] = nil
  522. end)
  523.  
  524. -- INIT ALL PLAYERS
  525. for _, p in ipairs(Players:GetPlayers()) do
  526.     addPlayerButton(p)
  527. end
  528. Players.PlayerAdded:Connect(addPlayerButton)
  529.  
  530. -- CHARACTER SPAWN (Updated to match first script)
  531. LocalPlayer.CharacterAdded:Connect(function(char)
  532.     if speedBoostOn then
  533.         local humanoid = char:WaitForChild("Humanoid", 5)
  534.         if humanoid then
  535.             applySpeedBoost(true)
  536.         end
  537.     end
  538.    
  539.     -- Death tracking
  540.     local humanoid = char:WaitForChild("Humanoid", 5)
  541.     if humanoid then
  542.         humanoid.Died:Connect(function()
  543.             myDeaths = myDeaths + 1
  544.             myDeathLabel.Text = "☠ My Deaths: " .. myDeaths
  545.         end)
  546.     end
  547. end)
  548.  
  549. -- Two Side Position loopbring function
  550. local function loopbringTwoSidePosition(myHRP, activeTargets)
  551.     for i, char in ipairs(activeTargets) do
  552.         local hrp = char:FindFirstChild("HumanoidRootPart")
  553.         if hrp then
  554.             setNoClip(char, true)
  555.             hrp.Velocity = Vector3.new(0, 0, 0)
  556.             hrp.RotVelocity = Vector3.new(0, 0, 0)
  557.  
  558.             local side = (i % 2 == 1) and -1 or 1
  559.             local targetPos = Vector3.new(
  560.                 myHRP.Position.X + (myHRP.CFrame.RightVector * (side * 1)).X + (myHRP.CFrame.LookVector * 2).X,
  561.                 myHRP.Position.Y,
  562.                 myHRP.Position.Z + (myHRP.CFrame.RightVector * (side * 1)).Z + (myHRP.CFrame.LookVector * 2).Z
  563.             )
  564.             hrp.CFrame = CFrame.new(targetPos) * CFrame.Angles(0, math.rad(myHRP.Orientation.Y), 0)
  565.         end
  566.     end
  567. end
  568.  
  569. -- LOOPBRING CORE LOOP
  570. task.spawn(function()
  571.     while true do
  572.         local myHRP = LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
  573.         if myHRP then
  574.             local activeTargets = {}
  575.             for name, active in pairs(loopList) do
  576.                 if active then
  577.                     local target = Players:FindFirstChild(name)
  578.                     if target and target.Character and target.Character:FindFirstChild("HumanoidRootPart") then
  579.                         table.insert(activeTargets, target.Character)
  580.                     end
  581.                 end
  582.             end
  583.  
  584.             if twoSidePositionOn and #activeTargets > 0 then
  585.                 loopbringTwoSidePosition(myHRP, activeTargets)
  586.             else
  587.                 for name, active in pairs(loopList) do
  588.                     if active then
  589.                         local target = Players:FindFirstChild(name)
  590.                         if target and target.Character then
  591.                             local hrp = target.Character:FindFirstChild("HumanoidRootPart")
  592.                             if hrp then
  593.                                 setNoClip(target.Character, true)
  594.                                 hrp.Velocity = Vector3.zero
  595.                                 hrp.RotVelocity = Vector3.zero
  596.  
  597.                                 local offset
  598.                                 if attachModeOn then
  599.                                     myHRP.CFrame = hrp.CFrame
  600.                                 else
  601.                                     if frontLoopMode then
  602.                                         offset = myHRP.CFrame.LookVector * 3 + Vector3.new(0, 1, 0)
  603.                                     else
  604.                                         offset = myHRP.CFrame.RightVector * 3 + myHRP.CFrame.LookVector + Vector3.new(0, 1, 0)
  605.                                     end
  606.                                     hrp.CFrame = myHRP.CFrame + offset
  607.                                 end
  608.                             end
  609.                         end
  610.                     end
  611.                 end
  612.             end
  613.         end
  614.         task.wait(0)
  615.     end
  616. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement