Advertisement
DinosaurXxX

POLAR UI heh'

May 13th, 2020
533
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.92 KB | None | 0 0
  1. do
  2. local i = game:GetService("CoreGui"):FindFirstChild("ScreenGui")
  3. if i then i:Destroy() end
  4. end
  5. local libraryv3={
  6. windowcount = 0
  7. }
  8. local dragger = {};
  9. local resizer = {};
  10.  
  11. local UserInputService = game:GetService("UserInputService")
  12. local TweenService = game:GetService("TweenService")
  13.  
  14. do
  15. local mouse = game:GetService("Players").LocalPlayer:GetMouse();
  16. local inputService = game:GetService('UserInputService');
  17. local heartbeat = game:GetService("RunService").Heartbeat;
  18.  
  19. function dragger.new(frame)
  20. local s, event = pcall(function()
  21. return frame.MouseEnter
  22. end)
  23.  
  24. if s then
  25. frame.Active = true;
  26.  
  27. event:connect(function()
  28. local input = frame.InputBegan:connect(function(key)
  29. if key.UserInputType == Enum.UserInputType.MouseButton1 then
  30. local objectPosition = Vector2.new(mouse.X - frame.AbsolutePosition.X, mouse.Y - frame.AbsolutePosition.Y);
  31. while heartbeat:wait() and inputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1) do
  32. frame:TweenPosition(UDim2.new(0, mouse.X - objectPosition.X + (frame.Size.X.Offset * frame.AnchorPoint.X), 0, mouse.Y - objectPosition.Y + (frame.Size.Y.Offset * frame.AnchorPoint.Y)), 'Out', 'Quad', 0.1, true);
  33. end
  34. end
  35. end)
  36.  
  37. local leave;
  38. leave = frame.MouseLeave:connect(function()
  39. input:disconnect();
  40. leave:disconnect();
  41. end)
  42. end)
  43. end
  44. end
  45.  
  46. function resizer.new(p, s)
  47. p:GetPropertyChangedSignal('AbsoluteSize'):connect(function()
  48. s.Size = UDim2.new(s.Size.X.Scale, s.Size.X.Offset, s.Size.Y.Scale, p.AbsoluteSize.Y);
  49. end)
  50. end
  51. end
  52. local Library = {
  53. Colors = {
  54. Body = Color3.fromRGB(35, 35, 35);
  55. Section = Color3.fromRGB(40, 40, 40);
  56. CheckboxChecked = Color3.fromRGB(255, 255, 255);
  57. CheckboxUnchecked = Color3.fromRGB(50, 50, 50);
  58. Button = Color3.fromRGB(45, 45, 45);
  59. ColorPickerMarker = Color3.fromRGB(150, 150, 150);
  60. SliderBackground = Color3.fromRGB(50, 50, 50);
  61. Slider = Color3.fromRGB(255, 255, 255);
  62. Dropdown = Color3.fromRGB(45, 45, 45);
  63. DropdownButton = Color3.fromRGB(35, 35, 35);
  64. DropdownButtonHover = Color3.fromRGB(45, 45, 45);
  65. Underline = Color3.fromRGB(255, 92, 92);
  66. Border = Color3.fromRGB(0, 0, 0);
  67. Text = Color3.fromRGB(255, 255, 255);
  68. PlaceholderText = Color3.fromRGB(255, 255, 255);
  69. };
  70.  
  71. Settings = {
  72. MainTextSize = 15;
  73. MainTweenTime = 1;
  74. RippleTweenTime = 1;
  75. CheckboxTweenTime = 0.5;
  76. ColorPickerTweenTime = 0.5;
  77. DropdownTweenTime = 0.5;
  78. DropdownButtonColorHoverTweenTime = 0.5;
  79. MainTextFont = Enum.Font.Code;
  80. UIToggleKey = Enum.KeyCode.RightControl;
  81. TweenEasingStyle = Enum.EasingStyle.Quart;
  82. }
  83. }
  84.  
  85. function RippleEffect(button)
  86. spawn(function()
  87. local Mouse = game:GetService("Players").LocalPlayer:GetMouse()
  88. local RippleHolder = Instance.new("Frame")
  89. local RippleEffect = Instance.new("ImageLabel")
  90.  
  91. RippleHolder.Name = "RippleHolder"
  92. RippleHolder.Parent = button
  93. RippleHolder.BackgroundColor3 = Library.Colors.Border
  94. RippleHolder.BackgroundTransparency = 1
  95. RippleHolder.BorderColor3 = Library.Colors.Border
  96. RippleHolder.BorderSizePixel = 0
  97. RippleHolder.ClipsDescendants = true
  98. RippleHolder.Size = UDim2.new(1, 0,1, 0)
  99.  
  100. RippleEffect.Name = "RippleEffect"
  101. RippleEffect.Parent = RippleHolder
  102. RippleEffect.BackgroundTransparency = 1
  103. RippleEffect.BorderSizePixel = 0
  104. RippleEffect.Image = "rbxassetid://2708891598"
  105. RippleEffect.ImageColor3 = Color3.fromRGB(0,0,0)
  106. RippleEffect.ImageTransparency = 0.8
  107. RippleEffect.ScaleType = Enum.ScaleType.Fit
  108.  
  109. RippleEffect.Position = UDim2.new((Mouse.X - RippleEffect.AbsolutePosition.X) / button.AbsoluteSize.X, 0, (Mouse.Y - RippleEffect.AbsolutePosition.Y) / button.AbsoluteSize.Y, 0)
  110. TweenService:Create(RippleEffect, TweenInfo.new(Library.Settings.RippleTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {Position = UDim2.new(-5.5, 0, -5.5, 0), Size = UDim2.new(12, 0, 12, 0)}):Play()
  111.  
  112. wait(0.5)
  113. TweenService:Create(RippleEffect, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {ImageTransparency = 1}):Play()
  114.  
  115. wait(1)
  116. RippleHolder:Destroy()
  117. end)
  118. end
  119. function RippleEffect2(button)
  120. spawn(function()
  121. local Mouse = game:GetService("Players").LocalPlayer:GetMouse()
  122. local RippleHolder = Instance.new("Frame")
  123. local RippleEffect = Instance.new("ImageLabel")
  124.  
  125. RippleHolder.Name = "RippleHolder"
  126. RippleHolder.Parent = button
  127. RippleHolder.BackgroundColor3 = Library.Colors.Border
  128. RippleHolder.BackgroundTransparency = 1
  129. RippleHolder.BorderColor3 = Library.Colors.Border
  130. RippleHolder.BorderSizePixel = 0
  131. RippleHolder.ClipsDescendants = true
  132. RippleHolder.Size = UDim2.new(1, 0, 1, 0)
  133.  
  134. RippleEffect.Name = "RippleEffect"
  135. RippleEffect.Parent = RippleHolder
  136. RippleEffect.BackgroundTransparency = 1
  137. RippleEffect.BorderSizePixel = 0
  138. RippleEffect.Image = "rbxassetid://2708891598"
  139. RippleEffect.ImageColor3 = Color3.fromRGB(0,0,0)
  140. RippleEffect.ImageTransparency = 0.8
  141. RippleEffect.ScaleType = Enum.ScaleType.Fit
  142.  
  143. RippleEffect.Position = UDim2.new((Mouse.X - RippleEffect.AbsolutePosition.X) / button.AbsoluteSize.X, 0, (Mouse.Y - RippleEffect.AbsolutePosition.Y) / button.AbsoluteSize.Y, 0)
  144. TweenService:Create(RippleEffect, TweenInfo.new(Library.Settings.RippleTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {Position = UDim2.new(-5.5, 0, -5.5, 0), Size = UDim2.new(12, 0, 12, 0)}):Play()
  145.  
  146. wait(0.5)
  147. TweenService:Create(RippleEffect, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {ImageTransparency = 1}):Play()
  148.  
  149. wait(1)
  150. RippleHolder:Destroy()
  151. end)
  152. end
  153. local mouse = game:GetService("Players").LocalPlayer:GetMouse();
  154. function libraryv3:CreateWindow(name)
  155. self.windowcount = self.windowcount + 1;
  156. local ScreenGui = Instance.new("ScreenGui")
  157. local main = Instance.new("Frame")
  158. local TextLabel = Instance.new("TextLabel")
  159. local Frame = Instance.new("Frame")
  160. local UIListLayout = Instance.new("UIListLayout")
  161. local TextLabel_2 = Instance.new("TextLabel")
  162.  
  163.  
  164. ScreenGui.Parent = game.CoreGui
  165.  
  166. main.Name = "main"
  167. main.Parent = ScreenGui
  168. main.BackgroundColor3 = Color3.new(0.0392157, 0.0392157, 0.0392157)
  169. main.BorderColor3 = Color3.new(0.988235, 0.729412, 0.0117647)
  170. main.BorderSizePixel = 0
  171. main.Position = UDim2.new(0, (15 + ((200 * self.windowcount) - 200)), 0, 15)
  172. main.Size = UDim2.new(0, 190, 0, 34)
  173. game:GetService('UserInputService').InputBegan:connect(function(key, gpe)
  174. if key.KeyCode == Enum.KeyCode.RightShift then
  175. if main.Visible == true then main.Visible = false elseif main.Visible == false then main.Visible = true end
  176.  
  177. end
  178. end)
  179.  
  180.  
  181. TextLabel.Parent = main
  182. TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  183. TextLabel.BackgroundTransparency = 1
  184. TextLabel.Size = UDim2.new(0, 190, 0, 34)
  185. TextLabel.Font = Enum.Font.Code
  186. TextLabel.Text = name
  187. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  188. TextLabel.TextSize = 18
  189.  
  190. Frame.Parent = main
  191. Frame.BackgroundColor3 = Color3.new(0.0784314, 0.0784314, 0.0784314)
  192. Frame.BorderColor3 = Color3.new(0.988235, 0.729412, 0.0117647)
  193. Frame.BorderSizePixel = 0
  194. Frame.Position = UDim2.new(0, 0, 1, 0)
  195. Frame.Size = UDim2.new(0, 190, 0, 0)
  196. dragger.new(main)
  197. function Resize()
  198. local y = 0;
  199. for i, v in next, Frame:GetChildren() do
  200. if (not v:IsA('UIListLayout')) then
  201. y = y + v.AbsoluteSize.Y;
  202. end
  203. end
  204. Frame.Size = UDim2.new(1, 0, 0, y+20)
  205. end
  206.  
  207. UIListLayout.Parent = Frame
  208. UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
  209. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  210. --UIListLayout.Padding = UDim.new(0, 2)
  211. local wowlib = {}
  212. function wowlib:Section(name)
  213. local TextLabel_2 = Instance.new("TextLabel")
  214. local Frame_2 = Instance.new("Frame")
  215. TextLabel_2.Parent = Frame
  216. TextLabel_2.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
  217. TextLabel_2.BorderSizePixel = 0
  218. TextLabel_2.Size = UDim2.new(0, 190, 0, 35)
  219. TextLabel_2.Font = Enum.Font.GothamBold
  220. TextLabel_2.Text = name
  221. TextLabel_2.TextColor3 = Color3.new(1, 1, 1)
  222. TextLabel_2.TextSize = 18
  223.  
  224.  
  225. Resize()
  226. end
  227. function wowlib:Button(name, action)
  228. local TextButton = Instance.new("TextButton")
  229. local TextButton_Roundify_2px = Instance.new("ImageLabel")
  230. local TextLabel_3 = Instance.new("TextLabel")
  231. local Frame_32 = Instance.new("Frame")
  232. local TextBox = Instance.new("TextBox")
  233. Frame_32.Parent = Frame
  234. Frame_32.BackgroundColor3 = Color3.new(0.0784314, 0.0784314, 0.0784314)
  235. Frame_32.BorderSizePixel = 0
  236. Frame_32.Position = UDim2.new(0, 0, 1, 0)
  237. Frame_32.Size = UDim2.new(0, 179, 0, 4)
  238. TextButton.Parent = Frame
  239. TextButton.BackgroundColor3 = Color3.new(0.192157, 0.709804, 0.329412)
  240. TextButton.BackgroundTransparency = 1
  241. TextButton.BorderColor3 = Color3.new(0.192157, 0.709804, 0.329412)
  242. TextButton.BorderSizePixel = 0
  243. TextButton.Position = UDim2.new(0.0578947365, 0, 0.379999995, 0)
  244. TextButton.Size = UDim2.new(0, 179, 0, 26)
  245. TextButton.Font = Enum.Font.GothamSemibold
  246. TextButton.Text = ""
  247. TextButton.TextColor3 = Color3.new(0, 0, 0)
  248. TextButton.TextSize = 18
  249. TextButton.MouseButton1Down:connect(function()
  250. RippleEffect(TextButton)
  251. action()
  252. end)
  253.  
  254.  
  255. TextButton_Roundify_2px.Name = "TextButton_Roundify_2px"
  256. TextButton_Roundify_2px.Parent = TextButton
  257. TextButton_Roundify_2px.Active = true
  258. TextButton_Roundify_2px.AnchorPoint = Vector2.new(0.5, 0.5)
  259. TextButton_Roundify_2px.BackgroundColor3 = Color3.new(1, 1, 1)
  260. TextButton_Roundify_2px.BackgroundTransparency = 1
  261. TextButton_Roundify_2px.Position = UDim2.new(0.5, 0, 0.5, 0)
  262. TextButton_Roundify_2px.Selectable = true
  263. TextButton_Roundify_2px.Size = UDim2.new(1, 0, 1, 0)
  264. TextButton_Roundify_2px.Image = "rbxassetid://3570695787"
  265. TextButton_Roundify_2px.ImageColor3 = Color3.new(0.192157, 0.709804, 0.329412)
  266. TextButton_Roundify_2px.ScaleType = Enum.ScaleType.Slice
  267. TextButton_Roundify_2px.SliceCenter = Rect.new(100, 100, 100, 100)
  268. TextButton_Roundify_2px.SliceScale = 0.03
  269. TextLabel_3.Parent = TextButton_Roundify_2px
  270. TextLabel_3.BackgroundColor3 = Color3.new(1, 1, 1)
  271. TextLabel_3.BackgroundTransparency = 1
  272. TextLabel_3.Size = UDim2.new(0, 179, 0, 26)
  273. TextLabel_3.Font = Enum.Font.GothamSemibold
  274. TextLabel_3.Text = name
  275. TextLabel_3.TextColor3 = Color3.new(0, 0, 0)
  276. TextLabel_3.TextSize = 18
  277.  
  278. Resize()
  279. end
  280. function wowlib:Box(name, callback)
  281. local Frame_3 = Instance.new("Frame")
  282. local TextBox = Instance.new("TextBox")
  283. Frame_3.Parent = Frame
  284. Frame_3.BackgroundColor3 = Color3.new(0.0784314, 0.0784314, 0.0784314)
  285. Frame_3.BorderSizePixel = 0
  286. Frame_3.Position = UDim2.new(0, 0, 1, 0)
  287. Frame_3.Size = UDim2.new(0, 179, 0, 4)
  288. TextBox.Parent = Frame
  289. TextBox.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
  290. TextBox.BorderSizePixel = 0
  291. TextBox.Position = UDim2.new(0, 0, 1.15384614, 0)
  292. TextBox.Size = UDim2.new(0, 179, 0, 26)
  293. TextBox.Font = Enum.Font.GothamSemibold
  294. TextBox.PlaceholderText = name
  295. TextBox.Text = ""
  296. TextBox.TextColor3 = Color3.new(1, 1, 1)
  297. TextBox.TextSize = 14
  298. TextBox.MouseEnter:connect(function()
  299. RippleEffect(TextBox)
  300. wait(0.100)
  301. TextBox.PlaceholderText = ""
  302. end)
  303. TextBox.MouseLeave:connect(function()
  304. wait(0.100)
  305. TextBox.PlaceholderText = name
  306. end)
  307. TextBox.FocusLost:connect(function(...)
  308. callback(TextBox, ...)
  309. end)
  310. Resize()
  311. end
  312. function wowlib:Toggle(name, action)
  313. local Frame_4 = Instance.new("Frame")
  314. local Frame_5 = Instance.new("ImageLabel")
  315. local TextLabel_4 = Instance.new("TextLabel")
  316. local TextButton_2 = Instance.new("TextButton")
  317. local TextButton_Roundify_2px_2 = Instance.new("ImageLabel")
  318. local Frame_33 = Instance.new("Frame")
  319. local TextBox = Instance.new("TextBox")
  320. Frame_33.Parent = Frame
  321. Frame_33.BackgroundColor3 = Color3.new(0.0784314, 0.0784314, 0.0784314)
  322. Frame_33.BorderSizePixel = 0
  323. Frame_33.Position = UDim2.new(0, 0, 1, 0)
  324. Frame_33.Size = UDim2.new(0, 179, 0, 4)
  325. Frame_4.Parent = Frame
  326. Frame_4.BackgroundColor3 = Color3.new(0.0784314, 0.0784314, 0.0784314)
  327. Frame_4.BorderSizePixel = 0
  328. Frame_4.Position = UDim2.new(-0.0631578937, 0, 0.48756218, 0)
  329. Frame_4.Size = UDim2.new(0, 179, 0, 30)
  330.  
  331. Frame_5.Name = "Frame"
  332. Frame_5.Parent = Frame_4
  333. Frame_5.BackgroundColor3 = Color3.new(1, 1, 1)
  334. Frame_5.BackgroundTransparency = 1
  335. Frame_5.BorderSizePixel = 0
  336. Frame_5.Position = UDim2.new(0.843575418, 0, 0, 0)
  337. Frame_5.Size = UDim2.new(0, 28, 0, 27)
  338. Frame_5.Image = "rbxassetid://3570695787"
  339. Frame_5.ImageColor3 = Color3.new(0.117647, 0.117647, 0.117647)
  340. Frame_5.ScaleType = Enum.ScaleType.Slice
  341. Frame_5.SliceCenter = Rect.new(100, 100, 100, 100)
  342. local Enabled = false
  343. TextButton_2.Parent = Frame_5
  344. TextButton_2.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
  345. TextButton_2.BackgroundTransparency = 1
  346. TextButton_2.BorderSizePixel = 0
  347. TextButton_2.Size = UDim2.new(0, 28, 0, 27)
  348. TextButton_2.Font = Enum.Font.SourceSans
  349. TextButton_2.Text = ""
  350. TextButton_2.TextColor3 = Color3.new(0, 0, 0)
  351. TextButton_2.TextSize = 14
  352.  
  353.  
  354. TextButton_Roundify_2px_2.Name = "TextButton_Roundify_2px"
  355. TextButton_Roundify_2px_2.Parent = TextButton_2
  356. TextButton_Roundify_2px_2.Active = true
  357. TextButton_Roundify_2px_2.AnchorPoint = Vector2.new(0.5, 0.5)
  358. TextButton_Roundify_2px_2.BackgroundColor3 = Color3.new(1, 1, 1)
  359. TextButton_Roundify_2px_2.BackgroundTransparency = 1
  360. TextButton_Roundify_2px_2.Position = UDim2.new(0.5, 0, 0.5, 0)
  361. TextButton_Roundify_2px_2.Selectable = true
  362. TextButton_Roundify_2px_2.Size = UDim2.new(1, 0, 1, 0)
  363. TextButton_Roundify_2px_2.Image = "rbxassetid://3570695787"
  364. TextButton_Roundify_2px_2.ImageColor3 = Color3.new(0.117647, 0.117647, 0.117647)
  365. TextButton_Roundify_2px_2.ScaleType = Enum.ScaleType.Slice
  366. TextButton_Roundify_2px_2.SliceCenter = Rect.new(100, 100, 100, 100)
  367. TextButton_Roundify_2px_2.SliceScale = 0.03
  368. TextLabel_4.Parent = Frame_4
  369. TextLabel_4.BackgroundColor3 = Color3.new(1, 1, 1)
  370. TextLabel_4.BackgroundTransparency = 1
  371. TextLabel_4.Size = UDim2.new(0, 145, 0, 27)
  372. TextLabel_4.Font = Enum.Font.GothamSemibold
  373. TextLabel_4.Text = " "..name
  374. TextLabel_4.TextColor3 = Color3.new(1, 1, 1)
  375. TextLabel_4.TextSize = 19
  376. TextLabel_4.TextWrapped = true
  377. TextLabel_4.TextXAlignment = Enum.TextXAlignment.Left
  378. TextButton_2.MouseButton1Down:connect(function()
  379. Enabled = not Enabled
  380.  
  381. if Enabled then
  382. TextButton_Roundify_2px_2.ImageColor3 = Color3.fromRGB(49, 181, 84)
  383. elseif not Enabled then
  384. TextButton_Roundify_2px_2.ImageColor3 = Color3.fromRGB(30,30,30)
  385. end
  386. RippleEffect2(TextButton_Roundify_2px_2)
  387. action(Enabled)
  388.  
  389. end)
  390. Resize()
  391. end
  392. return wowlib;
  393. end
  394. return libraryv3;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement