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