SHOW:
|
|
- or go back to the newest paste.
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 | - | plr = game:service'Players'.LocalPlayer |
78 | + | while wait(1/30) do |
79 | if h~=Mouse.Hit or t~=Mouse.Target then | |
80 | - | mouse = plr:GetMouse() |
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 | do --CFrame lerp (stravant, clerp by AntiBoomz0r) | |
87 | local function QuaternionFromCFrame(cf) | |
88 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
89 | local trace = m00 + m11 + m22 | |
90 | if trace > 0 then | |
91 | local s = math.sqrt(1 + trace) | |
92 | local recip = 0.5/s | |
93 | return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 | |
94 | else | |
95 | local i = 0 | |
96 | if m11 > m00 then | |
97 | i = 1 | |
98 | end | |
99 | if m22 > (i == 0 and m00 or m11) then | |
100 | i = 2 | |
101 | end | |
102 | if i == 0 then | |
103 | local s = math.sqrt(m00-m11-m22+1) | |
104 | local recip = 0.5/s | |
105 | return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip | |
106 | elseif i == 1 then | |
107 | local s = math.sqrt(m11-m22-m00+1) | |
108 | local recip = 0.5/s | |
109 | return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip | |
110 | elseif i == 2 then | |
111 | local s = math.sqrt(m22-m00-m11+1) | |
112 | local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip | |
113 | end | |
114 | end | |
115 | end | |
116 | local function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
117 | local xs, ys, zs = x + x, y + y, z + z | |
118 | local wx, wy, wz = w*xs, w*ys, w*zs | |
119 | local xx = x*xs | |
120 | local xy = x*ys | |
121 | local xz = x*zs | |
122 | local yy = y*ys | |
123 | local yz = y*zs | |
124 | local zz = z*zs | |
125 | return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy)) | |
126 | end | |
127 | function QuaternionSlerp(a, b, t) | |
128 | local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] | |
129 | local startInterp, finishInterp; | |
130 | if cosTheta >= 0.0001 then | |
131 | if (1 - cosTheta) > 0.0001 then | |
132 | local theta = math.acos(cosTheta) | |
133 | local invSinTheta = 1/math.sin(theta) | |
134 | startInterp = math.sin((1-t)*theta)*invSinTheta | |
135 | finishInterp = math.sin(t*theta)*invSinTheta | |
136 | else | |
137 | startInterp = 1-t | |
138 | finishInterp = t | |
139 | end | |
140 | else | |
141 | if (1+cosTheta) > 0.0001 then | |
142 | local theta = math.acos(-cosTheta) | |
143 | local invSinTheta = 1/math.sin(theta) | |
144 | startInterp = math.sin((t-1)*theta)*invSinTheta | |
145 | finishInterp = math.sin(t*theta)*invSinTheta | |
146 | else | |
147 | startInterp = t-1 | |
148 | finishInterp = t | |
149 | end | |
150 | end | |
151 | return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp | |
152 | end | |
153 | function clerp(a,b,t) | |
154 | local qa = {QuaternionFromCFrame(a)} | |
155 | local qb = {QuaternionFromCFrame(b)} | |
156 | local ax, ay, az = a.x, a.y, a.z | |
157 | local bx, by, bz = b.x, b.y, b.z | |
158 | local _t = 1-t | |
159 | return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) | |
160 | end | |
161 | end | |
162 | ||
163 | plr = game:service'Players'.Exodrus227 | |
164 | char = plr.Character | |
165 | humanoid = char:findFirstChild("Humanoid") | |
166 | torso = char:findFirstChild("Torso") | |
167 | head = char.Head | |
168 | ra = char:findFirstChild("Right Arm") | |
169 | la = char:findFirstChild("Left Arm") | |
170 | rl = char:findFirstChild("Right Leg") | |
171 | ll = char:findFirstChild("Left Leg") | |
172 | rs = torso:findFirstChild("Right Shoulder") | |
173 | ls = torso:findFirstChild("Left Shoulder") | |
174 | rh = torso:findFirstChild("Right Hip") | |
175 | lh = torso:findFirstChild("Left Hip") | |
176 | neck = torso:findFirstChild("Neck") | |
177 | rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint") | |
178 | anim = char:findFirstChild("Animate") | |
179 | if anim then | |
180 | anim:Destroy() | |
181 | end | |
182 | rootpart = char:findFirstChild("HumanoidRootPart") | |
183 | camera = workspace.CurrentCamera | |
184 | modelforparts = char:findFirstChild("ModelForParts") or Instance.new("Model", char) | |
185 | modelforparts.Name = "ModelForParts" | |
186 | ||
187 | function trailconnect(obj, wat) | |
188 | local trail = {} | |
189 | for i = 1, 4 do | |
190 | local p = Instance.new("Part") | |
191 | p.Material = "SmoothPlastic" | |
192 | p.BrickColor = obj.BrickColor | |
193 | p.formFactor = "Custom" | |
194 | p.Size = Vector3.new(1,1,1) | |
195 | p.Locked = true | |
196 | p.Anchored = true | |
197 | p.CanCollide = false | |
198 | local mesh = Instance.new("CylinderMesh", p) | |
199 | mesh.Name = "Mesh" | |
200 | table.insert(trail,{p,0}) | |
201 | end | |
202 | local lastpos = obj.Position | |
203 | local updatethis = 0 | |
204 | local dontdothis = false | |
205 | game:service'RunService'.Stepped:connect(function() | |
206 | if wat == true then if dontdothis then return end | |
207 | for i,v in pairs(trail) do | |
208 | game:service'Debris':AddItem(obj, 0) | |
209 | table.remove(v, i) | |
210 | end | |
211 | dontdothis = true | |
212 | return | |
213 | end | |
214 | updatethis = ((updatethis) % 4) + 1 | |
215 | local dstnc = (obj.Position - lastpos).magnitude | |
216 | trail[updatethis][1].Mesh.Scale = Vector3.new(.2,dstnc,.2) | |
217 | trail[updatethis][1].Parent = obj.Parent | |
218 | trail[updatethis][1].CFrame = CFrame.new((obj.Position + lastpos)/2,obj.Position) * CFrame.Angles(math.pi/2, 0, 0) | |
219 | trail[updatethis][2] = 0 | |
220 | for i,v in pairs(trail) do | |
221 | v[2] = v[2] + .15 | |
222 | v[1].Transparency = v[2] | |
223 | end | |
224 | lastpos = obj.Position | |
225 | end) | |
226 | end | |
227 | ||
228 | do --rayCast | |
229 | function rayCast(startpos, Speed, Gravity, Dmg, color) | |
230 | local ran,err = ypcall(function() | |
231 | local rayPart = Instance.new("Part") | |
232 | rayPart.Material = "SmoothPlastic" | |
233 | rayPart.Name = "RayPart" | |
234 | rayPart.BrickColor = BrickColor.new(color) | |
235 | rayPart.Anchored = true | |
236 | rayPart.CanCollide = false | |
237 | rayPart.Locked = true | |
238 | rayPart.FormFactor = "Custom" | |
239 | rayPart.TopSurface = Enum.SurfaceType.Smooth | |
240 | rayPart.BottomSurface = Enum.SurfaceType.Smooth | |
241 | rayPart.Size = Vector3.new(.2, 50, .2) | |
242 | rayPart:breakJoints() | |
243 | Instance.new("CylinderMesh", rayPart) | |
244 | local fire = Instance.new("Fire", rayPart) | |
245 | fire.Color = rayPart.BrickColor.Color | |
246 | fire.SecondaryColor = rayPart.BrickColor.Color | |
247 | fire.Heat = 0 | |
248 | fire.Size = 10 | |
249 | local pl = Instance.new("PointLight", rayPart) | |
250 | pl.Color = Color3.new(rayPart.BrickColor.r/1.5, rayPart.BrickColor.g/1.5, rayPart.BrickColor.b/1.5) | |
251 | pl.Range = 18 | |
252 | ||
253 | local hitobj = false | |
254 | local bulletposition = startpos.Position | |
255 | rayPart.CFrame = startpos.CFrame | |
256 | trailconnect(rayPart, hitobj) | |
257 | ||
258 | local bulletvelocity = (Vector3.new(math.random(-2,2), math.random(-2,2), math.random(-2,2)))+( mouse.Hit.p - bulletposition).unit*Speed | |
259 | local bulletlastposition = bulletposition | |
260 | ||
261 | coroutine.resume(coroutine.create(function() | |
262 | while true do | |
263 | ||
264 | local dt = wait() | |
265 | bulletlastposition = bulletposition | |
266 | bulletvelocity = bulletvelocity + (Vector3.new(0, -3.81*Gravity, 0)*dt) | |
267 | bulletposition = bulletposition + (bulletvelocity*dt) | |
268 | local ray = Ray.new(bulletlastposition, (bulletposition - bulletlastposition)) | |
269 | local hit, hitposition = workspace:FindPartOnRayWithIgnoreList( ray, {char, modelforparts} ) | |
270 | ||
271 | if (torso.Position - rayPart.Position).magnitude > 840 then | |
272 | rayPart:Destroy() | |
273 | hitobj = true | |
274 | break | |
275 | end | |
276 | ||
277 | ||
278 | if hit then | |
279 | hitobj = true | |
280 | local damage = math.random(Dmg, Dmg+6) | |
281 | if hit.Parent:findFirstChild("Humanoid") ~= nil then | |
282 | hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - damage | |
283 | elseif hit.Parent:IsA("Hat") and hit.Parent.Parent:findFirstChild("Humanoid") then | |
284 | hit.Parent.Parent.Humanoid.Health = hit.Parent.Parent.Humanoid.Health - damage | |
285 | end | |
286 | local boom = Instance.new("Part", modelforparts) | |
287 | boom.Material = "SmoothPlastic" | |
288 | boom.BrickColor = rayPart.BrickColor | |
289 | - | plrgui = game:service'Players'.LocalPlayer:findFirstChild("PlayerGui") |
289 | + | |
290 | boom.FormFactor = "Custom" | |
291 | boom.Size = Vector3.new(1,1,1) | |
292 | boom.CanCollide = false | |
293 | boom.Transparency = 0.25 | |
294 | boom.CFrame = CFrame.new(hitposition.x, hitposition.y, hitposition.z) | |
295 | boom.TopSurface = 0 | |
296 | boom.BottomSurface = 0 | |
297 | local sphere = Instance.new("SpecialMesh", boom) | |
298 | sphere.MeshType = "Sphere" | |
299 | local pl = Instance.new("PointLight", boom) | |
300 | pl.Color = Color3.new(boom.BrickColor.r/1.5, boom.BrickColor.g/1.5, boom.BrickColor.b/1.5) | |
301 | pl.Range = 20 | |
302 | for ye = 0, 8 do | |
303 | local lite = Instance.new("Part", boom) | |
304 | lite.Material = "SmoothPlastic" | |
305 | lite.FormFactor = "Custom" | |
306 | lite.Size = Vector3.new(.2, 1.5, .2) | |
307 | lite.BrickColor = boom.BrickColor | |
308 | lite.CanCollide = false | |
309 | lite.TopSurface = 0 | |
310 | lite.Anchored = false | |
311 | lite.BottomSurface = 0 | |
312 | lite.Position = boom.Position + Vector3.new(math.random(-10, 10), math.random(6,15), math.random(-10, 10)) | |
313 | end | |
314 | ||
315 | for i = 0, 20, 2.5 do | |
316 | sphere.Scale = sphere.Scale + Vector3.new(i,i,i) | |
317 | boom.Transparency = boom.Transparency + i/60 | |
318 | pl.Range = pl.Range + i/15 | |
319 | wait() | |
320 | end | |
321 | boom:Destroy() | |
322 | for i,v in pairs(workspace:children()) do | |
323 | if v:IsA("Model") and v:findFirstChild("Humanoid") then | |
324 | if v:findFirstChild("Head") and v:findFirstChild("Torso") then | |
325 | if (v:findFirstChild("Torso").Position - boom.Position).magnitude < 16 and v.Name ~= char.Name then | |
326 | v:findFirstChild("Humanoid"):TakeDamage(math.random(Dmg+2,Dmg+6)) | |
327 | end | |
328 | end | |
329 | end | |
330 | if v and v:IsA("Part") and v.Name ~= "Base" then | |
331 | if (v.Position - boom.Position).magnitude < 16 then | |
332 | v.Material = "SmoothPlastic" | |
333 | v:BreakJoints() | |
334 | v.TopSurface = 10 | |
335 | v.BottomSurface = 10 | |
336 | v.LeftSurface = 10 | |
337 | v.RightSurface = 10 | |
338 | v.FrontSurface = 10 | |
339 | v.BackSurface = 10 | |
340 | v.Anchored = false | |
341 | end | |
342 | end | |
343 | end | |
344 | pcall(function() | |
345 | bulletposition = hitposition | |
346 | rayPart.CFrame = CFrame.new(bulletposition, bulletposition+bulletvelocity) * CFrame.Angles(math.pi/2, 0, 0) | |
347 | rayPart:Destroy() | |
348 | end) | |
349 | break | |
350 | end | |
351 | rayPart.CFrame = CFrame.new(bulletposition, bulletposition+bulletvelocity) * CFrame.Angles(math.pi/2, 0, 0) | |
352 | rayPart.Parent = modelforparts | |
353 | end | |
354 | end)) | |
355 | for i = 70, 65, -1.5 do | |
356 | camera.FieldOfView = i | |
357 | wait() | |
358 | end | |
359 | for i = 65, 70, 2.5 do | |
360 | camera.FieldOfView = i | |
361 | wait() | |
362 | end | |
363 | end) | |
364 | if err then | |
365 | print(err) | |
366 | end | |
367 | end | |
368 | end | |
369 | ||
370 | ||
371 | charge = 100 | |
372 | ||
373 | plrgui = game:service'Players'.Exodrus227:findFirstChild("PlayerGui") | |
374 | ||
375 | local statusgui = Instance.new("ScreenGui", plrgui) | |
376 | local mainframe = Instance.new("Frame", statusgui) | |
377 | mainframe.Size = UDim2.new(0, 200, 0, 200) | |
378 | mainframe.Position = UDim2.new(.75, 0, .75, 0) | |
379 | mainframe.Style = 3 | |
380 | local image = Instance.new("ImageLabel", mainframe) | |
381 | image.Size = UDim2.new(1, 0, .47, 0) | |
382 | image.Position = UDim2.new(0, 0, .235, 0) | |
383 | image.BackgroundTransparency = 1 | |
384 | image.Image = "rbxassetid://145057975" | |
385 | local chargetext = Instance.new("TextLabel", mainframe) | |
386 | chargetext.FontSize = "Size18" | |
387 | chargetext.Size = UDim2.new(1, 0, .95, 0) | |
388 | chargetext.TextYAlignment = "Bottom" | |
389 | chargetext.BackgroundTransparency = 1 | |
390 | chargetext.TextColor3 = Color3.new(1,1,1) | |
391 | game:service'RunService'.Stepped:connect(function() | |
392 | chargetext.Text = math.floor(charge).."%" | |
393 | end) | |
394 | ||
395 | ||
396 | ||
397 | local rm = Instance.new("Weld", torso) | |
398 | rm.C0 = CFrame.new(1.5, 0.5, 0) | |
399 | rm.C1 = CFrame.new(0, 0.5, 0) | |
400 | rm.Part0 = torso | |
401 | rm.Part1 = ra | |
402 | local lm = Instance.new("Weld", torso) | |
403 | lm.C0 = CFrame.new(-1.5, 0.5, 0) | |
404 | lm.C1 = CFrame.new(0, 0.5, 0) | |
405 | lm.Part0 = torso | |
406 | lm.Part1 = la | |
407 | ||
408 | sound = Instance.new("Sound", head) | |
409 | sound.Volume = 1 | |
410 | sound.SoundId = "rbxassetid://130768080" | |
411 | sound.Looped = true | |
412 | ||
413 | ||
414 | dancemode = true | |
415 | debounceofsprint = false | |
416 | ||
417 | --create func | |
418 | function part(parent, size, color, formfactor, collide, transparency) | |
419 | if transparency == nil then transparency=0 end | |
420 | if collide == nil then collide=false end | |
421 | if formfactor == nil then formfactor="Custom" end | |
422 | local p = Instance.new("Part", parent) | |
423 | p.FormFactor = formfactor | |
424 | p.CanCollide = collide | |
425 | p.Size = size | |
426 | p.Locked = true | |
427 | p.Transparency = transparency | |
428 | p.Position = torso.Position + Vector3.new(0, 1, 0) | |
429 | p.BrickColor = color | |
430 | p.FrontSurface = "SmoothNoOutlines" | |
431 | p.BackSurface = "SmoothNoOutlines" | |
432 | p.LeftSurface = "SmoothNoOutlines" | |
433 | p.BottomSurface = "SmoothNoOutlines" | |
434 | p.TopSurface = "SmoothNoOutlines" | |
435 | p.RightSurface = "SmoothNoOutlines" | |
436 | return p | |
437 | end | |
438 | function wedge(parent, size, color, formfactor, collide, transparency) | |
439 | if transparency==nil then transparency=0 end | |
440 | if collide==nil then collide=false end | |
441 | if formfactor==nil then formfactor="Custom" end | |
442 | local p = Instance.new("WedgePart", parent) | |
443 | p.FormFactor = formfactor | |
444 | p.CanCollide = collide | |
445 | p.Size = size | |
446 | p.Locked = true | |
447 | p.Position = torso.Position | |
448 | p.BrickColor = color | |
449 | p.FrontSurface = "SmoothNoOutlines" | |
450 | p.BackSurface = "SmoothNoOutlines" | |
451 | p.LeftSurface = "SmoothNoOutlines" | |
452 | p.BottomSurface = "SmoothNoOutlines" | |
453 | p.TopSurface = "SmoothNoOutlines" | |
454 | p.RightSurface = "SmoothNoOutlines" | |
455 | return p | |
456 | end | |
457 | function weld(part0, part1, c0, parent, c1) | |
458 | if parent == nil then parent=char end | |
459 | if c1 == nil then c1=CFrame.new() end | |
460 | ||
461 | local wel = Instance.new("Weld", parent) | |
462 | wel.Part0 = part0 | |
463 | wel.Part1 = part1 | |
464 | wel.C0 = c0 | |
465 | wel.C1 = c1 | |
466 | return wel | |
467 | end | |
468 | function specialmesh(parent, meshType, scale, meshId) | |
469 | if meshId==nil then meshId="" end | |
470 | local mesh = Instance.new("SpecialMesh", parent) | |
471 | mesh.Scale = scale | |
472 | mesh.MeshType = meshType | |
473 | mesh.MeshId = meshId | |
474 | return mesh | |
475 | end | |
476 | ---------------------------------------------------------------------------------------------------------- | |
477 | --function part(parent, size, color, formfactor, collide, transparency) | |
478 | --function weld(part0, part1, c0, parent, c1) | |
479 | ||
480 | ---------------------------------------------------------------------------------------------------------- | |
481 | function animatehuman(animationid, object) | |
482 | local animation = object:findFirstChild("Humanoid"):LoadAnimation(animationid) | |
483 | animation:Play() | |
484 | end | |
485 | local danceAnim = Instance.new("Animation", char) | |
486 | danceAnim.AnimationId = "http://www.roblox.com/asset/?id=130018893" | |
487 | danceAnim.Name = "DancingAnimation" | |
488 | ---------------------------------------------------------------------------------------------------------- | |
489 | local main = Instance.new("Part", char) | |
490 | main.FormFactor = "Custom" | |
491 | main.CanCollide = false | |
492 | main.Size = Vector3.new(.75, 1, 1.2) | |
493 | main.Locked = true | |
494 | main.BrickColor = BrickColor.new("Institutional white") | |
495 | main.TopSurface = 0 | |
496 | main.BottomSurface = 0 | |
497 | main.Position = torso.Position | |
498 | main:BreakJoints() | |
499 | local weld1 = weld(main, ra, CFrame.new(), char, CFrame.new(0, -.8, -.6)) | |
500 | local speaker = Instance.new("Part", char) | |
501 | speaker.FormFactor = "Custom" | |
502 | speaker.CanCollide = false | |
503 | speaker.Size = Vector3.new(1.5, .25, 1.4) | |
504 | speaker.Locked = true | |
505 | speaker.BrickColor = BrickColor.new("Institutional white") | |
506 | speaker.TopSurface = 0 | |
507 | speaker.BottomSurface = 0 | |
508 | speaker.Position = torso.Position | |
509 | speaker:BreakJoints() | |
510 | local weld2 = weld(speaker, main, CFrame.new(), char, CFrame.new(-.25, -1.7, .6)) | |
511 | local speaker2 = Instance.new("Part", char) | |
512 | speaker2.FormFactor = "Custom" | |
513 | speaker2.CanCollide = false | |
514 | speaker2.Size = Vector3.new(1, .25, 2) | |
515 | speaker2.Locked = true | |
516 | speaker2.BrickColor = BrickColor.new("Institutional white") | |
517 | speaker2.TopSurface = 0 | |
518 | speaker2.BottomSurface = 0 | |
519 | speaker2.Position = torso.Position | |
520 | speaker2:BreakJoints() | |
521 | local weld3 = weld(speaker2, main, CFrame.new(), char, CFrame.new(0, -1.7, -.2)) | |
522 | local main2 = Instance.new("Part", char) | |
523 | main2.FormFactor = "Custom" | |
524 | main2.CanCollide = false | |
525 | main2.Size = Vector3.new(.751, 1, .6) | |
526 | main2.Locked = true | |
527 | main2.BrickColor = BrickColor.new("Institutional white") | |
528 | main2.TopSurface = 0 | |
529 | main2.BottomSurface = 0 | |
530 | main2.Position = torso.Position | |
531 | main2:BreakJoints() | |
532 | local weld4 = weld(main2, ra, CFrame.new(), char, CFrame.new(0, 0, -.9)) | |
533 | local main3 = Instance.new("Part", char) | |
534 | main3.FormFactor = "Custom" | |
535 | main3.CanCollide = false | |
536 | main3.Size = Vector3.new(.751, 1.45, 1) | |
537 | main3.Locked = true | |
538 | main3.BrickColor = BrickColor.new("Institutional white") | |
539 | main3.TopSurface = 0 | |
540 | main3.BottomSurface = 0 | |
541 | main3.Position = torso.Position | |
542 | main3:BreakJoints() | |
543 | local weld5 = weld(main3, ra, CFrame.new(), char, CFrame.new(0, -1.6, -.9)) | |
544 | local main4 = Instance.new("Part", char) | |
545 | main4.FormFactor = "Custom" | |
546 | main4.CanCollide = false | |
547 | main4.Size = Vector3.new(1, .76, 1) | |
548 | Instance.new("CylinderMesh", main4) | |
549 | main4.Locked = true | |
550 | main4.BrickColor = BrickColor.new("Institutional white") | |
551 | main4.TopSurface = 0 | |
552 | main4.BottomSurface = 0 | |
553 | main4.Position = torso.Position | |
554 | main4:BreakJoints() | |
555 | local weld6 = weld(main4, main, CFrame.new(), char, CFrame.new(0, -.15, -.5)*CFrame.Angles(math.pi/2, 0, math.pi/2)) | |
556 | local speaker3 = Instance.new("Part", char) | |
557 | speaker3.FormFactor = "Custom" | |
558 | speaker3.CanCollide = false | |
559 | speaker3.Size = Vector3.new(1.5, .5, 1.4) | |
560 | speaker3.Locked = true | |
561 | speaker3.BrickColor = BrickColor.new("Institutional white") | |
562 | speaker3.TopSurface = 0 | |
563 | speaker3.BottomSurface = 0 | |
564 | speaker3.Position = torso.Position | |
565 | speaker3:BreakJoints() | |
566 | local welds1 = weld(speaker3, main, CFrame.new(), char, CFrame.new(-.25, -2.2, .6)) | |
567 | local speaker4 = Instance.new("Part", char) | |
568 | speaker4.FormFactor = "Custom" | |
569 | speaker4.CanCollide = false | |
570 | speaker4.Size = Vector3.new(1, .5, 2) | |
571 | speaker4.Locked = true | |
572 | speaker4.BrickColor = BrickColor.new("Institutional white") | |
573 | speaker4.TopSurface = 0 | |
574 | speaker4.BottomSurface = 0 | |
575 | speaker4.Position = torso.Position | |
576 | speaker4:BreakJoints() | |
577 | local welds2 = weld(speaker4, main, CFrame.new(), char, CFrame.new(0, -2.205, -.2)) | |
578 | local speaker5 = Instance.new("Part", char) | |
579 | speaker5.FormFactor = "Custom" | |
580 | speaker5.CanCollide = false | |
581 | speaker5.Size = Vector3.new(1.4, .4, 1.3) | |
582 | speaker5.Locked = true | |
583 | speaker5.BrickColor = BrickColor.new("Institutional white") | |
584 | speaker5.TopSurface = 0 | |
585 | speaker5.BottomSurface = 0 | |
586 | speaker5.Position = torso.Position | |
587 | speaker5:BreakJoints() | |
588 | local welds3 = weld(speaker5, main, CFrame.new(), char, CFrame.new(-.25, -2, .6)) | |
589 | local speaker6 = Instance.new("Part", char) | |
590 | speaker6.FormFactor = "Custom" | |
591 | speaker6.CanCollide = false | |
592 | speaker6.Size = Vector3.new(.9, .4, 1.9) | |
593 | speaker6.Locked = true | |
594 | speaker6.BrickColor = BrickColor.new("Institutional white") | |
595 | speaker6.TopSurface = 0 | |
596 | speaker6.BottomSurface = 0 | |
597 | speaker6.Position = torso.Position | |
598 | speaker6:BreakJoints() | |
599 | local welds4 = weld(speaker6, main, CFrame.new(), char, CFrame.new(0, -2, -.2)) | |
600 | ||
601 | local support = Instance.new("Part", char) | |
602 | support.FormFactor = "Custom" | |
603 | support.CanCollide = false | |
604 | support.Size = Vector3.new(.3, .4, .6) | |
605 | support.Locked = true | |
606 | support.BrickColor = BrickColor.new("Institutional white") | |
607 | support.TopSurface = 0 | |
608 | support.BottomSurface = 0 | |
609 | support.Position = torso.Position | |
610 | support:BreakJoints() | |
611 | local welds5 = weld(support, main, CFrame.new(), char, CFrame.new(0, -1.5, -.4)) | |
612 | ||
613 | ||
614 | debounce = false | |
615 | ||
616 | function stopsound() | |
617 | if debounce then return end | |
618 | if not sound.IsPlaying then return end | |
619 | sound:stop() | |
620 | debounce = true | |
621 | local dancebro = Instance.new("StringValue", game:service'Lighting') | |
622 | dancebro.Name = ('STOPDANCING'..plr.Name) | |
623 | game:service'Debris':AddItem(dancebro, 1) | |
624 | coroutine.wrap(function() | |
625 | while not sound.IsPlaying do | |
626 | if charge <= 100 then | |
627 | charge = charge + .1 | |
628 | wait() | |
629 | elseif charge > 100 then | |
630 | charge = 100 | |
631 | break | |
632 | end | |
633 | end | |
634 | end)() | |
635 | wait(.1) | |
636 | debounce = false | |
637 | end | |
638 | mouse.Button1Down:connect(function(mous) | |
639 | if debounceofsprint then return end | |
640 | if sound.IsPlaying then return end | |
641 | if debounce then return end | |
642 | sound:play() | |
643 | for i = 70, 55, -.35 do | |
644 | if not sound.IsPlaying then debounce = true camera.FieldOfView = 70 return end | |
645 | camera.FieldOfView = i | |
646 | wait() | |
647 | end | |
648 | for i = 65, 70, 2.5 do | |
649 | if not sound.IsPlaying then debounce = true camera.FieldOfView = 70 return end | |
650 | camera.FieldOfView = i | |
651 | wait() | |
652 | end | |
653 | if debounce then debounce = false return end | |
654 | if dancemode then | |
655 | for i,v in pairs(workspace:children()) do | |
656 | if not sound.IsPlaying then break end | |
657 | coroutine.wrap(function() | |
658 | if v:IsA("Model") and v:findFirstChild("Humanoid") and v.Name ~= char.Name and v:findFirstChild("ModelForParts") == nil and v:findFirstChild("Torso") and (v:findFirstChild("Torso").Position - head.Position).magnitude < 30 then | |
659 | danceAnimClone = danceAnim:clone() | |
660 | danceAnimClone.Parent = v | |
661 | danceAnimClone.AnimationId = "http://www.roblox.com/asset/?id=130018893" | |
662 | wait() | |
663 | NLS([[ | |
664 | function animatehuman(animationid, object) | |
665 | local animation = object:findFirstChild("Humanoid"):LoadAnimation(animationid) | |
666 | animation:Play() | |
667 | end | |
668 | while wait(.5) do | |
669 | if game:service'Lighting':findFirstChild("STOPDANCING]]..plr.Name..[[") and game:service'Lighting':findFirstChild("STOPDANCING]]..plr.Name..[["):IsA("StringValue") then game:service'Debris':AddItem(script.Parent:findFirstChild("DancingAnimation"), 5) break end | |
670 | animatehuman(script.Parent:findFirstChild("DancingAnimation"), script.Parent) | |
671 | end | |
672 | ]], v) | |
673 | end | |
674 | end)() | |
675 | end | |
676 | end | |
677 | coroutine.wrap(function() | |
678 | while sound.IsPlaying do | |
679 | if charge <= 1 then | |
680 | if debounce then break end | |
681 | if not sound.IsPlaying then break end | |
682 | sound:stop() | |
683 | debounce = true | |
684 | chargetext.TextColor3 = Color3.new(1,0,0) | |
685 | dancebro = Instance.new("StringValue", game:service'Lighting') | |
686 | dancebro.Name = ('STOPDANCING'..plr.Name) | |
687 | game:service'Debris':AddItem(dancebro, 1) | |
688 | coroutine.wrap(function() | |
689 | repeat wait() until charge >= 10 | |
690 | debounce = false | |
691 | chargetext.TextColor3 = Color3.new(1,1,1) | |
692 | end)() | |
693 | coroutine.wrap(function() | |
694 | while not sound.IsPlaying do | |
695 | if charge <= 100 then | |
696 | charge = charge + .1 | |
697 | wait() | |
698 | elseif charge > 100 then | |
699 | charge = 100 | |
700 | break | |
701 | end | |
702 | end | |
703 | end)() | |
704 | else | |
705 | charge = charge - .08 | |
706 | wait() | |
707 | end | |
708 | end | |
709 | end)() | |
710 | coroutine.wrap(function() | |
711 | local ran,err = ypcall(function() | |
712 | while sound.IsPlaying and Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 20 do | |
713 | if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then stopsound() break end | |
714 | if not sound.IsPlaying then break end | |
715 | rayCast(speaker, 1250, 0, 5, "Lavender") | |
716 | wait(.35) | |
717 | if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then stopsound() break end | |
718 | if not sound.IsPlaying then break end | |
719 | rayCast(speaker, 1250, 0, 5, "Pink") | |
720 | wait(.95) | |
721 | if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then stopsound() break end | |
722 | if not sound.IsPlaying then break end | |
723 | rayCast(speaker, 1250, 0, 5, "Bright bluish green") | |
724 | wait(.55) | |
725 | if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then stopsound() break end | |
726 | if not sound.IsPlaying then break end | |
727 | rayCast(speaker, 1250, 0, 5, "Pink") | |
728 | wait(.4) | |
729 | if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then stopsound() break end | |
730 | if not sound.IsPlaying then break end | |
731 | rayCast(speaker, 1250, 0, 5, "Bright bluish green") | |
732 | local pl = Instance.new("PointLight", torso) | |
733 | pl.Color = Color3.new(153/255/1.25, 102/255/1.25, 204/255/1.25) | |
734 | pl.Range = 30 | |
735 | pl.Brightness = 0.7 | |
736 | game:service'Debris':AddItem(pl, .3) | |
737 | wait(.45) | |
738 | if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then stopsound() break end | |
739 | if not sound.IsPlaying then break end | |
740 | rayCast(speaker, 1250, 0, 5, "Lavender") | |
741 | wait(.75) | |
742 | end | |
743 | end) if err then print(err) end | |
744 | end)() | |
745 | end) | |
746 | ||
747 | mouse.Button1Up:connect(function(mous) | |
748 | stopsound() | |
749 | end) | |
750 | ctrl = false | |
751 | mouse.KeyDown:connect(function(k) | |
752 | if string.byte(k) == 50 then | |
753 | ctrl = true | |
754 | humanoid.WalkSpeed = 8 | |
755 | end | |
756 | if string.byte(k) == 48 then | |
757 | humanoid.WalkSpeed = 28 | |
758 | end | |
759 | end) | |
760 | ||
761 | mouse.KeyUp:connect(function(k) | |
762 | if string.byte(k) == 50 then | |
763 | ctrl = false | |
764 | humanoid.WalkSpeed = 16 | |
765 | end | |
766 | if string.byte(k) == 48 then | |
767 | humanoid.WalkSpeed = 16 | |
768 | if ctrl then | |
769 | humanoid.WalkSpeed = 8 | |
770 | end | |
771 | end | |
772 | end) | |
773 | ||
774 | humanoid.Died:connect(function() | |
775 | deathpos = torso.Position | |
776 | WorkModel = Instance.new("Model", workspace) | |
777 | WorkModel.Name = " " | |
778 | wait(1/60) | |
779 | humanoid.Parent = nil | |
780 | if torso then | |
781 | local Head = char:FindFirstChild("Head") | |
782 | if Head then | |
783 | local Neck = Instance.new("Weld") | |
784 | Neck.Name = "Neck" | |
785 | Neck.Part0 = torso | |
786 | Neck.Part1 = Head | |
787 | Neck.C0 = CFrame.new(0, 1.5, 0) | |
788 | Neck.C1 = CFrame.new() | |
789 | Neck.Parent = torso | |
790 | end | |
791 | local Limb = char:FindFirstChild("Right Arm") | |
792 | if Limb then | |
793 | ||
794 | Limb.CFrame = torso.CFrame * CFrame.new(1.5, 0, 0) | |
795 | local Joint = Instance.new("Glue") | |
796 | Joint.Name = "RightShoulder" | |
797 | Joint.Part0 = torso | |
798 | Joint.Part1 = Limb | |
799 | Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
800 | Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
801 | Joint.Parent = torso | |
802 | ||
803 | local B = Instance.new("Part") | |
804 | B.TopSurface = 0 | |
805 | B.BottomSurface = 0 | |
806 | B.formFactor = "Symmetric" | |
807 | B.Size = Vector3.new(1, 1, 1) | |
808 | B.Transparency = 1 | |
809 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
810 | B.Parent = char | |
811 | B.CanCollide = false | |
812 | local W = Instance.new("Weld") | |
813 | W.Part0 = Limb | |
814 | W.Part1 = B | |
815 | W.C0 = CFrame.new(0, -0.5, 0) | |
816 | W.Parent = Limb | |
817 | ||
818 | end | |
819 | local Limb = char:FindFirstChild("Left Arm") | |
820 | if Limb then | |
821 | ||
822 | Limb.CFrame = torso.CFrame * CFrame.new(-1.5, 0, 0) | |
823 | local Joint = Instance.new("Glue") | |
824 | Joint.Name = "LeftShoulder" | |
825 | Joint.Part0 = torso | |
826 | Joint.Part1 = Limb | |
827 | Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
828 | Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
829 | Joint.Parent = torso | |
830 | ||
831 | local B = Instance.new("Part") | |
832 | B.TopSurface = 0 | |
833 | B.BottomSurface = 0 | |
834 | B.formFactor = "Symmetric" | |
835 | B.Size = Vector3.new(1, 1, 1) | |
836 | B.Transparency = 1 | |
837 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
838 | B.Parent = char | |
839 | B.CanCollide = false | |
840 | local W = Instance.new("Weld") | |
841 | W.Part0 = Limb | |
842 | W.Part1 = B | |
843 | W.C0 = CFrame.new(0, -0.5, 0) | |
844 | W.Parent = Limb | |
845 | ||
846 | end | |
847 | local Limb = char:FindFirstChild("Right Leg") | |
848 | if Limb then | |
849 | ||
850 | Limb.CFrame = torso.CFrame * CFrame.new(0.5, -2, 0) | |
851 | local Joint = Instance.new("Glue") | |
852 | Joint.Name = "RightHip" | |
853 | Joint.Part0 = torso | |
854 | Joint.Part1 = Limb | |
855 | Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
856 | Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
857 | Joint.Parent = torso | |
858 | ||
859 | local B = Instance.new("Part") | |
860 | B.TopSurface = 0 | |
861 | B.BottomSurface = 0 | |
862 | B.formFactor = "Symmetric" | |
863 | B.Size = Vector3.new(1, 1, 1) | |
864 | B.Transparency = 1 | |
865 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
866 | B.Parent = char | |
867 | B.CanCollide = false | |
868 | local W = Instance.new("Weld") | |
869 | W.Part0 = Limb | |
870 | W.Part1 = B | |
871 | W.C0 = CFrame.new(0, -0.5, 0) | |
872 | W.Parent = Limb | |
873 | ||
874 | end | |
875 | local Limb = char:FindFirstChild("Left Leg") | |
876 | if Limb then | |
877 | ||
878 | Limb.CFrame = torso.CFrame * CFrame.new(-0.5, -2, 0) | |
879 | local Joint = Instance.new("Glue") | |
880 | - | game:service'RunService'.RenderStepped:connect(function() |
880 | + | |
881 | Joint.Part0 = torso | |
882 | Joint.Part1 = Limb | |
883 | Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
884 | Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
885 | Joint.Parent = torso | |
886 | ||
887 | local B = Instance.new("Part") | |
888 | B.TopSurface = 0 | |
889 | B.BottomSurface = 0 | |
890 | B.formFactor = "Symmetric" | |
891 | B.Size = Vector3.new(1, 1, 1) | |
892 | B.Transparency = 1 | |
893 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
894 | B.Parent = char | |
895 | B.CanCollide = false | |
896 | local W = Instance.new("Weld") | |
897 | W.Part0 = Limb | |
898 | W.Part1 = B | |
899 | W.C0 = CFrame.new(0, -0.5, 0) | |
900 | W.Parent = Limb | |
901 | end | |
902 | for blood = 0, 3 do | |
903 | local blood = Instance.new("Part", workspace) | |
904 | blood.BrickColor = BrickColor.Red() | |
905 | blood.FormFactor = "Custom" | |
906 | blood.Size = Vector3.new(.2,.2,.2) | |
907 | blood.Anchored = true | |
908 | blood.TopSurface = "Smooth" | |
909 | blood.BackSurface = "Smooth" | |
910 | local bloodmesh = Instance.new("CylinderMesh", blood) | |
911 | bloodmesh.Scale = Vector3.new(3, 0, 3) | |
912 | local rayzb = Ray.new(torso.Position, Vector3.new(0, -20, 0) + Vector3.new(math.random(-2, 2), 0, math.random(-2, 2))) | |
913 | local hitzb, hitposb = workspace:findPartOnRay(rayzb, char) | |
914 | if hitzb then | |
915 | blood.CFrame = CFrame.new(hitposb.x,hitposb.y,hitposb.z) | |
916 | blood.CFrame = blood.CFrame * CFrame.new(0, .05, 0) | |
917 | coroutine.wrap(function() | |
918 | for cframe = 0, math.random(16, 24) do | |
919 | bloodmesh.Scale = bloodmesh.Scale + Vector3.new(.45, 0, .45) | |
920 | wait() | |
921 | end | |
922 | end)() | |
923 | elseif not hitzb then | |
924 | blood:Destroy() | |
925 | end | |
926 | end | |
927 | local BP = Instance.new("BodyPosition", torso) | |
928 | BP.maxForce = Vector3.new(1,1,1)/0 | |
929 | BP.position = deathpos | |
930 | for i,v in pairs(char:children()) do | |
931 | if v:IsA("Part") then v.Parent = WorkModel end | |
932 | end | |
933 | wait(.3) | |
934 | BP:Destroy() | |
935 | end | |
936 | end) | |
937 | ||
938 | local rlegm = Instance.new("Motor", torso) | |
939 | rlegm.C0 = CFrame.new(0.5, -1, 0) | |
940 | rlegm.C1 = CFrame.new(0, 1, 0) | |
941 | rlegm.Part0 = torso | |
942 | rlegm.Part1 = rl | |
943 | rlegm.Name = "Right Hip" | |
944 | local llegm = Instance.new("Motor", torso) | |
945 | llegm.C0 = CFrame.new(-0.5, -1, 0) | |
946 | llegm.C1 = CFrame.new(0, 1, 0) | |
947 | llegm.Part0 = torso | |
948 | llegm.Part1 = ll | |
949 | llegm.Name = "Left Hip" | |
950 | neck.C0 = CFrame.new(0, 1, 0) | |
951 | neck.C1 = CFrame.new(0, -0.5, 0) | |
952 | rj.C0 = CFrame.new(0, -1, 0) | |
953 | rj.C1 = CFrame.new(0, -1, 0) | |
954 | rsc0 = rm.C0 | |
955 | lsc0 = lm.C0 | |
956 | neckc0 = neck.C0 | |
957 | rootc0 = rj.C0 | |
958 | llc0 = llegm.C0 | |
959 | rlc0 = rlegm.C0 | |
960 | speed = 0.4 | |
961 | angle = 0 | |
962 | anglespeed = 0 | |
963 | mvmnt = 0 | |
964 | game:service'RunService'.Stepped:connect(function() | |
965 | angle = (angle % 100) + anglespeed/10 | |
966 | mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10)) | |
967 | local rscf = rsc0 | |
968 | local lscf = lsc0 | |
969 | local rlcf = rlc0 | |
970 | local llcf = llc0 | |
971 | local rjcf = rootc0 | |
972 | local ncf = neckc0 | |
973 | local rayz = Ray.new(rootpart.Position, Vector3.new(0, -4.1, 0)) | |
974 | local hitz, enz = workspace:findPartOnRay(rayz, char) | |
975 | --math.asin(mouse.UnitRay.Direction.y) | |
976 | ncf = neckc0 * CFrame.Angles(camera.CoordinateFrame.lookVector.y, 0, 0) | |
977 | rscf = rsc0 * CFrame.new(-.55, 0, .35) * CFrame.Angles(camera.CoordinateFrame.lookVector.y+math.pi/2, 0, 0) | |
978 | lscf = lsc0 * CFrame.new(.85, 0, -.65) * CFrame.Angles(camera.CoordinateFrame.lookVector.y+math.pi/2, 0, math.rad(45)) | |
979 | if not hitz then | |
980 | ncf = neckc0 * CFrame.Angles(math.pi/18, 0, 0) | |
981 | rscf = rsc0 * CFrame.new(-.45, 0, -.75) * CFrame.Angles(math.pi/5+math.pi/18, 0, math.rad(-70)) | |
982 | lscf = lsc0 * CFrame.new(.35, 0, 0) * CFrame.Angles(math.pi/3.5+math.pi/18, 0, 0) | |
983 | rjcf = rootc0 * CFrame.Angles(-math.pi/32, 0, 0) | |
984 | rlcf = rlc0 * CFrame.new(0, 0.7, -0.5) * CFrame.Angles(-math.pi/14, 0, 0) | |
985 | llcf = llc0 * CFrame.Angles(-math.pi/20, 0, 0) | |
986 | elseif humanoid.Sit then | |
987 | ncf = neckc0 * CFrame.Angles(0, 0, 0) | |
988 | rjcf = rootc0 * CFrame.new(0, -.2, 0) | |
989 | rlcf = rlc0 * CFrame.Angles(math.pi/2, 0, math.rad(7.5)) | |
990 | llcf = llc0 * CFrame.Angles(math.pi/2, 0, -math.rad(7.5)) | |
991 | if sprinting then | |
992 | debounceofsprint = false | |
993 | sprinting = false | |
994 | end | |
995 | elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 2 then | |
996 | speed = 0.3 | |
997 | if ctrl then | |
998 | rjcf = rootc0 * CFrame.new(0, -1.25, 0) | |
999 | llcf = llc0 * CFrame.new(0, 0, -.45) * CFrame.Angles(-math.pi/2.2, 0, 0) | |
1000 | rlcf = rlcf * CFrame.new(0, 1.25, -.85) | |
1001 | else | |
1002 | rjcf = rootc0 | |
1003 | rlcf = rlc0 * CFrame.Angles(-math.rad(.5), 0, math.rad(1.5)) | |
1004 | llcf = llc0 * CFrame.Angles(math.rad(1.5), 0, -math.rad(1.5)) | |
1005 | end | |
1006 | elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 20 then | |
1007 | if not humanoid.Sit then | |
1008 | anglespeed = 3 | |
1009 | if ctrl then | |
1010 | anglespeed = 3 | |
1011 | ncf = neckc0 * CFrame.Angles(camera.CoordinateFrame.lookVector.y+math.pi/18, 0, 0) | |
1012 | rjcf = rootc0 * CFrame.new(0, -.35, 0) * CFrame.Angles(-math.pi/18, 0, 0) | |
1013 | rscf = rsc0 * CFrame.new(-.55, 0, .35) * CFrame.Angles(camera.CoordinateFrame.lookVector.y+math.pi/2+math.pi/18, 0, 0) | |
1014 | lscf = lsc0 * CFrame.new(.85, 0, -.65) * CFrame.Angles(camera.CoordinateFrame.lookVector.y+math.pi/2+math.pi/18, 0, math.rad(45)) | |
1015 | llcf = llc0 * CFrame.new(0, .45, -.35) * CFrame.Angles(math.pi/18 - math.sin(angle)*.45, 0, 0) | |
1016 | rlcf = rlcf * CFrame.new(0, .45, -.35) * CFrame.Angles(math.pi/18 + math.sin(angle)*.45, 0, 0) | |
1017 | else | |
1018 | rjcf = rootc0 | |
1019 | rlcf = rlc0 * CFrame.Angles(math.sin(-angle)*.65, 0, math.rad(.5)) | |
1020 | llcf = llc0 * CFrame.Angles(math.sin(angle)*.65, 0, -math.rad(.5)) | |
1021 | end | |
1022 | if sprinting then | |
1023 | debounceofsprint = false | |
1024 | sprinting = false | |
1025 | end | |
1026 | end | |
1027 | elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then | |
1028 | if not humanoid.Sit then | |
1029 | anglespeed = 3 | |
1030 | ncf = neckc0 * CFrame.Angles(math.pi/18, 0, 0) | |
1031 | rscf = rsc0 * CFrame.new(-.45, 0, -.75) * CFrame.Angles(math.pi/5+math.pi/18, 0, math.rad(-70)) | |
1032 | lscf = lsc0 * CFrame.new(.35, 0, 0) * CFrame.Angles(math.pi/3.5+math.pi/18, 0, 0) | |
1033 | rjcf = rootc0 * CFrame.new(0, 0, 0) * CFrame.Angles(-math.pi/18, math.sin(angle)*.1, math.sin(angle)*.045) | |
1034 | rlcf = rlc0 * CFrame.new(0, 0, -.6+math.abs(mvmnt)*0.125) * CFrame.Angles(-math.pi/18+math.sin(-angle)*1.3, 0, math.rad(.5)) | |
1035 | llcf = llc0 * CFrame.new(0, 0, -math.abs(mvmnt)*0.125) * CFrame.Angles(-math.pi/18+math.sin(angle)*1.3, 0, -math.rad(.5)) | |
1036 | sprinting = true | |
1037 | debounceofsprint = true | |
1038 | end | |
1039 | end | |
1040 | rm.C0 = clerp(rm.C0,rscf,speed) | |
1041 | lm.C0 = clerp(lm.C0,lscf,speed) | |
1042 | rj.C0 = clerp(rj.C0,rjcf,speed) | |
1043 | rlegm.C0 = clerp(rlegm.C0,rlcf,speed) | |
1044 | llegm.C0 = clerp(llegm.C0,llcf,speed) | |
1045 | neck.C0 = clerp(neck.C0,ncf,speed) | |
1046 | end) |