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