Advertisement
YukkoAioi

dance gui

Oct 27th, 2017
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.94 KB | None | 0 0
  1. --does it work?
  2. function sandbox(var,func)
  3. local env = getfenv(func)
  4. local newenv = setmetatable({},{
  5. __index = function(self,k)
  6. if k=="script" then
  7. return var
  8. else
  9. return env[k]
  10. end
  11. end,
  12. })
  13. setfenv(func,newenv)
  14. return func
  15. end
  16. cors = {}
  17. mas = Instance.new("Model",game:GetService("Lighting"))
  18. ScreenGui0 = Instance.new("ScreenGui")
  19. Frame1 = Instance.new("Frame")
  20. TextButton2 = Instance.new("TextButton")
  21. IntValue3 = Instance.new("IntValue")
  22. LocalScript4 = Instance.new("LocalScript")
  23. TextButton5 = Instance.new("TextButton")
  24. IntValue6 = Instance.new("IntValue")
  25. TextButton7 = Instance.new("TextButton")
  26. IntValue8 = Instance.new("IntValue")
  27. TextButton9 = Instance.new("TextButton")
  28. IntValue10 = Instance.new("IntValue")
  29. TextButton11 = Instance.new("TextButton")
  30. IntValue12 = Instance.new("IntValue")
  31. TextButton13 = Instance.new("TextButton")
  32. IntValue14 = Instance.new("IntValue")
  33. Frame15 = Instance.new("Frame")
  34. TextButton16 = Instance.new("TextButton")
  35. Script17 = Instance.new("Script")
  36. ScreenGui0.Name = "Gui"
  37. ScreenGui0.Parent = mas
  38. Frame1.Name = "Animations"
  39. Frame1.Parent = ScreenGui0
  40. Frame1.Size = UDim2.new(0, 150, 0, 200)
  41. Frame1.Style = Enum.FrameStyle.DropShadow
  42. Frame1.Position = UDim2.new(0, -150, 0, 215)
  43. Frame1.BackgroundColor3 = Color3.new(1, 1, 1)
  44. Frame1.ZIndex = 9
  45. TextButton2.Name = "Button1"
  46. TextButton2.Parent = Frame1
  47. TextButton2.Transparency = 1
  48. TextButton2.Size = UDim2.new(1, 0, 0, 20)
  49. TextButton2.Text = "Dungy"
  50. TextButton2.BackgroundColor3 = Color3.new(1, 1, 1)
  51. TextButton2.BackgroundTransparency = 1
  52. TextButton2.ZIndex = 10
  53. TextButton2.Font = Enum.Font.SourceSans
  54. TextButton2.FontSize = Enum.FontSize.Size24
  55. TextButton2.TextColor3 = Color3.new(1, 1, 1)
  56. TextButton2.TextStrokeColor3 = Color3.new(1, 1, 1)
  57. TextButton2.TextStrokeTransparency = 0.80000001192093
  58. IntValue3.Name = "AnimID"
  59. IntValue3.Parent = TextButton2
  60. IntValue3.Value = 27789359
  61. LocalScript4.Name = "AnimScript"
  62. LocalScript4.Parent = Frame1
  63. table.insert(cors,sandbox(LocalScript4,function()
  64. wait(1)
  65. local frame=script.Parent
  66. local user=game.Players.LocalPlayer
  67. repeat wait() until user.Character local char=user.Character
  68. local humanoid=char:WaitForChild("Humanoid")
  69. local anim
  70. function playanim(id)
  71. if char~=nil and humanoid~=nil then
  72. local id="rbxassetid://"..tostring(id)
  73. local oldanim=char:FindFirstChild("LocalAnimation")
  74. if anim~=nil then
  75. anim:Stop()
  76. end
  77. if oldanim~=nil then
  78. if oldanim.AnimationId==id then
  79. oldanim:Destroy()
  80. return
  81. end
  82. oldanim:Destroy()
  83. end
  84. local animation=Instance.new("Animation",char)
  85. animation.Name="LocalAnimation"
  86. animation.AnimationId=id
  87. anim=humanoid:LoadAnimation(animation)
  88. anim:Play()
  89. end
  90. end
  91. local b1=frame.Button1
  92. b1.MouseButton1Down:connect(function() playanim(b1.AnimID.Value) end)
  93. local b2=frame.Button2
  94. b2.MouseButton1Down:connect(function() playanim(b2.AnimID.Value) end)
  95. local b3=frame.Button3
  96. b3.MouseButton1Down:connect(function() playanim(b3.AnimID.Value) end)
  97. local b4=frame.Button4
  98. b4.MouseButton1Down:connect(function() playanim(b4.AnimID.Value) end)
  99. local b5=frame.Button5
  100. b5.MouseButton1Down:connect(function() playanim(b5.AnimID.Value) end)
  101. local b6=frame.Button6
  102. b6.MouseButton1Down:connect(function() playanim(b6.AnimID.Value) end)
  103.  
  104.  
  105.  
  106. end))
  107. TextButton5.Name = "Button2"
  108. TextButton5.Parent = Frame1
  109. TextButton5.Transparency = 1
  110. TextButton5.Size = UDim2.new(1, 0, 0, 20)
  111. TextButton5.Text = "Yoga Dance"
  112. TextButton5.Position = UDim2.new(0, 0, 0, 20)
  113. TextButton5.BackgroundColor3 = Color3.new(1, 1, 1)
  114. TextButton5.BackgroundTransparency = 1
  115. TextButton5.ZIndex = 10
  116. TextButton5.Font = Enum.Font.SourceSans
  117. TextButton5.FontSize = Enum.FontSize.Size24
  118. TextButton5.TextColor3 = Color3.new(1, 1, 1)
  119. TextButton5.TextStrokeColor3 = Color3.new(1, 1, 1)
  120. TextButton5.TextStrokeTransparency = 0.80000001192093
  121. IntValue6.Name = "AnimID"
  122. IntValue6.Parent = TextButton5
  123. IntValue6.Value = 52155728
  124. TextButton7.Name = "Button3"
  125. TextButton7.Parent = Frame1
  126. TextButton7.Transparency = 1
  127. TextButton7.Size = UDim2.new(1, 0, 0, 20)
  128. TextButton7.Text = "Pointer"
  129. TextButton7.Position = UDim2.new(0, 0, 0, 40)
  130. TextButton7.BackgroundColor3 = Color3.new(1, 1, 1)
  131. TextButton7.BackgroundTransparency = 1
  132. TextButton7.ZIndex = 10
  133. TextButton7.Font = Enum.Font.SourceSans
  134. TextButton7.FontSize = Enum.FontSize.Size24
  135. TextButton7.TextColor3 = Color3.new(1, 1, 1)
  136. TextButton7.TextStrokeColor3 = Color3.new(1, 1, 1)
  137. TextButton7.TextStrokeTransparency = 0.80000001192093
  138. IntValue8.Name = "AnimID"
  139. IntValue8.Parent = TextButton7
  140. IntValue8.Value = 248263260
  141. TextButton9.Name = "Button4"
  142. TextButton9.Parent = Frame1
  143. TextButton9.Transparency = 1
  144. TextButton9.Size = UDim2.new(1, 0, 0, 20)
  145. TextButton9.Text = "Boogie"
  146. TextButton9.Position = UDim2.new(0, 0, 0, 60)
  147. TextButton9.BackgroundColor3 = Color3.new(1, 1, 1)
  148. TextButton9.BackgroundTransparency = 1
  149. TextButton9.ZIndex = 10
  150. TextButton9.Font = Enum.Font.SourceSans
  151. TextButton9.FontSize = Enum.FontSize.Size24
  152. TextButton9.TextColor3 = Color3.new(1, 1, 1)
  153. TextButton9.TextStrokeColor3 = Color3.new(1, 1, 1)
  154. TextButton9.TextStrokeTransparency = 0.80000001192093
  155. IntValue10.Name = "AnimID"
  156. IntValue10.Parent = TextButton9
  157. IntValue10.Value = 45834924
  158. TextButton11.Name = "Button5"
  159. TextButton11.Parent = Frame1
  160. TextButton11.Transparency = 1
  161. TextButton11.Size = UDim2.new(1, 0, 0, 20)
  162. TextButton11.Text = "Party Time "
  163. TextButton11.Position = UDim2.new(0, 0, 0, 80)
  164. TextButton11.BackgroundColor3 = Color3.new(1, 1, 1)
  165. TextButton11.BackgroundTransparency = 1
  166. TextButton11.ZIndex = 10
  167. TextButton11.Font = Enum.Font.SourceSans
  168. TextButton11.FontSize = Enum.FontSize.Size24
  169. TextButton11.TextColor3 = Color3.new(1, 1, 1)
  170. TextButton11.TextStrokeColor3 = Color3.new(1, 1, 1)
  171. TextButton11.TextStrokeTransparency = 0.80000001192093
  172. IntValue12.Name = "AnimID"
  173. IntValue12.Parent = TextButton11
  174. IntValue12.Value = 33796059
  175. TextButton13.Name = "Button6"
  176. TextButton13.Parent = Frame1
  177. TextButton13.Transparency = 1
  178. TextButton13.Size = UDim2.new(1, 0, 0, 20)
  179. TextButton13.Text = "Fast Dance"
  180. TextButton13.Position = UDim2.new(0, 0, 0, 100)
  181. TextButton13.BackgroundColor3 = Color3.new(1, 1, 1)
  182. TextButton13.BackgroundTransparency = 1
  183. TextButton13.ZIndex = 10
  184. TextButton13.Font = Enum.Font.SourceSans
  185. TextButton13.FontSize = Enum.FontSize.Size24
  186. TextButton13.TextColor3 = Color3.new(1, 1, 1)
  187. TextButton13.TextStrokeColor3 = Color3.new(1, 1, 1)
  188. TextButton13.TextStrokeTransparency = 0.80000001192093
  189. IntValue14.Name = "AnimID"
  190. IntValue14.Parent = TextButton13
  191. IntValue14.Value = 28488254
  192. Frame15.Name = "Open/Close"
  193. Frame15.Parent = ScreenGui0
  194. Frame15.Size = UDim2.new(0, 130, 0, 50)
  195. Frame15.Style = Enum.FrameStyle.DropShadow
  196. Frame15.Position = UDim2.new(0, -10, 0, 175)
  197. Frame15.BackgroundColor3 = Color3.new(1, 1, 1)
  198. Frame15.ZIndex = 9
  199. TextButton16.Name = "Button"
  200. TextButton16.Parent = Frame15
  201. TextButton16.Size = UDim2.new(1, 0, 1, 0)
  202. TextButton16.Style = Enum.ButtonStyle.RobloxRoundDefaultButton
  203. TextButton16.Text = "Animation"
  204. TextButton16.BackgroundColor3 = Color3.new(1, 1, 1)
  205. TextButton16.ZIndex = 10
  206. TextButton16.Font = Enum.Font.SourceSans
  207. TextButton16.FontSize = Enum.FontSize.Size24
  208. TextButton16.TextColor3 = Color3.new(1, 1, 1)
  209. TextButton16.TextStrokeColor3 = Color3.new(1, 1, 1)
  210. TextButton16.TextStrokeTransparency = 0.80000001192093
  211. TextButton16.TextWrapped = true
  212. Script17.Parent = TextButton16
  213. table.insert(cors,sandbox(Script17,function()
  214. wait()
  215. local button=script.Parent
  216. local animframe=button.Parent.Parent.Animations
  217. local on=false
  218. function action()
  219. if on then
  220. animframe:TweenPosition(UDim2.new(0,-150,0,215),"In","Quad",.5,true)
  221. on=false
  222. else
  223. animframe:TweenPosition(UDim2.new(0,-10,0,215),"Out","Quad",.5,true)
  224. on=true
  225. end
  226. end
  227. button.MouseButton1Down:connect(action)
  228.  
  229.  
  230.  
  231. end))
  232. for i,v in pairs(mas:GetChildren()) do
  233. v.Parent = workspace
  234. pcall(function() v:MakeJoints() end)
  235. end
  236. mas:Destroy()
  237. for i,v in pairs(cors) do
  238. spawn(function()
  239. pcall(v)
  240. end)
  241. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement