Advertisement
endosoldier

Untitled

Dec 8th, 2019
630
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.41 KB | None | 0 0
  1. local NewWindow = Instance.new("Frame")
  2. local UIAspectRatioConstraint = Instance.new("UIAspectRatioConstraint")
  3. local UIListLayout = Instance.new("UIListLayout")
  4. local NewButton = Instance.new("TextButton")
  5. local NewTab = Instance.new("TextButton")
  6. local NewText = Instance.new("TextLabel")
  7.  
  8. --Properties:
  9.  
  10. NewWindow.Name = "NewWindow"
  11. NewWindow.AnchorPoint = Vector2.new(0.5, 0.5)
  12. NewWindow.BackgroundColor3 = Color3.new(0.156863, 0.117647, 0.156863)
  13. NewWindow.BorderSizePixel = 0
  14. NewWindow.Position = UDim2.new(0.5, 0, 0.5, 0)
  15. NewWindow.Size = UDim2.new(0.300000012, 0, 0.349999994, 0)
  16. NewWindow.Visible = false
  17.  
  18. UIAspectRatioConstraint.Parent = NewWindow
  19. UIAspectRatioConstraint.AspectRatio = 1.5740000009537
  20.  
  21. UIListLayout.Parent = NewWindow
  22. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  23. UIListLayout.Padding = UDim.new(0, 5)
  24.  
  25. NewButton.Name = "NewButton"
  26. NewButton.BackgroundColor3 = Color3.new(1, 1, 1)
  27. NewButton.BackgroundTransparency = 1
  28. NewButton.Size = UDim2.new(1, 0, 0.100000001, 0)
  29. NewButton.Font = Enum.Font.SourceSansBold
  30. NewButton.TextColor3 = Color3.new(1, 1, 1)
  31. NewButton.TextScaled = true
  32. NewButton.TextSize = 14
  33. NewButton.TextWrapped = true
  34. NewButton.TextXAlignment = Enum.TextXAlignment.Left
  35.  
  36. NewTab.Name = "NewTab"
  37. NewTab.BackgroundColor3 = Color3.new(0.796078, 0.172549, 0.172549)
  38. NewTab.BackgroundTransparency = 1
  39. NewTab.BorderSizePixel = 0
  40. NewTab.Position = UDim2.new(0, 0, 0.300000012, 0)
  41. NewTab.Size = UDim2.new(1, 0, 0.100000001, 0)
  42. NewTab.AutoButtonColor = false
  43. NewTab.Font = Enum.Font.SourceSansBold
  44. NewTab.Text = "Visuals"
  45. NewTab.TextColor3 = Color3.new(1, 1, 1)
  46. NewTab.TextScaled = true
  47. NewTab.TextSize = 30
  48. NewTab.TextWrapped = true
  49.  
  50. NewText.Name = "NewText"
  51. NewText.BackgroundColor3 = Color3.new(1, 1, 1)
  52. NewText.BackgroundTransparency = 1
  53. NewText.BorderSizePixel = 0
  54. NewText.Size = UDim2.new(1, 0, 0.100000001, 0)
  55. NewText.Font = Enum.Font.SourceSansBold
  56. NewText.Text = ""
  57. NewText.TextColor3 = Color3.new(1, 1, 1)
  58. NewText.TextScaled = true
  59. NewText.TextSize = 14
  60. NewText.TextWrapped = true
  61. NewText.TextXAlignment = Enum.TextXAlignment.Left
  62.  
  63. -- Gui to Lua
  64. -- Version: 3
  65.  
  66. -- Instances:
  67.  
  68. local GamerGui = Instance.new("ScreenGui")
  69. local GameFrame = Instance.new("Frame")
  70. local GameName = Instance.new("TextLabel")
  71. local TabHolder = Instance.new("Frame")
  72. local UIListLayout = Instance.new("UIListLayout")
  73.  
  74. --Properties:
  75. GamerGui.Name = "ThisIsTheGui"
  76. GamerGui.ZIndexBehavior = Enum.ZIndexBehavior.Global
  77. GamerGui.Parent = game.CoreGui
  78.  
  79. GameFrame.Name = "GameFrame"
  80. GameFrame.Parent = GamerGui
  81. GameFrame.BackgroundColor3 = Color3.new(0.156863, 0.117647, 0.156863)
  82. GameFrame.BorderSizePixel = 0
  83. GameFrame.Size = UDim2.new(0.25, 0, 1, 0)
  84.  
  85. GameName.Name = "GameName"
  86. GameName.Parent = GameFrame
  87. GameName.AnchorPoint = Vector2.new(0.5, 0.5)
  88. GameName.BackgroundColor3 = Color3.new(1, 1, 1)
  89. GameName.BackgroundTransparency = 1
  90. GameName.Position = UDim2.new(0.5, 0, 0.100000001, 0)
  91. GameName.Size = UDim2.new(0.899999976, 0, 0.075000003, 0)
  92. GameName.Font = Enum.Font.GothamBold
  93. GameName.Text = ""
  94. GameName.TextColor3 = Color3.new(1, 1, 1)
  95. GameName.TextScaled = true
  96. GameName.TextSize = 14
  97. GameName.TextWrapped = true
  98.  
  99. TabHolder.Name = "TabHolder"
  100. TabHolder.Parent = GameFrame
  101. TabHolder.BackgroundColor3 = Color3.new(1, 1, 1)
  102. TabHolder.BackgroundTransparency = 1
  103. TabHolder.Position = UDim2.new(0, 0, 0.300000012, 0)
  104. TabHolder.Size = UDim2.new(1, 0, 0.699999988, 0)
  105.  
  106. UIListLayout.Parent = TabHolder
  107. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  108. UIListLayout.Padding = UDim.new(0, 5)
  109.  
  110. local tbl = {
  111.     toggles = {},
  112.     addTab = function(self, name, window)
  113.     local newTab = NewTab:Clone()
  114.     newTab.Text = tostring(name)
  115.     newTab.Parent = TabHolder
  116.    
  117.     newTab.MouseButton1Click:Connect(function()
  118.         window.instance.Visible = not window.instance.Visible
  119.         newTab.BackgroundTransparency = math.abs((newTab.BackgroundTransparency)-1)
  120.     end)
  121.    
  122.     return newTab
  123.     end,
  124.     setName = function(self, txt)
  125.     GameName.Text = txt
  126.     end,
  127. }
  128. tbl.newWindow = function(self, pos)
  129.     local newWindow = NewWindow:Clone()
  130.     newWindow.Position = UDim2.new(pos[1], pos[2], pos[3], pos[4])
  131.     newWindow.Parent = GamerGui
  132.     return {
  133.         instance = newWindow,
  134.         addText = function(self, txt)
  135.             local newText = NewText:Clone()
  136.             newText.Text = "   "..txt
  137.             newText.Parent = self.instance
  138.         end,
  139.         addButton = function(self, txt, callback)
  140.             local newBtn = NewButton:Clone()
  141.             newBtn.Text = "  "..txt
  142.             newBtn.Parent = self.instance
  143.            
  144.             newBtn.MouseButton1Click:Connect(callback)
  145.             return newBtn
  146.         end,
  147.         addToggle = function(self, txt, val)
  148.             local newBtn = NewButton:Clone()
  149.             newBtn.Text = "  > "..txt
  150.             newBtn.Parent = self.instance
  151.            
  152.             tbl.toggles[val] = false
  153.            
  154.             newBtn.MouseButton1Click:Connect(function()
  155.                 if tbl.toggles[val] == false then
  156.                     tbl.toggles[val] = true
  157.                     newBtn.TextColor3 = Color3.fromRGB(203, 44, 44)
  158.                 else
  159.                     tbl.toggles[val] = false
  160.                     newBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
  161.                 end
  162.             end)
  163.         end
  164.     }
  165.     end
  166. op = true
  167.  
  168. game:GetService("UserInputService").InputBegan:Connect(function(inputObject)
  169.     if inputObject.KeyCode == Enum.KeyCode.Insert then
  170.         if op == true then
  171.             GameFrame:TweenPosition(UDim2.new(-0.3, 0, 0, 0), "Out", "Quad", 0.6, false, function() op = false end)
  172.         else
  173.             GameFrame:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 0.6, false, function() op = true end)
  174.         end
  175.     end
  176. end)
  177.  
  178. return tbl
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement