Advertisement
Guest User

Animation GUI UPDATE!

a guest
Mar 30th, 2020
439
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.00 KB | None | 0 0
  1. save = nil
  2. c3 = function(r,g,b) return Color3.new(r/255,g/255,b/255) end
  3.  
  4. --do something ro get save file
  5.  
  6. if not save then
  7. save = {
  8. ui = {
  9. highlightcolor = c3(33, 122, 255);
  10. errorcolor = c3(255, 0, 0);
  11. --AnimationPriority colors
  12. core = c3(65, 65, 65);
  13. idle = c3(134, 200, 230);
  14. movement = c3(114, 230, 121);
  15. action = c3(235, 235, 235);
  16. };
  17. preferences = {
  18.  
  19. };
  20. custom_animations = {
  21. template = {
  22. Title = "";
  23. AnimationId = "rbxassetid://";
  24. Image = "rbxassetid://2151539455"; --not required
  25. Speed = 1;
  26. Time = 0;
  27. Weight = 1;
  28. Loop = false;
  29. R6 = true;
  30. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  31. };
  32. };
  33. }
  34. end
  35.  
  36. lp = game:GetService("Players").LocalPlayer
  37. m = lp:GetMouse()
  38.  
  39. function getHumanoid()
  40. if not lp.Character then return nil end
  41. return lp.Character:FindFirstChildWhichIsA("Humanoid")
  42. end
  43.  
  44. screengui = game:GetObjects("rbxassetid://02159099015")[1]
  45. screengui.Parent = game:GetService("CoreGui")
  46. main = screengui.Topbar.Main
  47.  
  48. mainframe = main.MainFrame
  49. scrollframe = mainframe.ScrollingFrame
  50. items = scrollframe.Items
  51. search = scrollframe.SearchFrame.Search
  52. searchbutton = scrollframe.SearchFrame.ImageLabel.TextButton
  53. searchframe = scrollframe.SearchFrame
  54.  
  55. preview = main.Preview
  56. previewimage = preview.Image
  57. previewtitle = preview.Title
  58. previewdesc = preview.Desc
  59.  
  60. function draggable(gObj)
  61. local UserInputService = game:GetService("UserInputService")
  62.  
  63. local gui = gObj
  64.  
  65. local dragging
  66. local dragInput
  67. local dragStart
  68. local startPos
  69.  
  70. local function update(input)
  71. local delta = input.Position - dragStart
  72. gui.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  73. end
  74.  
  75. gui.InputBegan:Connect(function(input)
  76. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  77. dragging = true
  78. dragStart = input.Position
  79. startPos = gui.Position
  80.  
  81. input.Changed:Connect(function()
  82. if input.UserInputState == Enum.UserInputState.End then
  83. dragging = false
  84. end
  85. end)
  86. end
  87. end)
  88.  
  89. gui.InputChanged:Connect(function(input)
  90. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  91. dragInput = input
  92. end
  93. end)
  94.  
  95. UserInputService.InputChanged:Connect(function(input)
  96. if input == dragInput and dragging then
  97. update(input)
  98. end
  99. end)
  100. end
  101. function tween(object,style,direction,t,goal)
  102. local tweenservice = game:GetService("TweenService")
  103. local tweenInfo = TweenInfo.new(t,Enum.EasingStyle[style],Enum.EasingDirection[direction])
  104. local tween = tweenservice:Create(object,tweenInfo,goal)
  105. tween:Play()
  106. return tween
  107. end
  108.  
  109. draggable(screengui.Topbar)
  110.  
  111. function checkIfStudio()
  112. return game.Name ~= "Game"
  113. end
  114.  
  115. if not checkIfStudio() then
  116. print'Client is not in Roblox studio'
  117. --main.Size = UDim2.new(0.398, 0, 0.477, 0)
  118. end
  119.  
  120. search.Changed:connect(function(p)
  121. local n = 0
  122. for i,v in pairs (items:GetChildren()) do
  123. if v:IsA("TextButton") and not string.find(v.Title.Text:lower(), search.Text:lower()) then
  124. v.Visible = false
  125. elseif v:IsA("TextButton") and string.find(v.Title.Text:lower(), search.Text:lower()) then
  126. v.Visible = true
  127. n = n + 1
  128. end
  129. end
  130. if p == "Text" then
  131. if n > 0 then
  132. tween(searchframe, "Sine", "Out", 0.25, {
  133. BorderColor3 = save.ui.highlightcolor;
  134. })
  135. wait(0.25)
  136. tween(searchframe, "Sine", "In", 0.5, {
  137. BorderColor3 = c3(58, 58, 58);
  138. })
  139. else
  140. tween(searchframe, "Sine", "Out", 0.25, {
  141. BorderColor3 = save.ui.errorcolor;
  142. })
  143. wait(0.25)
  144. tween(searchframe, "Sine", "In", 0.5, {
  145. BorderColor3 = c3(58, 58, 58);
  146. })
  147. end
  148. end
  149. end)
  150.  
  151. spawn(function()
  152. while wait(10) do
  153. --auto-save every 10 seconds
  154. end
  155. end)
  156.  
  157. cam = workspace.CurrentCamera
  158.  
  159. running = {}
  160. popAnims = {
  161. armturbine = {
  162. Title = "Arm Turbine";
  163. AnimationId = "rbxassetid://259438880";
  164. Speed = 1.5;
  165. Time = 0;
  166. Weight = 1;
  167. Loop = true;
  168. R6 = true;
  169. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  170. };
  171. weirdsway = {
  172. Title = "Weird Sway";
  173. AnimationId = "rbxassetid://248336677";
  174. Speed = 1;
  175. Time = 0;
  176. Weight = 1;
  177. Loop = true;
  178. R6 = true;
  179. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  180. };
  181. weirdfloat = {
  182. Title = "Weird Float";
  183. AnimationId = "rbxassetid://248336459";
  184. Speed = 1;
  185. Time = 0;
  186. Weight = 1;
  187. Loop = true;
  188. R6 = true;
  189. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  190. };
  191. weirdpose = {
  192. Title = "Weird Pose";
  193. AnimationId = "rbxassetid://248336163";
  194. Speed = 1;
  195. Time = 0;
  196. Weight = 1;
  197. Loop = true;
  198. R6 = true;
  199. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  200. };
  201. penguinslide = {
  202. Title = "Penguin Slide";
  203. AnimationId = "rbxassetid://282574440";
  204. Speed = 1;
  205. Time = 0;
  206. Weight = 1;
  207. Loop = true;
  208. R6 = true;
  209. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  210. };
  211. scream = {
  212. Title = "Scream";
  213. AnimationId = "rbxassetid://180611870";
  214. Speed = 1.5;
  215. Time = 0;
  216. Weight = 1;
  217. Loop = true;
  218. R6 = true;
  219. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  220. };
  221. crouch = {
  222. Title = "Crouch";
  223. AnimationId = "rbxassetid://182724289";
  224. Speed = 1;
  225. Time = 0;
  226. Weight = 1;
  227. Loop = true;
  228. R6 = true;
  229. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  230. };
  231. happydance = {
  232. Title = "Happy Dance";
  233. AnimationId = "rbxassetid://248335946";
  234. Speed = 1;
  235. Time = 0;
  236. Weight = 1;
  237. Loop = true;
  238. R6 = true;
  239. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  240. };
  241. floatinghead = {
  242. Title = "Floating Head";
  243. AnimationId = "rbxassetid://121572214";
  244. Speed = 1;
  245. Time = 0;
  246. Weight = 1;
  247. Loop = true;
  248. R6 = true;
  249. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  250. };
  251. Sex = {
  252. Title = "Sex";
  253. AnimationId = "rbxassetid://148840371";
  254. Speed = 1;
  255. Time = 0;
  256. Weight = 1;
  257. Loop = true;
  258. R6 = true;
  259. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  260. };
  261. pinchnose = {
  262. Title = "Pinch Nose";
  263. AnimationId = "rbxassetid://30235165";
  264. Speed = 1;
  265. Time = 0;
  266. Weight = 1;
  267. Loop = true;
  268. R6 = true;
  269. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  270. };
  271. goal = {
  272. Title = "Goal!";
  273. AnimationId = "rbxassetid://28488254";
  274. Speed = 1;
  275. Time = 0;
  276. Weight = 1;
  277. Loop = true;
  278. R6 = true;
  279. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  280. };
  281. cry = {
  282. Title = "Cry";
  283. AnimationId = "rbxassetid://180612465";
  284. Speed = 0;
  285. Time = 1.5;
  286. Weight = 1;
  287. Loop = true;
  288. R6 = true;
  289. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  290. };
  291. partytime = {
  292. Title = "Party Time";
  293. AnimationId = "rbxassetid://33796059";
  294. Speed = 1;
  295. Time = 0;
  296. Weight = 1;
  297. Loop = true;
  298. R6 = true;
  299. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  300. };
  301. moondance = {
  302. Title = "Moon Dance";
  303. AnimationId = "rbxassetid://27789359";
  304. Speed = 1;
  305. Time = 0;
  306. Weight = 1;
  307. Loop = true;
  308. R6 = true;
  309. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  310. };
  311. insanelegs = {
  312. Title = "Insane Legs";
  313. AnimationId = "rbxassetid://87986341";
  314. Speed = 99;
  315. Time = 0;
  316. Weight = 1;
  317. Loop = true;
  318. R6 = true;
  319. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  320. };
  321. rotation = {
  322. Title = "Rotation";
  323. AnimationId = "rbxassetid://136801964";
  324. Speed = 1;
  325. Time = 0;
  326. Weight = 1;
  327. Loop = true;
  328. R6 = true;
  329. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  330. };
  331. insanerotation = {
  332. Title = "Insane Rotation";
  333. AnimationId = "rbxassetid://136801964";
  334. Speed = 99;
  335. Time = 0;
  336. Weight = 1;
  337. Loop = true;
  338. R6 = true;
  339. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  340. };
  341. roar = {
  342. Title = "Roar";
  343. AnimationId = "rbxassetid://163209885";
  344. Speed = 1;
  345. Time = 0;
  346. Weight = 1;
  347. Loop = true;
  348. R6 = true;
  349. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  350. };
  351. spin = {
  352. Title = "Spin";
  353. AnimationId = "rbxassetid://188632011";
  354. Speed = 1;
  355. Time = 0;
  356. Weight = 1;
  357. Loop = true;
  358. R6 = true;
  359. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  360. };
  361. zombiearms = {
  362. Title = "Zombie Arms";
  363. AnimationId = "rbxassetid://183294396";
  364. Speed = 0;
  365. Time = 0;
  366. Weight = 1;
  367. Loop = true;
  368. R6 = true;
  369. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  370. };
  371. insane = {
  372. Title = "Insane";
  373. AnimationId = "rbxassetid://33796059";
  374. Speed = 99;
  375. Time = 0;
  376. Weight = 1;
  377. Loop = true;
  378. R6 = true;
  379. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  380. };
  381. neckbreak = {
  382. Title = "Neck Break";
  383. AnimationId = "rbxassetid://35154961";
  384. Speed = 0;
  385. Time = 2;
  386. Weight = 1;
  387. Loop = true;
  388. R6 = true;
  389. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  390. };
  391. headdetach = {
  392. Title = "Head Detach";
  393. AnimationId = "rbxassetid://35154961";
  394. Speed = 0;
  395. Time = 3;
  396. Weight = 1;
  397. Loop = true;
  398. R6 = true;
  399. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  400. };
  401. idle = {
  402. Title = "Idle";
  403. AnimationId = "rbxassetid://180435571";
  404. Speed = 1;
  405. Time = 0;
  406. Weight = 1;
  407. Loop = true;
  408. R6 = true;
  409. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  410. };
  411. charleston = {
  412. Title = "Charleston";
  413. AnimationId = "rbxassetid://429703734";
  414. Speed = 1;
  415. Time = 0;
  416. Weight = 1;
  417. Loop = true;
  418. R6 = true;
  419. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  420. };
  421. SuperPunch = {
  422. Title = "Super Punch";
  423. AnimationId = "rbxassetid://126753849";
  424. Speed = 2;
  425. Time = 0;
  426. Weight = 1;
  427. Loop = true;
  428. R6 = true;
  429. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  430. };
  431. FloatSit = {
  432. Title = "Float Sit";
  433. AnimationId = "rbxassetid://179224234";
  434. Speed = 1;
  435. Time = 0;
  436. Weight = 1;
  437. Loop = true;
  438. R6 = true;
  439. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  440. };
  441. Dab = {
  442. Title = "Dab";
  443. AnimationId = "rbxassetid://248263260";
  444. Speed = 1;
  445. Time = 0;
  446. Weight = 1;
  447. Loop = true;
  448. R6 = true;
  449. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  450. };
  451. Levitate = {
  452. Title = "Levitate";
  453. AnimationId = "rbxassetid://313762630";
  454. Speed = 1;
  455. Time = 0;
  456. Weight = 1;
  457. Loop = true;
  458. R6 = true;
  459. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  460. };
  461. Faint = {
  462. Title = "Faint";
  463. AnimationId = "rbxassetid://181526230";
  464. Speed = 1;
  465. Time = 0;
  466. Weight = 1;
  467. Loop = true;
  468. R6 = true;
  469. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  470. };
  471. HeroJump = {
  472. Title = "Hero Jump";
  473. AnimationId = "rbxassetid://184574340";
  474. Speed = 1;
  475. Time = 0;
  476. Weight = 1;
  477. Loop = true;
  478. R6 = true;
  479. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  480. };
  481. JumpingJacks = {
  482. Title = "Jumping Jacks";
  483. AnimationId = "rbxassetid://429681631";
  484. Speed = 1;
  485. Time = 0;
  486. Weight = 1;
  487. Loop = true;
  488. R6 = true;
  489. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  490. };
  491. DinoWalk = {
  492. Title = "Dino Walk";
  493. AnimationId = "rbxassetid://204328711";
  494. Speed = 1;
  495. Time = 0;
  496. Weight = 1;
  497. Loop = true;
  498. R6 = true;
  499. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  500. };
  501. ThrowHead = {
  502. Title = "Throw Head";
  503. AnimationId = "rbxassetid://35154961";
  504. Speed = 1;
  505. Time = 0;
  506. Weight = 1;
  507. Loop = true;
  508. R6 = true;
  509. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  510. };
  511. BowDown = {
  512. Title = "Bow Down";
  513. AnimationId = "rbxassetid://204292303";
  514. Speed = 1;
  515. Time = 0;
  516. Weight = 1;
  517. Loop = true;
  518. R6 = true;
  519. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  520. };
  521. firewall = {
  522. Title = "Fire Wall";
  523. AnimationId = "rbxassetid://32326246";
  524. Speed = 1;
  525. Time = 0;
  526. Weight = 1;
  527. Loop = false;
  528. R6 = true;
  529. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  530. };
  531. Hug = {
  532. Title = "Hug";
  533. AnimationId = "rbxassetid://42071631";
  534. Speed = 1;
  535. Time = 0;
  536. Weight = 1;
  537. Loop = false;
  538. R6 = true;
  539. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  540. };
  541. HoldHands = {
  542. Title = "Hold Hands";
  543. AnimationId = "rbxassetid://54513258";
  544. Speed = 1;
  545. Time = 0;
  546. Weight = 1;
  547. Loop = false;
  548. R6 = true;
  549. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  550. };
  551. Crouch2 = {
  552. Title = "Crouch 2";
  553. AnimationId = "rbxassetid://287325678";
  554. Speed = 1;
  555. Time = 0;
  556. Weight = 1;
  557. Loop = true;
  558. R6 = true;
  559. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  560. };
  561. BeatBox = {
  562. Title = "Beat Box";
  563. AnimationId = "rbxassetid://45504977";
  564. Speed = 1;
  565. Time = 0;
  566. Weight = 1;
  567. Loop = true;
  568. R6 = true;
  569. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  570. };
  571. TilteHead = {
  572. Title = "Tilte Head";
  573. AnimationId = "rbxassetid://283545583";
  574. Speed = 1;
  575. Time = 0;
  576. Weight = 1;
  577. Loop = true;
  578. R6 = true;
  579. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  580. };
  581. GrabAss = {
  582. Title = "Grab Ass";
  583. AnimationId = "rbxassetid://225975820";
  584. Speed = 1;
  585. Time = 0;
  586. Weight = 1;
  587. Loop = true;
  588. R6 = true;
  589. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  590. };
  591. CoolDance = {
  592. Title = "Cool Dance";
  593. AnimationId = "rbxassetid://35634514";
  594. Speed = 1;
  595. Time = 0;
  596. Weight = 1;
  597. Loop = true;
  598. R6 = true;
  599. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  600. };
  601. }
  602. robloxOwns = {}
  603.  
  604. ownerOwns = {}
  605.  
  606. customAnims = {}
  607.  
  608. function getOwnedAnimations(userid)
  609. local httpserv = game:GetService("HttpService")
  610. local owned = httpserv:GetAsync("https://inventory.roblox.com/v1/users/"..userid.."/inventory/Animation?pageNumber=1&itemsPerPage=10", true)
  611. return owned
  612. end
  613.  
  614.  
  615. function getAnim(name)
  616. return popAnims[name] or customAnims[name]
  617. end
  618. function runAnim(info, humanoid)
  619. local animation = Instance.new("Animation")
  620. animation.AnimationId = info.AnimationId
  621.  
  622. local animtrack = humanoid:LoadAnimation(animation)
  623. table.insert(running,animtrack)
  624. animtrack.Priority = info.Priority
  625. animtrack.Looped = info.Loop
  626.  
  627. animtrack:Play()
  628. animtrack:AdjustSpeed(info.Speed)
  629. animtrack:AdjustWeight(info.Weight)
  630. animtrack.TimePosition = info.Time
  631.  
  632. animtrack.Stopped:connect(function()
  633. for i = 1,#running do
  634. if running[i] == animtrack then
  635. table.remove(running,i)
  636. end
  637. end
  638. end)
  639.  
  640. return animtrack
  641. end
  642.  
  643. template = items.Template
  644. template.Parent = nil
  645.  
  646. function clear()
  647. for i,v in pairs (items:GetChildren()) do
  648. if v:IsA("TextButton") then
  649. v:Destroy()
  650. end
  651. end
  652. end
  653.  
  654. --[[
  655. idle = {
  656. Title = "Idle";
  657. AnimationId = "rbxassetid://180435571";
  658. Speed = 1;
  659. Time = 0;
  660. Weight = 1;
  661. Loop = true;
  662. R6 = true;
  663. Priority = 2; --0, 1, 2, and 1000 are acceptable priorities
  664. };
  665. --]]
  666.  
  667. function createbutton(v)
  668. local temp = template:Clone()
  669. temp.Parent = items
  670. temp.Name = v.Title
  671. temp.Title.Text = v.Title
  672. temp.Image.Image = v.Image or "rbxassetid://2151539455"
  673. if temp.Image.Image == "rbxassetid://2151539455" then
  674. temp.Image.ImageColor3 = (v.Priority == 0 and save.ui.idle) or (v.Priority == 1 and save.ui.movement) or (v.Priority == 2 and save.ui.action) or (v.Priority == 1000 and save.ui.core)
  675. else
  676. temp.Image.ImageColor3 = Color3.new(1,1,1)
  677. end
  678. temp.LayoutOrder = math.random(1,10000)
  679.  
  680. temp.Settings.AnimationId.Value = v.AnimationId
  681. temp.Settings.Loop.Value = v.Loop
  682. temp.Settings.Priority.Value = v.Priority
  683. temp.Settings.R6.Value = v.R6
  684. temp.Settings.Speed.Value = v.Speed
  685. temp.Settings.Weight.Value = v.Weight
  686. temp.Settings.Time.Value = v.Time
  687.  
  688. temp.MouseEnter:connect(function()
  689. preview.Title.Text = v.Title
  690. preview.Desc.Text = "Speed: "..tostring(v.Speed).."\nPriority: "..tostring(v.Priority).."\nR6 Rig: "..tostring(v.R6).."\nAnimID: "..tostring(v.AnimationId).."\n\n"..(v.Description or "No description provided")
  691.  
  692. preview.Image.Image = v.Image or "rbxassetid://2151539455"
  693. if preview.Image.Image == "rbxassetid://2151539455" then
  694. preview.Image.ImageColor3 = (v.Priority == 0 and save.ui.idle) or (v.Priority == 1 and save.ui.movement) or (v.Priority == 2 and save.ui.action) or (v.Priority == 1000 and save.ui.core)
  695. else
  696. preview.Image.ImageColor3 = Color3.new(1,1,1)
  697. end
  698. end)
  699. temp.MouseButton1Click:connect(function()
  700. temp.Border.ImageColor3 = save.ui.highlightcolor
  701. for i,anim in pairs (running) do
  702. if anim.Animation.AnimationId == v.AnimationId then
  703. anim:Stop()
  704. return
  705. end
  706. end
  707. temp.Border.Visible = true
  708. local rAnim = runAnim(v, getHumanoid())
  709. rAnim.Stopped:connect(function()
  710. temp.Border.Visible = false
  711. end)
  712. end)
  713.  
  714. return temp
  715. end
  716.  
  717. dropdown = mainframe.ScrollingFrame.DropdownFrame
  718. elements = dropdown.HoldContentsFrame.Frame.Elements
  719. dropdownenabled = true
  720.  
  721. tween(dropdown.HoldContentsFrame.Frame, "Linear", "In", 0, {
  722. Position = UDim2.new(0,0,-1,0)
  723. })
  724. dropdown.HoldContentsFrame.Frame.Visible = false
  725.  
  726. dropdowndeactivate = screengui.DropdownDeactivate
  727. dropdowndeactivate.Visible = false
  728.  
  729. function hideddown()
  730. tween(dropdown.HoldContentsFrame.Frame, "Linear", "In", 0, {
  731. Position = UDim2.new(0,0,-1,0)
  732. })
  733. dropdown.HoldContentsFrame.Frame.Visible = false
  734. dropdowndeactivate.Visible = false
  735. dropdownenabled = true
  736.  
  737. for i,e in pairs (elements:GetChildren()) do
  738. if e:IsA("TextButton") then
  739. e.BackgroundColor3 = c3(46,46,46)
  740. end
  741. end
  742. end
  743.  
  744. dropdown.MouseButton1Click:connect(function()
  745. print'ddownclick'
  746. dropdownenabled = not dropdownenabled
  747. if dropdownenabled then
  748. hideddown()
  749. else
  750. tween(dropdown.HoldContentsFrame.Frame, "Linear", "In", 0.3, {
  751. Position = UDim2.new(0,0,0,0)
  752. })
  753. dropdown.HoldContentsFrame.Frame.Visible = true
  754. dropdowndeactivate.Visible = true
  755. end
  756. end)
  757.  
  758. dropdowndeactivate.MouseButton1Down:connect(function()
  759. hideddown()
  760. end)
  761.  
  762. for i,v in pairs (elements:GetChildren()) do
  763. if v:IsA("TextButton") then
  764. v.MouseEnter:connect(function()
  765. for i,e in pairs (elements:GetChildren()) do
  766. if e:IsA("TextButton") then
  767. e.BackgroundColor3 = c3(46,46,46)
  768. end
  769. end
  770. v.BackgroundColor3 = save.ui.highlightcolor
  771. end)
  772. v.MouseButton1Click:connect(function()
  773. hideddown()
  774. dropdown.TextLabel.Text = v.Name
  775. sort(v.Name)
  776. end)
  777. end
  778. end
  779.  
  780. function sort(category)
  781. clear()
  782. if category == "Popular" then
  783. for i,v in pairs (popAnims) do
  784. local temp = createbutton(v)
  785. end
  786. elseif category == "By Roblox" then
  787.  
  788. end
  789. end
  790.  
  791. game:GetService('RunService').RenderStepped:connect(function()
  792. items.Parent.CanvasSize = UDim2.new(0,0,0,items.GridLayout.AbsoluteContentSize.Y + 50)
  793. end)
  794.  
  795. sort("Popular")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement