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