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