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) | |
626 | CreateWeldOrSnapOrMotor("Weld", FACE, Head, FACE, CF(0.02,0,0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
627 | MakeForm(FACE,"Head") | |
628 | CreateWeldOrSnapOrMotor("Weld", Eye, Head, Eye, CF(0,0.2,0) * ANGLES(RAD(0), RAD(18), RAD(-15)), CF(0, 0, 0.4)) | |
629 | local Eye = CreatePart(3, Character, "Neon", 0, 0, "Really red", "Eye", VT(0.1,1,1)/2,false) | |
630 | MakeForm(Eye,"Ball") | |
631 | CreateWeldOrSnapOrMotor("Weld", Eye, Head, Eye, CF(0,0.15,0) * ANGLES(RAD(0), RAD(-18), RAD(0)), CF(0, 0, 0.4)) | |
632 | local top = Instance.new("Shirt") | |
633 | - | top.ShirtTemplate = "rbxassetid://269003887" |
633 | + | top.ShirtTemplate = "rbxassetid://653560107" |
634 | top.Parent = Character | |
635 | top.Name = "Cloth" | |
636 | local bottom = Instance.new("Pants") | |
637 | - | bottom.PantsTemplate = "rbxassetid://268832352" |
637 | + | bottom.PantsTemplate = "rbxassetid://67301964" |
638 | bottom.Parent = Character | |
639 | bottom.Name = "Cloth" | |
640 | local BATON = CreatePart(3, Weapon, "Neon", 0, 0, "Really black", "Baton", VT(1, 0.8, 3),false) | |
641 | CreateMesh("SpecialMesh", BATON, "FileMesh", "11820238", "", VT(1,1,1), VT(0,0,0)) | |
642 | local BATONWELD = CreateWeldOrSnapOrMotor("Weld", BATON, Torso, BATON, CF(1,-0.8,0.75) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
643 | local A = IT("Attachment",BATON) | |
644 | local B = IT("Attachment",BATON) | |
645 | B.Position = VT(0,0,-0.4) | |
646 | A.Position = VT(0,0,1) | |
647 | local Trail = IT("Trail",BATON) | |
648 | Trail.Attachment0 = A | |
649 | Trail.Attachment1 = B | |
650 | Trail.Lifetime = 0.1 | |
651 | Trail.Color = ColorSequence.new(C3(0,0,0)) | |
652 | Trail.Transparency = NumberSequence.new(0, 1) | |
653 | Trail.Enabled = false | |
654 | Trail.Texture = "http://www.roblox.com/asset/?id=1831500579" | |
655 | local GUN = CreatePart(3, Weapon, "Neon", 0, 0, "Really black", "Gun", VT(1, 0.8, 3),false) | |
656 | CreateMesh("SpecialMesh", GUN, "FileMesh", "623102664", "623102879", VT(0.01, 0.01, 0.01), VT(0,0,0)) | |
657 | local GUNWELD = CreateWeldOrSnapOrMotor("Weld", GUN, Torso, GUN, CF(-1.1,-1.1,0) * ANGLES(RAD(0), RAD(90), RAD(-90)), CF(0, 0, 0)) | |
658 | ||
659 | for _, c in pairs(Weapon:GetChildren()) do | |
660 | if c.ClassName == "Part" then | |
661 | c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0) | |
662 | end | |
663 | end | |
664 | ||
665 | Weapon.Parent = Character | |
666 | ||
667 | local SKILLTEXTCOLOR = C3(1,1,1) | |
668 | local SKILLFONT = "Legacy" | |
669 | local SKILLTEXTSIZE = 4 | |
670 | ||
671 | local ATTACKSGOODCOP = {"Mouse - Warning","Q - Baton Stun","E - Cuffs"} | |
672 | local ATTACKSBADCOP = {"Mouse - Silence","Q - Baton Breaker","E - The Right to remain silent"} | |
673 | local GOODUI = {} | |
674 | local BADUI = {} | |
675 | ||
676 | for i = 1, #ATTACKSGOODCOP do | |
677 | 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") | |
678 | local SKILLTEXT = CreateLabel(SKILLFRAME, "["..ATTACKSGOODCOP[i].."]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Skill text") | |
679 | SKILLTEXT.TextXAlignment = "Right" | |
680 | table.insert(GOODUI,SKILLTEXT) | |
681 | end | |
682 | ||
683 | for i = 1, #ATTACKSBADCOP do | |
684 | 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") | |
685 | local SKILLTEXT = CreateLabel(SKILLFRAME, "["..ATTACKSBADCOP[i].."]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 1, "Skill text") | |
686 | SKILLTEXT.TextXAlignment = "Left" | |
687 | table.insert(BADUI,SKILLTEXT) | |
688 | end | |
689 | ||
690 | 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") | |
691 | local SKILLTEXT = CreateLabel(SKILLFRAME, "[F - Switch]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Skill text") | |
692 | ||
693 | --//=================================\\ | |
694 | --|| DAMAGING | |
695 | --\\=================================// | |
696 | ||
697 | function ApplyDamage(Humanoid,Damage) | |
698 | Damage = Damage * DAMAGEMULTIPLIER | |
699 | local DEAD = false | |
700 | if Humanoid.Health < 2000 then | |
701 | if Humanoid.Health - Damage > 0 then | |
702 | Humanoid.Health = Humanoid.Health - Damage | |
703 | else | |
704 | DEAD = true | |
705 | Humanoid.Parent:BreakJoints() | |
706 | end | |
707 | else | |
708 | DEAD = true | |
709 | Humanoid.Parent:BreakJoints() | |
710 | end | |
711 | if DEAD == true then | |
712 | if MODE == "GoodCop" then | |
713 | local TEXTS = {"I'm simply laying down the law.","You should've taken account of the law.","Another criminal down."} | |
714 | Chatter(TEXTS[MRANDOM(1,#TEXTS)],0) | |
715 | elseif MODE == "BadCop" then | |
716 | local TEXTS = {"Criminals should leave this world!","You should've taken account of the law!","And stay down!"} | |
717 | Chatter(TEXTS[MRANDOM(1,#TEXTS)],0) | |
718 | end | |
719 | end | |
720 | end | |
721 | ||
722 | --//=================================\\ | |
723 | --|| TRANSFORMATIONS | |
724 | --\\=================================// | |
725 | ||
726 | function Switch() | |
727 | ATTACK = true | |
728 | Rooted = true | |
729 | if MODE == "GoodCop" then | |
730 | for i=0, 0.3, 0.1 / Animation_Speed do | |
731 | Swait() | |
732 | 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) | |
733 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
734 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(25)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
735 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
736 | 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) | |
737 | 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) | |
738 | end | |
739 | for i=0, 1, 0.1 / Animation_Speed do | |
740 | Swait() | |
741 | 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) | |
742 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5), RAD(0), RAD(0)), 1 / Animation_Speed) | |
743 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5, -0.5) * ANGLES(RAD(100), RAD(0), RAD(-70)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
744 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.35, -0.35) * ANGLES(RAD(70), RAD(0), RAD(80)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
745 | 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) | |
746 | 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) | |
747 | end | |
748 | CreateSound(363808674, Torso, 6, 1, false) | |
749 | for i=0, 0.6, 0.1 / Animation_Speed do | |
750 | Swait() | |
751 | 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) | |
752 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5), RAD(25), RAD(0)), 1 / Animation_Speed) | |
753 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5, -0.5) * ANGLES(RAD(100), RAD(0), RAD(-50)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
754 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.35, -0.35) * ANGLES(RAD(70), RAD(0), RAD(60)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
755 | 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) | |
756 | 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) | |
757 | end | |
758 | CreateSound(363808674, Torso, 6, 1, false) | |
759 | for i=0, 0.6, 0.1 / Animation_Speed do | |
760 | Swait() | |
761 | 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) | |
762 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5), RAD(-25), RAD(0)), 1 / Animation_Speed) | |
763 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5, -0.5) * ANGLES(RAD(100), RAD(0), RAD(-90)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
764 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.35, -0.35) * ANGLES(RAD(70), RAD(0), RAD(90)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
765 | 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) | |
766 | 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) | |
767 | end | |
768 | MODE = "BadCop" | |
769 | elseif MODE == "BadCop" then | |
770 | CreateSound(147722227, Torso, 4, 1.3, false) | |
771 | for i=0, 0.3, 0.1 / Animation_Speed do | |
772 | Swait() | |
773 | 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) | |
774 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(35), RAD(0), RAD(0)), 1 / Animation_Speed) | |
775 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(25)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
776 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
777 | 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) | |
778 | 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) | |
779 | end | |
780 | MODE = "GoodCop" | |
781 | end | |
782 | ATTACK = false | |
783 | Rooted = false | |
784 | end | |
785 | ||
786 | --//=================================\\ | |
787 | --|| ATTACK GOOD COP | |
788 | --\\=================================// | |
789 | ||
790 | function Warning() | |
791 | local TARGET = Mouse.Target | |
792 | if TARGET ~= nil then | |
793 | if TARGET.Parent:FindFirstChildOfClass("Humanoid") then | |
794 | local HUM = TARGET.Parent:FindFirstChildOfClass("Humanoid") | |
795 | local LEG = TARGET.Parent:FindFirstChild("Right Leg") or TARGET.Parent:FindFirstChild("RightLowerLeg") | |
796 | if LEG and HUM.Health > 0 then | |
797 | Speed = 6 | |
798 | ATTACK = true | |
799 | Rooted = false | |
800 | local GYRO = IT("BodyGyro",RootPart) | |
801 | GYRO.D = 2 | |
802 | GYRO.P = 2000 | |
803 | GYRO.MaxTorque = VT(0,4000000,0) | |
804 | coroutine.resume(coroutine.create(function() | |
805 | repeat | |
806 | Swait() | |
807 | GYRO.CFrame = CF(RootPart.Position,LEG.Position) | |
808 | until ATTACK == false | |
809 | GYRO:Remove() | |
810 | end)) | |
811 | local HIT,POS = CastProperRay(RootPart.Position,LEG.Position,1000,Character) | |
812 | local PASS = true | |
813 | for i=0, 0.2, 0.1 / Animation_Speed do | |
814 | Swait() | |
815 | HIT,POS = CastProperRay(RootPart.Position,LEG.Position,1000,Character) | |
816 | if HIT == nil then | |
817 | PASS = false | |
818 | break | |
819 | else | |
820 | if HIT.Parent ~= TARGET.Parent then | |
821 | PASS = false | |
822 | break | |
823 | end | |
824 | end | |
825 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
826 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25), RAD(0), RAD(15)), 1 / Animation_Speed) | |
827 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
828 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.525, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(5)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
829 | 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) | |
830 | 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) | |
831 | end | |
832 | CreateSound(147722227, GUN, 6, 1.3, false) | |
833 | GUNWELD.Part0 = LeftArm | |
834 | GUNWELD.C0 = CF(0,-1.5,0) * ANGLES(RAD(0), RAD(90), RAD(-90)) | |
835 | for i=0, 0.4, 0.1 / Animation_Speed do | |
836 | Swait() | |
837 | HIT,POS = CastProperRay(RootPart.Position,LEG.Position,1000,Character) | |
838 | if HIT == nil then | |
839 | PASS = false | |
840 | break | |
841 | else | |
842 | if HIT.Parent ~= TARGET.Parent then | |
843 | PASS = false | |
844 | break | |
845 | end | |
846 | end | |
847 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-45)), 1 / Animation_Speed) | |
848 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
849 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
850 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(-45)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
851 | 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) | |
852 | 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) | |
853 | end | |
854 | if PASS == true then | |
855 | local GUNPOS = GUN.CFrame*CF(1.2, 0.5, 0).p | |
856 | local DISTANCE = (LEG.Position - GUNPOS).Magnitude | |
857 | CreateSound(160432334, LEG, 10, 1, false) | |
858 | local HEAD = HUM.Parent:FindFirstChild("Head") | |
859 | if HEAD then | |
860 | CreateSound(535690488, HEAD, 7, 1, false) | |
861 | end | |
862 | ApplyDamage(HUM,15) | |
863 | HUM.WalkSpeed = HUM.WalkSpeed - 3 | |
864 | HUM.PlatformStand = true | |
865 | coroutine.resume(coroutine.create(function() | |
866 | wait(0.1) | |
867 | if HUM.WalkSpeed > 0 then | |
868 | HUM.PlatformStand = false | |
869 | end | |
870 | end)) | |
871 | 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}) | |
872 | 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}) | |
873 | for i=0, 1, 0.1 / Animation_Speed do | |
874 | Swait() | |
875 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-45)), 1 / Animation_Speed) | |
876 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(45)), 1 / Animation_Speed) | |
877 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
878 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(120), RAD(0), RAD(-45)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
879 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
880 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed) | |
881 | end | |
882 | end | |
883 | for i=0, 0.3, 0.1 / Animation_Speed do | |
884 | Swait() | |
885 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
886 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25), RAD(0), RAD(15)), 1 / Animation_Speed) | |
887 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
888 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.525, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(5)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
889 | 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) | |
890 | 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) | |
891 | end | |
892 | GUNWELD.Part0 = Torso | |
893 | GUNWELD.C0 = CF(-1.1,-1.1,0) * ANGLES(RAD(0), RAD(90), RAD(-90)) | |
894 | ATTACK = false | |
895 | Rooted = false | |
896 | Speed = 20 | |
897 | end | |
898 | end | |
899 | end | |
900 | end | |
901 | function BatonStun() | |
902 | ATTACK = true | |
903 | Rooted = false | |
904 | Speed = 4 | |
905 | for i=0, 0.2, 0.1 / Animation_Speed do | |
906 | Swait() | |
907 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
908 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-15)), 1 / Animation_Speed) | |
909 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-5)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
910 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
911 | 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) | |
912 | 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) | |
913 | end | |
914 | BATONWELD.Part0 = RightArm | |
915 | BATONWELD.C0 = CF(0,-1,0) * ANGLES(RAD(0), RAD(0), RAD(0)) * CF(0,0,1) | |
916 | for i=0, 0.2, 0.1 / Animation_Speed do | |
917 | Swait() | |
918 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-25)), 1 / Animation_Speed) | |
919 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(25)), 1 / Animation_Speed) | |
920 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0.1) * ANGLES(RAD(0), RAD(0), RAD(25)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
921 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
922 | 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) | |
923 | 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) | |
924 | end | |
925 | Speed = 25 | |
926 | CreateSound(147722227, BATON, 6, 1.2, false) | |
927 | Trail.Enabled = true | |
928 | BATON.CanCollide = true | |
929 | local SPEAKING = false | |
930 | local HITS = {} | |
931 | local TOUCH = BATON.Touched:Connect(function(hit) | |
932 | if hit.Parent:FindFirstChildOfClass("Humanoid") then | |
933 | local HUM = hit.Parent:FindFirstChildOfClass("Humanoid") | |
934 | local TORSO = hit.Parent:FindFirstChild("Torso") or hit.Parent:FindFirstChild("UpperTorso") | |
935 | if TORSO and HUM.Health > 0 then | |
936 | local PASS = true | |
937 | for i = 1, #HITS do | |
938 | if HITS[i] == hit.Parent then | |
939 | PASS = false | |
940 | end | |
941 | end | |
942 | table.insert(HITS,hit.Parent) | |
943 | if PASS == true then | |
944 | HUM.PlatformStand = true | |
945 | ApplyDamage(HUM,20) | |
946 | local bv = Instance.new("BodyVelocity",TORSO) | |
947 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
948 | bv.velocity = CF(Torso.Position-VT(0,5,0),TORSO.Position).lookVector*70 | |
949 | Debris:AddItem(bv,0.05) | |
950 | CreateSound(260430079, BATON, 6, 1, false) | |
951 | 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}) | |
952 | coroutine.resume(coroutine.create(function() | |
953 | wait(1) | |
954 | if HUM.WalkSpeed > 0 then | |
955 | HUM.PlatformStand = false | |
956 | end | |
957 | end)) | |
958 | if SPEAKING == false and MRANDOM(1,5) == 1 then | |
959 | SPEAKING = true | |
960 | Chatter("Let that be a warning.",0) | |
961 | end | |
962 | end | |
963 | end | |
964 | end | |
965 | end) | |
966 | for i=0, 0.35, 0.1 / Animation_Speed do | |
967 | Swait() | |
968 | BATONWELD.C0 = Clerp(BATONWELD.C0,CF(0,-1,0) * ANGLES(RAD(120), RAD(0), RAD(0)) * CF(0,0,1), 1 / Animation_Speed) | |
969 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(15)), 1 / Animation_Speed) | |
970 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 1 / Animation_Speed) | |
971 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.15, 0.5, -0.6) * ANGLES(RAD(140), RAD(0), RAD(-31)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
972 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-3)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
973 | 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) | |
974 | 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) | |
975 | end | |
976 | TOUCH:Disconnect() | |
977 | BATON.CanCollide = false | |
978 | Speed = 20 | |
979 | Trail.Enabled = false | |
980 | for i=0, 0.2, 0.1 / Animation_Speed do | |
981 | Swait() | |
982 | BATONWELD.C0 = Clerp(BATONWELD.C0,CF(0,-1,0) * ANGLES(RAD(0), RAD(0), RAD(0)) * CF(0,0,1), 2 / Animation_Speed) | |
983 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
984 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-15)), 1 / Animation_Speed) | |
985 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-5)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
986 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
987 | 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) | |
988 | 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) | |
989 | end | |
990 | BATONWELD.Part0 = Torso | |
991 | BATONWELD.C0 = CF(1,-0.8,0.75) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
992 | ATTACK = false | |
993 | Rooted = false | |
994 | end | |
995 | function Cuffs() | |
996 | local TARGET = Mouse.Target | |
997 | if TARGET ~= nil then | |
998 | if TARGET.Parent:FindFirstChildOfClass("Humanoid") then | |
999 | local HUM = TARGET.Parent:FindFirstChildOfClass("Humanoid") | |
1000 | local ROOT = TARGET.Parent:FindFirstChild("HumanoidRootPart") or TARGET.Parent:FindFirstChild("Torso") or TARGET.Parent:FindFirstChild("UpperTorso") | |
1001 | if ROOT and HUM.Health > 0 then | |
1002 | local FOE = Mouse.Target.Parent | |
1003 | ATTACK = true | |
1004 | Rooted = true | |
1005 | CharacterFade(C3(1,1,1),70) | |
1006 | RootPart.CFrame = ROOT.CFrame*CF(0,0,2) | |
1007 | ROOT.Anchored = true | |
1008 | CreateSound(289556450, RootPart, 5, 1.4, false) | |
1009 | Chatter("You have the right to remain silent.",0) | |
1010 | for i=0, 2, 0.1 / Animation_Speed do | |
1011 | Swait() | |
1012 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(15), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1013 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1014 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(80), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1015 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(80), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1016 | 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) | |
1017 | 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) | |
1018 | end | |
1019 | local RIGHTCUFF = nil | |
1020 | local LEFTCUFF = nil | |
1021 | local ChainLink = nil | |
1022 | CreateSound(1279090548, ROOT, 10, 1.4, false) | |
1023 | for _, c in pairs(FOE:GetChildren()) do | |
1024 | if c.Name == "Left Arm" or c.Name == "LeftLowerArm" then | |
1025 | LEFTCUFF = CreatePart(3, FOE, "Metal", 0, 0, "Mid gray", "Cuff", VT(c.Size.X+0.1, 0.1, c.Size.Z+0.1),false) | |
1026 | LEFTCUFF.CFrame = c.CFrame | |
1027 | weldBetween(c,LEFTCUFF) | |
1028 | end | |
1029 | end | |
1030 | for _, c in pairs(FOE:GetChildren()) do | |
1031 | if c.Name == "Right Arm" or c.Name == "RightLowerArm" then | |
1032 | RIGHTCUFF = CreatePart(3, FOE, "Metal", 0, 0, "Mid gray", "Cuff", VT(c.Size.X+0.1, 0.1, c.Size.Z+0.1),false) | |
1033 | RIGHTCUFF.CFrame = c.CFrame | |
1034 | weldBetween(c,RIGHTCUFF) | |
1035 | end | |
1036 | end | |
1037 | if RIGHTCUFF and LEFTCUFF then | |
1038 | local A = IT("Attachment",RIGHTCUFF) | |
1039 | local B = IT("Attachment",LEFTCUFF) | |
1040 | ChainLink = IT("Beam",FOE) | |
1041 | ChainLink.Texture = "rbxassetid://73042633" | |
1042 | ChainLink.Color = ColorSequence.new(C3(0.8,0.8,0.8)) | |
1043 | ChainLink.TextureSpeed = 0 | |
1044 | ChainLink.Width0 = 1 | |
1045 | ChainLink.Width1 = 1 | |
1046 | ChainLink.Segments = 25 | |
1047 | ChainLink.TextureLength = 3 | |
1048 | ChainLink.Attachment0 = B | |
1049 | ChainLink.Attachment1 = A | |
1050 | ChainLink.FaceCamera = true | |
1051 | ChainLink.Transparency = NumberSequence.new(0) | |
1052 | end | |
1053 | coroutine.resume(coroutine.create(function() | |
1054 | wait(4) | |
1055 | if RIGHTCUFF and LEFTCUFF then | |
1056 | RIGHTCUFF:remove() | |
1057 | LEFTCUFF:remove() | |
1058 | ChainLink:remove() | |
1059 | local bv = Instance.new("BodyVelocity",ROOT) | |
1060 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
1061 | bv.velocity = CF(ROOT.Position-VT(0,5,0),ROOT.Position).lookVector*70 | |
1062 | Debris:AddItem(bv,0.05) | |
1063 | ApplyDamage(HUM,70) | |
1064 | HUM.PlatformStand = false | |
1065 | 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}) | |
1066 | 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}) | |
1067 | end | |
1068 | end)) | |
1069 | for i=0, 1.5, 0.1 / Animation_Speed do | |
1070 | Swait() | |
1071 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(15), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1072 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(5), RAD(0)), 1 / Animation_Speed) | |
1073 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(70), RAD(0), RAD(-15)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1074 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(70), RAD(0), RAD(15)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1075 | 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) | |
1076 | 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) | |
1077 | end | |
1078 | HUM.PlatformStand = true | |
1079 | ROOT.CFrame = ROOT.CFrame * ANGLES(RAD(15), RAD(0), RAD(0)) | |
1080 | ROOT.Anchored = false | |
1081 | Chatter("Anything you say can and WILL be used against you.",0) | |
1082 | for i=0, 3, 0.1 / Animation_Speed do | |
1083 | Swait() | |
1084 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(-5), RAD(0), RAD(-35)), 1 / Animation_Speed) | |
1085 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25), RAD(0), RAD(35)), 1 / Animation_Speed) | |
1086 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-1), RAD(0), RAD(3)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1087 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-1), RAD(0), RAD(-3)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1088 | 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) | |
1089 | 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) | |
1090 | end | |
1091 | ATTACK = false | |
1092 | Rooted = false | |
1093 | end | |
1094 | end | |
1095 | end | |
1096 | end | |
1097 | ||
1098 | --//=================================\\ | |
1099 | --|| ATTACK BAD COP | |
1100 | --\\=================================// | |
1101 | ||
1102 | function Silence() | |
1103 | Speed = 6 | |
1104 | ATTACK = true | |
1105 | Rooted = false | |
1106 | local GYRO = IT("BodyGyro",RootPart) | |
1107 | GYRO.D = 2 | |
1108 | GYRO.P = 20000 | |
1109 | GYRO.MaxTorque = VT(0,4000000,0) | |
1110 | coroutine.resume(coroutine.create(function() | |
1111 | repeat | |
1112 | Swait() | |
1113 | GYRO.CFrame = CF(RootPart.Position,Mouse.Hit.p) | |
1114 | until ATTACK == false | |
1115 | GYRO:Remove() | |
1116 | end)) | |
1117 | for i=0, 0.2, 0.1 / Animation_Speed do | |
1118 | Swait() | |
1119 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1120 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25), RAD(0), RAD(15)), 1 / Animation_Speed) | |
1121 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1122 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.525, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(5)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1123 | 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) | |
1124 | 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) | |
1125 | end | |
1126 | local AMMO = 6 | |
1127 | local FIRING = true | |
1128 | local SHOOTING = false | |
1129 | local TIMER = 70 | |
1130 | CreateSound(147722227, GUN, 6, 1.3, false) | |
1131 | GUNWELD.Part0 = LeftArm | |
1132 | GUNWELD.C0 = CF(0,-1.5,0) * ANGLES(RAD(0), RAD(90), RAD(-90)) | |
1133 | local MOUSE = Mouse.Button1Down:connect(function(NEWKEY) | |
1134 | if SHOOTING == false and AMMO > 0 then | |
1135 | SHOOTING = true | |
1136 | AMMO = AMMO - 1 | |
1137 | local GUNPOS = GUN.CFrame*CF(1.2, 0.5, 0).p | |
1138 | local HIT,POS = CastProperRay(GUNPOS,Mouse.Hit.p,1000,Character) | |
1139 | local DISTANCE = (POS - GUNPOS).Magnitude | |
1140 | if HIT then | |
1141 | if HIT.Parent:FindFirstChildOfClass("Humanoid") then | |
1142 | if HIT.Parent:FindFirstChildOfClass("Humanoid").Health > 0 then | |
1143 | CreateSound(160432334, HIT, 10, 1, false) | |
1144 | ApplyDamage(HIT.Parent:FindFirstChildOfClass("Humanoid"),35) | |
1145 | end | |
1146 | end | |
1147 | end | |
1148 | TIMER = 55 | |
1149 | 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}) | |
1150 | 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}) | |
1151 | for i=0, 0.3, 0.1 / Animation_Speed do | |
1152 | Swait() | |
1153 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-45)), 1 / Animation_Speed) | |
1154 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
1155 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1156 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(100), RAD(0), RAD(-45)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1157 | 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) | |
1158 | 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) | |
1159 | end | |
1160 | if AMMO <= 0 then | |
1161 | FIRING = false | |
1162 | end | |
1163 | SHOOTING = false | |
1164 | end | |
1165 | end) | |
1166 | repeat | |
1167 | Swait() | |
1168 | if SHOOTING == false then | |
1169 | TIMER = TIMER - 1 | |
1170 | if TIMER <= 0 then | |
1171 | FIRING = false | |
1172 | end | |
1173 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-45)), 1 / Animation_Speed) | |
1174 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
1175 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1176 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(-45)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1177 | 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) | |
1178 | 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) | |
1179 | end | |
1180 | until FIRING == false and SHOOTING == false | |
1181 | MOUSE:Disconnect() | |
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(0)), 1 / Animation_Speed) | |
1185 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25), RAD(0), RAD(15)), 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.525, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(5)) * 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(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1190 | end | |
1191 | GUNWELD.Part0 = Torso | |
1192 | GUNWELD.C0 = CF(-1.1,-1.1,0) * ANGLES(RAD(0), RAD(90), RAD(-90)) | |
1193 | Speed = 20 | |
1194 | ATTACK = false | |
1195 | Rooted = false | |
1196 | end | |
1197 | ||
1198 | function Taunt() | |
1199 | ATTACK = true | |
1200 | Humanoid.JumpPower = 0 | |
1201 | Humanoid.WalkSpeed = 0 | |
1202 | local table = Instance.new('Part', Character) | |
1203 | table.Size = Vector3.new(Player_Size*4,Player_Size*4,Player_Size*3) | |
1204 | table.Anchored = true | |
1205 | table.Material = 'Wood' | |
1206 | table.BrickColor = BrickColor.new('Brown') | |
1207 | table.CFrame = RootPart.CFrame * CFrame.new(0,-Player_Size*2,-Player_Size*2) | |
1208 | for i=1,20 do | |
1209 | Swait() | |
1210 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.5 / Animation_Speed) | |
1211 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.5 / Animation_Speed) | |
1212 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(120), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed) | |
1213 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(120), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.5 / Animation_Speed) | |
1214 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.5 / Animation_Speed) | |
1215 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.5 / Animation_Speed) | |
1216 | end | |
1217 | ||
1218 | wait(0.1) | |
1219 | local sl = Instance.new('Sound', Head) | |
1220 | sl.SoundId = 'rbxassetid://' ..phoenix.slam | |
1221 | sl.Volume = 10 | |
1222 | sl:Play() | |
1223 | for i=1,20 do | |
1224 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.5 / Animation_Speed) | |
1225 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.5 / Animation_Speed) | |
1226 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed) | |
1227 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.5 / Animation_Speed) | |
1228 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.5 / Animation_Speed) | |
1229 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.5 / Animation_Speed) | |
1230 | end | |
1231 | MagnitudeDamage(0, 0, 0, 0, 1, 1, 1, 1, table, Player_Size*4, true, 20, 50, MRANDOM(1, 2), "Normal", table, 200, 1, MRANDOM(5, 10), nil, true, false, nil, 0, 0, false) | |
1232 | wait(0.6) | |
1233 | local function gay() | |
1234 | chat(lastchat) | |
1235 | end | |
1236 | local f,u = pcall(gay) | |
1237 | if u then table.insert(errors, u) end | |
1238 | Humanoid.JumpPower = 50 | |
1239 | Humanoid.WalkSpeed = 16 * Movement.Value | |
1240 | table:Destroy() | |
1241 | ATTACK = false | |
1242 | end | |
1243 | ||
1244 | function BatonBreaker() | |
1245 | ATTACK = true | |
1246 | Rooted = false | |
1247 | Speed = 4 | |
1248 | Chatter("I'll break you!",0) | |
1249 | for i=0, 0.2, 0.1 / Animation_Speed do | |
1250 | Swait() | |
1251 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1252 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-15)), 1 / Animation_Speed) | |
1253 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-5)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1254 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1255 | 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) | |
1256 | 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) | |
1257 | end | |
1258 | BATONWELD.Part0 = RightArm | |
1259 | BATONWELD.C0 = CF(0,-1,0) * ANGLES(RAD(0), RAD(0), RAD(0)) * CF(0,0,1) | |
1260 | for i=0, 0.5, 0.1 / Animation_Speed do | |
1261 | Swait() | |
1262 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-25)), 1 / Animation_Speed) | |
1263 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(25)), 1 / Animation_Speed) | |
1264 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0.1) * ANGLES(RAD(-20), RAD(-40), RAD(25)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed) | |
1265 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1266 | 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) | |
1267 | 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) | |
1268 | end | |
1269 | Speed = 30 | |
1270 | CreateSound(147722227, BATON, 6, 1, false) | |
1271 | Trail.Enabled = true | |
1272 | BATON.CanCollide = true | |
1273 | local SPEAKING = false | |
1274 | local HITS = {} | |
1275 | local TOUCH = BATON.Touched:Connect(function(hit) | |
1276 | if hit.Parent:FindFirstChildOfClass("Humanoid") then | |
1277 | local HUM = hit.Parent:FindFirstChildOfClass("Humanoid") | |
1278 | local TORSO = hit.Parent:FindFirstChild("Torso") or hit.Parent:FindFirstChild("UpperTorso") | |
1279 | if TORSO and HUM.Health > 0 then | |
1280 | local PASS = true | |
1281 | for i = 1, #HITS do | |
1282 | if HITS[i] == hit.Parent then | |
1283 | PASS = false | |
1284 | end | |
1285 | end | |
1286 | table.insert(HITS,hit.Parent) | |
1287 | if PASS == true then | |
1288 | CreateSound(260430079, BATON, 6, 0.8, false) | |
1289 | 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}) | |
1290 | TORSO.Anchored = true | |
1291 | local POS = TORSO.CFrame | |
1292 | coroutine.resume(coroutine.create(function() | |
1293 | for i = 1, 15 do | |
1294 | Swait() | |
1295 | TORSO.CFrame = POS*CF(MRANDOM(-2,2)/10,MRANDOM(-2,2)/10,MRANDOM(-2,2)/10) | |
1296 | end | |
1297 | local HEAD = HUM.Parent:FindFirstChild("Head") | |
1298 | HUM.Parent:BreakJoints() | |
1299 | if HEAD then | |
1300 | CreateSound(363808674, HEAD, 10, 0.8, false) | |
1301 | local bv = Instance.new("BodyVelocity",TORSO) | |
1302 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
1303 | bv.velocity = CF(Torso.Position-VT(0,5,0),HEAD.Position).lookVector*70 | |
1304 | Debris:AddItem(bv,0.05) | |
1305 | local TEXTS = {"Criminals should leave this world!","And stay down!"} | |
1306 | Chatter(TEXTS[MRANDOM(1,#TEXTS)],0) | |
1307 | end | |
1308 | TORSO.Anchored = false | |
1309 | end)) | |
1310 | end | |
1311 | end | |
1312 | end | |
1313 | end) | |
1314 | for i=0, 0.45, 0.1 / Animation_Speed do | |
1315 | Swait() | |
1316 | RootPart.CFrame = RootPart.CFrame * CF(0,0,-0.15) | |
1317 | BATONWELD.C0 = Clerp(BATONWELD.C0,CF(0,-1,0) * ANGLES(RAD(120), RAD(0), RAD(0)) * CF(0,0,1), 1 / Animation_Speed) | |
1318 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(15), RAD(0), RAD(15)), 1 / Animation_Speed) | |
1319 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-15), RAD(0), RAD(-15)), 1 / Animation_Speed) | |
1320 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.15, 0.5, -0.6) * ANGLES(RAD(140), RAD(-25), RAD(-41)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1321 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-3)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1322 | 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) | |
1323 | 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) | |
1324 | end | |
1325 | TOUCH:Disconnect() | |
1326 | BATON.CanCollide = false | |
1327 | Speed = 20 | |
1328 | Trail.Enabled = false | |
1329 | for i=0, 0.2, 0.1 / Animation_Speed do | |
1330 | Swait() | |
1331 | BATONWELD.C0 = Clerp(BATONWELD.C0,CF(0,-1,0) * ANGLES(RAD(0), RAD(0), RAD(0)) * CF(0,0,1), 2 / Animation_Speed) | |
1332 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1333 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-15)), 1 / Animation_Speed) | |
1334 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-5)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1335 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1336 | 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) | |
1337 | 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) | |
1338 | end | |
1339 | BATONWELD.Part0 = Torso | |
1340 | BATONWELD.C0 = CF(1,-0.8,0.75) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
1341 | ATTACK = false | |
1342 | Rooted = false | |
1343 | end | |
1344 | function TheRightToRemainSilent() | |
1345 | local TARGET = Mouse.Target | |
1346 | if TARGET ~= nil then | |
1347 | if TARGET.Parent:FindFirstChildOfClass("Humanoid") then | |
1348 | local HUM = TARGET.Parent:FindFirstChildOfClass("Humanoid") | |
1349 | local ROOT = TARGET.Parent:FindFirstChild("HumanoidRootPart") or TARGET.Parent:FindFirstChild("Torso") or TARGET.Parent:FindFirstChild("UpperTorso") | |
1350 | if ROOT and HUM.Health > 0 then | |
1351 | local FOE = Mouse.Target.Parent | |
1352 | ATTACK = true | |
1353 | Rooted = true | |
1354 | CharacterFade(C3(1,1,1),70) | |
1355 | RootPart.CFrame = ROOT.CFrame*CF(0,0,2) | |
1356 | ROOT.Anchored = true | |
1357 | CreateSound(289556450, RootPart, 5, 1.4, false) | |
1358 | Chatter("You are to remain silent and DEAD!",0) | |
1359 | for i=0, 0.4, 0.1 / Animation_Speed do | |
1360 | Swait() | |
1361 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1362 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1363 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(80), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1364 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1365 | 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) | |
1366 | 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) | |
1367 | end | |
1368 | HUM.PlatformStand = true | |
1369 | ROOT.CFrame = ROOT.CFrame * CF(0,-2*ROOT.Size.Z,0) * ANGLES(RAD(-90), RAD(0), RAD(0)) | |
1370 | CreateSound(260430117, ROOT, 6, 1.3, false) | |
1371 | coroutine.resume(coroutine.create(function() | |
1372 | Swait() | |
1373 | ROOT.Anchored = true | |
1374 | end)) | |
1375 | RootPart.CFrame = RootPart.CFrame*CF(0,0,-0.6) | |
1376 | for i=0, 0.2, 0.1 / Animation_Speed do | |
1377 | Swait() | |
1378 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(15)), 1 / Animation_Speed) | |
1379 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 1 / Animation_Speed) | |
1380 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1381 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1382 | 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) | |
1383 | 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) | |
1384 | end | |
1385 | local OOFS = {1106908323,1080610827,1080614222,565424701,565424177,1080611063} | |
1386 | CreateSound(OOFS[MRANDOM(1,#OOFS)], ROOT, 6, 1, false) | |
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.525, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(5)) * 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 | local AMMO = 6 | |
1397 | local FIRING = true | |
1398 | local SHOOTING = false | |
1399 | local TIMER = 70 | |
1400 | CreateSound(147722227, GUN, 6, 1.3, false) | |
1401 | GUNWELD.Part0 = LeftArm | |
1402 | GUNWELD.C0 = CF(0,-1.5,0) * ANGLES(RAD(0), RAD(90), RAD(-90)) | |
1403 | for i=0, 0.2, 0.1 / Animation_Speed do | |
1404 | Swait() | |
1405 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.65) * ANGLES(RAD(45), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1406 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5), RAD(0), RAD(15)), 1 / Animation_Speed) | |
1407 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.45, 0.5, -0.75) * ANGLES(RAD(80), RAD(0), RAD(-10)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1408 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.4, 0.55, 0.4) * ANGLES(RAD(100), RAD(0), RAD(15)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1409 | 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) | |
1410 | 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) | |
1411 | end | |
1412 | for i = 1, 6 do | |
1413 | local GUNPOS = GUN.CFrame*CF(1.2, 0.5, 0).p | |
1414 | local DISTANCE = (FOE.Head.Position - GUNPOS).Magnitude | |
1415 | 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}) | |
1416 | 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}) | |
1417 | HUM.Health = HUM.Health/1.5 | |
1418 | for i=0, 0.2, 0.1 / Animation_Speed do | |
1419 | Swait() | |
1420 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.65) * ANGLES(RAD(45), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1421 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5), RAD(0), RAD(15)), 1 / Animation_Speed) | |
1422 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.45, 0.5, -0.75) * ANGLES(RAD(80), RAD(0), RAD(-10)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1423 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.4, 0.55, 0.6) * ANGLES(RAD(130), RAD(0), RAD(20)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1424 | 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) | |
1425 | 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) | |
1426 | end | |
1427 | for i=0, 0.2, 0.1 / Animation_Speed do | |
1428 | Swait() | |
1429 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.65) * ANGLES(RAD(45), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1430 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5), RAD(0), RAD(15)), 1 / Animation_Speed) | |
1431 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.45, 0.5, -0.75) * ANGLES(RAD(80), RAD(0), RAD(-10)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1432 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.4, 0.55, 0.6) * ANGLES(RAD(100), RAD(0), RAD(15)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1433 | 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) | |
1434 | 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) | |
1435 | end | |
1436 | end | |
1437 | FOE:BreakJoints() | |
1438 | ROOT.Anchored = false | |
1439 | for i=0, 0.3, 0.1 / Animation_Speed do | |
1440 | Swait() | |
1441 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1442 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25), RAD(0), RAD(15)), 1 / Animation_Speed) | |
1443 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1444 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.525, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(5)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1445 | 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) | |
1446 | 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) | |
1447 | end | |
1448 | GUNWELD.Part0 = Torso | |
1449 | GUNWELD.C0 = CF(-1.1,-1.1,0) * ANGLES(RAD(0), RAD(90), RAD(-90)) | |
1450 | ATTACK = false | |
1451 | Rooted = false | |
1452 | end | |
1453 | end | |
1454 | end | |
1455 | end | |
1456 | ||
1457 | --//=================================\\ | |
1458 | --|| ASSIGN THINGS TO KEYS | |
1459 | --\\=================================// | |
1460 | ||
1461 | function MouseDown(Mouse) | |
1462 | if ATTACK == false then | |
1463 | if MODE == "GoodCop" then | |
1464 | Warning() | |
1465 | elseif MODE == "BadCop" then | |
1466 | Silence() | |
1467 | end | |
1468 | end | |
1469 | end | |
1470 | ||
1471 | function MouseUp(Mouse) | |
1472 | HOLD = false | |
1473 | end | |
1474 | ||
1475 | function KeyDown(Key) | |
1476 | KEYHOLD = true | |
1477 | if Key == "q" and ATTACK == false then | |
1478 | if MODE == "GoodCop" then | |
1479 | BatonStun() | |
1480 | elseif MODE == "BadCop" then | |
1481 | BatonBreaker() | |
1482 | end | |
1483 | end | |
1484 | ||
1485 | if Key == "e" and ATTACK == false then | |
1486 | if MODE == "GoodCop" then | |
1487 | Cuffs() | |
1488 | elseif MODE == "BadCop" then | |
1489 | TheRightToRemainSilent() | |
1490 | end | |
1491 | end | |
1492 | ||
1493 | if Key == "t" and ATTACK == false then | |
1494 | if MODE == "GoodCop" then | |
1495 | Chatter("You should obey the law.",0.01) | |
1496 | elseif MODE == "BadCop" then | |
1497 | Chatter("I don't think so, Criminal!",0.01) | |
1498 | end | |
1499 | end | |
1500 | ||
1501 | if Key == "m" and ATTACK == false then | |
1502 | Taunt() | |
1503 | end | |
1504 | ||
1505 | if Key == "f" and ATTACK == false then | |
1506 | Switch() | |
1507 | end | |
1508 | ||
1509 | if Key == "0" and ATTACK == false then | |
1510 | if sick.Parent ~= RootPart then | |
1511 | sick = IT("Sound",RootPart) | |
1512 | end | |
1513 | end | |
1514 | end | |
1515 | ||
1516 | function KeyUp(Key) | |
1517 | KEYHOLD = false | |
1518 | end | |
1519 | ||
1520 | Mouse.Button1Down:connect(function(NEWKEY) | |
1521 | MouseDown(NEWKEY) | |
1522 | end) | |
1523 | Mouse.Button1Up:connect(function(NEWKEY) | |
1524 | MouseUp(NEWKEY) | |
1525 | end) | |
1526 | Mouse.KeyDown:connect(function(NEWKEY) | |
1527 | KeyDown(NEWKEY) | |
1528 | end) | |
1529 | Mouse.KeyUp:connect(function(NEWKEY) | |
1530 | KeyUp(NEWKEY) | |
1531 | end) | |
1532 | ||
1533 | --//=================================\\ | |
1534 | --\\=================================// | |
1535 | ||
1536 | function unanchor() | |
1537 | for _, c in pairs(Character:GetChildren()) do | |
1538 | if c:IsA("BasePart") and c ~= RootPart then | |
1539 | c.Anchored = false | |
1540 | end | |
1541 | end | |
1542 | for _, c in pairs(Weapon:GetChildren()) do | |
1543 | if c:IsA("BasePart") and c ~= RootPart then | |
1544 | c.Anchored = false | |
1545 | end | |
1546 | end | |
1547 | if UNANCHOR == true then | |
1548 | RootPart.Anchored = false | |
1549 | else | |
1550 | RootPart.Anchored = true | |
1551 | end | |
1552 | end | |
1553 | ||
1554 | --//=================================\\ | |
1555 | --|| WRAP THE WHOLE SCRIPT UP | |
1556 | --\\=================================// | |
1557 | ||
1558 | Humanoid.Changed:connect(function(Jump) | |
1559 | if Jump == "Jump" and (Disable_Jump == true) then | |
1560 | Humanoid.Jump = false | |
1561 | end | |
1562 | end) | |
1563 | ||
1564 | while true do | |
1565 | Swait() | |
1566 | script.Parent = WEAPONGUI | |
1567 | ANIMATE.Parent = nil | |
1568 | for _,v in next, Humanoid:GetPlayingAnimationTracks() do | |
1569 | v:Stop(); | |
1570 | end | |
1571 | SINE = SINE + CHANGE | |
1572 | local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude | |
1573 | local TORSOVERTICALVELOCITY = RootPart.Velocity.y | |
1574 | local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character) | |
1575 | local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16) | |
1576 | if ANIM == "Walk" and TORSOVELOCITY > 1 then | |
1577 | 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) | |
1578 | 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) | |
1579 | 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) | |
1580 | 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) | |
1581 | elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then | |
1582 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1583 | 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) | |
1584 | 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) | |
1585 | 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) | |
1586 | end | |
1587 | if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then | |
1588 | ANIM = "Jump" | |
1589 | if ATTACK == false then | |
1590 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1591 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1592 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed) | |
1593 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed) | |
1594 | 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) | |
1595 | 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) | |
1596 | end | |
1597 | elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then | |
1598 | ANIM = "Fall" | |
1599 | if ATTACK == false then | |
1600 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1601 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1602 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(60)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed) | |
1603 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed) | |
1604 | 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) | |
1605 | 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) | |
1606 | end | |
1607 | elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then | |
1608 | ANIM = "Idle" | |
1609 | if ATTACK == false then | |
1610 | if MODE == "GoodCop" then | |
1611 | 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) | |
1612 | 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) | |
1613 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5, 0.3) * ANGLES(RAD(-45), RAD(0), RAD(-45)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1614 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, 0.3) * ANGLES(RAD(-40), RAD(0), RAD(45)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1615 | 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) | |
1616 | 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) | |
1617 | elseif MODE == "BadCop" then | |
1618 | 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) | |
1619 | 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) | |
1620 | 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) | |
1621 | 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) | |
1622 | 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) | |
1623 | 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) | |
1624 | end | |
1625 | end | |
1626 | elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then | |
1627 | ANIM = "Walk" | |
1628 | if ATTACK == false then | |
1629 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.05) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1630 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1631 | if MODE == "GoodCop" then | |
1632 | 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) | |
1633 | 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) | |
1634 | elseif MODE == "BadCop" then | |
1635 | 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) | |
1636 | 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) | |
1637 | end | |
1638 | 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) | |
1639 | 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) | |
1640 | end | |
1641 | end | |
1642 | unanchor() | |
1643 | Humanoid.MaxHealth = 3e3 | |
1644 | Humanoid.Health = 3e3 | |
1645 | if Rooted == false then | |
1646 | Disable_Jump = false | |
1647 | Humanoid.WalkSpeed = Speed | |
1648 | elseif Rooted == true then | |
1649 | Disable_Jump = true | |
1650 | Humanoid.WalkSpeed = 0 | |
1651 | end | |
1652 | for _, c in pairs(Character:GetChildren()) do | |
1653 | if (c.ClassName == "Shirt" or c.ClassName == "Pants") and c.Name ~= "Cloth" then | |
1654 | c:remove() | |
1655 | end | |
1656 | end | |
1657 | sick.SoundId = "rbxassetid://259554386" | |
1658 | sick.Looped = true | |
1659 | sick.Pitch = 1 | |
1660 | sick.Volume = 4 | |
1661 | sick.Playing = true | |
1662 | if MODE == "GoodCop" then | |
1663 | for E = 1, #GOODUI do | |
1664 | GOODUI[E].TextStrokeTransparency = 0 | |
1665 | GOODUI[E].TextTransparency = 0 | |
1666 | end | |
1667 | for E = 1, #BADUI do | |
1668 | BADUI[E].TextStrokeTransparency = 1 | |
1669 | BADUI[E].TextTransparency = 0.5 | |
1670 | end | |
1671 | elseif MODE == "BadCop" then | |
1672 | for E = 1, #GOODUI do | |
1673 | GOODUI[E].TextStrokeTransparency = 1 | |
1674 | GOODUI[E].TextTransparency = 0.5 | |
1675 | end | |
1676 | for E = 1, #BADUI do | |
1677 | BADUI[E].TextStrokeTransparency = 0 | |
1678 | BADUI[E].TextTransparency = 0 | |
1679 | end | |
1680 | end | |
1681 | end | |
1682 | ||
1683 | --//=================================\\ | |
1684 | --\\=================================// | |
1685 | ||
1686 | ||
1687 | ||
1688 | ||
1689 | ||
1690 | --//====================================================\\-- | |
1691 | --|| END OF SCRIPT | |
1692 | --\\====================================================//-- |