Advertisement
Guest User

Untitled

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