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