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