MBST15

Untitled

Jun 19th, 2025
8,652
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.45 KB | None | 0 0
  1. -- Better Bring Parts Ui (by mourd1123)
  2. local Players = game:GetService("Players")
  3. local RunService = game:GetService("RunService")
  4. local UserInputService = game:GetService("UserInputService")
  5. local Workspace = game:GetService("Workspace")
  6.  
  7. -- Create GUI
  8. local Gui = Instance.new("ScreenGui")
  9. Gui.Name = "Gui"
  10. Gui.Parent = gethui()
  11. Gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  12.  
  13. -- Main Frame
  14. local Main = Instance.new("Frame")
  15. Main.Name = "Main"
  16. Main.Size = UDim2.new(0, 250, 0, 140)
  17. Main.Position = UDim2.new(0.5, -125, 0.5, -70)
  18. Main.BackgroundColor3 = Color3.fromRGB(100, 60, 140)
  19. Main.BorderSizePixel = 0
  20. Main.Active = true
  21. Main.Draggable = true
  22. Main.Parent = Gui
  23.  
  24. local UICorner = Instance.new("UICorner")
  25. UICorner.CornerRadius = UDim.new(0, 8)
  26. UICorner.Parent = Main
  27.  
  28. -- Title
  29. local Label = Instance.new("TextLabel")
  30. Label.Size = UDim2.new(1, 0, 0, 30)
  31. Label.BackgroundColor3 = Color3.fromRGB(80, 40, 120)
  32. Label.BorderSizePixel = 0
  33. Label.Text = "بدأ | by mourd1123"
  34. Label.TextColor3 = Color3.fromRGB(255, 255, 255)
  35. Label.TextSize = 14
  36. Label.Font = Enum.Font.GothamBold
  37. Label.Parent = Main
  38.  
  39. local UICorner_2 = Instance.new("UICorner")
  40. UICorner_2.CornerRadius = UDim.new(0, 8)
  41. UICorner_2.Parent = Label
  42.  
  43. -- Input
  44. local Box = Instance.new("TextBox")
  45. Box.Size = UDim2.new(0.85, 0, 0, 30)
  46. Box.Position = UDim2.new(0.075, 0, 0.35, 0)
  47. Box.BackgroundColor3 = Color3.fromRGB(120, 80, 160)
  48. Box.BorderSizePixel = 0
  49. Box.PlaceholderText = "Player here"
  50. Box.Text = ""
  51. Box.TextColor3 = Color3.fromRGB(255, 255, 255)
  52. Box.PlaceholderColor3 = Color3.fromRGB(200, 200, 200)
  53. Box.TextSize = 13
  54. Box.Font = Enum.Font.GothamSemibold
  55. Box.Parent = Main
  56.  
  57. local UICorner_3 = Instance.new("UICorner")
  58. UICorner_3.CornerRadius = UDim.new(0, 6)
  59. UICorner_3.Parent = Box
  60.  
  61. -- Button
  62. local Button = Instance.new("TextButton")
  63. Button.Size = UDim2.new(0.85, 0, 0, 30)
  64. Button.Position = UDim2.new(0.075, 0, 0.7, 0)
  65. Button.BackgroundColor3 = Color3.fromRGB(140, 60, 200)
  66. Button.BorderSizePixel = 0
  67. Button.Text = "بدأ | Off"
  68. Button.TextColor3 = Color3.fromRGB(255, 255, 255)
  69. Button.TextSize = 14
  70. Button.Font = Enum.Font.GothamBold
  71. Button.Parent = Main
  72.  
  73. local UICorner_4 = Instance.new("UICorner")
  74. UICorner_4.CornerRadius = UDim.new(0, 6)
  75. UICorner_4.Parent = Button
  76.  
  77. -- Variables
  78. local LocalPlayer = Players.LocalPlayer
  79. local character, humanoidRootPart
  80. local mainStatus = true
  81. local player = nil
  82.  
  83. UserInputService.InputBegan:Connect(function(input, gp)
  84.     if input.KeyCode == Enum.KeyCode.RightControl and not gp then
  85.         mainStatus = not mainStatus
  86.         Main.Visible = mainStatus
  87.     end
  88. end)
  89.  
  90. -- Network
  91. local Folder = Instance.new("Folder", Workspace)
  92. local Part = Instance.new("Part", Folder)
  93. local Attachment1 = Instance.new("Attachment", Part)
  94. Part.Anchored = true
  95. Part.CanCollide = false
  96. Part.Transparency = 1
  97.  
  98. if not getgenv().Network then
  99.     getgenv().Network = {
  100.         BaseParts = {},
  101.         Velocity = Vector3.new(14.46, 14.46, 14.46)
  102.     }
  103.  
  104.     Network.RetainPart = function(p)
  105.         if p:IsA("BasePart") and p:IsDescendantOf(Workspace) then
  106.             table.insert(Network.BaseParts, p)
  107.             p.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  108.             p.CanCollide = false
  109.         end
  110.     end
  111.  
  112.     RunService.Heartbeat:Connect(function()
  113.         sethiddenproperty(LocalPlayer, "SimulationRadius", math.huge)
  114.         for _, p in pairs(Network.BaseParts) do
  115.             if p:IsDescendantOf(Workspace) then
  116.                 p.Velocity = Network.Velocity
  117.             end
  118.         end
  119.     end)
  120. end
  121.  
  122. -- ✅ Force only doors
  123. local function ForcePart(v)
  124.     if v:IsA("BasePart") and not v.Anchored then
  125.         local name = v.Name:lower()
  126.         local model = v:FindFirstAncestorOfClass("Model")
  127.         local modelName = model and model.Name:lower() or ""
  128.         if name:find("door") or modelName:find("door") then
  129.             for _, x in ipairs(v:GetChildren()) do
  130.                 if x:IsA("BodyMover") or x:IsA("RocketPropulsion") then x:Destroy() end
  131.             end
  132.             for _, name in pairs({"Attachment", "AlignPosition", "Torque"}) do
  133.                 if v:FindFirstChild(name) then v[name]:Destroy() end
  134.             end
  135.             v.CanCollide = false
  136.             local Torque = Instance.new("Torque", v)
  137.             Torque.Torque = Vector3.new(100000, 100000, 100000)
  138.             local AlignPosition = Instance.new("AlignPosition", v)
  139.             AlignPosition.MaxForce = math.huge
  140.             AlignPosition.MaxVelocity = math.huge
  141.             AlignPosition.Responsiveness = 200
  142.             local A2 = Instance.new("Attachment", v)
  143.             Torque.Attachment0 = A2
  144.             AlignPosition.Attachment0 = A2
  145.             AlignPosition.Attachment1 = Attachment1
  146.         end
  147.     end
  148. end
  149.  
  150. -- Toggle bring
  151. local active = false
  152. local DescendantAddedConnection
  153.  
  154. local function toggleBring()
  155.     active = not active
  156.     if active then
  157.         Button.Text = "بدأ | On"
  158.         Button.BackgroundColor3 = Color3.fromRGB(160, 100, 220)
  159.         for _, v in ipairs(Workspace:GetDescendants()) do
  160.             ForcePart(v)
  161.         end
  162.         DescendantAddedConnection = Workspace.DescendantAdded:Connect(function(v)
  163.             if active then ForcePart(v) end
  164.         end)
  165.         spawn(function()
  166.             while active and RunService.RenderStepped:Wait() do
  167.                 Attachment1.WorldCFrame = humanoidRootPart.CFrame
  168.             end
  169.         end)
  170.     else
  171.         Button.Text = "بدأ | Off"
  172.         Button.BackgroundColor3 = Color3.fromRGB(140, 60, 200)
  173.         if DescendantAddedConnection then DescendantAddedConnection:Disconnect() end
  174.     end
  175. end
  176.  
  177. -- Get player
  178. local function getPlayer(name)
  179.     name = name:lower()
  180.     for _, p in pairs(Players:GetPlayers()) do
  181.         if p.Name:lower():find(name) or p.DisplayName:lower():find(name) then
  182.             return p
  183.         end
  184.     end
  185. end
  186.  
  187. -- Events
  188. Box.FocusLost:Connect(function(enter)
  189.     if enter then
  190.         player = getPlayer(Box.Text)
  191.         if player then
  192.             Box.Text = player.Name
  193.             print("Found:", player.Name)
  194.         else
  195.             print("Player not found")
  196.         end
  197.     end
  198. end)
  199.  
  200. Button.MouseButton1Click:Connect(function()
  201.     if player then
  202.         character = player.Character or player.CharacterAdded:Wait()
  203.         humanoidRootPart = character:WaitForChild("HumanoidRootPart")
  204.         toggleBring()
  205.     else
  206.         print("Player not selected")
  207.     end
  208. end)
Advertisement
Add Comment
Please, Sign In to add comment