Advertisement
rrixh

Untitled

Aug 8th, 2024 (edited)
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 9.80 KB | None | 0 0
  1.  
  2. if getgenv().prtGrabLoaded then return print'Part Grabber is running already' end
  3. getgenv().prtGrabLoaded = true
  4.  
  5. local TweenService = game:GetService("TweenService")
  6. local Players = game:GetService("Players")
  7. local player = Players.LocalPlayer
  8. local mouse = player:GetMouse()
  9.  
  10. local G2L = {}
  11.  
  12. G2L["prtGrab"] = Instance.new("ScreenGui")
  13. G2L["Main"] = Instance.new("Frame")
  14. G2L["Container"] = Instance.new("Frame")
  15. G2L["UICorner"] = Instance.new("UICorner")
  16. G2L["UIGradient"] = Instance.new("UIGradient")
  17. G2L["grab"] = Instance.new("TextButton")
  18. G2L["Found"] = Instance.new("TextLabel")
  19. G2L["teleport"] = Instance.new("TextButton")
  20. G2L["view"] = Instance.new("TextButton")
  21. G2L["Topbar"] = Instance.new("Frame")
  22. G2L["Icon"] = Instance.new("ImageLabel")
  23. G2L["Exit"] = Instance.new("TextButton")
  24. G2L["Minimize"] = Instance.new("TextButton")
  25. G2L["Title"] = Instance.new("TextLabel")
  26. G2L["UICorner_2"] = Instance.new("UICorner")
  27. G2L["UIGradient_2"] = Instance.new("UIGradient")
  28. G2L["ProfessionalImage"] = Instance.new("ImageLabel")
  29.  
  30. -- Parent Setup
  31. G2L["prtGrab"].Parent = game:GetService("CoreGui")
  32. G2L["Main"].Parent = G2L["prtGrab"]
  33. G2L["Container"].Parent = G2L["Main"]
  34. G2L["UICorner"].Parent = G2L["Container"]
  35. G2L["UIGradient"].Parent = G2L["Container"]
  36. G2L["grab"].Parent = G2L["Container"]
  37. G2L["teleport"].Parent = G2L["Container"]
  38. G2L["view"].Parent = G2L["Container"]
  39. G2L["Found"].Parent = G2L["Container"]
  40. G2L["Topbar"].Parent = G2L["Main"]
  41. G2L["Icon"].Parent = G2L["Topbar"]
  42. G2L["Exit"].Parent = G2L["Topbar"]
  43. G2L["Minimize"].Parent = G2L["Topbar"]
  44. G2L["Title"].Parent = G2L["Topbar"]
  45. G2L["UICorner_2"].Parent = G2L["Main"]
  46. G2L["UIGradient_2"].Parent = G2L["Main"]
  47. G2L["ProfessionalImage"].Parent = G2L["Main"]
  48.  
  49. -- Property Setup
  50. G2L["prtGrab"].Name = "prtGrab"
  51. G2L["prtGrab"].ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  52.  
  53. G2L["Main"].Name = "Main"
  54. G2L["Main"].BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  55. G2L["Main"].BackgroundTransparency = 0.200
  56. G2L["Main"].BorderColor3 = Color3.fromRGB(27, 42, 53)
  57. G2L["Main"].Position = UDim2.new(0.3, 0, 0.3, 0)
  58. G2L["Main"].Size = UDim2.new(0, 400, 0, 250)
  59.  
  60. G2L["Container"].Name = "Container"
  61. G2L["Container"].BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  62. G2L["Container"].Size = UDim2.new(0.95, 0, 0.7, 0)
  63.  
  64. G2L["UICorner"].CornerRadius = UDim.new(0, 9)
  65.  
  66. G2L["UIGradient"].Color = ColorSequence.new{
  67.     ColorSequenceKeypoint.new(0.00, Color3.fromRGB(12, 4, 20)),
  68.     ColorSequenceKeypoint.new(0.50, Color3.fromRGB(50, 50, 50)),
  69.     ColorSequenceKeypoint.new(1.00, Color3.fromRGB(12, 4, 20))
  70. }
  71.  
  72. G2L["grab"].Name = "grab"
  73. G2L["grab"].BackgroundColor3 = Color3.fromRGB(24, 24, 24)
  74. G2L["grab"].BorderColor3 = Color3.fromRGB(139, 139, 139)
  75. G2L["grab"].BorderSizePixel = 0
  76. G2L["grab"].Position = UDim2.new(0.05, 0, 0.6, 0)
  77. G2L["grab"].Size = UDim2.new(0.25, 0, 0.3, 0)
  78. G2L["grab"].Font = Enum.Font.SourceSans
  79. G2L["grab"].Text = "Kopy Path"
  80. G2L["grab"].TextColor3 = Color3.fromRGB(255, 255, 255)
  81. G2L["grab"].TextScaled = true
  82. G2L["grab"].TextSize = 14.000
  83. G2L["grab"].TextWrapped = true
  84.  
  85. G2L["teleport"].Name = "teleport"
  86. G2L["teleport"].BackgroundColor3 = Color3.fromRGB(24, 24, 24)
  87. G2L["teleport"].BorderColor3 = Color3.fromRGB(139, 139, 139)
  88. G2L["teleport"].BorderSizePixel = 0
  89. G2L["teleport"].Position = UDim2.new(0.35, 0, 0.6, 0)
  90. G2L["teleport"].Size = UDim2.new(0.30, 0, 0.3, 0)
  91. G2L["teleport"].Font = Enum.Font.SourceSans
  92. G2L["teleport"].Text = "Teleport to Part"
  93. G2L["teleport"].TextColor3 = Color3.fromRGB(255, 255, 255)
  94. G2L["teleport"].TextScaled = true
  95. G2L["teleport"].TextSize = 14.000
  96. G2L["teleport"].TextWrapped = true
  97.  
  98. G2L["view"].Name = "view"
  99. G2L["view"].BackgroundColor3 = Color3.fromRGB(24, 24, 24)
  100. G2L["view"].BorderColor3 = Color3.fromRGB(139, 139, 139)
  101. G2L["view"].BorderSizePixel = 0
  102. G2L["view"].Position = UDim2.new(0.7, 0, 0.6, 0)
  103. G2L["view"].Size = UDim2.new(0.25, 0, 0.3, 0)
  104. G2L["view"].Font = Enum.Font.SourceSans
  105. G2L["view"].Text = "View Part"
  106. G2L["view"].TextColor3 = Color3.fromRGB(255, 255, 255)
  107. G2L["view"].TextScaled = true
  108. G2L["view"].TextSize = 14.000
  109. G2L["view"].TextWrapped = true
  110.  
  111. G2L["Found"].Name = "Found"
  112. G2L["Found"].BackgroundColor3 = Color3.fromRGB(24, 24, 24)
  113. G2L["Found"].BorderColor3 = Color3.fromRGB(0, 0, 0)
  114. G2L["Found"].BorderSizePixel = 0
  115. G2L["Found"].Position = UDim2.new(0.05, 0, 0.2, 0)
  116. G2L["Found"].Size = UDim2.new(0.9, 0, 0.25, 0)
  117. G2L["Found"].Font = Enum.Font.SourceSans
  118. G2L["Found"].Text = ". . ."
  119. G2L["Found"].TextColor3 = Color3.fromRGB(255, 255, 255)
  120. G2L["Found"].TextScaled = true
  121. G2L["Found"].TextSize = 14.000
  122. G2L["Found"].TextWrapped = true
  123.  
  124. G2L["Topbar"].Name = "Topbar"
  125. G2L["Topbar"].BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  126. G2L["Topbar"].Size = UDim2.new(1, 0, 0.1, 0)
  127.  
  128. G2L["Icon"].Name = "Icon"
  129. G2L["Icon"].BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  130. G2L["Icon"].BackgroundTransparency = 1.000
  131. G2L["Icon"].Position = UDim2.new(0.01, 0, 0.5, 0)
  132. G2L["Icon"].Size = UDim2.new(0, 25, 0, 25)
  133. G2L["Icon"].Image = "rbxgameasset://Images/menuIcon"
  134.  
  135. G2L["Exit"].Name = "Exit"
  136. G2L["Exit"].BackgroundColor3 = Color3.fromRGB(12, 4, 20)
  137. G2L["Exit"].BackgroundTransparency = 0.500
  138. G2L["Exit"].BorderSizePixel = 0
  139. G2L["Exit"].Position = UDim2.new(0.93, 0, 0, 0)
  140. G2L["Exit"].Size = UDim2.new(0, 30, 0, 30)
  141. G2L["Exit"].Font = Enum.Font.Gotham
  142. G2L["Exit"].Text = "X"
  143. G2L["Exit"].TextColor3 = Color3.fromRGB(255, 255, 255)
  144. G2L["Exit"].TextSize = 13.000
  145.  
  146. G2L["Minimize"].Name = "Minimize"
  147. G2L["Minimize"].BackgroundColor3 = Color3.fromRGB(12, 4, 20)
  148. G2L["Minimize"].BackgroundTransparency = 0.500
  149. G2L["Minimize"].BorderSizePixel = 0
  150. G2L["Minimize"].Position = UDim2.new(0.85, 0, 0, 0)
  151. G2L["Minimize"].Size = UDim2.new(0, 30, 0, 30)
  152. G2L["Minimize"].Font = Enum.Font.Gotham
  153. G2L["Minimize"].Text = "-"
  154. G2L["Minimize"].TextColor3 = Color3.fromRGB(255, 255, 255)
  155. G2L["Minimize"].TextSize = 18.000
  156.  
  157. G2L["Title"].Name = "Title"
  158. G2L["Title"].BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  159. G2L["Title"].BackgroundTransparency = 1.000
  160. G2L["Title"].Position = UDim2.new(0.15, 0, 0, 0)
  161. G2L["Title"].Size = UDim2.new(0, 334, 0, 30)
  162. G2L["Title"].Font = Enum.Font.SourceSans
  163. G2L["Title"].Text = "Part Grabber"
  164. G2L["Title"].TextColor3 = Color3.fromRGB(255, 255, 255)
  165. G2L["Title"].TextSize = 18.000
  166. G2L["Title"].TextWrapped = true
  167.  
  168. G2L["UICorner_2"].CornerRadius = UDim.new(0, 9)
  169.  
  170. G2L["UIGradient_2"].Color = ColorSequence.new{
  171.     ColorSequenceKeypoint.new(0.00, Color3.fromRGB(12, 4, 20)),
  172.     ColorSequenceKeypoint.new(0.50, Color3.fromRGB(50, 50, 50)),
  173.     ColorSequenceKeypoint.new(1.00, Color3.fromRGB(12, 4, 20))
  174. }
  175.  
  176. G2L["ProfessionalImage"].Name = "ProfessionalImage"
  177. G2L["ProfessionalImage"].BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  178. G2L["ProfessionalImage"].BackgroundTransparency = 1.000
  179. G2L["ProfessionalImage"].Position = UDim2.new(0.8, 0, 0.2, 0)
  180. G2L["ProfessionalImage"].Size = UDim2.new(0, 100, 0, 100)
  181. G2L["ProfessionalImage"].Image = "http://www.roblox.com/asset/?id=1234567890" -- Replace with your image ID
  182.  
  183. -- Close Functionality
  184. G2L["Exit"].MouseButton1Click:Connect(function()
  185. G2L["prtGrab"]:Destroy()
  186. if idk then idk:Disconnect() idk=nil end
  187. getgenv().prtGrabLoaded = false
  188. end)
  189.  
  190. -- Minimize with Spin Effect
  191. local minimizedSize = UDim2.new(0, 400, 0, 30)
  192. local originalSize = G2L["Main"].Size
  193.  
  194. local function minimizeWithSpin()
  195. local rotateTween = TweenService:Create(G2L["Main"], TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Rotation = 180})
  196. rotateTween:Play()
  197. rotateTween.Completed:Connect(function()
  198. G2L["Main"].Size = minimizedSize
  199. G2L["grab"].Visible = false
  200. G2L["teleport"].Visible = false
  201. G2L["view"].Visible = false
  202. end)
  203. end
  204.  
  205. local function maximizeWithSpin()
  206. local rotateTween = TweenService:Create(G2L["Main"], TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Rotation = 0})
  207. rotateTween:Play()
  208. rotateTween.Completed:Connect(function()
  209. G2L["Main"].Size = originalSize
  210. G2L["grab"].Visible = true
  211. G2L["teleport"].Visible = true
  212. G2L["view"].Visible = true
  213. end)
  214. end
  215.  
  216. local isMinimized = false
  217.  
  218. G2L["Minimize"].MouseButton1Click:Connect(function()
  219. if isMinimized then
  220. maximizeWithSpin()
  221. else
  222. minimizeWithSpin()
  223. end
  224. isMinimized = not isMinimized
  225. end)
  226.  
  227. -- Clipboard Copy Functionality
  228. G2L["grab"].MouseButton1Click:Connect(function()
  229. setclipboard(G2L["Found"].Text)
  230. end)
  231.  
  232. -- Teleport to Part
  233. G2L["teleport"].MouseButton1Click:Connect(function()
  234. local target = workspace:FindFirstChild(G2L["Found"].Text:split(".")[#G2L["Found"].Text:split(".")])
  235. if target then
  236. player.Character.HumanoidRootPart.CFrame = target.CFrame
  237. else
  238. warn("No part found")
  239. end
  240. end)
  241.  
  242. -- View Part
  243. G2L["view"].MouseButton1Click:Connect(function()
  244. local part = workspace:FindFirstChild(G2L["Found"].Text:split(".")[#G2L["Found"].Text:split(".")])
  245. if part then
  246. workspace.CurrentCamera.CFrame = CFrame.new(part.Position + Vector3.new(0, 5, 15), part.Position)
  247. else
  248. warn("No part found")
  249. end
  250. end)
  251.  
  252. -- Full Path Functionality
  253. local function getFullPath(object)
  254. local path = {}
  255. while object.Parent and object.Parent ~= game do
  256. local name = object.Name
  257. if name:match("^%d") or name:match("%s") or name:match("[^%w_]") then
  258. name = '["' .. name .. '"]'
  259. end
  260. table.insert(path, 1, name)
  261. object = object.Parent
  262. end
  263. local name = object.Name
  264. if name:match("^%d") or name:match("%s") or name:match("[^%w_]") then
  265. name = '["' .. name .. '"]'
  266. end
  267. table.insert(path, 1, name)
  268.  
  269. return table.concat(path, "."):gsub("%.%[", "[")
  270. end
  271.  
  272. local function prt()
  273. if mouse.Target then
  274. G2L["Found"].Text = getFullPath(mouse.Target)
  275. else
  276. warn("Error while getting path")
  277. end
  278. end
  279.  
  280. if idk then idk:Disconnect() idk=nil end
  281. idk=mouse.Button1Down:Connect(prt)
  282.  
  283. -- Make GUI Draggable
  284. G2L["Main"].Active = true
  285. G2L["Main"].Draggable = true
  286.  
  287. -- Initial Position Tween
  288. 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