Advertisement
HEHEJ

Untitled

Mar 19th, 2020
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.85 KB | None | 0 0
  1. -- Join the discord to be the first to know of updates! discord.gg/7Cb8bS2
  2. local function randomName()
  3. local data = ""
  4. for i=0,20,1 do
  5. data = data .. tostring(string.char(math.ceil(math.random() * 254)))
  6. end
  7. return data
  8. end
  9.  
  10. local ui = Instance.new("ScreenGui")
  11. ui.Name = randomName()
  12. ui.Parent = game:GetService("CoreGui")
  13.  
  14. local library = {}
  15.  
  16. local TweenService = game:GetService("TweenService")
  17. local uis = game:GetService("UserInputService")
  18. local tabcount = 0
  19. local rainbow = 0
  20. _G.breatherate = 0.005
  21. local color
  22. local rainbows = {}
  23. local buttoncount = {}
  24.  
  25. local function draggable(obj)
  26. local globals = {}
  27. globals.dragging=nil
  28. globals.uiorigin=nil
  29. globals.morigin=nil
  30. obj.InputBegan:Connect(function(input)
  31. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  32. globals.dragging = true
  33. globals.uiorigin = obj.Position
  34. globals.morigin = input.Position
  35. input.Changed:Connect(function()
  36. if input.UserInputState == Enum.UserInputState.End then
  37. globals.dragging = false
  38. end
  39. end)
  40. end
  41. end)
  42. uis.InputChanged:Connect(function(input)
  43. if input.UserInputType == Enum.UserInputType.MouseMovement and globals.dragging then
  44. local change = input.Position - globals.morigin
  45. obj.Position = UDim2.new(globals.uiorigin.X.Scale,globals.uiorigin.X.Offset+change.X,globals.uiorigin.Y.Scale,globals.uiorigin.Y.Offset+change.Y)
  46. end
  47. end)
  48. end
  49.  
  50. function library:Create(obj, data)
  51. obj = Instance.new(obj)
  52. for i, v in pairs(data) do
  53. if i ~= "Parent" then
  54. obj[i] = v
  55. end
  56. end
  57. obj.Parent = data.Parent
  58. return obj
  59. end
  60.  
  61. function library:CreateTab(name, rainbow, color)
  62. tabcount = tabcount+1
  63. buttoncount[tabcount] = 0
  64. if rainbow then
  65. table.insert(rainbows,#rainbows+1,tabcount)
  66. color = Color3.new(1,0,0)
  67. elseif color == nil then
  68. color = Color3.new(1,0,0)
  69. end
  70. local tab = self:Create("Frame", {
  71. Name = tostring(tabcount),
  72. Parent = ui,
  73. Active = true,
  74. BackgroundColor3 = Color3.new(1, 1, 1),
  75. BackgroundTransparency = 1,
  76. Position = UDim2.new(0, (tabcount)*13+(tabcount-1)*200, 0.0128041022, 0),
  77. Size = UDim2.new(0, 200, 0, 40),
  78. })
  79. local top = self:Create("Frame", {
  80. Name = "Top",
  81. Parent = tab,
  82. BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647),
  83. BorderColor3 = Color3.new(0.0784314, 0.0784314, 0.0784314),
  84. BorderSizePixel = 3,
  85. Size = UDim2.new(1, 0, 1, -10),
  86. })
  87. local title = self:Create("TextLabel", {
  88. Parent = top,
  89. BackgroundTransparency = 1,
  90. Position = UDim2.new(0, 0, -0.006, 0),
  91. Size = UDim2.new(.035, 158, 1, 0),
  92. Font = Enum.Font.SourceSansSemibold,
  93. Text = name,
  94. TextColor3 = Color3.new(1, 1, 1),
  95. TextSize = 25,
  96. })
  97. local minimize = self:Create("TextButton", {
  98. Parent = top,
  99. BackgroundTransparency = 1,
  100. Position = UDim2.new(0.855, 0, 0.181, 0),
  101. Size = UDim2.new(0, 18, 0, 19),
  102. Font = Enum.Font.SourceSansSemibold,
  103. Text = "-",
  104. TextColor3 = Color3.new(1, 1, 1),
  105. TextSize = 35,
  106. })
  107. local rainbow = self:Create("Frame", {
  108. Parent = top,
  109. BackgroundColor3 = color,
  110. BorderSizePixel = 0,
  111. Position = UDim2.new(0, 0, 1, 0),
  112. Size = UDim2.new(1, 0, 0.07, 0),
  113. })
  114. local holder = self:Create("Frame", {
  115. Name = "ButtonHolder",
  116. Parent = tab,
  117. BackgroundTransparency = 1,
  118. ClipsDescendants = true,
  119. BorderSizePixel = 3,
  120. Position = UDim2.new(0, -3, 0.801999986, 0),
  121. Size = UDim2.new(0.0350000001, 200, 20, 0),
  122. })
  123. local holder2 = self:Create("Frame", {
  124. Name = "ButtonHolder",
  125. Parent = holder,
  126. BackgroundTransparency = 1,
  127. Position = UDim2.new(0, 3, 0, 0),
  128. Size = UDim2.new(0, 200, 0, 0),
  129. ZIndex = 0,
  130. })
  131. local holder3 = self:Create("Frame", {
  132. Parent = holder2,
  133. BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647),
  134. BorderColor3 = Color3.new(0.0784314, 0.0784314, 0.0784314),
  135. BorderSizePixel = 3,
  136. Position = UDim2.new(0, 0, 0, 0),
  137. Size = UDim2.new(0, 200, 0, 0),
  138. ZIndex = 0,
  139. })
  140. local debounce = false
  141. minimize.MouseButton1Click:Connect(function()
  142. if holder3.Visible then
  143. if debounce == false then
  144. debounce = true
  145. for i,v in pairs(holder3:GetChildren())do
  146. v.ZIndex=0
  147. end
  148. local tween = TweenService:Create(holder3,TweenInfo.new(.5),{["Position"]=UDim2.new(0, 0, 0, -1*(holder3.Size.Y.Offset+25))})
  149. tween:Play()
  150. tween.Completed:Connect(function()
  151. holder3.Visible = false
  152. debounce = false
  153. end)
  154. end
  155. else
  156. if debounce == false then
  157. debounce = true
  158. holder3.Visible = true
  159. local tween = TweenService:Create(holder3,TweenInfo.new(.5),{["Position"]=UDim2.new(0, 0, 0, 0)})
  160. tween:Play()
  161. tween.Completed:Connect(function()
  162. for i,v in pairs(holder3:GetChildren())do
  163. v.ZIndex=1
  164. debounce = false
  165. end
  166. end)
  167. end
  168. end
  169. end)
  170. draggable(tab)
  171. return tab
  172. end
  173.  
  174. function library:MakeButton(tab,text,callback)
  175. buttoncount[tonumber(tab.Name)] = buttoncount[tonumber(tab.Name)]+1
  176. local button = self:Create("TextButton", {
  177. Parent = tab.ButtonHolder.ButtonHolder.Frame,
  178. BackgroundColor3 = Color3.new(0.0784314, 0.0784314, 0.0784314),
  179. BorderSizePixel = 0,
  180. Position = UDim2.new(0.03, 0, 0, (buttoncount[tonumber(tab.Name)]-1)*42+6-(buttoncount[tonumber(tab.Name)]-1)*6),
  181. Size = UDim2.new(0, 188, 0, 30),
  182. Font = Enum.Font.SourceSansSemibold,
  183. Text = text,
  184. TextColor3 = Color3.new(1, 1, 1),
  185. TextSize = 25,
  186. })
  187. button.MouseButton1Click:Connect(function()
  188. callback(button)
  189. end)
  190. tab.ButtonHolder.ButtonHolder.Frame.BackgroundTransparency = 0
  191. tab.ButtonHolder.ButtonHolder.Frame.Size = UDim2.new(0, 200, 0, buttoncount[tonumber(tab.Name)]*42-(buttoncount[tonumber(tab.Name)]-1)*6)
  192. return button
  193. end
  194.  
  195. function library:MakeToggle(tab,text,default,callback)
  196. buttoncount[tonumber(tab.Name)] = buttoncount[tonumber(tab.Name)]+1
  197. local discordid326801946230915102bestslave
  198. if default then
  199. discordid326801946230915102bestslave = {"ON",Color3.new(0, 1, 0)}
  200. else
  201. discordid326801946230915102bestslave = {"OFF",Color3.new(1, 0, 0)}
  202. end
  203. local button = self:Create("TextButton", {
  204. Parent = tab.ButtonHolder.ButtonHolder.Frame,
  205. BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647),
  206. BorderColor3 = Color3.new(0.0784314, 0.0784314, 0.0784314),
  207. BorderSizePixel = 3,
  208. Position = UDim2.new(0.744999945, 0, 0, (buttoncount[tonumber(tab.Name)]-1)*42+6-(buttoncount[tonumber(tab.Name)]-1)*6),
  209. Size = UDim2.new(0, 45, 0, 30),
  210. ZIndex = 2,
  211. Font = Enum.Font.SourceSansSemibold,
  212. Text = discordid326801946230915102bestslave[1],
  213. TextColor3 = discordid326801946230915102bestslave[2],
  214. TextSize = 25,
  215. })
  216. local description = self:Create("TextLabel", {
  217. Parent = button,
  218. BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647),
  219. BorderColor3 = Color3.new(0.0784314, 0.0784314, 0.0784314),
  220. BorderSizePixel = 3,
  221. Position = UDim2.new(-3.18383813, 0, 0, 0),
  222. Size = UDim2.new(0, 143, 0, 30),
  223. ZIndex = 0,
  224. Font = Enum.Font.SourceSansSemibold,
  225. Text = text,
  226. TextColor3 = Color3.new(1, 1, 1),
  227. TextSize = 25,
  228. })
  229. tab.ButtonHolder.ButtonHolder.Frame.BackgroundTransparency = 0
  230. tab.ButtonHolder.ButtonHolder.Frame.Size = UDim2.new(0, 200, 0, buttoncount[tonumber(tab.Name)]*42-(buttoncount[tonumber(tab.Name)]-1)*6)
  231. button.MouseButton1Click:Connect(function()
  232. if button.Text == "ON" then
  233. button.Text = "OFF"
  234. button.TextColor3 = Color3.new(1, 0, 0)
  235. callback(button)
  236. else
  237. button.Text = "ON"
  238. button.TextColor3 = Color3.new(0, 1, 0)
  239. callback(button)
  240. end
  241. end)
  242. return button
  243. end
  244.  
  245. function library:MakeSlider(title, callback, min, max, startPoint)
  246. local dragging = false;
  247. local sliderFrame = Instance.new("Frame", self.bodyFrame);
  248. local slidingFrame = Instance.new("Frame", sliderFrame);
  249. local titleLabel = Instance.new("TextLabel", sliderFrame);
  250.  
  251. sliderFrame.Name = "sliderFrame";
  252. sliderFrame.BackgroundColor3 = Color3.fromRGB(50, 50, 50);
  253. sliderFrame.BorderSizePixel = 0;
  254. sliderFrame.Size = UDim2.new(1, 0, 0.9, 0);
  255.  
  256. slidingFrame.Name = "slidingFrame";
  257. slidingFrame.BackgroundColor3 = Color3.fromRGB(68, 68, 68);
  258. slidingFrame.BorderSizePixel = 0;
  259. slidingFrame.Size = UDim2.new((startPoint or 0) / max, 0, 1, 0);
  260.  
  261. titleLabel.Name = "titleLabel";
  262. titleLabel.AnchorPoint = Vector2.new(0, 0.5);
  263. titleLabel.BackgroundTransparency = 1;
  264. titleLabel.BorderSizePixel = 0;
  265. titleLabel.Position = UDim2.new(0.02, 0, 0.5, 0);
  266. titleLabel.Size = UDim2.new(0.98, 0, 1, 0);
  267. titleLabel.Font = Enum.Font.SourceSansLight;
  268. titleLabel.Text = title .. " | " .. tostring(startPoint and math.floor((startPoint / max) * (max - min) + min) or 0);
  269. titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255);
  270. titleLabel.TextScaled = true;
  271. titleLabel.TextWrapped = true;
  272. titleLabel.TextXAlignment = Enum.TextXAlignment.Left;
  273.  
  274. local function slide(input)
  275. local pos = UDim2.new(math.clamp((input.Position.X - sliderFrame.AbsolutePosition.X) / sliderFrame.AbsoluteSize.X, 0, 1), 0, 1, 0);
  276. slidingFrame:TweenSize(pos, Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.2, true);
  277. local value = math.floor(((pos.X.Scale * max) / max) * (max - min) + min);
  278. titleLabel.Text = title .. " | " .. tostring(value);
  279. callback(value);
  280. end;
  281.  
  282. sliderFrame.InputBegan:Connect(function(input)
  283. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  284. dragging = true;
  285. end;
  286. end);
  287.  
  288. sliderFrame.InputEnded:Connect(function(input)
  289. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  290. dragging = false;
  291. end;
  292. end);
  293.  
  294. sliderFrame.InputBegan:Connect(function(input)
  295. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  296. slide(input);
  297. end;
  298. end);
  299.  
  300. game:GetService("UserInputService").InputChanged:Connect(function(input)
  301. if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
  302. slide(input);
  303. end;
  304. end);
  305. end;
  306.  
  307. function library:MakeLabel(tab,text)
  308. buttoncount[tonumber(tab.Name)] = buttoncount[tonumber(tab.Name)]+1
  309. local label = self:Create("TextLabel", {
  310. Parent = tab.ButtonHolder.ButtonHolder.Frame,
  311. BackgroundTransparency = 1,
  312. Position = UDim2.new(0.03, 0, 0, (buttoncount[tonumber(tab.Name)]-1)*42+6-(buttoncount[tonumber(tab.Name)]-1)*6),
  313. Size = UDim2.new(0, 188, 0, 30),
  314. Font = Enum.Font.SourceSansSemibold,
  315. Text = text,
  316. TextColor3 = Color3.new(1, 1, 1),
  317. TextSize = 25,
  318. })
  319. tab.ButtonHolder.ButtonHolder.Frame.BackgroundTransparency = 0
  320. tab.ButtonHolder.ButtonHolder.Frame.Size = UDim2.new(0, 200, 0, buttoncount[tonumber(tab.Name)]*42-(buttoncount[tonumber(tab.Name)]-1)*6)
  321. return label
  322. end
  323.  
  324. function library:MakeBox(tab,text,placeholder,callback)
  325. buttoncount[tonumber(tab.Name)] = buttoncount[tonumber(tab.Name)]+1
  326. local fontsize
  327. if string.len(text) > 17 then
  328. fontsize = 25-(string.len(text)-17)
  329. else
  330. fontsize = 25
  331. end
  332. local label = self:Create("TextLabel", {
  333. Parent = tab.ButtonHolder.ButtonHolder.Frame,
  334. BackgroundTransparency = 1,
  335. Position = UDim2.new(0.03, 0, 0, (buttoncount[tonumber(tab.Name)]-1)*42+6-(buttoncount[tonumber(tab.Name)]-1)*6),
  336. Size = UDim2.new(0, 188, 0, 30),
  337. Font = Enum.Font.SourceSansSemibold,
  338. Text = text .. ":",
  339. TextColor3 = Color3.new(1, 1, 1),
  340. TextSize = fontsize,
  341. })
  342. buttoncount[tonumber(tab.Name)] = buttoncount[tonumber(tab.Name)]+1
  343. local box = self:Create("TextBox", {
  344. Parent = tab.ButtonHolder.ButtonHolder.Frame,
  345. BackgroundColor3 = Color3.new(0.0784314, 0.0784314, 0.078431),
  346. BorderSizePixel = 0,
  347. Position = UDim2.new(0.03, 0, 0, (buttoncount[tonumber(tab.Name)]-1)*42+6-(buttoncount[tonumber(tab.Name)]-1)*6),
  348. Size = UDim2.new(0, 188, 0, 30),
  349. Font = Enum.Font.SourceSansSemibold,
  350. PlaceholderText = placeholder,
  351. Text = "",
  352. TextColor3 = Color3.new(1, 1, 1),
  353. TextSize = 25,
  354. })
  355. box.FocusLost:Connect(function()
  356. callback(box)
  357. end)
  358. tab.ButtonHolder.ButtonHolder.Frame.BackgroundTransparency = 0
  359. tab.ButtonHolder.ButtonHolder.Frame.Size = UDim2.new(0, 200, 0, buttoncount[tonumber(tab.Name)]*42-(buttoncount[tonumber(tab.Name)]-1)*6)
  360. return box
  361. end
  362.  
  363. function library:MakeDropdown(tab,text,drops,default,callback)
  364. buttoncount[tonumber(tab.Name)] = buttoncount[tonumber(tab.Name)]+1
  365. local def = ""
  366. if default ~= nil or false then
  367. def = default
  368. end
  369. local label = self:Create("TextLabel", {
  370. Parent = tab.ButtonHolder.ButtonHolder.Frame,
  371. BackgroundTransparency = 1,
  372. Position = UDim2.new(0.03, 0, 0, (buttoncount[tonumber(tab.Name)]-1)*42+6-(buttoncount[tonumber(tab.Name)]-1)*6),
  373. Size = UDim2.new(0, 188, 0, 30),
  374. Font = Enum.Font.SourceSansSemibold,
  375. Text = text .. ":",
  376. TextColor3 = Color3.new(1, 1, 1),
  377. TextSize = 25,
  378. })
  379. buttoncount[tonumber(tab.Name)] = buttoncount[tonumber(tab.Name)]+1
  380. local frame = self:Create("Frame", {
  381. Parent = tab.ButtonHolder.ButtonHolder.Frame,
  382. BackgroundTransparency = 1,
  383. ClipsDescendants = true,
  384. Position = UDim2.new(0, -3, 0, (buttoncount[tonumber(tab.Name)]-1)*42+3-(buttoncount[tonumber(tab.Name)]-1)*6),
  385. Size = UDim2.new(0.0350000001, 200, 0, 785),
  386. })
  387. local frame2 = self:Create("Frame", {
  388. Parent = frame,
  389. BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647),
  390. BorderColor3 = Color3.new(0.0784314, 0.0784314, 0.0784314),
  391. BorderSizePixel = 3,
  392. Position = UDim2.new(0, 9, 0, 3),
  393. Size = UDim2.new(0, 188, 0, 30),
  394. })
  395. local selected = self:Create("TextLabel", {
  396. Parent = frame2,
  397. BackgroundTransparency = 1,
  398. Size = UDim2.new(0.84574461, 0, 1, 0),
  399. Font = Enum.Font.SourceSansSemibold,
  400. Text = def,
  401. TextColor3 = Color3.new(1, 1, 1),
  402. TextSize = 25,
  403. })
  404. local drop = self:Create("TextButton", {
  405. Parent = selected,
  406. BackgroundTransparency = 1,
  407. Position = UDim2.new(0.993710816, 0, 0.100000001, 0),
  408. Rotation = 90,
  409. Size = UDim2.new(0, 30, 0, 24),
  410. Font = Enum.Font.SourceSansSemibold,
  411. Text = ">",
  412. TextColor3 = Color3.new(1, 1, 1),
  413. TextSize = 25,
  414. TextWrapped = true,
  415. })
  416. local dropdowns = self:Create("Frame", {
  417. Parent = frame2,
  418. BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647),
  419. BorderColor3 = Color3.new(0.0784314, 0.0784314, 0.0784314),
  420. BorderSizePixel = 3,
  421. Position = UDim2.new(0, 0, 0, 0),
  422. Size = UDim2.new(0, 188, 0, 0),
  423. ZIndex = 0,
  424. Visible = false
  425. })
  426. local debounce = false
  427. drop.MouseButton1Click:Connect(function()
  428. if dropdowns.Visible then
  429. if debounce == false then
  430. debounce = true
  431. for i,v in pairs(dropdowns:GetChildren())do
  432. v.ZIndex=0
  433. end
  434. local tween = TweenService:Create(dropdowns,TweenInfo.new(.5),{["Position"]=UDim2.new(0, 0, 0, -1*(dropdowns.Size.Y.Offset+25))})
  435. tween:Play()
  436. tween.Completed:Connect(function()
  437. dropdowns.Visible = false
  438. debounce = false
  439. end)
  440. end
  441. else
  442. if debounce == false then
  443. debounce = true
  444. dropdowns.Visible = true
  445. local tween = TweenService:Create(dropdowns,TweenInfo.new(.5),{["Position"]=UDim2.new(0, 0, 0, 0)})
  446. tween:Play()
  447. tween.Completed:Connect(function()
  448. for i,v in pairs(dropdowns:GetChildren())do
  449. v.ZIndex=1
  450. end
  451. debounce = false
  452. end)
  453. end
  454. end
  455. end)
  456. for i, v in pairs(drops) do
  457. local button = self:Create("TextButton", {
  458. Parent = dropdowns,
  459. BackgroundTransparency = 1,
  460. Position = UDim2.new(0, 0, 0, (i-1)*35+32-(i-1)*6),
  461. Size = UDim2.new(0, 188, 0, 29),
  462. Font = Enum.Font.SourceSansSemibold,
  463. Text = v,
  464. TextColor3 = Color3.new(1, 1, 1),
  465. TextSize = 20,
  466. })
  467. dropdowns.Size = UDim2.new(0, 188, 0, i*38)
  468. button.MouseButton1Click:Connect(function()
  469. selected.Text = button.Text
  470. callback(selected)
  471. if dropdowns.Visible then
  472. if debounce == false then
  473. debounce = true
  474. for i,v in pairs(dropdowns:GetChildren())do
  475. v.ZIndex=0
  476. end
  477. local tween = TweenService:Create(dropdowns,TweenInfo.new(.5),{["Position"]=UDim2.new(0, 0, 0, -1*(dropdowns.Size.Y.Offset+25))})
  478. tween:Play()
  479. tween.Completed:Connect(function()
  480. dropdowns.Visible = false
  481. debounce = false
  482. end)
  483. end
  484. else
  485. if debounce == false then
  486. debounce = true
  487. dropdowns.Visible = true
  488. local tween = TweenService:Create(dropdowns,TweenInfo.new(.5),{["Position"]=UDim2.new(0, 0, 0, 0)})
  489. tween:Play()
  490. tween.Completed:Connect(function()
  491. for i,v in pairs(dropdowns:GetChildren())do
  492. v.ZIndex=1
  493. end
  494. debounce = false
  495. end)
  496. end
  497. end
  498. end)
  499. end
  500. tab.ButtonHolder.ButtonHolder.Frame.BackgroundTransparency = 0
  501. tab.ButtonHolder.ButtonHolder.Frame.Size = UDim2.new(0, 200, 0, buttoncount[tonumber(tab.Name)]*42-(buttoncount[tonumber(tab.Name)]-1)*6)
  502. return selected
  503. end
  504.  
  505. game:GetService("RunService").RenderStepped:Connect(function()
  506. if #rainbows > 0 then
  507. color = Color3.fromHSV(math.acos(math.cos(rainbow*math.pi))/math.pi,.8,1)
  508. rainbow = rainbow + _G.breatherate
  509. for i, v in pairs(rainbows) do
  510. ui[v].Top.Frame.BackgroundColor3 = color
  511. end
  512. end
  513. end)
  514.  
  515. return library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement