SHOW:
|
|
- or go back to the newest paste.
1 | -- FE template created by MintyLatios (V3rm) aka Drahazar (ROBLOX) | |
2 | --Fixed by basstracker1970 | |
3 | local ownerval = Instance.new("ObjectValue") | |
4 | ownerval.Name = "Owner" | |
5 | ownerval.Value = owner | |
6 | ownerval.Parent = script | |
7 | ||
8 | local username = "basstracker1970" | |
9 | ||
10 | if(script:FindFirstChild'Owner')then | |
11 | repeat wait() until script.Owner.Value | |
12 | end | |
13 | function GetPlr(user) | |
14 | for _,v in next, game:service'Players':players() do | |
15 | if(v.Name==user)then | |
16 | return v | |
17 | end | |
18 | end | |
19 | return nil | |
20 | end | |
21 | local owner = script:WaitForChild'Owner'.Value | |
22 | repeat wait() until script:WaitForChild'Owner'.Value | |
23 | local Player = script:WaitForChild'Owner'.Value | |
24 | local Mouse,mouse,UserInputService,ContextActionService | |
25 | script.Owner:destroy() | |
26 | local scriptName = "Aprins" | |
27 | do | |
28 | local GUID = {} | |
29 | do | |
30 | GUID.IDs = {}; | |
31 | function GUID:new(len) | |
32 | local id; | |
33 | if(not len)then | |
34 | id = (tostring(function() end)) | |
35 | id = id:gsub("function: ","") | |
36 | else | |
37 | local function genID(len) | |
38 | local newID = "" | |
39 | for i = 1,len do | |
40 | newID = newID..string.char(math.random(48,90)) | |
41 | end | |
42 | return newID | |
43 | end | |
44 | repeat id = genID(len) until not GUID.IDs[id] | |
45 | local oid = id; | |
46 | id = {Trash=function() GUID.IDs[oid]=nil; end;Get=function() return oid; end} | |
47 | GUID.IDs[oid]=true; | |
48 | end | |
49 | return id | |
50 | end | |
51 | end | |
52 | ||
53 | local AHB = Instance.new("BindableEvent") | |
54 | ||
55 | local FPS = 30 | |
56 | ||
57 | local TimeFrame = 0 | |
58 | ||
59 | local LastFrame = tick() | |
60 | local Frame = 1/FPS | |
61 | ||
62 | game:service'RunService'.Heartbeat:connect(function(s,p) | |
63 | TimeFrame = TimeFrame + s | |
64 | if(TimeFrame >= Frame)then | |
65 | for i = 1,math.floor(TimeFrame/Frame) do | |
66 | AHB:Fire() | |
67 | end | |
68 | LastFrame=tick() | |
69 | TimeFrame=TimeFrame-Frame*math.floor(TimeFrame/Frame) | |
70 | end | |
71 | end) | |
72 | ||
73 | ||
74 | function swait(dur) | |
75 | if(dur == 0 or typeof(dur) ~= 'number')then | |
76 | AHB.Event:wait() | |
77 | else | |
78 | for i = 1, dur*FPS do | |
79 | AHB.Event:wait() | |
80 | end | |
81 | end | |
82 | end | |
83 | ||
84 | oPlayer = Player | |
85 | Player = oPlayer | |
86 | ||
87 | local loudnesses={} | |
88 | script.Parent = Player.Character | |
89 | CoAS = {Actions={}} | |
90 | local Event = Instance.new("RemoteEvent") | |
91 | Event.Name = "UserInputEvent" | |
92 | Event.Parent = Player.Character | |
93 | local Func = Instance.new("RemoteFunction") | |
94 | Func.Name = "GetClientProperty" | |
95 | Func.Parent = Player.Character | |
96 | local fakeEvent = function() | |
97 | local t = {_fakeEvent=true,Waited={},Connected={}} | |
98 | t.Connect = function(self,f) | |
99 | local ft={} | |
100 | ft={Disconnected=false;disconnect=function(s) if(self.Function==ft)then self.Function=nil end s.Disconnected=true end} | |
101 | ft.Disconnect=ft.disconnect | |
102 | ||
103 | ft.Func=function(...) | |
104 | for id,_ in next, t.Waited do | |
105 | t.Waited[id] = true | |
106 | end | |
107 | return f(...) | |
108 | end; | |
109 | ||
110 | table.insert(self.Connected,ft) | |
111 | return ft; | |
112 | end | |
113 | t.connect = t.Connect | |
114 | t.Wait = function() | |
115 | local guid = GUID:new(25) | |
116 | local waitingId = guid:Get() | |
117 | t.Waited[waitingId]=false | |
118 | repeat swait() until t.Waited[waitingId]==true | |
119 | t.Waited[waitingId]=nil; | |
120 | guid:Trash() | |
121 | end | |
122 | t.wait = t.Wait | |
123 | return t | |
124 | end | |
125 | m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()} | |
126 | UsIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
127 | Run = {RenderStepped=fakeEvent()} | |
128 | ||
129 | function CoAS:BindAction(name,fun,touch,...) | |
130 | CoAS.Actions[name] = {Name=name,Function=fun,Keys={...}} | |
131 | end | |
132 | function CoAS:UnbindAction(name) | |
133 | CoAS.Actions[name] = nil | |
134 | end | |
135 | local function te(self,ev,...) | |
136 | local t = self[ev] | |
137 | if t and t._fakeEvent and t.Connected then | |
138 | for i,v in next, t.Connected do | |
139 | if(v.Func and not v.Disconnected)then | |
140 | v.Func(...) | |
141 | else | |
142 | t.Connected[i]=nil | |
143 | end | |
144 | end | |
145 | end | |
146 | end | |
147 | m.TrigEvent = te | |
148 | UsIS.TrigEvent = te | |
149 | Run.TrigEvent = te | |
150 | Event.OnServerEvent:Connect(function(plr,io,...) | |
151 | if io.Mouse then | |
152 | m.Target = io.Target | |
153 | m.Hit = io.Hit | |
154 | elseif io.KeyEvent then | |
155 | m:TrigEvent('Key'..io.KeyEvent,io.Key) | |
156 | elseif io.UserInputType == Enum.UserInputType.MouseButton1 then | |
157 | if io.UserInputState == Enum.UserInputState.Begin then | |
158 | m:TrigEvent("Button1Down") | |
159 | else | |
160 | m:TrigEvent("Button1Up") | |
161 | end | |
162 | end | |
163 | if(not io.KeyEvent and not io.Mouse)then | |
164 | ||
165 | for n,t in pairs(CoAS.Actions) do | |
166 | for _,k in pairs(t.Keys) do | |
167 | if k==io.KeyCode then | |
168 | t.Function(t.Name,io.UserInputState,io) | |
169 | end | |
170 | end | |
171 | end | |
172 | if io.UserInputState == Enum.UserInputState.Begin then | |
173 | UsIS:TrigEvent("InputBegan",io,false) | |
174 | else | |
175 | UsIS:TrigEvent("InputEnded",io,false) | |
176 | end | |
177 | end | |
178 | local varargs={...} | |
179 | --remote:FireServer("MouseEventCall",event,...) | |
180 | if(type=='MouseEventCall')then | |
181 | local event = table.remove(varargs,1) | |
182 | if(m[event])then | |
183 | Event:FireAllClients(event,unpack(varargs)) | |
184 | m:TrigEvent(event,unpack(varargs)) | |
185 | end | |
186 | ||
187 | elseif(type=='MouseUpdate')then | |
188 | m.Target = varargs[1].Target | |
189 | m.Hit = varargs[1].Hit | |
190 | Event:FireAllClients("UpdatePos",m.Target,m.Hit) | |
191 | end | |
192 | ||
193 | ||
194 | end) | |
195 | ||
196 | Func.OnServerInvoke = function(plr,inst,play) | |
197 | if plr~=Player then return end | |
198 | if(inst and typeof(inst) == 'Instance' and inst:IsA'Sound')then | |
199 | loudnesses[inst]=play | |
200 | end | |
201 | end | |
202 | ||
203 | function GetClientProperty(inst,prop) | |
204 | if(prop == 'PlaybackLoudness' and loudnesses[inst])then | |
205 | return loudnesses[inst] | |
206 | elseif(prop == 'PlaybackLoudness')then | |
207 | return Func:InvokeClient(Player,'RegSound',inst) | |
208 | end | |
209 | return Func:InvokeClient(Player,inst,prop) | |
210 | end | |
211 | NLS ([=[ | |
212 | ||
213 | ||
214 | local me = game:service'Players'.localPlayer; | |
215 | local mouse = me:GetMouse(); | |
216 | local UIS = game:service'UserInputService' | |
217 | local ch = me.Character; | |
218 | ||
219 | local UserEvent = ch:WaitForChild('UserInputEvent',30) | |
220 | ||
221 | UIS.InputChanged:connect(function(io,gpe) | |
222 | if(io.UserInputType == Enum.UserInputType.MouseMovement)then | |
223 | UserEvent:FireServer{Mouse=true,Target=mouse.Target,Hit=mouse.Hit} | |
224 | end | |
225 | end) | |
226 | ||
227 | mouse.Changed:connect(function(o) | |
228 | if(o == 'Target' or o == 'Hit')then | |
229 | UserEvent:FireServer{Mouse=true,Target=mouse.Target,Hit=mouse.Hit} | |
230 | end | |
231 | end) | |
232 | ||
233 | UIS.InputBegan:connect(function(io,gpe) | |
234 | if(gpe)then return end | |
235 | UserEvent:FireServer{InputObject=true,KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState} | |
236 | end) | |
237 | ||
238 | UIS.InputEnded:connect(function(io,gpe) | |
239 | if(gpe)then return end | |
240 | UserEvent:FireServer{InputObject=true,KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState} | |
241 | end) | |
242 | ||
243 | mouse.KeyDown:connect(function(k) | |
244 | UserEvent:FireServer{KeyEvent='Down',Key=k} | |
245 | end) | |
246 | ||
247 | mouse.KeyUp:connect(function(k) | |
248 | UserEvent:FireServer{KeyEvent='Up',Key=k} | |
249 | end) | |
250 | ||
251 | local ClientProp = ch:WaitForChild('GetClientProperty',30) | |
252 | ||
253 | local sounds = {} | |
254 | ||
255 | ||
256 | function regSound(o) | |
257 | if(o:IsA'Sound')then | |
258 | ||
259 | local lastLoudness = o.PlaybackLoudness | |
260 | ClientProp:InvokeServer(o,lastLoudness) | |
261 | table.insert(sounds,{o,lastLoudness}) | |
262 | --ClientProp:InvokeServer(o,o.PlaybackLoudness) | |
263 | end | |
264 | end | |
265 | ||
266 | ClientProp.OnClientInvoke = function(inst,prop) | |
267 | if(inst == 'RegSound')then | |
268 | regSound(prop) | |
269 | for i = 1, #sounds do | |
270 | if(sounds[i][1] == prop)then | |
271 | return sounds[i][2] | |
272 | end | |
273 | end | |
274 | else | |
275 | return inst[prop] | |
276 | end | |
277 | end | |
278 | ||
279 | for _,v in next, workspace:GetDescendants() do regSound(v) end | |
280 | workspace.DescendantAdded:connect(regSound) | |
281 | me.Character.DescendantAdded:connect(regSound) | |
282 | ||
283 | game:service'RunService'.RenderStepped:connect(function() | |
284 | for i = 1, #sounds do | |
285 | local tab = sounds[i] | |
286 | local object,last=unpack(tab) | |
287 | if(object.PlaybackLoudness ~= last)then | |
288 | sounds[i][2]=object.PlaybackLoudness | |
289 | ClientProp:InvokeServer(object,sounds[i][2]) | |
290 | end | |
291 | end | |
292 | end) | |
293 | ]=], owner.PlayerGui); | |
294 | ----Sandboxed game object that allows the usage of client-side methods and services | |
295 | --Real game object | |
296 | local RealGame = game | |
297 | ||
298 | --Metatable for fake service | |
299 | local FakeService_Metatable = { | |
300 | __index = function(self,k) | |
301 | local s = rawget(self,"_RealService") | |
302 | if s then | |
303 | return typeof(s[k])=="function" | |
304 | and function(_,...)return s[k](s,...)end or s[k] | |
305 | end | |
306 | end, | |
307 | __newindex = function(self,k,v) | |
308 | local s = rawget(self,"_RealService") | |
309 | if s then s[k]=v end | |
310 | end | |
311 | } | |
312 | local function FakeService(t,RealService) | |
313 | t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService | |
314 | return setmetatable(t,FakeService_Metatable) | |
315 | end | |
316 | ||
317 | --Fake game object | |
318 | local FakeGame = { | |
319 | GetService = function(self,s) | |
320 | return rawget(self,s) or RealGame:GetService(s) | |
321 | end, | |
322 | Players = FakeService({ | |
323 | LocalPlayer = FakeService({GetMouse=function(self)return m end},Player) | |
324 | },"Players"), | |
325 | UserInputService = FakeService(UsIS,"UserInputService"), | |
326 | ContextActionService = FakeService(CoAS,"ContextActionService"), | |
327 | RunService = FakeService({ | |
328 | _btrs = {}, | |
329 | RenderStepped = RealGame:GetService("RunService").Heartbeat, | |
330 | BindToRenderStep = function(self,name,_,fun) | |
331 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
332 | end, | |
333 | UnbindFromRenderStep = function(self,name) | |
334 | self._btrs[name]:Disconnect() | |
335 | end, | |
336 | },"RunService") | |
337 | } | |
338 | rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer) | |
339 | FakeGame.service = FakeGame.GetService | |
340 | FakeService(FakeGame,game) | |
341 | --Changing owner to fake player object to support owner:GetMouse() | |
342 | game,owner = FakeGame,FakeGame.Players.LocalPlayer | |
343 | end | |
344 | ||
345 | LoadLibrary=function(lib) | |
346 | if(lib:lower()=="rbxutility")then | |
347 | return setmetatable({ | |
348 | Create = function(ty) | |
349 | return function(data) | |
350 | local obj = Instance.new(ty) | |
351 | for k, v in pairs(data) do | |
352 | if type(k) == 'number' then | |
353 | v.Parent = obj | |
354 | else | |
355 | obj[k] = v | |
356 | end | |
357 | end | |
358 | return obj | |
359 | end | |
360 | end | |
361 | },{__index=function(_,v) return ({})[v] end}) | |
362 | else | |
363 | return {} | |
364 | end | |
365 | end | |
366 | - | -----PASTE SCRIPTS BELOW THIS LINE DO NOT TOUCH ANY OF THE CODE ABOVE THIS LINE |
366 | + | -----PASTE SCRIPTS BELOW THIS LINE DO NOT TOUCH ANY OF THE CODE ABOVE THIS LINE |
367 | wait(0.2) | |
368 | ||
369 | Player = game:GetService("Players").LocalPlayer | |
370 | PlayerGui = Player.PlayerGui | |
371 | Cam = workspace.CurrentCamera | |
372 | Backpack = Player.Backpack | |
373 | Character = Player.Character | |
374 | Humanoid = Character.Humanoid | |
375 | Mouse = Player:GetMouse() | |
376 | RootPart = Character["HumanoidRootPart"] | |
377 | Torso = Character["Torso"] | |
378 | Head = Character["Head"] | |
379 | RightArm = Character["Right Arm"] | |
380 | LeftArm = Character["Left Arm"] | |
381 | RightLeg = Character["Right Leg"] | |
382 | LeftLeg = Character["Left Leg"] | |
383 | RootJoint = RootPart["RootJoint"] | |
384 | Neck = Torso["Neck"] | |
385 | RightShoulder = Torso["Right Shoulder"] | |
386 | LeftShoulder = Torso["Left Shoulder"] | |
387 | RightHip = Torso["Right Hip"] | |
388 | LeftHip = Torso["Left Hip"] | |
389 | local sick = Instance.new("Sound",RootPart) | |
390 | ||
391 | IT = Instance.new | |
392 | CF = CFrame.new | |
393 | VT = Vector3.new | |
394 | RAD = math.rad | |
395 | C3 = Color3.new | |
396 | UD2 = UDim2.new | |
397 | BRICKC = BrickColor.new | |
398 | ANGLES = CFrame.Angles | |
399 | EULER = CFrame.fromEulerAnglesXYZ | |
400 | COS = math.cos | |
401 | ACOS = math.acos | |
402 | SIN = math.sin | |
403 | ASIN = math.asin | |
404 | ABS = math.abs | |
405 | MRANDOM = math.random | |
406 | FLOOR = math.floor | |
407 | ||
408 | --//=================================\\ | |
409 | --|| USEFUL VALUES | |
410 | --\\=================================// | |
411 | ||
412 | Animation_Speed = 3 | |
413 | Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60) | |
414 | local Speed = 20 | |
415 | local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
416 | local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
417 | local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) | |
418 | local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) | |
419 | local DAMAGEMULTIPLIER = 1 | |
420 | local ANIM = "Idle" | |
421 | local ATTACK = false | |
422 | local EQUIPPED = false | |
423 | local HOLD = false | |
424 | local COMBO = 1 | |
425 | local Rooted = false | |
426 | local SINE = 0 | |
427 | local KEYHOLD = false | |
428 | local CHANGE = 2 / Animation_Speed | |
429 | local WALKINGANIM = false | |
430 | local VALUE1 = false | |
431 | local VALUE2 = false | |
432 | local ROBLOXIDLEANIMATION = IT("Animation") | |
433 | ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation" | |
434 | ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571" | |
435 | --ROBLOXIDLEANIMATION.Parent = Humanoid | |
436 | local WEAPONGUI = IT("ScreenGui", PlayerGui) | |
437 | WEAPONGUI.Name = "Weapon GUI" | |
438 | local Weapon = IT("Model") | |
439 | Weapon.Name = "Adds" | |
440 | local Effects = IT("Folder", Weapon) | |
441 | Effects.Name = "Effects" | |
442 | local ANIMATOR = Humanoid.Animator | |
443 | local ANIMATE = Character.Animate | |
444 | local UNANCHOR = true | |
445 | local MODE = "GoodCop" | |
446 | ||
447 | --//=================================\\ | |
448 | --\\=================================// | |
449 | ||
450 | ||
451 | --//=================================\\ | |
452 | --|| SAZERENOS' ARTIFICIAL HEARTBEAT | |
453 | --\\=================================// | |
454 | ||
455 | ArtificialHB = Instance.new("BindableEvent", script) | |
456 | ArtificialHB.Name = "ArtificialHB" | |
457 | ||
458 | script:WaitForChild("ArtificialHB") | |
459 | ||
460 | frame = Frame_Speed | |
461 | tf = 0 | |
462 | allowframeloss = false | |
463 | tossremainder = false | |
464 | lastframe = tick() | |
465 | script.ArtificialHB:Fire() | |
466 | ||
467 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
468 | tf = tf + s | |
469 | if tf >= frame then | |
470 | if allowframeloss then | |
471 | script.ArtificialHB:Fire() | |
472 | lastframe = tick() | |
473 | else | |
474 | for i = 1, math.floor(tf / frame) do | |
475 | script.ArtificialHB:Fire() | |
476 | end | |
477 | lastframe = tick() | |
478 | end | |
479 | if tossremainder then | |
480 | tf = 0 | |
481 | else | |
482 | tf = tf - frame * math.floor(tf / frame) | |
483 | end | |
484 | end | |
485 | end) | |
486 | ||
487 | --//=================================\\ | |
488 | --\\=================================// | |
489 | ||
490 | --//=================================\\ | |
491 | --|| SOME FUNCTIONS | |
492 | --\\=================================// | |
493 | ||
494 | function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS) | |
495 | return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS) | |
496 | end | |
497 | ||
498 | function PositiveAngle(NUMBER) | |
499 | if NUMBER >= 0 then | |
500 | NUMBER = 0 | |
501 | end | |
502 | return NUMBER | |
503 | end | |
504 | ||
505 | function NegativeAngle(NUMBER) | |
506 | if NUMBER <= 0 then | |
507 | NUMBER = 0 | |
508 | end | |
509 | return NUMBER | |
510 | end | |
511 | ||
512 | function Swait(NUMBER) | |
513 | if NUMBER == 0 or NUMBER == nil then | |
514 | ArtificialHB.Event:wait() | |
515 | else | |
516 | for i = 1, NUMBER do | |
517 | ArtificialHB.Event:wait() | |
518 | end | |
519 | end | |
520 | end | |
521 | ||
522 | function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET) | |
523 | local NEWMESH = IT(MESH) | |
524 | if MESH == "SpecialMesh" then | |
525 | NEWMESH.MeshType = MESHTYPE | |
526 | if MESHID ~= "nil" and MESHID ~= "" then | |
527 | NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID | |
528 | end | |
529 | if TEXTUREID ~= "nil" and TEXTUREID ~= "" then | |
530 | NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID | |
531 | end | |
532 | end | |
533 | NEWMESH.Offset = OFFSET or VT(0, 0, 0) | |
534 | NEWMESH.Scale = SCALE | |
535 | NEWMESH.Parent = PARENT | |
536 | return NEWMESH | |
537 | end | |
538 | ||
539 | function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR) | |
540 | local NEWPART = IT("Part") | |
541 | NEWPART.formFactor = FORMFACTOR | |
542 | NEWPART.Reflectance = REFLECTANCE | |
543 | NEWPART.Transparency = TRANSPARENCY | |
544 | NEWPART.CanCollide = false | |
545 | NEWPART.Locked = true | |
546 | NEWPART.Anchored = true | |
547 | if ANCHOR == false then | |
548 | NEWPART.Anchored = false | |
549 | end | |
550 | NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR)) | |
551 | NEWPART.Name = NAME | |
552 | NEWPART.Size = SIZE | |
553 | NEWPART.Position = Torso.Position | |
554 | NEWPART.Material = MATERIAL | |
555 | NEWPART:BreakJoints() | |
556 | NEWPART.Parent = PARENT | |
557 | return NEWPART | |
558 | end | |
559 | ||
560 | local function weldBetween(a, b) | |
561 | local weldd = Instance.new("ManualWeld") | |
562 | weldd.Part0 = a | |
563 | weldd.Part1 = b | |
564 | weldd.C0 = CFrame.new() | |
565 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
566 | weldd.Parent = a | |
567 | return weldd | |
568 | end | |
569 | ||
570 | ||
571 | function QuaternionFromCFrame(cf) | |
572 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
573 | local trace = m00 + m11 + m22 | |
574 | if trace > 0 then | |
575 | local s = math.sqrt(1 + trace) | |
576 | local recip = 0.5 / s | |
577 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
578 | else | |
579 | local i = 0 | |
580 | if m11 > m00 then | |
581 | i = 1 | |
582 | end | |
583 | if m22 > (i == 0 and m00 or m11) then | |
584 | i = 2 | |
585 | end | |
586 | if i == 0 then | |
587 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
588 | local recip = 0.5 / s | |
589 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
590 | elseif i == 1 then | |
591 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
592 | local recip = 0.5 / s | |
593 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
594 | elseif i == 2 then | |
595 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
596 | local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
597 | end | |
598 | end | |
599 | end | |
600 | ||
601 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
602 | local xs, ys, zs = x + x, y + y, z + z | |
603 | local wx, wy, wz = w * xs, w * ys, w * zs | |
604 | local xx = x * xs | |
605 | local xy = x * ys | |
606 | local xz = x * zs | |
607 | local yy = y * ys | |
608 | local yz = y * zs | |
609 | local zz = z * zs | |
610 | 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)) | |
611 | end | |
612 | ||
613 | function QuaternionSlerp(a, b, t) | |
614 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
615 | local startInterp, finishInterp; | |
616 | if cosTheta >= 0.0001 then | |
617 | if (1 - cosTheta) > 0.0001 then | |
618 | local theta = ACOS(cosTheta) | |
619 | local invSinTheta = 1 / SIN(theta) | |
620 | startInterp = SIN((1 - t) * theta) * invSinTheta | |
621 | finishInterp = SIN(t * theta) * invSinTheta | |
622 | else | |
623 | startInterp = 1 - t | |
624 | finishInterp = t | |
625 | end | |
626 | else | |
627 | if (1 + cosTheta) > 0.0001 then | |
628 | local theta = ACOS(-cosTheta) | |
629 | local invSinTheta = 1 / SIN(theta) | |
630 | startInterp = SIN((t - 1) * theta) * invSinTheta | |
631 | finishInterp = SIN(t * theta) * invSinTheta | |
632 | else | |
633 | startInterp = t - 1 | |
634 | finishInterp = t | |
635 | end | |
636 | end | |
637 | 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 | |
638 | end | |
639 | ||
640 | function Clerp(a, b, t) | |
641 | local qa = {QuaternionFromCFrame(a)} | |
642 | local qb = {QuaternionFromCFrame(b)} | |
643 | local ax, ay, az = a.x, a.y, a.z | |
644 | local bx, by, bz = b.x, b.y, b.z | |
645 | local _t = 1 - t | |
646 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
647 | end | |
648 | ||
649 | function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME) | |
650 | local frame = IT("Frame") | |
651 | frame.BackgroundTransparency = TRANSPARENCY | |
652 | frame.BorderSizePixel = BORDERSIZEPIXEL | |
653 | frame.Position = POSITION | |
654 | frame.Size = SIZE | |
655 | frame.BackgroundColor3 = COLOR | |
656 | frame.BorderColor3 = BORDERCOLOR | |
657 | frame.Name = NAME | |
658 | frame.Parent = PARENT | |
659 | return frame | |
660 | end | |
661 | ||
662 | function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME) | |
663 | local label = IT("TextLabel") | |
664 | label.BackgroundTransparency = 1 | |
665 | label.Size = UD2(1, 0, 1, 0) | |
666 | label.Position = UD2(0, 0, 0, 0) | |
667 | label.TextColor3 = TEXTCOLOR | |
668 | label.TextStrokeTransparency = STROKETRANSPARENCY | |
669 | label.TextTransparency = TRANSPARENCY | |
670 | label.FontSize = TEXTFONTSIZE | |
671 | label.Font = TEXTFONT | |
672 | label.BorderSizePixel = BORDERSIZEPIXEL | |
673 | label.TextScaled = false | |
674 | label.Text = TEXT | |
675 | label.Name = NAME | |
676 | label.Parent = PARENT | |
677 | return label | |
678 | end | |
679 | ||
680 | function NoOutlines(PART) | |
681 | PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10 | |
682 | end | |
683 | ||
684 | function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1) | |
685 | local NEWWELD = IT(TYPE) | |
686 | NEWWELD.Part0 = PART0 | |
687 | NEWWELD.Part1 = PART1 | |
688 | NEWWELD.C0 = C0 | |
689 | NEWWELD.C1 = C1 | |
690 | NEWWELD.Parent = PARENT | |
691 | return NEWWELD | |
692 | end | |
693 | ||
694 | local S = IT("Sound") | |
695 | function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP) | |
696 | local NEWSOUND = nil | |
697 | coroutine.resume(coroutine.create(function() | |
698 | NEWSOUND = S:Clone() | |
699 | NEWSOUND.Parent = PARENT | |
700 | NEWSOUND.Volume = VOLUME | |
701 | NEWSOUND.Pitch = PITCH | |
702 | NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID | |
703 | NEWSOUND:play() | |
704 | if DOESLOOP == true then | |
705 | NEWSOUND.Looped = true | |
706 | else | |
707 | repeat wait(1) until NEWSOUND.Playing == false | |
708 | NEWSOUND:remove() | |
709 | end | |
710 | end)) | |
711 | return NEWSOUND | |
712 | end | |
713 | ||
714 | function CFrameFromTopBack(at, top, back) | |
715 | local right = top:Cross(back) | |
716 | return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z) | |
717 | end | |
718 | ||
719 | --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil}) | |
720 | function WACKYEFFECT(Table) | |
721 | local TYPE = (Table.EffectType or "Sphere") | |
722 | local SIZE = (Table.Size or VT(1,1,1)) | |
723 | local ENDSIZE = (Table.Size2 or VT(0,0,0)) | |
724 | local TRANSPARENCY = (Table.Transparency or 0) | |
725 | local ENDTRANSPARENCY = (Table.Transparency2 or 1) | |
726 | local CFRAME = (Table.CFrame or Torso.CFrame) | |
727 | local MOVEDIRECTION = (Table.MoveToPos or nil) | |
728 | local ROTATION1 = (Table.RotationX or 0) | |
729 | local ROTATION2 = (Table.RotationY or 0) | |
730 | local ROTATION3 = (Table.RotationZ or 0) | |
731 | local MATERIAL = (Table.Material or "Neon") | |
732 | local COLOR = (Table.Color or C3(1,1,1)) | |
733 | local TIME = (Table.Time or 45) | |
734 | local SOUNDID = (Table.SoundID or nil) | |
735 | local SOUNDPITCH = (Table.SoundPitch or nil) | |
736 | local SOUNDVOLUME = (Table.SoundVolume or nil) | |
737 | coroutine.resume(coroutine.create(function() | |
738 | local PLAYSSOUND = false | |
739 | local SOUND = nil | |
740 | local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true) | |
741 | if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then | |
742 | PLAYSSOUND = true | |
743 | SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false) | |
744 | end | |
745 | EFFECT.Color = COLOR | |
746 | local MSH = nil | |
747 | if TYPE == "Sphere" then | |
748 | MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0)) | |
749 | elseif TYPE == "Block" or TYPE == "Box" then | |
750 | MSH = IT("BlockMesh",EFFECT) | |
751 | MSH.Scale = SIZE | |
752 | elseif TYPE == "Wave" then | |
753 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8)) | |
754 | elseif TYPE == "Ring" then | |
755 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0)) | |
756 | elseif TYPE == "Slash" then | |
757 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0)) | |
758 | elseif TYPE == "Round Slash" then | |
759 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0)) | |
760 | elseif TYPE == "Swirl" then | |
761 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0)) | |
762 | elseif TYPE == "Skull" then | |
763 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0)) | |
764 | elseif TYPE == "Crystal" then | |
765 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0)) | |
766 | end | |
767 | if MSH ~= nil then | |
768 | local MOVESPEED = nil | |
769 | if MOVEDIRECTION ~= nil then | |
770 | MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME | |
771 | end | |
772 | local GROWTH = SIZE - ENDSIZE | |
773 | local TRANS = TRANSPARENCY - ENDTRANSPARENCY | |
774 | if TYPE == "Block" then | |
775 | EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
776 | else | |
777 | EFFECT.CFrame = CFRAME | |
778 | end | |
779 | for LOOP = 1, TIME+1 do | |
780 | Swait() | |
781 | MSH.Scale = MSH.Scale - GROWTH/TIME | |
782 | if TYPE == "Wave" then | |
783 | MSH.Offset = VT(0,0,-MSH.Scale.X/8) | |
784 | end | |
785 | EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME | |
786 | if TYPE == "Block" then | |
787 | EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
788 | else | |
789 | EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3)) | |
790 | end | |
791 | if MOVEDIRECTION ~= nil then | |
792 | local ORI = EFFECT.Orientation | |
793 | EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED) | |
794 | EFFECT.Orientation = ORI | |
795 | end | |
796 | end | |
797 | if PLAYSSOUND == false then | |
798 | EFFECT:remove() | |
799 | else | |
800 | repeat Swait() until SOUND.Playing == false | |
801 | EFFECT:remove() | |
802 | end | |
803 | else | |
804 | if PLAYSSOUND == false then | |
805 | EFFECT:remove() | |
806 | else | |
807 | repeat Swait() until SOUND.Playing == false | |
808 | EFFECT:remove() | |
809 | end | |
810 | end | |
811 | end)) | |
812 | end | |
813 | ||
814 | function MakeForm(PART,TYPE) | |
815 | if TYPE == "Cyl" then | |
816 | local MSH = IT("CylinderMesh",PART) | |
817 | elseif TYPE == "Ball" then | |
818 | local MSH = IT("SpecialMesh",PART) | |
819 | MSH.MeshType = "Sphere" | |
820 | elseif TYPE == "Wedge" then | |
821 | local MSH = IT("SpecialMesh",PART) | |
822 | MSH.MeshType = "Wedge" | |
823 | elseif TYPE == "Head" then | |
824 | local MSH = IT("SpecialMesh",PART) | |
825 | MSH.Scale = VT(1.25,1.25,1.25) | |
826 | end | |
827 | end | |
828 | ||
829 | Debris = game:GetService("Debris") | |
830 | ||
831 | function CastProperRay(StartPos, EndPos, Distance, Ignore) | |
832 | local DIRECTION = CF(StartPos,EndPos).lookVector | |
833 | return Raycast(StartPos, DIRECTION, Distance, Ignore) | |
834 | end | |
835 | ||
836 | function CharacterFade(COLOR,TIMER) | |
837 | coroutine.resume(coroutine.create(function() | |
838 | local FADE = IT("Model",Effects) | |
839 | FADE.Name = "FadingEffect" | |
840 | for _, c in pairs(Character:GetChildren()) do | |
841 | if c.ClassName == "Part" and c ~= RootPart then | |
842 | local FADER = c:Clone() | |
843 | FADER.Color = COLOR | |
844 | FADER.CFrame = c.CFrame | |
845 | FADER.Parent = FADE | |
846 | FADER.Anchored = true | |
847 | FADER.Transparency = 0.25+c.Transparency | |
848 | FADER:BreakJoints() | |
849 | FADER.Material = "Neon" | |
850 | if FADER.Name == "Head" then | |
851 | FADER:ClearAllChildren() | |
852 | FADER.Size = VT(1,1,1) | |
853 | end | |
854 | FADER.CanCollide = false | |
855 | end | |
856 | end | |
857 | local TRANS = 0.75/TIMER | |
858 | for i = 1, TIMER do | |
859 | Swait() | |
860 | for _, c in pairs(FADE:GetChildren()) do | |
861 | if c.ClassName == "Part" then | |
862 | c.Transparency = c.Transparency + TRANS | |
863 | end | |
864 | end | |
865 | end | |
866 | FADE:remove() | |
867 | end)) | |
868 | end | |
869 | ||
870 | function Chatter(Text,Timer) | |
871 | local chat = coroutine.wrap(function() | |
872 | if Character:FindFirstChild("SpeechBoard")~= nil then | |
873 | Character:FindFirstChild("SpeechBoard"):destroy() | |
874 | end | |
875 | local naeeym2 = IT("BillboardGui",Character) | |
876 | naeeym2.Size = UD2(0,100,0,40) | |
877 | naeeym2.StudsOffset = Vector3.new(0,2,0) | |
878 | naeeym2.Adornee = Character.Head | |
879 | naeeym2.Name = "SpeechBoard" | |
880 | naeeym2.AlwaysOnTop = true | |
881 | local tecks2 = IT("TextLabel",naeeym2) | |
882 | tecks2.BackgroundTransparency = 1 | |
883 | tecks2.BorderSizePixel = 0 | |
884 | tecks2.Text = "" | |
885 | tecks2.Font = "Legacy" | |
886 | tecks2.TextSize = 15 | |
887 | tecks2.TextStrokeTransparency = 0 | |
888 | tecks2.TextColor3 = Color3.new(1,1,1) | |
889 | tecks2.TextStrokeColor3 = Color3.new(0,0,0) | |
890 | tecks2.Size = UDim2.new(1,0,0.5,0) | |
891 | for i = 1,string.len(Text),1 do | |
892 | CreateSound(418252437, Head, 3, MRANDOM(8,12)/15, false) | |
893 | tecks2.Text = string.sub(Text,1,i) | |
894 | wait(Timer) | |
895 | end | |
896 | wait(1) | |
897 | naeeym2:Destroy() | |
898 | end) | |
899 | chat() | |
900 | end | |
901 | ||
902 | --//=================================\\ | |
903 | --|| WEAPON CREATION | |
904 | --\\=================================// | |
905 | ||
906 | local FACE = CreatePart(3, Weapon, "Neon", 0, 0, "Dark orange", "Face mask", VT(1.001,1.001,1.001),false) | |
907 | CreateWeldOrSnapOrMotor("Weld", FACE, Head, FACE, CF(0.02,0,0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
908 | MakeForm(FACE,"Head") | |
909 | local EYE = CreatePart(3, Weapon, "Neon", 0, 0, "Tr. Red", "Eye", VT(0.1,0.25,0.2),false) | |
910 | CreateWeldOrSnapOrMotor("Weld", EYE, Head, EYE, CF(0.15,0.25,-0.53) * ANGLES(RAD(0), RAD(0), RAD(-25)), CF(0, 0, 0)) | |
911 | MakeForm(EYE,"Ball") | |
912 | local top = Instance.new("Shirt") | |
913 | top.ShirtTemplate = "rbxassetid://269003887" | |
914 | top.Parent = Character | |
915 | top.Name = "Cloth" | |
916 | local bottom = Instance.new("Pants") | |
917 | bottom.PantsTemplate = "rbxassetid://268832352" | |
918 | bottom.Parent = Character | |
919 | bottom.Name = "Cloth" | |
920 | local BATON = CreatePart(3, Weapon, "Neon", 0, 0, "Dark green", "Baton", VT(1, 0.8, 3),false) | |
921 | CreateMesh("SpecialMesh", BATON, "FileMesh", "11820238", "", VT(1,1,1), VT(0,0,0)) | |
922 | local BATONWELD = CreateWeldOrSnapOrMotor("Weld", BATON, Torso, BATON, CF(1,-0.8,0.75) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
923 | local A = IT("Attachment",BATON) | |
924 | local B = IT("Attachment",BATON) | |
925 | B.Position = VT(0,0,-0.4) | |
926 | A.Position = VT(0,0,1) | |
927 | local Trail = IT("Trail",BATON) | |
928 | Trail.Attachment0 = A | |
929 | Trail.Attachment1 = B | |
930 | Trail.Lifetime = 0.1 | |
931 | Trail.Color = ColorSequence.new(C3(0,0,0)) | |
932 | Trail.Transparency = NumberSequence.new(0, 1) | |
933 | Trail.Enabled = false | |
934 | Trail.Texture = "http://www.roblox.com/asset/?id=1831500579" | |
935 | local GUN = CreatePart(3, Weapon, "Neon", 0, 0, "Tr. Blue", "Gun", VT(1, 0.8, 3),false) | |
936 | CreateMesh("SpecialMesh", GUN, "FileMesh", "623102664", "623102879", VT(0.01, 0.01, 0.01), VT(0,0,0)) | |
937 | local GUNWELD = CreateWeldOrSnapOrMotor("Weld", GUN, Torso, GUN, CF(-1.1,-1.1,0) * ANGLES(RAD(0), RAD(90), RAD(-90)), CF(0, 0, 0)) | |
938 | ||
939 | for _, c in pairs(Weapon:GetChildren()) do | |
940 | if c.ClassName == "Part" then | |
941 | c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0) | |
942 | end | |
943 | end | |
944 | ||
945 | Weapon.Parent = Character | |
946 | ||
947 | local SKILLTEXTCOLOR = C3(1,1,1) | |
948 | local SKILLFONT = "Legacy" | |
949 | local SKILLTEXTSIZE = 4 | |
950 | ||
951 | local ATTACKSGOODCOP = {"Mouse - Warning","Q - Baton Stun","E - Cuffs"} | |
952 | local ATTACKSBADCOP = {"Mouse - Silence","Q - Baton Breaker","E - The Right to remain silent"} | |
953 | local GOODUI = {} | |
954 | local BADUI = {} | |
955 | ||
956 | for i = 1, #ATTACKSGOODCOP do | |
957 | local SKILLFRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.73, 0, 0.7-(0.04*i), 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill Frame") | |
958 | local SKILLTEXT = CreateLabel(SKILLFRAME, "["..ATTACKSGOODCOP[i].."]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Skill text") | |
959 | SKILLTEXT.TextXAlignment = "Right" | |
960 | table.insert(GOODUI,SKILLTEXT) | |
961 | end | |
962 | ||
963 | for i = 1, #ATTACKSBADCOP do | |
964 | local SKILLFRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.01, 0, 0.7-(0.04*i), 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill Frame") | |
965 | local SKILLTEXT = CreateLabel(SKILLFRAME, "["..ATTACKSBADCOP[i].."]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 1, "Skill text") | |
966 | SKILLTEXT.TextXAlignment = "Left" | |
967 | table.insert(BADUI,SKILLTEXT) | |
968 | end | |
969 | ||
970 | local SKILLFRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.365, 0, 0.9, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill Frame") | |
971 | local SKILLTEXT = CreateLabel(SKILLFRAME, "[F - Switch]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Skill text") | |
972 | ||
973 | --//=================================\\ | |
974 | --|| DAMAGING | |
975 | --\\=================================// | |
976 | ||
977 | function ApplyDamage(Humanoid,Damage) | |
978 | Damage = Damage * DAMAGEMULTIPLIER | |
979 | local DEAD = false | |
980 | if Humanoid.Health < 2000 then | |
981 | if Humanoid.Health - Damage > 0 then | |
982 | Humanoid.Health = Humanoid.Health - Damage | |
983 | else | |
984 | DEAD = true | |
985 | Humanoid.Parent:BreakJoints() | |
986 | end | |
987 | else | |
988 | DEAD = true | |
989 | Humanoid.Parent:BreakJoints() | |
990 | end | |
991 | if DEAD == true then | |
992 | if MODE == "GoodCop" then | |
993 | local TEXTS = {"I'm simply laying down the law.","You should've taken account of the law.","Another criminal down."} | |
994 | Chatter(TEXTS[MRANDOM(1,#TEXTS)],0) | |
995 | elseif MODE == "BadCop" then | |
996 | local TEXTS = {"Criminals should leave this world!","You should've taken account of the law!","And stay down!"} | |
997 | Chatter(TEXTS[MRANDOM(1,#TEXTS)],0) | |
998 | end | |
999 | end | |
1000 | end | |
1001 | ||
1002 | --//=================================\\ | |
1003 | --|| TRANSFORMATIONS | |
1004 | --\\=================================// | |
1005 | ||
1006 | function Switch() | |
1007 | ATTACK = true | |
1008 | Rooted = true | |
1009 | if MODE == "GoodCop" then | |
1010 | for i=0, 0.3, 0.1 / Animation_Speed do | |
1011 | Swait() | |
1012 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1013 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1014 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(25)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1015 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1016 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(83), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1017 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-83), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1018 | end | |
1019 | for i=0, 1, 0.1 / Animation_Speed do | |
1020 | Swait() | |
1021 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1022 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1023 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5, -0.5) * ANGLES(RAD(100), RAD(0), RAD(-70)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1024 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.35, -0.35) * ANGLES(RAD(70), RAD(0), RAD(80)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1025 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(83), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1026 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-83), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1027 | end | |
1028 | CreateSound(363808674, Torso, 6, 1, false) | |
1029 | for i=0, 0.6, 0.1 / Animation_Speed do | |
1030 | Swait() | |
1031 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1032 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5), RAD(25), RAD(0)), 1 / Animation_Speed) | |
1033 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5, -0.5) * ANGLES(RAD(100), RAD(0), RAD(-50)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1034 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.35, -0.35) * ANGLES(RAD(70), RAD(0), RAD(60)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1035 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(83), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1036 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-83), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1037 | end | |
1038 | CreateSound(363808674, Torso, 6, 1, false) | |
1039 | for i=0, 0.6, 0.1 / Animation_Speed do | |
1040 | Swait() | |
1041 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1042 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5), RAD(-25), RAD(0)), 1 / Animation_Speed) | |
1043 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5, -0.5) * ANGLES(RAD(100), RAD(0), RAD(-90)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1044 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.35, -0.35) * ANGLES(RAD(70), RAD(0), RAD(90)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1045 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(83), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1046 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-83), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1047 | end | |
1048 | MODE = "BadCop" | |
1049 | elseif MODE == "BadCop" then | |
1050 | CreateSound(147722227, Torso, 4, 1.3, false) | |
1051 | for i=0, 0.3, 0.1 / Animation_Speed do | |
1052 | Swait() | |
1053 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1054 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(35), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1055 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(25)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1056 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1057 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(83), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1058 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-83), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1059 | end | |
1060 | MODE = "GoodCop" | |
1061 | end | |
1062 | ATTACK = false | |
1063 | Rooted = false | |
1064 | end | |
1065 | ||
1066 | --//=================================\\ | |
1067 | --|| ATTACK GOOD COP | |
1068 | --\\=================================// | |
1069 | ||
1070 | function Warning() | |
1071 | local TARGET = Mouse.Target | |
1072 | if TARGET ~= nil then | |
1073 | if TARGET.Parent:FindFirstChildOfClass("Humanoid") then | |
1074 | local HUM = TARGET.Parent:FindFirstChildOfClass("Humanoid") | |
1075 | local LEG = TARGET.Parent:FindFirstChild("Right Leg") or TARGET.Parent:FindFirstChild("RightLowerLeg") | |
1076 | if LEG and HUM.Health > 0 then | |
1077 | Speed = 6 | |
1078 | ATTACK = true | |
1079 | Rooted = false | |
1080 | local GYRO = IT("BodyGyro",RootPart) | |
1081 | GYRO.D = 2 | |
1082 | GYRO.P = 2000 | |
1083 | GYRO.MaxTorque = VT(0,4000000,0) | |
1084 | coroutine.resume(coroutine.create(function() | |
1085 | repeat | |
1086 | Swait() | |
1087 | GYRO.CFrame = CF(RootPart.Position,LEG.Position) | |
1088 | until ATTACK == false | |
1089 | GYRO:Remove() | |
1090 | end)) | |
1091 | local HIT,POS = CastProperRay(RootPart.Position,LEG.Position,1000,Character) | |
1092 | local PASS = true | |
1093 | for i=0, 0.2, 0.1 / Animation_Speed do | |
1094 | Swait() | |
1095 | HIT,POS = CastProperRay(RootPart.Position,LEG.Position,1000,Character) | |
1096 | if HIT == nil then | |
1097 | PASS = false | |
1098 | break | |
1099 | else | |
1100 | if HIT.Parent ~= TARGET.Parent then | |
1101 | PASS = false | |
1102 | break | |
1103 | end | |
1104 | end | |
1105 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1106 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25), RAD(0), RAD(15)), 1 / Animation_Speed) | |
1107 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1108 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.525, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(5)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1109 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1110 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1111 | end | |
1112 | CreateSound(147722227, GUN, 6, 1.3, false) | |
1113 | GUNWELD.Part0 = LeftArm | |
1114 | GUNWELD.C0 = CF(0,-1.5,0) * ANGLES(RAD(0), RAD(90), RAD(-90)) | |
1115 | for i=0, 0.4, 0.1 / Animation_Speed do | |
1116 | Swait() | |
1117 | HIT,POS = CastProperRay(RootPart.Position,LEG.Position,1000,Character) | |
1118 | if HIT == nil then | |
1119 | PASS = false | |
1120 | break | |
1121 | else | |
1122 | if HIT.Parent ~= TARGET.Parent then | |
1123 | PASS = false | |
1124 | break | |
1125 | end | |
1126 | end | |
1127 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-45)), 1 / Animation_Speed) | |
1128 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
1129 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1130 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(-45)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1131 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1132 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1133 | end | |
1134 | if PASS == true then | |
1135 | local GUNPOS = GUN.CFrame*CF(1.2, 0.5, 0).p | |
1136 | local DISTANCE = (LEG.Position - GUNPOS).Magnitude | |
1137 | CreateSound(160432334, LEG, 10, 1, false) | |
1138 | local HEAD = HUM.Parent:FindFirstChild("Head") | |
1139 | if HEAD then | |
1140 | CreateSound(535690488, HEAD, 7, 1, false) | |
1141 | end | |
1142 | ApplyDamage(HUM,15) | |
1143 | HUM.WalkSpeed = HUM.WalkSpeed - 3 | |
1144 | HUM.PlatformStand = true | |
1145 | coroutine.resume(coroutine.create(function() | |
1146 | wait(0.1) | |
1147 | if HUM.WalkSpeed > 0 then | |
1148 | HUM.PlatformStand = false | |
1149 | end | |
1150 | end)) | |
1151 | WACKYEFFECT({Time = 15, EffectType = "Block", Size = VT(0,0,0), Size2 = VT(0.3,0.3,0.3), Transparency = 0, Transparency2 = 1, CFrame = CF(GUNPOS), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,0), SoundID = 330704232, SoundPitch = 1, SoundVolume = 4}) | |
1152 | WACKYEFFECT({Time = 6, EffectType = "Box", Size = VT(0,0,DISTANCE), Size2 = VT(0.1,0.1,DISTANCE), Transparency = 0, Transparency2 = 1, CFrame = CF(GUNPOS,LEG.Position)*CF(0,0,-DISTANCE/2), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,0), SoundID = nil, SoundPitch = nil, SoundVolume = nil}) | |
1153 | for i=0, 1, 0.1 / Animation_Speed do | |
1154 | Swait() | |
1155 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-45)), 1 / Animation_Speed) | |
1156 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(45)), 1 / Animation_Speed) | |
1157 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1158 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(120), RAD(0), RAD(-45)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1159 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1160 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1161 | end | |
1162 | end | |
1163 | for i=0, 0.3, 0.1 / Animation_Speed do | |
1164 | Swait() | |
1165 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1166 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25), RAD(0), RAD(15)), 1 / Animation_Speed) | |
1167 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1168 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.525, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(5)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1169 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1170 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1171 | end | |
1172 | GUNWELD.Part0 = Torso | |
1173 | GUNWELD.C0 = CF(-1.1,-1.1,0) * ANGLES(RAD(0), RAD(90), RAD(-90)) | |
1174 | ATTACK = false | |
1175 | Rooted = false | |
1176 | Speed = 20 | |
1177 | end | |
1178 | end | |
1179 | end | |
1180 | end | |
1181 | function BatonStun() | |
1182 | ATTACK = true | |
1183 | Rooted = false | |
1184 | Speed = 4 | |
1185 | for i=0, 0.2, 0.1 / Animation_Speed do | |
1186 | Swait() | |
1187 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1188 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-15)), 1 / Animation_Speed) | |
1189 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-5)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1190 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1191 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1192 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1193 | end | |
1194 | BATONWELD.Part0 = RightArm | |
1195 | BATONWELD.C0 = CF(0,-1,0) * ANGLES(RAD(0), RAD(0), RAD(0)) * CF(0,0,1) | |
1196 | for i=0, 0.2, 0.1 / Animation_Speed do | |
1197 | Swait() | |
1198 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-25)), 1 / Animation_Speed) | |
1199 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(25)), 1 / Animation_Speed) | |
1200 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0.1) * ANGLES(RAD(0), RAD(0), RAD(25)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1201 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1202 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1203 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1204 | end | |
1205 | Speed = 25 | |
1206 | CreateSound(147722227, BATON, 6, 1.2, false) | |
1207 | Trail.Enabled = true | |
1208 | BATON.CanCollide = true | |
1209 | local SPEAKING = false | |
1210 | local HITS = {} | |
1211 | local TOUCH = BATON.Touched:Connect(function(hit) | |
1212 | if hit.Parent:FindFirstChildOfClass("Humanoid") then | |
1213 | local HUM = hit.Parent:FindFirstChildOfClass("Humanoid") | |
1214 | local TORSO = hit.Parent:FindFirstChild("Torso") or hit.Parent:FindFirstChild("UpperTorso") | |
1215 | if TORSO and HUM.Health > 0 then | |
1216 | local PASS = true | |
1217 | for i = 1, #HITS do | |
1218 | if HITS[i] == hit.Parent then | |
1219 | PASS = false | |
1220 | end | |
1221 | end | |
1222 | table.insert(HITS,hit.Parent) | |
1223 | if PASS == true then | |
1224 | HUM.PlatformStand = true | |
1225 | ApplyDamage(HUM,20) | |
1226 | local bv = Instance.new("BodyVelocity",TORSO) | |
1227 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
1228 | bv.velocity = CF(Torso.Position-VT(0,5,0),TORSO.Position).lookVector*70 | |
1229 | Debris:AddItem(bv,0.05) | |
1230 | CreateSound(260430079, BATON, 6, 1, false) | |
1231 | WACKYEFFECT({Time = 15, EffectType = "Sphere", Size = VT(0,0,0), Size2 = VT(3,3,3), Transparency = 0, Transparency2 = 1, CFrame = CF(TORSO.Position,BATON.Position)*CF(0,0,-0.5), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Glass = C3(1,1,1), SoundID = nil, SoundPitch = 1, SoundVolume = 4}) | |
1232 | coroutine.resume(coroutine.create(function() | |
1233 | wait(1) | |
1234 | if HUM.WalkSpeed > 0 then | |
1235 | HUM.PlatformStand = false | |
1236 | end | |
1237 | end)) | |
1238 | if SPEAKING == false and MRANDOM(1,5) == 1 then | |
1239 | SPEAKING = true | |
1240 | Chatter("Let that be a warning.",0) | |
1241 | end | |
1242 | end | |
1243 | end | |
1244 | end | |
1245 | end) | |
1246 | for i=0, 0.35, 0.1 / Animation_Speed do | |
1247 | Swait() | |
1248 | BATONWELD.C0 = Clerp(BATONWELD.C0,CF(0,-1,0) * ANGLES(RAD(120), RAD(0), RAD(0)) * CF(0,0,1), 1 / Animation_Speed) | |
1249 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(15)), 1 / Animation_Speed) | |
1250 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 1 / Animation_Speed) | |
1251 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.15, 0.5, -0.6) * ANGLES(RAD(140), RAD(0), RAD(-31)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1252 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-3)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1253 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1254 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1255 | end | |
1256 | TOUCH:Disconnect() | |
1257 | BATON.CanCollide = false | |
1258 | Speed = 20 | |
1259 | Trail.Enabled = false | |
1260 | for i=0, 0.2, 0.1 / Animation_Speed do | |
1261 | Swait() | |
1262 | BATONWELD.C0 = Clerp(BATONWELD.C0,CF(0,-1,0) * ANGLES(RAD(0), RAD(0), RAD(0)) * CF(0,0,1), 2 / Animation_Speed) | |
1263 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1264 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-15)), 1 / Animation_Speed) | |
1265 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-5)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1266 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1267 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1268 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1269 | end | |
1270 | BATONWELD.Part0 = Torso | |
1271 | BATONWELD.C0 = CF(1,-0.8,0.75) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
1272 | ATTACK = false | |
1273 | Rooted = false | |
1274 | end | |
1275 | function Cuffs() | |
1276 | local TARGET = Mouse.Target | |
1277 | if TARGET ~= nil then | |
1278 | if TARGET.Parent:FindFirstChildOfClass("Humanoid") then | |
1279 | local HUM = TARGET.Parent:FindFirstChildOfClass("Humanoid") | |
1280 | local ROOT = TARGET.Parent:FindFirstChild("HumanoidRootPart") or TARGET.Parent:FindFirstChild("Torso") or TARGET.Parent:FindFirstChild("UpperTorso") | |
1281 | if ROOT and HUM.Health > 0 then | |
1282 | local FOE = Mouse.Target.Parent | |
1283 | ATTACK = true | |
1284 | Rooted = true | |
1285 | CharacterFade(C3(1,1,1),70) | |
1286 | RootPart.CFrame = ROOT.CFrame*CF(0,0,2) | |
1287 | ROOT.Anchored = true | |
1288 | CreateSound(289556450, RootPart, 5, 1.4, false) | |
1289 | Chatter("You have the right to remain silent.",0) | |
1290 | for i=0, 2, 0.1 / Animation_Speed do | |
1291 | Swait() | |
1292 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(15), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1293 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1294 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(80), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1295 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(80), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1296 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(15), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1297 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1298 | end | |
1299 | local RIGHTCUFF = nil | |
1300 | local LEFTCUFF = nil | |
1301 | local ChainLink = nil | |
1302 | CreateSound(1279090548, ROOT, 10, 1.4, false) | |
1303 | for _, c in pairs(FOE:GetChildren()) do | |
1304 | if c.Name == "Left Arm" or c.Name == "LeftLowerArm" then | |
1305 | LEFTCUFF = CreatePart(3, FOE, "Metal", 0, 0, "Mid gray", "Cuff", VT(c.Size.X+0.1, 0.1, c.Size.Z+0.1),false) | |
1306 | LEFTCUFF.CFrame = c.CFrame | |
1307 | weldBetween(c,LEFTCUFF) | |
1308 | end | |
1309 | end | |
1310 | for _, c in pairs(FOE:GetChildren()) do | |
1311 | if c.Name == "Right Arm" or c.Name == "RightLowerArm" then | |
1312 | RIGHTCUFF = CreatePart(3, FOE, "Metal", 0, 0, "Mid gray", "Cuff", VT(c.Size.X+0.1, 0.1, c.Size.Z+0.1),false) | |
1313 | RIGHTCUFF.CFrame = c.CFrame | |
1314 | weldBetween(c,RIGHTCUFF) | |
1315 | end | |
1316 | end | |
1317 | if RIGHTCUFF and LEFTCUFF then | |
1318 | local A = IT("Attachment",RIGHTCUFF) | |
1319 | local B = IT("Attachment",LEFTCUFF) | |
1320 | ChainLink = IT("Beam",FOE) | |
1321 | ChainLink.Texture = "rbxassetid://73042633" | |
1322 | ChainLink.Color = ColorSequence.new(C3(0.8,0.8,0.8)) | |
1323 | ChainLink.TextureSpeed = 0 | |
1324 | ChainLink.Width0 = 1 | |
1325 | ChainLink.Width1 = 1 | |
1326 | ChainLink.Segments = 25 | |
1327 | ChainLink.TextureLength = 3 | |
1328 | ChainLink.Attachment0 = B | |
1329 | ChainLink.Attachment1 = A | |
1330 | ChainLink.FaceCamera = true | |
1331 | ChainLink.Transparency = NumberSequence.new(0) | |
1332 | end | |
1333 | coroutine.resume(coroutine.create(function() | |
1334 | wait(4) | |
1335 | if RIGHTCUFF and LEFTCUFF then | |
1336 | RIGHTCUFF:remove() | |
1337 | LEFTCUFF:remove() | |
1338 | ChainLink:remove() | |
1339 | local bv = Instance.new("BodyVelocity",ROOT) | |
1340 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
1341 | bv.velocity = CF(ROOT.Position-VT(0,5,0),ROOT.Position).lookVector*70 | |
1342 | Debris:AddItem(bv,0.05) | |
1343 | ApplyDamage(HUM,70) | |
1344 | HUM.PlatformStand = false | |
1345 | WACKYEFFECT({Time = 50, EffectType = "Sphere", Size = VT(0,0,0), Size2 = VT(6,6,6), Transparency = 0, Transparency2 = 1, CFrame = CF(RIGHTCUFF.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Glass = C3(1,1,1), SoundID = 174580476, SoundPitch = 1, SoundVolume = 7}) | |
1346 | WACKYEFFECT({Time = 50, EffectType = "Sphere", Size = VT(0,0,0), Size2 = VT(6,6,6), Transparency = 0, Transparency2 = 1, CFrame = CF(LEFTCUFF.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Glass = C3(1,1,1), SoundID = 174580476, SoundPitch = 1, SoundVolume = 7}) | |
1347 | end | |
1348 | end)) | |
1349 | for i=0, 1.5, 0.1 / Animation_Speed do | |
1350 | Swait() | |
1351 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(15), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1352 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(5), RAD(0)), 1 / Animation_Speed) | |
1353 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(70), RAD(0), RAD(-15)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1354 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(70), RAD(0), RAD(15)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1355 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(15), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1356 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1357 | end | |
1358 | HUM.PlatformStand = true | |
1359 | ROOT.CFrame = ROOT.CFrame * ANGLES(RAD(15), RAD(0), RAD(0)) | |
1360 | ROOT.Anchored = false | |
1361 | Chatter("Anything you say can and WILL be used against you.",0) | |
1362 | for i=0, 3, 0.1 / Animation_Speed do | |
1363 | Swait() | |
1364 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(-5), RAD(0), RAD(-35)), 1 / Animation_Speed) | |
1365 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25), RAD(0), RAD(35)), 1 / Animation_Speed) | |
1366 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-1), RAD(0), RAD(3)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1367 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-1), RAD(0), RAD(-3)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1368 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-12), RAD(80), RAD(0)) * ANGLES(RAD(-2), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1369 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-60), RAD(0)) * ANGLES(RAD(-2), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1370 | end | |
1371 | ATTACK = false | |
1372 | Rooted = false | |
1373 | end | |
1374 | end | |
1375 | end | |
1376 | end | |
1377 | ||
1378 | --//=================================\\ | |
1379 | --|| ATTACK BAD COP | |
1380 | --\\=================================// | |
1381 | ||
1382 | function Silence() | |
1383 | Speed = 6 | |
1384 | ATTACK = true | |
1385 | Rooted = false | |
1386 | local GYRO = IT("BodyGyro",RootPart) | |
1387 | GYRO.D = 2 | |
1388 | GYRO.P = 20000 | |
1389 | GYRO.MaxTorque = VT(0,4000000,0) | |
1390 | coroutine.resume(coroutine.create(function() | |
1391 | repeat | |
1392 | Swait() | |
1393 | GYRO.CFrame = CF(RootPart.Position,Mouse.Hit.p) | |
1394 | until ATTACK == false | |
1395 | GYRO:Remove() | |
1396 | end)) | |
1397 | for i=0, 0.2, 0.1 / Animation_Speed do | |
1398 | Swait() | |
1399 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1400 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25), RAD(0), RAD(15)), 1 / Animation_Speed) | |
1401 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1402 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.525, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(5)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1403 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1404 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1405 | end | |
1406 | local AMMO = 6 | |
1407 | local FIRING = true | |
1408 | local SHOOTING = false | |
1409 | local TIMER = 70 | |
1410 | CreateSound(147722227, GUN, 6, 1.3, false) | |
1411 | GUNWELD.Part0 = LeftArm | |
1412 | GUNWELD.C0 = CF(0,-1.5,0) * ANGLES(RAD(0), RAD(90), RAD(-90)) | |
1413 | local MOUSE = Mouse.Button1Down:connect(function(NEWKEY) | |
1414 | if SHOOTING == false and AMMO > 0 then | |
1415 | SHOOTING = true | |
1416 | AMMO = AMMO - 1 | |
1417 | local GUNPOS = GUN.CFrame*CF(1.2, 0.5, 0).p | |
1418 | local HIT,POS = CastProperRay(GUNPOS,Mouse.Hit.p,1000,Character) | |
1419 | local DISTANCE = (POS - GUNPOS).Magnitude | |
1420 | if HIT then | |
1421 | if HIT.Parent:FindFirstChildOfClass("Humanoid") then | |
1422 | if HIT.Parent:FindFirstChildOfClass("Humanoid").Health > 0 then | |
1423 | CreateSound(160432334, HIT, 10, 1, false) | |
1424 | ApplyDamage(HIT.Parent:FindFirstChildOfClass("Humanoid"),35) | |
1425 | end | |
1426 | end | |
1427 | end | |
1428 | TIMER = 55 | |
1429 | WACKYEFFECT({Time = 15, EffectType = "Block", Size = VT(0,0,0), Size2 = VT(0.3,0.3,0.3), Transparency = 0, Transparency2 = 1, CFrame = CF(GUNPOS), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,0), SoundID = 330704232, SoundPitch = 1, SoundVolume = 4}) | |
1430 | WACKYEFFECT({Time = 6, EffectType = "Box", Size = VT(0,0,DISTANCE), Size2 = VT(0.1,0.1,DISTANCE), Transparency = 0, Transparency2 = 1, CFrame = CF(GUNPOS,POS)*CF(0,0,-DISTANCE/2), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,0), SoundID = nil, SoundPitch = nil, SoundVolume = nil}) | |
1431 | for i=0, 0.3, 0.1 / Animation_Speed do | |
1432 | Swait() | |
1433 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-45)), 1 / Animation_Speed) | |
1434 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
1435 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1436 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(100), RAD(0), RAD(-45)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1437 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1438 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1439 | end | |
1440 | if AMMO <= 0 then | |
1441 | FIRING = false | |
1442 | end | |
1443 | SHOOTING = false | |
1444 | end | |
1445 | end) | |
1446 | repeat | |
1447 | Swait() | |
1448 | if SHOOTING == false then | |
1449 | TIMER = TIMER - 1 | |
1450 | if TIMER <= 0 then | |
1451 | FIRING = false | |
1452 | end | |
1453 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-45)), 1 / Animation_Speed) | |
1454 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
1455 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1456 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(-45)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1457 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1458 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1459 | end | |
1460 | until FIRING == false and SHOOTING == false | |
1461 | MOUSE:Disconnect() | |
1462 | for i=0, 0.3, 0.1 / Animation_Speed do | |
1463 | Swait() | |
1464 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1465 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25), RAD(0), RAD(15)), 1 / Animation_Speed) | |
1466 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1467 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.525, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(5)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1468 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1469 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1470 | end | |
1471 | GUNWELD.Part0 = Torso | |
1472 | GUNWELD.C0 = CF(-1.1,-1.1,0) * ANGLES(RAD(0), RAD(90), RAD(-90)) | |
1473 | Speed = 20 | |
1474 | ATTACK = false | |
1475 | Rooted = false | |
1476 | end | |
1477 | function BatonBreaker() | |
1478 | ATTACK = true | |
1479 | Rooted = false | |
1480 | Speed = 4 | |
1481 | Chatter("I'll break you!",0) | |
1482 | for i=0, 0.2, 0.1 / Animation_Speed do | |
1483 | Swait() | |
1484 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1485 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-15)), 1 / Animation_Speed) | |
1486 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-5)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1487 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1488 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1489 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1490 | end | |
1491 | BATONWELD.Part0 = RightArm | |
1492 | BATONWELD.C0 = CF(0,-1,0) * ANGLES(RAD(0), RAD(0), RAD(0)) * CF(0,0,1) | |
1493 | for i=0, 0.5, 0.1 / Animation_Speed do | |
1494 | Swait() | |
1495 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-25)), 1 / Animation_Speed) | |
1496 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(25)), 1 / Animation_Speed) | |
1497 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0.1) * ANGLES(RAD(-20), RAD(-40), RAD(25)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed) | |
1498 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1499 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1500 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1501 | end | |
1502 | Speed = 30 | |
1503 | CreateSound(147722227, BATON, 6, 1, false) | |
1504 | Trail.Enabled = true | |
1505 | BATON.CanCollide = true | |
1506 | local SPEAKING = false | |
1507 | local HITS = {} | |
1508 | local TOUCH = BATON.Touched:Connect(function(hit) | |
1509 | if hit.Parent:FindFirstChildOfClass("Humanoid") then | |
1510 | local HUM = hit.Parent:FindFirstChildOfClass("Humanoid") | |
1511 | local TORSO = hit.Parent:FindFirstChild("Torso") or hit.Parent:FindFirstChild("UpperTorso") | |
1512 | if TORSO and HUM.Health > 0 then | |
1513 | local PASS = true | |
1514 | for i = 1, #HITS do | |
1515 | if HITS[i] == hit.Parent then | |
1516 | PASS = false | |
1517 | end | |
1518 | end | |
1519 | table.insert(HITS,hit.Parent) | |
1520 | if PASS == true then | |
1521 | CreateSound(260430079, BATON, 6, 0.8, false) | |
1522 | WACKYEFFECT({Time = 15, EffectType = "Sphere", Size = VT(0,0,0), Size2 = VT(3,3,3), Transparency = 0, Transparency2 = 1, CFrame = CF(TORSO.Position,BATON.Position)*CF(0,0,-0.5), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Glass = C3(1,1,1), SoundID = nil, SoundPitch = 1, SoundVolume = 4}) | |
1523 | TORSO.Anchored = true | |
1524 | local POS = TORSO.CFrame | |
1525 | coroutine.resume(coroutine.create(function() | |
1526 | for i = 1, 15 do | |
1527 | Swait() | |
1528 | TORSO.CFrame = POS*CF(MRANDOM(-2,2)/10,MRANDOM(-2,2)/10,MRANDOM(-2,2)/10) | |
1529 | end | |
1530 | local HEAD = HUM.Parent:FindFirstChild("Head") | |
1531 | HUM.Parent:BreakJoints() | |
1532 | if HEAD then | |
1533 | CreateSound(363808674, HEAD, 10, 0.8, false) | |
1534 | local bv = Instance.new("BodyVelocity",TORSO) | |
1535 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
1536 | bv.velocity = CF(Torso.Position-VT(0,5,0),HEAD.Position).lookVector*70 | |
1537 | Debris:AddItem(bv,0.05) | |
1538 | local TEXTS = {"Criminals should leave this world!","And stay down!"} | |
1539 | Chatter(TEXTS[MRANDOM(1,#TEXTS)],0) | |
1540 | end | |
1541 | TORSO.Anchored = false | |
1542 | end)) | |
1543 | end | |
1544 | end | |
1545 | end | |
1546 | end) | |
1547 | for i=0, 0.45, 0.1 / Animation_Speed do | |
1548 | Swait() | |
1549 | RootPart.CFrame = RootPart.CFrame * CF(0,0,-0.15) | |
1550 | BATONWELD.C0 = Clerp(BATONWELD.C0,CF(0,-1,0) * ANGLES(RAD(120), RAD(0), RAD(0)) * CF(0,0,1), 1 / Animation_Speed) | |
1551 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(15), RAD(0), RAD(15)), 1 / Animation_Speed) | |
1552 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-15), RAD(0), RAD(-15)), 1 / Animation_Speed) | |
1553 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.15, 0.5, -0.6) * ANGLES(RAD(140), RAD(-25), RAD(-41)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1554 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-3)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1555 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(15), RAD(70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1556 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1557 | end | |
1558 | TOUCH:Disconnect() | |
1559 | BATON.CanCollide = false | |
1560 | Speed = 20 | |
1561 | Trail.Enabled = false | |
1562 | for i=0, 0.2, 0.1 / Animation_Speed do | |
1563 | Swait() | |
1564 | BATONWELD.C0 = Clerp(BATONWELD.C0,CF(0,-1,0) * ANGLES(RAD(0), RAD(0), RAD(0)) * CF(0,0,1), 2 / Animation_Speed) | |
1565 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1566 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-15)), 1 / Animation_Speed) | |
1567 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-5)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1568 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1569 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1570 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1571 | end | |
1572 | BATONWELD.Part0 = Torso | |
1573 | BATONWELD.C0 = CF(1,-0.8,0.75) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
1574 | ATTACK = false | |
1575 | Rooted = false | |
1576 | end | |
1577 | function TheRightToRemainSilent() | |
1578 | local TARGET = Mouse.Target | |
1579 | if TARGET ~= nil then | |
1580 | if TARGET.Parent:FindFirstChildOfClass("Humanoid") then | |
1581 | local HUM = TARGET.Parent:FindFirstChildOfClass("Humanoid") | |
1582 | local ROOT = TARGET.Parent:FindFirstChild("HumanoidRootPart") or TARGET.Parent:FindFirstChild("Torso") or TARGET.Parent:FindFirstChild("UpperTorso") | |
1583 | if ROOT and HUM.Health > 0 then | |
1584 | local FOE = Mouse.Target.Parent | |
1585 | ATTACK = true | |
1586 | Rooted = true | |
1587 | CharacterFade(C3(1,1,1),70) | |
1588 | RootPart.CFrame = ROOT.CFrame*CF(0,0,2) | |
1589 | ROOT.Anchored = true | |
1590 | CreateSound(289556450, RootPart, 5, 1.4, false) | |
1591 | Chatter("You are to remain silent and DEAD!",0) | |
1592 | for i=0, 0.4, 0.1 / Animation_Speed do | |
1593 | Swait() | |
1594 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1595 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1596 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(80), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1597 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1598 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1599 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1600 | end | |
1601 | HUM.PlatformStand = true | |
1602 | ROOT.CFrame = ROOT.CFrame * CF(0,-2*ROOT.Size.Z,0) * ANGLES(RAD(-90), RAD(0), RAD(0)) | |
1603 | CreateSound(260430117, ROOT, 6, 1.3, false) | |
1604 | coroutine.resume(coroutine.create(function() | |
1605 | Swait() | |
1606 | ROOT.Anchored = true | |
1607 | end)) | |
1608 | RootPart.CFrame = RootPart.CFrame*CF(0,0,-0.6) | |
1609 | for i=0, 0.2, 0.1 / Animation_Speed do | |
1610 | Swait() | |
1611 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(15)), 1 / Animation_Speed) | |
1612 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 1 / Animation_Speed) | |
1613 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1614 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1615 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1616 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1617 | end | |
1618 | local OOFS = {1106908323,1080610827,1080614222,565424701,565424177,1080611063} | |
1619 | CreateSound(OOFS[MRANDOM(1,#OOFS)], ROOT, 6, 1, false) | |
1620 | for i=0, 0.2, 0.1 / Animation_Speed do | |
1621 | Swait() | |
1622 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.65) * ANGLES(RAD(45), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1623 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5), RAD(0), RAD(15)), 1 / Animation_Speed) | |
1624 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.45, 0.5, -0.75) * ANGLES(RAD(80), RAD(0), RAD(-10)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1625 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.525, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(5)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1626 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.45) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1627 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(45), RAD(-70), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1628 | end | |
1629 | local AMMO = 6 | |
1630 | local FIRING = true | |
1631 | local SHOOTING = false | |
1632 | local TIMER = 70 | |
1633 | CreateSound(147722227, GUN, 6, 1.3, false) | |
1634 | GUNWELD.Part0 = LeftArm | |
1635 | GUNWELD.C0 = CF(0,-1.5,0) * ANGLES(RAD(0), RAD(90), RAD(-90)) | |
1636 | for i=0, 0.2, 0.1 / Animation_Speed do | |
1637 | Swait() | |
1638 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.65) * ANGLES(RAD(45), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1639 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5), RAD(0), RAD(15)), 1 / Animation_Speed) | |
1640 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.45, 0.5, -0.75) * ANGLES(RAD(80), RAD(0), RAD(-10)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1641 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.4, 0.55, 0.4) * ANGLES(RAD(100), RAD(0), RAD(15)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1642 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.45) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1643 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(45), RAD(-70), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1644 | end | |
1645 | for i = 1, 6 do | |
1646 | local GUNPOS = GUN.CFrame*CF(1.2, 0.5, 0).p | |
1647 | local DISTANCE = (FOE.Head.Position - GUNPOS).Magnitude | |
1648 | WACKYEFFECT({Time = 15, EffectType = "Block", Size = VT(0,0,0), Size2 = VT(0.3,0.3,0.3), Transparency = 0, Transparency2 = 1, CFrame = CF(GUNPOS), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,0), SoundID = 330704232, SoundPitch = 1, SoundVolume = 4}) | |
1649 | WACKYEFFECT({Time = 6, EffectType = "Box", Size = VT(0,0,DISTANCE), Size2 = VT(0.1,0.1,DISTANCE), Transparency = 0, Transparency2 = 1, CFrame = CF(GUNPOS,FOE.Head.Position)*CF(0,0,-DISTANCE/2), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,0), SoundID = nil, SoundPitch = nil, SoundVolume = nil}) | |
1650 | HUM.Health = HUM.Health/1.5 | |
1651 | for i=0, 0.2, 0.1 / Animation_Speed do | |
1652 | Swait() | |
1653 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.65) * ANGLES(RAD(45), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1654 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5), RAD(0), RAD(15)), 1 / Animation_Speed) | |
1655 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.45, 0.5, -0.75) * ANGLES(RAD(80), RAD(0), RAD(-10)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1656 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.4, 0.55, 0.6) * ANGLES(RAD(130), RAD(0), RAD(20)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1657 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.45) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1658 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(45), RAD(-70), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1659 | end | |
1660 | for i=0, 0.2, 0.1 / Animation_Speed do | |
1661 | Swait() | |
1662 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.65) * ANGLES(RAD(45), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1663 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5), RAD(0), RAD(15)), 1 / Animation_Speed) | |
1664 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.45, 0.5, -0.75) * ANGLES(RAD(80), RAD(0), RAD(-10)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1665 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.4, 0.55, 0.6) * ANGLES(RAD(100), RAD(0), RAD(15)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1666 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.45) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1667 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(45), RAD(-70), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1668 | end | |
1669 | end | |
1670 | FOE:BreakJoints() | |
1671 | ROOT.Anchored = false | |
1672 | for i=0, 0.3, 0.1 / Animation_Speed do | |
1673 | Swait() | |
1674 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1675 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25), RAD(0), RAD(15)), 1 / Animation_Speed) | |
1676 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1677 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.525, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(5)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1678 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1679 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1680 | end | |
1681 | GUNWELD.Part0 = Torso | |
1682 | GUNWELD.C0 = CF(-1.1,-1.1,0) * ANGLES(RAD(0), RAD(90), RAD(-90)) | |
1683 | ATTACK = false | |
1684 | Rooted = false | |
1685 | end | |
1686 | end | |
1687 | end | |
1688 | end | |
1689 | ||
1690 | --//=================================\\ | |
1691 | --|| ASSIGN THINGS TO KEYS | |
1692 | --\\=================================// | |
1693 | ||
1694 | function MouseDown(Mouse) | |
1695 | if ATTACK == false then | |
1696 | if MODE == "GoodCop" then | |
1697 | Warning() | |
1698 | elseif MODE == "BadCop" then | |
1699 | Silence() | |
1700 | end | |
1701 | end | |
1702 | end | |
1703 | ||
1704 | function MouseUp(Mouse) | |
1705 | HOLD = false | |
1706 | end | |
1707 | ||
1708 | function KeyDown(Key) | |
1709 | KEYHOLD = true | |
1710 | if Key == "q" and ATTACK == false then | |
1711 | if MODE == "GoodCop" then | |
1712 | BatonStun() | |
1713 | elseif MODE == "BadCop" then | |
1714 | BatonBreaker() | |
1715 | end | |
1716 | end | |
1717 | ||
1718 | if Key == "e" and ATTACK == false then | |
1719 | if MODE == "GoodCop" then | |
1720 | Cuffs() | |
1721 | elseif MODE == "BadCop" then | |
1722 | TheRightToRemainSilent() | |
1723 | end | |
1724 | end | |
1725 | ||
1726 | if Key == "t" and ATTACK == false then | |
1727 | if MODE == "GoodCop" then | |
1728 | Chatter("You should obey the law.",0.01) | |
1729 | elseif MODE == "BadCop" then | |
1730 | Chatter("I don't think so, Criminal!",0.01) | |
1731 | end | |
1732 | end | |
1733 | ||
1734 | if Key == "f" and ATTACK == false then | |
1735 | Switch() | |
1736 | end | |
1737 | ||
1738 | if Key == "0" and ATTACK == false then | |
1739 | if sick.Parent ~= RootPart then | |
1740 | sick = IT("Sound",RootPart) | |
1741 | end | |
1742 | end | |
1743 | end | |
1744 | ||
1745 | function KeyUp(Key) | |
1746 | KEYHOLD = false | |
1747 | end | |
1748 | ||
1749 | Mouse.Button1Down:connect(function(NEWKEY) | |
1750 | MouseDown(NEWKEY) | |
1751 | end) | |
1752 | Mouse.Button1Up:connect(function(NEWKEY) | |
1753 | MouseUp(NEWKEY) | |
1754 | end) | |
1755 | Mouse.KeyDown:connect(function(NEWKEY) | |
1756 | KeyDown(NEWKEY) | |
1757 | end) | |
1758 | Mouse.KeyUp:connect(function(NEWKEY) | |
1759 | KeyUp(NEWKEY) | |
1760 | end) | |
1761 | ||
1762 | --//=================================\\ | |
1763 | --\\=================================// | |
1764 | ||
1765 | function unanchor() | |
1766 | for _, c in pairs(Character:GetChildren()) do | |
1767 | if c:IsA("BasePart") and c ~= RootPart then | |
1768 | c.Anchored = false | |
1769 | end | |
1770 | end | |
1771 | for _, c in pairs(Weapon:GetChildren()) do | |
1772 | if c:IsA("BasePart") and c ~= RootPart then | |
1773 | c.Anchored = false | |
1774 | end | |
1775 | end | |
1776 | if UNANCHOR == true then | |
1777 | RootPart.Anchored = false | |
1778 | else | |
1779 | RootPart.Anchored = true | |
1780 | end | |
1781 | end | |
1782 | ||
1783 | --//=================================\\ | |
1784 | --|| WRAP THE WHOLE SCRIPT UP | |
1785 | --\\=================================// | |
1786 | ||
1787 | Humanoid.Changed:connect(function(Jump) | |
1788 | if Jump == "Jump" and (Disable_Jump == true) then | |
1789 | Humanoid.Jump = false | |
1790 | end | |
1791 | end) | |
1792 | ||
1793 | while true do | |
1794 | Swait() | |
1795 | script.Parent = WEAPONGUI | |
1796 | ANIMATE.Parent = nil | |
1797 | for _,v in next, Humanoid:GetPlayingAnimationTracks() do | |
1798 | v:Stop(); | |
1799 | end | |
1800 | SINE = SINE + CHANGE | |
1801 | local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude | |
1802 | local TORSOVERTICALVELOCITY = RootPart.Velocity.y | |
1803 | local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character) | |
1804 | local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16) | |
1805 | if ANIM == "Walk" and TORSOVELOCITY > 1 then | |
1806 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0.05 * COS(SINE / (WALKSPEEDVALUE/2))) * ANGLES(RAD(0), RAD(0), RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
1807 | Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
1808 | RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(35 * COS(SINE / WALKSPEEDVALUE))), 0.6 / Animation_Speed) | |
1809 | LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(35 * COS(SINE / WALKSPEEDVALUE))), 0.6 / Animation_Speed) | |
1810 | elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then | |
1811 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1812 | Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1813 | RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.7 / Animation_Speed) | |
1814 | LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.7 / Animation_Speed) | |
1815 | end | |
1816 | if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then | |
1817 | ANIM = "Jump" | |
1818 | if ATTACK == false then | |
1819 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1820 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1821 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed) | |
1822 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed) | |
1823 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.3) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed) | |
1824 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed) | |
1825 | end | |
1826 | elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then | |
1827 | ANIM = "Fall" | |
1828 | if ATTACK == false then | |
1829 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1830 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1831 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(60)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed) | |
1832 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed) | |
1833 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed) | |
1834 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed) | |
1835 | end | |
1836 | elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then | |
1837 | ANIM = "Idle" | |
1838 | if ATTACK == false then | |
1839 | if MODE == "GoodCop" then | |
1840 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0.05 * COS(SINE / 12), 0, 0 + 0.05 * SIN(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1841 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(-25)), 1 / Animation_Speed) | |
1842 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5, 0.3) * ANGLES(RAD(-45), RAD(0), RAD(-45)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1843 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, 0.3) * ANGLES(RAD(-40), RAD(0), RAD(45)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1844 | RightHip.C0 = Clerp(RightHip.C0, CF(1 + 0.05 * COS(SINE / 12), -1 - 0.05 * SIN(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1845 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 + 0.05 * COS(SINE / 12), -1 - 0.05 * SIN(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1846 | elseif MODE == "BadCop" then | |
1847 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1848 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5 - 2.5 * COS(SINE / 12)), RAD(0), RAD(25)), 1 / Animation_Speed) | |
1849 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(0.9, 0.5 + 0.05 * SIN(SINE / 12), -0.5) * ANGLES(RAD(100), RAD(0), RAD(-70)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1850 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.9, 0.25 + 0.05 * SIN(SINE / 12), -0.35) * ANGLES(RAD(70), RAD(0), RAD(80)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1851 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1852 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1853 | end | |
1854 | end | |
1855 | elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then | |
1856 | ANIM = "Walk" | |
1857 | if ATTACK == false then | |
1858 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.05) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1859 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1860 | if MODE == "GoodCop" then | |
1861 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5 + 0.05 * SIN(SINE / (WALKSPEEDVALUE/2)), 0.3) * ANGLES(RAD(-45), RAD(0), RAD(-45)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1862 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.05 * SIN(SINE / (WALKSPEEDVALUE/2)), 0.3) * ANGLES(RAD(-40), RAD(0), RAD(45)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1863 | elseif MODE == "BadCop" then | |
1864 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(0.9, 0.5 + 0.05 * SIN(SINE / (WALKSPEEDVALUE/2)), -0.5) * ANGLES(RAD(100), RAD(0), RAD(-70)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1865 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.9, 0.25 + 0.05 * SIN(SINE / (WALKSPEEDVALUE/2)), -0.35) * ANGLES(RAD(70), RAD(0), RAD(80)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1866 | end | |
1867 | RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-5)), 2 / Animation_Speed) | |
1868 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(5)), 2 / Animation_Speed) | |
1869 | end | |
1870 | end | |
1871 | unanchor() | |
1872 | Humanoid.MaxHealth = 3e3 | |
1873 | Humanoid.Health = 3e3 | |
1874 | if Rooted == false then | |
1875 | Disable_Jump = false | |
1876 | Humanoid.WalkSpeed = Speed | |
1877 | elseif Rooted == true then | |
1878 | Disable_Jump = true | |
1879 | Humanoid.WalkSpeed = 0 | |
1880 | end | |
1881 | for _, c in pairs(Character:GetChildren()) do | |
1882 | if (c.ClassName == "Shirt" or c.ClassName == "Pants") and c.Name ~= "Cloth" then | |
1883 | c:remove() | |
1884 | end | |
1885 | end | |
1886 | sick.SoundId = "rbxassetid://259554386" | |
1887 | sick.Looped = true | |
1888 | sick.Pitch = 1 | |
1889 | sick.Volume = 4 | |
1890 | sick.Playing = true | |
1891 | if MODE == "GoodCop" then | |
1892 | for E = 1, #GOODUI do | |
1893 | GOODUI[E].TextStrokeTransparency = 0 | |
1894 | GOODUI[E].TextTransparency = 0 | |
1895 | end | |
1896 | for E = 1, #BADUI do | |
1897 | BADUI[E].TextStrokeTransparency = 1 | |
1898 | BADUI[E].TextTransparency = 0.5 | |
1899 | end | |
1900 | elseif MODE == "BadCop" then | |
1901 | for E = 1, #GOODUI do | |
1902 | GOODUI[E].TextStrokeTransparency = 1 | |
1903 | GOODUI[E].TextTransparency = 0.5 | |
1904 | end | |
1905 | for E = 1, #BADUI do | |
1906 | BADUI[E].TextStrokeTransparency = 0 | |
1907 | BADUI[E].TextTransparency = 0 | |
1908 | end | |
1909 | end | |
1910 | end | |
1911 | ||
1912 | --//=================================\\ | |
1913 | --\\=================================// | |
1914 | ||
1915 | ||
1916 | ||
1917 | ||
1918 | ||
1919 | --//====================================================\\-- | |
1920 | --|| END OF SCRIPT | |
1921 | --\\====================================================//-- |