Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game:GetService("Players")
- local me = plr.LocalPlayer
- local hum = me.Character.Humanoid
- local hrp = me.Character.HumanoidRootPart
- local work = game:GetService("Workspace")
- local mouse = me:GetMouse()
- local mhit = mouse.Hit.p + Vector3.new(0,2.5,0)
- local patarget = mouse.Target
- local pgui = Instance.new("ScreenGui")
- pgui.Parent = me.PlayerGui
- pgui.Name = "Result"
- local terame = Instance.new("Frame")
- terame.Parent = pgui
- terame.Size = UDim2.new(0.3,0,0.2,0)
- terame.Position = UDim2.new(0.68, 0, 0.7,0)
- terame.BackgroundTransparency = 0.5
- local pext = Instance.new("TextBox")
- pext.ClearTextOnFocus = false
- pext.Parent = terame
- pext.Text = ""
- pext.PlaceholderText = "Result will be here"
- pext.Size = UDim2.new(0.8,0,0.6,0)
- pext.Position = UDim2.new(0.1,0,0.2,0)
- pext.TextSize = 16
- pext.PlaceholderColor3 = Color3.fromRGB(55,55,55)
- terame.Active = true
- terame.Draggable = true
- local parentGui = Instance.new("ScreenGui")
- parentGui.Name = "Parent_Choose"
- parentGui.Parent = me.PlayerGui
- parentGui.Enabled = false
- local prame = Instance.new("Frame")
- prame.Parent = parentGui
- prame.Size = UDim2.new(0, 450, 0, 250)
- prame.Position = UDim2.new(0.02, 0, 0.7, 0)
- prame.BackgroundTransparency = 0.5
- prame.Active = true
- prame.Draggable = true
- local ptn = Instance.new("TextButton")
- ptn.Parent = prame
- ptn.Text = "Parent"
- ptn.Position = UDim2.new(0.03,0,0.04,0)
- ptn.Size = UDim2.new(0.15,0,0.1,0)
- ptn.TextSize = 12
- local cptn = ptn:Clone()
- cptn.Parent = prame
- cptn.Text = "P.P"
- cptn.Position = UDim2.new(0.2,0,0.04,0)
- local cptn2 = ptn:Clone()
- cptn2.Parent = prame
- cptn2.Text = "P.P.P"
- cptn2.Position = UDim2.new(0.37,0,0.04,0)
- local cptn3 = ptn:Clone()
- cptn3.Parent = prame
- cptn3.Text = "P.P.P.P"
- cptn3.Position = UDim2.new(0.54,0,0.04,0)
- local cptn4 = ptn:Clone()
- cptn4.Parent = prame
- cptn4.Text = "P.P.P.P.P"
- cptn4.Position = UDim2.new(0.71,0,0.04,0)
- local cptn5 = ptn:Clone()
- cptn5.Parent = prame
- cptn5.Size = UDim2.new(0.25,0,0.1,0)
- cptn5.Text = "P.P.P.P.P.P"
- cptn5.Position = UDim2.new(0.03,0,0.17,0)
- local cptn6 = ptn:Clone()
- cptn6.Parent = prame
- cptn6.Size = UDim2.new(0.25,0,0.1,0)
- cptn6.Text = "P.P.P.P.P.P.P"
- cptn6.Position = UDim2.new(0.3,0,0.17,0)
- local cptn7 = ptn:Clone()
- cptn7.Parent = prame
- cptn7.Size = UDim2.new(0.25,0,0.1,0)
- cptn7.Text = "P.P.P.P.P.P.P.P"
- cptn7.Position = UDim2.new(0.57,0,0.17,0)
- local lab = Instance.new("TextLabel")
- lab.Parent = prame
- lab.BackgroundTransparency = 1
- lab.BorderSizePixel = 0
- lab.TextSize = 18
- lab.Text = "P = Parent"
- lab.Position = UDim2.new(0.47, 0, 0.4, 0)
- local status = lab:Clone()
- status.Parent = prame
- status.Position = UDim2.new(0.47,0,0.52,0)
- status.Text = "Choose"
- local tool = Instance.new("Tool")
- tool.RequiresHandle = false
- tool.Parent = me.Backpack
- tool.Name = "Name"
- local tool2 = Instance.new("Tool")
- tool2.RequiresHandle = false
- tool2.Parent = me.Backpack
- tool2.Name = "Parent"
- local tool3 = Instance.new("Tool")
- tool3.RequiresHandle = false
- tool3.Parent = me.Backpack
- tool3.Name = "Clone"
- tool.Activated:Connect(function()
- if mouse.Target:IsA("BasePart") then
- print(mouse.Target)
- pext.Text = mouse.Target.Name
- end
- end)
- tool3.Activated:Connect(function()
- local ctarget = mouse.Target
- if ctarget:IsA("BasePart") then
- local cl = ctarget:Clone()
- cl.Parent = ctarget.Parent
- cl.CFrame = hrp.CFrame
- end
- end)
- tool2.Equipped:Connect(function()
- parentGui.Enabled = true
- end)
- tool2.Unequipped:Connect(function()
- parentGui.Enabled = false
- end)
- ptn.MouseButton1Click:Connect(function()
- status.Text = "Parent"
- end)
- cptn.MouseButton1Click:Connect(function()
- status.Text = "Parent.Parent"
- end)
- cptn2.MouseButton1Click:Connect(function()
- status.Text = "Parent.Parent.Parent"
- end)
- cptn3.MouseButton1Click:Connect(function()
- status.Text = "Parent.Parent.Parent.Parent"
- end)
- cptn4.MouseButton1Click:Connect(function()
- status.Text = "Parent.Parent.Parent.Parent.Parent"
- end)
- cptn5.MouseButton1Click:Connect(function()
- status.Text = "Parent.Parent.Parent.Parent.Parent.Parent"
- end)
- cptn6.MouseButton1Click:Connect(function()
- status.Text = "Parent.Parent.Parent.Parent.Parent.Parent.Parent"
- end)
- cptn7.MouseButton1Click:Connect(function()
- status.Text = "Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent"
- end)
- tool2.Activated:Connect(function()
- if status.Text == "Parent" then
- if patarget:IsA("BasePart") then
- print(mouse.Target.Parent)
- pext.Text = mouse.Target.Parent.Name
- end
- elseif status.Text == "Parent.Parent" then
- if patarget:IsA("BasePart") then
- print(mouse.Target.Parent.Parent)
- pext.Text = mouse.Target.Parent.Parent.Name
- end
- elseif status.Text == "Parent.Parent.Parent" then
- if patarget:IsA("BasePart") then
- print(mouse.Target.Parent.Parent.Parent)
- pext.Text = mouse.Target.Parent.Parent.Parent.Name
- end
- elseif status.Text == "Parent.Parent.Parent.Parent" then
- if patarget:IsA("BasePart") then
- print(mouse.Target.Parent.Parent.Parent.Parent)
- pext.Text = mouse.Target.Parent.Parent.Parent.Parent.Name
- end
- elseif status.Text == "Parent.Parent.Parent.Parent.Parent" then
- if patarget:IsA("BasePart") then
- print(mouse.Target.Parent.Parent.Parent.Parent.Parent)
- pext.Text = mouse.Target.Parent.Parent.Parent.Parent.Parent.Name
- end
- elseif status.Text == "Parent.Parent.Parent.Parent.Parent.Parent" then
- if patarget:IsA("BasePart") then
- print(mouse.Target.Parent.Parent.Parent.Parent.Parent.Parent)
- pext.Text = mouse.Target.Parent.Parent.Parent.Parent.Parent.Parent.Name
- end
- elseif status.Text == "Parent.Parent.Parent.Parent.Parent.Parent.Parent" then
- if patarget:IsA("BasePart") then
- print(mouse.Target.Parent.Parent.Parent.Parent.Parent.Parent.Parent)
- pext.Text = mouse.Target.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name
- end
- elseif status.Text == "Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent" then
- if patarget:IsA("BasePart") then
- print(mouse.Target.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent)
- pext.Text = mouse.Target.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name
- end
- else
- game:GetService("StarterGui"):SetCore("SendNotification",{
- Title = "Helper",
- Text = "Choose!!!",
- Icon = "rbxassetid://137790612712172"
- })
- end
- end)
- game:GetService("StarterGui"):SetCore("SendNotification",{
- Title = "Helper",
- Text = "Name and Parent will be printed in console and textbox!",
- Icon = "rbxassetid://137790612712172"
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement