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