GalaxyDelta

Untitled

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