Advertisement
Finnegan5

music 2

Sep 25th, 2017
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.90 KB | None | 0 0
  1. songs = {"Rob gasser - Supersonic","1060452706","Space","189542556","Australian National Anthem","155871505","The Wolf","826317122","Disintegrating","725763140","Shinzo wo Sasageyo","720813067","JOJOOOOO","519992991","Protegent rap","989714243","Grisly Reminder","143382469","At the Speed of Light","537310222","We are Number One","1012455141","Jeffy why rap","852979074","Rock'n Roll Mcdonalds","142677062"}
  2.  
  3. local asin = math.asin
  4. local atan2 = math.atan2
  5. local rad = math.rad
  6. local sin = math.sin
  7. local abs = math.abs
  8. local ceil = math.ceil
  9. local pi = math.pi
  10. deddeb=false
  11. deb=false
  12. local player = game.Players.LocalPlayer
  13. local pchar = player.Character
  14. local mouse = player:GetMouse()
  15. local torso=pchar.Torso
  16. anim=true
  17. anim2=false
  18. anglespeed = 1
  19. hum=pchar.Humanoid
  20. angle = 0
  21. equi=false
  22. showing = false
  23. tol=Instance.new("HopperBin",player.Backpack)
  24. tol.Name="GramaPlayer"
  25. Part = function(x,y,z,color,tr,cc,an,parent)
  26. local p = Instance.new('Part',parent or Weapon)
  27. p.formFactor = 'Custom'
  28. p.Size = Vector3.new(x,y,z)
  29. p.BrickColor = BrickColor.new(color)
  30. p.CanCollide = cc
  31. p.Transparency = tr
  32. p.Anchored = an
  33. p.TopSurface,p.BottomSurface = 0,0
  34. return p
  35. end
  36. wPart = function(x,y,z,color,tr,cc,an,parent)
  37. local wp = Instance.new('WedgePart',parent or Weapon)
  38. wp.formFactor = 'Custom'
  39. wp.Size = Vector3.new(x,y,z)
  40. wp.BrickColor = BrickColor.new(color)
  41. wp.CanCollide = cc
  42. wp.Transparency = tr
  43. wp.Anchored = an
  44. wp.TopSurface,wp.BottomSurface = 0,0
  45. return wp
  46. end
  47. Weld = function(p0,p1,x,y,z,rx,ry,rz,par)
  48. p0.Position = p1.Position
  49. local w = Instance.new('Motor',par or p0)
  50. w.Part0 = p0
  51. w.Part1 = p1
  52. w.C1 = CFrame.new(x,y,z)*CFrame.Angles(rx,ry,rz)
  53. return w
  54. end
  55. Mesh = function(par,num,x,y,z)
  56. local msh = nil
  57. if num == 1 then
  58. msh = Instance.new("CylinderMesh",par)
  59. elseif num == 2 then
  60. msh = Instance.new("SpecialMesh",par)
  61. msh.MeshType = 3
  62. elseif num == 3 then
  63. msh = Instance.new("BlockMesh",par)
  64. elseif type(num) == 'string' then
  65. msh = Instance.new("SpecialMesh",par)
  66. msh.MeshId = num
  67. end
  68. msh.Scale = Vector3.new(x,y,z)
  69. return msh
  70. end
  71.  
  72. ROW = function(x, pa, out, col, trans, s, wt, t, ang, plus)
  73. for i = 1, 360, 360/t do wait()
  74. local c = Instance.new("Part", pa)
  75. c.FormFactor = 3
  76. c.TopSurface = 0
  77. c.BottomSurface = 0
  78. c.Size = s
  79. c.Anchored = true
  80. c.CanCollide = wt
  81. c.Transparency = trans
  82. c.BrickColor = BrickColor.new(col)
  83. c.CFrame = x * CFrame.Angles(0, math.rad(i + plus), 0) * CFrame.new(0, 0, out) * ang
  84. end
  85. end
  86.  
  87. local function getAngles(cf)
  88. local sx,sy,sz,m00,m01,m02,m10,m11,m12,m20,m21,m22 = cf:components()
  89. return atan2(-m12,m22),asin(m02),atan2(-m01,m00)
  90. end
  91. Lerp = {
  92. Number = function(C1,C2,inc)
  93. return C1 + (C2 - C1) * inc
  94. end;
  95. CFrame = function(a,b,m)
  96. local c,d={a:components()},{b:components()}
  97. table.foreach(c,function(a,b)c[a]=c[a]+(d[a]-c[a])*m end)
  98. return CFrame.new(unpack(c))
  99. end;
  100. }
  101. local function genWeld(a,b)
  102. local w = Instance.new("Weld",a)
  103. w.Part0 = a
  104. w.Part1 = b
  105. return w
  106. end
  107. local Neck = genWeld(pchar.Torso,pchar.Head)
  108. Neck.C0 = CFrame.new(0,1,0)
  109. Neck.C1 = CFrame.new(0,-0.5,0)
  110. local LeftShoulder = genWeld(pchar.Torso,pchar['Left Arm'])
  111. LeftShoulder.C0 = CFrame.new(-1,0.5,0)
  112. LeftShoulder.C1 = CFrame.new(0.5,0.5,0)
  113. RightShoulder = genWeld(pchar.Torso,pchar['Right Arm'])
  114. RightShoulder.C0 = CFrame.new(1,0.5,0)
  115. RightShoulder.C1 = CFrame.new(-0.5,0.5,0)
  116. local LeftHip = genWeld(pchar.Torso,pchar['Left Leg'])
  117. LeftHip.C0 = CFrame.new(-1,-1,0)
  118. LeftHip.C1 = CFrame.new(-0.5,1,0)
  119. local RightHip = genWeld(pchar.Torso,pchar['Right Leg'])
  120. RightHip.C0 = CFrame.new(1,-1,0)
  121. RightHip.C1 = CFrame.new(0.5,1,0)
  122. local RootJoint = genWeld(pchar.HumanoidRootPart,pchar.Torso)
  123. RootJoint.C0 = CFrame.new(0,0,0) * CFrame.Angles(-math.pi/2,0,math.pi)
  124. RootJoint.C1 = CFrame.new(0,0,0) * CFrame.Angles(-math.pi/2,0,math.pi)
  125. local function newLerpTo(weld)
  126. return {
  127. Weld = weld;
  128. To = weld.C0;
  129. Cache = weld.C0;
  130. Speed = 0.1;
  131. }
  132. end
  133. mo = Instance.new("Model",pchar)
  134. mp = Part(1,1,1,'Reddish brown',1,false,false,mo)
  135. Mesh(mp,3,1.5,.75,1.5)
  136. mw = Weld(mp,torso,0,-.125,-1.5,0,0,0,mo)
  137. mp.Material='Wood'
  138. p = Part(1,1,1,'Brown',1,false,false,mo)
  139. Mesh(p,3,1.75,.1,1.75)
  140. Weld(p,mp,0,-.375,0,0,0,0,mo)
  141. p.Material='Wood'
  142. p = Part(1,1,1,'Nougat',1,false,false,mo)
  143. Mesh(p,3,1.325,.1,1.325)
  144. Weld(p,mp,0,.375,0,0,0,0,mo)
  145. p.Material='WoodPlanks'
  146. p = Part(1,1,1,'Black',1,false,false,mo)
  147. Mesh(p,1,1.325,.1,1.325)
  148. Weld(p,mp,0,.376,0,0,0,0,mo)
  149. p.Material='SmoothPlastic'
  150. disc = Part(1,1,1,'Black',1,false,false,mo)
  151. Mesh(disc,3,1.25,.1,1.25)
  152. discw=Weld(disc,mp,0,.377,0,0,0,0,mo)
  153. d=Instance.new('Decal',disc)
  154. d.Face='Top'
  155. d.Transparency=1
  156. d.Texture='http://www.roblox.com/asset/?id=24716248'
  157. sp = Part(1,1,1,'',1,false,false,mo)
  158. Mesh(sp,1,.1,.5,.1)
  159. Weld(sp,mp,-.5,.42,-.5,rad(45),0,-rad(45),mo)
  160. sp.Material='SmoothPlastic'
  161. sp2 = Part(1,1,1,'',1,false,false,mo)
  162. Mesh(sp2,1,.15,.11,.15)
  163. Weld(sp2,sp,0,.25,0,pi/2,0,rad(50),mo)
  164. sp2.Material='SmoothPlastic'
  165. p = Part(1,1,1,'',1,false,false,mo)
  166. Mesh(p,1,.05,.5,.05)
  167. Weld(p,sp2,0.2,0,0,0,0,pi/2,mo)
  168. p.Material='SmoothPlastic'
  169. p = Part(1,1,1,'Dark stone grey',1,false,false,mo)
  170. Mesh(p,1,.15,.2,.15)
  171. Weld(p,mp,0,.377,0,0,0,0,mo)
  172. p = Part(1,1,1,'Black',1,false,false,mo)
  173. Mesh(p,1,.2,.1,.2)
  174. Weld(p,mp,.75,0,0,0,0,pi/2,mo)
  175. hn = Part(1,1,1,'Dark stone grey',1,false,false,mo)
  176. Mesh(hn,1,.1,.5,.1)
  177. hnw=Weld(hn,mp,.75,0,0,0,0,-pi/2,mo)
  178. p = Part(1,1,1,'Dark stone grey',1,false,false,mo)
  179. Mesh(p,1,.15,.11,.15)
  180. Weld(p,hn,0,.25,0,0,0,0,mo)
  181. p = Part(1,1,1,'Dark stone grey',1,false,false,mo)
  182. Mesh(p,1,.1,.25,.1)
  183. Weld(p,hn,-0.125,.25,0,0,0,pi/2,mo)
  184. p = Part(1,1,1,'Dark stone grey',1,false,false,mo)
  185. Mesh(p,1,.15,.11,.15)
  186. Weld(p,hn,-.25,.25,0,0,0,0,mo)
  187. p = Part(1,1,1,'Dark stone grey',1,false,false,mo)
  188. Mesh(p,1,.1,.5,.1)
  189. Weld(p,hn,-.25,.5,0,0,0,0,mo)
  190. p = Part(1,1,1,'Brown',1,false,false,mo)
  191. Mesh(p,1,.125,.35,.125)
  192. Weld(p,hn,-.25,.5,0,0,0,0,mo)
  193. p.Material='Wood'
  194. local crank = p
  195. for i=1,90,18 do
  196. local p=Part(1,1,1,'Dark stone grey',1,false,false,mo)
  197. Mesh(p,1,.15,.115,.15)
  198. local w=Weld(p,mp,0,0,0,0,0,0,p)
  199. w.C0=CFrame.new(0.3,0,0)*CFrame.Angles(0,0,-math.rad(i))*CFrame.new(.7,-.3,0);
  200. end
  201. p = Part(1,1,1,'Dark stone grey',1,false,false,mo)
  202. Mesh(p,1,.15,.3,.15)
  203. Weld(p,mp,-1,.5,0,0,0,0,mo)
  204. for i=1,70,18 do
  205. local p=Part(1,1,1,'Dark stone grey',1,false,false,mo)
  206. Mesh(p,1,.15,.115,.15)
  207. local w=Weld(p,mp,0,0,0,0,0,0,p)
  208. w.C0=CFrame.new(.3,0,0)*CFrame.Angles(0,0,math.rad(i))*CFrame.new(0.7,-.6,0);
  209. end
  210. strt = Part(1,1,1,'Dark stone grey',1,false,false,mo)
  211. Mesh(strt,1,.15,.3,.15)
  212. Weld(strt,mp,-.7,.925,0,0,0,-rad(65),mo)
  213.  
  214. for i=1,24 do
  215. local p=Part(1,1,1,'Dark stone grey',1,false,false,mo)
  216. Mesh(p,3,.5,.1,.01)
  217. local wld=Weld(p,strt,0,0,0,0,0,0,mo)
  218. wld.C1=CFrame.new(0,.1,0)*CFrame.Angles(pi/2,0,rad(360/24)*i)*CFrame.new(0.1,0,0)*CFrame.Angles(0,rad(70),0)
  219. end
  220. for i=1,24 do
  221. local p=Part(1,1,1,'Dark stone grey',1,false,false,mo)
  222. Mesh(p,3,.5,.2,.01)
  223. local wld=Weld(p,strt,0,0,0,0,0,0,mo)
  224. wld.C1=CFrame.new(0,.525,0)*CFrame.Angles(pi/2,0,rad(360/24)*i)*CFrame.new(0.35,0,0)*CFrame.Angles(0,rad(50),0)
  225. end
  226. p = Part(1,1,1,'Black',1,false,false,mo)
  227. Mesh(p,'http://www.roblox.com/asset/?id=3270017',.42,.42,.42)
  228. Weld(p,strt,0,.35,0,pi/2,0,0,mo)
  229. p = Part(1,1,1,'Black',1,false,false,mo)
  230. Mesh(p,'http://www.roblox.com/asset/?id=3270017',1,1,1)
  231. Weld(p,strt,0,.75,0,pi/2,0,0,mo)
  232.  
  233. s = Instance.new("Sound",sp2)
  234. s.Looped=true
  235. s.Pitch=1
  236.  
  237. local screengui = Instance.new("ScreenGui",player.PlayerGui)
  238. screengui.Name = "musicgui"
  239.  
  240. local frame = Instance.new("Frame",screengui)
  241. frame.BorderSizePixel = 0
  242. frame.Size = UDim2.new(0.15, 0, 0.35, 0)
  243. frame.ClipsDescendants = true
  244. frame.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  245. frame.Position = UDim2.new(1.1, 0, 0.35, 0)
  246. frame.BackgroundTransparency = 0.8
  247. frame.BackgroundColor3 = Color3.new(0, 0, 0)
  248.  
  249. local dt = Instance.new("Frame",frame)
  250. dt.BorderSizePixel = 0
  251. dt.Size = UDim2.new(0.02, 0, 1, 0)
  252. dt.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  253. dt.Name = "dt"
  254. dt.BackgroundTransparency = 0.8
  255. dt.BackgroundColor3 = Color3.new(1, 1, 1)
  256.  
  257. local dt_2 = Instance.new("Frame",frame)
  258. dt_2.BorderSizePixel = 0
  259. dt_2.Size = UDim2.new(0.98, 0, 0.02, 0)
  260. dt_2.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  261. dt_2.Name = "dt"
  262. dt_2.Position = UDim2.new(0.02, 0, 0.2, 0)
  263. dt_2.BackgroundTransparency = 0.8
  264. dt_2.BackgroundColor3 = Color3.new(1, 1, 1)
  265.  
  266. local name = Instance.new("TextLabel",frame)
  267. name.FontSize = Enum.FontSize.Size24
  268. name.TextStrokeTransparency = 0
  269. name.BorderSizePixel = 0
  270. name.Size = UDim2.new(1, 0, 0.2, 0)
  271. name.TextColor3 = Color3.new(1, 1, 1)
  272. name.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  273. name.Text = "Music list"
  274. name.BackgroundTransparency = 1
  275. name.Font = Enum.Font.SourceSans
  276. name.Name = "name"
  277. name.BackgroundColor3 = Color3.new(1, 1, 1)
  278.  
  279. local list = Instance.new("ScrollingFrame",frame)
  280. list.Size = UDim2.new(0.82, 0, 0.6, 0)
  281. list.BackgroundTransparency = 0.8
  282. list.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  283. list.Name = "list"
  284. list.Position = UDim2.new(0.1, 0, 0.3, 0)
  285. list.ScrollBarThickness = 8
  286. list.BackgroundColor3 = Color3.new(0, 0, 0)
  287.  
  288. local dt_3 = Instance.new("Frame",selector)
  289. dt_3.BorderSizePixel = 0
  290. dt_3.Size = UDim2.new(0.02, 0, 1, 0)
  291. dt_3.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  292. dt_3.Name = "dt"
  293. dt_3.BackgroundTransparency = 0.8
  294. dt_3.BackgroundColor3 = Color3.new(1, 1, 1)
  295.  
  296. local songinfo = Instance.new("Frame",frame)
  297. songinfo.Size = UDim2.new(0.82, 0, 0.6, 0)
  298. songinfo.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  299. songinfo.Name = "songinfo"
  300. songinfo.Position = UDim2.new(1.1, 0, 0.3, 0)
  301. songinfo.BackgroundTransparency = 0.8
  302. songinfo.BackgroundColor3 = Color3.new(0, 0, 0)
  303.  
  304. local dt = Instance.new("Frame",songinfo)
  305. dt.BorderSizePixel = 0
  306. dt.Size = UDim2.new(1, 0, 0.02, 0)
  307. dt.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  308. dt.Name = "dt"
  309. dt.Position = UDim2.new(0, 0, 0.2, 0)
  310. dt.BackgroundTransparency = 0.8
  311. dt.BackgroundColor3 = Color3.new(1, 1, 1)
  312.  
  313. local songnam = Instance.new("TextLabel",songinfo)
  314. songnam.FontSize = Enum.FontSize.Size24
  315. songnam.TextStrokeTransparency = 0
  316. songnam.TextWrapped = true
  317. songnam.BorderSizePixel = 0
  318. songnam.Size = UDim2.new(1, 0, 0.2, 0)
  319. songnam.TextColor3 = Color3.new(1, 1, 1)
  320. songnam.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  321. songnam.Text = "n/a"
  322. songnam.BackgroundTransparency = 1
  323. songnam.Font = Enum.Font.SourceSans
  324. songnam.Name = "songnam"
  325. songnam.TextScaled = true
  326. songnam.BackgroundColor3 = Color3.new(1, 1, 1)
  327.  
  328. local time = Instance.new("Frame",songinfo)
  329. time.BorderSizePixel = 0
  330. time.Size = UDim2.new(0.8, 0, 0.1, 0)
  331. time.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  332. time.Name = "time"
  333. time.Position = UDim2.new(0.1, 0, 0.4, 0)
  334. time.BackgroundTransparency = 0.7
  335. time.BackgroundColor3 = Color3.new(0, 0, 0)
  336. time.ClipsDescendants=true
  337.  
  338. local slider = Instance.new("Frame",time)
  339. slider.BorderSizePixel = 0
  340. slider.Size = UDim2.new(0.955, 0, 0.7, 0)
  341. slider.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  342. slider.Name = "slider"
  343. slider.Position = UDim2.new(0.02, 0, 0.15, 0)
  344. slider.BackgroundTransparency = 0.4
  345. slider.BackgroundColor3 = Color3.new(1, 1, 1)
  346.  
  347. local snglegth = Instance.new("TextLabel",songinfo)
  348. snglegth.FontSize = Enum.FontSize.Size14
  349. snglegth.TextStrokeTransparency = 0
  350. snglegth.Size = UDim2.new(1, 0, 0.63, 0)
  351. snglegth.TextColor3 = Color3.new(1, 1, 1)
  352. snglegth.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  353. snglegth.Text = "0/120"
  354. snglegth.BackgroundTransparency = 1
  355. snglegth.Font = Enum.Font.SourceSans
  356. snglegth.Name = "snglegth"
  357. snglegth.BackgroundColor3 = Color3.new(1, 1, 1)
  358.  
  359. local pitch = Instance.new("TextButton",songinfo)
  360. pitch.FontSize = Enum.FontSize.Size12
  361. pitch.TextStrokeTransparency = 0
  362. pitch.BackgroundTransparency = 0.8
  363. pitch.Position = UDim2.new(0.455, 0, 0.525, 0)
  364. pitch.BorderSizePixel = 0
  365. pitch.Size = UDim2.new(0.25, 0, 0.15, 0)
  366. pitch.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  367. pitch.Text = "Set Pitch"
  368. pitch.Font = Enum.Font.SourceSans
  369. pitch.Name = "pitch"
  370. pitch.TextColor3 = Color3.new(1, 1, 1)
  371. pitch.BackgroundColor3 = Color3.new(0, 0, 0)
  372.  
  373. local play = Instance.new("TextButton",songinfo)
  374. play.FontSize = Enum.FontSize.Size14
  375. play.TextStrokeTransparency = 0
  376. play.BackgroundTransparency = 0.8
  377. play.Position = UDim2.new(0.175, 0, 0.525, 0)
  378. play.BorderSizePixel = 0
  379. play.Size = UDim2.new(0.25, 0, 0.15, 0)
  380. play.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  381. play.Text = "Stop"
  382. play.Font = Enum.Font.SourceSans
  383. play.Name = "play"
  384. play.TextColor3 = Color3.new(1, 1, 1)
  385. play.BackgroundColor3 = Color3.new(0, 0, 0)
  386.  
  387. local pitchn = Instance.new("TextBox",songinfo)
  388. pitchn.FontSize = Enum.FontSize.Size14
  389. pitchn.TextStrokeTransparency = 0
  390. pitchn.BackgroundTransparency = 0.8
  391. pitchn.BorderSizePixel = 0
  392. pitchn.Size = UDim2.new(0.1, 0, 0.15, 0)
  393. pitchn.Position = UDim2.new(0.735, 0, 0.525, 0)
  394. pitchn.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  395. pitchn.Text = "1"
  396. pitchn.TextColor3 = Color3.new(1, 1, 1)
  397. pitchn.Font = Enum.Font.SourceSans
  398. pitchn.Name = "pitchn"
  399. pitchn.BackgroundColor3 = Color3.new(0, 0, 0)
  400.  
  401. local rtr = Instance.new("TextButton",songinfo)
  402. rtr.FontSize = Enum.FontSize.Size14
  403. rtr.TextStrokeTransparency = 0
  404. rtr.BackgroundTransparency = 0.8
  405. rtr.Position = UDim2.new(0.175, 0, 0.7, 0)
  406. rtr.BorderSizePixel = 0
  407. rtr.Size = UDim2.new(0.667, 0, 0.15, 0)
  408. rtr.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  409. rtr.Text = "Return to list"
  410. rtr.Font = Enum.Font.SourceSans
  411. rtr.Name = "rtl"
  412. rtr.TextColor3 = Color3.new(1, 1, 1)
  413. rtr.BackgroundColor3 = Color3.new(0, 0, 0)
  414.  
  415. cpos=0
  416. numt2=1
  417. for i=1,#songs/2 do
  418. local cnumt=numt2+1
  419. local selector = Instance.new("TextButton",list)
  420. selector.FontSize = Enum.FontSize.Size18
  421. selector.TextWrapped = true
  422. selector.TextStrokeTransparency = 0
  423. selector.BackgroundTransparency = 0.8
  424. selector.Position = UDim2.new(0, 3, 0, 3+cpos)
  425. selector.BorderSizePixel = 0
  426. selector.Size = UDim2.new(.93, 0, 0, 30)
  427. selector.Text = songs[numt2]
  428. selector.Font = Enum.Font.SourceSans
  429. selector.Name = songs[numt2].."_selector"
  430. selector.TextColor3 = Color3.new(1, 1, 1)
  431. selector.TextScaled = true
  432. selector.BackgroundColor3 = Color3.new(0, 0, 0)
  433. selector.MouseButton1Click:connect(function()
  434. songinfo:TweenPosition(UDim2.new(.1, 0, 0.3, 0), "Out", "Quad", .2)
  435. list:TweenPosition(UDim2.new(-1, 0, 0.3, 0), "Out", "Quad", .2)
  436. local curp=s.Pitch
  437. s:Destroy()
  438. s = Instance.new("Sound",sp2)
  439. s.Looped=true
  440. s.Pitch=1
  441. s.Name=songs[cnumt-1]
  442. s.SoundId = "http://roblox.com/asset/?id="..songs[cnumt]
  443. wait(.1)
  444. s:Play()
  445. end)
  446. cpos=cpos+35
  447. numt2=numt2+2
  448. end
  449.  
  450. playa=false
  451.  
  452. play.MouseButton1Click:connect(function()
  453. playa=not playa
  454. if playa then
  455. curpi=s.Pitch
  456. play.Text="Play"
  457. for i=1,curpi/.05 do wait() s.Pitch=s.Pitch-.05 end
  458. else
  459. play.Text="Stop"
  460. for i=1,curpi/.05 do wait() s.Pitch=s.Pitch+.05 end
  461. end
  462. end)
  463.  
  464. pitch.MouseButton1Click:connect(function()
  465. s.Pitch=tonumber(pitchn.Text)
  466. end)
  467.  
  468. rtr.MouseButton1Click:connect(function()
  469. songinfo:TweenPosition(UDim2.new(1.1, 0, 0.3, 0), "Out", "Quad", .2)
  470. list:TweenPosition(UDim2.new(.1, 0, 0.3, 0), "Out", "Quad", .2)
  471. end)
  472.  
  473.  
  474. LerpTo = {
  475. Neck = newLerpTo(Neck);
  476. LeftArm = newLerpTo(LeftShoulder);
  477. RightArm = newLerpTo(RightShoulder);
  478. LeftLeg = newLerpTo(LeftHip);
  479. RightLeg = newLerpTo(RightHip);
  480. RootJoint = newLerpTo(RootJoint);
  481. }
  482.  
  483.  
  484. tol.Selected:connect(function(mouse)
  485. equi=true
  486. frame:TweenPosition(UDim2.new(.83, 0, 0.35, 0), "Out", "Quad", .5)
  487. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,0,0)
  488. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(20),0,0)
  489. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(20),0,0)
  490. LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(rad(90),0,rad(10))
  491. LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(rad(90),0,-rad(10))
  492. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.new(0,0,-1.5)
  493. pchar.Humanoid.WalkSpeed=0
  494. for i=1,10 do wait()
  495. for _,v in pairs(mo:GetChildren()) do
  496. if v.ClassName=="Part" then
  497. v.Transparency=v.Transparency-.1
  498. if v==disc then v.Transparency=1 end
  499. end
  500. end
  501. d.Transparency=d.Transparency-.1
  502. end
  503. end)
  504.  
  505. tol.Deselected:connect(function(mouse)
  506. equi=false
  507. for i=1,10 do wait()
  508. for _,v in pairs(mo:GetChildren()) do
  509. if v.ClassName=="Part" then
  510. v.Transparency=v.Transparency+.1
  511. if v==disc then v.Transparency=1 end
  512. end
  513. end
  514. d.Transparency=d.Transparency+.1
  515. end
  516. pchar.Humanoid.WalkSpeed=16
  517. s:Stop()
  518. wait()
  519. frame:TweenPosition(UDim2.new(1.1, 0, 0.35, 0), "Out", "Quad", .5)
  520. songinfo:TweenPosition(UDim2.new(1.1, 0, 0.3, 0), "Out", "Quad", .2)
  521. list:TweenPosition(UDim2.new(.1, 0, 0.3, 0), "Out", "Quad", .2)
  522. end)
  523.  
  524. game:GetService("RunService"):BindToRenderStep("Player",Enum.RenderPriority.Character.Value,function()
  525. songnam.Text=s.Name
  526. snglegth.Text=s.TimePosition.."/"..s.TimeLength
  527. slider.Size = UDim2.new(math.ceil(s.TimePosition)/s.TimeLength, -8, .7, 0)
  528. angle = (angle % 100) + anglespeed/10
  529. if equi==false then
  530. if Vector3.new(torso.Velocity.x, torso.Velocity.y, torso.Velocity.z).magnitude < 2 then
  531. anglespeed = 1/2/2
  532. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.new(0,0,0)
  533. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,0,0)
  534. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(-math.sin(angle)*.1,0,0)
  535. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(math.sin(angle)*.1,0,0)
  536. LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(math.sin(angle)*.1,0,0)
  537. LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(-math.sin(angle)*.1,0,0)
  538. end
  539. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude > 2 then
  540. anglespeed = 4/2
  541. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,0,0)
  542. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.new(0,0,0)
  543. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(-math.sin(angle)*1,0,0)
  544. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(math.sin(angle)*1,0,0)
  545. LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(math.sin(angle)*1,0,0)
  546. LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(-math.sin(angle)*1,0,0)
  547. end
  548. else
  549. local Point = (pchar['Torso'].CFrame*LerpTo.RightArm.Cache):inverse()*CFrame.new((pchar['Torso'].CFrame*LerpTo.RightArm.Cache).p,crank.Position)
  550. local Rel = (pchar['Torso'].CFrame*LerpTo.RightArm.Cache):inverse()*crank.Position
  551. Rel = Rel+Vector3.new(-0.5,0.35,0.95)
  552. local Rel2 = (pchar['Torso'].CFrame*LerpTo.RightArm.Cache):inverse()*(pchar['Right Arm'].Position)
  553. local Vec = Vector3.new(Rel.X-Rel2.X,Rel.Y-Rel2.Y,(Rel.Z-Rel2.Z)*10)
  554. CFr = (Point-Point.p)+Vec
  555. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFr * CFrame.Angles(math.rad(90),0,0)
  556. end
  557. for _,v in pairs(LerpTo) do
  558. v.Weld.C0 = Lerp.CFrame(v.Weld.C0,v.To,v.Speed)
  559. end
  560. discw.C1=discw.C1*CFrame.Angles(0,rad(2*s.Pitch),0)
  561. hnw.C1=hnw.C1*CFrame.Angles(0,rad(2*s.Pitch),0)
  562. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement