· 6 years ago · Sep 14, 2019, 08:18 AM
1-- This script has been converted to FE by iPxter
2
3
4if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
5local Player,Mouse,mouse,UserInputService,ContextActionService = owner
6do
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 = owner
63 local Event = script:WaitForChild("UserInput_Event")
64
65 local UIS = game:GetService("UserInputService")
66 local input = function(io,a)
67 if a then return end
68 --Since InputObject is a client-side instance, we create and pass table instead
69 Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
70 end
71 UIS.InputBegan:Connect(input)
72 UIS.InputEnded:Connect(input)
73
74 local Mouse = Player:GetMouse()
75 local h,t
76 --Give the server mouse data 30 times every second, but only if the values changed
77 --If player is not moving their mouse, client won't fire events
78 while wait(1/30) do
79 if h~=Mouse.Hit or t~=Mouse.Target then
80 h,t=Mouse.Hit,Mouse.Target
81 Event:FireServer({isMouse=true,Target=t,Hit=h})
82 end
83 end]==],Player.Character)
84 Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
85end
86Player = owner
87 Character = Player.Character
88 local txt = Instance.new("BillboardGui", Character)
89 txt.Adornee = Character.Head
90 txt.Name = "_status"
91 txt.Size = UDim2.new(2, 0, 1.2, 0)
92 txt.StudsOffset = Vector3.new(-9, 8, 0)
93 local text = Instance.new("TextLabel", txt)
94 text.Size = UDim2.new(10, 0, 7, 0)
95 text.FontSize = "Size24"
96 text.TextScaled = true
97 text.TextTransparency = 0
98 text.BackgroundTransparency = 1
99 text.TextTransparency = 0
100 text.TextStrokeTransparency = 0
101 text.Font = "Antique"
102 text.TextStrokeColor3 = Color3.new(20,50,80)
103 text.Text = "Tf2 Enginer Class"
104 print("Edited by Penien23")
105
106wait(0.2)
107
108local plr = game:service'Players'.apelidi0
109local char = plr.Character
110local mouse = plr:GetMouse()
111local humanoid = char:findFirstChild("Humanoid")
112local torso = char:findFirstChild("Torso")
113local head = char.Head
114local ra = char:findFirstChild("Right Arm")
115local la = char:findFirstChild("Left Arm")
116local rl = char:findFirstChild("Right Leg")
117local ll = char:findFirstChild("Left Leg")
118local rs = torso:findFirstChild("Right Shoulder")
119local ls = torso:findFirstChild("Left Shoulder")
120local rh = torso:findFirstChild("Right Hip")
121local lh = torso:findFirstChild("Left Hip")
122local neck = torso:findFirstChild("Neck")
123local rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
124local rootpart = char:findFirstChild("HumanoidRootPart")
125local camera = workspace.CurrentCamera
126local anim = char:findFirstChild("Animate")
127DA = false
128NoSentry = true
129secondcolor = "Really black"
130WSHM = {'10209908','10209905','10209905','10209908'}
131WSH = WSHM[math.random(1,#WSHM)]
132wait(1 / 60)
133Effects = { }
134local Player = owner
135local Character = Player.Character
136local Humanoid = Character.Humanoid
137local mouse = Player:GetMouse()
138local LeftArm = Character["Left Arm"]
139local RightArm = Character["Right Arm"]
140local LeftLeg = Character["Left Leg"]
141local RightLeg = Character["Right Leg"]
142local Head = Character.Head
143local Torso = Character.Torso
144local cam = game.Workspace.CurrentCamera
145local RootPart = Character.HumanoidRootPart
146local RootJoint = RootPart.RootJoint
147local equipped = false
148local attack = false
149local Anim = 'Idle'
150local idle = 0
151local attacktype = 1
152local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
153local velocity = RootPart.Velocity.y
154local sine = 0
155local change = 1
156local grabbed = false
157local cn = CFrame.new
158local mr = math.rad
159local angles = CFrame.Angles
160local ud = UDim2.new
161local c3 = Color3.new
162local slashDamage = 15
163trans = 1
164for i,v in pairs(char:GetChildren()) do if v:IsA("Accessory") then v:Remove() end end
165for i,v in pairs(char:GetChildren()) do if v:IsA("Hat") then v:Remove() end end
166Wep = 1
167equippedgun2 = false
168
169
170
171
172
173
174
175
176
177
178--SB Plasma Shotgun 2013
179
180--madiik's plasma shottie
181
182--variables
183
184
185
186--some more variables
187
188local spread = 1
189-- end of some more variables
190
191local sound = Instance.new("Sound",head)
192sound.SoundId = "http://www.roblox.com/asset?id=10209842"
193sound.Volume = 2
194sound.Pitch = 1
195
196
197
198
199
200
201
202local sound2 = Instance.new("Sound",head)
203sound2.SoundId = "http://www.roblox.com/asset?id=10209881"
204sound2.Volume = 1
205sound2.Pitch = 1
206
207
208
209
210
211
212
213function attach(weld, part0, part1)
214weld.Part0 = part0
215weld.Part1 = part1
216end
217
218
219
220
221
222
223
224
225
226--create func
227function part(parent, size, color, formfactor, collide, transparency)
228if transparency == nil then transparency = 0 end
229if collide == nil then collide = false end
230if formfactor == nil then formfactor = Enum.FormFactor.Custom end
231local p=Instance.new("Part", parent)
232p.FormFactor=formfactor
233p.CanCollide=false
234p.Size=size
235p.Locked=true
236p.Transparency=transparency
237p.Position=torso.Position
238p.BrickColor=color
239p.FrontSurface="SmoothNoOutlines"
240p.BackSurface="SmoothNoOutlines"
241p.LeftSurface="SmoothNoOutlines"
242p.BottomSurface="SmoothNoOutlines"
243p.TopSurface="SmoothNoOutlines"
244p.RightSurface="SmoothNoOutlines"
245return p
246end
247function wedge(parent, size, color, formfactor, collide, transparency)
248
249if transparency == nil then transparency = 0 end
250if collide == nil then collide = false end
251if formfactor == nil then formfactor = Enum.FormFactor.Custom end
252
253local p=Instance.new("WedgePart", parent)
254p.FormFactor=formfactor
255p.CanCollide=false
256p.Size=size
257p.Locked=true
258p.Position = torso.Position
259p.BrickColor=color
260p.FrontSurface="SmoothNoOutlines"
261p.BackSurface="SmoothNoOutlines"
262p.LeftSurface="SmoothNoOutlines"
263p.BottomSurface="SmoothNoOutlines"
264p.TopSurface="SmoothNoOutlines"
265p.RightSurface="SmoothNoOutlines"
266return p
267end
268function weld(part0, part1, c0, parent, c1)
269if parent == nil then parent = gun end
270if c1 == nil then c1 = CFrame.new() end
271
272local wel=Instance.new("Weld", parent)
273wel.Part0 = part0
274wel.Part1 = part1
275wel.C0 = c0
276wel.C1 = c1
277return wel
278end
279function specialmesh(parent, meshType, scale, meshId)
280local mesh = Instance.new("SpecialMesh", parent)
281mesh.Scale = scale
282mesh.MeshType = meshType
283mesh.MeshId = meshId
284return mesh
285end
286
287
288--some ray functi0n
289
290function rayCast2(speed, gravity, from)
291coroutine.wrap(function()
292if char.Humanoid.Health == 0 then return end
293local rayP = Instance.new("Part")
294rayP.Name = "rayP"
295rayP.BrickColor = BrickColor.new("New Yeller")
296rayP.Material = 'Neon'
297rayP.Anchored = true
298rayP.CanCollide = false
299rayP.Locked = true
300rayP.TopSurface = Enum.SurfaceType.Smooth
301rayP.BottomSurface = Enum.SurfaceType.Smooth
302rayP.formFactor = Enum.FormFactor.Custom
303rayP.Size = Vector3.new(0.2, 0.2, 0.2)
304
305
306
307Instance.new("BlockMesh", rayP).Scale = Vector3.new(0.2, 0.2, 10)
308
309
310
311
312
313
314
315
316local bulletposition = from.Position + Vector3.new(0, 0.3, 0)
317
318local bulletvelocity = (Vector3.new(math.random(-spread*4,spread*4), math.random(-spread*4,spread*4), math.random(-spread*4,spread*4)))+( plr:GetMouse().Hit.p - bulletposition).unit*speed
319local bulletlastposition = bulletposition
320
321
322
323
324coroutine.resume(coroutine.create(function()
325while true do
326local dt = wait()
327bulletlastposition = bulletposition
328bulletvelocity = bulletvelocity + (Vector3.new(0, -14.81*gravity, 0)*dt)
329bulletposition = bulletposition + (bulletvelocity*dt)
330
331local ray = Ray.new(bulletlastposition, (bulletposition - bulletlastposition))
332
333local hit, hitposition = workspace:FindPartOnRayWithIgnoreList( ray, { char, rayP, TrailPart} )
334
335if (torso.Position - rayP.Position).magnitude > 540 then
336rayP:Destroy()
337break
338end
339
340
341if hit then
342local damage = math.random(10, 20)
343if hit.Parent:findFirstChild("Humanoid") ~= nil then
344hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - damage
345end
346if hit.Parent:IsA("Hat") and hit.Parent.Parent:findFirstChild("Humanoid") ~= nil then
347hit.Parent.Parent.Humanoid.Health = hit.Parent.Parent.Humanoid.Health - damage
348end
349bulletposition = hitposition
350rayP.CFrame = CFrame.new(bulletposition, bulletposition+bulletvelocity)
351rayP:Destroy()
352break
353end
354rayP.CFrame = CFrame.new(bulletposition, bulletposition+bulletvelocity)
355rayP.Parent = workspace
356end
357end))
358end)()
359end
360
361
362
363
364
365
366
367--function attach(weld, part0, part1)
368--weld.Part0 = part0
369--weld.Part1 = part1
370--end
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398TmRed = false
399TmBlue = false
400TeamColor = BrickColor.new("Really Black")
401
402 local BC = char["Body Colors"]
403 BC.HeadColor = BrickColor.new("Pastel brown")
404 BC.LeftArmColor = BrickColor.new("Pastel brown")
405 BC.LeftLegColor = BrickColor.new("Pastel brown")
406 BC.RightArmColor = BrickColor.new("Pastel brown")
407 BC.RightLegColor = BrickColor.new("Pastel brown")
408 BC.TorsoColor = BrickColor.new("Pastel brown")
409
410
411New = function(Object, Parent, Name, Data)
412 local Object = Instance.new(Object)
413 for Index, Value in pairs(Data or {}) do
414 Object[Index] = Value
415 end
416 Object.Parent = Parent
417 Object.Name = Name
418 return Object
419end
420local AddInstance = function(Object, ...)
421local Obj = Instance.new(Object)
422for i,v in next,(...) do
423Obj[i] = v
424end
425return Obj
426end
427
428
429
430
431
432Team=function()
433
434local r=math.random(1,2)
435if r==1 then
436print('RED')
437script.Name = "TeamRed"
438TmRed = true
439for i,v in pairs(char:GetChildren()) do if v:IsA("Shirt") then v:Remove() end end
440for i,v in pairs(char:GetChildren()) do if v:IsA("Pants") then v:Remove() end end
441wait()shirt = Instance.new("Shirt", char)
442shirt.Name = "Shirt"
443pants = Instance.new("Pants", char)
444pants.Name = "Pants"
445char.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=69232230"
446char.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=69232580"
447TeamColor = BrickColor.new("Bright red")
448end
449
450if r==2 then
451print('BLUE')
452TmBlue = true
453script.Name = "TeamBlue"
454for i,v in pairs(char:GetChildren()) do if v:IsA("Shirt") then v:Remove() end end
455for i,v in pairs(char:GetChildren()) do if v:IsA("Pants") then v:Remove() end end
456wait()shirt = Instance.new("Shirt", char)
457shirt.Name = "Shirt"
458pants = Instance.new("Pants", char)
459pants.Name = "Pants"
460char.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=69232247"
461char.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=69232594"
462TeamColor = BrickColor.new("Bright blue")
463end
464print(''..r)
465end
466
467Team()
468
469
470
471local MusThingHat = AddInstance("Part",{
472 Parent = head,
473 CFrame = head.CFrame,
474 formFactor = "Symmetric",
475 Size = Vector3.new(1, 1, 1),
476 CanCollide = false,
477 TopSurface = "Smooth",
478 BottomSurface = "Smooth",
479 Locked = true,
480 BrickColor=BrickColor.new("Br. yellowish orange"),
481 Transparency = 1,
482 })
483 local Weld = AddInstance("Weld",{
484 Parent = MusThingHat,
485 Part0 = head,
486 C0 = CFrame.new(0,0.5,0)*CFrame.Angles(0,0,0),
487 Part1 = MusThingHat,
488 })
489 local Mesh = AddInstance("SpecialMesh",{
490 Parent = MusThingHat,
491
492 Scale = Vector3.new(.1,0,.1),
493
494 })
495
496local Reaper = AddInstance("Part",{
497 Parent = head,
498 CFrame = head.CFrame,
499 formFactor = "Symmetric",
500 Size = Vector3.new(1, 1, 1),
501 CanCollide = false,
502 TopSurface = "Smooth",
503 BottomSurface = "Smooth",
504 Locked = true,
505 BrickColor=BrickColor.new("Br. yellowish orange"),
506 })
507 local Weld = AddInstance("Weld",{
508 Parent = Reaper,
509 Part0 = head,
510 C0 = CFrame.new(-.04,.7,-.1)*CFrame.Angles(0,0,.08),
511 Part1 = Reaper,
512 })
513 local Mesh = AddInstance("SpecialMesh",{
514 Parent = Reaper,
515 MeshId = "rbxassetid://1073659",
516 Scale = Vector3.new(1.06,1.05,1.06),
517 VertexColor = Vector3.new(1,1,1),
518 })
519
520local Helmpart2 = AddInstance("Part",{
521 Parent = head,
522 CFrame = head.CFrame,
523 formFactor = "Symmetric",
524 Size = Vector3.new(1, 1, 1),
525 CanCollide = false,
526 TopSurface = "Smooth",
527 BottomSurface = "Smooth",
528 Locked = true,
529 BrickColor=BrickColor.new("White"),
530 })
531 local Weld = AddInstance("Weld",{
532 Parent = Helmpart2,
533 Part0 = head,
534 C0 = CFrame.new(.01,.4,.05)*CFrame.Angles(.1,0,-.02),
535 Part1 = Helmpart2,
536 })
537 local Mesh = AddInstance("SpecialMesh",{
538 Parent = Helmpart2,
539 Scale = Vector3.new(1.28,.48,1.28),
540 VertexColor = Vector3.new(1,1,1),
541 })
542
543
544local Glassespart2 = AddInstance("Part",{
545 Parent = head,
546 CFrame = head.CFrame,
547 formFactor = "Symmetric",
548 Size = Vector3.new(1, 1, 1),
549 CanCollide = false,
550 TopSurface = "Smooth",
551 BottomSurface = "Smooth",
552 Locked = true,
553 BrickColor=BrickColor.new("Really black"),
554 })
555 local Weld = AddInstance("Weld",{
556 Parent = Glassespart2,
557 Part0 = head,
558 C0 = CFrame.new(0,.35,0)*CFrame.Angles(0,0,0),
559 Part1 = Glassespart2,
560 })
561 local Mesh = AddInstance("SpecialMesh",{
562 Parent = Glassespart2,
563 Scale = Vector3.new(1.27,.5,1.27),
564 VertexColor = Vector3.new(1,1,1),
565 })
566
567
568
569
570
571
572
573
574local Reaper3 = AddInstance("Part",{
575 Parent = head,
576 CFrame = head.CFrame,
577 formFactor = "Symmetric",
578 Size = Vector3.new(1, 1, 1),
579 CanCollide = false,
580 TopSurface = "Smooth",
581 BottomSurface = "Smooth",
582 Locked = true,
583 BrickColor=BrickColor.new("Gold"),
584 })
585 local Weld = AddInstance("Weld",{
586 Parent = Reaper3,
587 Part0 = head,
588 C0 = CFrame.new(0,.3,-0.02)*CFrame.Angles(-.1,0,0),
589 Part1 = Reaper3,
590 })
591 local Mesh = AddInstance("SpecialMesh",{
592 Parent = Reaper3,
593 MeshId = "rbxassetid://19380122",
594 TextureId = "rbxassetid://19380117",
595 Scale = Vector3.new(.9,1,1),
596 VertexColor = Vector3.new(1,1,1),
597 })
598
599
600
601
602
603
604
605local Reaper4 = AddInstance("Part",{
606 Parent = RightArm,
607 CFrame = RightArm.CFrame,
608 formFactor = "Symmetric",
609 Size = Vector3.new(0.1, 0.5, 3),
610 CanCollide = false,
611 TopSurface = "Smooth",
612 BottomSurface = "Smooth",
613 Locked = true,
614 Transparency = 0
615 })
616 local Weld = AddInstance("Weld",{
617 Parent = Reaper4,
618 Part0 = RightArm,
619 C0 = CFrame.new(-0.35,-1.8,-0.4)*CFrame.Angles(4.7,3.4,0),
620 Part1 = Reaper4,
621 })
622 local Mesh = AddInstance("SpecialMesh",{
623 Parent = Reaper4,
624 MeshId = "rbxassetid://470533002",
625 TextureId = "rbxassetid://470533004",
626 Scale = Vector3.new(.03,.03,.03),
627 VertexColor = Vector3.new(1,1,1),
628 })
629
630 local GunFire = AddInstance("Part",{
631 Parent = RightArm,
632 CFrame = RightArm.CFrame,
633 formFactor = "Symmetric",
634 Size = Vector3.new(0.1, 0.1, 0.1),
635 CanCollide = false,
636 TopSurface = "Smooth",
637 BottomSurface = "Smooth",
638 Locked = true,
639 Transparency = 1
640 })
641 local Weld = AddInstance("Weld",{
642 Parent = GunFire,
643 Part0 = RightArm,
644 C0 = CFrame.new(-0.8,-3.5,-0.7)*CFrame.Angles(4.7,3.4,0),
645 Part1 = GunFire,
646 })
647
648
649 local GunParticle = Instance.new("ParticleEmitter", GunFire);
650 GunParticle.VelocitySpread = 60;
651 GunParticle.LightEmission = 200;
652
653 local Colors2 = {Color3.new(1,.5,0), Color3.new(1,.7,0), Color3.new(1,.9,0);}
654 GunParticle.Size = NumberSequence.new(.05,.07);
655
656 GunParticle.Color = ColorSequence.new(Colors2[math.random(#Colors2)]);
657 GunParticle.Texture = "rbxassetid://252350680";
658 GunParticle.RotSpeed = NumberRange.new(10,70);
659 GunParticle.Rate = 600;
660 GunParticle.Speed = NumberRange.new(15);
661 GunParticle.Transparency = NumberSequence.new(0,1);
662 GunParticle.Lifetime = NumberRange.new(.01,.2);
663GunParticle.EmissionDirection = 'Back'
664GunParticle.Enabled = false
665
666
667
668
669
670
671
672
673local Reaper5 = AddInstance("Part",{
674 Parent = RightArm,
675 CFrame = RightArm.CFrame,
676 formFactor = "Symmetric",
677 Size = Vector3.new(0.1, 0.5, 3),
678 CanCollide = false,
679 TopSurface = "Smooth",
680 BottomSurface = "Smooth",
681 Locked = true,
682 Transparency = 1
683 })
684 local Weld = AddInstance("Weld",{
685 Parent = Reaper5,
686 Part0 = RightArm,
687 C0 = CFrame.new(-.1,-0.75,-.7)*CFrame.Angles(1.5,0,3),
688 Part1 = Reaper5,
689 })
690 local Mesh = AddInstance("SpecialMesh",{
691 Parent = Reaper5,
692 MeshId = "rbxassetid://431003868",
693 TextureId = "rbxassetid://430627740",
694 Scale = Vector3.new(1.93,1.99,1.99),
695 VertexColor = Vector3.new(1,1,1),
696 })
697
698
699
700local Arms = AddInstance("Model",{
701 Parent = cam,
702 Name = "Arms",
703
704
705 })
706
707local Arm1 = AddInstance("Part",{
708 Parent = Arms,
709 Name = "RightArm",
710 CFrame = RightArm.CFrame,
711 formFactor = "Symmetric",
712 Size = Vector3.new(.85,1.85,.85),
713 CanCollide = false,
714 Material = "SmoothPlastic",
715 TopSurface = "Smooth",
716 BottomSurface = "Smooth",
717 Locked = true,
718 BrickColor=BrickColor.new("Pastel brown"),
719 Transparency = 0
720 })
721 local Weld = AddInstance("Weld",{
722 Parent = Arm1,
723 Part0 = RightArm,
724 C0 = CFrame.new(0,0,0)*CFrame.Angles(0,0,0),
725 Part1 = Arm1,
726 })
727
728local Arm2 = AddInstance("Part",{
729 Parent = Arms,
730 Name = "LeftArm",
731 CFrame = LeftArm.CFrame,
732 formFactor = "Symmetric",
733 Size = Vector3.new(.85,1.85,.85),
734 CanCollide = false,
735 Material = "SmoothPlastic",
736 TopSurface = "Smooth",
737 BottomSurface = "Smooth",
738 Locked = true,
739 BrickColor=BrickColor.new("Pastel brown"),
740 Transparency = 0
741 })
742 local Weld = AddInstance("Weld",{
743 Parent = Arm2,
744 Part0 = LeftArm,
745 C0 = CFrame.new(0,0,0)*CFrame.Angles(0,0,0),
746 Part1 = Arm2,
747 })
748
749
750
751
752 local Arm3 = AddInstance("Part",{
753 Parent = Arms,
754 Name = "RightArm",
755 CFrame = RightArm.CFrame,
756 formFactor = "Symmetric",
757 Size = Vector3.new(.9,.9,.9),
758 CanCollide = false,
759 Material = "SmoothPlastic",
760 TopSurface = "Smooth",
761 BottomSurface = "Smooth",
762 Locked = true,
763 BrickColor=TeamColor,
764 Transparency = 0
765 })
766 local Weld = AddInstance("Weld",{
767 Parent = Arm3,
768 Part0 = RightArm,
769 C0 = CFrame.new(0,.5,0)*CFrame.Angles(0,0,0),
770 Part1 = Arm3,
771 })
772
773local Arm4 = AddInstance("Part",{
774 Parent = Arms,
775 Name = "LeftArm",
776 CFrame = LeftArm.CFrame,
777 formFactor = "Symmetric",
778 Size = Vector3.new(.9,.9,.9),
779 CanCollide = false,
780 Material = "SmoothPlastic",
781 TopSurface = "Smooth",
782 BottomSurface = "Smooth",
783 Locked = true,
784 BrickColor=TeamColor,
785 Transparency = 0
786 })
787 local Weld = AddInstance("Weld",{
788 Parent = Arm4,
789 Part0 = LeftArm,
790 C0 = CFrame.new(0,.5,0)*CFrame.Angles(0,0,0),
791 Part1 = Arm4,
792 })
793 local Arm5 = AddInstance("Part",{
794 Parent = Arms,
795 Name = "RightArm",
796 CFrame = RightArm.CFrame,
797 formFactor = "Symmetric",
798 Size = Vector3.new(.86,.8,.86),
799 CanCollide = false,
800 Material = "SmoothPlastic",
801 TopSurface = "Smooth",
802 BottomSurface = "Smooth",
803 Locked = true,
804 BrickColor=BrickColor.new("Br. yellowish orange"),
805 Transparency = 0
806 })
807 local Weld = AddInstance("Weld",{
808 Parent = Arm5,
809 Part0 = RightArm,
810 C0 = CFrame.new(0,-.55,0)*CFrame.Angles(0,0,0),
811 Part1 = Arm5,
812 })
813
814local Reaper6 = AddInstance("Part",{
815 Parent = Arms,
816 CFrame = RightArm.CFrame,
817 formFactor = "Symmetric",
818 Size = Vector3.new(0.1, 0.1, .1),
819 CanCollide = false,
820 TopSurface = "Smooth",
821 BottomSurface = "Smooth",
822 Locked = true,
823 Transparency = 1
824 })
825 local Weld = AddInstance("Weld",{
826 Parent = Reaper6,
827 Part0 = RightArm,
828 C0 = CFrame.new(-0.35,-1.8,-0.4)*CFrame.Angles(4.7,3.4,0),
829 Part1 = Reaper6,
830 })
831 local Mesh = AddInstance("SpecialMesh",{
832 Parent = Reaper6,
833 MeshId = "rbxassetid://470533002",
834 TextureId = "rbxassetid://470533004",
835 Scale = Vector3.new(.029,.029,.029),
836 VertexColor = Vector3.new(1,1,1),
837 })
838
839
840
841
842
843
844
845
846
847
848
849
850
851local Reaper7 = AddInstance("Part",{
852 Parent = Arms,
853 CFrame = RightArm.CFrame,
854 formFactor = "Symmetric",
855 Size = Vector3.new(0.1, 0.5, 3),
856 CanCollide = false,
857 TopSurface = "Smooth",
858 BottomSurface = "Smooth",
859 Locked = true,
860 Transparency = 1
861 })
862 local Weld = AddInstance("Weld",{
863 Parent = Reaper7,
864 Part0 = RightArm,
865 C0 = CFrame.new(-.1,-0.75,-.7)*CFrame.Angles(1.5,0,3),
866 Part1 = Reaper7,
867 })
868 local Mesh = AddInstance("SpecialMesh",{
869 Parent = Reaper7,
870 MeshId = "rbxassetid://431003868",
871 TextureId = "rbxassetid://430627740",
872 Scale = Vector3.new(1.9,1.98,1.98),
873 VertexColor = Vector3.new(1,1,1),
874 })
875
876
877head.face.Texture = "http://www.roblox.com/asset/?id=156600391"
878local NeckCF = cn(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
879Humanoid.Animator:Destroy()
880Character.Animate:Destroy()
881
882local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
883local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
884local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
885
886
887RSH, LSH = nil, nil
888
889RW = Instance.new("Weld")
890LW = Instance.new("Weld")
891
892RH = Torso["Right Hip"]
893LH = Torso["Left Hip"]
894
895RSH = Torso["Right Shoulder"]
896LSH = Torso["Left Shoulder"]
897
898RSH.Parent = nil
899LSH.Parent = nil
900
901RW.Name = "RW"
902RW.Part0 = Torso
903RW.C0 = cn(1.5, 0.5, 0)
904RW.C1 = cn(0, 0.5, 0)
905RW.Part1 = RightArm
906RW.Parent = Torso
907
908LW.Name = "LW"
909LW.Part0 = Torso
910LW.C0 = cn(-1.5, 0.5, 0)
911LW.C1 = cn(0, 0.5, 0)
912LW.Part1 = LeftArm
913LW.Parent = Torso
914
915function clerp(a, b, t)
916 local qa = {
917 QuaternionFromCFrame(a)
918 }
919 local qb = {
920 QuaternionFromCFrame(b)
921 }
922 local ax, ay, az = a.x, a.y, a.z
923 local bx, by, bz = b.x, b.y, b.z
924 local _t = 1 - t
925 return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
926end
927
928function QuaternionFromCFrame(cf)
929 local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
930 local trace = m00 + m11 + m22
931 if trace > 0 then
932 local s = math.sqrt(1 + trace)
933 local recip = 0.5 / s
934 return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
935 else
936 local i = 0
937 if m11 > m00 then
938 i = 1
939 end
940 if m22 > (i == 0 and m00 or m11) then
941 i = 2
942 end
943 if i == 0 then
944 local s = math.sqrt(m00 - m11 - m22 + 1)
945 local recip = 0.5 / s
946 return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
947 elseif i == 1 then
948 local s = math.sqrt(m11 - m22 - m00 + 1)
949 local recip = 0.5 / s
950 return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
951 elseif i == 2 then
952 local s = math.sqrt(m22 - m00 - m11 + 1)
953 local recip = 0.5 / s
954 return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
955 end
956 end
957end
958
959function QuaternionToCFrame(px, py, pz, x, y, z, w)
960 local xs, ys, zs = x + x, y + y, z + z
961 local wx, wy, wz = w * xs, w * ys, w * zs
962 local xx = x * xs
963 local xy = x * ys
964 local xz = x * zs
965 local yy = y * ys
966 local yz = y * zs
967 local zz = z * zs
968 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))
969end
970
971function QuaternionSlerp(a, b, t)
972 local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
973 local startInterp, finishInterp;
974 if cosTheta >= 0.0001 then
975 if (1 - cosTheta) > 0.0001 then
976 local theta = math.acos(cosTheta)
977 local invSinTheta = 1 / math.sin(theta)
978 startInterp = math.sin((1 - t) * theta) * invSinTheta
979 finishInterp = math.sin(t * theta) * invSinTheta
980 else
981 startInterp = 1 - t
982 finishInterp = t
983 end
984 else
985 if (1 + cosTheta) > 0.0001 then
986 local theta = math.acos(-cosTheta)
987 local invSinTheta = 1 / math.sin(theta)
988 startInterp = math.sin((t - 1) * theta) * invSinTheta
989 finishInterp = math.sin(t * theta) * invSinTheta
990 else
991 startInterp = t - 1
992 finishInterp = t
993 end
994 end
995 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
996end
997
998function swait(num)
999 if num == 0 or num == nil then
1000 game:service'RunService'.RenderStepped:wait(0)
1001 else
1002 for i = 0, num do
1003 game:service'RunService'.RenderStepped:wait(0)
1004 end
1005 end
1006end
1007
1008local RbxUtility = LoadLibrary("RbxUtility")
1009local Create = RbxUtility.Create
1010
1011function RemoveOutlines(part)
1012 part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
1013end
1014
1015function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size)
1016 local Part = Create("Part"){
1017 formFactor = FormFactor,
1018 Parent = Parent,
1019 Reflectance = Reflectance,
1020 Transparency = Transparency,
1021 CanCollide = false,
1022 Locked = true,
1023 BrickColor = BrickColor.new(tostring(BColor)),
1024 Name = Name,
1025 Size = Size,
1026 Material = Material,
1027 }
1028 RemoveOutlines(Part)
1029 return Part
1030end
1031
1032function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
1033 local Msh = Create(Mesh){
1034 Parent = Part,
1035 Offset = OffSet,
1036 Scale = Scale,
1037 }
1038 if Mesh == "SpecialMesh" then
1039 Msh.MeshType = MeshType
1040 Msh.MeshId = MeshId
1041 end
1042 return Msh
1043end
1044
1045function CreateWeld(Parent, Part0, Part1, C0, C1)
1046 local Weld = Create("Weld"){
1047 Parent = Parent,
1048 Part0 = Part0,
1049 Part1 = Part1,
1050 C0 = C0,
1051 C1 = C1,
1052 }
1053 return Weld
1054end
1055
1056function rayCast(Position, Direction, Range, Ignore)
1057 return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
1058end
1059
1060function CreateSound(id, par, vol, pit)
1061 coroutine.resume(coroutine.create(function()
1062 local sou = Instance.new("Sound", par or workspace)
1063 sou.Volume = vol
1064 sou.Pitch = pit or 1
1065 sou.SoundId = id
1066 wait()
1067 sou:play()
1068 game:GetService("Debris"):AddItem(sou, 6)
1069 end))
1070end
1071
1072local function getclosest(obj, distance)
1073 local last, lastx = distance + 1
1074 for i, v in pairs(workspace:GetChildren()) do
1075 if v:IsA'Model' and v ~= Character and v:findFirstChild('Humanoid') and v:findFirstChild('Torso') and v:findFirstChild('Humanoid').Health > 0 then
1076 local t = v.Torso
1077 local dist = (t.Position - obj.Position).magnitude
1078 if dist <= distance then
1079 if dist < last then
1080 last = dist
1081 lastx = v
1082 end
1083 end
1084 end
1085 end
1086 return lastx
1087end
1088
1089function Damage(hit, damage, cooldown, Color1, Color2, HSound, HPitch)
1090 for i, v in pairs(hit:GetChildren()) do
1091 if v:IsA("Humanoid") and hit.Name ~= Character.Name then
1092 local find = v:FindFirstChild("Hitz")
1093 if not find then
1094 if v.Parent:findFirstChild("Head") then
1095 local BillG = Create("BillboardGui"){
1096 Parent = v.Parent.Head,
1097 Size = UDim2.new(1, 0, 1, 0),
1098 Adornee = v.Parent.Head,
1099 StudsOffset = Vector3.new(math.random(-3, 3), math.random(3, 5), math.random(-3, 3)),
1100 }
1101 local TL = Create("TextLabel"){
1102 Parent = BillG,
1103 Size = UDim2.new(3, 3, 3, 3),
1104 BackgroundTransparency = 1,
1105 Text = tostring(damage).."-",
1106 TextColor3 = Color1.Color,
1107 TextStrokeColor3 = Color2.Color,
1108 TextStrokeTransparency = 0,
1109 TextXAlignment = Enum.TextXAlignment.Center,
1110 TextYAlignment = Enum.TextYAlignment.Center,
1111 FontSize = Enum.FontSize.Size18,
1112 Font = "ArialBold",
1113 }
1114 coroutine.resume(coroutine.create(function()
1115 wait(1)
1116 for i = 0, 1, .1 do
1117 wait(.1)
1118 BillG.StudsOffset = BillG.StudsOffset + Vector3.new(0, .1, 0)
1119 end
1120 BillG:Destroy()
1121 end))
1122 end
1123 v.Health = v.Health - damage
1124 local bool = Create("BoolValue"){
1125 Parent = v,
1126 Name = 'Hitz',
1127 }
1128 if HSound ~= nil and HPitch ~= nil then
1129 CreateSound(HSound, hit, 1, HPitch)
1130 end
1131 game:GetService("Debris"):AddItem(bool, cooldown)
1132 end
1133 end
1134 end
1135end
1136
1137
1138function BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
1139 local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
1140 prt.Anchored = true
1141 prt.CFrame = cframe
1142 local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
1143 game:GetService("Debris"):AddItem(prt, 10)
1144 if Type == 1 or Type == nil then
1145 table.insert(Effects, {
1146 prt,
1147 "Block1",
1148 delay,
1149 x3,
1150 y3,
1151 z3,
1152 msh
1153 })
1154 elseif Type == 2 then
1155 table.insert(Effects, {
1156 prt,
1157 "Block2",
1158 delay,
1159 x3,
1160 y3,
1161 z3,
1162 msh
1163 })
1164 end
1165end
1166
1167function SphereEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
1168 local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
1169 prt.Anchored = true
1170 prt.CFrame = cframe
1171 local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
1172 game:GetService("Debris"):AddItem(prt, 10)
1173 table.insert(Effects, {
1174 prt,
1175 "Cylinder",
1176 delay,
1177 x3,
1178 y3,
1179 z3,
1180 msh
1181 })
1182end
1183
1184function RingEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
1185 local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
1186 prt.Anchored = true
1187 prt.CFrame = cframe * CFrame.new(x1, y1, z1)
1188 local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
1189 game:GetService("Debris"):AddItem(prt, 10)
1190 table.insert(Effects, {
1191 prt,
1192 "Cylinder",
1193 delay,
1194 x3,
1195 y3,
1196 z3,
1197 msh
1198 })
1199end
1200
1201function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
1202 local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
1203 prt.Anchored = true
1204 prt.CFrame = cframe
1205 local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
1206 game:GetService("Debris"):AddItem(prt, 10)
1207 table.insert(Effects, {
1208 prt,
1209 "Cylinder",
1210 delay,
1211 x3,
1212 y3,
1213 z3,
1214 msh
1215 })
1216end
1217
1218function WaveEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
1219 local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
1220 prt.Anchored = true
1221 prt.CFrame = cframe
1222 local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
1223 game:GetService("Debris"):AddItem(prt, 10)
1224 table.insert(Effects, {
1225 prt,
1226 "Cylinder",
1227 delay,
1228 x3,
1229 y3,
1230 z3,
1231 msh
1232 })
1233end
1234
1235function SpecialEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
1236 local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
1237 prt.Anchored = true
1238 prt.CFrame = cframe
1239 local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "24388358", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
1240 game:GetService("Debris"):AddItem(prt, 10)
1241 table.insert(Effects, {
1242 prt,
1243 "Cylinder",
1244 delay,
1245 x3,
1246 y3,
1247 z3,
1248 msh
1249 })
1250end
1251
1252function BreakEffect(brickcolor, cframe, x1, y1, z1)
1253 local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
1254 prt.Anchored = true
1255 prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
1256 local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
1257 local num = math.random(10, 50) / 1000
1258 game:GetService("Debris"):AddItem(prt, 10)
1259 table.insert(Effects, {
1260 prt,
1261 "Shatter",
1262 num,
1263 prt.CFrame,
1264 math.random() - math.random(),
1265 0,
1266 math.random(50, 100) / 100
1267 })
1268end
1269
1270
1271
1272
1273 for i = 0, 1, 0.05 do
1274 swait()
1275 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
1276 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(0)), .1)
1277 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(5), math.rad(0), math.rad(5)), 0.1)
1278 LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-10)), 0.3)
1279 if Torsovelocity > 2 then
1280 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-50 * math.cos(sine / 4)), math.rad(0), math.rad(4 * math.cos(sine / 4))), .2)
1281 RH.C0 = clerp(RH.C0, cn(1, -1 + .1 * math.cos(sine / 5), 0) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3)
1282 LH.C0 = clerp(LH.C0, cn(-1, -1 + .1 * math.cos(sine / 5), 0) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3)
1283 elseif Torsovelocity < 1 then
1284 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(5), math.rad(0), math.rad(5)), 0.1)
1285 RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
1286 LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
1287 end
1288 end
1289 attack = false
1290
1291
1292
1293game:GetService'RunService'.Stepped:connect(function()
1294
1295
1296
1297 if Wep == 1 then
1298 equippedgun2 = false
1299Reaper4.Transparency = 1
1300 Reaper5.Transparency = 0
1301 Reaper6.Transparency = 1
1302 Reaper7.Transparency = 0
1303 end
1304 if Wep == 2 then
1305 equippedgun2 = true
1306Reaper4.Transparency = 0
1307 Reaper5.Transparency = 1
1308 Reaper6.Transparency = 0
1309 Reaper7.Transparency = 1
1310 end
1311 if Wep == 3 then
1312 equippedgun2 = false
1313Reaper4.Transparency = 1
1314 Reaper5.Transparency = 1
1315 Reaper6.Transparency = 1
1316 Reaper7.Transparency = 1
1317 end
1318
1319 Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
1320 velocity = RootPart.Velocity.y
1321 sine = sine + change
1322 local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character)
1323 if equipped == true or equipped == false then
1324 if RootPart.Velocity.y > 1 and hit == nil then
1325 Anim = "Jump"
1326 if attack == false and Wep == 1 then
1327 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
1328 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
1329 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-40), math.rad(0), math.rad(30)), .1)
1330 LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-40), math.rad(0), math.rad(-30)), .1)
1331 RH.C0 = clerp(RH.C0, cn(1, -.9, -.3) * RHCF * angles(math.rad(3), math.rad(0), math.rad(0)), .1)
1332 LH.C0 = clerp(LH.C0, cn(-1, -.7, -.5) * LHCF * angles(math.rad(-3), math.rad(0), math.rad(0)), .1)
1333 end
1334 elseif RootPart.Velocity.y < -1 and hit == nil then
1335 Anim = "Fall"
1336 if attack == false and Wep == 1 then
1337 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
1338 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
1339 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(50)), .1)
1340 LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-50)), .1)
1341 RH.C0 = clerp(RH.C0, cn(1, -1, -.3) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
1342 LH.C0 = clerp(LH.C0, cn(-1, -.8, -.3) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
1343 end
1344 elseif Torsovelocity < 1 and hit ~= nil then
1345 Anim = "Idle"
1346 if attack == false and Wep == 1 then
1347 change = 1
1348 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.1 + 0.1 * math.cos(sine / 25)) * angles(math.rad(0), math.rad(0), math.rad(5)), .1)
1349 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5 - 2 * math.cos(sine / 25)), math.rad(0), math.rad(-5)), .1)
1350 RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5 - -.1 * math.cos(sine / 25), 0) * angles(math.rad(50), math.rad(35 - 25 * math.cos(sine / 25)), math.rad(5 + 3 * math.cos(sine / 25))), 0.1)
1351 LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(80 + 7 * math.cos(sine / 25)), math.rad(-30), math.rad(35 - 1 * math.cos(sine / 25))), 0.1)
1352 RH.C0 = clerp(RH.C0, cn(1, -.9 - 0.1 * math.cos(sine / 25), 0) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .1)
1353 LH.C0 = clerp(LH.C0, cn(-1, -.9 - 0.1 * math.cos(sine / 25), 0) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .1)
1354 end
1355 elseif Torsovelocity > 2 and hit ~= nil then
1356 Anim = "Walk"
1357 if attack == false and Wep == 1 then
1358 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(5 * math.cos(sine / 5))), .2)
1359 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(-5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2)
1360 RW.C0 = clerp(RW.C0, CFrame.new(1.2 - -.05 * math.cos(sine / 4), 0.5 - -.05 * math.cos(sine / 4), 0) * angles(math.rad(50), math.rad(57 - .1 * math.cos(sine / 25)), math.rad(5 + 3 * math.cos(sine / 25))), 0.1)
1361 LW.C0 = clerp(LW.C0, CFrame.new(-1.2 - -.05 * math.cos(sine / 4), 0.4 - -.05 * math.cos(sine / 4), -.4) * angles(math.rad(80 + 1 * math.cos(sine / 25)), math.rad(-30), math.rad(35 - 1 * math.cos(sine / 25))), 0.1)
1362 RH.C0 = clerp(RH.C0, cn(1, -.9 + -.1 * math.cos(sine / 4),0 + -.1 * math.cos(sine / 4)) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3)
1363 LH.C0 = clerp(LH.C0, cn(-1, -.9 + .1 * math.cos(sine / 4), 0 + .1 * math.cos(sine / 4)) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3)
1364 end
1365 end
1366 end
1367 -----------------------[Anim2]--------------------------------------------------------------------------------------------------------------------------
1368
1369 if equipped == true or equipped == false then
1370 if RootPart.Velocity.y > 1 and hit == nil then
1371 Anim = "Jump"
1372 if attack == false and Wep == 2 then
1373 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
1374 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
1375 RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.2, 0) * angles(math.rad(60), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.1)
1376 LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.1, -.4) * angles(math.rad(55 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.1)
1377 RH.C0 = clerp(RH.C0, cn(1, -.9, -.3) * RHCF * angles(math.rad(3), math.rad(0), math.rad(0)), .1)
1378 LH.C0 = clerp(LH.C0, cn(-1, -.7, -.5) * LHCF * angles(math.rad(-3), math.rad(0), math.rad(0)), .1)
1379 end
1380
1381 elseif RootPart.Velocity.y < -1 and hit == nil then
1382 Anim = "Fall"
1383 if attack == false and Wep == 2 then
1384 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
1385 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
1386 RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.8, 0) * angles(math.rad(60), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.05)
1387 LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.7, -.4) * angles(math.rad(55 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.05)
1388 RH.C0 = clerp(RH.C0, cn(1, -1, -.3) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
1389 LH.C0 = clerp(LH.C0, cn(-1, -.8, -.3) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
1390 end
1391 elseif Torsovelocity < 1 and hit ~= nil then
1392 Anim = "Idle"
1393 if attack == false and Wep == 2 then
1394 change = 1
1395 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.1 + 0.1 * math.cos(sine / 25)) * angles(math.rad(0), math.rad(0), math.rad(5)), .1)
1396 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5 - 2 * math.cos(sine / 25)), math.rad(0), math.rad(-5)), .1)
1397 RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, 0) * angles(math.rad(60), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.1)
1398 LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(55 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.1)
1399 RH.C0 = clerp(RH.C0, cn(1, -.9 - 0.1 * math.cos(sine / 25), 0) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .1)
1400 LH.C0 = clerp(LH.C0, cn(-1, -.9 - 0.1 * math.cos(sine / 25), 0) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .1)
1401 end
1402 elseif Torsovelocity > 2 and hit ~= nil then
1403 Anim = "Walk"
1404 if attack == false and Wep == 2 then
1405 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(-25 - 5 * math.cos(sine / 5))), .2)
1406 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(25 + 5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2)
1407 RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, 0) * angles(math.rad(60), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.1)
1408 LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(55 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.1)
1409 RH.C0 = clerp(RH.C0, cn(.95, -.9 + -.1 * math.cos(sine / 4),-.35) * RHCF * angles(math.rad(-2), math.rad(25), math.rad(50 * math.cos(sine / 4))), .3)
1410 LH.C0 = clerp(LH.C0, cn(-.95, -.9 + .1 * math.cos(sine / 4), .35) * LHCF * angles(math.rad(-2), math.rad(25), math.rad(50 * math.cos(sine / 4))), .3)
1411 end
1412
1413 end
1414 end
1415
1416
1417
1418 -----------------------[Noraml Anim]--------------------------------------------------------------------------------------------------------------------------
1419
1420 if equipped == true or equipped == false then
1421 if RootPart.Velocity.y > 1 and hit == nil then
1422 Anim = "Jump"
1423 if attack == false and Wep == 3 then
1424 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
1425 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
1426 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-40), math.rad(0), math.rad(30)), .1)
1427 LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-40), math.rad(0), math.rad(-30)), .1)
1428 RH.C0 = clerp(RH.C0, cn(1, -.9, -.3) * RHCF * angles(math.rad(3), math.rad(0), math.rad(0)), .1)
1429 LH.C0 = clerp(LH.C0, cn(-1, -.7, -.5) * LHCF * angles(math.rad(-3), math.rad(0), math.rad(0)), .1)
1430 end
1431 elseif RootPart.Velocity.y < -1 and hit == nil then
1432 Anim = "Fall"
1433 if attack == false and Wep == 3 then
1434 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
1435 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
1436 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(50)), .1)
1437 LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-50)), .1)
1438 RH.C0 = clerp(RH.C0, cn(1, -1, -.3) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
1439 LH.C0 = clerp(LH.C0, cn(-1, -.8, -.3) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
1440 end
1441 elseif Torsovelocity < 1 and hit ~= nil then
1442 Anim = "Idle"
1443 if attack == false and Wep == 3 then
1444 change = 1
1445 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.1 + 0.1 * math.cos(sine / 25)) * angles(math.rad(0), math.rad(0), math.rad(5)), .1)
1446 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5 - 2 * math.cos(sine / 25)), math.rad(0), math.rad(-5)), .1)
1447 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0 * math.cos(sine / 25), 0) * angles(math.rad(0), math.rad(0 - 0 * math.cos(sine / 25)), math.rad(5 + 3 * math.cos(sine / 25))), 0.1)
1448 LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0 + 0 * math.cos(sine / 25)), math.rad(-0), math.rad(-5 - 3 * math.cos(sine / 25))), 0.1)
1449 RH.C0 = clerp(RH.C0, cn(1, -.9 - 0.1 * math.cos(sine / 25), 0) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .1)
1450 LH.C0 = clerp(LH.C0, cn(-1, -.9 - 0.1 * math.cos(sine / 25), 0) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .1)
1451 end
1452 elseif Torsovelocity > 2 and hit ~= nil then
1453 Anim = "Walk"
1454 if attack == false and Wep == 3 then
1455 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(5 * math.cos(sine / 5))), .2)
1456 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(-5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2)
1457 RW.C0 = clerp(RW.C0, CFrame.new(1.5 - -0 * math.cos(sine / 4), 0.5 - -.05 * math.cos(sine / 4), 0) * angles(math.rad(10 + -50 * math.cos(sine / 4)), math.rad(0 - .1 * math.cos(sine / 25)), math.rad(5 + 3 * math.cos(sine / 25))), 0.3)
1458 LW.C0 = clerp(LW.C0, CFrame.new(-1.5 - -0 * math.cos(sine / 4), 0.5 - -.05 * math.cos(sine / 4), 0) * angles(math.rad(10 + 50 * math.cos(sine / 4)), math.rad(-0), math.rad(-5 - 3 * math.cos(sine / 25))), 0.3)
1459 RH.C0 = clerp(RH.C0, cn(1, -.9 + -.1 * math.cos(sine / 4),0 + -.1 * math.cos(sine / 4)) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3)
1460 LH.C0 = clerp(LH.C0, cn(-1, -.9 + .1 * math.cos(sine / 4), 0 + .1 * math.cos(sine / 4)) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3)
1461 end
1462 end
1463 end
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482 if #Effects > 0 then
1483 for e = 1, #Effects do
1484 if Effects[e] ~= nil then
1485 local Thing = Effects[e]
1486 if Thing ~= nil then
1487 local Part = Thing[1]
1488 local Mode = Thing[2]
1489 local Delay = Thing[3]
1490 local IncX = Thing[4]
1491 local IncY = Thing[5]
1492 local IncZ = Thing[6]
1493 if Thing[1].Transparency <= 1 then
1494 if Thing[2] == "Block1" then
1495 Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
1496 local Mesh = Thing[1].Mesh
1497 Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1498 Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1499 elseif Thing[2] == "Block2" then
1500 Thing[1].CFrame = Thing[1].CFrame
1501 local Mesh = Thing[7]
1502 Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1503 Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1504 elseif Thing[2] == "Cylinder" then
1505 local Mesh = Thing[1].Mesh
1506 Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1507 Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1508 elseif Thing[2] == "Blood" then
1509 local Mesh = Thing[7]
1510 Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, .5, 0)
1511 Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1512 Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1513 elseif Thing[2] == "Elec" then
1514 local Mesh = Thing[1].Mesh
1515 Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
1516 Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1517 elseif Thing[2] == "Disappear" then
1518 Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1519 elseif Thing[2] == "Shatter" then
1520 Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1521 Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
1522 Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
1523 Thing[6] = Thing[6] + Thing[5]
1524 end
1525 else
1526 Part.Parent = nil
1527 table.remove(Effects, e)
1528 end
1529 end
1530 end
1531 end
1532 end
1533end)
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547local No = Instance.new("Sound", head);
1548No.SoundId = "rbxassetid://245064504"
1549No.Volume = 3
1550local yes = Instance.new("Sound", head);
1551yes.SoundId = "rbxassetid://131384028"
1552yes.Volume = 3
1553local HitM = Instance.new("Sound", Reaper5);
1554HitM.SoundId = "rbxassetid://"..WSH
1555HitM.Volume = 1.1
1556local Swing = Instance.new("Sound", Reaper5);
1557Swing.SoundId = "rbxassetid://10209850"
1558Swing.Volume = 1.5
1559Swing.Pitch = 1.1
1560local SwingH = Instance.new("Sound", Reaper5);
1561SwingH.SoundId = "rbxassetid://10209590"
1562SwingH.Volume = 2.9
1563SwingH.Pitch = .8
1564local Taunt = Instance.new("Sound", head);
1565Taunt.SoundId = "rbxassetid://150611842"
1566Taunt.Volume = 2
1567local RUS = Instance.new("Sound", char);
1568RUS.SoundId = "rbxassetid://322621962"
1569RUS.Volume = 2.5
1570RUS.Pitch = 1
1571RUS.Looped = true
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582function BuildSentry()
1583do --CFrame lerp (stravant, clerp by AntiBoomz0r)
1584 local function QuaternionFromCFrame(cf) -- y u no axis angle interpolation?
1585 local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
1586 local trace = m00 + m11 + m22
1587 if trace > 0 then
1588 local s = math.sqrt(1 + trace)
1589 local recip = 0.5/s
1590 return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
1591 else
1592 local i = 0
1593 if m11 > m00 then
1594 i = 1
1595 end
1596 if m22 > (i == 0 and m00 or m11) then
1597 i = 2
1598 end
1599 if i == 0 then
1600 local s = math.sqrt(m00-m11-m22+1)
1601 local recip = 0.5/s
1602 return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
1603 elseif i == 1 then
1604 local s = math.sqrt(m11-m22-m00+1)
1605 local recip = 0.5/s
1606 return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
1607 elseif i == 2 then
1608 local s = math.sqrt(m22-m00-m11+1)
1609 local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
1610 end
1611 end
1612 end
1613 local function QuaternionToCFrame(px, py, pz, x, y, z, w)
1614 local xs, ys, zs = x + x, y + y, z + z
1615 local wx, wy, wz = w*xs, w*ys, w*zs
1616 local xx = x*xs
1617 local xy = x*ys
1618 local xz = x*zs
1619 local yy = y*ys
1620 local yz = y*zs
1621 local zz = z*zs
1622 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))
1623 end
1624 function QuaternionSlerp(a, b, t)
1625 local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
1626 local startInterp, finishInterp;
1627 if cosTheta >= 0.0001 then
1628 if (1 - cosTheta) > 0.0001 then
1629 local theta = math.acos(cosTheta)
1630 local invSinTheta = 1/math.sin(theta)
1631 startInterp = math.sin((1-t)*theta)*invSinTheta
1632 finishInterp = math.sin(t*theta)*invSinTheta
1633 else
1634 startInterp = 1-t
1635 finishInterp = t
1636 end
1637 else
1638 if (1+cosTheta) > 0.0001 then
1639 local theta = math.acos(-cosTheta)
1640 local invSinTheta = 1/math.sin(theta)
1641 startInterp = math.sin((t-1)*theta)*invSinTheta
1642 finishInterp = math.sin(t*theta)*invSinTheta
1643 else
1644 startInterp = t-1
1645 finishInterp = t
1646 end
1647 end
1648 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
1649 end
1650 function clerp(a,b,t)
1651 local qa = {QuaternionFromCFrame(a)}
1652 local qb = {QuaternionFromCFrame(b)}
1653 local ax, ay, az = a.x, a.y, a.z
1654 local bx, by, bz = b.x, b.y, b.z
1655 local _t = 1-t
1656 return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
1657 end
1658end
1659
1660
1661
1662
1663local ABS = math.abs;
1664local SIN = math.sin;
1665local ASIN = math.asin;
1666local COS = math.cos;
1667
1668local new = Instance.new;
1669
1670function math_pos(float)
1671 if float < 0 then float = 0 end
1672 return float
1673end
1674function math_neg(float)
1675 if float > 0 then float = 0 end
1676 return float
1677end
1678function math_max(float, max)
1679 if float > max then float = max end
1680 return float
1681end
1682function math_min(float, min)
1683 if float > min then float = min end
1684 return float
1685end
1686
1687function SharpSin(double_p1)
1688 return ASIN(SIN(double_p1));
1689end
1690
1691local Storage = Instance.new("Model", script);
1692
1693function WeldP(part0, part1, C0, C1)
1694 local W = new("Weld", Storage);
1695 W.Part0 = part0;
1696 W.Part1 = part1;
1697 W.C0 = C0 or CFrame.new();
1698 W.C1 = C1 or CFrame.new();
1699 return W;
1700end
1701
1702function Bevel(part, sizeV3)
1703 local BvlMesh = new("SpecialMesh", part)
1704 BvlMesh.MeshId = "rbxasset://fonts/torso.mesh";
1705 if (sizeV3 ~= nil) then
1706 BvlMesh.Scale = Vector3.new(sizeV3.x/2, sizeV3.y/2, sizeV3.z);
1707 else
1708 BvlMesh.Scale = Vector3.new(part.Size.x/2, part.Size.y/2, part.Size.z);
1709 end
1710end
1711
1712
1713
1714local Scale = 0.5 -- 1 is size of a robloxian (mostly);
1715
1716Storage.Name = "ä";
1717
1718local BasePart = new("Part");
1719BasePart.FormFactor = "Custom";
1720BasePart.TopSurface = 10;
1721BasePart.BottomSurface = 10;
1722BasePart.LeftSurface = 10;
1723BasePart.RightSurface = 10;
1724BasePart.FrontSurface = 10;
1725BasePart.BackSurface = 10;
1726
1727local CylPart = new("Part");
1728CylPart.FormFactor = "Custom";
1729CylPart.TopSurface = 10;
1730CylPart.BottomSurface = 10;
1731CylPart.LeftSurface = 10;
1732CylPart.RightSurface = 10;
1733CylPart.FrontSurface = 10;
1734CylPart.BackSurface = 10;
1735new("CylinderMesh", CylPart);
1736
1737local TopFrame = BasePart:clone()
1738TopFrame.Parent = Storage;
1739TopFrame.Size = Vector3.new(3.5*Scale, 1.5*Scale, 3.5*Scale);
1740TopFrame.BrickColor = TeamColor;
1741
1742new("CylinderMesh", TopFrame);
1743
1744local Screw = CylPart:clone();
1745Screw.Parent = Storage;
1746Screw.Size = Vector3.new(.3*Scale, 1.6*Scale, .3*Scale);
1747Screw.BrickColor = BrickColor.new(199);
1748
1749local CGreyStyle = CylPart:clone()
1750CGreyStyle.Parent = Storage;
1751CGreyStyle.Size = Vector3.new(2.2*Scale, 1.52*Scale, 2.6*Scale);
1752CGreyStyle.BrickColor = BrickColor.new(199);
1753
1754local TurretCasing = BasePart:clone();
1755TurretCasing.Size = Vector3.new(2.2*Scale, 1.4*Scale, 5.6*Scale);
1756TurretCasing.BrickColor = BrickColor.new(199);
1757TurretCasing.Parent = Storage;
1758
1759Bevel(TurretCasing);
1760
1761local TurretFront = BasePart:clone();
1762TurretFront.Size = Vector3.new(1.7*Scale, 1*Scale, .2*Scale);
1763TurretFront.BrickColor = TeamColor;
1764TurretFront.Parent = Storage;
1765
1766local Barrel = CylPart:clone();
1767Barrel.Parent = Storage;
1768Barrel.Size = Vector3.new(.7*Scale, .4*Scale, .7*Scale);
1769Barrel.BrickColor = BrickColor.Black();
1770
1771
1772 local Particle = Instance.new("ParticleEmitter", Barrel);
1773 Particle.VelocitySpread = 30;
1774 Particle.LightEmission = 200;
1775
1776 local Colors = {Color3.new(1,.5,0), Color3.new(1,.7,0), Color3.new(1,.9,0);}
1777
1778 Particle.Size = NumberSequence.new(.05,.07);
1779
1780 Particle.Color = ColorSequence.new(Colors[math.random(#Colors)]);
1781 Particle.Texture = "rbxassetid://252350680";
1782 Particle.RotSpeed = NumberRange.new(10,70);
1783 Particle.Rate = 300;
1784 Particle.Speed = NumberRange.new(15);
1785 Particle.Transparency = NumberSequence.new(0,1);
1786 Particle.Lifetime = NumberRange.new(.01,.2);
1787Particle.Enabled = false
1788
1789
1790
1791local RedDot = BasePart:clone();
1792RedDot.Parent = Storage;
1793RedDot.Size = Vector3.new(.2*Scale, .2*Scale, .2*Scale);
1794RedDot.BrickColor = BrickColor.new("Really red");
1795
1796local Sphere = Instance.new("SpecialMesh", RedDot);
1797Sphere.MeshType = "Sphere";
1798Sphere.Scale = Vector3.new(1*Scale,1*Scale,1*Scale);
1799
1800
1801Bevel(TurretFront, Vector3.new(1.7*Scale, 1*Scale, .05*Scale));
1802
1803local Joint = CylPart:clone();
1804Joint.Parent = Storage;
1805Joint.Size = Vector3.new(.7*Scale, 2*Scale, .7*Scale);
1806Joint.BrickColor = BrickColor.Black();
1807
1808local Hold = BasePart:clone();
1809Hold.Parent = Storage;
1810Hold.BrickColor = BrickColor.Black();
1811Hold.Size = Vector3.new(2.2*Scale, .2*Scale, .75*Scale);
1812
1813local Bolt = BasePart:clone();
1814Bolt.Size = Vector3.new(.2*Scale, 1.5*Scale, .5*Scale);
1815Bolt.Parent = Storage;
1816Bolt.BrickColor = BrickColor.Black();
1817
1818local Bolt2 = BasePart:clone();
1819Bolt2.Size = Vector3.new(.2*Scale, 1.5*Scale, .5*Scale);
1820Bolt2.Parent = Storage;
1821Bolt2.BrickColor = BrickColor.Black();
1822
1823
1824local TurretToFrame = WeldP(TopFrame, TurretCasing, CFrame.new(0, 0, 1.4*Scale));
1825WeldP(TopFrame, CGreyStyle);
1826WeldP(TurretCasing, TurretFront, CFrame.new(0, 0, 2.8*Scale));
1827WeldP(TopFrame, Screw);
1828local BarrelWeld = WeldP(Barrel, TurretFront, CFrame.new(.3*Scale, -.2*Scale, 0), CFrame.Angles(math.pi/2, 0, 0));
1829
1830WeldP(RedDot, TurretFront, CFrame.new(-.55*Scale, 0, -.15*Scale), CFrame.Angles(math.pi/2, 0, 0));
1831
1832local RotateAxisY = WeldP(Bolt, TurretCasing, CFrame.Angles(0,0,0), CFrame.new(1.1*Scale, -.75*Scale, 1*Scale));
1833
1834WeldP(Bolt, Hold, CFrame.new(-1.1*Scale, -.5*Scale, 0));
1835
1836WeldP(Bolt2, Hold, CFrame.new(1.1*Scale, -.5*Scale, 0));
1837
1838local RotateAxisX = WeldP(Hold, Joint, CFrame.new(0, -1*Scale, 0));
1839
1840
1841
1842local Leg1 = BasePart:clone();
1843Leg1.Size = Vector3.new(.2*Scale, 3.5*Scale, .5*Scale);
1844Leg1.Parent = Storage;
1845Leg1.BrickColor = BrickColor.Black();
1846
1847
1848WeldP(Leg1, Joint, CFrame.new(0, -1.75*Scale, 0), CFrame.new(0, -.75*Scale, 0) * CFrame.Angles(math.pi/3, 0, math.pi));
1849
1850
1851local Leg2 = BasePart:clone();
1852Leg2.Size = Vector3.new(.2*Scale, 3.5*Scale, .5*Scale);
1853Leg2.Parent = Storage;
1854Leg2.BrickColor = BrickColor.Black();
1855
1856
1857WeldP(Leg2, Joint, CFrame.new(0, -1.75*Scale, 0), CFrame.new(0, -.45*Scale, 0) * CFrame.Angles(-math.pi/4, 0, math.pi + -math.pi/6));
1858
1859
1860local Leg3 = BasePart:clone();
1861Leg3.Size = Vector3.new(.2*Scale, 3.5*Scale, .5*Scale);
1862Leg3.Parent = Storage;
1863Leg3.BrickColor = BrickColor.Black();
1864
1865
1866WeldP(Leg3, Joint, CFrame.new(0, -1.75*Scale, 0), CFrame.new(0, -.45*Scale, 0) * CFrame.Angles(-math.pi/4, 0, math.pi + math.pi/6));
1867
1868 for i,v in pairs(Storage:children()) do
1869 if v.Name== "Part" then
1870 trans = 1
1871 v.Transparency = 1
1872 end
1873 end
1874
1875local InvisiBox = BasePart:clone();
1876InvisiBox.Size = Storage:GetModelSize() + Vector3.new(2*Scale, 0, 0);
1877InvisiBox.Parent = Storage;
1878InvisiBox.Transparency = 1
1879InvisiBox.Name = 'box'
1880WeldP(InvisiBox, Joint, CFrame.new(0, -.2*Scale, .97*Scale));
1881
1882local InvisiBox2 = BasePart:clone();
1883InvisiBox2.Size = Storage:GetModelSize() + Vector3.new(2*Scale, 0, 0);
1884InvisiBox2.Parent = Arms;
1885InvisiBox2.Transparency = .9
1886InvisiBox2.Name = 'box'
1887InvisiBox2.CanCollide = false
1888InvisiBox2.BrickColor = TeamColor
1889InvisiBox2.Material = 'Neon'
1890WeldP(InvisiBox2, Joint, CFrame.new(0, -1.2*Scale, .97*Scale));
1891
1892InvisiBox.CFrame = torso.CFrame * CFrame.new(0, 5.5*Scale, -2.9) * CFrame.Angles(0, math.pi, 0);
1893
1894local Action = "Idle";
1895
1896local Target = nil;
1897
1898wait(1)
1899
1900InvisiBox.Anchored = true
1901
1902for i,v in pairs(Storage:children()) do
1903 if v:IsA'Part' then
1904 v.Locked = true
1905 end
1906end
1907--//
1908--// SOUNDS
1909--//
1910 for i,v in pairs(Storage:children()) do
1911 if v.Name== "Part" then
1912 trans = 1
1913 v.Transparency = 1
1914 end
1915 end
1916 for i,v in pairs(Storage:children()) do
1917 if v.Name== "Part" then
1918 trans = 1
1919 v.Transparency = 1
1920 for i = 1,11 do
1921
1922 trans = trans - .1
1923 v.Transparency = trans
1924 wait()
1925 end
1926 end
1927 end
1928 trans = 1
1929
1930local OnFind = new("Sound", TopFrame);
1931OnFind.SoundId = "rbxassetid://10209260"
1932OnFind.Volume = 1
1933
1934
1935local OnFire = new("Sound", TopFrame);
1936OnFire.SoundId = "rbxassetid://10209257"
1937OnFire.Volume = 1
1938
1939local OnEmpty = new("Sound", TopFrame);
1940OnEmpty.SoundId = "rbxassetid://10209225"
1941OnEmpty.Volume = 1
1942
1943local Scanning = new("Sound", TopFrame);
1944Scanning.SoundId = "rbxassetid://258704234"
1945Scanning.Volume = 1
1946
1947local Explode = new("Sound", TopFrame);
1948Explode.SoundId = "rbxassetid://10209236"
1949Explode.Volume = .5
1950
1951local Move = new("Sound", TopFrame);
1952Move.SoundId = "rbxassetid://258704467";
1953Move.Volume = 1;
1954
1955
1956
1957
1958
1959function FindShortest(Table)
1960local Current = Table[1]
1961local Final
1962for _,v in pairs(Table) do
1963if v[2] ~= Current[2] then
1964if v[1] < Current[1] then
1965Current = v
1966end
1967end
1968end
1969Final = Current
1970return Final
1971end
1972
1973function GetNearbyPlayer()
1974
1975 local List = {}
1976 for i,v in pairs(workspace:children()) do
1977 if (v ~= nil) then
1978 if (v:IsA'Model') then
1979 if (v:findFirstChild'Torso' ~= nil) then
1980 local rx, ry, rz = Hold.CFrame:toEulerAnglesXYZ();
1981 if (v:findFirstChild'Torso'.Position - Hold.CFrame * CFrame.new(0, 0, 20) * CFrame.Angles(0, ry, 0).p).magnitude < 20 then
1982 if (v ~= char) then
1983 for x,z in next, v:children() do
1984 if z:IsA'Humanoid' and z.Health > 0.01 then
1985 table.insert(List, {(v:findFirstChild'Torso'.Position - Hold.CFrame * CFrame.new(0, 0, 20) * CFrame.Angles(0, ry, 0).p).magnitude, v})
1986 end
1987 end
1988 end
1989 end
1990 end
1991 end
1992 end
1993 end
1994 if (FindShortest(List) ~= nil) then
1995 return FindShortest(List)[2];
1996 else
1997 return nil;
1998 end
1999end
2000
2001local Health = Instance.new("Humanoid", Storage);
2002Health.MaxHealth = 150;
2003Health.Health = 150;
2004
2005
2006
2007function RayC(Part, speed)
2008 coroutine.wrap(function()
2009 local Visual = BasePart:clone();
2010 Visual.FormFactor = "Custom";
2011 Visual.BrickColor = BrickColor.Yellow();
2012 Visual.Size = Vector3.new(.2, 3, .2);
2013 Visual.CFrame = Part.CFrame * CFrame.new(0, -1, 0);
2014 Visual.Anchored = true;
2015 Visual.CanCollide = false;
2016 Visual.Locked = true
2017
2018
2019 coroutine.wrap(function()
2020
2021 wait(.2)
2022
2023 wait(.1);
2024 wait(.3)
2025
2026 end)()
2027
2028 Instance.new("SpecialMesh", Visual).MeshType = "Sphere";
2029 Visual.Mesh.Scale = Vector3.new(.5, 1, .5);
2030
2031 local bulletpos = Visual.Position
2032 local bulletvelocity = (Part.CFrame.p - bulletpos).unit*speed
2033 local lastbulletpos = Visual.Position
2034 Visual.Parent = Storage;
2035 while game:service'RunService'.Stepped:wait() do
2036
2037 lastbulletpos = bulletpos
2038 bulletpos = bulletpos + bulletvelocity
2039 local RayCast = Ray.new(lastbulletpos, (bulletpos - lastbulletpos))
2040 local hit, hitpos = workspace:FindPartOnRay(RayCast, Storage, false, true)
2041 if (Joint.Position - Visual.Position).magnitude > 1000 or Visual.Parent == nil then
2042 Visual:Destroy();
2043 break
2044 end
2045 Visual.Anchored = true
2046 Visual.CFrame = CFrame.new(bulletpos, bulletpos+bulletvelocity) * CFrame.Angles(math.pi/2, 0, 0);
2047 if hit then
2048 if hit.Parent:IsA'Hat' then
2049 if hit.Parent.Parent:IsA'Model' then
2050 for x,z in next, hit.Parent.Parent:children() do
2051 if z:IsA'Humanoid' then
2052 z:TakeDamage(math.random(8,12));
2053 end
2054 end
2055 end
2056 else
2057 if hit.Parent:IsA'Model' then
2058 for x,z in next, hit.Parent:children() do
2059 if z:IsA'Humanoid' then
2060 z:TakeDamage(math.random(8,12));
2061 end
2062 end
2063 end
2064 end
2065
2066 Visual:Destroy();
2067 break
2068 end
2069 end
2070 end)()
2071end
2072
2073lastTick = tick();
2074local db = false;
2075game:service'RunService'.RenderStepped:connect(function()
2076 if Action == "DEAD" then return end;
2077
2078
2079 if not Wrangler then
2080 --//
2081 --// AUTOMATED MODE, MOTION SENSOR WILL DETECT MOVEMENT
2082 --//
2083
2084
2085 --//
2086 --// IF PLAYER USED WRANGLER, THERE IS A SHIELD WICH MUST BE REMOVED
2087 --//
2088
2089 if (Storage:findFirstChild'Shield') then
2090 Storage:findFirstChild'Shield':Destroy();
2091 end
2092
2093 local LastTarget = Target;
2094
2095 --//
2096 --// CHECK FOR NEARBY ENEMIES
2097 --//
2098 local Player = GetNearbyPlayer();
2099 Target = Player;
2100
2101 --//
2102 --// BEEP ON TARGET FOUND
2103 --//
2104 if (Target ~= LastTarget and Target ~= nil) then
2105 Move.Pitch = 0.9 + math.random()/9;
2106 Move:play();
2107 OnFind:play();
2108 Action = "Standby";
2109 end
2110
2111 --//
2112 --// IDLE
2113 --//
2114 if Action == "Idle" then
2115 RotateAxisX.C1 = clerp(RotateAxisX.C1, CFrame.Angles(0, SharpSin(tick()*2)*.2, 0), .1);
2116 RotateAxisY.C0 = clerp(RotateAxisY.C0, CFrame.new(), .1);
2117 end
2118
2119
2120 --//
2121 --// SENTRY DEAD
2122 --//
2123
2124 --//
2125 --// IF PLAYER EXISTS, FIRE!
2126 --//
2127
2128
2129
2130 if Action == "Standby" then
2131 pcall(function()
2132 local tor = Target.Torso.CFrame.p -- Target CFrame
2133 local direction = InvisiBox.CFrame.lookVector -- Direction handling, welds mess up, just a workaround.
2134 local heading = math.atan2(direction.x, direction.z)--
2135 local RotY = math.deg(heading)
2136 if RotY < 0 then
2137 RotY = (360 - math.abs(RotY));
2138 end
2139 RotateAxisX.C1 = --Begin here
2140 clerp(RotateAxisX.C1,
2141 CFrame.new(
2142
2143 Vector3.new(), --The Pivot0 of pointing the weld.
2144 Vector3.new(tor.x, 0, tor.z) - Vector3.new(RotateAxisX.Part1.CFrame.x, 0, RotateAxisX.Part1.CFrame.z)) --We point the sentry here
2145
2146 * CFrame.Angles(0, math.rad(360) - math.rad(RotY), 0),
2147 .1
2148 );
2149
2150 local Point = Hold.CFrame:toObjectSpace(CFrame.new(Hold.CFrame.p,tor))*CFrame.Angles(0,math.rad(180),0)
2151 local RX, RY, RZ = Point:toEulerAnglesXYZ()
2152 if math.deg(RX) > 45 then
2153 RX = math.rad(45)
2154 elseif math.deg(RX) < -55 then
2155 RX = math.rad(-55)
2156 end
2157 RotateAxisY.C0 = clerp(RotateAxisY.C0,CFrame.Angles(RX,0,0),.1)
2158
2159 end)
2160 end
2161 if Action == "Fire" then
2162 pcall(function()
2163 local tor = Target.Torso.CFrame.p;
2164 local direction = InvisiBox.CFrame.lookVector
2165 local heading = math.atan2(direction.x, direction.z)
2166 local RotY = math.deg(heading)
2167 if RotY < 0 then
2168 RotY = (360 - math.abs(RotY));
2169 end
2170 RotateAxisX.C1 = --Begin here
2171 clerp(RotateAxisX.C1,
2172 CFrame.new(
2173
2174 Vector3.new(), --The Pivot0 of pointing the weld.
2175 Vector3.new(tor.x, 0, tor.z) - Vector3.new(RotateAxisX.Part1.CFrame.x, 0, RotateAxisX.Part1.CFrame.z)) --We point the sentry here
2176
2177 * CFrame.Angles(0, math.rad(360) - math.rad(RotY), 0),
2178 .1
2179 );
2180
2181 BarrelWeld.C0 = clerp(BarrelWeld.C0, CFrame.new())
2182 local Point = Hold.CFrame:toObjectSpace(CFrame.new(Hold.CFrame.p,tor))*CFrame.Angles(0,math.rad(180),0)
2183 local RX, RY, RZ = Point:toEulerAnglesXYZ()
2184 if math.deg(RX) > 45 then
2185 RX = math.rad(45)
2186 elseif math.deg(RX) < -55 then
2187 RX = math.rad(-55)
2188 end
2189 RotateAxisY.C0 = clerp(RotateAxisY.C0,CFrame.Angles(RX,0,0),.1)
2190 end)
2191 end
2192
2193 if (Target ~= nil) then
2194 if Action == "Fire" or db then return end
2195 if Action == "Standby" then
2196 db = true
2197 wait(.2);
2198 end
2199 Action = "Fire";
2200 db = false
2201 OnFire:play();
2202
2203 Particle.Color = ColorSequence.new(Colors[math.random(#Colors)]);
2204
2205 local PointLight = Instance.new("PointLight", Barrel);
2206 PointLight.Color = Color3.new(1,.8,0)
2207 PointLight.Brightness = 6;
2208Particle.Enabled = true
2209 game:service'Debris':AddItem(PointLight, .05);
2210
2211
2212
2213 RayC(Barrel, 20)
2214
2215
2216
2217
2218 wait(.1)
2219Particle.Enabled = false
2220 if (Target ~= nil) then
2221 Action = "Standby";
2222 else
2223 Action = "Idle";
2224 end
2225 end
2226
2227 if tick() - lastTick > 2.5 and Target == nil then
2228 lastTick = tick();
2229 Scanning:play();
2230 end
2231 end
2232
2233 if (Health.Health < 0.0001 or RotateAxisX.Parent == nil) then
2234 Action = "DEAD";
2235 if db then return end
2236 RotateAxisY:Destroy();
2237 TurretToFrame:Destroy();
2238 Joint:Destroy();
2239InvisiBox2:Destroy();
2240 db = true
2241 local expl = Instance.new("Explosion", Storage);
2242
2243expl.BlastRadius = .3;
2244expl.BlastPressure = 2050000;
2245 expl.Position = TopFrame.Position;
2246Explode:Play()
2247NoSentry = true
2248 game:service'Debris':AddItem(Storage, 3);
2249
2250 end
2251
2252end)
2253end
2254
2255
2256
2257combo = 0
2258 function strike(hit)
2259 if hit and hit.Parent and hit.Parent.Name ~= char.Name then
2260 local targetHumanoid = hit.Parent:FindFirstChild("Humanoid")
2261 if targetHumanoid and targetHumanoid ~= char:FindFirstChild("Humanoid") then
2262 if combo == 1 then
2263 targetHumanoid:TakeDamage(slashDamage)
2264 SwingH:Play()
2265
2266 end
2267
2268
2269
2270 end
2271 end
2272 end
2273
2274
2275
2276Reaper5.Touched:connect(strike)
2277--------------------------------------------------------------------------------------------------------------------------
2278 function AnimSit()
2279 for i = 0, 1, 0.05 do
2280
2281 swait()
2282 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, -1, -.6) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
2283 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
2284 LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.3, .1) * angles(math.rad(20), math.rad(0), math.rad(20)), 0.1)
2285 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(5)), 0.1)
2286 RH.C0 = clerp(RH.C0, cn(1, -.4, -.4) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
2287 LH.C0 = clerp(LH.C0, cn(-1, -1, -.6) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(60)), .1)
2288 end
2289
2290 end
2291
2292 function AnimSitHit1()
2293 for i = 0, 1, 0.05 do
2294
2295 swait()
2296 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, -1, -.6) * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
2297 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(0)), .1)
2298 LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.3, .1) * angles(math.rad(20), math.rad(0), math.rad(20)), 0.1)
2299 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(170), math.rad(0), math.rad(-5)), 0.08)
2300 RH.C0 = clerp(RH.C0, cn(1, -.4, -.4) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(10)), .1)
2301 LH.C0 = clerp(LH.C0, cn(-1, -1, -.6) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(50)), .1)
2302 end
2303
2304 end
2305
2306
2307 function AnimSitHit2()
2308 for i = 0, 1, 0.05 do
2309
2310 swait()
2311 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, -1, -.6) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
2312 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(15), math.rad(0), math.rad(0)), .1)
2313 LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.3, .1) * angles(math.rad(20), math.rad(0), math.rad(20)), 0.1)
2314 RW.C0 = clerp(RW.C0, CFrame.new(1.55, 0.4, -.1) * angles(math.rad(40), math.rad(3 ), math.rad(-15)), 0.3)
2315 RH.C0 = clerp(RH.C0, cn(1, -.4, -.4) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
2316 LH.C0 = clerp(LH.C0, cn(-1, -1, -.6) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(60)), .1)
2317 end
2318
2319 end
2320--------------------------------------------------------------------------------------------------------------------------
2321
2322 function No1()
2323 for i = 0, 1, 0.05 do
2324
2325 swait()
2326 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
2327 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(30), math.rad(0), math.rad(40)), .1)
2328 LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.1)
2329 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.1)
2330 RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
2331 LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
2332 end
2333
2334 end
2335
2336
2337
2338 function No2()
2339 for i = 0, 1, 0.05 do
2340
2341 swait()
2342 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
2343 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(-40)), .1)
2344 LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.1)
2345 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.1)
2346 RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
2347 LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
2348 end
2349
2350 end
2351
2352
2353
2354--------------------------------------------------------------------------------------------------------------------------
2355
2356 function Yes1()
2357 for i = 0, 1, 0.1 do
2358
2359 swait()
2360 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
2361 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(25), math.rad(0), math.rad(0)), .1)
2362 LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.1)
2363 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.1)
2364 RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
2365 LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
2366 end
2367
2368 end
2369
2370
2371
2372 function Yes2()
2373 for i = 0, 1, 0.1 do
2374
2375 swait()
2376 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
2377 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
2378 LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.1)
2379 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.1)
2380 RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
2381 LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
2382 end
2383
2384 end
2385
2386
2387
2388--------------------------------------------------------------------------------------------------------------------------
2389function AttackAnim1()
2390for i = 0, 1, 0.05 do
2391 swait()
2392 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
2393 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(0)), .1)
2394 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(170), math.rad(0), math.rad(10)), 0.08)
2395 LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(40), math.rad(0), math.rad(10)), 0.3)
2396 if Torsovelocity > 2 then
2397 RH.C0 = clerp(RH.C0, cn(1, -1 + .1 * math.cos(sine / 5), 0) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3)
2398 LH.C0 = clerp(LH.C0, cn(-1, -1 + .1 * math.cos(sine / 5), 0) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3)
2399 elseif Torsovelocity < 1 then
2400 RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(-5)), .1)
2401 LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(5)), .1)
2402 end
2403end
2404end
2405
2406
2407function AttackAnim2()
2408for i = 0, 1, 0.05 do
2409 swait()
2410 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(5), math.rad(0), math.rad(0)), .2)
2411 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(0)), .1)
2412 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(5), math.rad(10), math.rad(-10)), 0.25)
2413 LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(10)), 0.3)
2414 if Torsovelocity > 2 then
2415 RH.C0 = clerp(RH.C0, cn(1, -.9 + -.1 * math.cos(sine / 4),0 + -.1 * math.cos(sine / 4)) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3)
2416 LH.C0 = clerp(LH.C0, cn(-1, -.9 + .1 * math.cos(sine / 4), 0 + .1 * math.cos(sine / 4)) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3)
2417
2418 elseif Torsovelocity < 1 then
2419 RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(5)), .1)
2420 LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(-5)), .1)
2421 end
2422end
2423end
2424--------------------------------------------------------------------------------------------------------------------------
2425
2426
2427
2428function ShotAttackAnim1()
2429for i = 0, 1, 0.07 do
2430 swait()
2431
2432 if Torsovelocity > 2 then
2433 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(-50 - 5 * math.cos(sine / 5))), .2)
2434 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(50 + 5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2)
2435 RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, 0) * angles(math.rad(90), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.2)
2436 LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(85 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.2)
2437 RH.C0 = clerp(RH.C0, cn(.9, -.9 + -.1 * math.cos(sine / 4),-.6) * RHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3)
2438 LH.C0 = clerp(LH.C0, cn(-.9, -.9 + .1 * math.cos(sine / 4), .5) * LHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3)
2439
2440
2441
2442 elseif Torsovelocity < 1 then
2443
2444
2445 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-50)), .2)
2446 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(50)), .2)
2447 RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, 0) * angles(math.rad(90), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.2)
2448 LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(85 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.2)
2449 RH.C0 = clerp(RH.C0, cn(.9, -.9 - 0.1 * math.cos(sine / 25), -.6) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2)
2450 LH.C0 = clerp(LH.C0, cn(-.9, -.9 - 0.1 * math.cos(sine / 25), .5) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2)
2451
2452
2453 end
2454end
2455end
2456
2457
2458
2459
2460
2461function ShotAttackAnim2()
2462for i = 0, 1, 0.05 do
2463 swait()
2464
2465 if Torsovelocity > 2 then
2466 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(-50 - 5 * math.cos(sine / 5))), .2)
2467 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(50 + 5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2)
2468 RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, 0) * angles(math.rad(100), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.1)
2469 LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(75 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.1)
2470 RH.C0 = clerp(RH.C0, cn(.9, -.9 + -.1 * math.cos(sine / 4),-.6) * RHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3)
2471 LH.C0 = clerp(LH.C0, cn(-.9, -.9 + .1 * math.cos(sine / 4), .5) * LHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3)
2472
2473
2474
2475 elseif Torsovelocity < 1 then
2476
2477
2478 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-50)), .2)
2479 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(50)), .2)
2480 RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, 0) * angles(math.rad(100), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.1)
2481 LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(75 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.1)
2482 RH.C0 = clerp(RH.C0, cn(.9, -.9 - 0.1 * math.cos(sine / 25), -.6) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2)
2483 LH.C0 = clerp(LH.C0, cn(-.9, -.9 - 0.1 * math.cos(sine / 25), .5) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2)
2484
2485
2486 end
2487end
2488end
2489
2490
2491
2492function ShotAttackAnim3()
2493for i = 0, 1, 0.05 do
2494 swait()
2495
2496 if Torsovelocity > 2 then
2497 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(-50 - 5 * math.cos(sine / 5))), .2)
2498 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(50 + 5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2)
2499 RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.56, -.2) * angles(math.rad(45), math.rad(-20 - .01 * math.cos(sine / 25)), math.rad(-70 + 0.1 * math.cos(sine / 25))), 0.2)
2500 LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.6, -.6) * angles(math.rad(115 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-30 - 1 * math.cos(sine / 25))), 0.2)
2501 RH.C0 = clerp(RH.C0, cn(.9, -.9 + -.1 * math.cos(sine / 4),-.6) * RHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3)
2502 LH.C0 = clerp(LH.C0, cn(-.9, -.9 + .1 * math.cos(sine / 4), .5) * LHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3)
2503
2504
2505
2506 elseif Torsovelocity < 1 then
2507
2508
2509 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-50)), .2)
2510 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(50)), .2)
2511 RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.56, -.2) * angles(math.rad(45), math.rad(-20 - .01 * math.cos(sine / 25)), math.rad(-70 + 0.1 * math.cos(sine / 25))), 0.2)
2512 LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.6, -.6) * angles(math.rad(115 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-30 - 1 * math.cos(sine / 25))), 0.2)
2513 RH.C0 = clerp(RH.C0, cn(.9, -.9 - 0.1 * math.cos(sine / 25), -.6) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2)
2514 LH.C0 = clerp(LH.C0, cn(-.9, -.9 - 0.1 * math.cos(sine / 25), .5) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2)
2515
2516
2517 end
2518end
2519end
2520
2521function ShotAttackAnim4()
2522for i = 0, 1, 0.05 do
2523 swait()
2524
2525 if Torsovelocity > 2 then
2526 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(-50 - 5 * math.cos(sine / 5))), .2)
2527 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(50 + 5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2)
2528 RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.56, 0) * angles(math.rad(45), math.rad(-20 - .01 * math.cos(sine / 25)), math.rad(-70 + 0.1 * math.cos(sine / 25))), 0.2)
2529 LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.6, -.8) * angles(math.rad(115 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-50 - 1 * math.cos(sine / 25))), 0.2)
2530 RH.C0 = clerp(RH.C0, cn(.9, -.9 + -.1 * math.cos(sine / 4),-.6) * RHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3)
2531 LH.C0 = clerp(LH.C0, cn(-.9, -.9 + .1 * math.cos(sine / 4), .5) * LHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3)
2532
2533
2534
2535 elseif Torsovelocity < 1 then
2536
2537
2538 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-50)), .2)
2539 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(50)), .2)
2540 RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.56, 0) * angles(math.rad(45), math.rad(-20 - .01 * math.cos(sine / 25)), math.rad(-70 + 0.1 * math.cos(sine / 25))), 0.2)
2541 LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.6, -.8) * angles(math.rad(115 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-50 - 1 * math.cos(sine / 25))), 0.2)
2542 RH.C0 = clerp(RH.C0, cn(.9, -.9 - 0.1 * math.cos(sine / 25), -.6) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2)
2543 LH.C0 = clerp(LH.C0, cn(-.9, -.9 - 0.1 * math.cos(sine / 25), .5) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2)
2544
2545
2546 end
2547end
2548end
2549--------------------------------------------------------------------------------------------------------------------------
2550
2551 function DanAni1()
2552 for i = 0, .8, 0.05 + MusThingHat.Mesh.Scale.Y*0.025 do
2553
2554 swait()
2555 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,-.4) * angles(math.rad(5), math.rad(-8), math.rad(0)), MusThingHat.Mesh.Scale.Y*0.2)
2556 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(MusThingHat.Mesh.Scale.Y*30) +math.rad(-10),0,math.rad(0)),MusThingHat.Mesh.Scale.Y*0.2)
2557 LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -.25) * angles(math.rad(170), math.rad(0), math.rad(20)), MusThingHat.Mesh.Scale.Y*0.2)
2558 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.0) * angles(math.rad(90), math.rad(0), math.rad(-45)), MusThingHat.Mesh.Scale.Y*0.2)
2559 RH.C0 = clerp(RH.C0, cn(1, -.2, -.4) * RHCF * angles(math.rad(-4), math.rad(-15), math.rad(-5)), MusThingHat.Mesh.Scale.Y*0.3)
2560 LH.C0 = clerp(LH.C0, cn(-1, -1, -.0) * LHCF * angles(math.rad(4), math.rad(5), math.rad(5)), MusThingHat.Mesh.Scale.Y*0.2)
2561 end
2562
2563 end
2564
2565
2566
2567 function DanAni2()
2568 for i = 0, .8, 0.05 + MusThingHat.Mesh.Scale.Y*0.025 do
2569
2570 swait()
2571 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,-.5) * angles(math.rad(8), math.rad(8), math.rad(0)), MusThingHat.Mesh.Scale.Y*0.2)
2572 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(MusThingHat.Mesh.Scale.Y*30) +math.rad(-10),0,math.rad(0)),MusThingHat.Mesh.Scale.Y*0.2)
2573 LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.6, -.25) * angles(math.rad(180), math.rad(0), math.rad(25)), MusThingHat.Mesh.Scale.Y*0.2)
2574 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.0) * angles(math.rad(0), math.rad(0), math.rad(45)), MusThingHat.Mesh.Scale.Y*0.2)
2575 RH.C0 = clerp(RH.C0, cn(1, -1, -.0) * RHCF * angles(math.rad(4), math.rad(-5), math.rad(-8)), MusThingHat.Mesh.Scale.Y*0.2)
2576 LH.C0 = clerp(LH.C0, cn(-1, -.2, -.4) * LHCF * angles(math.rad(-4), math.rad(15), math.rad(8)), MusThingHat.Mesh.Scale.Y*0.3)
2577 end
2578
2579
2580 end
2581
2582
2583
2584--------------------------------------------------------------------------------------------------------------------------
2585
2586BuildNow = false
2587
2588Shotuse = false
2589
2590wait2 = false
2591
2592mouse.KeyDown:connect(function(key)
2593
2594 if key == "g" and attack == false then
2595yes:Play()
2596head.face.Texture = "http://www.roblox.com/asset/?id=393521316"
2597 humanoid.WalkSpeed = 0
2598 attack = true
2599 Yes1()
2600 Yes2()
2601 Yes1()
2602 Yes2()
2603 attack = false
2604 humanoid.WalkSpeed = 16
2605 head.face.Texture = "http://www.roblox.com/asset/?id=156600391"
2606 end
2607end)
2608
2609
2610mouse.KeyDown:connect(function(key)
2611 if key == "e" and attack == false then
2612if Wep == 1 then
2613Wep = 2
2614else
2615Wep = 1
2616end
2617
2618
2619 end
2620 end)
2621
2622mouse.KeyDown:connect(function(key)
2623 if key == "p" and attack == false then
2624
2625Wep = 3
2626
2627
2628
2629 end
2630 end)
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643equippedgun = true
2644
2645
2646
2647
2648coroutine.wrap(function()
2649while equippedgun do
2650
2651if spread < 0 then spread = 0 end
2652if humanoid.Health == 0 then break end
2653
2654
2655game:service'RunService'.Stepped:wait()
2656end
2657end)()
2658
2659mouse.Button1Down:connect(function()
2660if debounce then return end
2661if equippedgun2 == true and attack == false then
2662 Shotuse = true
2663debounce = true
2664
2665wait(.2)
2666
2667sound:play()
2668
2669
2670
2671coroutine.wrap(function()
2672wait(0.3)
2673for angle = 0, 4 do
2674
2675wait()
2676end
2677
2678wait(0.2)
2679sound2:play()
2680
2681
2682wait(0.1)
2683for move = 0, 3 do
2684if move > 2 then return end
2685
2686
2687wait(0.06)
2688end
2689end)()
2690spread = spread + 1
2691coroutine.wrap(function()
2692for bullitz = 0, 7 do
2693if bullitz > 6 then return end
2694rayCast2(300, 1, Reaper4)
2695GunParticle.Enabled = true
2696 local PointLight = Instance.new("PointLight", Reaper4);
2697 PointLight.Color = Color3.new(.2,.2,0)
2698 PointLight.Brightness = 2;
2699 game:service'Debris':AddItem(PointLight, .05);
2700end
2701end)()
2702coroutine.wrap(function()
2703for _ = 0, 50 do
2704pcall(function()
2705spread = spread - 0.03
2706end)
2707wait()
2708end
2709end)()
2710wait(1)
2711debounce = false
2712end
2713
2714end)
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724mouse.Button1Down:connect(function(key)
2725
2726 if attack == false and Wep == 1 then
2727attack = true
2728
2729AttackAnim1()
2730combo = 1
2731Swing:Play()
2732AttackAnim2()
2733attack = false
2734combo = 0
2735 end
2736end)
2737
2738
2739
2740mouse.KeyDown:connect(function(key)
2741
2742 if key == "f" and attack == false then
2743 No:Play()
2744 humanoid.WalkSpeed = 0
2745 attack = true
2746 No1()
2747 No2()
2748 attack = false
2749 humanoid.WalkSpeed = 16
2750 end
2751end)
2752
2753
2754
2755
2756mouse.KeyDown:connect(function(key)
2757if attack == false or DA == true then
2758 if key == "r" and Wep == 3 then
2759
2760if DA == false then
2761DA = true
2762RUS:Play()
2763attack=true
2764humanoid.WalkSpeed = 0
2765head.face.Texture = "http://www.roblox.com/asset/?id=393521316"
2766else
2767DA = false
2768RUS:Stop()
2769attack=false
2770humanoid.WalkSpeed = 16
2771head.face.Texture = "http://www.roblox.com/asset/?id=156600391"
2772end
2773 end
2774 end
2775 end)
2776
2777
2778
2779mouse.KeyDown:connect(function(key)
2780
2781 if key == "t" and attack == false then
2782 Taunt:Play()
2783 humanoid.WalkSpeed = 0
2784 attack = true
2785 No1()
2786 Yes2()
2787 attack = false
2788 humanoid.WalkSpeed = 16
2789 end
2790end)
2791
2792mouse.KeyDown:connect(function(key)
2793 if key == "z" then
2794
2795
2796
2797 if NoSentry == false and attack == false and wait2 == false then
2798wait2 = true
2799 for i,v in pairs(script:children()) do
2800 if (v:IsA'Model') then
2801
2802
2803 for i,v in pairs(v:children()) do
2804 if (v:IsA'Humanoid') then
2805 v.Health = 0
2806 end
2807 end
2808
2809
2810 end
2811
2812 NoSentry = true
2813
2814 end
2815
2816
2817
2818 end
2819
2820
2821
2822 if NoSentry == true and attack == false and wait2 == false and Wep == 1 then
2823 attack = true
2824 wait2 = true
2825 humanoid.WalkSpeed = 0
2826AnimSit()
2827AnimSitHit1()
2828WSH = WSHM[math.random(1,#WSHM)]
2829HitM.SoundId = "rbxassetid://"..WSH
2830HitM:Play()
2831BuildNow = true
2832AnimSitHit2()
2833AnimSitHit1()
2834WSH = WSHM[math.random(1,#WSHM)]
2835HitM.SoundId = "rbxassetid://"..WSH
2836HitM:Play()
2837AnimSitHit2()
2838AnimSitHit1()
2839WSH = WSHM[math.random(1,#WSHM)]
2840HitM.SoundId = "rbxassetid://"..WSH
2841HitM:Play()
2842AnimSitHit2()
2843AnimSitHit1()
2844WSH = WSHM[math.random(1,#WSHM)]
2845HitM.SoundId = "rbxassetid://"..WSH
2846HitM:Play()
2847AnimSitHit2()
2848AnimSitHit1()
2849WSH = WSHM[math.random(1,#WSHM)]
2850HitM.SoundId = "rbxassetid://"..WSH
2851HitM:Play()
2852AnimSitHit2()
2853AnimSitHit1()
2854WSH = WSHM[math.random(1,#WSHM)]
2855HitM.SoundId = "rbxassetid://"..WSH
2856HitM:Play()
2857AnimSitHit2()
2858AnimSitHit1()
2859WSH = WSHM[math.random(1,#WSHM)]
2860HitM.SoundId = "rbxassetid://"..WSH
2861HitM:Play()
2862AnimSitHit2()
2863AnimSitHit1()
2864WSH = WSHM[math.random(1,#WSHM)]
2865HitM.SoundId = "rbxassetid://"..WSH
2866HitM:Play()
2867AnimSitHit2()
2868AnimSitHit1()
2869WSH = WSHM[math.random(1,#WSHM)]
2870HitM.SoundId = "rbxassetid://"..WSH
2871HitM:Play()
2872AnimSitHit2()
2873AnimSitHit1()
2874WSH = WSHM[math.random(1,#WSHM)]
2875HitM.SoundId = "rbxassetid://"..WSH
2876HitM:Play()
2877AnimSitHit2()
2878AnimSit()
2879
2880 humanoid.WalkSpeed = 16
2881 attack = false
2882NoSentry = false
2883
2884 end
2885 wait()
2886
2887 wait2 = false
2888end end)
2889
2890
2891
2892humanoid.Died:connect(function()
2893 Arms:Destroy()
2894end)
2895
2896print([[
2897
2898
2899----------------------------------------
2900Tf2 Engineer Class
2901----------------------------------------
2902Script by: 123jl123
2903Sentry by: Madiik
2904TheBoozled gave me a Mesh and Sounds from tf2
2905----------------------------------------
2906Dont leak and dont do it.....
2907----------------------------------------
2908]])
2909
2910game:GetService("RunService"):BindToRenderStep("ew", 0, function()
2911 MusThingHat.Mesh.Scale = Vector3.new(MusThingHat.Mesh.Scale.X, RUS.PlaybackLoudness / 160, MusThingHat.Mesh.Scale.Z)
2912end)
2913
2914 local mesh1anan = Instance.new("SpecialMesh")
2915 mesh1anan.MeshType = Enum.MeshType.FileMesh
2916 mesh1anan.Scale = Vector3.new(3,3,3)
2917mesh1anan.MeshId = "http://www.roblox.com/asset/?id=521754610"
2918mesh1anan.TextureId = "http://www.roblox.com/asset/?id=521754612"
2919
2920Glow1 = Color3.new(1,1,1)
2921Glow2 = Color3.new(0,0,0)
2922
2923GlowParticle = Instance.new("ParticleEmitter")
2924GlowParticle.LightEmission = 1
2925
2926GlowParticle.Size = NumberSequence.new(0,2)
2927GlowParticle.Texture = "http://www.roblox.com/asset/?id=52620985"
2928GlowParticle.Transparency = NumberSequence.new(0,1)
2929GlowParticle.LockedToPart = false
2930GlowParticle.Lifetime = NumberRange.new(0.5)
2931GlowParticle.Rate= 25
2932GlowParticle.Speed =NumberRange.new(0)
2933
2934
2935 function RainDucks()
2936 local locationanan = char.Torso.CFrame
2937 local tacoa = Instance.new("Part")
2938 tacoa.Size = Vector3.new(.5,.5,.5)
2939 tacoa.CanCollide = false
2940 tacoa.RotVelocity = Vector3.new(math.random(0,6),math.random(0,6),math.random(0,6))
2941 local meshanananan = mesh1anan:clone()
2942 meshanananan.Parent = tacoa
2943 meshanananan.Scale = Vector3.new(1,1,1)
2944 tacoa.CFrame = locationanan * CFrame.new(math.random(-8,8),math.random(10,40),math.random(-8,8))
2945 tacoa.Parent = workspace
2946
2947
2948 game:GetService("Debris"):AddItem(tacoa,4)
2949 local GP = GlowParticle:clone()
2950 GP.Parent = tacoa
2951 Glow1 = Color3.new(math.random(), math.random(), math.random())
2952 GP.Color = ColorSequence.new(Glow1,Glow2)
2953
2954 end
2955
2956
2957
2958--]]
2959
2960
2961
2962while true do wait()
2963 if BuildNow == true then
2964 BuildNow = false
2965
2966BuildSentry()
2967 end
2968 if Shotuse == true then
2969 Shotuse = false
2970 attack = true
2971 ShotAttackAnim1()
2972 GunParticle.Enabled = false
2973 ShotAttackAnim2()
2974 ShotAttackAnim3()
2975 ShotAttackAnim4()
2976 ShotAttackAnim3()
2977 attack = false
2978 end
2979
2980
2981
2982
2983if DA == true then
2984DanAni1()
2985 RainDucks()
2986 local PointLight = Instance.new("PointLight", Torso);
2987 PointLight.Color = Color3.new(math.random(), math.random(), math.random())
2988 PointLight.Brightness = 50;
2989 PointLight.Range = MusThingHat.Mesh.Scale.Y*10;
2990 game:service'Debris':AddItem(PointLight, .3);
2991
2992DanAni2()
2993 RainDucks()
2994 local PointLight = Instance.new("PointLight", Torso);
2995 PointLight.Color = Color3.new(math.random(), math.random(), math.random())
2996 PointLight.Brightness = 50;
2997 PointLight.Range = MusThingHat.Mesh.Scale.Y*10;
2998 game:service'Debris':AddItem(PointLight, .3);
2999
3000
3001
3002end
3003
3004
3005
3006
3007
3008
3009end