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