Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Better Bring Parts Ui (by mourd1123)
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local UserInputService = game:GetService("UserInputService")
- local Workspace = game:GetService("Workspace")
- -- Create GUI
- local Gui = Instance.new("ScreenGui")
- Gui.Name = "Gui"
- Gui.Parent = gethui()
- Gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- -- Main Frame
- local Main = Instance.new("Frame")
- Main.Name = "Main"
- Main.Size = UDim2.new(0, 250, 0, 140)
- Main.Position = UDim2.new(0.5, -125, 0.5, -70)
- Main.BackgroundColor3 = Color3.fromRGB(100, 60, 140)
- Main.BorderSizePixel = 0
- Main.Active = true
- Main.Draggable = true
- Main.Parent = Gui
- local UICorner = Instance.new("UICorner")
- UICorner.CornerRadius = UDim.new(0, 8)
- UICorner.Parent = Main
- -- Title
- local Label = Instance.new("TextLabel")
- Label.Size = UDim2.new(1, 0, 0, 30)
- Label.BackgroundColor3 = Color3.fromRGB(80, 40, 120)
- Label.BorderSizePixel = 0
- Label.Text = "بدأ | by mourd1123"
- Label.TextColor3 = Color3.fromRGB(255, 255, 255)
- Label.TextSize = 14
- Label.Font = Enum.Font.GothamBold
- Label.Parent = Main
- local UICorner_2 = Instance.new("UICorner")
- UICorner_2.CornerRadius = UDim.new(0, 8)
- UICorner_2.Parent = Label
- -- Input
- local Box = Instance.new("TextBox")
- Box.Size = UDim2.new(0.85, 0, 0, 30)
- Box.Position = UDim2.new(0.075, 0, 0.35, 0)
- Box.BackgroundColor3 = Color3.fromRGB(120, 80, 160)
- Box.BorderSizePixel = 0
- Box.PlaceholderText = "Player here"
- Box.Text = ""
- Box.TextColor3 = Color3.fromRGB(255, 255, 255)
- Box.PlaceholderColor3 = Color3.fromRGB(200, 200, 200)
- Box.TextSize = 13
- Box.Font = Enum.Font.GothamSemibold
- Box.Parent = Main
- local UICorner_3 = Instance.new("UICorner")
- UICorner_3.CornerRadius = UDim.new(0, 6)
- UICorner_3.Parent = Box
- -- Button
- local Button = Instance.new("TextButton")
- Button.Size = UDim2.new(0.85, 0, 0, 30)
- Button.Position = UDim2.new(0.075, 0, 0.7, 0)
- Button.BackgroundColor3 = Color3.fromRGB(140, 60, 200)
- Button.BorderSizePixel = 0
- Button.Text = "بدأ | Off"
- Button.TextColor3 = Color3.fromRGB(255, 255, 255)
- Button.TextSize = 14
- Button.Font = Enum.Font.GothamBold
- Button.Parent = Main
- local UICorner_4 = Instance.new("UICorner")
- UICorner_4.CornerRadius = UDim.new(0, 6)
- UICorner_4.Parent = Button
- -- Variables
- local LocalPlayer = Players.LocalPlayer
- local character, humanoidRootPart
- local mainStatus = true
- local player = nil
- UserInputService.InputBegan:Connect(function(input, gp)
- if input.KeyCode == Enum.KeyCode.RightControl and not gp then
- mainStatus = not mainStatus
- Main.Visible = mainStatus
- end
- end)
- -- Network
- local Folder = Instance.new("Folder", Workspace)
- local Part = Instance.new("Part", Folder)
- local Attachment1 = Instance.new("Attachment", Part)
- Part.Anchored = true
- Part.CanCollide = false
- Part.Transparency = 1
- if not getgenv().Network then
- getgenv().Network = {
- BaseParts = {},
- Velocity = Vector3.new(14.46, 14.46, 14.46)
- }
- Network.RetainPart = function(p)
- if p:IsA("BasePart") and p:IsDescendantOf(Workspace) then
- table.insert(Network.BaseParts, p)
- p.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
- p.CanCollide = false
- end
- end
- RunService.Heartbeat:Connect(function()
- sethiddenproperty(LocalPlayer, "SimulationRadius", math.huge)
- for _, p in pairs(Network.BaseParts) do
- if p:IsDescendantOf(Workspace) then
- p.Velocity = Network.Velocity
- end
- end
- end)
- end
- -- ✅ Force only doors
- local function ForcePart(v)
- if v:IsA("BasePart") and not v.Anchored then
- local name = v.Name:lower()
- local model = v:FindFirstAncestorOfClass("Model")
- local modelName = model and model.Name:lower() or ""
- if name:find("door") or modelName:find("door") then
- for _, x in ipairs(v:GetChildren()) do
- if x:IsA("BodyMover") or x:IsA("RocketPropulsion") then x:Destroy() end
- end
- for _, name in pairs({"Attachment", "AlignPosition", "Torque"}) do
- if v:FindFirstChild(name) then v[name]:Destroy() end
- end
- v.CanCollide = false
- local Torque = Instance.new("Torque", v)
- Torque.Torque = Vector3.new(100000, 100000, 100000)
- local AlignPosition = Instance.new("AlignPosition", v)
- AlignPosition.MaxForce = math.huge
- AlignPosition.MaxVelocity = math.huge
- AlignPosition.Responsiveness = 200
- local A2 = Instance.new("Attachment", v)
- Torque.Attachment0 = A2
- AlignPosition.Attachment0 = A2
- AlignPosition.Attachment1 = Attachment1
- end
- end
- end
- -- Toggle bring
- local active = false
- local DescendantAddedConnection
- local function toggleBring()
- active = not active
- if active then
- Button.Text = "بدأ | On"
- Button.BackgroundColor3 = Color3.fromRGB(160, 100, 220)
- for _, v in ipairs(Workspace:GetDescendants()) do
- ForcePart(v)
- end
- DescendantAddedConnection = Workspace.DescendantAdded:Connect(function(v)
- if active then ForcePart(v) end
- end)
- spawn(function()
- while active and RunService.RenderStepped:Wait() do
- Attachment1.WorldCFrame = humanoidRootPart.CFrame
- end
- end)
- else
- Button.Text = "بدأ | Off"
- Button.BackgroundColor3 = Color3.fromRGB(140, 60, 200)
- if DescendantAddedConnection then DescendantAddedConnection:Disconnect() end
- end
- end
- -- Get player
- local function getPlayer(name)
- name = name:lower()
- for _, p in pairs(Players:GetPlayers()) do
- if p.Name:lower():find(name) or p.DisplayName:lower():find(name) then
- return p
- end
- end
- end
- -- Events
- Box.FocusLost:Connect(function(enter)
- if enter then
- player = getPlayer(Box.Text)
- if player then
- Box.Text = player.Name
- print("Found:", player.Name)
- else
- print("Player not found")
- end
- end
- end)
- Button.MouseButton1Click:Connect(function()
- if player then
- character = player.Character or player.CharacterAdded:Wait()
- humanoidRootPart = character:WaitForChild("HumanoidRootPart")
- toggleBring()
- else
- print("Player not selected")
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment