SHOW:
|
|
- or go back to the newest paste.
1 | -- This script has convert to FE by who i don't know? | |
2 | ||
3 | ----------------------------------------------------- | |
4 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
5 | local Player,game,owner = owner,game | |
6 | local RealPlayer = Player | |
7 | do | |
8 | print("FE Compatibility code by Mokiros | Showcase by Bacon Hair!") | |
9 | local rp = RealPlayer | |
10 | script.Parent = rp.Character | |
11 | ||
12 | --RemoteEvent for communicating | |
13 | local Event = Instance.new("RemoteEvent") | |
14 | Event.Name = "UserInput_Event" | |
15 | ||
16 | --Fake event to make stuff like Mouse.KeyDown work | |
17 | local function fakeEvent() | |
18 | local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end} | |
19 | t.connect = t.Connect | |
20 | return t | |
21 | end | |
22 | ||
23 | --Creating fake input objects with fake variables | |
24 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()} | |
25 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
26 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
27 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
28 | end} | |
29 | --Merged 2 functions into one by checking amount of arguments | |
30 | CAS.UnbindAction = CAS.BindAction | |
31 | ||
32 | --This function will trigger the events that have been :Connect()'ed | |
33 | local function te(self,ev,...) | |
34 | local t = m[ev] | |
35 | if t and t._fakeEvent then | |
36 | for _,f in pairs(t.Functions) do | |
37 | f(...) | |
38 | end | |
39 | end | |
40 | end | |
41 | m.TrigEvent = te | |
42 | UIS.TrigEvent = te | |
43 | ||
44 | Event.OnServerEvent:Connect(function(plr,io) | |
45 | if plr~=rp then return end | |
46 | m.Target = io.Target | |
47 | m.Hit = io.Hit | |
48 | if not io.isMouse then | |
49 | local b = io.UserInputState == Enum.UserInputState.Begin | |
50 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
51 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
52 | end | |
53 | for _,t in pairs(CAS.Actions) do | |
54 | for _,k in pairs(t.Keys) do | |
55 | if k==io.KeyCode then | |
56 | t.Function(t.Name,io.UserInputState,io) | |
57 | end | |
58 | end | |
59 | end | |
60 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
61 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
62 | end | |
63 | end) | |
64 | Event.Parent = NLS([==[ | |
65 | local Player = game:GetService("Players").LocalPlayer | |
66 | local Event = script:WaitForChild("UserInput_Event") | |
67 | ||
68 | local Mouse = Player:GetMouse() | |
69 | local UIS = game:GetService("UserInputService") | |
70 | local input = function(io,a) | |
71 | if a then return end | |
72 | --Since InputObject is a client-side instance, we create and pass table instead | |
73 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target}) | |
74 | end | |
75 | UIS.InputBegan:Connect(input) | |
76 | UIS.InputEnded:Connect(input) | |
77 | ||
78 | local h,t | |
79 | --Give the server mouse data 30 times every second, but only if the values changed | |
80 | --If player is not moving their mouse, client won't fire events | |
81 | while wait(1/30) do | |
82 | if h~=Mouse.Hit or t~=Mouse.Target then | |
83 | h,t=Mouse.Hit,Mouse.Target | |
84 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
85 | end | |
86 | end]==],Player.Character) | |
87 | ||
88 | ----Sandboxed game object that allows the usage of client-side methods and services | |
89 | --Real game object | |
90 | local _rg = game | |
91 | ||
92 | --Metatable for fake service | |
93 | local fsmt = { | |
94 | __index = function(self,k) | |
95 | local s = rawget(self,"_RealService") | |
96 | if s then return s[k] end | |
97 | end, | |
98 | __newindex = function(self,k,v) | |
99 | local s = rawget(self,"_RealService") | |
100 | if s then s[k]=v end | |
101 | end, | |
102 | __call = function(self,...) | |
103 | local s = rawget(self,"_RealService") | |
104 | if s then return s(...) end | |
105 | end | |
106 | } | |
107 | local function FakeService(t,RealService) | |
108 | t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService | |
109 | return setmetatable(t,fsmt) | |
110 | end | |
111 | ||
112 | --Fake game object | |
113 | local g = { | |
114 | GetService = function(self,s) | |
115 | return self[s] | |
116 | end, | |
117 | Players = FakeService({ | |
118 | LocalPlayer = FakeService({GetMouse=function(self)return m end},Player) | |
119 | },"Players"), | |
120 | UserInputService = FakeService(UIS,"UserInputService"), | |
121 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
122 | } | |
123 | rawset(g.Players,"localPlayer",g.Players.LocalPlayer) | |
124 | g.service = g.GetService | |
125 | ||
126 | g.RunService = FakeService({ | |
127 | RenderStepped = _rg:GetService("RunService").Heartbeat, | |
128 | BindToRenderStep = function(self,name,_,fun) | |
129 | ||
130 | end, | |
131 | UnbindFromRenderStep = function(self,name) | |
132 | self._btrs[name]:Disconnect() | |
133 | end, | |
134 | },"RunService") | |
135 | ||
136 | setmetatable(g,{ | |
137 | __index=function(self,s) | |
138 | return _rg:GetService(s) or typeof(_rg[s])=="function" | |
139 | and function(_,...)return _rg[s](_rg,...)end or _rg[s] | |
140 | end, | |
141 | __newindex = fsmt.__newindex, | |
142 | __call = fsmt.__call | |
143 | }) | |
144 | --Changing owner to fake player object to support owner:GetMouse() | |
145 | game,owner = g,g.Players.LocalPlayer | |
146 | end | |
147 | ||
148 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
149 | local Player,game,owner = owner,game | |
150 | local RealPlayer = Player | |
151 | do | |
152 | print("FE Compatibility code by Mokiros") | |
153 | local rp = RealPlayer | |
154 | script.Parent = rp.Character | |
155 | ||
156 | --RemoteEvent for communicating | |
157 | local Event = Instance.new("RemoteEvent") | |
158 | Event.Name = "UserInput_Event" | |
159 | ||
160 | --Fake event to make stuff like Mouse.KeyDown work | |
161 | local function fakeEvent() | |
162 | local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end} | |
163 | t.connect = t.Connect | |
164 | return t | |
165 | end | |
166 | ||
167 | --Creating fake input objects with fake variables | |
168 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()} | |
169 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
170 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
171 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
172 | end} | |
173 | --Merged 2 functions into one by checking amount of arguments | |
174 | CAS.UnbindAction = CAS.BindAction | |
175 | ||
176 | --This function will trigger the events that have been :Connect()'ed | |
177 | local function te(self,ev,...) | |
178 | local t = m[ev] | |
179 | if t and t._fakeEvent then | |
180 | for _,f in pairs(t.Functions) do | |
181 | f(...) | |
182 | end | |
183 | end | |
184 | end | |
185 | m.TrigEvent = te | |
186 | UIS.TrigEvent = te | |
187 | ||
188 | Event.OnServerEvent:Connect(function(plr,io) | |
189 | if plr~=rp then return end | |
190 | m.Target = io.Target | |
191 | m.Hit = io.Hit | |
192 | if not io.isMouse then | |
193 | local b = io.UserInputState == Enum.UserInputState.Begin | |
194 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
195 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
196 | end | |
197 | for _,t in pairs(CAS.Actions) do | |
198 | for _,k in pairs(t.Keys) do | |
199 | if k==io.KeyCode then | |
200 | t.Function(t.Name,io.UserInputState,io) | |
201 | end | |
202 | end | |
203 | end | |
204 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
205 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
206 | end | |
207 | end) | |
208 | Event.Parent = NLS([==[ | |
209 | local Player = game:GetService("Players").LocalPlayer | |
210 | local Event = script:WaitForChild("UserInput_Event") | |
211 | ||
212 | local Mouse = Player:GetMouse() | |
213 | local UIS = game:GetService("UserInputService") | |
214 | local input = function(io,a) | |
215 | if a then return end | |
216 | --Since InputObject is a client-side instance, we create and pass table instead | |
217 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target}) | |
218 | end | |
219 | UIS.InputBegan:Connect(input) | |
220 | UIS.InputEnded:Connect(input) | |
221 | ||
222 | local h,t | |
223 | --Give the server mouse data 30 times every second, but only if the values changed | |
224 | --If player is not moving their mouse, client won't fire events | |
225 | while wait(1/30) do | |
226 | if h~=Mouse.Hit or t~=Mouse.Target then | |
227 | h,t=Mouse.Hit,Mouse.Target | |
228 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
229 | end | |
230 | end]==],Player.Character) | |
231 | ||
232 | ----Sandboxed game object that allows the usage of client-side methods and services | |
233 | --Real game object | |
234 | local _rg = game | |
235 | ||
236 | --Metatable for fake service | |
237 | local fsmt = { | |
238 | __index = function(self,k) | |
239 | local s = rawget(self,"_RealService") | |
240 | if s then return s[k] end | |
241 | end, | |
242 | __newindex = function(self,k,v) | |
243 | local s = rawget(self,"_RealService") | |
244 | if s then s[k]=v end | |
245 | end, | |
246 | __call = function(self,...) | |
247 | local s = rawget(self,"_RealService") | |
248 | if s then return s(...) end | |
249 | end | |
250 | } | |
251 | local function FakeService(t,RealService) | |
252 | t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService | |
253 | return setmetatable(t,fsmt) | |
254 | end | |
255 | ||
256 | --Fake game object | |
257 | local g = { | |
258 | GetService = function(self,s) | |
259 | return self[s] | |
260 | end, | |
261 | Players = FakeService({ | |
262 | LocalPlayer = FakeService({GetMouse=function(self)return m end},Player) | |
263 | },"Players"), | |
264 | UserInputService = FakeService(UIS,"UserInputService"), | |
265 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
266 | } | |
267 | rawset(g.Players,"localPlayer",g.Players.LocalPlayer) | |
268 | g.service = g.GetService | |
269 | ||
270 | g.RunService = FakeService({ | |
271 | RenderStepped = _rg:GetService("RunService").Heartbeat, | |
272 | BindToRenderStep = function(self,name,_,fun) | |
273 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
274 | end, | |
275 | UnbindFromRenderStep = function(self,name) | |
276 | self._btrs[name]:Disconnect() | |
277 | end, | |
278 | },"RunService") | |
279 | ||
280 | setmetatable(g,{ | |
281 | __index=function(self,s) | |
282 | return _rg:GetService(s) or typeof(_rg[s])=="function" | |
283 | and function(_,...)return _rg[s](_rg,...)end or _rg[s] | |
284 | end, | |
285 | __newindex = fsmt.__newindex, | |
286 | __call = fsmt.__call | |
287 | }) | |
288 | --Changing owner to fake player object to support owner:GetMouse() | |
289 | game,owner = g,g.Players.LocalPlayer | |
290 | end | |
291 | --//====================================================\\-- | |
292 | --|| CREATED BY SHACKLUSTER | |
293 | --\\====================================================//-- | |
294 | ||
295 | wait(0.2) | |
296 | ||
297 | Player = game:GetService("Players").LocalPlayer | |
298 | PlayerGui = Player.PlayerGui | |
299 | Cam = workspace.CurrentCamera | |
300 | Backpack = Player.Backpack | |
301 | Character = Player.Character | |
302 | Humanoid = Character.Humanoid | |
303 | Mouse = Player:GetMouse() | |
304 | RootPart = Character["HumanoidRootPart"] | |
305 | Torso = Character["Torso"] | |
306 | Head = Character["Head"] | |
307 | RightArm = Character["Right Arm"] | |
308 | LeftArm = Character["Left Arm"] | |
309 | RightLeg = Character["Right Leg"] | |
310 | LeftLeg = Character["Left Leg"] | |
311 | RootJoint = RootPart["RootJoint"] | |
312 | Neck = Torso["Neck"] | |
313 | RightShoulder = Torso["Right Shoulder"] | |
314 | LeftShoulder = Torso["Left Shoulder"] | |
315 | RightHip = Torso["Right Hip"] | |
316 | LeftHip = Torso["Left Hip"] | |
317 | Humanoid.MaxHealth = "inf" | |
318 | Humanoid.Health = "inf" | |
319 | IT = Instance.new | |
320 | CF = CFrame.new | |
321 | VT = Vector3.new | |
322 | RAD = math.rad | |
323 | C3 = Color3.new | |
324 | UD2 = UDim2.new | |
325 | BRICKC = BrickColor.new | |
326 | ANGLES = CFrame.Angles | |
327 | EULER = CFrame.fromEulerAnglesXYZ | |
328 | COS = math.cos | |
329 | ACOS = math.acos | |
330 | SIN = math.sin | |
331 | ASIN = math.asin | |
332 | ABS = math.abs | |
333 | MRANDOM = math.random | |
334 | FLOOR = math.floor | |
335 | ||
336 | --//=================================\\ | |
337 | --|| USEFUL VALUES | |
338 | --\\=================================// | |
339 | ||
340 | Animation_Speed = 3 | |
341 | Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60) | |
342 | local Speed = 16 | |
343 | local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
344 | local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
345 | local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) | |
346 | local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) | |
347 | local DAMAGEMULTIPLIER = 1 | |
348 | local ANIM = "Idle" | |
349 | local ATTACK = false | |
350 | local EQUIPPED = false | |
351 | local HOLD = false | |
352 | local COMBO = 1 | |
353 | local Rooted = false | |
354 | local SINE = 0 | |
355 | local KEYHOLD = false | |
356 | local CHANGE = 2 / Animation_Speed | |
357 | local WALKINGANIM = false | |
358 | local VALUE1 = false | |
359 | local VALUE2 = false | |
360 | local ROBLOXIDLEANIMATION = IT("Animation") | |
361 | ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation" | |
362 | ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571" | |
363 | --ROBLOXIDLEANIMATION.Parent = Humanoid | |
364 | local WEAPONGUI = IT("ScreenGui", PlayerGui) | |
365 | WEAPONGUI.Name = "Weapon GUI" | |
366 | local Weapon = IT("Model") | |
367 | Weapon.Name = "Adds" | |
368 | local Effects = IT("Folder", Weapon) | |
369 | Effects.Name = "Effects" | |
370 | local ANIMATOR = Humanoid.Animator | |
371 | local ANIMATE = Character.Animate | |
372 | local UNANCHOR = true | |
373 | ||
374 | --//=================================\\ | |
375 | --\\=================================// | |
376 | ||
377 | ||
378 | --//=================================\\ | |
379 | --|| SAZERENOS' ARTIFICIAL HEARTBEAT | |
380 | --\\=================================// | |
381 | ||
382 | ArtificialHB = Instance.new("BindableEvent", script) | |
383 | ArtificialHB.Name = "ArtificialHB" | |
384 | ||
385 | script:WaitForChild("ArtificialHB") | |
386 | ||
387 | frame = Frame_Speed | |
388 | tf = 0 | |
389 | allowframeloss = false | |
390 | tossremainder = false | |
391 | lastframe = tick() | |
392 | script.ArtificialHB:Fire() | |
393 | ||
394 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
395 | tf = tf + s | |
396 | if tf >= frame then | |
397 | if allowframeloss then | |
398 | script.ArtificialHB:Fire() | |
399 | lastframe = tick() | |
400 | else | |
401 | for i = 1, math.floor(tf / frame) do | |
402 | script.ArtificialHB:Fire() | |
403 | end | |
404 | lastframe = tick() | |
405 | end | |
406 | if tossremainder then | |
407 | tf = 0 | |
408 | else | |
409 | tf = tf - frame * math.floor(tf / frame) | |
410 | end | |
411 | end | |
412 | end) | |
413 | ||
414 | --//=================================\\ | |
415 | --\\=================================// | |
416 | ||
417 | --//=================================\\ | |
418 | --|| SOME FUNCTIONS | |
419 | --\\=================================// | |
420 | ||
421 | function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS) | |
422 | return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS) | |
423 | end | |
424 | ||
425 | function PositiveAngle(NUMBER) | |
426 | if NUMBER >= 0 then | |
427 | NUMBER = 0 | |
428 | end | |
429 | return NUMBER | |
430 | end | |
431 | ||
432 | function NegativeAngle(NUMBER) | |
433 | if NUMBER <= 0 then | |
434 | NUMBER = 0 | |
435 | end | |
436 | return NUMBER | |
437 | end | |
438 | ||
439 | function Swait(NUMBER) | |
440 | if NUMBER == 0 or NUMBER == nil then | |
441 | ArtificialHB.Event:wait() | |
442 | else | |
443 | for i = 1, NUMBER do | |
444 | ArtificialHB.Event:wait() | |
445 | end | |
446 | end | |
447 | end | |
448 | ||
449 | function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET) | |
450 | local NEWMESH = IT(MESH) | |
451 | if MESH == "SpecialMesh" then | |
452 | NEWMESH.MeshType = MESHTYPE | |
453 | if MESHID ~= "nil" and MESHID ~= "" then | |
454 | NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID | |
455 | end | |
456 | if TEXTUREID ~= "nil" and TEXTUREID ~= "" then | |
457 | NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID | |
458 | end | |
459 | end | |
460 | NEWMESH.Offset = OFFSET or VT(0, 0, 0) | |
461 | NEWMESH.Scale = SCALE | |
462 | NEWMESH.Parent = PARENT | |
463 | return NEWMESH | |
464 | end | |
465 | ||
466 | function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR) | |
467 | local NEWPART = IT("Part") | |
468 | NEWPART.formFactor = FORMFACTOR | |
469 | NEWPART.Reflectance = REFLECTANCE | |
470 | NEWPART.Transparency = TRANSPARENCY | |
471 | NEWPART.CanCollide = false | |
472 | NEWPART.Locked = true | |
473 | NEWPART.Anchored = true | |
474 | if ANCHOR == false then | |
475 | NEWPART.Anchored = false | |
476 | end | |
477 | NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR)) | |
478 | NEWPART.Name = NAME | |
479 | NEWPART.Size = SIZE | |
480 | NEWPART.Position = Torso.Position | |
481 | NEWPART.Material = MATERIAL | |
482 | NEWPART:BreakJoints() | |
483 | NEWPART.Parent = PARENT | |
484 | return NEWPART | |
485 | end | |
486 | ||
487 | local function weldBetween(a, b) | |
488 | local weldd = Instance.new("ManualWeld") | |
489 | weldd.Part0 = a | |
490 | weldd.Part1 = b | |
491 | weldd.C0 = CFrame.new() | |
492 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
493 | weldd.Parent = a | |
494 | return weldd | |
495 | end | |
496 | ||
497 | ||
498 | function QuaternionFromCFrame(cf) | |
499 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
500 | local trace = m00 + m11 + m22 | |
501 | if trace > 0 then | |
502 | local s = math.sqrt(1 + trace) | |
503 | local recip = 0.5 / s | |
504 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
505 | else | |
506 | local i = 0 | |
507 | if m11 > m00 then | |
508 | i = 1 | |
509 | end | |
510 | if m22 > (i == 0 and m00 or m11) then | |
511 | i = 2 | |
512 | end | |
513 | if i == 0 then | |
514 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
515 | local recip = 0.5 / s | |
516 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
517 | elseif i == 1 then | |
518 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
519 | local recip = 0.5 / s | |
520 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
521 | elseif i == 2 then | |
522 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
523 | local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
524 | end | |
525 | end | |
526 | end | |
527 | ||
528 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
529 | local xs, ys, zs = x + x, y + y, z + z | |
530 | local wx, wy, wz = w * xs, w * ys, w * zs | |
531 | local xx = x * xs | |
532 | local xy = x * ys | |
533 | local xz = x * zs | |
534 | local yy = y * ys | |
535 | local yz = y * zs | |
536 | local zz = z * zs | |
537 | 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)) | |
538 | end | |
539 | ||
540 | function QuaternionSlerp(a, b, t) | |
541 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
542 | local startInterp, finishInterp; | |
543 | if cosTheta >= 0.0001 then | |
544 | if (1 - cosTheta) > 0.0001 then | |
545 | local theta = ACOS(cosTheta) | |
546 | local invSinTheta = 1 / SIN(theta) | |
547 | startInterp = SIN((1 - t) * theta) * invSinTheta | |
548 | finishInterp = SIN(t * theta) * invSinTheta | |
549 | else | |
550 | startInterp = 1 - t | |
551 | finishInterp = t | |
552 | end | |
553 | else | |
554 | if (1 + cosTheta) > 0.0001 then | |
555 | local theta = ACOS(-cosTheta) | |
556 | local invSinTheta = 1 / SIN(theta) | |
557 | startInterp = SIN((t - 1) * theta) * invSinTheta | |
558 | finishInterp = SIN(t * theta) * invSinTheta | |
559 | else | |
560 | startInterp = t - 1 | |
561 | finishInterp = t | |
562 | end | |
563 | end | |
564 | 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 | |
565 | end | |
566 | ||
567 | function Clerp(a, b, t) | |
568 | local qa = {QuaternionFromCFrame(a)} | |
569 | local qb = {QuaternionFromCFrame(b)} | |
570 | local ax, ay, az = a.x, a.y, a.z | |
571 | local bx, by, bz = b.x, b.y, b.z | |
572 | local _t = 1 - t | |
573 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
574 | end | |
575 | ||
576 | function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME) | |
577 | local frame = IT("Frame") | |
578 | frame.BackgroundTransparency = TRANSPARENCY | |
579 | frame.BorderSizePixel = BORDERSIZEPIXEL | |
580 | frame.Position = POSITION | |
581 | frame.Size = SIZE | |
582 | frame.BackgroundColor3 = COLOR | |
583 | frame.BorderColor3 = BORDERCOLOR | |
584 | frame.Name = NAME | |
585 | frame.Parent = PARENT | |
586 | return frame | |
587 | end | |
588 | ||
589 | function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME) | |
590 | local label = IT("TextLabel") | |
591 | label.BackgroundTransparency = 1 | |
592 | label.Size = UD2(1, 0, 1, 0) | |
593 | label.Position = UD2(0, 0, 0, 0) | |
594 | label.TextColor3 = TEXTCOLOR | |
595 | label.TextStrokeTransparency = STROKETRANSPARENCY | |
596 | label.TextTransparency = TRANSPARENCY | |
597 | label.FontSize = TEXTFONTSIZE | |
598 | label.Font = TEXTFONT | |
599 | label.BorderSizePixel = BORDERSIZEPIXEL | |
600 | label.TextScaled = false | |
601 | label.Text = TEXT | |
602 | label.Name = NAME | |
603 | label.Parent = PARENT | |
604 | return label | |
605 | end | |
606 | ||
607 | function NoOutlines(PART) | |
608 | PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10 | |
609 | end | |
610 | ||
611 | function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1) | |
612 | local NEWWELD = IT(TYPE) | |
613 | NEWWELD.Part0 = PART0 | |
614 | NEWWELD.Part1 = PART1 | |
615 | NEWWELD.C0 = C0 | |
616 | NEWWELD.C1 = C1 | |
617 | NEWWELD.Parent = PARENT | |
618 | return NEWWELD | |
619 | end | |
620 | ||
621 | local S = IT("Sound") | |
622 | function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP) | |
623 | local NEWSOUND = nil | |
624 | coroutine.resume(coroutine.create(function() | |
625 | NEWSOUND = S:Clone() | |
626 | NEWSOUND.Parent = PARENT | |
627 | NEWSOUND.Volume = VOLUME | |
628 | NEWSOUND.Pitch = PITCH | |
629 | NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID | |
630 | NEWSOUND:play() | |
631 | if DOESLOOP == true then | |
632 | NEWSOUND.Looped = true | |
633 | else | |
634 | repeat wait(1) until NEWSOUND.Playing == false | |
635 | NEWSOUND:remove() | |
636 | end | |
637 | end)) | |
638 | return NEWSOUND | |
639 | end | |
640 | ||
641 | function CFrameFromTopBack(at, top, back) | |
642 | local right = top:Cross(back) | |
643 | 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) | |
644 | end | |
645 | ||
646 | --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}) | |
647 | function WACKYEFFECT(Table) | |
648 | local TYPE = (Table.EffectType or "Sphere") | |
649 | local SIZE = (Table.Size or VT(1,1,1)) | |
650 | local ENDSIZE = (Table.Size2 or VT(0,0,0)) | |
651 | local TRANSPARENCY = (Table.Transparency or 0) | |
652 | local ENDTRANSPARENCY = (Table.Transparency2 or 1) | |
653 | local CFRAME = (Table.CFrame or Torso.CFrame) | |
654 | local MOVEDIRECTION = (Table.MoveToPos or nil) | |
655 | local ROTATION1 = (Table.RotationX or 0) | |
656 | local ROTATION2 = (Table.RotationY or 0) | |
657 | local ROTATION3 = (Table.RotationZ or 0) | |
658 | local MATERIAL = (Table.Material or "Neon") | |
659 | local COLOR = (Table.Color or C3(1,1,1)) | |
660 | local TIME = (Table.Time or 45) | |
661 | local SOUNDID = (Table.SoundID or nil) | |
662 | local SOUNDPITCH = (Table.SoundPitch or nil) | |
663 | local SOUNDVOLUME = (Table.SoundVolume or nil) | |
664 | coroutine.resume(coroutine.create(function() | |
665 | local PLAYSSOUND = false | |
666 | local SOUND = nil | |
667 | local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true) | |
668 | if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then | |
669 | PLAYSSOUND = true | |
670 | SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false) | |
671 | end | |
672 | EFFECT.Color = COLOR | |
673 | local MSH = nil | |
674 | if TYPE == "Sphere" then | |
675 | MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0)) | |
676 | elseif TYPE == "Block" then | |
677 | MSH = IT("BlockMesh",EFFECT) | |
678 | MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X) | |
679 | elseif TYPE == "Wave" then | |
680 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8)) | |
681 | elseif TYPE == "Ring" then | |
682 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0)) | |
683 | elseif TYPE == "Slash" then | |
684 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0)) | |
685 | elseif TYPE == "Round Slash" then | |
686 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0)) | |
687 | elseif TYPE == "Swirl" then | |
688 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0)) | |
689 | elseif TYPE == "Skull" then | |
690 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0)) | |
691 | elseif TYPE == "Crystal" then | |
692 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0)) | |
693 | end | |
694 | if MSH ~= nil then | |
695 | local MOVESPEED = nil | |
696 | if MOVEDIRECTION ~= nil then | |
697 | MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME | |
698 | end | |
699 | local GROWTH = SIZE - ENDSIZE | |
700 | local TRANS = TRANSPARENCY - ENDTRANSPARENCY | |
701 | if TYPE == "Block" then | |
702 | EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
703 | else | |
704 | EFFECT.CFrame = CFRAME | |
705 | end | |
706 | for LOOP = 1, TIME+1 do | |
707 | Swait() | |
708 | MSH.Scale = MSH.Scale - GROWTH/TIME | |
709 | if TYPE == "Wave" then | |
710 | MSH.Offset = VT(0,0,-MSH.Scale.X/8) | |
711 | end | |
712 | EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME | |
713 | if TYPE == "Block" then | |
714 | EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
715 | else | |
716 | EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3)) | |
717 | end | |
718 | if MOVEDIRECTION ~= nil then | |
719 | local ORI = EFFECT.Orientation | |
720 | EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED) | |
721 | EFFECT.Orientation = ORI | |
722 | end | |
723 | end | |
724 | if PLAYSSOUND == false then | |
725 | EFFECT:remove() | |
726 | else | |
727 | repeat Swait() until SOUND.Playing == false | |
728 | EFFECT:remove() | |
729 | end | |
730 | else | |
731 | if PLAYSSOUND == false then | |
732 | EFFECT:remove() | |
733 | else | |
734 | repeat Swait() until SOUND.Playing == false | |
735 | EFFECT:remove() | |
736 | end | |
737 | end | |
738 | end)) | |
739 | end | |
740 | ||
741 | function MakeForm(PART,TYPE) | |
742 | if TYPE == "Cyl" then | |
743 | local MSH = IT("CylinderMesh",PART) | |
744 | elseif TYPE == "Ball" then | |
745 | local MSH = IT("SpecialMesh",PART) | |
746 | MSH.MeshType = "Sphere" | |
747 | elseif TYPE == "Wedge" then | |
748 | local MSH = IT("SpecialMesh",PART) | |
749 | MSH.MeshType = "Wedge" | |
750 | end | |
751 | end | |
752 | ||
753 | Debris = game:GetService("Debris") | |
754 | ||
755 | function CastProperRay(StartPos, EndPos, Distance, Ignore) | |
756 | local DIRECTION = CF(StartPos,EndPos).lookVector | |
757 | return Raycast(StartPos, DIRECTION, Distance, Ignore) | |
758 | end | |
759 | ||
760 | function CharacterFade(COLOR,TIMER) | |
761 | coroutine.resume(coroutine.create(function() | |
762 | local FADE = IT("Model",Effects) | |
763 | for _, c in pairs(Character:GetChildren()) do | |
764 | if c.ClassName == "Part" and c ~= RootPart then | |
765 | local FADER = c:Clone() | |
766 | FADER.Color = COLOR | |
767 | FADER.CFrame = c.CFrame | |
768 | FADER.Parent = FADE | |
769 | FADER.Anchored = true | |
770 | FADER.Transparency = 0.25 | |
771 | FADER:BreakJoints() | |
772 | FADER.Material = "Glass" | |
773 | FADER:ClearAllChildren() | |
774 | if FADER.Name == "Head" then | |
775 | FADER.Size = VT(1,1,1) | |
776 | end | |
777 | end | |
778 | end | |
779 | local TRANS = 0.75/TIMER | |
780 | for i = 1, TIMER do | |
781 | Swait() | |
782 | for _, c in pairs(FADE:GetChildren()) do | |
783 | if c.ClassName == "Part" then | |
784 | c.Transparency = c.Transparency + TRANS | |
785 | end | |
786 | end | |
787 | end | |
788 | FADE:remove() | |
789 | end)) | |
790 | end | |
791 | ||
792 | local PE=Instance.new("ParticleEmitter") | |
793 | PE.LightEmission=0.3 | |
794 | PE.Size=NumberSequence.new(0) | |
795 | PE.Transparency=NumberSequence.new(0,1) | |
796 | PE.Rotation=NumberRange.new(0,360) | |
797 | PE.LockedToPart = false | |
798 | PE.Speed = NumberRange.new(0,0,0) | |
799 | PE.ZOffset = 0.3 | |
800 | PE.Rate = 999 | |
801 | PE.VelocitySpread = 25 | |
802 | PE.Name = "Particles" | |
803 | ||
804 | function CreateParticles(art,accel,drag,lifetime,type,isenabledbydefault,locked,size,speed) | |
805 | local particle = nil | |
806 | coroutine.resume(coroutine.create(function(PART) | |
807 | particle = PE:Clone() | |
808 | Swait() | |
809 | particle.Rate = 999 | |
810 | particle.Parent = art | |
811 | particle.Acceleration = accel | |
812 | if type == "Fire" then | |
813 | local EyeSizes={ | |
814 | NumberSequenceKeypoint.new(0,size,size/2), | |
815 | NumberSequenceKeypoint.new(1,size/4,size/8) | |
816 | } | |
817 | particle.Size = NumberSequence.new(EyeSizes) | |
818 | elseif type == "Smoke" then | |
819 | local EyeSizes={ | |
820 | NumberSequenceKeypoint.new(0,size/5,0), | |
821 | NumberSequenceKeypoint.new(1,size*2,0.5) | |
822 | } | |
823 | particle.Size = NumberSequence.new(EyeSizes) | |
824 | elseif type == "Solid" then | |
825 | local EyeSizes={ | |
826 | NumberSequenceKeypoint.new(0,size,0), | |
827 | NumberSequenceKeypoint.new(1,size,0) | |
828 | } | |
829 | particle.Size = NumberSequence.new(EyeSizes) | |
830 | end | |
831 | particle.Lifetime=NumberRange.new(lifetime) | |
832 | particle.Drag = drag | |
833 | if locked == true then | |
834 | particle.LockedToPart = true | |
835 | end | |
836 | particle.Speed = NumberRange.new(speed*0.8,speed) | |
837 | particle.Texture = "http://www.roblox.com/asset/?id=1179557490" | |
838 | particle.Enabled = isenabledbydefault | |
839 | particle.Color = ColorSequence.new(Color3.new(255/255, 176/255, 0)) | |
840 | end)) | |
841 | return particle | |
842 | end | |
843 | ||
844 | --//=================================\\ | |
845 | --|| RAGDOLL STUFF | |
846 | --\\=================================// | |
847 | ||
848 | function recurse(root,callback,i) | |
849 | i= i or 0 | |
850 | for _,v in pairs(root:GetChildren()) do | |
851 | i = i + 1 | |
852 | callback(i,v) | |
853 | ||
854 | if #v:GetChildren() > 0 then | |
855 | i = recurse(v,callback,i) | |
856 | end | |
857 | end | |
858 | ||
859 | return i | |
860 | end | |
861 | ||
862 | function ragdollJoint(character, part0, part1, attachmentName, className, properties) | |
863 | attachmentName = attachmentName.."RigAttachment" | |
864 | local constraint = Instance.new(className.."Constraint") | |
865 | constraint.Attachment0 = part0:FindFirstChild(attachmentName) | |
866 | constraint.Attachment1 = part1:FindFirstChild(attachmentName) | |
867 | constraint.Name = "RagdollConstraint"..part1.Name | |
868 | ||
869 | for _,propertyData in next,properties or {} do | |
870 | constraint[propertyData[1]] = propertyData[2] | |
871 | end | |
872 | ||
873 | constraint.Parent = character | |
874 | end | |
875 | ||
876 | function getAttachment0(character, attachmentName) | |
877 | for _,child in next,character:GetChildren() do | |
878 | local attachment = child:FindFirstChild(attachmentName) | |
879 | if attachment then | |
880 | return attachment | |
881 | end | |
882 | end | |
883 | end | |
884 | ||
885 | function ArtificialHitbox(Part) | |
886 | local HITBOX = CreatePart(3, Part, "Metal", 0, 1, "Really black", "Hitbox", Part.Size/2, false) | |
887 | HITBOX.CanCollide = true | |
888 | HITBOX.CFrame = Part.CFrame | |
889 | weldBetween(Part,HITBOX) | |
890 | end | |
891 | ||
892 | function R15Ragdoll(character,KeepArms) | |
893 | character:BreakJoints() | |
894 | coroutine.resume(coroutine.create(function() | |
895 | recurse(character, function(_,v) | |
896 | if v:IsA("Attachment") then | |
897 | v.Axis = Vector3.new(0, 1, 0) | |
898 | v.SecondaryAxis = Vector3.new(0, 0, 1) | |
899 | v.Rotation = Vector3.new(0, 0, 0) | |
900 | end | |
901 | end) | |
902 | for _,child in next,character:GetChildren() do | |
903 | if child:IsA("Accoutrement") then | |
904 | for _,part in next,child:GetChildren() do | |
905 | if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then | |
906 | local attachment1 = part:FindFirstChildOfClass("Attachment") | |
907 | local attachment0 = getAttachment0(character,attachment1.Name) | |
908 | if attachment0 and attachment1 then | |
909 | local constraint = Instance.new("HingeConstraint") | |
910 | constraint.Attachment0 = attachment0 | |
911 | constraint.Attachment1 = attachment1 | |
912 | constraint.LimitsEnabled = true | |
913 | constraint.UpperAngle = 0 | |
914 | constraint.LowerAngle = 0 | |
915 | constraint.Parent = character | |
916 | end | |
917 | ArtificialHitbox(part) | |
918 | elseif part.Name == "HumanoidRootPart" then | |
919 | part:remove() | |
920 | end | |
921 | end | |
922 | end | |
923 | end | |
924 | ||
925 | ragdollJoint(character,character.LowerTorso, character.UpperTorso, "Waist", "BallSocket", { | |
926 | {"LimitsEnabled",true}; | |
927 | {"UpperAngle",5}; | |
928 | }) | |
929 | if character:FindFirstChild("Head") then | |
930 | ragdollJoint(character,character.UpperTorso, character.Head, "Neck", "BallSocket", { | |
931 | {"LimitsEnabled",true}; | |
932 | {"UpperAngle",15}; | |
933 | }) | |
934 | end | |
935 | ||
936 | local handProperties = { | |
937 | {"LimitsEnabled", true}; | |
938 | {"UpperAngle",0}; | |
939 | {"LowerAngle",0}; | |
940 | } | |
941 | ragdollJoint(character,character.LeftLowerArm, character.LeftHand, "LeftWrist", "Hinge", handProperties) | |
942 | ragdollJoint(character,character.RightLowerArm, character.RightHand, "RightWrist", "Hinge", handProperties) | |
943 | ||
944 | local shinProperties = { | |
945 | {"LimitsEnabled", true}; | |
946 | {"UpperAngle", 0}; | |
947 | {"LowerAngle", -75}; | |
948 | } | |
949 | ragdollJoint(character,character.LeftUpperLeg, character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties) | |
950 | ragdollJoint(character,character.RightUpperLeg, character.RightLowerLeg, "RightKnee", "Hinge", shinProperties) | |
951 | ||
952 | local footProperties = { | |
953 | {"LimitsEnabled", true}; | |
954 | {"UpperAngle", 15}; | |
955 | {"LowerAngle", -45}; | |
956 | } | |
957 | ragdollJoint(character,character.LeftLowerLeg, character.LeftFoot, "LeftAnkle", "Hinge", footProperties) | |
958 | ragdollJoint(character,character.RightLowerLeg, character.RightFoot, "RightAnkle", "Hinge", footProperties) | |
959 | if KeepArms == true then | |
960 | ragdollJoint(character,character.UpperTorso, character.RightUpperArm, "RightShoulder", "BallSocket") | |
961 | ragdollJoint(character,character.RightUpperArm, character.RightLowerArm, "RightElbow", "BallSocket") | |
962 | ragdollJoint(character,character.UpperTorso, character.LeftUpperArm, "LeftShoulder", "BallSocket") | |
963 | ragdollJoint(character,character.LeftUpperArm, character.LeftLowerArm, "LeftElbow", "BallSocket") | |
964 | end | |
965 | ragdollJoint(character,character.LowerTorso, character.LeftUpperLeg, "LeftHip", "BallSocket") | |
966 | ragdollJoint(character,character.LowerTorso, character.RightUpperLeg, "RightHip", "BallSocket") | |
967 | Debris:AddItem(character,5) | |
968 | end)) | |
969 | end | |
970 | ||
971 | function Ragdoll(Character2,CharTorso,KeepArms) | |
972 | coroutine.resume(coroutine.create(function() | |
973 | Character2:BreakJoints() | |
974 | local hum = Character2:findFirstChild("Humanoid") | |
975 | hum:remove() | |
976 | local function Scan(ch) | |
977 | local e | |
978 | for e = 1,#ch do | |
979 | Scan(ch[e]:GetChildren()) | |
980 | if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then | |
981 | ch[e]:remove() | |
982 | end | |
983 | end | |
984 | end | |
985 | local NEWHUM = IT("Humanoid") | |
986 | NEWHUM.Name = "Corpse" | |
987 | NEWHUM.Health = 0 | |
988 | NEWHUM.MaxHealth = 0 | |
989 | NEWHUM.PlatformStand = true | |
990 | NEWHUM.Parent = Character2 | |
991 | NEWHUM.DisplayDistanceType = "None" | |
992 | ||
993 | local ch = Character2:GetChildren() | |
994 | local i | |
995 | for i = 1,#ch do | |
996 | if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then | |
997 | ch[i]:remove() | |
998 | end | |
999 | end | |
1000 | ||
1001 | local Torso2 = Character2.Torso | |
1002 | local movevector = Vector3.new() | |
1003 | ||
1004 | if Torso2 then | |
1005 | movevector = CFrame.new(CharTorso.Position,Torso2.Position).lookVector | |
1006 | local Head = Character2:FindFirstChild("Head") | |
1007 | if Head then | |
1008 | local Neck = Instance.new("Weld") | |
1009 | Neck.Name = "Neck" | |
1010 | Neck.Part0 = Torso2 | |
1011 | Neck.Part1 = Head | |
1012 | Neck.C0 = CFrame.new(0, 1.5, 0) | |
1013 | Neck.C1 = CFrame.new() | |
1014 | Neck.Parent = Torso2 | |
1015 | ||
1016 | end | |
1017 | local Limb = Character2:FindFirstChild("Right Arm") | |
1018 | if Limb and KeepArms == true then | |
1019 | ||
1020 | Limb.CFrame = Torso2.CFrame * CFrame.new(1.5, 0, 0) | |
1021 | local Joint = Instance.new("Glue") | |
1022 | Joint.Name = "RightShoulder" | |
1023 | Joint.Part0 = Torso2 | |
1024 | Joint.Part1 = Limb | |
1025 | Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
1026 | Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
1027 | Joint.Parent = Torso2 | |
1028 | ||
1029 | local B = Instance.new("Part") | |
1030 | B.TopSurface = 0 | |
1031 | B.BottomSurface = 0 | |
1032 | B.formFactor = "Symmetric" | |
1033 | B.Size = Vector3.new(1, 1, 1) | |
1034 | B.Transparency = 1 | |
1035 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
1036 | B.Parent = Character2 | |
1037 | local W = Instance.new("Weld") | |
1038 | W.Part0 = Limb | |
1039 | W.Part1 = B | |
1040 | W.C0 = CFrame.new(0, -0.5, 0) | |
1041 | W.Parent = Limb | |
1042 | ||
1043 | end | |
1044 | local Limb = Character2:FindFirstChild("Left Arm") | |
1045 | if Limb and KeepArms == true then | |
1046 | ||
1047 | Limb.CFrame = Torso2.CFrame * CFrame.new(-1.5, 0, 0) | |
1048 | local Joint = Instance.new("Glue") | |
1049 | Joint.Name = "LeftShoulder" | |
1050 | Joint.Part0 = Torso2 | |
1051 | Joint.Part1 = Limb | |
1052 | Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
1053 | Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
1054 | Joint.Parent = Torso2 | |
1055 | ||
1056 | local B = Instance.new("Part") | |
1057 | B.TopSurface = 0 | |
1058 | B.BottomSurface = 0 | |
1059 | B.formFactor = "Symmetric" | |
1060 | B.Size = Vector3.new(1, 1, 1) | |
1061 | B.Transparency = 1 | |
1062 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
1063 | B.Parent = Character2 | |
1064 | local W = Instance.new("Weld") | |
1065 | W.Part0 = Limb | |
1066 | W.Part1 = B | |
1067 | W.C0 = CFrame.new(0, -0.5, 0) | |
1068 | W.Parent = Limb | |
1069 | ||
1070 | end | |
1071 | local Limb = Character2:FindFirstChild("Right Leg") | |
1072 | if Limb then | |
1073 | ||
1074 | Limb.CFrame = Torso2.CFrame * CFrame.new(0.5, -2, 0) | |
1075 | local Joint = Instance.new("Glue") | |
1076 | Joint.Name = "RightHip" | |
1077 | Joint.Part0 = Torso2 | |
1078 | Joint.Part1 = Limb | |
1079 | Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
1080 | Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
1081 | Joint.Parent = Torso2 | |
1082 | ||
1083 | local B = Instance.new("Part") | |
1084 | B.TopSurface = 0 | |
1085 | B.BottomSurface = 0 | |
1086 | B.formFactor = "Symmetric" | |
1087 | B.Size = Vector3.new(1, 1, 1) | |
1088 | B.Transparency = 1 | |
1089 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
1090 | B.Parent = Character2 | |
1091 | local W = Instance.new("Weld") | |
1092 | W.Part0 = Limb | |
1093 | W.Part1 = B | |
1094 | W.C0 = CFrame.new(0, -0.5, 0) | |
1095 | W.Parent = Limb | |
1096 | ||
1097 | end | |
1098 | local Limb = Character2:FindFirstChild("Left Leg") | |
1099 | if Limb then | |
1100 | ||
1101 | Limb.CFrame = Torso2.CFrame * CFrame.new(-0.5, -2, 0) | |
1102 | local Joint = Instance.new("Glue") | |
1103 | Joint.Name = "LeftHip" | |
1104 | Joint.Part0 = Torso2 | |
1105 | Joint.Part1 = Limb | |
1106 | Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
1107 | Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
1108 | Joint.Parent = Torso2 | |
1109 | ||
1110 | local B = Instance.new("Part") | |
1111 | B.TopSurface = 0 | |
1112 | B.BottomSurface = 0 | |
1113 | B.formFactor = "Symmetric" | |
1114 | B.Size = Vector3.new(1, 1, 1) | |
1115 | B.Transparency = 1 | |
1116 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
1117 | B.Parent = Character2 | |
1118 | local W = Instance.new("Weld") | |
1119 | W.Part0 = Limb | |
1120 | W.Part1 = B | |
1121 | W.C0 = CFrame.new(0, -0.5, 0) | |
1122 | W.Parent = Limb | |
1123 | ||
1124 | end | |
1125 | --[ | |
1126 | local Bar = Instance.new("Part") | |
1127 | Bar.TopSurface = 0 | |
1128 | Bar.BottomSurface = 0 | |
1129 | Bar.formFactor = "Symmetric" | |
1130 | Bar.Size = Vector3.new(1, 1, 1) | |
1131 | Bar.Transparency = 1 | |
1132 | Bar.CFrame = Torso2.CFrame * CFrame.new(0, 0.5, 0) | |
1133 | Bar.Parent = Character2 | |
1134 | local Weld = Instance.new("Weld") | |
1135 | Weld.Part0 = Torso2 | |
1136 | Weld.Part1 = Bar | |
1137 | Weld.C0 = CFrame.new(0, 0.5, 0) | |
1138 | Weld.Parent = Torso2 | |
1139 | --]] | |
1140 | end | |
1141 | Character2.Parent = workspace | |
1142 | Debris:AddItem(Character2,5) | |
1143 | ||
1144 | return Character2,Torso2 | |
1145 | end)) | |
1146 | end | |
1147 | ||
1148 | --//=================================\\ | |
1149 | --|| WEAPON CREATION | |
1150 | --\\=================================// | |
1151 | ||
1152 | local DUST = CreateParticles(RightArm,VT(0,0,0),5,2,"Smoke",false,false,5,0) | |
1153 | DUST.ZOffset = 1 | |
1154 | RightArm.Transparency = 1 | |
1155 | local BasePart = CreatePart(3, Weapon, "Metal", 0, 0, "Really black", "Part", VT(1,2,1),false) | |
1156 | CreateWeldOrSnapOrMotor("Weld", RightArm, RightArm, BasePart, CF(0,0,0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
1157 | local Sphere = CreatePart(3, Weapon, "Metal", 0, 0, "Really black", "Part", VT(1.4,1.4,1.4),false) | |
1158 | MakeForm(Sphere,"Ball") | |
1159 | CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Sphere, CF(0.2,0.8,0.1) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
1160 | local LaserPart = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0.3,0.3,0.1),false) | |
1161 | MakeForm(LaserPart,"Ball") | |
1162 | CreateWeldOrSnapOrMotor("Weld", Sphere, Sphere, LaserPart, CF(0,0,-0.65) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
1163 | local Bump = CreatePart(3, Weapon, "Metal", 0, 0, "Really black", "Part", VT(0.3,0.3,0.2),false) | |
1164 | MakeForm(Bump,"Ball") | |
1165 | CreateWeldOrSnapOrMotor("Weld", Sphere, Sphere, Bump, CF(0,0,0.65) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
1166 | local BottomLaser = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0.4,0,0.4),false) | |
1167 | MakeForm(BottomLaser,"Cyl") | |
1168 | CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, BottomLaser, CF(0,-1,0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
1169 | local Part1 = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0,0.5,0.5),false) | |
1170 | CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Part1, CF(0,-0.76,-0.26) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
1171 | local Part2 = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0,0.5,0.5),false) | |
1172 | CreateWeldOrSnapOrMotor("Weld", BasePart, Part1, Part2, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(-25)), CF(0, -0.25, 0)) | |
1173 | local Part3 = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0,0.5,0.5),false) | |
1174 | CreateWeldOrSnapOrMotor("Weld", BasePart, Part1, Part3, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(-90)), CF(0, -0.26, 0)) | |
1175 | local Part4 = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0,0.56,0.5),false) | |
1176 | CreateWeldOrSnapOrMotor("Weld", BasePart, Part2, Part4, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(90)), CF(0, -0.26, 0)) | |
1177 | local Part5 = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0,0.56,0.5),false) | |
1178 | CreateWeldOrSnapOrMotor("Weld", BasePart, Part4, Part5, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(-125)), CF(0, -0.26, 0)) | |
1179 | local Part = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0,0.25,0.5),false) | |
1180 | CreateWeldOrSnapOrMotor("Weld", BasePart, Part4, Part, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(25)), CF(0, -0.26/2, 0)) | |
1181 | local Part = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0,0.3,0.5),false) | |
1182 | CreateWeldOrSnapOrMotor("Weld", BasePart, Part2, Part, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(-65)), CF(0, -0.31/2, 0)) | |
1183 | local Part = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(1.4,0,1.4),false) | |
1184 | MakeForm(Part,"Cyl") | |
1185 | CreateWeldOrSnapOrMotor("Weld", Sphere, Sphere, Part, CF(0.035,0,0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
1186 | local Part = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(1.4,0,1.4),false) | |
1187 | MakeForm(Part,"Cyl") | |
1188 | CreateWeldOrSnapOrMotor("Weld", Sphere, Sphere, Part, CF(0,-0.035,0) * ANGLES(RAD(0), RAD(0), RAD(90)), CF(0, 0, 0)) | |
1189 | local Sphere = CreatePart(3, Weapon, "Metal", 0, 0, "Really black", "Part", VT(0.3,1.6,0.7),false) | |
1190 | MakeForm(Sphere,"Ball") | |
1191 | CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Sphere, CF(0.45,0.5,0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
1192 | local BODY = {} | |
1193 | for _, c in pairs(Character:GetDescendants()) do | |
1194 | if c:IsA("BasePart") then | |
1195 | table.insert(BODY, { | |
1196 | c, | |
1197 | c.Parent, | |
1198 | c.Material, | |
1199 | c.Color | |
1200 | }) | |
1201 | elseif c:IsA("JointInstance") then | |
1202 | table.insert(BODY, { | |
1203 | c, | |
1204 | c.Parent, | |
1205 | nil, | |
1206 | nil | |
1207 | }) | |
1208 | end | |
1209 | end | |
1210 | for _, c in pairs(Weapon:GetChildren()) do | |
1211 | if c.ClassName == "Part" then | |
1212 | c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0) | |
1213 | end | |
1214 | end | |
1215 | ||
1216 | ||
1217 | for _, c in pairs(Character:GetDescendants()) do | |
1218 | if c:IsA("BasePart") then | |
1219 | table.insert(BODY, { | |
1220 | c, | |
1221 | c.Parent, | |
1222 | c.Material, | |
1223 | c.Color | |
1224 | }) | |
1225 | elseif c:IsA("JointInstance") then | |
1226 | table.insert(BODY, { | |
1227 | c, | |
1228 | c.Parent, | |
1229 | nil, | |
1230 | nil | |
1231 | }) | |
1232 | end | |
1233 | end | |
1234 | ||
1235 | for e = 1, #BODY do | |
1236 | if BODY[e] ~= nil then | |
1237 | do | |
1238 | local STUFF = BODY[e] | |
1239 | local PART = STUFF[1] | |
1240 | local PARENT = STUFF[2] | |
1241 | local MATERIAL = STUFF[3] | |
1242 | local COLOR = STUFF[4] | |
1243 | PART.AncestryChanged:Connect(function() | |
1244 | if PART.ClassName == "Part" then | |
1245 | PART.Material = MATERIAL | |
1246 | PART.Color = COLOR | |
1247 | end | |
1248 | PART.Parent = PARENT | |
1249 | end) | |
1250 | end | |
1251 | end | |
1252 | end | |
1253 | function refit() | |
1254 | Weapon.Parent = Character | |
1255 | Character.Parent = workspace | |
1256 | for e = 1, #BODY do | |
1257 | if BODY[e] ~= nil then | |
1258 | local STUFF = BODY[e] | |
1259 | local PART = STUFF[1] | |
1260 | local PARENT = STUFF[2] | |
1261 | local MATERIAL = STUFF[3] | |
1262 | local COLOR = STUFF[4] | |
1263 | if PART.Parent ~= PARENT then | |
1264 | Humanoid:remove() | |
1265 | if PART.ClassName == "Part" then | |
1266 | PART.Material = MATERIAL | |
1267 | PART.Color = COLOR | |
1268 | end | |
1269 | PART.Parent = PARENT | |
1270 | Humanoid = IT("Humanoid", Character) | |
1271 | end | |
1272 | end | |
1273 | end | |
1274 | end | |
1275 | ||
1276 | ||
1277 | ||
1278 | local SKILLTEXTCOLOR = C3(1,0,0) | |
1279 | local SKILLFONT = "SciFi" | |
1280 | local SKILLTEXTSIZE = 5 | |
1281 | ||
1282 | Weapon.Parent = Character | |
1283 | Humanoid.Died:connect(function() | |
1284 | refit() | |
1285 | end) | |
1286 | ||
1287 | ||
1288 | local SKILL1FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.8, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame") | |
1289 | local SKILL2FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.8, 0, 0.86, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame") | |
1290 | local SKILL3FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.8, 0, 0.82, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame") | |
1291 | local SKILL4FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.8, 0, 0.78, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame") | |
1292 | local SKILL5FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.8, 0, 0.74, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 5 Frame") | |
1293 | local SKILL6FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.8, 0, 0.70, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 6 Frame") | |
1294 | ||
1295 | local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 1") | |
1296 | local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[B]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 2") | |
1297 | local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 3") | |
1298 | local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 4") | |
1299 | local SKILL5TEXT = CreateLabel(SKILL5FRAME, "[E]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 5") | |
1300 | local SKILL6TEXT = CreateLabel(SKILL6FRAME, "[X]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 6") | |
1301 | ||
1302 | --//=================================\\ | |
1303 | --|| ATTACK FUNCTIONS AND STUFF | |
1304 | --\\=================================// | |
1305 | ||
1306 | function Warp() | |
1307 | local HITFLOOR,HITPOS = Raycast(Mouse.Hit.p+VT(0,1,0), (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 100, Character) | |
1308 | if HITFLOOR then | |
1309 | CharacterFade(C3(0.5,0,0),50) | |
1310 | HITPOS = HITPOS + VT(0,3.5,0) | |
1311 | local POS = RootPart.Position | |
1312 | RootPart.CFrame = CF(HITPOS,CF(POS,HITPOS)*CF(0,0,-100000).p) | |
1313 | CreateSound(289556450,Torso,2,MRANDOM(8,13)/10,false) | |
1314 | end | |
1315 | end | |
1316 | ||
1317 | function Dash() | |
1318 | ATTACK = true | |
1319 | Rooted = true | |
1320 | local SOUND = CreateSound(1165167610, Torso, 1, 1, true) | |
1321 | local LOOP = 0 | |
1322 | repeat | |
1323 | LOOP = LOOP + 1 | |
1324 | Swait() | |
1325 | local RAY,RAYPOS = Raycast(RootPart.Position, (CF(RootPart.Position, Mouse.Hit.p)).lookVector, 5, workspace) | |
1326 | local HITFLOOR,HITPOS,NORMAL = Raycast(RAYPOS+VT(0,1,0), (CF(RAYPOS, RAYPOS + VT(0, -1, 0))).lookVector, 100, Character) | |
1327 | if HITFLOOR then | |
1328 | CharacterFade(C3(0.5,0,0),35) | |
1329 | HITPOS = HITPOS + VT(0,3.5,0) | |
1330 | local POS = RootPart.Position | |
1331 | RootPart.CFrame = CF(HITPOS,CF(POS,HITPOS)*CF(0,0,-100000).p) | |
1332 | RootPart.Velocity = VT(0,0,0) | |
1333 | RootPart.RotVelocity = VT(0,0,0) | |
1334 | end | |
1335 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(75), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1336 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-45), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1337 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-15), RAD(0), RAD(15)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1338 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-15), RAD(0), RAD(-15)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1339 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(-15), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1340 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(-15), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1341 | until KEYHOLD == false | |
1342 | coroutine.resume(coroutine.create(function() | |
1343 | for i = 1, 20 do | |
1344 | Swait() | |
1345 | SOUND.Volume = SOUND.Volume - 1/20 | |
1346 | end | |
1347 | SOUND:remove() | |
1348 | end)) | |
1349 | if LOOP > 50 then | |
1350 | CreateSound(772085046,Torso,5,MRANDOM(8,13)/10,false) | |
1351 | for i = 1, 100 do | |
1352 | Swait() | |
1353 | RootPart.CFrame = RootPart.CFrame * CF(0,0,-(1-(i/100))/3) | |
1354 | WACKYEFFECT({Time = 25, EffectType = "Sphere", Size = VT(1,0.5,1), Size2 = VT(2,0,2), Transparency = 0.7, Transparency2 = 1, CFrame = CF(RightLeg.CFrame*CF(0,-1,0).p), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0.3,0.3,0.3), SoundID = nil, SoundPitch = nil, SoundVolume = nil}) | |
1355 | WACKYEFFECT({Time = 25, EffectType = "Sphere", Size = VT(1,0.5,1), Size2 = VT(2,0,2), Transparency = 0.7, Transparency2 = 1, CFrame = CF(LeftLeg.CFrame*CF(0,-1,0).p), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0.3,0.3,0.3), SoundID = nil, SoundPitch = nil, SoundVolume = nil}) | |
1356 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(-15), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1357 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(35), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1358 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-45), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1359 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-45), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1360 | 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) | |
1361 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1362 | end | |
1363 | end | |
1364 | ATTACK = false | |
1365 | Rooted = false | |
1366 | end | |
1367 | ||
1368 | function LimbRip() | |
1369 | ATTACK = true | |
1370 | Rooted = false | |
1371 | local TARGET = nil | |
1372 | local ROOT = nil | |
1373 | local HUMAN = nil | |
1374 | local DIST = 4 | |
1375 | Speed = 12 | |
1376 | for i=0, 1, 0.1 / Animation_Speed do | |
1377 | Swait() | |
1378 | local CHILDREN = workspace:GetDescendants() | |
1379 | for index, CHILD in pairs(CHILDREN) do | |
1380 | if CHILD.ClassName == "Model" and CHILD ~= Character then | |
1381 | local HUM = CHILD:FindFirstChildOfClass("Humanoid") | |
1382 | if HUM then | |
1383 | local TORSO = CHILD:FindFirstChild("HumanoidRootPart") or CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso") | |
1384 | if TORSO and HUM.Health > 0 then | |
1385 | if (TORSO.Position - RightArm.Position).Magnitude <= DIST then | |
1386 | DIST = (TORSO.Position - RightArm.Position).Magnitude | |
1387 | ROOT = TORSO | |
1388 | HUMAN = HUM | |
1389 | TARGET = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso") | |
1390 | end | |
1391 | end | |
1392 | end | |
1393 | end | |
1394 | end | |
1395 | if ROOT then | |
1396 | break | |
1397 | end | |
1398 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
1399 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(10), RAD(0), RAD(-25)), 1 / Animation_Speed) | |
1400 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.5, -0.4) * ANGLES(RAD(90), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1401 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-25), RAD(0), RAD(15)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1402 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1403 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1404 | end | |
1405 | Speed = 16 | |
1406 | if ROOT then | |
1407 | CreateSound(305685800,Torso,5,1.3,false) | |
1408 | Rooted = true | |
1409 | local GORED = false | |
1410 | coroutine.resume(coroutine.create(function() | |
1411 | repeat | |
1412 | Swait() | |
1413 | ROOT.Anchored = true | |
1414 | until GORED == true | |
1415 | ROOT.Anchored = false | |
1416 | end)) | |
1417 | RootPart.CFrame = ROOT.CFrame*CF(0,0,2.25) | |
1418 | if TARGET.Name == "Torso" then | |
1419 | local RARM = TARGET.Parent:FindFirstChild("Right Arm") | |
1420 | local LARM = TARGET.Parent:FindFirstChild("Left Arm") | |
1421 | if RARM and LARM then | |
1422 | for i=0, 1, 0.1 / Animation_Speed do | |
1423 | Swait() | |
1424 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1425 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1426 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.4) * ANGLES(RAD(90), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1427 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.4) * ANGLES(RAD(90), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1428 | 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) | |
1429 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1430 | end | |
1431 | for _, c in pairs(TARGET.Parent:GetDescendants()) do | |
1432 | if c:IsA("JointInstance") then | |
1433 | if c.Part1 == RARM or c.Part1 == LARM or c.Part0 == RARM or c.Part0 == LARM then | |
1434 | c:remove() | |
1435 | end | |
1436 | end | |
1437 | end | |
1438 | CreateSound(363808674, TARGET, 3, MRANDOM(7,9)/10, false) | |
1439 | CreateWeldOrSnapOrMotor("Weld", RightArm, RightArm, RARM, CF(0,-1.35,0) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0)) | |
1440 | CreateWeldOrSnapOrMotor("Weld", LeftArm, LeftArm, LARM, CF(0,-1.35,0) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0)) | |
1441 | for i=0, 1, 0.1 / Animation_Speed do | |
1442 | Swait() | |
1443 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1444 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1445 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.4) * ANGLES(RAD(160), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1446 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.4) * ANGLES(RAD(160), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1447 | 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) | |
1448 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1449 | end | |
1450 | for i=0, 1, 0.1 / Animation_Speed do | |
1451 | Swait() | |
1452 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0.25) * ANGLES(RAD(-25), RAD(0), RAD(80)), 1 / Animation_Speed) | |
1453 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-30)), 1 / Animation_Speed) | |
1454 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.4) * ANGLES(RAD(160), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1455 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.4) * ANGLES(RAD(160), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1456 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.6) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-65), RAD(0), RAD(0)) * CF(0,1.5,0), 1 / Animation_Speed) | |
1457 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-45), RAD(0)) * ANGLES(RAD(-35), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1458 | end | |
1459 | for i=0, 0.1, 0.1 / Animation_Speed do | |
1460 | Swait() | |
1461 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0.2, 0.25) * ANGLES(RAD(-35), RAD(0), RAD(80)), 1 / Animation_Speed) | |
1462 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-30)), 1 / Animation_Speed) | |
1463 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.4) * ANGLES(RAD(160), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1464 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.4) * ANGLES(RAD(160), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1465 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.6) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-65), RAD(0), RAD(0)) * CF(0,-0.3,0), 1 / Animation_Speed) | |
1466 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-45), RAD(0)) * ANGLES(RAD(-35), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1467 | end | |
1468 | GORED = true | |
1469 | Ragdoll(TARGET.Parent,Torso) | |
1470 | if ROOT.Name ~= "Torso" then | |
1471 | ROOT:remove() | |
1472 | end | |
1473 | local RGRAB = CreateWeldOrSnapOrMotor("Weld", RightArm, RightArm, RARM, CF(0,-1.35,0) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0)) | |
1474 | local LGRAB = CreateWeldOrSnapOrMotor("Weld", LeftArm, LeftArm, LARM, CF(0,-1.35,0) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0)) | |
1475 | local bv = Instance.new("BodyVelocity",TARGET) | |
1476 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
1477 | bv.velocity = TARGET.CFrame.lookVector*75 | |
1478 | Debris:AddItem(bv,0.05) | |
1479 | CreateSound(621557962, RightLeg, 1, MRANDOM(7,9)/10, false) | |
1480 | for i=0, 0.5, 0.1 / Animation_Speed do | |
1481 | Swait() | |
1482 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0.2, 0.25) * ANGLES(RAD(-35), RAD(0), RAD(80)), 1 / Animation_Speed) | |
1483 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-30)), 1 / Animation_Speed) | |
1484 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.4) * ANGLES(RAD(160), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1485 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.4) * ANGLES(RAD(160), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1486 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.6) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-65), RAD(0), RAD(0)) * CF(0,-0.3,0), 1 / Animation_Speed) | |
1487 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-45), RAD(0)) * ANGLES(RAD(-35), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1488 | end | |
1489 | for i=0, 1, 0.1 / Animation_Speed do | |
1490 | Swait() | |
1491 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1492 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1493 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.4) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.6 / Animation_Speed) | |
1494 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.4) * ANGLES(RAD(0), RAD(0), RAD(-90)) * LEFTSHOULDERC0, 0.6 / Animation_Speed) | |
1495 | 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) | |
1496 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1497 | end | |
1498 | local HITBOX = CreatePart(3, RARM, "Metal", 0, 1, "Really black", "Part", RARM.Size, false) | |
1499 | HITBOX.CFrame = RARM.CFrame | |
1500 | HITBOX.CanCollide = true | |
1501 | weldBetween(RARM,HITBOX) | |
1502 | local HITBOX = CreatePart(3, LARM, "Metal", 0, 1, "Really black", "Part", RARM.Size, false) | |
1503 | HITBOX.CFrame = LARM.CFrame | |
1504 | HITBOX.CanCollide = true | |
1505 | weldBetween(LARM,HITBOX) | |
1506 | RGRAB:remove() | |
1507 | LGRAB:remove() | |
1508 | for i=0, 0.4, 0.1 / Animation_Speed do | |
1509 | Swait() | |
1510 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1511 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1512 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.4) * ANGLES(RAD(0), RAD(0), RAD(110)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1513 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.4) * ANGLES(RAD(0), RAD(0), RAD(-110)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1514 | 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) | |
1515 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1516 | end | |
1517 | end | |
1518 | elseif TARGET.Name == "UpperTorso" then | |
1519 | if TARGET.Parent:FindFirstChild("RightUpperArm") and TARGET.Parent:FindFirstChild("LeftUpperArm") then | |
1520 | for i=0, 0.3, 0.1 / Animation_Speed do | |
1521 | Swait() | |
1522 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
1523 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 1 / Animation_Speed) | |
1524 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.45, 0.5, -0.5) * ANGLES(RAD(140), RAD(0), RAD(45)) * ANGLES(RAD(0), RAD(25), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1525 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1526 | 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) | |
1527 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1528 | end | |
1529 | local SAWBLADE = CreatePart(3, Weapon, "Neon", 0, 0.5, "Really red", "Part", VT(0,0,0),false) | |
1530 | local WELD = CreateWeldOrSnapOrMotor("Weld", RightArm, RightArm, SAWBLADE, CF(0,-1,0) * ANGLES(RAD(0), RAD(90), RAD(0)), CF(0, 0, 0)) | |
1531 | local BLADE = true | |
1532 | CreateMesh("SpecialMesh", SAWBLADE, "FileMesh", "74322089", "", VT(1,1,1), VT(0,0,0)) | |
1533 | coroutine.resume(coroutine.create(function() | |
1534 | repeat | |
1535 | Swait() | |
1536 | WELD.C1 = WELD.C1 * ANGLES(RAD(0), RAD(0), RAD(25)) | |
1537 | until BLADE == false | |
1538 | SAWBLADE:remove() | |
1539 | end)) | |
1540 | CreateSound(1165167936, SAWBLADE, 2, 1, true) | |
1541 | for i=0, 1, 0.1 / Animation_Speed do | |
1542 | Swait() | |
1543 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
1544 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 1 / Animation_Speed) | |
1545 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.45, 0.5, -0.5) * ANGLES(RAD(140), RAD(0), RAD(45)) * ANGLES(RAD(0), RAD(25), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1546 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1547 | 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) | |
1548 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1549 | end | |
1550 | for i=0, 3, 0.1 / Animation_Speed do | |
1551 | Swait() | |
1552 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
1553 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 1 / Animation_Speed) | |
1554 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.45, 0.5, -0.5) * ANGLES(RAD(15), RAD(0), RAD(45)) * ANGLES(RAD(0), RAD(-25), RAD(0)) * RIGHTSHOULDERC0, 0.1 / Animation_Speed) | |
1555 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1556 | 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) | |
1557 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1558 | end | |
1559 | CreateSound(363808674, TARGET, 3, MRANDOM(7,9)/10, false) | |
1560 | TARGET.Parent:FindFirstChild("RightUpperArm").RightShoulder:remove() | |
1561 | for i=0, 1, 0.1 / Animation_Speed do | |
1562 | Swait() | |
1563 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(1, 0, 0.3) * ANGLES(RAD(0), RAD(0), RAD(90)), 1 / Animation_Speed) | |
1564 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-80)), 1 / Animation_Speed) | |
1565 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.45, 0.5, 0) * ANGLES(RAD(140), RAD(0), RAD(90)) * ANGLES(RAD(0), RAD(45), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1566 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1567 | 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) | |
1568 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1569 | end | |
1570 | for i=0, 3, 0.1 / Animation_Speed do | |
1571 | Swait() | |
1572 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(1, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(90)), 1 / Animation_Speed) | |
1573 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-80)), 1 / Animation_Speed) | |
1574 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(15)) * ANGLES(RAD(0), RAD(-45), RAD(0)) * RIGHTSHOULDERC0, 0.1 / Animation_Speed) | |
1575 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1576 | 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) | |
1577 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1578 | end | |
1579 | CreateSound(363808674, TARGET, 3, MRANDOM(7,9)/10, false) | |
1580 | TARGET.Parent:FindFirstChild("LeftUpperArm").LeftShoulder:remove() | |
1581 | BLADE = false | |
1582 | for i=0, 0.5, 0.1 / Animation_Speed do | |
1583 | Swait() | |
1584 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0.25) * ANGLES(RAD(-25), RAD(0), RAD(80)), 1 / Animation_Speed) | |
1585 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-30)), 1 / Animation_Speed) | |
1586 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(45), RAD(0)) * ANGLES(RAD(-25), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1587 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-15), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1588 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.6) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-65), RAD(0), RAD(0)) * CF(0,1.5,0), 1 / Animation_Speed) | |
1589 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-45), RAD(0)) * ANGLES(RAD(-35), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1590 | end | |
1591 | for i=0, 0.1, 0.1 / Animation_Speed do | |
1592 | Swait() | |
1593 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0.2, 0.25) * ANGLES(RAD(-35), RAD(0), RAD(80)), 1 / Animation_Speed) | |
1594 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-30)), 1 / Animation_Speed) | |
1595 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(45), RAD(0)) * ANGLES(RAD(-32), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1596 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-20), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1597 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.6) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-65), RAD(0), RAD(0)) * CF(0,-0.3,0), 1 / Animation_Speed) | |
1598 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-45), RAD(0)) * ANGLES(RAD(-35), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1599 | end | |
1600 | GORED = true | |
1601 | TARGET.Parent:BreakJoints() | |
1602 | R15Ragdoll(TARGET.Parent) | |
1603 | if ROOT.Name ~= "Torso" then | |
1604 | ROOT:remove() | |
1605 | end | |
1606 | local bv = Instance.new("BodyVelocity",TARGET) | |
1607 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
1608 | bv.velocity = TARGET.CFrame.lookVector*75 | |
1609 | Debris:AddItem(bv,0.05) | |
1610 | CreateSound(621557962, RightLeg, 1, MRANDOM(7,9)/10, false) | |
1611 | for i=0, 0.3, 0.1 / Animation_Speed do | |
1612 | Swait() | |
1613 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0.2, 0.25) * ANGLES(RAD(-35), RAD(0), RAD(80)), 1 / Animation_Speed) | |
1614 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-30)), 1 / Animation_Speed) | |
1615 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(45), RAD(0)) * ANGLES(RAD(-32), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1616 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-20), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1617 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.6) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-65), RAD(0), RAD(0)) * CF(0,-0.3,0), 1 / Animation_Speed) | |
1618 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-45), RAD(0)) * ANGLES(RAD(-35), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1619 | end | |
1620 | end | |
1621 | end | |
1622 | end | |
1623 | ATTACK = false | |
1624 | Rooted = false | |
1625 | end | |
1626 | ||
1627 | function Buzzsaw() | |
1628 | ATTACK = true | |
1629 | Rooted = false | |
1630 | local ARMSPEED = 0.1 | |
1631 | local TARGET = nil | |
1632 | local ROOT = nil | |
1633 | local HUMAN = nil | |
1634 | local DIST = 4 | |
1635 | local SAWBLADE = CreatePart(3, Weapon, "Neon", 0, 0.5, "Really red", "Part", VT(0,0,0),false) | |
1636 | local WELD = CreateWeldOrSnapOrMotor("Weld", RightArm, RightArm, SAWBLADE, CF(0,-1,0) * ANGLES(RAD(0), RAD(90), RAD(0)), CF(0, 0, 0)) | |
1637 | local BLADE = true | |
1638 | CreateMesh("SpecialMesh", SAWBLADE, "FileMesh", "74322089", "", VT(2,2,1), VT(0,0,0)) | |
1639 | coroutine.resume(coroutine.create(function() | |
1640 | repeat | |
1641 | Swait() | |
1642 | WELD.C1 = WELD.C1 * ANGLES(RAD(0), RAD(0), RAD(25)) | |
1643 | until BLADE == false | |
1644 | SAWBLADE:remove() | |
1645 | end)) | |
1646 | CreateSound(1165167936, SAWBLADE, 2, 1, true) | |
1647 | for i=0, 1, 0.1 / Animation_Speed do | |
1648 | Swait() | |
1649 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
1650 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 1 / Animation_Speed) | |
1651 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.55, 0.5, -0.5) * ANGLES(RAD(175), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1652 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1653 | 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) | |
1654 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1655 | end | |
1656 | for i=0, 2, 0.1 / Animation_Speed do | |
1657 | Swait() | |
1658 | local CHILDREN = workspace:GetDescendants() | |
1659 | for index, CHILD in pairs(CHILDREN) do | |
1660 | if CHILD.ClassName == "Model" and CHILD ~= Character then | |
1661 | local HUM = CHILD:FindFirstChildOfClass("Humanoid") | |
1662 | if HUM then | |
1663 | local TORSO = CHILD:FindFirstChild("HumanoidRootPart") or CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso") | |
1664 | if TORSO and HUM.Health > 0 then | |
1665 | if (TORSO.Position - RightArm.Position).Magnitude <= DIST then | |
1666 | DIST = (TORSO.Position - RightArm.Position).Magnitude | |
1667 | ROOT = TORSO | |
1668 | HUMAN = HUM | |
1669 | TARGET = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso") | |
1670 | end | |
1671 | end | |
1672 | end | |
1673 | end | |
1674 | end | |
1675 | if ROOT then | |
1676 | break | |
1677 | end | |
1678 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
1679 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 1 / Animation_Speed) | |
1680 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.55, 0.5, -0.5) * ANGLES(RAD(15), RAD(0), RAD(45)) * ANGLES(RAD(0), RAD(-45), RAD(0)) * RIGHTSHOULDERC0, ARMSPEED / Animation_Speed) | |
1681 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1682 | 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) | |
1683 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1684 | end | |
1685 | if ROOT then | |
1686 | ARMSPEED = 0.03 | |
1687 | Rooted = true | |
1688 | RootPart.CFrame = ROOT.CFrame*CF(0,0,2.5) | |
1689 | repeat | |
1690 | HUMAN.Health = HUMAN.Health - 0.5 | |
1691 | Swait() | |
1692 | ROOT.Anchored = true | |
1693 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(1, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
1694 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 1 / Animation_Speed) | |
1695 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0, 0) * ANGLES(RAD(15), RAD(0), RAD(45)) * ANGLES(RAD(0), RAD(-45), RAD(0)) * RIGHTSHOULDERC0, ARMSPEED / Animation_Speed) | |
1696 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1697 | 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) | |
1698 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1699 | until RightArm.Position.Y < Torso.Position.Y-0.15 or HUMAN.Health == 0 | |
1700 | ROOT.Anchored = false | |
1701 | if HUMAN.Health == 0 then | |
1702 | if ROOT.Name ~= "Torso" then | |
1703 | ROOT:remove() | |
1704 | end | |
1705 | if TARGET.Name == "Torso" then | |
1706 | Ragdoll(HUMAN.Parent,Torso,true) | |
1707 | elseif TARGET.Name == "UpperTorso" then | |
1708 | R15Ragdoll(HUMAN.Parent,true) | |
1709 | end | |
1710 | end | |
1711 | end | |
1712 | BLADE = false | |
1713 | ATTACK = false | |
1714 | Rooted = false | |
1715 | end | |
1716 | ||
1717 | function ReeeEEEEEE() | |
1718 | ATTACK = true | |
1719 | Rooted = false | |
1720 | Speed = 12 | |
1721 | local FX = CreateSound(198165368, Head, 4, 0.5, false) | |
1722 | repeat | |
1723 | Swait() | |
1724 | FX.Parent = Head | |
1725 | local CHILDREN = workspace:GetDescendants() | |
1726 | for index, CHILD in pairs(CHILDREN) do | |
1727 | if CHILD.ClassName == "Model" and CHILD ~= Character then | |
1728 | local HUM = CHILD:FindFirstChildOfClass("Humanoid") | |
1729 | if HUM then | |
1730 | local TORSO = CHILD:FindFirstChild("Head") | |
1731 | if TORSO then | |
1732 | if (TORSO.Position - Head.Position).Magnitude <= 25 then | |
1733 | WACKYEFFECT({Time = 45, EffectType = "Sphere", Size = VT(1,1,1), Size2 = VT(5,5,5), Transparency = 0, Transparency2 = 1, CFrame = CF(TORSO.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = nil, SoundVolume = nil}) | |
1734 | TORSO:remove() | |
1735 | if CHILD:FindFirstChild("Torso") then | |
1736 | Ragdoll(CHILD,Torso,true) | |
1737 | elseif CHILD:FindFirstChild("UpperTorso") then | |
1738 | R15Ragdoll(CHILD,true) | |
1739 | end | |
1740 | end | |
1741 | end | |
1742 | end | |
1743 | end | |
1744 | end | |
1745 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0.5, 0) * ANGLES(RAD(-45), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1746 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-45), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1747 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-35), RAD(0), RAD(15)) * ANGLES(RAD(0), RAD(15), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1748 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-35), RAD(0), RAD(-15)) * ANGLES(RAD(0), RAD(-15), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1749 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(-45), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1750 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(-45), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1751 | until FX.Playing == false | |
1752 | Speed = 16 | |
1753 | ATTACK = false | |
1754 | Rooted = false | |
1755 | end | |
1756 | ||
1757 | function Needle() | |
1758 | ATTACK = true | |
1759 | Rooted = true | |
1760 | local GYRO = IT("BodyGyro",RootPart) | |
1761 | GYRO.D = 2 | |
1762 | GYRO.P = 2000 | |
1763 | GYRO.MaxTorque = VT(0,4000000,0) | |
1764 | local NEEDGYRO = true | |
1765 | coroutine.resume(coroutine.create(function() | |
1766 | repeat | |
1767 | Swait() | |
1768 | GYRO.CFrame = CF(RootPart.Position,Mouse.Hit.p) | |
1769 | until NEEDGYRO == false | |
1770 | GYRO:Remove() | |
1771 | end)) | |
1772 | for i=0, 0.3, 0.1 / Animation_Speed do | |
1773 | Swait() | |
1774 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -1) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
1775 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 1 / Animation_Speed) | |
1776 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5, -0.5) * ANGLES(RAD(90), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1777 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1, 0.5, -0.5) * ANGLES(RAD(25), RAD(0), RAD(80)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1778 | RightHip.C0 = Clerp(RightHip.C0, CF(1, 0, -1) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1779 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1.5, 0) * ANGLES(RAD(-90), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1780 | end | |
1781 | for i=0, 1, 0.1 / Animation_Speed do | |
1782 | Swait() | |
1783 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -1) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
1784 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(15), RAD(-45)), 1 / Animation_Speed) | |
1785 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.15, 0.5, -0.5) * ANGLES(RAD(90), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1786 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1, 0.5, -0.5) * ANGLES(RAD(25), RAD(0), RAD(80)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1787 | RightHip.C0 = Clerp(RightHip.C0, CF(1, 0, -1) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1788 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1.5, 0) * ANGLES(RAD(-90), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1789 | end | |
1790 | local HIT,POS = CastProperRay(RightArm.CFrame*CF(0,-1,0).p,Mouse.Hit.p,300,Character) | |
1791 | WACKYEFFECT({Time = 45, EffectType = "Wave", Size = VT(1,0,1), Size2 = VT(5,1,5), Transparency = 0, Transparency2 = 1, CFrame = RightArm.CFrame*CF(0,-1,0) * ANGLES(RAD(180), RAD(0), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = 90655239, SoundPitch = 1, SoundVolume = 2}) | |
1792 | NEEDGYRO = false | |
1793 | if HIT then | |
1794 | local NEEDLE = IT("Model",Effects) | |
1795 | local BASE = CreatePart(3, NEEDLE, "Glass", 0, 0.5, "Pearl", "Part", VT(0.3,0.6,0.3), false) | |
1796 | MakeForm(BASE,"Cyl") | |
1797 | BASE.CFrame = CF(POS,RightArm.CFrame*CF(0,-1,0).p) * ANGLES(RAD(90), RAD(0), RAD(0))*CF(0,-0.35,0) | |
1798 | weldBetween(BASE,HIT) | |
1799 | local FLUID = CreatePart(3, NEEDLE, "Neon", 0, 0, "Lime green", "Part", VT(0.28,0.58,0.28), false) | |
1800 | MakeForm(FLUID,"Cyl") | |
1801 | FLUID.CFrame = BASE.CFrame | |
1802 | weldBetween(BASE,FLUID) | |
1803 | local PART = CreatePart(3, NEEDLE, "Metal", 0, 0, "Pearl", "Part", VT(0,0.2,0), false) | |
1804 | PART.CFrame = BASE.CFrame*CF(0,0.4,0) | |
1805 | weldBetween(BASE,PART) | |
1806 | local PART = CreatePart(3, NEEDLE, "Metal", 0, 0, "Pearl", "Part", VT(0.1,0.1,0.1), false) | |
1807 | PART.CFrame = BASE.CFrame*CF(0,-0.35,0) | |
1808 | weldBetween(BASE,PART) | |
1809 | local PART = CreatePart(3, NEEDLE, "Metal", 0, 0, "Pearl", "Part", VT(0.2,0.1,0.2), false) | |
1810 | PART.CFrame = BASE.CFrame*CF(0,-0.4,0) | |
1811 | weldBetween(BASE,PART) | |
1812 | Debris:AddItem(NEEDLE,7) | |
1813 | if HIT.Parent:FindFirstChildOfClass("Humanoid") then | |
1814 | local HUMAN = HIT.Parent:FindFirstChildOfClass("Humanoid") | |
1815 | coroutine.resume(coroutine.create(function() | |
1816 | for i = 1, 500 do | |
1817 | HUMAN.Health = HUMAN.Health - MRANDOM(1,6)/5 | |
1818 | if HUMAN.Health == 0 then | |
1819 | break | |
1820 | end | |
1821 | Swait(2) | |
1822 | end | |
1823 | if HUMAN.Health == 0 then | |
1824 | local CHILD = HUMAN.Parent | |
1825 | if CHILD:FindFirstChild("Torso") then | |
1826 | CHILD:FindFirstChild("Torso").CFrame = CHILD:FindFirstChild("Torso").CFrame * ANGLES(RAD(2), RAD(0), RAD(0)) | |
1827 | Ragdoll(CHILD,Torso,true) | |
1828 | elseif CHILD:FindFirstChild("UpperTorso") then | |
1829 | R15Ragdoll(CHILD,true) | |
1830 | end | |
1831 | end | |
1832 | end)) | |
1833 | end | |
1834 | end | |
1835 | for i=0, 1, 0.1 / Animation_Speed do | |
1836 | Swait() | |
1837 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -1) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
1838 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(15), RAD(-45)), 1 / Animation_Speed) | |
1839 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.1, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1840 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1, 0.5, -0.5) * ANGLES(RAD(25), RAD(0), RAD(80)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1841 | RightHip.C0 = Clerp(RightHip.C0, CF(1, 0, -1) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1842 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1.5, 0) * ANGLES(RAD(-90), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1843 | end | |
1844 | ATTACK = false | |
1845 | Rooted = false | |
1846 | end | |
1847 | ||
1848 | function ScrewThis() | |
1849 | ATTACK = true | |
1850 | Rooted = true | |
1851 | local SCREW = CreatePart(3, Weapon, "Neon", 0, 1, "Really red", "Part", VT(2, 0.4, 0.4)/2,false) | |
1852 | SCREW.CanCollide = true | |
1853 | local WELD = CreateWeldOrSnapOrMotor("Weld", LeftArm, LeftArm, SCREW, CF(0,-1,0.2) * ANGLES(RAD(0), RAD(90), RAD(0)), CF(0, 0, 0)) | |
1854 | CreateMesh("SpecialMesh", SCREW, "FileMesh", "70265804", "70265794", VT(1,1,1)/1.5, VT(0,0,0)) | |
1855 | for i=0, 0.4, 0.1 / Animation_Speed do | |
1856 | Swait() | |
1857 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1858 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(45)), 1 / Animation_Speed) | |
1859 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5, -0.5) * ANGLES(RAD(90), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1860 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-5), RAD(0), RAD(15)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1861 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1862 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1863 | end | |
1864 | SCREW.Transparency = 0 | |
1865 | for i=0, 0.1, 0.1 / Animation_Speed do | |
1866 | Swait() | |
1867 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1868 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-25)), 1 / Animation_Speed) | |
1869 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5, -0.5) * ANGLES(RAD(60), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1870 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1871 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1872 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1873 | end | |
1874 | for i=0, 1, 0.1 / Animation_Speed do | |
1875 | Swait() | |
1876 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1877 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-25)), 1 / Animation_Speed) | |
1878 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.15, -0.5) * ANGLES(RAD(40), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1879 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.7, 0.5, -0.3) * ANGLES(RAD(120), RAD(0), RAD(80)) * ANGLES(RAD(0), RAD(15), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1880 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1881 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1882 | end | |
1883 | for i = 1, 3 do | |
1884 | for i=0, 0.3, 0.1 / Animation_Speed do | |
1885 | Swait() | |
1886 | WELD.C1 = WELD.C1 * ANGLES(RAD(5), RAD(0), RAD(0)) | |
1887 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1888 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-25)), 1 / Animation_Speed) | |
1889 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.15, -0.5) * ANGLES(RAD(40), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1890 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.7, 0.5, -0.3) * ANGLES(RAD(120), RAD(0), RAD(78)) * ANGLES(RAD(0), RAD(15), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1891 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1892 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1893 | end | |
1894 | for i=0, 1, 0.1 / Animation_Speed do | |
1895 | Swait() | |
1896 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1897 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-25)), 1 / Animation_Speed) | |
1898 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.15, -0.5) * ANGLES(RAD(40), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1899 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.7, 0.5, -0.3) * ANGLES(RAD(120), RAD(0), RAD(80)) * ANGLES(RAD(0), RAD(15), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1900 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1901 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1902 | end | |
1903 | end | |
1904 | if MRANDOM(1, 5) == 1 then | |
1905 | DUST:Emit(25) | |
1906 | WELD:remove() | |
1907 | CreateSound(328460122, RightArm, 3, 1, false) | |
1908 | SCREW.Velocity = CF(RightArm.Position,SCREW.Position).lookVector*65 | |
1909 | Debris:AddItem(SCREW,6) | |
1910 | for i=0, 3, 0.1 / Animation_Speed do | |
1911 | Swait() | |
1912 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1913 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-25)), 1 / Animation_Speed) | |
1914 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.15, -0.5) * ANGLES(RAD(40), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1915 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.7, 0.5, -0.3) * ANGLES(RAD(120), RAD(0), RAD(80)) * ANGLES(RAD(0), RAD(15), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1916 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1917 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1918 | end | |
1919 | for i = 1, 3 do | |
1920 | for i=0, 0.35, 0.1 / Animation_Speed do | |
1921 | Swait() | |
1922 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1923 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(15)), 1 / Animation_Speed) | |
1924 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.15, -0.5) * ANGLES(RAD(40), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1925 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.7, 0.5, -0.3) * ANGLES(RAD(120), RAD(0), RAD(80)) * ANGLES(RAD(0), RAD(15), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1926 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1927 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1928 | end | |
1929 | for i=0, 0.35, 0.1 / Animation_Speed do | |
1930 | Swait() | |
1931 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1932 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-15)), 1 / Animation_Speed) | |
1933 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.15, -0.5) * ANGLES(RAD(40), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1934 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.7, 0.5, -0.3) * ANGLES(RAD(120), RAD(0), RAD(80)) * ANGLES(RAD(0), RAD(15), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1935 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1936 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1937 | end | |
1938 | end | |
1939 | else | |
1940 | for i=0, 0.5, 0.1 / Animation_Speed do | |
1941 | Swait() | |
1942 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1943 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(60)), 1 / Animation_Speed) | |
1944 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1945 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1946 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1947 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1948 | end | |
1949 | WELD:remove() | |
1950 | for i=0, 0.15, 0.1 / Animation_Speed do | |
1951 | Swait() | |
1952 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1953 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(60)), 1 / Animation_Speed) | |
1954 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1955 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-110)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1956 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1957 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1958 | end | |
1959 | Debris:AddItem(SCREW,6) | |
1960 | end | |
1961 | ATTACK = false | |
1962 | Rooted = false | |
1963 | end | |
1964 | ||
1965 | --//=================================\\ | |
1966 | --|| ASSIGN THINGS TO KEYS | |
1967 | --\\=================================// | |
1968 | ||
1969 | function MouseDown(Mouse) | |
1970 | if ATTACK == false then | |
1971 | end | |
1972 | end | |
1973 | ||
1974 | function MouseUp(Mouse) | |
1975 | HOLD = false | |
1976 | end | |
1977 | ||
1978 | function KeyDown(Key) | |
1979 | KEYHOLD = true | |
1980 | if Key == "z" and ATTACK == false then | |
1981 | Warp() | |
1982 | end | |
1983 | ||
1984 | if Key == "b" and ATTACK == false then | |
1985 | Dash() | |
1986 | end | |
1987 | ||
1988 | if Key == "c" and ATTACK == false then | |
1989 | LimbRip() | |
1990 | end | |
1991 | ||
1992 | if Key == "v" and ATTACK == false then | |
1993 | Buzzsaw() | |
1994 | end | |
1995 | ||
1996 | if Key == "e" and ATTACK == false then | |
1997 | ReeeEEEEEE() | |
1998 | end | |
1999 | ||
2000 | if Key == "x" and ATTACK == false then | |
2001 | Needle() | |
2002 | end | |
2003 | ||
2004 | if Key == "t" and ATTACK == false then | |
2005 | ScrewThis() | |
2006 | end | |
2007 | end | |
2008 | ||
2009 | function KeyUp(Key) | |
2010 | KEYHOLD = false | |
2011 | end | |
2012 | ||
2013 | Mouse.Button1Down:connect(function(NEWKEY) | |
2014 | MouseDown(NEWKEY) | |
2015 | end) | |
2016 | Mouse.Button1Up:connect(function(NEWKEY) | |
2017 | MouseUp(NEWKEY) | |
2018 | end) | |
2019 | Mouse.KeyDown:connect(function(NEWKEY) | |
2020 | KeyDown(NEWKEY) | |
2021 | end) | |
2022 | Mouse.KeyUp:connect(function(NEWKEY) | |
2023 | KeyUp(NEWKEY) | |
2024 | end) | |
2025 | ||
2026 | --//=================================\\ | |
2027 | --\\=================================// | |
2028 | ||
2029 | function AntiTimeStop() | |
2030 | for _, c in pairs(Character:GetChildren()) do | |
2031 | if c:IsA("BasePart") then | |
2032 | c.Anchored = false | |
2033 | end | |
2034 | end | |
2035 | for _, c in pairs(Weapon:GetChildren()) do | |
2036 | if c:IsA("BasePart") then | |
2037 | c.Anchored = false | |
2038 | end | |
2039 | end | |
2040 | end | |
2041 | ||
2042 | --//=================================\\ | |
2043 | --|| WRAP THE WHOLE SCRIPT UP | |
2044 | --\\=================================// | |
2045 | ||
2046 | Humanoid.Changed:connect(function(Jump) | |
2047 | if Jump == "Jump" and (Disable_Jump == true) then | |
2048 | Humanoid.Jump = false | |
2049 | end | |
2050 | end) | |
2051 | ||
2052 | local sick = IT("Sound") | |
2053 | ||
2054 | while true do | |
2055 | Swait() | |
2056 | script.Parent = WEAPONGUI | |
2057 | ANIMATE.Parent = nil | |
2058 | for _,v in next, Humanoid:GetPlayingAnimationTracks() do | |
2059 | v:Stop(); | |
2060 | end | |
2061 | SINE = SINE + CHANGE | |
2062 | local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude | |
2063 | local TORSOVERTICALVELOCITY = RootPart.Velocity.y | |
2064 | local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character) | |
2065 | local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16) | |
2066 | if ANIM == "Walk" and TORSOVELOCITY > 1 then | |
2067 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.15 * COS(SINE / (WALKSPEEDVALUE / 2))) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
2068 | Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
2069 | RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.125 * COS(SINE / WALKSPEEDVALUE) +0.2- 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(90 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
2070 | LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(90 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
2071 | elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then | |
2072 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
2073 | 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) | |
2074 | 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.2 / Animation_Speed) | |
2075 | 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.2 / Animation_Speed) | |
2076 | end | |
2077 | if HITFLOOR == nil then | |
2078 | ANIM = "Midair" | |
2079 | if ATTACK == false then | |
2080 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
2081 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 1 / Animation_Speed) | |
2082 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.75, 0) * ANGLES(RAD(-15), RAD(0), RAD(25)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
2083 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.75, 0) * ANGLES(RAD(-15), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
2084 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.2, -0.6) * ANGLES(RAD(15), RAD(70), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed) | |
2085 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.2, -0.6) * ANGLES(RAD(15), RAD(-70), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed) | |
2086 | end | |
2087 | elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then | |
2088 | ANIM = "Idle" | |
2089 | if ATTACK == false then | |
2090 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.1 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
2091 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
2092 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.35 * SIN(SINE / 12), 0) * ANGLES(RAD(0), RAD(0), RAD(10 - 15 * COS(SINE / 12))) * ANGLES(RAD(0), RAD(-15), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
2093 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.35 * SIN(SINE / 12), 0) * ANGLES(RAD(0), RAD(0), RAD(-10 + 15 * COS(SINE / 12))) * ANGLES(RAD(0), RAD(15), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
2094 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed) | |
2095 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed) | |
2096 | end | |
2097 | elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then | |
2098 | ANIM = "Walk" | |
2099 | if ATTACK == false then | |
2100 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(5), RAD(0), RAD(10 * COS(SINE / WALKSPEEDVALUE))), 0.5 / Animation_Speed) | |
2101 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5), RAD(0), RAD(-10 * COS(SINE / WALKSPEEDVALUE))), 0.5 / Animation_Speed) | |
2102 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0.5 * SIN(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(5)) * ANGLES(RAD(0), RAD(-15), RAD(0)) * RIGHTSHOULDERC0, 0.8 / Animation_Speed) | |
2103 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.5 * SIN(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(-60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-5)) * ANGLES(RAD(0), RAD(15), RAD(0)) * LEFTSHOULDERC0, 0.8 / Animation_Speed) | |
2104 | RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 2 / Animation_Speed) | |
2105 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(15)), 2 / Animation_Speed) | |
2106 | end | |
2107 | end | |
2108 | Humanoid.MaxHealth = "inf" | |
2109 | Humanoid.Health = "inf" | |
2110 | sick.SoundId = "rbxassetid://1696854181" | |
2111 | sick.Looped = true | |
2112 | sick.Pitch = 1 | |
2113 | sick.Volume = 2 | |
2114 | sick.Playing = true | |
2115 | sick.Parent = Effects | |
2116 | AntiTimeStop() | |
2117 | refit() | |
2118 | if Rooted == false then | |
2119 | Disable_Jump = false | |
2120 | Humanoid.WalkSpeed = Speed | |
2121 | elseif Rooted == true then | |
2122 | Disable_Jump = true | |
2123 | Humanoid.WalkSpeed = 0 | |
2124 | end | |
2125 | ---Humanoid.Name = "Killbot" | |
2126 | --end | |
2127 | end | |
2128 | ||
2129 | --//=================================\\ | |
2130 | --\\=================================// | |
2131 | ||
2132 | --//====================================================\\-- | |
2133 | --|| END OF SCRIPT | |
2134 | --\\====================================================//-- |