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