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