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