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