duplicat

GRAMOPHONE

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