Hebablazin

AGuiThing

May 30th, 2016
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.91 KB | None | 0 0
  1. Me = game.Players.LocalPlayer
  2. Char = Me.Character
  3. Gui = Me.PlayerGui
  4.  
  5. C3 = Color3.new
  6. UD = UDim2.new
  7.  
  8. VisibleOptions = nil
  9.  
  10. function RemoveOptions() if VisibleOptions then VisibleOptions:remove() VisibleOptions = nil end end
  11.  
  12. Decals = {File = "http://www.roblox.com/asset/?id=42330863", Txt = "http://www.roblox.com/asset/?id=42330895"}
  13. Options = {
  14. Close = {Name = "Close", Func = function(gui) if gui then gui:remove() end end},
  15. New = {Name = "New...", Func = function() end}
  16. }
  17.  
  18. function Notime(func, tiem)
  19. if tiem then wait(tiem) end
  20. coroutine.resume(coroutine.create(function()
  21. func()
  22. end))
  23. end
  24.  
  25. function EditGui(obj, parent, size, position, bgcolor, bordercolor, transparency, text, textcolor, auto)
  26. obj.Size = size
  27. obj.Position = position
  28. obj.BackgroundColor3 = bgcolor
  29. obj.BorderColor3 = bordercolor
  30. obj.BackgroundTransparency = transparency
  31. if obj:IsA("TextLabel") or obj:IsA("TextButton") then
  32. obj.Text = text
  33. obj.TextColor3 = textcolor
  34. end
  35. if obj:IsA("ImageButton") or obj:IsA("TextButton") then
  36. obj.AutoButtonColor = auto
  37. obj.MouseButton1Down:connect(function()
  38. RemoveOptions()
  39. end)
  40. end
  41. obj.Parent = parent
  42. end
  43.  
  44. function MoveGui(gui, button)
  45. button.MouseButton1Down:connect(function(x, y)
  46. local pos = gui.Position
  47. local conn = button.MouseMoved:connect(function(X, Y)
  48. gui.Position = pos + UD(0, X-x, 0, Y-y)
  49. end)
  50. local disc = false
  51. Notime(function()
  52. button.MouseButton1Up:wait()
  53. if disc == false then
  54. conn:disconnect()
  55. disc = true
  56. end
  57. end)
  58. if disc == false then
  59. button.MouseLeave:wait()
  60. conn:disconnect()
  61. end
  62. end)
  63. end
  64.  
  65. for _,v in pairs(Gui:children()) do if v.Name == "Files" then v:remove() end end
  66.  
  67. Sc = Instance.new("ScreenGui")
  68. Sc.Name = "Files"
  69.  
  70. Desktop = Instance.new("ImageButton")
  71. EditGui(Desktop, Sc, UD(1, 0, 1, 1), UD(0, 0, 0, -1), C3(0.25, 0.4, 0.9), C3(), 0, true)
  72. Desktop.BorderSizePixel = 0
  73.  
  74. Hide = Instance.new("TextButton")
  75. EditGui(Hide, Sc, UD(0, 200, 0, 25), UD(0.5, -100, 1, -25), C3(), C3(1,1,1), 0, "Hide", C3(1,1,1), false)
  76. Hide.Font = "Arial"
  77. Hide.FontSize = "Size24"
  78.  
  79. Hid = false
  80. Hidable = true
  81.  
  82. Hide.MouseButton1Down:connect(function()
  83. if Hidable then
  84. Hidable = false
  85. if Hid == false then
  86. Hid = true
  87. for i = 0, 1, 0.06 do
  88. Desktop.Position = UD(0, 0, i, -1)
  89. wait()
  90. end
  91. Desktop.Position = UD(0, 0, 1, -1)
  92. else
  93. Hid = false
  94. for i = 0, 1, 0.06 do
  95. Desktop.Position = UD(0, 0, 1-i, -1)
  96. wait()
  97. end
  98. Desktop.Position = UD(0, 0, 0, -1)
  99. end
  100. Hidable = true
  101. end
  102. if Hid then
  103. Hide.Text = "Show"
  104. else
  105. Hide.Text = "Hide"
  106. end
  107. end)
  108.  
  109. function ShowOptions(options, x, y, gui)
  110. if VisibleOptions then VisibleOptions:remove() VisibleOptions = nil end
  111. local X = 20
  112. local XX = X * #options
  113. local Main = Instance.new("Frame")
  114. EditGui(Main, Sc, UD(0, 100, 0, 4+XX), UD(0, x, 0, y), C3(0.72, 0.72, 0.72), C3(), 0, false)
  115. for i, v in pairs(options) do
  116. local Button = Instance.new("TextButton")
  117. EditGui(Button, Main, UD(1, 0, 0, 20), UD(0, 0, 0, 2+(X*(i-1))), C3(0.72, 0.72, 0.72), C3(), 0, v.Name, C3(), true)
  118. Button.BorderSizePixel = 0
  119. Button.TextXAlignment = "Left"
  120. Button.MouseButton1Down:connect(function()
  121. v.Func(gui)
  122. if VisibleOptions then VisibleOptions:remove() VisibleOptions = nil end
  123. end)
  124. end
  125. VisibleOptions = Main
  126. end
  127.  
  128. function MakeWindow(name, files)
  129. local Main = Instance.new("ImageButton")
  130. EditGui(Main, Desktop, UD(0, 350, 0, 250), UD(0.5, -175, 0.5, -125), C3(0.8, 0.8, 0.8), C3(), 0, false)
  131. Main.MouseButton2Down:connect(RemoveOptions)
  132. local Sec = Instance.new("ImageButton")
  133. EditGui(Sec, Main, UD(1, -10, 1, -45), UD(0, 5, 0, 40), C3(1,1,1), C3(), 0, false)
  134. Sec.AutoButtonColor = false
  135. Sec.MouseButton2Down:connect(function(x,y)
  136. ShowOptions({Options.New, Options.Close}, x, y, Main)
  137. end)
  138.  
  139. local Bar = Instance.new("ImageButton")
  140. EditGui(Bar, Main, UD(1, 0, 0, 25), UD(0, 0, 0, 0), C3(0.3,0.45,0.9), C3(), 0, false)
  141. Bar.Image = "http://www.roblox.com/asset/?id=48965808"
  142. Bar.AutoButtonColor = false
  143. Bar.MouseButton2Down:connect(function(x,y)
  144. ShowOptions({Options.Close}, x, y, Main)
  145. end)
  146.  
  147. local Icon = Instance.new("ImageLabel")
  148. EditGui(Icon, Bar, UD(0, 23, 1, -2), UD(0, 2, 0, 1), C3(), C3(), 1, false)
  149. Icon.Image = Decals.File
  150.  
  151. local NameText = Instance.new("TextLabel")
  152. EditGui(NameText, Icon, UD(0, 0, 1, 0), UD(1, 5, 0, 0), C3(), C3(), 1, name, C3(1, 1, 1), false)
  153. NameText.Font = "Arial"
  154. NameText.FontSize = "Size18"
  155. NameText.TextXAlignment = "Left"
  156.  
  157. local Close = Instance.new("TextButton")
  158. EditGui(Close, Bar, UD(0, 19, 1, -6), UD(1, -22, 0, 3), C3(1, 0.25, 0.15), C3(), 0, "X", C3(1,1,1), true)
  159. Close.Font = "ArialBold"
  160. Close.FontSize = "Size18"
  161.  
  162. Close.MouseButton1Click:connect(function()
  163. Main:remove()
  164. end)
  165. MoveGui(Main, Bar)
  166. end
  167.  
  168. function MakeTextFile(name, textvalue)
  169. end
  170.  
  171. Sc.Parent = Gui
  172.  
  173. wait(0.5)
  174.  
  175. MakeWindow("New Folder")
Add Comment
Please, Sign In to add comment