· 7 years ago · Feb 16, 2019, 07:26 PM
1-- This script has been converted to FE by iPxter
2
3
4if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
5local Player,Mouse,mouse,UserInputService,ContextActionService = owner
6do
7 print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
8 script.Parent = Player.Character
9
10 --RemoteEvent for communicating
11 local Event = Instance.new("RemoteEvent")
12 Event.Name = "UserInput_Event"
13
14 --Fake event to make stuff like Mouse.KeyDown work
15 local function fakeEvent()
16 local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
17 t.connect = t.Connect
18 return t
19 end
20
21 --Creating fake input objects with fake variables
22 local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
23 local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
24 local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
25 CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
26 end}
27 --Merged 2 functions into one by checking amount of arguments
28 CAS.UnbindAction = CAS.BindAction
29
30 --This function will trigger the events that have been :Connect()'ed
31 local function te(self,ev,...)
32 local t = m[ev]
33 if t and t._fakeEvent and t.Function then
34 t.Function(...)
35 end
36 end
37 m.TrigEvent = te
38 UIS.TrigEvent = te
39
40 Event.OnServerEvent:Connect(function(plr,io)
41 if plr~=Player then return end
42 if io.isMouse then
43 m.Target = io.Target
44 m.Hit = io.Hit
45 else
46 local b = io.UserInputState == Enum.UserInputState.Begin
47 if io.UserInputType == Enum.UserInputType.MouseButton1 then
48 return m:TrigEvent(b and "Button1Down" or "Button1Up")
49 end
50 for _,t in pairs(CAS.Actions) do
51 for _,k in pairs(t.Keys) do
52 if k==io.KeyCode then
53 t.Function(t.Name,io.UserInputState,io)
54 end
55 end
56 end
57 m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
58 UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
59 end
60 end)
61 Event.Parent = NLS([==[
62 local Player = game:GetService("Players").LocalPlayer
63 local Event = script:WaitForChild("UserInput_Event")
64
65 local UIS = game:GetService("UserInputService")
66 local input = function(io,a)
67 if a then return end
68 --Since InputObject is a client-side instance, we create and pass table instead
69 Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
70 end
71 UIS.InputBegan:Connect(input)
72 UIS.InputEnded:Connect(input)
73
74 local h,t
75 --Give the server mouse data 30 times every second, but only if the values changed
76 --If player is not moving their mouse, client won't fire events
77 while wait(1/30) do
78 if h~=Mouse.Hit or t~=Mouse.Target then
79 h,t=Mouse.Hit,Mouse.Target
80 Event:FireServer({isMouse=true,Target=t,Hit=h})
81 end
82 end]==],Player.Character)
83 Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
84end
85
86
87--[[
88Tf2 Engineer Class
89--------------------
90Script by: 123jl123
91---------------------
92Sentry by: Madiik
93-- ]]
94
95
96local plr = owner
97local char = plr.Character
98local humanoid = char:findFirstChild("Humanoid")
99local torso = char:findFirstChild("Torso")
100local head = char.Head
101local ra = char:findFirstChild("Right Arm")
102local la = char:findFirstChild("Left Arm")
103local rl = char:findFirstChild("Right Leg")
104local ll = char:findFirstChild("Left Leg")
105local rs = torso:findFirstChild("Right Shoulder")
106local ls = torso:findFirstChild("Left Shoulder")
107local rh = torso:findFirstChild("Right Hip")
108local lh = torso:findFirstChild("Left Hip")
109local neck = torso:findFirstChild("Neck")
110local rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
111local rootpart = char:findFirstChild("HumanoidRootPart")
112local camera = workspace.CurrentCamera
113local anim = char:findFirstChild("Animate")
114DA = false
115NoSentry = true
116maincolor = owner
117secondcolor = "Really black"
118WSHM = {'10209908','10209905','10209905','10209908'}
119WSH = WSHM[math.random(1,#WSHM)]
120wait(1 / 60)
121Effects = { }
122local Player = owner
123local Character = Player.Character
124local Humanoid = Character.Humanoid
125local LeftArm = Character["Left Arm"]
126local RightArm = Character["Right Arm"]
127local LeftLeg = Character["Left Leg"]
128local RightLeg = Character["Right Leg"]
129local Head = Character.Head
130local Torso = Character.Torso
131local cam = game.Workspace.CurrentCamera
132local RootPart = Character.HumanoidRootPart
133local RootJoint = RootPart.RootJoint
134local equipped = false
135local attack = false
136local Anim = 'Idle'
137local idle = 0
138local attacktype = 1
139local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
140local velocity = RootPart.Velocity.y
141local sine = 0
142local change = 1
143local grabbed = false
144local cn = CFrame.new
145local mr = math.rad
146local angles = CFrame.Angles
147local ud = UDim2.new
148local c3 = Color3.new
149local slashDamage = 15
150trans = 1
151for i,v in pairs(char:GetChildren()) do if v:IsA("Accessory") then v:Remove() end end
152for i,v in pairs(char:GetChildren()) do if v:IsA("Hat") then v:Remove() end end
153Wep = 1
154equippedgun2 = false
155
156
157
158
159
160
161
162
163
164
165--SB Plasma Shotgun 2013
166
167--madiik's plasma shottie
168
169--variables
170
171
172
173--some more variables
174
175local spread = 1
176-- end of some more variables
177
178local sound = Instance.new("Sound",head)
179sound.SoundId = "http://www.roblox.com/asset?id=10209842"
180sound.Volume = 2
181sound.Pitch = 1
182
183
184
185
186
187
188
189local sound2 = Instance.new("Sound",head)
190sound2.SoundId = "http://www.roblox.com/asset?id=10209881"
191sound2.Volume = 1
192sound2.Pitch = 1
193
194
195
196
197
198
199
200function attach(weld, part0, part1)
201weld.Part0 = part0
202weld.Part1 = part1
203end
204
205
206
207
208
209
210
211
212
213--create func
214function part(parent, size, color, formfactor, collide, transparency)
215if transparency == nil then transparency = 0 end
216if collide == nil then collide = false end
217if formfactor == nil then formfactor = Enum.FormFactor.Custom end
218local p=Instance.new("Part", parent)
219p.FormFactor=formfactor
220p.CanCollide=false
221p.Size=size
222p.Locked=true
223p.Transparency=transparency
224p.Position=torso.Position
225p.BrickColor=color
226p.FrontSurface="SmoothNoOutlines"
227p.BackSurface="SmoothNoOutlines"
228p.LeftSurface="SmoothNoOutlines"
229p.BottomSurface="SmoothNoOutlines"
230p.TopSurface="SmoothNoOutlines"
231p.RightSurface="SmoothNoOutlines"
232return p
233end
234function wedge(parent, size, color, formfactor, collide, transparency)
235
236if transparency == nil then transparency = 0 end
237if collide == nil then collide = false end
238if formfactor == nil then formfactor = Enum.FormFactor.Custom end
239
240local p=Instance.new("WedgePart", parent)
241p.FormFactor=formfactor
242p.CanCollide=false
243p.Size=size
244p.Locked=true
245p.Position = torso.Position
246p.BrickColor=color
247p.FrontSurface="SmoothNoOutlines"
248p.BackSurface="SmoothNoOutlines"
249p.LeftSurface="SmoothNoOutlines"
250p.BottomSurface="SmoothNoOutlines"
251p.TopSurface="SmoothNoOutlines"
252p.RightSurface="SmoothNoOutlines"
253return p
254end
255function weld(part0, part1, c0, parent, c1)
256if parent == nil then parent = gun end
257if c1 == nil then c1 = CFrame.new() end
258
259local wel=Instance.new("Weld", parent)
260wel.Part0 = part0
261wel.Part1 = part1
262wel.C0 = c0
263wel.C1 = c1
264return wel
265end
266function specialmesh(parent, meshType, scale, meshId)
267local mesh = Instance.new("SpecialMesh", parent)
268mesh.Scale = scale
269mesh.MeshType = meshType
270mesh.MeshId = meshId
271return mesh
272end
273
274
275--some ray functi0n
276
277function rayCast2(speed, gravity, from)
278coroutine.wrap(function()
279if char.Humanoid.Health == 0 then return end
280local rayP = Instance.new("Part")
281rayP.Name = "rayP"
282rayP.BrickColor = BrickColor.new("New Yeller")
283rayP.Material = 'Neon'
284rayP.Anchored = true
285rayP.CanCollide = false
286rayP.Locked = true
287rayP.TopSurface = Enum.SurfaceType.Smooth
288rayP.BottomSurface = Enum.SurfaceType.Smooth
289rayP.formFactor = Enum.FormFactor.Custom
290rayP.Size = Vector3.new(0.2, 0.2, 0.2)
291
292
293
294Instance.new("BlockMesh", rayP).Scale = Vector3.new(0.2, 0.2, 10)
295
296
297
298
299
300
301
302
303local bulletposition = from.Position + Vector3.new(0, 0.3, 0)
304
305local bulletvelocity = (Vector3.new(math.random(-spread*4,spread*4), math.random(-spread*4,spread*4), math.random()
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
985local RbxUtility = LoadLibrary("RbxUtility")
986local Create = RbxUtility.Create
987
988function RemoveOutlines(part)
989 part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
990end
991
992function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size)
993 local Part = Create("Part"){
994 formFactor = FormFactor,
995 Parent = Parent,
996 Reflectance = Reflectance,
997 Transparency = Transparency,
998 CanCollide = false,
999 Locked = true,
1000 BrickColor = BrickColor.new(tostring(BColor)),
1001 Name = Name,
1002 Size = Size,
1003 Material = Material,
1004 }
1005 RemoveOutlines(Part)
1006 return Part
1007end
1008
1009function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
1010 local Msh = Create(Mesh){
1011 Parent = Part,
1012 Offset = OffSet,
1013 Scale = Scale,
1014 }
1015 if Mesh == "SpecialMesh" then
1016 Msh.MeshType = MeshType
1017 Msh.MeshId = MeshId
1018 end
1019 return Msh
1020end
1021
1022function CreateWeld(Parent, Part0, Part1, C0, C1)
1023 local Weld = Create("Weld"){
1024 Parent = Parent,
1025 Part0 = Part0,
1026 Part1 = Part1,
1027 C0 = C0,
1028 C1 = C1,
1029 }
1030 return Weld
1031end
1032
1033function rayCast(Position, Direction, Range, Ignore)
1034 return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
1035end
1036
1037function CreateSound(id, par, vol, pit)
1038 coroutine.resume(coroutine.create(function()
1039 local sou = Instance.new("Sound", par or workspace)
1040 sou.Volume = vol
1041 sou.Pitch = pit or 1
1042 sou.SoundId = id
1043 wait()
1044 sou:play()
1045 game:GetService("Debris"):AddItem(sou, 6)
1046 end))
1047end
1048
1049local function getclosest(obj, distance)
1050 local last, lastx = distance + 1
1051 for i, v in pairs(workspace:GetChildren()) do
1052 if v:IsA'Model' and v ~= Character and v:findFirstChild('Humanoid') and v:findFirstChild('Torso') and v:findFirstChild('Humanoid').Health > 0 then
1053 local t = v.Torso
1054 local dist = (t.Position - obj.Position).magnitude
1055 if dist <= distance then
1056 if dist < last then
1057 last = dist
1058 lastx = v
1059 end
1060 end
1061 end
1062 end
1063 return lastx
1064end
1065
1066function Damage(hit, damage, cooldown, Color1, Color2, HSound, HPitch)
1067 for i, v in pairs(hit:GetChildren()) do
1068 if v:IsA("Humanoid") and hit.Name ~= Character.Name then
1069 local find = v:FindFirstChild("Hitz")
1070 if not find then
1071 if v.Parent:findFirstChild("Head") then
1072 local BillG = Create("BillboardGui"){
1073 Parent = v.Parent.Head,
1074 Size = UDim2.new(1, 0, 1, 0),
1075 Adornee = v.Parent.Head,
1076 StudsOffset = Vector3.new(math.random(-3, 3), math.random(3, 5), math.random(-3, 3)),
1077 }
1078 local TL = Create("TextLabel"){
1079 Parent = BillG,
1080 Size = UDim2.new(3, 3, 3, 3),
1081 BackgroundTransparency = 1,
1082 Text = tostring(damage).."-",
1083 TextColor3 = Color1.Color,
1084 TextStrokeColor3 = Color2.Color,
1085 TextStrokeTransparency = 0,
1086 TextXAlignment = Enum.TextXAlignment.Center,
1087 TextYAlignment = Enum.TextYAlignment.Center,
1088 FontSize = Enum.FontSize.Size18,
1089 Font = "ArialBold",
1090 }
1091 coroutine.resume(coroutine.create(function()
1092 wait(1)
1093 for i = 0, 1, .1 do
1094 wait(.1)
1095 BillG.StudsOffset = BillG.StudsOffset + Vector3.new(0, .1, 0)
1096 end
1097 BillG:Destroy()
1098 end))
1099 end
1100 v.Health = v.Health - damage
1101 local bool = Create("BoolValue"){
1102 Parent = v,
1103 Name = 'Hitz',
1104 }
1105 if HSound ~= nil and HPitch ~= nil then
1106 CreateSound(HSound, hit, 1, HPitch)
1107 end
1108 game:GetService("Debris"):AddItem(bool, cooldown)
1109 end
1110 end
1111 end
1112end
1113
1114
1115function BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
1116 local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
1117 prt.Anchored = true
1118 prt.CFrame = cframe
1119 local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
1120 game:GetService("Debris"):AddItem(prt, 10)
1121 if Type == 1 or Type == nil then
1122 table.insert(Effects, {
1123 prt,
1124 "Block1",
1125 delay,
1126 x3,
1127 y3,
1128 z3,
1129 msh
1130 })
1131 elseif Type == 2 then
1132 table.insert(Effects, {
1133 prt,
1134 "Block2",
1135 delay,
1136 x3,
1137 y3,
1138 z3,
1139 msh
1140 })
1141 end
1142end
1143
1144function SphereEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
1145 local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
1146 prt.Anchored = true
1147 prt.CFrame = cframe
1148 local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
1149 game:GetService("Debris"):AddItem(prt, 10)
1150 table.insert(Effects, {
1151 prt,
1152 "Cylinder",
1153 delay,
1154 x3,
1155 y3,
1156 z3,
1157 msh
1158 })
1159end
1160
1161function RingEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
1162 local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
1163 prt.Anchored = true
1164 prt.CFrame = cframe * CFrame.new(x1, y1, z1)
1165 local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
1166 game:GetService("Debris"):AddItem(prt, 10)
1167 table.insert(Effects, {
1168 prt,
1169 "Cylinder",
1170 delay,
1171 x3,
1172 y3,
1173 z3,
1174 msh
1175 })
1176end
1177
1178function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
1179 local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
1180 prt.Anchored = true
1181 prt.CFrame = cframe
1182 local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
1183 game:GetService("Debris"):AddItem(prt, 10)
1184 table.insert(Effects, {
1185 prt,
1186 "Cylinder",
1187 delay,
1188 x3,
1189 y3,
1190 z3,
1191 msh
1192 })
1193end
1194
1195function WaveEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
1196 local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
1197 prt.Anchored = true
1198 prt.CFrame = cframe
1199 local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
1200 game:GetService("Debris"):AddItem(prt, 10)
1201 table.insert(Effects, {
1202 prt,
1203 "Cylinder",
1204 delay,
1205 x3,
1206 y3,
1207 z3,
1208 msh
1209 })
1210end
1211
1212function SpecialEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
1213 local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
1214 prt.Anchored = true
1215 prt.CFrame = cframe
1216 local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "24388358", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
1217 game:GetService("Debris"):AddItem(prt, 10)
1218 table.insert(Effects, {
1219 prt,
1220 "Cylinder",
1221 delay,
1222 x3,
1223 y3,
1224 z3,
1225 msh
1226 })
1227end
1228
1229function BreakEffect(brickcolor, cframe, x1, y1, z1)
1230 local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
1231 prt.Anchored = true
1232 prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
1233 local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
1234 local num = math.random(10, 50) / 1000
1235 game:GetService("Debris"):AddItem(prt, 10)
1236 table.insert(Effects, {
1237 prt,
1238 "Shatter",
1239 num,
1240 prt.CFrame,
1241 math.random() - math.random(),
1242 0,
1243 math.random(50, 100) / 100
1244 })
1245end
1246
1247
1248
1249
1250 for i = 0, 1, 0.05 do
1251 swait()
1252 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
1253 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(0)), .1)
1254 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(5), math.rad(0), math.rad(5)), 0.1)
1255 LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-10)), 0.3)
1256 if Torsovelocity > 2 then
1257 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)
1258 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)
1259 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)
1260 elseif Torsovelocity < 1 then
1261 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(5), math.rad(0), math.rad(5)), 0.1)
1262 RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
1263 LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
1264 end
1265 end
1266 attack = false
1267
1268
1269
1270game:GetService'RunService'.Stepped:connect(function()
1271
1272
1273
1274 if Wep == 1 then
1275 equippedgun2 = false
1276Reaper4.Transparency = 1
1277 Reaper5.Transparency = 0
1278 Reaper6.Transparency = 1
1279 Reaper7.Transparency = 0
1280 end
1281 if Wep == 2 then
1282 equippedgun2 = true
1283Reaper4.Transparency = 0
1284 Reaper5.Transparency = 1
1285 Reaper6.Transparency = 0
1286 Reaper7.Transparency = 1
1287 end
1288 if Wep == 3 then
1289 equippedgun2 = false
1290Reaper4.Transparency = 1
1291 Reaper5.Transparency = 1
1292 Reaper6.Transparency = 1
1293 Reaper7.Transparency = 1
1294 end
1295
1296 Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
1297 velocity = RootPart.Velocity.y
1298 sine = sine + change
1299 local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character)
1300 if equipped == true or equipped == false then
1301 if RootPart.Velocity.y > 1 and hit == nil then
1302 Anim = "Jump"
1303 if attack == false and Wep == 1 then
1304 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
1305 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
1306 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-40), math.rad(0), math.rad(30)), .1)
1307 LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-40), math.rad(0), math.rad(-30)), .1)
1308 RH.C0 = clerp(RH.C0, cn(1, -.9, -.3) * RHCF * angles(math.rad(3), math.rad(0), math.rad(0)), .1)
1309 LH.C0 = clerp(LH.C0, cn(-1, -.7, -.5) * LHCF * angles(math.rad(-3), math.rad(0), math.rad(0)), .1)
1310 end
1311 elseif RootPart.Velocity.y < -1 and hit == nil then
1312 Anim = "Fall"
1313 if attack == false and Wep == 1 then
1314 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(10), 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(-20), math.rad(0), math.rad(50)), .1)
1317 LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-50)), .1)
1318 RH.C0 = clerp(RH.C0, cn(1, -1, -.3) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
1319 LH.C0 = clerp(LH.C0, cn(-1, -.8, -.3) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
1320 end
1321 elseif Torsovelocity < 1 and hit ~= nil then
1322 Anim = "Idle"
1323 if attack == false and Wep == 1 then
1324 change = 1
1325 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)
1326 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5 - 2 * math.cos(sine / 25)), math.rad(0), math.rad(-5)), .1)
1327 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)
1328 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)
1329 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)
1330 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)
1331 end
1332 elseif Torsovelocity > 2 and hit ~= nil then
1333 Anim = "Walk"
1334 if attack == false and Wep == 1 then
1335 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)
1336 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)
1337 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)
1338 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)
1339 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)
1340 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)
1341 end
1342 end
1343 end
1344 -----------------------[Anim2]--------------------------------------------------------------------------------------------------------------------------
1345
1346 if equipped == true or equipped == false then
1347 if RootPart.Velocity.y > 1 and hit == nil then
1348 Anim = "Jump"
1349 if attack == false and Wep == 2 then
1350 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
1351 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
1352 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)
1353 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)
1354 RH.C0 = clerp(RH.C0, cn(1, -.9, -.3) * RHCF * angles(math.rad(3), math.rad(0), math.rad(0)), .1)
1355 LH.C0 = clerp(LH.C0, cn(-1, -.7, -.5) * LHCF * angles(math.rad(-3), math.rad(0), math.rad(0)), .1)
1356 end
1357
1358 elseif RootPart.Velocity.y < -1 and hit == nil then
1359 Anim = "Fall"
1360 if attack == false and Wep == 2 then
1361 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
1362 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
1363 RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.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)
1364 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)
1365 RH.C0 = clerp(RH.C0, cn(1, -1, -.3) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
1366 LH.C0 = clerp(LH.C0, cn(-1, -.8, -.3) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
1367 end
1368 elseif Torsovelocity < 1 and hit ~= nil then
1369 Anim = "Idle"
1370 if attack == false and Wep == 2 then
1371 change = 1
1372 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)
1373 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5 - 2 * math.cos(sine / 25)), math.rad(0), math.rad(-5)), .1)
1374 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)
1375 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)
1376 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)
1377 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)
1378 end
1379 elseif Torsovelocity > 2 and hit ~= nil then
1380 Anim = "Walk"
1381 if attack == false and Wep == 2 then
1382 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)
1383 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)
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(.95, -.9 + -.1 * math.cos(sine / 4),-.35) * RHCF * angles(math.rad(-2), math.rad(25), math.rad(50 * math.cos(sine / 4))), .3)
1387 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)
1388 end
1389
1390 end
1391 end
1392
1393
1394
1395 -----------------------[Noraml Anim]--------------------------------------------------------------------------------------------------------------------------
1396
1397 if equipped == true or equipped == false then
1398 if RootPart.Velocity.y > 1 and hit == nil then
1399 Anim = "Jump"
1400 if attack == false and Wep == 3 then
1401 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
1402 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
1403 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-40), math.rad(0), math.rad(30)), .1)
1404 LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-40), math.rad(0), math.rad(-30)), .1)
1405 RH.C0 = clerp(RH.C0, cn(1, -.9, -.3) * RHCF * angles(math.rad(3), math.rad(0), math.rad(0)), .1)
1406 LH.C0 = clerp(LH.C0, cn(-1, -.7, -.5) * LHCF * angles(math.rad(-3), math.rad(0), math.rad(0)), .1)
1407 end
1408 elseif RootPart.Velocity.y < -1 and hit == nil then
1409 Anim = "Fall"
1410 if attack == false and Wep == 3 then
1411 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(10), 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(-20), math.rad(0), math.rad(50)), .1)
1414 LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-50)), .1)
1415 RH.C0 = clerp(RH.C0, cn(1, -1, -.3) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
1416 LH.C0 = clerp(LH.C0, cn(-1, -.8, -.3) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
1417 end
1418 elseif Torsovelocity < 1 and hit ~= nil then
1419 Anim = "Idle"
1420 if attack == false and Wep == 3 then
1421 change = 1
1422 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)
1423 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5 - 2 * math.cos(sine / 25)), math.rad(0), math.rad(-5)), .1)
1424 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)
1425 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)
1426 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)
1427 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)
1428 end
1429 elseif Torsovelocity > 2 and hit ~= nil then
1430 Anim = "Walk"
1431 if attack == false and Wep == 3 then
1432 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)
1433 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)
1434 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)
1435 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)
1436 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)
1437 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)
1438 end
1439 end
1440 end
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459 if #Effects > 0 then
1460 for e = 1, #Effects do
1461 if Effects[e] ~= nil then
1462 local Thing = Effects[e]
1463 if Thing ~= nil then
1464 local Part = Thing[1]
1465 local Mode = Thing[2]
1466 local Delay = Thing[3]
1467 local IncX = Thing[4]
1468 local IncY = Thing[5]
1469 local IncZ = Thing[6]
1470 if Thing[1].Transparency <= 1 then
1471 if Thing[2] == "Block1" then
1472 Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
1473 local Mesh = Thing[1].Mesh
1474 Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1475 Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1476 elseif Thing[2] == "Block2" then
1477 Thing[1].CFrame = Thing[1].CFrame
1478 local Mesh = Thing[7]
1479 Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1480 Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1481 elseif Thing[2] == "Cylinder" then
1482 local Mesh = Thing[1].Mesh
1483 Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1484 Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1485 elseif Thing[2] == "Blood" then
1486 local Mesh = Thing[7]
1487 Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, .5, 0)
1488 Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1489 Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1490 elseif Thing[2] == "Elec" then
1491 local Mesh = Thing[1].Mesh
1492 Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
1493 Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1494 elseif Thing[2] == "Disappear" then
1495 Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1496 elseif Thing[2] == "Shatter" then
1497 Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1498 Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
1499 Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
1500 Thing[6] = Thing[6] + Thing[5]
1501 end
1502 else
1503 Part.Parent = nil
1504 table.remove(Effects, e)
1505 end
1506 end
1507 end
1508 end
1509 end
1510end)
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524local No = Instance.new("Sound", head);
1525No.SoundId = "rbxassetid://245064504"
1526No.Volume = 3
1527local yes = Instance.new("Sound", head);
1528yes.SoundId = "rbxassetid://131384028"
1529yes.Volume = 3
1530local HitM = Instance.new("Sound", Reaper5);
1531HitM.SoundId = "rbxassetid://"..WSH
1532HitM.Volume = 1.1
1533local Swing = Instance.new("Sound", Reaper5);
1534Swing.SoundId = "rbxassetid://10209850"
1535Swing.Volume = 1.5
1536Swing.Pitch = 1.1
1537local SwingH = Instance.new("Sound", Reaper5);
1538SwingH.SoundId = "rbxassetid://10209590"
1539SwingH.Volume = 2.9
1540SwingH.Pitch = .8
1541local Taunt = Instance.new("Sound", head);
1542Taunt.SoundId = "rbxassetid://150611842"
1543Taunt.Volume = 2
1544local RUS = Instance.new("Sound", char);
1545RUS.SoundId = "rbxassetid://322621962"
1546RUS.Volume = 2.5
1547RUS.Pitch = 1
1548RUS.Looped = true
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559function BuildSentry()
1560do --CFrame lerp (stravant, clerp by AntiBoomz0r)
1561 local function QuaternionFromCFrame(cf) -- y u no axis angle interpolation?
1562 local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
1563 local trace = m00 + m11 + m22
1564 if trace > 0 then
1565 local s = math.sqrt(1 + trace)
1566 local recip = 0.5/s
1567 return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
1568 else
1569 local i = 0
1570 if m11 > m00 then
1571 i = 1
1572 end
1573 if m22 > (i == 0 and m00 or m11) then
1574 i = 2
1575 end
1576 if i == 0 then
1577 local s = math.sqrt(m00-m11-m22+1)
1578 local recip = 0.5/s
1579 return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
1580 elseif i == 1 then
1581 local s = math.sqrt(m11-m22-m00+1)
1582 local recip = 0.5/s
1583 return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
1584 elseif i == 2 then
1585 local s = math.sqrt(m22-m00-m11+1)
1586 local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
1587 end
1588 end
1589 end
1590 local function QuaternionToCFrame(px, py, pz, x, y, z, w)
1591 local xs, ys, zs = x + x, y + y, z + z
1592 local wx, wy, wz = w*xs, w*ys, w*zs
1593 local xx = x*xs
1594 local xy = x*ys
1595 local xz = x*zs
1596 local yy = y*ys
1597 local yz = y*zs
1598 local zz = z*zs
1599 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))
1600 end
1601 function QuaternionSlerp(a, b, t)
1602 local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
1603 local startInterp, finishInterp;
1604 if cosTheta >= 0.0001 then
1605 if (1 - cosTheta) > 0.0001 then
1606 local theta = math.acos(cosTheta)
1607 local invSinTheta = 1/math.sin(theta)
1608 startInterp = math.sin((1-t)*theta)*invSinTheta
1609 finishInterp = math.sin(t*theta)*invSinTheta
1610 else
1611 startInterp = 1-t
1612 finishInterp = t
1613 end
1614 else
1615 if (1+cosTheta) > 0.0001 then
1616 local theta = math.acos(-cosTheta)
1617 local invSinTheta = 1/math.sin(theta)
1618 startInterp = math.sin((t-1)*theta)*invSinTheta
1619 finishInterp = math.sin(t*theta)*invSinTheta
1620 else
1621 startInterp = t-1
1622 finishInterp = t
1623 end
1624 end
1625 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
1626 end
1627 function clerp(a,b,t)
1628 local qa = {QuaternionFromCFrame(a)}
1629 local qb = {QuaternionFromCFrame(b)}
1630 local ax, ay, az = a.x, a.y, a.z
1631 local bx, by, bz = b.x, b.y, b.z
1632 local _t = 1-t
1633 return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
1634 end
1635end
1636
1637
1638
1639
1640local ABS = math.abs;
1641local SIN = math.sin;
1642local ASIN = math.asin;
1643local COS = math.cos;
1644
1645local new = Instance.new;
1646
1647function math_pos(float)
1648 if float < 0 then float = 0 end
1649 return float
1650end
1651function math_neg(float)
1652 if float > 0 then float = 0 end
1653 return float
1654end
1655function math_max(float, max)
1656 if float > max then float = max end
1657 return float
1658end
1659function math_min(float, min)
1660 if float > min then float = min end
1661 return float
1662end
1663
1664function SharpSin(double_p1)
1665 return ASIN(SIN(double_p1));
1666end
1667
1668local Storage = Instance.new("Model", script);
1669
1670function WeldP(part0, part1, C0, C1)
1671 local W = new("Weld", Storage);
1672 W.Part0 = part0;
1673 W.Part1 = part1;
1674 W.C0 = C0 or CFrame.new();
1675 W.C1 = C1 or CFrame.new();
1676 return W;
1677end
1678
1679function Bevel(part, sizeV3)
1680 local BvlMesh = new("SpecialMesh", part)
1681 BvlMesh.MeshId = "rbxasset://fonts/torso.mesh";
1682 if (sizeV3 ~= nil) then
1683 BvlMesh.Scale = Vector3.new(sizeV3.x/2, sizeV3.y/2, sizeV3.z);
1684 else
1685 BvlMesh.Scale = Vector3.new(part.Size.x/2, part.Size.y/2, part.Size.z);
1686 end
1687end
1688
1689
1690
1691local Scale = 0.5 -- 1 is size of a robloxian (mostly);
1692
1693Storage.Name = "ä";
1694
1695local BasePart = new("Part");
1696BasePart.FormFactor = "Custom";
1697BasePart.TopSurface = 10;
1698BasePart.BottomSurface = 10;
1699BasePart.LeftSurface = 10;
1700BasePart.RightSurface = 10;
1701BasePart.FrontSurface = 10;
1702BasePart.BackSurface = 10;
1703
1704local CylPart = new("Part");
1705CylPart.FormFactor = "Custom";
1706CylPart.TopSurface = 10;
1707CylPart.BottomSurface = 10;
1708CylPart.LeftSurface = 10;
1709CylPart.RightSurface = 10;
1710CylPart.FrontSurface = 10;
1711CylPart.BackSurface = 10;
1712new("CylinderMesh", CylPart);
1713
1714local TopFrame = BasePart:clone()
1715TopFrame.Parent = Storage;
1716TopFrame.Size = Vector3.new(3.5*Scale, 1.5*Scale, 3.5*Scale);
1717TopFrame.BrickColor = TeamColor;
1718
1719new("CylinderMesh", TopFrame);
1720
1721local Screw = CylPart:clone();
1722Screw.Parent = Storage;
1723Screw.Size = Vector3.new(.3*Scale, 1.6*Scale, .3*Scale);
1724Screw.BrickColor = BrickColor.new(199);
1725
1726local CGreyStyle = CylPart:clone()
1727CGreyStyle.Parent = Storage;
1728CGreyStyle.Size = Vector3.new(2.2*Scale, 1.52*Scale, 2.6*Scale);
1729CGreyStyle.BrickColor = BrickColor.new(199);
1730
1731local TurretCasing = BasePart:clone();
1732TurretCasing.Size = Vector3.new(2.2*Scale, 1.4*Scale, 5.6*Scale);
1733TurretCasing.BrickColor = BrickColor.new(199);
1734TurretCasing.Parent = Storage;
1735
1736Bevel(TurretCasing);
1737
1738local TurretFront = BasePart:clone();
1739TurretFront.Size = Vector3.new(1.7*Scale, 1*Scale, .2*Scale);
1740TurretFront.BrickColor = TeamColor;
1741TurretFront.Parent = Storage;
1742
1743local Barrel = CylPart:clone();
1744Barrel.Parent = Storage;
1745Barrel.Size = Vector3.new(.7*Scale, .4*Scale, .7*Scale);
1746Barrel.BrickColor = BrickColor.Black();
1747
1748
1749 local Particle = Instance.new("ParticleEmitter", Barrel);
1750 Particle.VelocitySpread = 30;
1751 Particle.LightEmission = 200;
1752
1753 local Colors = {Color3.new(1,.5,0), Color3.new(1,.7,0), Color3.new(1,.9,0);}
1754
1755 Particle.Size = NumberSequence.new(.05,.07);
1756
1757 Particle.Color = ColorSequence.new(Colors[math.random(#Colors)]);
1758 Particle.Texture = "rbxassetid://252350680";
1759 Particle.RotSpeed = NumberRange.new(10,70);
1760 Particle.Rate = 300;
1761 Particle.Speed = NumberRange.new(15);
1762 Particle.Transparency = NumberSequence.new(0,1);
1763 Particle.Lifetime = NumberRange.new(.01,.2);
1764Particle.Enabled = false
1765
1766
1767
1768local RedDot = BasePart:clone();
1769RedDot.Parent = Storage;
1770RedDot.Size = Vector3.new(.2*Scale, .2*Scale, .2*Scale);
1771RedDot.BrickColor = BrickColor.new("Really red");
1772
1773local Sphere = Instance.new("SpecialMesh", RedDot);
1774Sphere.MeshType = "Sphere";
1775Sphere.Scale = Vector3.new(1*Scale,1*Scale,1*Scale);
1776
1777
1778Bevel(TurretFront, Vector3.new(1.7*Scale, 1*Scale, .05*Scale));
1779
1780local Joint = CylPart:clone();
1781Joint.Parent = Storage;
1782Joint.Size = Vector3.new(.7*Scale, 2*Scale, .7*Scale);
1783Joint.BrickColor = BrickColor.Black();
1784
1785local Hold = BasePart:clone();
1786Hold.Parent = Storage;
1787Hold.BrickColor = BrickColor.Black();
1788Hold.Size = Vector3.new(2.2*Scale, .2*Scale, .75*Scale);
1789
1790local Bolt = BasePart:clone();
1791Bolt.Size = Vector3.new(.2*Scale, 1.5*Scale, .5*Scale);
1792Bolt.Parent = Storage;
1793Bolt.BrickColor = BrickColor.Black();
1794
1795local Bolt2 = BasePart:clone();
1796Bolt2.Size = Vector3.new(.2*Scale, 1.5*Scale, .5*Scale);
1797Bolt2.Parent = Storage;
1798Bolt2.BrickColor = BrickColor.Black();
1799
1800
1801local TurretToFrame = WeldP(TopFrame, TurretCasing, CFrame.new(0, 0, 1.4*Scale));
1802WeldP(TopFrame, CGreyStyle);
1803WeldP(TurretCasing, TurretFront, CFrame.new(0, 0, 2.8*Scale));
1804WeldP(TopFrame, Screw);
1805local BarrelWeld = WeldP(Barrel, TurretFront, CFrame.new(.3*Scale, -.2*Scale, 0), CFrame.Angles(math.pi/2, 0, 0));
1806
1807WeldP(RedDot, TurretFront, CFrame.new(-.55*Scale, 0, -.15*Scale), CFrame.Angles(math.pi/2, 0, 0));
1808
1809local RotateAxisY = WeldP(Bolt, TurretCasing, CFrame.Angles(0,0,0), CFrame.new(1.1*Scale, -.75*Scale, 1*Scale));
1810
1811WeldP(Bolt, Hold, CFrame.new(-1.1*Scale, -.5*Scale, 0));
1812
1813WeldP(Bolt2, Hold, CFrame.new(1.1*Scale, -.5*Scale, 0));
1814
1815local RotateAxisX = WeldP(Hold, Joint, CFrame.new(0, -1*Scale, 0));
1816
1817
1818
1819local Leg1 = BasePart:clone();
1820Leg1.Size = Vector3.new(.2*Scale, 3.5*Scale, .5*Scale);
1821Leg1.Parent = Storage;
1822Leg1.BrickColor = BrickColor.Black();
1823
1824
1825WeldP(Leg1, Joint, CFrame.new(0, -1.75*Scale, 0), CFrame.new(0, -.75*Scale, 0) * CFrame.Angles(math.pi/3, 0, math.pi));
1826
1827
1828local Leg2 = BasePart:clone();
1829Leg2.Size = Vector3.new(.2*Scale, 3.5*Scale, .5*Scale);
1830Leg2.Parent = Storage;
1831Leg2.BrickColor = BrickColor.Black();
1832
1833
1834WeldP(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));
1835
1836
1837local Leg3 = BasePart:clone();
1838Leg3.Size = Vector3.new(.2*Scale, 3.5*Scale, .5*Scale);
1839Leg3.Parent = Storage;
1840Leg3.BrickColor = BrickColor.Black();
1841
1842
1843WeldP(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));
1844
1845 for i,v in pairs(Storage:children()) do
1846 if v.Name== "Part" then
1847 trans = 1
1848 v.Transparency = 1
1849 end
1850 end
1851
1852local InvisiBox = BasePart:clone();
1853InvisiBox.Size = Storage:GetModelSize() + Vector3.new(2*Scale, 0, 0);
1854InvisiBox.Parent = Storage;
1855InvisiBox.Transparency = 1
1856InvisiBox.Name = 'box'
1857WeldP(InvisiBox, Joint, CFrame.new(0, -.2*Scale, .97*Scale));
1858
1859local InvisiBox2 = BasePart:clone();
1860InvisiBox2.Size = Storage:GetModelSize() + Vector3.new(2*Scale, 0, 0);
1861InvisiBox2.Parent = Arms;
1862InvisiBox2.Transparency = .9
1863InvisiBox2.Name = 'box'
1864InvisiBox2.CanCollide = false
1865InvisiBox2.BrickColor = TeamColor
1866InvisiBox2.Material = 'Neon'
1867WeldP(InvisiBox2, Joint, CFrame.new(0, -1.2*Scale, .97*Scale));
1868
1869InvisiBox.CFrame = torso.CFrame * CFrame.new(0, 5.5*Scale, -2.9) * CFrame.Angles(0, math.pi, 0);
1870
1871local Action = "Idle";
1872
1873local Target = nil;
1874
1875wait(1)
1876
1877InvisiBox.Anchored = true
1878
1879for i,v in pairs(Storage:children()) do
1880 if v:IsA'Part' then
1881 v.Locked = true
1882 end
1883end
1884--//
1885--// SOUNDS
1886--//
1887 for i,v in pairs(Storage:children()) do
1888 if v.Name== "Part" then
1889 trans = 1
1890 v.Transparency = 1
1891 end
1892 end
1893 for i,v in pairs(Storage:children()) do
1894 if v.Name== "Part" then
1895 trans = 1
1896 v.Transparency = 1
1897 for i = 1,11 do
1898
1899 trans = trans - .1
1900 v.Transparency = trans
1901 wait()
1902 end
1903 end
1904 end
1905 trans = 1
1906
1907local OnFind = new("Sound", TopFrame);
1908OnFind.SoundId = "rbxassetid://10209260"
1909OnFind.Volume = 1
1910
1911
1912local OnFire = new("Sound", TopFrame);
1913OnFire.SoundId = "rbxassetid://10209257"
1914OnFire.Volume = 1
1915
1916local OnEmpty = new("Sound", TopFrame);
1917OnEmpty.SoundId = "rbxassetid://10209225"
1918OnEmpty.Volume = 1
1919
1920local Scanning = new("Sound", TopFrame);
1921Scanning.SoundId = "rbxassetid://258704234"
1922Scanning.Volume = 1
1923
1924local Explode = new("Sound", TopFrame);
1925Explode.SoundId = "rbxassetid://10209236"
1926Explode.Volume = .5
1927
1928local Move = new("Sound", TopFrame);
1929Move.SoundId = "rbxassetid://258704467";
1930Move.Volume = 1;
1931
1932
1933
1934
1935
1936function FindShortest(Table)
1937local Current = Table[1]
1938local Final
1939for _,v in pairs(Table) do
1940if v[2] ~= Current[2] then
1941if v[1] < Current[1] then
1942Current = v
1943end
1944end
1945end
1946Final = Current
1947return Final
1948end
1949
1950function GetNearbyPlayer()
1951
1952 local List = {}
1953 for i,v in pairs(workspace:children()) do
1954 if (v ~= nil) then
1955 if (v:IsA'Model') then
1956 if (v:findFirstChild'Torso' ~= nil) then
1957 local rx, ry, rz = Hold.CFrame:toEulerAnglesXYZ();
1958 if (v:findFirstChild'Torso'.Position - Hold.CFrame * CFrame.new(0, 0, 20) * CFrame.Angles(0, ry, 0).p).magnitude < 20 then
1959 if (v ~= char) then
1960 for x,z in next, v:children() do
1961 if z:IsA'Humanoid' and z.Health > 0.01 then
1962 table.insert(List, {(v:findFirstChild'Torso'.Position - Hold.CFrame * CFrame.new(0, 0, 20) * CFrame.Angles(0, ry, 0).p).magnitude, v})
1963 end
1964 end
1965 end
1966 end
1967 end
1968 end
1969 end
1970 end
1971 if (FindShortest(List) ~= nil) then
1972 return FindShortest(List)[2];
1973 else
1974 return nil;
1975 end
1976end
1977
1978local Health = Instance.new("Humanoid", Storage);
1979Health.MaxHealth = 150;
1980Health.Health = 150;
1981
1982
1983
1984function RayC(Part, speed)
1985 coroutine.wrap(function()
1986 local Visual = BasePart:clone();
1987 Visual.FormFactor = "Custom";
1988 Visual.BrickColor = BrickColor.Yellow();
1989 Visual.Size = Vector3.new(.2, 3, .2);
1990 Visual.CFrame = Part.CFrame * CFrame.new(0, -1, 0);
1991 Visual.Anchored = true;
1992 Visual.CanCollide = false;
1993 Visual.Locked = true
1994
1995
1996 coroutine.wrap(function()
1997
1998 wait(.2)
1999
2000 wait(.1);
2001 wait(.3)
2002
2003 end)()
2004
2005 Instance.new("SpecialMesh", Visual).MeshType = "Sphere";
2006 Visual.Mesh.Scale = Vector3.new(.5, 1, .5);
2007
2008 local bulletpos = Visual.Position
2009 local bulletvelocity = (Part.CFrame.p - bulletpos).unit*speed
2010 local lastbulletpos = Visual.Position
2011 Visual.Parent = Storage;
2012 while game:service'RunService'.Stepped:wait() do
2013
2014 lastbulletpos = bulletpos
2015 bulletpos = bulletpos + bulletvelocity
2016 local RayCast = Ray.new(lastbulletpos, (bulletpos - lastbulletpos))
2017 local hit, hitpos = workspace:FindPartOnRay(RayCast, Storage, false, true)
2018 if (Joint.Position - Visual.Position).magnitude > 1000 or Visual.Parent == nil then
2019 Visual:Destroy();
2020 break
2021 end
2022 Visual.Anchored = true
2023 Visual.CFrame = CFrame.new(bulletpos, bulletpos+bulletvelocity) * CFrame.Angles(math.pi/2, 0, 0);
2024 if hit then
2025 if hit.Parent:IsA'Hat' then
2026 if hit.Parent.Parent:IsA'Model' then
2027 for x,z in next, hit.Parent.Parent:children() do
2028 if z:IsA'Humanoid' then
2029 z:TakeDamage(math.random(8,12));
2030 end
2031 end
2032 end
2033 else
2034 if hit.Parent:IsA'Model' then
2035 for x,z in next, hit.Parent:children() do
2036 if z:IsA'Humanoid' then
2037 z:TakeDamage(math.random(8,12));
2038 end
2039 end
2040 end
2041 end
2042
2043 Visual:Destroy();
2044 break
2045 end
2046 end
2047 end)()
2048end
2049
2050lastTick = tick();
2051local db = false;
2052game:service'RunService'.RenderStepped:connect(function()
2053 if Action == "DEAD" then return end;
2054
2055
2056 if not Wrangler then
2057 --//
2058 --// AUTOMATED MODE, MOTION SENSOR WILL DETECT MOVEMENT
2059 --//
2060
2061
2062 --//
2063 --// IF PLAYER USED WRANGLER, THERE IS A SHIELD WICH MUST BE REMOVED
2064 --//
2065
2066 if (Storage:findFirstChild'Shield') then
2067 Storage:findFirstChild'Shield':Destroy();
2068 end
2069
2070 local LastTarget = Target;
2071
2072 --//
2073 --// CHECK FOR NEARBY ENEMIES
2074 --//
2075 local Player = GetNearbyPlayer();
2076 Target = Player;
2077
2078 --//
2079 --// BEEP ON TARGET FOUND
2080 --//
2081 if (Target ~= LastTarget and Target ~= nil) then
2082 Move.Pitch = 0.9 + math.random()/9;
2083 Move:play();
2084 OnFind:play();
2085 Action = "Standby";
2086 end
2087
2088 --//
2089 --// IDLE
2090 --//
2091 if Action == "Idle" then
2092 RotateAxisX.C1 = clerp(RotateAxisX.C1, CFrame.Angles(0, SharpSin(tick()*2)*.2, 0), .1);
2093 RotateAxisY.C0 = clerp(RotateAxisY.C0, CFrame.new(), .1);
2094 end
2095
2096
2097 --//
2098 --// SENTRY DEAD
2099 --//
2100
2101 --//
2102 --// IF PLAYER EXISTS, FIRE!
2103 --//
2104
2105
2106
2107 if Action == "Standby" then
2108 pcall(function()
2109 local tor = Target.Torso.CFrame.p -- Target CFrame
2110 local direction = InvisiBox.CFrame.lookVector -- Direction handling, welds mess up, just a workaround.
2111 local heading = math.atan2(direction.x, direction.z)--
2112 local RotY = math.deg(heading)
2113 if RotY < 0 then
2114 RotY = (360 - math.abs(RotY));
2115 end
2116 RotateAxisX.C1 = --Begin here
2117 clerp(RotateAxisX.C1,
2118 CFrame.new(
2119
2120 Vector3.new(), --The Pivot0 of pointing the weld.
2121 Vector3.new(tor.x, 0, tor.z) - Vector3.new(RotateAxisX.Part1.CFrame.x, 0, RotateAxisX.Part1.CFrame.z)) --We point the sentry here
2122
2123 * CFrame.Angles(0, math.rad(360) - math.rad(RotY), 0),
2124 .1
2125 );
2126
2127 local Point = Hold.CFrame:toObjectSpace(CFrame.new(Hold.CFrame.p,tor))*CFrame.Angles(0,math.rad(180),0)
2128 local RX, RY, RZ = Point:toEulerAnglesXYZ()
2129 if math.deg(RX) > 45 then
2130 RX = math.rad(45)
2131 elseif math.deg(RX) < -55 then
2132 RX = math.rad(-55)
2133 end
2134 RotateAxisY.C0 = clerp(RotateAxisY.C0,CFrame.Angles(RX,0,0),.1)
2135
2136 end)
2137 end
2138 if Action == "Fire" then
2139 pcall(function()
2140 local tor = Target.Torso.CFrame.p;
2141 local direction = InvisiBox.CFrame.lookVector
2142 local heading = math.atan2(direction.x, direction.z)
2143 local RotY = math.deg(heading)
2144 if RotY < 0 then
2145 RotY = (360 - math.abs(RotY));
2146 end
2147 RotateAxisX.C1 = --Begin here
2148 clerp(RotateAxisX.C1,
2149 CFrame.new(
2150
2151 Vector3.new(), --The Pivot0 of pointing the weld.
2152 Vector3.new(tor.x, 0, tor.z) - Vector3.new(RotateAxisX.Part1.CFrame.x, 0, RotateAxisX.Part1.CFrame.z)) --We point the sentry here
2153
2154 * CFrame.Angles(0, math.rad(360) - math.rad(RotY), 0),
2155 .1
2156 );
2157
2158 BarrelWeld.C0 = clerp(BarrelWeld.C0, CFrame.new())
2159 local Point = Hold.CFrame:toObjectSpace(CFrame.new(Hold.CFrame.p,tor))*CFrame.Angles(0,math.rad(180),0)
2160 local RX, RY, RZ = Point:toEulerAnglesXYZ()
2161 if math.deg(RX) > 45 then
2162 RX = math.rad(45)
2163 elseif math.deg(RX) < -55 then
2164 RX = math.rad(-55)
2165 end
2166 RotateAxisY.C0 = clerp(RotateAxisY.C0,CFrame.Angles(RX,0,0),.1)
2167 end)
2168 end
2169
2170 if (Target ~= nil) then
2171 if Action == "Fire" or db then return end
2172 if Action == "Standby" then
2173 db = true
2174 wait(.2);
2175 end
2176 Action = "Fire";
2177 db = false
2178 OnFire:play();
2179
2180 Particle.Color = ColorSequence.new(Colors[math.random(#Colors)]);
2181
2182 local PointLight = Instance.new("PointLight", Barrel);
2183 PointLight.Color = Color3.new(1,.8,0)
2184 PointLight.Brightness = 6;
2185Particle.Enabled = true
2186 game:service'Debris':AddItem(PointLight, .05);
2187
2188
2189
2190 RayC(Barrel, 20)
2191
2192
2193
2194
2195 wait(.1)
2196Particle.Enabled = false
2197 if (Target ~= nil) then
2198 Action = "Standby";
2199 else
2200 Action = "Idle";
2201 end
2202 end
2203
2204 if tick() - lastTick > 2.5 and Target == nil then
2205 lastTick = tick();
2206 Scanning:play();
2207 end
2208 end
2209
2210 if (Health.Health < 0.0001 or RotateAxisX.Parent == nil) then
2211 Action = "DEAD";
2212 if db then return end
2213 RotateAxisY:Destroy();
2214 TurretToFrame:Destroy();
2215 Joint:Destroy();
2216InvisiBox2:Destroy();
2217 db = true
2218 local expl = Instance.new("Explosion", Storage);
2219
2220expl.BlastRadius = .3;
2221expl.BlastPressure = 2050000;
2222 expl.Position = TopFrame.Position;
2223Explode:Play()
2224NoSentry = true
2225 game:service'Debris':AddItem(Storage, 3);
2226
2227 end
2228
2229end)
2230end
2231
2232
2233
2234combo = 0
2235 function strike(hit)
2236 if hit and hit.Parent and hit.Parent.Name ~= char.Name then
2237 local targetHumanoid = hit.Parent:FindFirstChild("Humanoid")
2238 if targetHumanoid and targetHumanoid ~= char:FindFirstChild("Humanoid") then
2239 if combo == 1 then
2240 targetHumanoid:TakeDamage(slashDamage)
2241 SwingH:Play()
2242
2243 end
2244
2245
2246
2247 end
2248 end
2249 end
2250
2251
2252
2253Reaper5.Touched:connect(strike)
2254--------------------------------------------------------------------------------------------------------------------------
2255 function AnimSit()
2256 for i = 0, 1, 0.05 do
2257
2258 swait()
2259 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, -1, -.6) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
2260 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
2261 LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.3, .1) * angles(math.rad(20), math.rad(0), math.rad(20)), 0.1)
2262 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(5)), 0.1)
2263 RH.C0 = clerp(RH.C0, cn(1, -.4, -.4) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
2264 LH.C0 = clerp(LH.C0, cn(-1, -1, -.6) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(60)), .1)
2265 end
2266
2267 end
2268
2269 function AnimSitHit1()
2270 for i = 0, 1, 0.05 do
2271
2272 swait()
2273 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, -1, -.6) * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
2274 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(0)), .1)
2275 LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.3, .1) * angles(math.rad(20), math.rad(0), math.rad(20)), 0.1)
2276 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(170), math.rad(0), math.rad(-5)), 0.08)
2277 RH.C0 = clerp(RH.C0, cn(1, -.4, -.4) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(10)), .1)
2278 LH.C0 = clerp(LH.C0, cn(-1, -1, -.6) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(50)), .1)
2279 end
2280
2281 end
2282
2283
2284 function AnimSitHit2()
2285 for i = 0, 1, 0.05 do
2286
2287 swait()
2288 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, -1, -.6) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
2289 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(15), math.rad(0), math.rad(0)), .1)
2290 LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.3, .1) * angles(math.rad(20), math.rad(0), math.rad(20)), 0.1)
2291 RW.C0 = clerp(RW.C0, CFrame.new(1.55, 0.4, -.1) * angles(math.rad(40), math.rad(3 ), math.rad(-15)), 0.3)
2292 RH.C0 = clerp(RH.C0, cn(1, -.4, -.4) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
2293 LH.C0 = clerp(LH.C0, cn(-1, -1, -.6) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(60)), .1)
2294 end
2295
2296 end
2297--------------------------------------------------------------------------------------------------------------------------
2298
2299 function No1()
2300 for i = 0, 1, 0.05 do
2301
2302 swait()
2303 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
2304 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(30), math.rad(0), math.rad(40)), .1)
2305 LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.1)
2306 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.1)
2307 RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
2308 LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
2309 end
2310
2311 end
2312
2313
2314
2315 function No2()
2316 for i = 0, 1, 0.05 do
2317
2318 swait()
2319 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
2320 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(-40)), .1)
2321 LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.1)
2322 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.1)
2323 RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
2324 LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
2325 end
2326
2327 end
2328
2329
2330
2331--------------------------------------------------------------------------------------------------------------------------
2332
2333 function Yes1()
2334 for i = 0, 1, 0.1 do
2335
2336 swait()
2337 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
2338 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(25), math.rad(0), math.rad(0)), .1)
2339 LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.1)
2340 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.1)
2341 RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
2342 LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
2343 end
2344
2345 end
2346
2347
2348
2349 function Yes2()
2350 for i = 0, 1, 0.1 do
2351
2352 swait()
2353 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
2354 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
2355 LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.1)
2356 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.1)
2357 RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
2358 LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
2359 end
2360
2361 end
2362
2363
2364
2365--------------------------------------------------------------------------------------------------------------------------
2366function AttackAnim1()
2367for i = 0, 1, 0.05 do
2368 swait()
2369 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
2370 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(0)), .1)
2371 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(170), math.rad(0), math.rad(10)), 0.08)
2372 LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(40), math.rad(0), math.rad(10)), 0.3)
2373 if Torsovelocity > 2 then
2374 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)
2375 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)
2376 elseif Torsovelocity < 1 then
2377 RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(-5)), .1)
2378 LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(5)), .1)
2379 end
2380end
2381end
2382
2383
2384function AttackAnim2()
2385for i = 0, 1, 0.05 do
2386 swait()
2387 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(5), math.rad(0), math.rad(0)), .2)
2388 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(0)), .1)
2389 RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(5), math.rad(10), math.rad(-10)), 0.25)
2390 LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(10)), 0.3)
2391 if Torsovelocity > 2 then
2392 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)
2393 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)
2394
2395 elseif Torsovelocity < 1 then
2396 RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(5)), .1)
2397 LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(-5)), .1)
2398 end
2399end
2400end
2401--------------------------------------------------------------------------------------------------------------------------
2402
2403
2404
2405function ShotAttackAnim1()
2406for i = 0, 1, 0.07 do
2407 swait()
2408
2409 if Torsovelocity > 2 then
2410 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)
2411 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)
2412 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)
2413 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)
2414 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)
2415 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)
2416
2417
2418
2419 elseif Torsovelocity < 1 then
2420
2421
2422 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-50)), .2)
2423 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(50)), .2)
2424 RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, 0) * angles(math.rad(90), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.2)
2425 LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(85 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.2)
2426 RH.C0 = clerp(RH.C0, cn(.9, -.9 - 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)
2427 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)
2428
2429
2430 end
2431end
2432end
2433
2434
2435
2436
2437
2438function ShotAttackAnim2()
2439for i = 0, 1, 0.05 do
2440 swait()
2441
2442 if Torsovelocity > 2 then
2443 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)
2444 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)
2445 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)
2446 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)
2447 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)
2448 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)
2449
2450
2451
2452 elseif Torsovelocity < 1 then
2453
2454
2455 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-50)), .2)
2456 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(50)), .2)
2457 RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, 0) * angles(math.rad(100), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.1)
2458 LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(75 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.1)
2459 RH.C0 = clerp(RH.C0, cn(.9, -.9 - 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)
2460 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)
2461
2462
2463 end
2464end
2465end
2466
2467
2468
2469function ShotAttackAnim3()
2470for i = 0, 1, 0.05 do
2471 swait()
2472
2473 if Torsovelocity > 2 then
2474 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)
2475 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)
2476 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)
2477 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)
2478 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)
2479 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)
2480
2481
2482
2483 elseif Torsovelocity < 1 then
2484
2485
2486 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-50)), .2)
2487 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(50)), .2)
2488 RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.56, -.2) * angles(math.rad(45), math.rad(-20 - .01 * math.cos(sine / 25)), math.rad(-70 + 0.1 * math.cos(sine / 25))), 0.2)
2489 LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.6, -.6) * angles(math.rad(115 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-30 - 1 * math.cos(sine / 25))), 0.2)
2490 RH.C0 = clerp(RH.C0, cn(.9, -.9 - 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)
2491 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)
2492
2493
2494 end
2495end
2496end
2497
2498function ShotAttackAnim4()
2499for i = 0, 1, 0.05 do
2500 swait()
2501
2502 if Torsovelocity > 2 then
2503 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)
2504 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)
2505 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)
2506 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)
2507 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)
2508 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)
2509
2510
2511
2512 elseif Torsovelocity < 1 then
2513
2514
2515 RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-50)), .2)
2516 Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(50)), .2)
2517 RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.56, 0) * angles(math.rad(45), math.rad(-20 - .01 * math.cos(sine / 25)), math.rad(-70 + 0.1 * math.cos(sine / 25))), 0.2)
2518 LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.6, -.8) * angles(math.rad(115 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-50 - 1 * math.cos(sine / 25))), 0.2)
2519 RH.C0 = clerp(RH.C0, cn(.9, -.9 - 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)
2520 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)
2521
2522
2523 end
2524end
2525end
2526--------------------------------------------------------------------------------------------------------------------------
2527
2528 function DanAni1()
2529 for i = 0, .8, 0.05 + MusThingHat.Mesh.Scale.Y*0.025 do
2530
2531 swait()
2532 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)
2533 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)
2534 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)
2535 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)
2536 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)
2537 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)
2538 end
2539
2540 end
2541
2542
2543
2544 function DanAni2()
2545 for i = 0, .8, 0.05 + MusThingHat.Mesh.Scale.Y*0.025 do
2546
2547 swait()
2548 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)
2549 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)
2550 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)
2551 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)
2552 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)
2553 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)
2554 end
2555
2556
2557 end
2558
2559
2560
2561--------------------------------------------------------------------------------------------------------------------------
2562
2563BuildNow = false
2564
2565Shotuse = false
2566
2567wait2 = false
2568
2569mouse.KeyDown:connect(function(key)
2570
2571 if key == "g" and attack == false then
2572yes:Play()
2573head.face.Texture = "http://www.roblox.com/asset/?id=393521316"
2574 humanoid.WalkSpeed = 0
2575 attack = true
2576 Yes1()
2577 Yes2()
2578 Yes1()
2579 Yes2()
2580 attack = false
2581 humanoid.WalkSpeed = 16
2582 head.face.Texture = "http://www.roblox.com/asset/?id=156600391"
2583 end
2584end)
2585
2586
2587mouse.KeyDown:connect(function(key)
2588 if key == "e" and attack == false then
2589if Wep == 1 then
2590Wep = 2
2591else
2592Wep = 1
2593end
2594
2595
2596 end
2597 end)
2598
2599mouse.KeyDown:connect(function(key)
2600 if key == "p" and attack == false then
2601
2602Wep = 3
2603
2604
2605
2606 end
2607 end)
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620equippedgun = true
2621
2622
2623
2624
2625coroutine.wrap(function()
2626while equippedgun do
2627
2628if spread < 0 then spread = 0 end
2629if humanoid.Health == 0 then break end
2630
2631
2632game:service'RunService'.Stepped:wait()
2633end
2634end)()
2635
2636mouse.Button1Down:connect(function()
2637if debounce then return end
2638if equippedgun2 == true and attack == false then
2639 Shotuse = true
2640debounce = true
2641
2642wait(.2)
2643
2644sound:play()
2645
2646
2647
2648coroutine.wrap(function()
2649wait(0.3)
2650for angle = 0, 4 do
2651
2652wait()
2653end
2654
2655wait(0.2)
2656sound2:play()
2657
2658
2659wait(0.1)
2660for move = 0, 3 do
2661if move > 2 then return end
2662
2663
2664wait(0.06)
2665end
2666end)()
2667spread = spread + 1
2668coroutine.wrap(function()
2669for bullitz = 0, 7 do
2670if bullitz > 6 then return end
2671rayCast2(300, 1, Reaper4)
2672GunParticle.Enabled = true
2673 local PointLight = Instance.new("PointLight", Reaper4);
2674 PointLight.Color = Color3.new(.2,.2,0)
2675 PointLight.Brightness = 2;
2676 game:service'Debris':AddItem(PointLight, .05);
2677end
2678end)()
2679coroutine.wrap(function()
2680for _ = 0, 50 do
2681pcall(function()
2682spread = spread - 0.03
2683end)
2684wait()
2685end
2686end)()
2687wait(1)
2688debounce = false
2689end
2690
2691end)
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701mouse.Button1Down:connect(function(key)
2702
2703 if attack == false and Wep == 1 then
2704attack = true
2705
2706AttackAnim1()
2707combo = 1
2708Swing:Play()
2709AttackAnim2()
2710attack = false
2711combo = 0
2712 end
2713end)
2714
2715
2716
2717mouse.KeyDown:connect(function(key)
2718
2719 if key == "f" and attack == false then
2720 No:Play()
2721 humanoid.WalkSpeed = 0
2722 attack = true
2723 No1()
2724 No2()
2725 attack = false
2726 humanoid.WalkSpeed = 16
2727 end
2728end)
2729
2730
2731
2732
2733mouse.KeyDown:connect(function(key)
2734if attack == false or DA == true then
2735 if key == "r" and Wep == 3 then
2736
2737if DA == false then
2738DA = true
2739RUS:Play()
2740attack=true
2741humanoid.WalkSpeed = 0
2742head.face.Texture = "http://www.roblox.com/asset/?id=393521316"
2743else
2744DA = false
2745RUS:Stop()
2746attack=false
2747humanoid.WalkSpeed = 16
2748head.face.Texture = "http://www.roblox.com/asset/?id=156600391"
2749end
2750 end
2751 end
2752 end)
2753
2754
2755
2756mouse.KeyDown:connect(function(key)
2757
2758 if key == "t" and attack == false then
2759 Taunt:Play()
2760 humanoid.WalkSpeed = 0
2761 attack = true
2762 No1()
2763 Yes2()
2764 attack = false
2765 humanoid.WalkSpeed = 16
2766 end
2767end)
2768
2769mouse.KeyDown:connect(function(key)
2770 if key == "z" then
2771
2772
2773
2774 if NoSentry == false and attack == false and wait2 == false then
2775wait2 = true
2776 for i,v in pairs(script:children()) do
2777 if (v:IsA'Model') then
2778
2779
2780 for i,v in pairs(v:children()) do
2781 if (v:IsA'Humanoid') then
2782 v.Health = 0
2783 end
2784 end
2785
2786
2787 end
2788
2789 NoSentry = true
2790
2791 end
2792
2793
2794
2795 end
2796
2797
2798
2799 if NoSentry == true and attack == false and wait2 == false and Wep == 1 then
2800 attack = true
2801 wait2 = true
2802 humanoid.WalkSpeed = 0
2803AnimSit()
2804AnimSitHit1()
2805WSH = WSHM[math.random(1,#WSHM)]
2806HitM.SoundId = "rbxassetid://"..WSH
2807HitM:Play()
2808BuildNow = true
2809AnimSitHit2()
2810AnimSitHit1()
2811WSH = WSHM[math.random(1,#WSHM)]
2812HitM.SoundId = "rbxassetid://"..WSH
2813HitM:Play()
2814AnimSitHit2()
2815AnimSitHit1()
2816WSH = WSHM[math.random(1,#WSHM)]
2817HitM.SoundId = "rbxassetid://"..WSH
2818HitM:Play()
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()
2855AnimSit()
2856
2857 humanoid.WalkSpeed = 16
2858 attack = false
2859NoSentry = false
2860
2861 end
2862 wait()
2863
2864 wait2 = false
2865end end)
2866
2867
2868
2869humanoid.Died:connect(function()
2870 Arms:Destroy()
2871end)
2872
2873print([[
2874
2875
2876----------------------------------------
2877Tf2 Engineer Class
2878----------------------------------------
2879Script by: 123jl123
2880Sentry by: Madiik
2881TheBoozled gave me a Mesh and Sounds from tf2
2882----------------------------------------
2883Dont leak and dont do it.....
2884----------------------------------------
2885]])
2886
2887game:GetService("RunService"):BindToRenderStep("ew", 0, function()
2888 MusThingHat.Mesh.Scale = Vector3.new(MusThingHat.Mesh.Scale.X, RUS.PlaybackLoudness / 160, MusThingHat.Mesh.Scale.Z)
2889end)
2890
2891 local mesh1anan = Instance.new("SpecialMesh")
2892 mesh1anan.MeshType = Enum.MeshType.FileMesh
2893 mesh1anan.Scale = Vector3.new(3,3,3)
2894mesh1anan.MeshId = "http://www.roblox.com/asset/?id=521754610"
2895mesh1anan.TextureId = "http://www.roblox.com/asset/?id=521754612"
2896
2897Glow1 = Color3.new(1,1,1)
2898Glow2 = Color3.new(0,0,0)
2899
2900GlowParticle = Instance.new("ParticleEmitter")
2901GlowParticle.LightEmission = 1
2902
2903GlowParticle.Size = NumberSequence.new(0,2)
2904GlowParticle.Texture = "http://www.roblox.com/asset/?id=52620985"
2905GlowParticle.Transparency = NumberSequence.new(0,1)
2906GlowParticle.LockedToPart = false
2907GlowParticle.Lifetime = NumberRange.new(0.5)
2908GlowParticle.Rate= 25
2909GlowParticle.Speed =NumberRange.new(0)
2910
2911
2912 function RainDucks()
2913 local locationanan = char.Torso.CFrame
2914 local tacoa = Instance.new("Part")
2915 tacoa.Size = Vector3.new(.5,.5,.5)
2916 tacoa.CanCollide = false
2917 tacoa.RotVelocity = Vector3.new(math.random(0,6),math.random(0,6),math.random(0,6))
2918 local meshanananan = mesh1anan:clone()
2919 meshanananan.Parent = tacoa
2920 meshanananan.Scale = Vector3.new(1,1,1)
2921 tacoa.CFrame = locationanan * CFrame.new(math.random(-8,8),math.random(10,40),math.random(-8,8))
2922 tacoa.Parent = workspace
2923
2924
2925 game:GetService("Debris"):AddItem(tacoa,4)
2926 local GP = GlowParticle:clone()
2927 GP.Parent = tacoa
2928 Glow1 = Color3.new(math.random(), math.random(), math.random())
2929 GP.Color = ColorSequence.new(Glow1,Glow2)
2930
2931 end
2932
2933
2934
2935--]]
2936
2937
2938
2939while true do wait()
2940 if BuildNow == true then
2941 BuildNow = false
2942
2943BuildSentry()
2944 end
2945 if Shotuse == true then
2946 Shotuse = false
2947 attack = true
2948 ShotAttackAnim1()
2949 GunParticle.Enabled = false
2950 ShotAttackAnim2()
2951 ShotAttackAnim3()
2952 ShotAttackAnim4()
2953 ShotAttackAnim3()
2954 attack = false
2955 end
2956
2957
2958
2959
2960if DA == true then
2961DanAni1()
2962 RainDucks()
2963 local PointLight = Instance.new("PointLight", Torso);
2964 PointLight.Color = Color3.new(math.random(), math.random(), math.random())
2965 PointLight.Brightness = 50;
2966 PointLight.Range = MusThingHat.Mesh.Scale.Y*10;
2967 game:service'Debris':AddItem(PointLight, .3);
2968
2969DanAni2()
2970 RainDucks()
2971 local PointLight = Instance.new("PointLight", Torso);
2972 PointLight.Color = Color3.new(math.random(), math.random(), math.random())
2973 PointLight.Brightness = 50;
2974 PointLight.Range = MusThingHat.Mesh.Scale.Y*10;
2975 game:service'Debris':AddItem(PointLight, .3);
2976
2977
2978
2979end
2980
2981
2982
2983
2984
2985
2986end