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