Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if getgenv().prtGrabLoaded then return print'Part Grabber is running already' end
- getgenv().prtGrabLoaded = true
- local TweenService = game:GetService("TweenService")
- local Players = game:GetService("Players")
- local player = Players.LocalPlayer
- local mouse = player:GetMouse()
- local G2L = {}
- G2L["prtGrab"] = Instance.new("ScreenGui")
- G2L["Main"] = Instance.new("Frame")
- G2L["Container"] = Instance.new("Frame")
- G2L["UICorner"] = Instance.new("UICorner")
- G2L["UIGradient"] = Instance.new("UIGradient")
- G2L["grab"] = Instance.new("TextButton")
- G2L["Found"] = Instance.new("TextLabel")
- G2L["teleport"] = Instance.new("TextButton")
- G2L["view"] = Instance.new("TextButton")
- G2L["Topbar"] = Instance.new("Frame")
- G2L["Icon"] = Instance.new("ImageLabel")
- G2L["Exit"] = Instance.new("TextButton")
- G2L["Minimize"] = Instance.new("TextButton")
- G2L["Title"] = Instance.new("TextLabel")
- G2L["UICorner_2"] = Instance.new("UICorner")
- G2L["UIGradient_2"] = Instance.new("UIGradient")
- G2L["ProfessionalImage"] = Instance.new("ImageLabel")
- -- Parent Setup
- G2L["prtGrab"].Parent = game:GetService("CoreGui")
- G2L["Main"].Parent = G2L["prtGrab"]
- G2L["Container"].Parent = G2L["Main"]
- G2L["UICorner"].Parent = G2L["Container"]
- G2L["UIGradient"].Parent = G2L["Container"]
- G2L["grab"].Parent = G2L["Container"]
- G2L["teleport"].Parent = G2L["Container"]
- G2L["view"].Parent = G2L["Container"]
- G2L["Found"].Parent = G2L["Container"]
- G2L["Topbar"].Parent = G2L["Main"]
- G2L["Icon"].Parent = G2L["Topbar"]
- G2L["Exit"].Parent = G2L["Topbar"]
- G2L["Minimize"].Parent = G2L["Topbar"]
- G2L["Title"].Parent = G2L["Topbar"]
- G2L["UICorner_2"].Parent = G2L["Main"]
- G2L["UIGradient_2"].Parent = G2L["Main"]
- G2L["ProfessionalImage"].Parent = G2L["Main"]
- -- Property Setup
- G2L["prtGrab"].Name = "prtGrab"
- G2L["prtGrab"].ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- G2L["Main"].Name = "Main"
- G2L["Main"].BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- G2L["Main"].BackgroundTransparency = 0.200
- G2L["Main"].BorderColor3 = Color3.fromRGB(27, 42, 53)
- G2L["Main"].Position = UDim2.new(0.3, 0, 0.3, 0)
- G2L["Main"].Size = UDim2.new(0, 400, 0, 250)
- G2L["Container"].Name = "Container"
- G2L["Container"].BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- G2L["Container"].Size = UDim2.new(0.95, 0, 0.7, 0)
- G2L["UICorner"].CornerRadius = UDim.new(0, 9)
- G2L["UIGradient"].Color = ColorSequence.new{
- ColorSequenceKeypoint.new(0.00, Color3.fromRGB(12, 4, 20)),
- ColorSequenceKeypoint.new(0.50, Color3.fromRGB(50, 50, 50)),
- ColorSequenceKeypoint.new(1.00, Color3.fromRGB(12, 4, 20))
- }
- G2L["grab"].Name = "grab"
- G2L["grab"].BackgroundColor3 = Color3.fromRGB(24, 24, 24)
- G2L["grab"].BorderColor3 = Color3.fromRGB(139, 139, 139)
- G2L["grab"].BorderSizePixel = 0
- G2L["grab"].Position = UDim2.new(0.05, 0, 0.6, 0)
- G2L["grab"].Size = UDim2.new(0.25, 0, 0.3, 0)
- G2L["grab"].Font = Enum.Font.SourceSans
- G2L["grab"].Text = "Kopy Path"
- G2L["grab"].TextColor3 = Color3.fromRGB(255, 255, 255)
- G2L["grab"].TextScaled = true
- G2L["grab"].TextSize = 14.000
- G2L["grab"].TextWrapped = true
- G2L["teleport"].Name = "teleport"
- G2L["teleport"].BackgroundColor3 = Color3.fromRGB(24, 24, 24)
- G2L["teleport"].BorderColor3 = Color3.fromRGB(139, 139, 139)
- G2L["teleport"].BorderSizePixel = 0
- G2L["teleport"].Position = UDim2.new(0.35, 0, 0.6, 0)
- G2L["teleport"].Size = UDim2.new(0.30, 0, 0.3, 0)
- G2L["teleport"].Font = Enum.Font.SourceSans
- G2L["teleport"].Text = "Teleport to Part"
- G2L["teleport"].TextColor3 = Color3.fromRGB(255, 255, 255)
- G2L["teleport"].TextScaled = true
- G2L["teleport"].TextSize = 14.000
- G2L["teleport"].TextWrapped = true
- G2L["view"].Name = "view"
- G2L["view"].BackgroundColor3 = Color3.fromRGB(24, 24, 24)
- G2L["view"].BorderColor3 = Color3.fromRGB(139, 139, 139)
- G2L["view"].BorderSizePixel = 0
- G2L["view"].Position = UDim2.new(0.7, 0, 0.6, 0)
- G2L["view"].Size = UDim2.new(0.25, 0, 0.3, 0)
- G2L["view"].Font = Enum.Font.SourceSans
- G2L["view"].Text = "View Part"
- G2L["view"].TextColor3 = Color3.fromRGB(255, 255, 255)
- G2L["view"].TextScaled = true
- G2L["view"].TextSize = 14.000
- G2L["view"].TextWrapped = true
- G2L["Found"].Name = "Found"
- G2L["Found"].BackgroundColor3 = Color3.fromRGB(24, 24, 24)
- G2L["Found"].BorderColor3 = Color3.fromRGB(0, 0, 0)
- G2L["Found"].BorderSizePixel = 0
- G2L["Found"].Position = UDim2.new(0.05, 0, 0.2, 0)
- G2L["Found"].Size = UDim2.new(0.9, 0, 0.25, 0)
- G2L["Found"].Font = Enum.Font.SourceSans
- G2L["Found"].Text = ". . ."
- G2L["Found"].TextColor3 = Color3.fromRGB(255, 255, 255)
- G2L["Found"].TextScaled = true
- G2L["Found"].TextSize = 14.000
- G2L["Found"].TextWrapped = true
- G2L["Topbar"].Name = "Topbar"
- G2L["Topbar"].BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- G2L["Topbar"].Size = UDim2.new(1, 0, 0.1, 0)
- G2L["Icon"].Name = "Icon"
- G2L["Icon"].BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- G2L["Icon"].BackgroundTransparency = 1.000
- G2L["Icon"].Position = UDim2.new(0.01, 0, 0.5, 0)
- G2L["Icon"].Size = UDim2.new(0, 25, 0, 25)
- G2L["Icon"].Image = "rbxgameasset://Images/menuIcon"
- G2L["Exit"].Name = "Exit"
- G2L["Exit"].BackgroundColor3 = Color3.fromRGB(12, 4, 20)
- G2L["Exit"].BackgroundTransparency = 0.500
- G2L["Exit"].BorderSizePixel = 0
- G2L["Exit"].Position = UDim2.new(0.93, 0, 0, 0)
- G2L["Exit"].Size = UDim2.new(0, 30, 0, 30)
- G2L["Exit"].Font = Enum.Font.Gotham
- G2L["Exit"].Text = "X"
- G2L["Exit"].TextColor3 = Color3.fromRGB(255, 255, 255)
- G2L["Exit"].TextSize = 13.000
- G2L["Minimize"].Name = "Minimize"
- G2L["Minimize"].BackgroundColor3 = Color3.fromRGB(12, 4, 20)
- G2L["Minimize"].BackgroundTransparency = 0.500
- G2L["Minimize"].BorderSizePixel = 0
- G2L["Minimize"].Position = UDim2.new(0.85, 0, 0, 0)
- G2L["Minimize"].Size = UDim2.new(0, 30, 0, 30)
- G2L["Minimize"].Font = Enum.Font.Gotham
- G2L["Minimize"].Text = "-"
- G2L["Minimize"].TextColor3 = Color3.fromRGB(255, 255, 255)
- G2L["Minimize"].TextSize = 18.000
- G2L["Title"].Name = "Title"
- G2L["Title"].BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- G2L["Title"].BackgroundTransparency = 1.000
- G2L["Title"].Position = UDim2.new(0.15, 0, 0, 0)
- G2L["Title"].Size = UDim2.new(0, 334, 0, 30)
- G2L["Title"].Font = Enum.Font.SourceSans
- G2L["Title"].Text = "Part Grabber"
- G2L["Title"].TextColor3 = Color3.fromRGB(255, 255, 255)
- G2L["Title"].TextSize = 18.000
- G2L["Title"].TextWrapped = true
- G2L["UICorner_2"].CornerRadius = UDim.new(0, 9)
- G2L["UIGradient_2"].Color = ColorSequence.new{
- ColorSequenceKeypoint.new(0.00, Color3.fromRGB(12, 4, 20)),
- ColorSequenceKeypoint.new(0.50, Color3.fromRGB(50, 50, 50)),
- ColorSequenceKeypoint.new(1.00, Color3.fromRGB(12, 4, 20))
- }
- G2L["ProfessionalImage"].Name = "ProfessionalImage"
- G2L["ProfessionalImage"].BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- G2L["ProfessionalImage"].BackgroundTransparency = 1.000
- G2L["ProfessionalImage"].Position = UDim2.new(0.8, 0, 0.2, 0)
- G2L["ProfessionalImage"].Size = UDim2.new(0, 100, 0, 100)
- G2L["ProfessionalImage"].Image = "http://www.roblox.com/asset/?id=1234567890" -- Replace with your image ID
- -- Close Functionality
- G2L["Exit"].MouseButton1Click:Connect(function()
- G2L["prtGrab"]:Destroy()
- if idk then idk:Disconnect() idk=nil end
- getgenv().prtGrabLoaded = false
- end)
- -- Minimize with Spin Effect
- local minimizedSize = UDim2.new(0, 400, 0, 30)
- local originalSize = G2L["Main"].Size
- local function minimizeWithSpin()
- local rotateTween = TweenService:Create(G2L["Main"], TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Rotation = 180})
- rotateTween:Play()
- rotateTween.Completed:Connect(function()
- G2L["Main"].Size = minimizedSize
- G2L["grab"].Visible = false
- G2L["teleport"].Visible = false
- G2L["view"].Visible = false
- end)
- end
- local function maximizeWithSpin()
- local rotateTween = TweenService:Create(G2L["Main"], TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Rotation = 0})
- rotateTween:Play()
- rotateTween.Completed:Connect(function()
- G2L["Main"].Size = originalSize
- G2L["grab"].Visible = true
- G2L["teleport"].Visible = true
- G2L["view"].Visible = true
- end)
- end
- local isMinimized = false
- G2L["Minimize"].MouseButton1Click:Connect(function()
- if isMinimized then
- maximizeWithSpin()
- else
- minimizeWithSpin()
- end
- isMinimized = not isMinimized
- end)
- -- Clipboard Copy Functionality
- G2L["grab"].MouseButton1Click:Connect(function()
- setclipboard(G2L["Found"].Text)
- end)
- -- Teleport to Part
- G2L["teleport"].MouseButton1Click:Connect(function()
- local target = workspace:FindFirstChild(G2L["Found"].Text:split(".")[#G2L["Found"].Text:split(".")])
- if target then
- player.Character.HumanoidRootPart.CFrame = target.CFrame
- else
- warn("No part found")
- end
- end)
- -- View Part
- G2L["view"].MouseButton1Click:Connect(function()
- local part = workspace:FindFirstChild(G2L["Found"].Text:split(".")[#G2L["Found"].Text:split(".")])
- if part then
- workspace.CurrentCamera.CFrame = CFrame.new(part.Position + Vector3.new(0, 5, 15), part.Position)
- else
- warn("No part found")
- end
- end)
- -- Full Path Functionality
- local function getFullPath(object)
- local path = {}
- while object.Parent and object.Parent ~= game do
- local name = object.Name
- if name:match("^%d") or name:match("%s") or name:match("[^%w_]") then
- name = '["' .. name .. '"]'
- end
- table.insert(path, 1, name)
- object = object.Parent
- end
- local name = object.Name
- if name:match("^%d") or name:match("%s") or name:match("[^%w_]") then
- name = '["' .. name .. '"]'
- end
- table.insert(path, 1, name)
- return table.concat(path, "."):gsub("%.%[", "[")
- end
- local function prt()
- if mouse.Target then
- G2L["Found"].Text = getFullPath(mouse.Target)
- else
- warn("Error while getting path")
- end
- end
- if idk then idk:Disconnect() idk=nil end
- idk=mouse.Button1Down:Connect(prt)
- -- Make GUI Draggable
- G2L["Main"].Active = true
- G2L["Main"].Draggable = true
- -- Initial Position Tween
- G2L["Main"]:TweenPosition(UDim2.new(0.3, 0, 0.3, 0), "Out", "Quint", 1, true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement