Mr_3242

Sub Place explorer

Jun 2nd, 2026
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 10.44 KB | Gaming | 0 0
  1. local _Players = game:GetService('Players')
  2. local _TeleportService = game:GetService('TeleportService')
  3. local _AssetService = game:GetService('AssetService')
  4.  
  5. task.wait(0.5)
  6.  
  7. local v4 = _AssetService:GetGamePlacesAsync()
  8. local v5 = {}
  9. local v40 = {
  10.     CreateWindow = function(_, p6)
  11.         local _ScreenGui = Instance.new('ScreenGui')
  12.  
  13.         _ScreenGui.Name = 'SubPlacesViewer'
  14.         _ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild('PlayerGui')
  15.  
  16.         local _Frame = Instance.new('Frame')
  17.  
  18.         _Frame.Size = UDim2.new(0, 300, 0, 400)
  19.         _Frame.Position = UDim2.new(0.5, -150, 0.5, -200)
  20.         _Frame.BackgroundColor3 = Color3.fromRGB(35, 35, 45)
  21.         _Frame.BorderSizePixel = 0
  22.         _Frame.Parent = _ScreenGui
  23.  
  24.         local _UICorner = Instance.new('UICorner')
  25.  
  26.         _UICorner.CornerRadius = UDim.new(0, 10)
  27.         _UICorner.Parent = _Frame
  28.  
  29.         local _Frame2 = Instance.new('Frame')
  30.  
  31.         _Frame2.Size = UDim2.new(1, 0, 0, 40)
  32.         _Frame2.BackgroundColor3 = Color3.fromRGB(25, 25, 35)
  33.         _Frame2.BorderSizePixel = 0
  34.         _Frame2.Parent = _Frame
  35.  
  36.         local _UICorner2 = Instance.new('UICorner')
  37.  
  38.         _UICorner2.CornerRadius = UDim.new(0, 10)
  39.         _UICorner2.Parent = _Frame2
  40.  
  41.         local _TextLabel = Instance.new('TextLabel')
  42.  
  43.         _TextLabel.Size = UDim2.new(1, -40, 1, 0)
  44.         _TextLabel.Position = UDim2.new(0, 10, 0, 0)
  45.         _TextLabel.BackgroundTransparency = 1
  46.         _TextLabel.Text = p6
  47.         _TextLabel.TextColor3 = Color3.fromRGB(200, 200, 255)
  48.         _TextLabel.TextSize = 18
  49.         _TextLabel.Font = Enum.Font.GothamBold
  50.         _TextLabel.TextXAlignment = Enum.TextXAlignment.Left
  51.         _TextLabel.Parent = _Frame2
  52.  
  53.         return {
  54.             ScreenGui = _ScreenGui,
  55.             Frame = _Frame,
  56.             TitleBar = _Frame2,
  57.         }
  58.     end,
  59.     CreateDropdown = function(_, p13, p14, p15, p16)
  60.         local _Frame3 = Instance.new('Frame')
  61.  
  62.         _Frame3.Size = UDim2.new(1, -20, 0, 40)
  63.         _Frame3.Position = UDim2.new(0, 10, 0, 50)
  64.         _Frame3.BackgroundTransparency = 1
  65.         _Frame3.Parent = p13
  66.  
  67.         local _TextLabel2 = Instance.new('TextLabel')
  68.  
  69.         _TextLabel2.Size = UDim2.new(1, 0, 0, 20)
  70.         _TextLabel2.BackgroundTransparency = 1
  71.         _TextLabel2.Text = p14
  72.         _TextLabel2.TextColor3 = Color3.fromRGB(180, 180, 255)
  73.         _TextLabel2.TextSize = 14
  74.         _TextLabel2.Font = Enum.Font.Gotham
  75.         _TextLabel2.TextXAlignment = Enum.TextXAlignment.Left
  76.         _TextLabel2.Parent = _Frame3
  77.  
  78.         local _TextButton = Instance.new('TextButton')
  79.  
  80.         _TextButton.Size = UDim2.new(1, 0, 0, 30)
  81.         _TextButton.Position = UDim2.new(0, 0, 0, 20)
  82.         _TextButton.BackgroundColor3 = Color3.fromRGB(45, 45, 55)
  83.         _TextButton.Text = 'Select a place...'
  84.         _TextButton.TextColor3 = Color3.fromRGB(200, 200, 255)
  85.         _TextButton.TextSize = 14
  86.         _TextButton.Font = Enum.Font.Gotham
  87.         _TextButton.Parent = _Frame3
  88.  
  89.         local _UICorner3 = Instance.new('UICorner')
  90.  
  91.         _UICorner3.CornerRadius = UDim.new(0, 5)
  92.         _UICorner3.Parent = _TextButton
  93.  
  94.         local _ScrollingFrame = Instance.new('ScrollingFrame')
  95.  
  96.         _ScrollingFrame.Size = UDim2.new(1, 0, 0, 150)
  97.         _ScrollingFrame.Position = UDim2.new(0, 0, 0, 55)
  98.         _ScrollingFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 50)
  99.         _ScrollingFrame.BorderSizePixel = 0
  100.         _ScrollingFrame.ScrollBarThickness = 4
  101.         _ScrollingFrame.Visible = false
  102.         _ScrollingFrame.ZIndex = 2
  103.         _ScrollingFrame.Parent = _Frame3
  104.  
  105.         local _UICorner4 = Instance.new('UICorner')
  106.  
  107.         _UICorner4.CornerRadius = UDim.new(0, 5)
  108.         _UICorner4.Parent = _ScrollingFrame
  109.  
  110.         local u23 = nil
  111.  
  112.         local function v33()
  113.             _ScrollingFrame.CanvasSize = UDim2.new(0, 0, 0, #p15 * 30)
  114.  
  115.             local v24 = next
  116.             local v25, v26 = _ScrollingFrame:GetChildren()
  117.  
  118.             while true do
  119.                 local v27
  120.  
  121.                 v26, v27 = v24(v25, v26)
  122.  
  123.                 if v26 == nil then
  124.                     break
  125.                 end
  126.                 if v27:IsA('TextButton') then
  127.                     v27:Destroy()
  128.                 end
  129.             end
  130.  
  131.             local v28, v29, v30 = pairs(p15)
  132.  
  133.             while true do
  134.                 local u31
  135.  
  136.                 v30, u31 = v28(v29, v30)
  137.  
  138.                 if v30 == nil then
  139.                     break
  140.                 end
  141.  
  142.                 local _TextButton2 = Instance.new('TextButton')
  143.  
  144.                 _TextButton2.Size = UDim2.new(1, 0, 0, 30)
  145.                 _TextButton2.Position = UDim2.new(0, 0, 0, (v30 - 1) * 30)
  146.                 _TextButton2.BackgroundColor3 = Color3.fromRGB(45, 45, 55)
  147.                 _TextButton2.Text = '  ' .. u31
  148.                 _TextButton2.TextColor3 = Color3.fromRGB(200, 200, 255)
  149.                 _TextButton2.TextSize = 14
  150.                 _TextButton2.Font = Enum.Font.Gotham
  151.                 _TextButton2.TextXAlignment = Enum.TextXAlignment.Left
  152.                 _TextButton2.ZIndex = 3
  153.                 _TextButton2.Parent = _ScrollingFrame
  154.  
  155.                 _TextButton2.MouseButton1Click:Connect(function()
  156.                     u23 = u31:match('%(ID: (%d+)%)')
  157.                     _TextButton.Text = u31:sub(1, 25) .. (u31:len() > 25 and '...' or '')
  158.                     _ScrollingFrame.Visible = false
  159.  
  160.                     p16(u23)
  161.                 end)
  162.                 _TextButton2.MouseEnter:Connect(function()
  163.                     _TextButton2.BackgroundColor3 = Color3.fromRGB(55, 55, 65)
  164.                 end)
  165.                 _TextButton2.MouseLeave:Connect(function()
  166.                     _TextButton2.BackgroundColor3 = Color3.fromRGB(45, 45, 55)
  167.                 end)
  168.             end
  169.         end
  170.  
  171.         _TextButton.MouseButton1Click:Connect(function()
  172.             _ScrollingFrame.Visible = not _ScrollingFrame.Visible
  173.         end)
  174.         v33()
  175.  
  176.         return {
  177.             Frame = _Frame3,
  178.             UpdateOptions = v33,
  179.             GetSelected = function()
  180.                 return u23
  181.             end,
  182.         }
  183.     end,
  184.     CreateButton = function(_, p34, p35, p36, p37)
  185.         local _TextButton3 = Instance.new('TextButton')
  186.  
  187.         _TextButton3.Size = UDim2.new(1, -20, 0, 40)
  188.         _TextButton3.Position = p36
  189.         _TextButton3.BackgroundColor3 = Color3.fromRGB(50, 50, 60)
  190.         _TextButton3.Text = p35
  191.         _TextButton3.TextColor3 = Color3.fromRGB(200, 200, 255)
  192.         _TextButton3.TextSize = 16
  193.         _TextButton3.Font = Enum.Font.Gotham
  194.         _TextButton3.Parent = p34
  195.  
  196.         local _UICorner5 = Instance.new('UICorner')
  197.  
  198.         _UICorner5.CornerRadius = UDim.new(0, 5)
  199.         _UICorner5.Parent = _TextButton3
  200.  
  201.         _TextButton3.MouseButton1Click:Connect(p37)
  202.         _TextButton3.MouseEnter:Connect(function()
  203.             _TextButton3.BackgroundColor3 = Color3.fromRGB(60, 60, 70)
  204.         end)
  205.         _TextButton3.MouseLeave:Connect(function()
  206.             _TextButton3.BackgroundColor3 = Color3.fromRGB(50, 50, 60)
  207.         end)
  208.  
  209.         return _TextButton3
  210.     end,
  211. }
  212.  
  213. while task.wait() do
  214.     local v41, v42, v43 = pairs(v4:GetCurrentPage())
  215.  
  216.     while true do
  217.         local v44
  218.  
  219.         v43, v44 = v41(v42, v43)
  220.  
  221.         if v43 == nil then
  222.             break
  223.         end
  224.  
  225.         table.insert(v5, v44.Name .. ' (ID: ' .. tostring(v44.PlaceId) .. ')')
  226.     end
  227.  
  228.     if v4.IsFinished then
  229.         break
  230.     end
  231.  
  232.     v4:AdvanceToNextPageAsync()
  233. end
  234.  
  235. local _SubplaceExplorer = v40:CreateWindow('Subplace Explorer')
  236. local u46 = nil
  237.  
  238. v40:CreateDropdown(_SubplaceExplorer.Frame, 'Select Place', v5, function(p47)
  239.     u46 = p47
  240. end)
  241. v40:CreateButton(_SubplaceExplorer.Frame, 'Teleport to Place', UDim2.new(0, 10, 0, 220), function()
  242.     if u46 then
  243.         _TeleportService:Teleport(tonumber(u46), _Players.LocalPlayer)
  244.     else
  245.         warn('No place selected!')
  246.     end
  247. end)
  248. v40:CreateButton(_SubplaceExplorer.Frame, 'Copy Place ID', UDim2.new(0, 10, 0, 270), function()
  249.     if u46 then
  250.         setclipboard(u46)
  251.         print('Copied Place ID: ' .. u46)
  252.     else
  253.         print('No Place ID selected to copy.')
  254.     end
  255. end)
  256.  
  257. --// Professional Window Drag System
  258.  
  259. local Players = game:GetService("Players")
  260. local UserInputService = game:GetService("UserInputService")
  261.  
  262. local player = Players.LocalPlayer
  263. if not player then return end
  264.  
  265. local playerGui = player:WaitForChild("PlayerGui")
  266.  
  267. local processed = setmetatable({}, {__mode = "k"})
  268. local MIN_SIZE = 140
  269. local TOPBAR_HEIGHT = 50
  270.  
  271. local function isValidFrame(obj)
  272.     if not obj:IsA("Frame") then return false end
  273.     if processed[obj] then return false end
  274.     if not obj.Parent or not obj.Parent:IsA("ScreenGui") then return false end
  275.     if not obj.Visible then return false end
  276.     if obj.AbsoluteSize.X < MIN_SIZE or obj.AbsoluteSize.Y < MIN_SIZE then return false end
  277.     if not obj:IsDescendantOf(playerGui) then return false end
  278.     return true
  279. end
  280.  
  281. local function isInsideTopBar(frame, position)
  282.     local absPos = frame.AbsolutePosition
  283.     local relativeY = position.Y - absPos.Y
  284.    
  285.     return relativeY >= 0 and relativeY <= TOPBAR_HEIGHT
  286. end
  287.  
  288. local function makeDraggable(frame)
  289.     if not isValidFrame(frame) then return end
  290.     processed[frame] = true
  291.    
  292.     local dragging = false
  293.     local activeInput = nil
  294.     local startPos
  295.     local startOffset
  296.    
  297.     frame.InputBegan:Connect(function(input)
  298.         if input.UserInputType ~= Enum.UserInputType.Touch
  299.             and input.UserInputType ~= Enum.UserInputType.MouseButton1 then
  300.             return
  301.         end
  302.        
  303.         if input.UserInputState ~= Enum.UserInputState.Begin then
  304.             return
  305.         end
  306.        
  307.        
  308.         if not isInsideTopBar(frame, input.Position) then
  309.             return
  310.         end
  311.        
  312.         dragging = true
  313.         activeInput = input
  314.         startPos = input.Position
  315.         startOffset = frame.Position
  316.     end)
  317.    
  318.     frame.InputChanged:Connect(function(input)
  319.         if not dragging then return end
  320.         if input ~= activeInput then return end
  321.        
  322.         local delta = input.Position - startPos
  323.        
  324.         frame.Position = UDim2.new(
  325.             startOffset.X.Scale,
  326.             startOffset.X.Offset + delta.X,
  327.             startOffset.Y.Scale,
  328.             startOffset.Y.Offset + delta.Y
  329.         )
  330.     end)
  331.    
  332.     frame.InputEnded:Connect(function(input)
  333.         if input == activeInput then
  334.             dragging = false
  335.             activeInput = nil
  336.         end
  337.     end)
  338. end
  339.  
  340. for _, obj in ipairs(playerGui:GetDescendants()) do
  341.     makeDraggable(obj)
  342. end
  343.  
  344. playerGui.DescendantAdded:Connect(function(obj)
  345.     makeDraggable(obj)
  346. end)
Tags: delta
Advertisement
Add Comment
Please, Sign In to add comment