Advertisement
jayrock3401

Untitled

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