Advertisement
Guest User

Untitled

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