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