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