local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local gui = Instance.new("ScreenGui", player.PlayerGui)
gui.ResetOnSpawn = false
gui.Name = "Debug"
local switch3 = Instance.new("Sound", gui)
switch3.SoundId = "rbxassetid://12222183"
local kerplunk = Instance.new("Sound", gui)
kerplunk.SoundId = "rbxassetid://12222054"
local box = Instance.new("SelectionBox", gui)
local frame = Instance.new("Frame", gui)
frame.Position = UDim2.new(0, 0, 0.5, 0)
frame.AnchorPoint = Vector2.new(0, 0.5)
frame.Size = UDim2.new(0.2, 0, 0.5, 0)
frame.BackgroundColor3 = Color3.new(1, 1, 1)
frame.Draggable = true
frame.Active = true
frame.Transparency = 0.6
local partInfo = Instance.new("TextLabel", frame)
partInfo.Position = UDim2.new(0.5, 0, 0.1, 0)
partInfo.AnchorPoint = Vector2.new(0.5, 0)
partInfo.Size = UDim2.new(0.9, 0, 0.2, 0)
partInfo.BackgroundTransparency = 1
partInfo.BorderSizePixel = 0
partInfo.Font = Enum.Font.Arimo
partInfo.TextScaled = true
partInfo.Text = "No part selected"
local parentInfo = Instance.new("TextLabel", frame)
parentInfo.Position = UDim2.new(0.5, 0, 0.4, 0)
parentInfo.AnchorPoint = Vector2.new(0.5, 0)
parentInfo.Size = UDim2.new(0.9, 0, 0.2, 0)
parentInfo.BackgroundTransparency = 1
parentInfo.BorderSizePixel = 0
parentInfo.Font = Enum.Font.Arimo
parentInfo.TextScaled = true
parentInfo.Text = "No part selected"
parentInfo.RichText = true
local positionInfo = Instance.new("TextLabel", frame)
positionInfo.Position = UDim2.new(0.5, 0, 0.7, 0)
positionInfo.AnchorPoint = Vector2.new(0.5, 0)
positionInfo.Size = UDim2.new(0.9, 0, 0.2, 0)
positionInfo.BackgroundTransparency = 1
positionInfo.BorderSizePixel = 0
positionInfo.Font = Enum.Font.Arimo
positionInfo.TextScaled = true
positionInfo.Text = "No part selected"
positionInfo.RichText = true
mouse.Button2Down:Connect(function()
local ray = Ray.new(mouse.UnitRay.Origin, mouse.UnitRay.Direction * 10000)
local part, position = workspace:FindPartOnRay(ray, player.Character)
if part then
switch3:Play()
box.Parent = part
box.Adornee = part
partInfo.Text = part.Name
parentInfo.Text = "Parent: " .. "game." .. part:GetFullName() .. ""
positionInfo.Text = "Position: " .. "" .. tostring(part.Position) .. ""
else
kerplunk:Play()
box.Parent = gui
box.Adornee = nil
partInfo.Text = "No part selected"
parentInfo.Text = "No part selected"
positionInfo.Text = "No part selected"
end
end)