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