icy-desudesu

qwq

Aug 10th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1. --------------------------------------------------------------
  2. --GRAPHICAL USER INTERFACE BASED HEIRARCHICAL OBJECT EXPLORER-
  3. --------------------------------------------------------------
  4.  
  5. ------------
  6. --MEDIAFIRE-
  7. ------------
  8.  
  9. Player = Game:GetService("Players")["LocalPlayer"]
  10. Player_Gui = Player:FindFirstChild("PlayerGui")
  11.  
  12. function Show ( Ancestor )
  13.  
  14. function Display ( Ancestor )
  15.  
  16. Value_X = 0
  17. Value_Y = 0
  18.  
  19. Style_1 = "ChatRed"
  20. Style_2 = "ChatGreen"
  21. Style_3 = "ChatBlue"
  22. Size = UDim2.new(0.05, 0, 0.025, 0)
  23. TextColor = Color3.new(1, 1, 1)
  24.  
  25. Limit = 25
  26.  
  27. Offset = UDim2.new(0, 0, 0.25, 0)
  28.  
  29. pcall(function ()
  30. Player_Gui:FindFirstChild("Explorer"):Destroy()
  31. end)
  32.  
  33. Explorer = Instance.new("ScreenGui", Player_Gui)
  34. Explorer["Name"] = "Explorer"
  35.  
  36. Main_Frame = Instance.new("Frame", Explorer)
  37. Main_Frame["Name"] = "Main Frame"
  38. Main_Frame["Style"] = "RobloxRound"
  39. Main_Frame["Size"] = UDim2.new((Size.X.Scale * math.ceil(#Ancestor:GetChildren()/Limit)), 0, (Size.Y.Scale * Limit), 0)
  40. Main_Frame["Position"] = Offset
  41.  
  42. for Position, Object in pairs( Ancestor:GetChildren() ) do
  43.  
  44. local Frame = Instance.new("Frame", Explorer)
  45. Frame["Name"] = ""..Object["Name"]..""
  46. --Frame["Style"] = Style_1
  47. Frame["BackgroundTransparency"] = 1
  48. Frame["Size"] = Size
  49.  
  50. --[[Frame["MouseEnter"]:connect(function ()
  51. Frame["Style"] = Style_2
  52. end)
  53.  
  54. Frame["MouseLeave"]:connect(function ()
  55. Frame["Style"] = Style_1
  56. end)]]
  57.  
  58. local Text_Button = Instance.new("TextButton", Frame)
  59. Text_Button["Name"] = ""..Object["Name"]..""
  60. Text_Button["BackgroundTransparency"] = 0
  61. Text_Button["Size"] = Size
  62. Text_Button["TextColor3"] = TextColor
  63. if string.len(Object["Name"]) >= 15 then
  64. Text_Button["Text"] = ""..string.sub(Object["Name"], 1, 15).."..."
  65. else
  66. Text_Button["Text"] = ""..Object["Name"]..""
  67. end
  68. Text_Button["Position"] = UDim2.new(0.5, 0, 0.5, 0)
  69.  
  70. for Number = 1, 50 do
  71. if Value_Y < Limit * Number then
  72.  
  73. Frame["Position"] = Offset + UDim2.new(Value_X * Size.X.Scale, 0, Value_Y * Size.Y.Scale, 0)
  74.  
  75. else
  76.  
  77. if Value_Y >= Limit * Number then
  78.  
  79. Value_X = Value_X + 1
  80. Value_Y = 0
  81.  
  82. Frame["Position"] = Offset + UDim2.new(Value_X * Size.X.Scale, 0, Value_Y * Size.Y.Scale, 0)
  83.  
  84. end
  85. end
  86. end
  87.  
  88. Value_Y = Value_Y + 1
  89.  
  90. end
  91.  
  92. end
  93.  
  94. Display( Ancestor )
  95.  
  96. end
  97.  
  98. Show( Workspace )
Add Comment
Please, Sign In to add comment