Josiahiscool73

property scanner

Jan 16th, 2026 (edited)
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.57 KB | None | 0 0
  1. --[[
  2. basically you can type the path of any property and grab it and everything related to it so for example you can grab a model from studio or from a different game and ask ai to use that dump to recreate the model in a way you can execute it in your executor
  3.  
  4.  
  5. dump file is inside workspace its a regular script named dump which contains everything u need
  6. ]]
  7.  
  8.  
  9. local PropertyDatabase = {
  10. -- Universal Properties
  11. "Name", "Parent", "ClassName", "Archivable", "RobloxLocked", "SourceAssetId", "UniqueId",
  12.  
  13. -- State Properties
  14. "Enabled", "Active", "Visible", "Playing", "IsPlaying", "Looped", "Priority", "Status",
  15.  
  16. -- Appearance Properties
  17. "Color", "Color3", "BrickColor", "Material", "MaterialVariant", "Transparency", "Reflectance",
  18. "BackgroundColor3", "BackgroundTransparency", "BorderColor3", "TextColor3", "Image", "Texture",
  19. "TextureId", "MeshId", "MeshType", "Scale", "Offset", "VertexColor", "DoubleSided",
  20. "RenderFidelity", "CollisionFidelity",
  21.  
  22. -- Transform Properties
  23. "CFrame", "Position", "Orientation", "Rotation", "Size", "Anchored", "PivotOffset", "WorldPivot",
  24.  
  25. -- Physics Properties
  26. "CanCollide", "CanTouch", "CanQuery", "CollisionGroup", "CollisionGroupId", "Velocity",
  27. "RotVelocity", "AssemblyLinearVelocity", "AssemblyAngularVelocity", "Elasticity", "Friction",
  28. "Density", "Mass", "Massless", "CustomPhysicalProperties", "FormFactor", "Shape",
  29. "TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface",
  30.  
  31. -- Text Properties
  32. "Text", "TextSize", "TextScaled", "TextWrapped", "Font", "FontFace", "FontSize",
  33. "TextXAlignment", "TextYAlignment", "TextStrokeColor3", "TextStrokeTransparency",
  34. "RichText", "LineHeight", "MaxVisibleGraphemes", "PlaceholderText", "PlaceholderColor3",
  35. "ClearTextOnFocus", "MultiLine", "TextEditable", "CursorPosition", "SelectionStart",
  36.  
  37. -- GUI Properties
  38. "AnchorPoint", "LayoutOrder", "ZIndex", "ClipsDescendants", "Selectable", "AutoButtonColor",
  39. "Modal", "AbsolutePosition", "AbsoluteSize", "AbsoluteRotation", "AutomaticSize",
  40. "SizeConstraint", "Draggable", "Interactable", "BorderSizePixel", "BorderMode",
  41. "ScrollingEnabled", "CanvasSize", "CanvasPosition", "ScrollBarThickness",
  42.  
  43. -- Sound Properties
  44. "SoundId", "Volume", "Pitch", "PlaybackSpeed", "TimePosition", "RollOffMode",
  45. "RollOffMinDistance", "RollOffMaxDistance", "EmitterSize", "PlayOnRemove", "SoundGroup",
  46.  
  47. -- Animation Properties
  48. "AnimationId", "Speed", "Length", "WeightCurrent", "WeightTarget", "Animation",
  49.  
  50. -- Lighting Properties
  51. "Brightness", "Color", "Range", "Shadows", "Ambient", "OutdoorAmbient", "TimeOfDay",
  52. "ClockTime", "Technology", "GlobalShadows", "FogColor", "FogEnd", "FogStart",
  53. "ExposureCompensation", "EnvironmentDiffuseScale", "EnvironmentSpecularScale",
  54.  
  55. -- Model Properties
  56. "PrimaryPart", "ModelStreamingMode", "LevelOfDetail",
  57.  
  58. -- Camera Properties
  59. "CameraType", "CameraSubject", "FieldOfView", "Focus", "HeadLocked", "HeadScale",
  60. "ViewportSize", "FieldOfViewMode",
  61.  
  62. -- Humanoid Properties
  63. "Health", "MaxHealth", "WalkSpeed", "JumpPower", "JumpHeight", "AutoJumpEnabled",
  64. "DisplayDistanceType", "RigType", "HipHeight", "Sit", "Jump", "AutoRotate",
  65. "MoveDirection", "TargetPoint", "PlatformStand", "HealthDisplayDistance",
  66. "HealthDisplayType", "NameDisplayDistance", "NameOcclusion", "DisplayName",
  67.  
  68. -- Constraint Properties
  69. "Attachment0", "Attachment1", "LimitsEnabled", "Restitution", "MaxForce", "MaxTorque",
  70. "Responsiveness", "RigidityEnabled", "Radius", "Thickness", "Length",
  71.  
  72. -- ParticleEmitter Properties
  73. "Rate", "Lifetime", "Speed", "Acceleration", "Drag", "EmissionDirection", "LockedToPart",
  74. "LightEmission", "LightInfluence", "SpreadAngle", "VelocityInheritance", "Rotation",
  75. "RotSpeed", "FaceCamera", "ShapeStyle", "FlipbookMode",
  76.  
  77. -- Player Properties
  78. "UserId", "Character", "Team", "TeamColor", "Neutral", "CharacterAppearanceId",
  79. "AccountAge", "MembershipType", "HasVerifiedBadge", "CameraMode",
  80. "CameraMaxZoomDistance", "CameraMinZoomDistance",
  81.  
  82. -- Workspace Properties
  83. "CurrentCamera", "Gravity", "FallenPartsDestroyHeight", "StreamingEnabled",
  84. "FilteringEnabled", "GlobalWind", "Terrain",
  85.  
  86. -- Tool Properties
  87. "CanBeDropped", "RequiresHandle", "Grip", "GripForward", "GripPos", "GripRight",
  88. "GripUp", "ToolTip", "ManualActivationOnly",
  89.  
  90. -- Value Properties
  91. "Value", "MaxValue", "MinValue",
  92.  
  93. -- Additional Properties
  94. "Heat", "TimeScale", "SecondaryColor", "Opacity", "RiseVelocity", "SparkleColor",
  95. "SkyboxBk", "SkyboxDn", "SkyboxFt", "SkyboxLf", "SkyboxRt", "SkyboxUp",
  96. "P", "D", "AngularVelocity", "ScrollingDirection", "ElasticBehavior",
  97. "FillDirection", "SortOrder", "Padding", "CellSize", "CellPadding",
  98. "ActionText", "ObjectText", "MaxActivationDistance", "HoldDuration",
  99. "Video", "IsLoaded", "TimeLength", "Resolution", "Bypass", "Attack",
  100. "EndEffector", "Target", "Pole", "ChainRoot", "Weight", "SmoothTime",
  101. "AutoAssignable", "Score", "AutoColorCharacters", "CursorIcon",
  102. "Adornee", "FillColor", "FillTransparency", "OutlineColor",
  103. "AlwaysOnTop", "MaxDistance", "StudsOffset", "SizeOffset",
  104. "DisplayOrder", "IgnoreGuiInset", "ResetOnSpawn", "ZIndexBehavior",
  105. "Ambient", "LightColor", "LightDirection", "ImageColor3",
  106. "ColorMap", "NormalMap", "RoughnessMap", "MetalnessMap",
  107. "Density", "Cover", "Glare", "Haze", "Decay",
  108. "BlastPressure", "BlastRadius", "ExplosionType",
  109. "Disabled", "Occupant", "Throttle", "Steer", "MaxSpeed",
  110. "InitialPrompt", "GoodbyeDialog", "Purpose", "ConversationDistance",
  111. "Time", "EasingDirection", "EasingStyle", "CornerRadius",
  112. "LocalTransparencyModifier", "CastShadow", "LinkedSource", "Source"
  113. }
  114.  
  115. -- Convert to lookup table
  116. local PropertyLookup = {}
  117. for _, prop in ipairs(PropertyDatabase) do
  118. PropertyLookup[prop] = true
  119. end
  120.  
  121. -- ============================================
  122. -- OPTIMIZED PROPERTY GETTER
  123. -- ============================================
  124.  
  125. local function GetProperties(instance)
  126. if typeof(instance) ~= "Instance" then
  127. return {}
  128. end
  129.  
  130. local properties = {}
  131. local readOnlyProps = {
  132. "ClassName", "UniqueId", "DataCost", "AbsolutePosition",
  133. "AbsoluteSize", "AbsoluteRotation", "WorldPivot",
  134. "AssemblyLinearVelocity", "AssemblyAngularVelocity",
  135. "IsPlaying", "IsPaused", "IsLoaded", "TimeLength"
  136. }
  137.  
  138. local function isReadOnly(prop)
  139. for _, readOnly in ipairs(readOnlyProps) do
  140. if prop == readOnly then return true end
  141. end
  142. return false
  143. end
  144.  
  145. -- Try all known properties
  146. for propName in pairs(PropertyLookup) do
  147. local success, value = pcall(function()
  148. return instance[propName]
  149. end)
  150.  
  151. if success and value ~= nil then
  152. local valueType = typeof(value)
  153. if valueType ~= "function" and valueType ~= "RBXScriptSignal" then
  154. properties[propName] = {
  155. Value = value,
  156. Type = valueType,
  157. ReadOnly = isReadOnly(propName)
  158. }
  159. end
  160. end
  161. end
  162.  
  163. return properties
  164. end
  165.  
  166. -- ============================================
  167. -- ENHANCED PATH RESOLVER
  168. -- ============================================
  169.  
  170. local function ResolvePath(pathString)
  171. pathString = pathString:gsub("^%s+", ""):gsub("%s+$", "")
  172.  
  173. if pathString == "" then
  174. return nil, "Empty path"
  175. end
  176.  
  177. -- Service shortcuts
  178. local serviceMap = {
  179. ["workspace"] = workspace,
  180. ["ws"] = workspace,
  181. ["game"] = game,
  182. ["players"] = game:GetService("Players"),
  183. ["lighting"] = game:GetService("Lighting"),
  184. ["replicatedstorage"] = game:GetService("ReplicatedStorage"),
  185. ["rs"] = game:GetService("ReplicatedStorage"),
  186. ["serverstorage"] = game:GetService("ServerStorage"),
  187. ["ss"] = game:GetService("ServerStorage")
  188. }
  189.  
  190. -- Try direct eval
  191. local success, result = pcall(function()
  192. return loadstring("return " .. pathString)()
  193. end)
  194.  
  195. if success and typeof(result) == "Instance" then
  196. return result, nil
  197. end
  198.  
  199. -- Parse manually
  200. local parts = {}
  201. for part in pathString:gmatch("[^%.]+") do
  202. table.insert(parts, part)
  203. end
  204.  
  205. if #parts == 0 then
  206. return nil, "Invalid path"
  207. end
  208.  
  209. local current = serviceMap[parts[1]:lower()]
  210. local startIndex = 2
  211.  
  212. if not current then
  213. current = workspace
  214. startIndex = 1
  215. end
  216.  
  217. -- Traverse
  218. for i = startIndex, #parts do
  219. local partName = parts[i]
  220. local found = false
  221.  
  222. local child = current:FindFirstChild(partName)
  223. if child then
  224. current = child
  225. found = true
  226. else
  227. for _, child in ipairs(current:GetChildren()) do
  228. if child.Name:lower() == partName:lower() then
  229. current = child
  230. found = true
  231. break
  232. end
  233. end
  234. end
  235.  
  236. if not found then
  237. return nil, "Could not find '" .. partName .. "' in " .. current:GetFullName()
  238. end
  239. end
  240.  
  241. return current, nil
  242. end
  243.  
  244. -- ============================================
  245. -- CRASH-FREE DEEP SCANNER WITH YIELDING
  246. -- ============================================
  247.  
  248. local RunService = game:GetService("RunService")
  249.  
  250. local function DeepScan(targetInstance, progressCallback)
  251. local scanData = {
  252. Target = nil,
  253. Descendants = {},
  254. TotalInstances = 0,
  255. TotalProperties = 0,
  256. StartTime = tick()
  257. }
  258.  
  259. if not targetInstance then
  260. return scanData
  261. end
  262.  
  263. local function scanInstance(instance, depth)
  264. local props = GetProperties(instance)
  265. local propCount = 0
  266. for _ in pairs(props) do
  267. propCount = propCount + 1
  268. scanData.TotalProperties = scanData.TotalProperties + 1
  269. end
  270.  
  271. local instanceData = {
  272. Instance = instance,
  273. Path = instance:GetFullName(),
  274. ClassName = instance.ClassName,
  275. Properties = props,
  276. PropertyCount = propCount,
  277. Depth = depth or 0
  278. }
  279.  
  280. if depth == 0 then
  281. scanData.Target = instanceData
  282. else
  283. table.insert(scanData.Descendants, instanceData)
  284. end
  285.  
  286. scanData.TotalInstances = scanData.TotalInstances + 1
  287.  
  288. return instanceData
  289. end
  290.  
  291. -- Scan target
  292. scanInstance(targetInstance, 0)
  293.  
  294. if progressCallback then
  295. progressCallback(scanData.TotalInstances, scanData.TotalProperties)
  296. end
  297.  
  298. -- Get all descendants at once
  299. local descendants = targetInstance:GetDescendants()
  300. local totalDescendants = #descendants
  301.  
  302. -- Process in batches with yielding
  303. local batchSize = 50 -- Process 50 instances at a time
  304.  
  305. for i = 1, totalDescendants, batchSize do
  306. -- Yield every batch to prevent timeout
  307. if i > 1 then
  308. RunService.Heartbeat:Wait()
  309. end
  310.  
  311. -- Process batch
  312. local batchEnd = math.min(i + batchSize - 1, totalDescendants)
  313.  
  314. for j = i, batchEnd do
  315. local descendant = descendants[j]
  316.  
  317. -- Calculate depth
  318. local depth = 0
  319. local current = descendant
  320. while current and current ~= targetInstance do
  321. depth = depth + 1
  322. current = current.Parent
  323. end
  324.  
  325. scanInstance(descendant, depth)
  326. end
  327.  
  328. -- Update progress
  329. if progressCallback then
  330. progressCallback(scanData.TotalInstances, scanData.TotalProperties)
  331. end
  332. end
  333.  
  334. scanData.EndTime = tick()
  335. scanData.ScanDuration = scanData.EndTime - scanData.StartTime
  336.  
  337. return scanData
  338. end
  339.  
  340. -- ============================================
  341. -- SERIALIZE TO LUA CODE
  342. -- ============================================
  343.  
  344. local function SerializeValue(value, valueType)
  345. if valueType == "string" then
  346. return string.format("%q", value)
  347. elseif valueType == "number" then
  348. if value ~= value then return "0/0" end -- NaN
  349. if value == math.huge then return "math.huge" end
  350. if value == -math.huge then return "-math.huge" end
  351. return tostring(value)
  352. elseif valueType == "boolean" then
  353. return tostring(value)
  354. elseif valueType == "CFrame" then
  355. local components = {value:GetComponents()}
  356. return string.format("CFrame.new(%s)", table.concat(components, ", "))
  357. elseif valueType == "Vector3" then
  358. return string.format("Vector3.new(%.4f, %.4f, %.4f)", value.X, value.Y, value.Z)
  359. elseif valueType == "Vector2" then
  360. return string.format("Vector2.new(%.4f, %.4f)", value.X, value.Y)
  361. elseif valueType == "UDim2" then
  362. return string.format("UDim2.new(%.4f, %d, %.4f, %d)",
  363. value.X.Scale, value.X.Offset, value.Y.Scale, value.Y.Offset)
  364. elseif valueType == "UDim" then
  365. return string.format("UDim.new(%.4f, %d)", value.Scale, value.Offset)
  366. elseif valueType == "Color3" then
  367. return string.format("Color3.new(%.4f, %.4f, %.4f)", value.R, value.G, value.B)
  368. elseif valueType == "BrickColor" then
  369. return string.format("BrickColor.new(%q)", tostring(value))
  370. elseif valueType == "EnumItem" then
  371. return tostring(value)
  372. else
  373. return "nil"
  374. end
  375. end
  376.  
  377. local function GenerateScript(scanData)
  378. local lines = {
  379. "-- Generated by Property Scanner Pro",
  380. "-- Instances: " .. scanData.TotalInstances,
  381. "-- Properties: " .. scanData.TotalProperties,
  382. "-- Scan Time: " .. string.format("%.2fs", scanData.ScanDuration),
  383. "",
  384. "local function createModel(parent)",
  385. " local instances = {}",
  386. ""
  387. }
  388.  
  389. -- Collect all instances
  390. local allInstances = {scanData.Target}
  391. for _, inst in ipairs(scanData.Descendants) do
  392. table.insert(allInstances, inst)
  393. end
  394.  
  395. -- Create instances
  396. for i, instData in ipairs(allInstances) do
  397. local varName = "inst_" .. i
  398. table.insert(lines, string.format(" local %s = Instance.new(%q)",
  399. varName, instData.ClassName))
  400. table.insert(lines, string.format(" %s.Name = %q",
  401. varName, instData.Instance.Name))
  402. table.insert(lines, string.format(" instances[%q] = %s",
  403. instData.Path, varName))
  404. end
  405.  
  406. table.insert(lines, "")
  407.  
  408. -- Set properties
  409. for i, instData in ipairs(allInstances) do
  410. local varName = "inst_" .. i
  411.  
  412. for propName, propData in pairs(instData.Properties) do
  413. if not propData.ReadOnly and propName ~= "Parent" and propName ~= "Name" then
  414. local valueStr = SerializeValue(propData.Value, propData.Type)
  415. if valueStr ~= "nil" then
  416. table.insert(lines, string.format(" pcall(function() %s.%s = %s end)",
  417. varName, propName, valueStr))
  418. end
  419. end
  420. end
  421. end
  422.  
  423. table.insert(lines, "")
  424. table.insert(lines, " -- Set parents")
  425.  
  426. for i, instData in ipairs(allInstances) do
  427. local varName = "inst_" .. i
  428. if i == 1 then
  429. table.insert(lines, string.format(" %s.Parent = parent", varName))
  430. else
  431. local parentPath = instData.Path:match("(.+)%..+$")
  432. if parentPath then
  433. table.insert(lines, string.format(" %s.Parent = instances[%q]",
  434. varName, parentPath))
  435. end
  436. end
  437. end
  438.  
  439. table.insert(lines, "")
  440. table.insert(lines, " return instances")
  441. table.insert(lines, "end")
  442. table.insert(lines, "")
  443. table.insert(lines, "-- Usage: createModel(workspace)")
  444.  
  445. return table.concat(lines, "\n")
  446. end
  447.  
  448. -- ============================================
  449. -- MODERN UI
  450. -- ============================================
  451.  
  452. local function CreateUI()
  453. local screenGui = Instance.new("ScreenGui")
  454. screenGui.Name = "PropertyScanner"
  455. screenGui.ResetOnSpawn = false
  456. screenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  457.  
  458. local main = Instance.new("Frame")
  459. main.Size = UDim2.new(0, 700, 0, 600)
  460. main.Position = UDim2.new(0.5, -350, 0.5, -300)
  461. main.BackgroundColor3 = Color3.fromRGB(30, 30, 35)
  462. main.BorderSizePixel = 0
  463. main.Parent = screenGui
  464.  
  465. local corner = Instance.new("UICorner")
  466. corner.CornerRadius = UDim.new(0, 12)
  467. corner.Parent = main
  468.  
  469. -- Title bar
  470. local titleBar = Instance.new("Frame")
  471. titleBar.Size = UDim2.new(1, 0, 0, 50)
  472. titleBar.BackgroundColor3 = Color3.fromRGB(40, 130, 255)
  473. titleBar.BorderSizePixel = 0
  474. titleBar.Parent = main
  475.  
  476. local titleCorner = Instance.new("UICorner")
  477. titleCorner.CornerRadius = UDim.new(0, 12)
  478. titleCorner.Parent = titleBar
  479.  
  480. local titleBarFix = Instance.new("Frame")
  481. titleBarFix.Size = UDim2.new(1, 0, 0, 12)
  482. titleBarFix.Position = UDim2.new(0, 0, 1, -12)
  483. titleBarFix.BackgroundColor3 = Color3.fromRGB(40, 130, 255)
  484. titleBarFix.BorderSizePixel = 0
  485. titleBarFix.Parent = titleBar
  486.  
  487. local title = Instance.new("TextLabel")
  488. title.Size = UDim2.new(1, -100, 1, 0)
  489. title.Position = UDim2.new(0, 15, 0, 0)
  490. title.BackgroundTransparency = 1
  491. title.Text = "šŸ” Property Scanner Pro"
  492. title.TextColor3 = Color3.fromRGB(255, 255, 255)
  493. title.TextSize = 20
  494. title.Font = Enum.Font.GothamBold
  495. title.TextXAlignment = Enum.TextXAlignment.Left
  496. title.Parent = titleBar
  497.  
  498. local closeBtn = Instance.new("TextButton")
  499. closeBtn.Size = UDim2.new(0, 40, 0, 40)
  500. closeBtn.Position = UDim2.new(1, -45, 0, 5)
  501. closeBtn.BackgroundColor3 = Color3.fromRGB(255, 70, 70)
  502. closeBtn.BorderSizePixel = 0
  503. closeBtn.Text = "Ɨ"
  504. closeBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
  505. closeBtn.TextSize = 24
  506. closeBtn.Font = Enum.Font.GothamBold
  507. closeBtn.Parent = titleBar
  508.  
  509. local closeBtnCorner = Instance.new("UICorner")
  510. closeBtnCorner.CornerRadius = UDim.new(0, 8)
  511. closeBtnCorner.Parent = closeBtn
  512.  
  513. closeBtn.MouseButton1Click:Connect(function()
  514. screenGui:Destroy()
  515. end)
  516.  
  517. -- Content
  518. local content = Instance.new("Frame")
  519. content.Size = UDim2.new(1, -30, 1, -80)
  520. content.Position = UDim2.new(0, 15, 0, 65)
  521. content.BackgroundTransparency = 1
  522. content.Parent = main
  523.  
  524. local inputLabel = Instance.new("TextLabel")
  525. inputLabel.Size = UDim2.new(1, 0, 0, 20)
  526. inputLabel.BackgroundTransparency = 1
  527. inputLabel.Text = "Instance Path:"
  528. inputLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
  529. inputLabel.TextSize = 14
  530. inputLabel.Font = Enum.Font.GothamMedium
  531. inputLabel.TextXAlignment = Enum.TextXAlignment.Left
  532. inputLabel.Parent = content
  533.  
  534. local inputBox = Instance.new("TextBox")
  535. inputBox.Size = UDim2.new(1, 0, 0, 45)
  536. inputBox.Position = UDim2.new(0, 0, 0, 25)
  537. inputBox.BackgroundColor3 = Color3.fromRGB(45, 45, 50)
  538. inputBox.BorderSizePixel = 0
  539. inputBox.PlaceholderText = "workspace.Part or game.Lighting"
  540. inputBox.Text = ""
  541. inputBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  542. inputBox.TextSize = 14
  543. inputBox.Font = Enum.Font.Code
  544. inputBox.ClearTextOnFocus = false
  545. inputBox.Parent = content
  546.  
  547. local inputCorner = Instance.new("UICorner")
  548. inputCorner.CornerRadius = UDim.new(0, 8)
  549. inputCorner.Parent = inputBox
  550.  
  551. local inputPadding = Instance.new("UIPadding")
  552. inputPadding.PaddingLeft = UDim.new(0, 12)
  553. inputPadding.Parent = inputBox
  554.  
  555. local scanBtn = Instance.new("TextButton")
  556. scanBtn.Size = UDim2.new(0, 200, 0, 45)
  557. scanBtn.Position = UDim2.new(0, 0, 0, 80)
  558. scanBtn.BackgroundColor3 = Color3.fromRGB(40, 200, 100)
  559. scanBtn.BorderSizePixel = 0
  560. scanBtn.Text = "šŸ” Scan & Generate"
  561. scanBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
  562. scanBtn.TextSize = 16
  563. scanBtn.Font = Enum.Font.GothamBold
  564. scanBtn.Parent = content
  565.  
  566. local scanBtnCorner = Instance.new("UICorner")
  567. scanBtnCorner.CornerRadius = UDim.new(0, 8)
  568. scanBtnCorner.Parent = scanBtn
  569.  
  570. local status = Instance.new("TextLabel")
  571. status.Size = UDim2.new(1, -210, 0, 45)
  572. status.Position = UDim2.new(0, 210, 0, 80)
  573. status.BackgroundTransparency = 1
  574. status.Text = "Ready to scan"
  575. status.TextColor3 = Color3.fromRGB(150, 150, 150)
  576. status.TextSize = 13
  577. status.Font = Enum.Font.Gotham
  578. status.TextXAlignment = Enum.TextXAlignment.Left
  579. status.Parent = content
  580.  
  581. local resultsFrame = Instance.new("Frame")
  582. resultsFrame.Size = UDim2.new(1, 0, 1, -140)
  583. resultsFrame.Position = UDim2.new(0, 0, 0, 140)
  584. resultsFrame.BackgroundColor3 = Color3.fromRGB(20, 20, 25)
  585. resultsFrame.BorderSizePixel = 0
  586. resultsFrame.Parent = content
  587.  
  588. local resultsCorner = Instance.new("UICorner")
  589. resultsCorner.CornerRadius = UDim.new(0, 8)
  590. resultsCorner.Parent = resultsFrame
  591.  
  592. local scrollFrame = Instance.new("ScrollingFrame")
  593. scrollFrame.Size = UDim2.new(1, -10, 1, -10)
  594. scrollFrame.Position = UDim2.new(0, 5, 0, 5)
  595. scrollFrame.BackgroundTransparency = 1
  596. scrollFrame.BorderSizePixel = 0
  597. scrollFrame.ScrollBarThickness = 6
  598. scrollFrame.ScrollBarImageColor3 = Color3.fromRGB(80, 80, 90)
  599. scrollFrame.Parent = resultsFrame
  600.  
  601. local resultsText = Instance.new("TextLabel")
  602. resultsText.Size = UDim2.new(1, -10, 1, 0)
  603. resultsText.BackgroundTransparency = 1
  604. resultsText.Text = "Results will appear here...\n\nExamples:\n• workspace.Baseplate\n• game.Lighting\n• workspace.idekbruh"
  605. resultsText.TextColor3 = Color3.fromRGB(180, 180, 180)
  606. resultsText.TextSize = 12
  607. resultsText.Font = Enum.Font.Code
  608. resultsText.TextXAlignment = Enum.TextXAlignment.Left
  609. resultsText.TextYAlignment = Enum.TextYAlignment.Top
  610. resultsText.TextWrapped = true
  611. resultsText.Parent = scrollFrame
  612.  
  613. -- Scan logic with proper yielding
  614. local isScanning = false
  615.  
  616. scanBtn.MouseButton1Click:Connect(function()
  617. if isScanning then
  618. return
  619. end
  620.  
  621. local path = inputBox.Text
  622.  
  623. if path == "" then
  624. status.Text = "āŒ Please enter a path"
  625. status.TextColor3 = Color3.fromRGB(255, 100, 100)
  626. return
  627. end
  628.  
  629. isScanning = true
  630. scanBtn.Text = "ā³ Scanning..."
  631. scanBtn.BackgroundColor3 = Color3.fromRGB(255, 180, 50)
  632. status.Text = "Resolving path..."
  633. status.TextColor3 = Color3.fromRGB(255, 200, 100)
  634.  
  635. task.spawn(function()
  636. task.wait(0.1)
  637.  
  638. local instance, err = ResolvePath(path)
  639.  
  640. if not instance then
  641. scanBtn.Text = "šŸ” Scan & Generate"
  642. scanBtn.BackgroundColor3 = Color3.fromRGB(40, 200, 100)
  643. status.Text = "āŒ " .. (err or "Path not found")
  644. status.TextColor3 = Color3.fromRGB(255, 100, 100)
  645. resultsText.Text = err or "Could not resolve path"
  646. isScanning = false
  647. return
  648. end
  649.  
  650. status.Text = "Scanning instances..."
  651.  
  652. local scanData = DeepScan(instance, function(instances, properties)
  653. status.Text = string.format("Scanning... %d instances, %d properties",
  654. instances, properties)
  655. end)
  656.  
  657. status.Text = "Generating code..."
  658. task.wait(0.1)
  659.  
  660. local code = GenerateScript(scanData)
  661.  
  662. -- Save to workspace
  663. local oldDump = workspace:FindFirstChild("dump")
  664. if oldDump then
  665. oldDump:Destroy()
  666. end
  667.  
  668. local dumpScript = Instance.new("Script")
  669. dumpScript.Name = "dump"
  670. dumpScript.Source = code
  671. dumpScript.Parent = workspace
  672.  
  673. local resultText = string.format(
  674. "āœ… SCAN COMPLETE\n\n" ..
  675. "Path: %s\n" ..
  676. "Class: %s\n" ..
  677. "Instances: %d\n" ..
  678. "Properties: %d\n" ..
  679. "Duration: %.2fs\n\n" ..
  680. "āœ… Dump script created in Workspace!",
  681. scanData.Target.Path,
  682. scanData.Target.ClassName,
  683. scanData.TotalInstances,
  684. scanData.TotalProperties,
  685. scanData.ScanDuration
  686. )
  687.  
  688. resultsText.Text = resultText
  689. resultsText.Size = UDim2.new(1, -10, 0, math.max(resultsText.TextBounds.Y, scrollFrame.AbsoluteSize.Y))
  690. scrollFrame.CanvasSize = UDim2.new(0, 0, 0, resultsText.TextBounds.Y + 10)
  691.  
  692. scanBtn.Text = "šŸ” Scan & Generate"
  693. scanBtn.BackgroundColor3 = Color3.fromRGB(40, 200, 100)
  694. status.Text = string.format("āœ… Complete! %d instances", scanData.TotalInstances)
  695. status.TextColor3 = Color3.fromRGB(100, 255, 150)
  696.  
  697. isScanning = false
  698.  
  699. print("\n" .. resultText)
  700. end)
  701. end)
  702.  
  703. -- Draggable
  704. local dragging, dragInput, dragStart, startPos
  705.  
  706. titleBar.InputBegan:Connect(function(input)
  707. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  708. dragging = true
  709. dragStart = input.Position
  710. startPos = main.Position
  711.  
  712. input.Changed:Connect(function()
  713. if input.UserInputState == Enum.UserInputState.End then
  714. dragging = false
  715. end
  716. end)
  717. end
  718. end)
  719.  
  720. titleBar.InputChanged:Connect(function(input)
  721. if input.UserInputType == Enum.UserInputType.MouseMovement then
  722. dragInput = input
  723. end
  724. end)
  725.  
  726. game:GetService("UserInputService").InputChanged:Connect(function(input)
  727. if input == dragInput and dragging then
  728. local delta = input.Position - dragStart
  729. main.Position = UDim2.new(
  730. startPos.X.Scale, startPos.X.Offset + delta.X,
  731. startPos.Y.Scale, startPos.Y.Offset + delta.Y
  732. )
  733. end
  734. end)
  735.  
  736. return screenGui
  737. end
  738.  
  739. -- ============================================
  740. -- MAIN
  741. -- ============================================
  742.  
  743. local gui = CreateUI()
  744.  
  745. if game:GetService("RunService"):IsStudio() then
  746. gui.Parent = game:GetService("CoreGui")
  747. else
  748. local player = game:GetService("Players").LocalPlayer
  749. if player then
  750. gui.Parent = player:WaitForChild("PlayerGui")
  751. end
  752. end
  753.  
  754. print("\n" .. string.rep("=", 70))
  755. print("PROPERTY SCANNER PRO - CRASH-FREE")
  756. print(string.rep("=", 70))
  757. print("āœ… Optimized with proper yielding")
  758. print("āœ… Batch processing prevents timeouts")
  759. print("āœ… Safe for large hierarchies")
  760. print(string.rep("=", 70) .. "\n")
Advertisement
Add Comment
Please, Sign In to add comment