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