Advertisement
Guest User

Untitled

a guest
Nov 14th, 2019
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.67 KB | None | 0 0
  1. for i,v in pairs(data) do
  2. pos = pos + 24
  3. Back.CanvasSize = UDim2.new(1,0,0,pos+48)
  4. if v.Type == 'Button' then
  5. -- Making the Button
  6. local Button = Make('TextButton',{
  7. Text = i,
  8. TextColor3 = Color3.new(1,1,1),
  9. Size = UDim2.new(.9,0,0,20),
  10. Position = UDim2.new(.05,0,0,pos+12),
  11. BackgroundColor3 = Color3.new(.3,.3,.3),
  12. Parent = Back,
  13. })
  14. Roundify(Button)
  15. -- Hovering Events
  16. Button.MouseEnter:connect(function()
  17. spawn(function()
  18. Button:GetChildren()[1].ImageTransparency = .3
  19. end)
  20. end)
  21. Button.MouseLeave:connect(function()
  22. Button:GetChildren()[1].ImageTransparency = 0
  23. end)
  24. -- Clicked Event
  25. Button.MouseButton1Click:connect(function()
  26. spawn(v.Callback)
  27. end)
  28.  
  29. elseif v.Type == 'Toggle' then
  30. local Button = Make('TextButton',{
  31. Text = i,
  32. TextColor3 = Color3.new(1,1,1),
  33. Size = UDim2.new(.45,0,0,20),
  34. Position = UDim2.new(.05,0,0,pos+12),
  35. BackgroundColor3 = Color3.new(.3,.3,.3),
  36. Parent = Back,
  37. })
  38. Roundify(Button)
  39. local Toggle = Make('TextButton',{
  40. Text = '',
  41. TextColor3 = Color3.new(1,1,1),
  42. Size = UDim2.new(.5,0,1,0),
  43. Position = UDim2.new(1.5,0,0,0),
  44. BackgroundColor3 = Color3.new(.3,.3,.3),
  45. Parent = Button,
  46. })
  47. Roundify(Toggle)
  48. Toggle.MouseButton1Click:connect(function()
  49. Settings[i] = not Settings[i]
  50. if (Settings[i]) then
  51. Toggle.Text = 'X'
  52. else
  53. Toggle.Text = ''
  54. end
  55. end)
  56. Toggle.MouseEnter:connect(function()
  57. spawn(function()
  58. Toggle:GetChildren()[1].ImageTransparency = .3
  59. end)
  60. end)
  61. Toggle.MouseLeave:connect(function()
  62. Toggle:GetChildren()[1].ImageTransparency = 0
  63. end)
  64.  
  65. elseif v.Type == 'KeybindToggle' then
  66. local Button = Make('TextButton',{
  67. Text = i,
  68. TextColor3 = Color3.new(1,1,1),
  69. Size = UDim2.new(.45,0,0,20),
  70. Position = UDim2.new(.05,0,0,pos+12),
  71. BackgroundColor3 = Color3.new(.3,.3,.3),
  72. Parent = Back,
  73. })
  74. Roundify(Button)
  75. local Toggle = Make('TextButton',{
  76. Text = 'X',
  77. TextColor3 = Color3.new(1,1,1),
  78. Size = UDim2.new(.5,0,1,0),
  79. Position = UDim2.new(1.5,0,0,0),
  80. BackgroundColor3 = Color3.new(.3,.3,.3),
  81. Parent = Button,
  82. })
  83. Toggle.MouseButton1Click:connect(function()
  84. Settings[i] = not Settings[i]
  85. if (Settings[i]) then
  86. Toggle.Text = 'X'
  87. else
  88. Toggle.Text = ''
  89. end
  90. end)
  91. Roundify(Toggle)
  92. local KeyBind = Make('TextButton',{
  93. Text = '...',
  94. TextColor3 = Color3.new(1,1,1),
  95. Size = UDim2.new(.40,0,1,0),
  96. Position = UDim2.new(1.05,0,0,0),
  97. BackgroundColor3 = Color3.new(.3,.3,.3),
  98. Parent = Button,
  99. })
  100. Roundify(KeyBind)
  101. Toggle.MouseEnter:connect(function()
  102. spawn(function()
  103. Toggle:GetChildren()[1].ImageTransparency = .3
  104. end)
  105. end)
  106. Toggle.MouseLeave:connect(function()
  107. Toggle:GetChildren()[1].ImageTransparency = 0
  108. end)
  109. KeyBind.MouseEnter:connect(function()
  110. spawn(function()
  111. KeyBind:GetChildren()[1].ImageTransparency = .3
  112. end)
  113. end)
  114. KeyBind.MouseLeave:connect(function()
  115. KeyBind:GetChildren()[1].ImageTransparency = 0
  116. end)
  117.  
  118. elseif v.Type == 'Keybind' then
  119. local Button = Make('TextButton',{
  120. Text = i,
  121. TextColor3 = Color3.new(1,1,1),
  122. Size = UDim2.new(.45,0,0,20),
  123. Position = UDim2.new(.05,0,0,pos+12),
  124. BackgroundColor3 = Color3.new(.3,.3,.3),
  125. Parent = Back,
  126. })
  127. Roundify(Button)
  128. local KeyBind = Make('TextButton',{
  129. Text = '...',
  130. TextColor3 = Color3.new(1,1,1),
  131. Size = UDim2.new(.5,0,1,0),
  132. Position = UDim2.new(1.5,0,0,0),
  133. BackgroundColor3 = Color3.new(.3,.3,.3),
  134. Parent = Button,
  135. })
  136. Roundify(KeyBind)
  137. KeyBind.MouseEnter:connect(function()
  138. spawn(function()
  139. KeyBind:GetChildren()[1].ImageTransparency = .3
  140. end)
  141. end)
  142. KeyBind.MouseLeave:connect(function()
  143. KeyBind:GetChildren()[1].ImageTransparency = 0
  144. end)
  145. elseif v.Type == 'Input' then
  146. local Button = Make('TextButton',{
  147. Text = i,
  148. TextColor3 = Color3.new(1,1,1),
  149. Size = UDim2.new(.45,0,0,20),
  150. Position = UDim2.new(.05,0,0,pos+12),
  151. BackgroundColor3 = Color3.new(.3,.3,.3),
  152. Parent = Back,
  153. })
  154. Roundify(Button)
  155. local KeyBind = Make('TextBox',{
  156. Text = '',
  157. PlaceholderText = 'idk',
  158. TextColor3 = Color3.new(1,1,1),
  159. Size = UDim2.new(.95,0,1,0),
  160. Position = UDim2.new(1.05,0,0,0),
  161. BackgroundColor3 = Color3.new(.3,.3,.3),
  162. Parent = Button,
  163. })
  164. Roundify(KeyBind)
  165. KeyBind.FocusLost:connect(function()
  166. Settings[i]=KeyBind.Text
  167. end)
  168. KeyBind.MouseEnter:connect(function()
  169. spawn(function()
  170. KeyBind:GetChildren()[1].ImageTransparency = .3
  171. end)
  172. end)
  173. KeyBind.MouseLeave:connect(function()
  174. KeyBind:GetChildren()[1].ImageTransparency = 0
  175. end)
  176. elseif v.Type == 'InputButton' then
  177. local Button = Make('TextButton',{
  178. Text = i,
  179. TextColor3 = Color3.new(1,1,1),
  180. Size = UDim2.new(.45,0,0,20),
  181. Position = UDim2.new(.05,0,0,pos+12),
  182. BackgroundColor3 = Color3.new(.3,.3,.3),
  183. Parent = Back,
  184. })
  185. Roundify(Button)
  186. local Toggle = Make('TextButton',{
  187. Text = 'X',
  188. TextColor3 = Color3.new(1,1,1),
  189. Size = UDim2.new(.5,0,1,0),
  190. Position = UDim2.new(1.5,0,0,0),
  191. BackgroundColor3 = Color3.new(.3,.3,.3),
  192. Parent = Button,
  193. })
  194. Roundify(Toggle)
  195. local KeyBind = Make('TextBox',{
  196. Text = '...',
  197. TextColor3 = Color3.new(1,1,1),
  198. Size = UDim2.new(.40,0,1,0),
  199. Position = UDim2.new(1.05,0,0,0),
  200. BackgroundColor3 = Color3.new(.3,.3,.3),
  201. Parent = Button,
  202. })
  203. Roundify(KeyBind)
  204. KeyBind.FocusLost:connect(function()
  205. Settings[i]=KeyBind.Text
  206. end)
  207. Toggle.MouseEnter:connect(function()
  208. spawn(function()
  209. Toggle:GetChildren()[1].ImageTransparency = .3
  210. end)
  211. end)
  212. Toggle.MouseLeave:connect(function()
  213. Toggle:GetChildren()[1].ImageTransparency = 0
  214. end)
  215. KeyBind.MouseEnter:connect(function()
  216. spawn(function()
  217. KeyBind:GetChildren()[1].ImageTransparency = .3
  218. end)
  219. end)
  220. KeyBind.MouseLeave:connect(function()
  221. KeyBind:GetChildren()[1].ImageTransparency = 0
  222. end)
  223. Toggle.MouseButton1Click:connect(function()
  224. spawn(v.Callback)
  225. end)
  226. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement