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