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