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