SHOW:
|
|
- or go back to the newest paste.
1 | - | Player = game.Players.LocalPlayer |
1 | + | Player = owner |
2 | Character = Player.Character | |
3 | local txt = Instance.new("BillboardGui", Character) | |
4 | txt.Adornee = Character.Head | |
5 | txt.Name = "_status" | |
6 | txt.Size = UDim2.new(2, 0, 1.2, 0) | |
7 | txt.StudsOffset = Vector3.new(-9, 8, 0) | |
8 | local text = Instance.new("TextLabel", txt) | |
9 | text.Size = UDim2.new(10, 0, 7, 0) | |
10 | text.FontSize = "Size24" | |
11 | text.TextScaled = true | |
12 | text.TextTransparency = 0 | |
13 | text.BackgroundTransparency = 1 | |
14 | text.TextTransparency = 0 | |
15 | text.TextStrokeTransparency = 0 | |
16 | text.Font = "Antique" | |
17 | text.TextStrokeColor3 = Color3.new(196, 40, 28) | |
18 | text.Text = "The Last God" | |
19 | script.Name = "Banisher Gun V3 / 1" | |
20 | --//====================================================\\-- | |
21 | - | --|| CREATED BY SHACKLUSTER |
21 | + | --|| CREATED BY NUTTANUN734 |
22 | --\\====================================================//-- | |
23 | ||
24 | script:ClearAllChildren() | |
25 | wait(0.2) | |
26 | ||
27 | Player = owner, | |
28 | PlayerGui = Player.PlayerGui | |
29 | Cam = workspace.CurrentCamera | |
30 | Backpack = Player.Backpack | |
31 | Character = Player.Character | |
32 | Humanoid = Character.Humanoid | |
33 | Mouse = Player:GetMouse() | |
34 | RootPart = Character["HumanoidRootPart"] | |
35 | Torso = Character["Torso"] | |
36 | Head = Character["Head"] | |
37 | RightArm = Character["Right Arm"] | |
38 | LeftArm = Character["Left Arm"] | |
39 | RightLeg = Character["Right Leg"] | |
40 | LeftLeg = Character["Left Leg"] | |
41 | RootJoint = RootPart["RootJoint"] | |
42 | Neck = Torso["Neck"] | |
43 | RightShoulder = Torso["Right Shoulder"] | |
44 | LeftShoulder = Torso["Left Shoulder"] | |
45 | RightHip = Torso["Right Hip"] | |
46 | LeftHip = Torso["Left Hip"] | |
47 | local TIME = 0 | |
48 | local sick = Instance.new("Sound",Torso) | |
49 | ||
50 | ||
51 | for i,v in pairs(Character:GetChildren()) do | |
52 | if v.ClassName == "Shirt" or v.ClassName == "Pants" or v.ClassName == "CharacterMesh" then | |
53 | v:Destroy() | |
54 | end | |
55 | end | |
56 | ||
57 | for i,v in pairs(Character:GetChildren()) do | |
58 | if v.ClassName == "Accessory" or v.ClassName == "Hat" then | |
59 | v:Destroy() | |
60 | end | |
61 | end | |
62 | ||
63 | local Shirt = Instance.new("Shirt",Character) | |
64 | local Pants = Instance.new("Pants",Character) | |
65 | Shirt.ShirtTemplate = "rbxassetid://1390096242" | |
66 | Pants.PantsTemplate = "rbxassetid://1756876037" | |
67 | ||
68 | IT = Instance.new | |
69 | CF = CFrame.new | |
70 | VT = Vector3.new | |
71 | RAD = math.rad | |
72 | C3 = Color3.new | |
73 | UD2 = UDim2.new | |
74 | BRICKC = BrickColor.new | |
75 | ANGLES = CFrame.Angles | |
76 | EULER = CFrame.fromEulerAnglesXYZ | |
77 | COS = math.cos | |
78 | ACOS = math.acos | |
79 | SIN = math.sin | |
80 | ASIN = math.asin | |
81 | ABS = math.abs | |
82 | MRANDOM = math.random | |
83 | FLOOR = math.floor | |
84 | ||
85 | Player = game:GetService("Players").LocalPlayer | |
86 | PlayerGui = Player.PlayerGui | |
87 | Cam = workspace.CurrentCamera | |
88 | Backpack = Player.Backpack | |
89 | Character = Player.Character | |
90 | Humanoid = Character.Humanoid | |
91 | RootPart = Character["HumanoidRootPart"] | |
92 | Torso = Character["Torso"] | |
93 | Head = Character["Head"] | |
94 | RightArm = Character["Right Arm"] | |
95 | LeftArm = Character["Left Arm"] | |
96 | RightLeg = Character["Right Leg"] | |
97 | LeftLeg = Character["Left Leg"] | |
98 | RootJoint = RootPart["RootJoint"] | |
99 | Neck = Torso["Neck"] | |
100 | RightShoulder = Torso["Right Shoulder"] | |
101 | LeftShoulder = Torso["Left Shoulder"] | |
102 | RightHip = Torso["Right Hip"] | |
103 | LeftHip = Torso["Left Hip"] | |
104 | warn("Anti-Death Loaded (edited by promlg112)") | |
105 | ||
106 | IT = Instance.new | |
107 | CF = CFrame.new | |
108 | VT = Vector3.new | |
109 | RAD = math.rad | |
110 | C3 = Color3.new | |
111 | UD2 = UDim2.new | |
112 | BRICKC = BrickColor.new | |
113 | ANGLES = CFrame.Angles | |
114 | EULER = CFrame.fromEulerAnglesXYZ | |
115 | COS = math.cos | |
116 | ACOS = math.acos | |
117 | SIN = math.sin | |
118 | ASIN = math.asin | |
119 | ABS = math.abs | |
120 | MRANDOM = math.random | |
121 | FLOOR = math.floor | |
122 | ||
123 | local Speed = 55 | |
124 | local Rooted = false | |
125 | local Effects = IT("Folder", Character) | |
126 | Effects.Name = "Effects" | |
127 | local UNANCHOR = true | |
128 | local HITPOS = nil | |
129 | local HITFLOOR = nil | |
130 | local LEFTWINGS = {} | |
131 | local RIGHTWINGS = {} | |
132 | local BODY = {} | |
133 | ||
134 | for _, c in pairs(Character:GetChildren()) do | |
135 | if c.ClassName == "Part" then | |
136 | table.insert(BODY,{c,Character}) | |
137 | for _, q in pairs(c:GetChildren()) do | |
138 | if q.ClassName == "Motor6D" or q.ClassName == "Weld" or q.ClassName == "ManualWeld" then | |
139 | table.insert(BODY,{q,c}) | |
140 | end | |
141 | end | |
142 | end | |
143 | end | |
144 | ||
145 | function refit() | |
146 | Character.Parent = workspace | |
147 | for e = 1, #BODY do | |
148 | if BODY[e] ~= nil then | |
149 | local STUFF = BODY[e] | |
150 | local PART = STUFF[1] | |
151 | local PARENT = STUFF[2] | |
152 | PART.Parent = PARENT | |
153 | end | |
154 | end | |
155 | end | |
156 | ||
157 | Humanoid.HealthChanged:connect(function() | |
158 | Humanoid.Parent = nil | |
159 | Humanoid.MaxHealth = "inf" | |
160 | Humanoid.Health = "inf" | |
161 | refit() | |
162 | Humanoid.Parent = Character | |
163 | end) | |
164 | ||
165 | Humanoid.Died:connect(function() | |
166 | Humanoid.Parent = nil | |
167 | Humanoid.MaxHealth = "inf" | |
168 | Humanoid.Health = "inf" | |
169 | refit() | |
170 | Humanoid.Parent = Character | |
171 | end) | |
172 | --//=================================\\ | |
173 | --|| CUSTOMIZATION | |
174 | --\\=================================// | |
175 | ||
176 | Player_Size = 1 --Size of the player. | |
177 | Animation_Speed = 3 | |
178 | Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60) | |
179 | ||
180 | local Speed = 16 | |
181 | local Effects2 = {} | |
182 | ||
183 | --//=================================\\ | |
184 | --|| END OF CUSTOMIZATION | |
185 | --\\=================================// | |
186 | ||
187 | local function weldBetween(a, b) | |
188 | local weldd = Instance.new("ManualWeld") | |
189 | weldd.Part0 = a | |
190 | weldd.Part1 = b | |
191 | weldd.C0 = CFrame.new() | |
192 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
193 | weldd.Parent = a | |
194 | return weldd | |
195 | end | |
196 | --//=================================\\ | |
197 | --|| PARTICLES N STUFF | |
198 | --\\=================================// | |
199 | ||
200 | local particleemitter = Instance.new('ParticleEmitter', LeftArm) | |
201 | particleemitter.VelocitySpread = 350 | |
202 | particleemitter.Lifetime = NumberRange.new(1) | |
203 | particleemitter.Speed = NumberRange.new(0) | |
204 | cringememe= {} | |
205 | for i=0, 19 do | |
206 | cringememe[#cringememe + 1] = NumberSequenceKeypoint.new(i/19, math.random(1, 1)) | |
207 | end | |
208 | particleemitter.Size = NumberSequence.new(cringememe) | |
209 | particleemitter.Rate = 20 | |
210 | particleemitter.LockedToPart = true | |
211 | particleemitter.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.8, 0), NumberSequenceKeypoint.new(1, 1)}) | |
212 | particleemitter.LightEmission = 1 | |
213 | particleemitter.Texture = "rbxassetid://38727848" | |
214 | particleemitter.Color = ColorSequence.new(BrickColor.new("Really red").Color) | |
215 | ||
216 | local particleemitter = Instance.new('ParticleEmitter', Torso) | |
217 | particleemitter.VelocitySpread = 250 | |
218 | particleemitter.Lifetime = NumberRange.new(3) | |
219 | particleemitter.Speed = NumberRange.new(1.5) | |
220 | youAreATHOT = {} | |
221 | for i=0, 19 do | |
222 | youAreATHOT[#youAreATHOT + 1] = NumberSequenceKeypoint.new(i/19, math.random(1, 1)) | |
223 | end | |
224 | particleemitter.Size = NumberSequence.new(youAreATHOT) | |
225 | particleemitter.Rate = 10 | |
226 | particleemitter.LockedToPart = false | |
227 | particleemitter.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.8, 0), NumberSequenceKeypoint.new(1, 1)}) | |
228 | particleemitter.LightEmission = 1 | |
229 | particleemitter.Texture = "rbxassetid://253188763" | |
230 | particleemitter.Color = ColorSequence.new(BrickColor.new("Really red").Color) | |
231 | ||
232 | local particleemitter = Instance.new('ParticleEmitter', RightArm) | |
233 | particleemitter.VelocitySpread = 350 | |
234 | particleemitter.Lifetime = NumberRange.new(1) | |
235 | particleemitter.Speed = NumberRange.new(0) | |
236 | cringememe2= {} | |
237 | for i=0, 19 do | |
238 | cringememe2[#cringememe2 + 1] = NumberSequenceKeypoint.new(i/19, math.random(1, 1)) | |
239 | end | |
240 | particleemitter.Size = NumberSequence.new(cringememe2) | |
241 | particleemitter.Rate = 20 | |
242 | particleemitter.LockedToPart = true | |
243 | particleemitter.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.8, 0), NumberSequenceKeypoint.new(1, 1)}) | |
244 | particleemitter.LightEmission = 1 | |
245 | particleemitter.Texture = "rbxassetid://38727848" | |
246 | particleemitter.Color = ColorSequence.new(BrickColor.new("Really red").Color) | |
247 | ||
248 | local particleemitter = Instance.new('ParticleEmitter', RightLeg) | |
249 | particleemitter.VelocitySpread = 350 | |
250 | particleemitter.Lifetime = NumberRange.new(1) | |
251 | particleemitter.Speed = NumberRange.new(0) | |
252 | cringememe3= {} | |
253 | for i=0, 19 do | |
254 | cringememe3[#cringememe3 + 1] = NumberSequenceKeypoint.new(i/19, math.random(1, 1)) | |
255 | end | |
256 | particleemitter.Size = NumberSequence.new(cringememe3) | |
257 | particleemitter.Rate = 30 | |
258 | particleemitter.LockedToPart = true | |
259 | particleemitter.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.8, 0), NumberSequenceKeypoint.new(1, 1)}) | |
260 | particleemitter.LightEmission = 1 | |
261 | particleemitter.Texture = "rbxassetid://38727848" | |
262 | particleemitter.Color = ColorSequence.new(BrickColor.new("Really red").Color) | |
263 | ||
264 | local particleemitter = Instance.new('ParticleEmitter', LeftLeg) | |
265 | particleemitter.VelocitySpread = 350 | |
266 | particleemitter.Lifetime = NumberRange.new(1) | |
267 | particleemitter.Speed = NumberRange.new(0) | |
268 | cringememe4= {} | |
269 | for i=0, 19 do | |
270 | cringememe4[#cringememe4 + 1] = NumberSequenceKeypoint.new(i/19, math.random(1, 1)) | |
271 | end | |
272 | particleemitter.Size = NumberSequence.new(cringememe4) | |
273 | particleemitter.Rate = 30 | |
274 | particleemitter.LockedToPart = true | |
275 | particleemitter.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.8, 0), NumberSequenceKeypoint.new(1, 1)}) | |
276 | particleemitter.LightEmission = 1 | |
277 | particleemitter.Texture = "rbxassetid://38727848" | |
278 | particleemitter.Color = ColorSequence.new(BrickColor.new("Really red").Color) | |
279 | --//=================================\\ | |
280 | --|| USEFUL VALUES | |
281 | --\\=================================// | |
282 | ||
283 | Animation_Speed = 3 | |
284 | Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60) | |
285 | local Speed = 35 | |
286 | local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
287 | local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
288 | local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) | |
289 | local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) | |
290 | local DAMAGEMULTIPLIER = 1 | |
291 | local ANIM = "Idle" | |
292 | local ATTACK = false | |
293 | local EQUIPPED = false | |
294 | local HOLD = false | |
295 | local COMBO = 1 | |
296 | local Rooted = false | |
297 | local SINE = 0 | |
298 | local KEYHOLD = false | |
299 | local CHANGE = 2 / Animation_Speed | |
300 | local WALKINGANIM = false | |
301 | local VALUE1 = false | |
302 | local VALUE2 = false | |
303 | local ROBLOXIDLEANIMATION = IT("Animation") | |
304 | ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation" | |
305 | ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571" | |
306 | --ROBLOXIDLEANIMATION.Parent = Humanoid | |
307 | local WEAPONGUI = IT("ScreenGui", PlayerGui) | |
308 | WEAPONGUI.Name = "Weapon GUI" | |
309 | local Effects = IT("Folder", Character) | |
310 | Effects.Name = "Effects" | |
311 | local ANIMATOR = Humanoid.Animator | |
312 | local ANIMATE = Character.Animate | |
313 | local UNANCHOR = true | |
314 | local LAUGHS = {834001699,834001752,834001797,834001828} | |
315 | ||
316 | Animation_Speed = 3 | |
317 | local FORCERESET = false | |
318 | Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60) | |
319 | local Speed = 16 | |
320 | local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
321 | local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
322 | local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) | |
323 | local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) | |
324 | local DAMAGEMULTIPLIER = 1 | |
325 | local ANIM = "Idle" | |
326 | local ATTACK = false | |
327 | local EQUIPPED = false | |
328 | local HOLD = true | |
329 | local COMBO = 3 | |
330 | local Rooted = false | |
331 | local SINE = 5 | |
332 | local KEYHOLD = false | |
333 | local CHANGE = 2 / Animation_Speed | |
334 | local WALKINGANIM = false | |
335 | local VALUE1 = false | |
336 | local VALUE2 = false | |
337 | local ROBLOXIDLEANIMATION = IT("Animation") | |
338 | ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation" | |
339 | ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571" | |
340 | --ROBLOXIDLEANIMATION.Parent = Humanoid | |
341 | local WEAPONGUI = IT("ScreenGui", PlayerGui) | |
342 | WEAPONGUI.Name = "BanishV4Gui" | |
343 | local Weapon = IT("Model") | |
344 | Weapon.Name = "Adds" | |
345 | local Effects = IT("Folder", Weapon) | |
346 | Effects.Name = "Effects" | |
347 | local ANIMATOR = Humanoid.Animator | |
348 | local ANIMATE = Character:FindFirstChild("Animate") | |
349 | local UNANCHOR = true | |
350 | local TOBANISH = {} | |
351 | script.Parent = PlayerGui | |
352 | ||
353 | --//=================================\\ | |
354 | --\\=================================// | |
355 | ||
356 | ||
357 | --//=================================\\ | |
358 | --|| SAZERENOS' ARTIFICIAL HEARTBEAT | |
359 | --\\=================================// | |
360 | ||
361 | ArtificialHB = Instance.new("BindableEvent", script) | |
362 | ArtificialHB.Name = "ArtificialHB" | |
363 | ||
364 | script:WaitForChild("ArtificialHB") | |
365 | ||
366 | frame = Frame_Speed | |
367 | tf = 0 | |
368 | allowframeloss = false | |
369 | tossremainder = false | |
370 | lastframe = tick() | |
371 | script.ArtificialHB:Fire() | |
372 | ||
373 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
374 | tf = tf + s | |
375 | if tf >= frame then | |
376 | if allowframeloss then | |
377 | script.ArtificialHB:Fire() | |
378 | lastframe = tick() | |
379 | else | |
380 | for i = 1, math.floor(tf / frame) do | |
381 | script.ArtificialHB:Fire() | |
382 | end | |
383 | lastframe = tick() | |
384 | end | |
385 | if tossremainder then | |
386 | tf = 0 | |
387 | else | |
388 | tf = tf - frame * math.floor(tf / frame) | |
389 | end | |
390 | end | |
391 | end) | |
392 | ||
393 | --//=================================\\ | |
394 | --\\=================================// | |
395 | ||
396 | --//=================================\\ | |
397 | --|| SOME FUNCTIONS | |
398 | --\\=================================// | |
399 | function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS) | |
400 | return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS) | |
401 | end | |
402 | ||
403 | function PositiveAngle(NUMBER) | |
404 | if NUMBER >= 0 then | |
405 | NUMBER = 0 | |
406 | end | |
407 | return NUMBER | |
408 | end | |
409 | ||
410 | function NegativeAngle(NUMBER) | |
411 | if NUMBER <= 0 then | |
412 | NUMBER = 0 | |
413 | end | |
414 | return NUMBER | |
415 | end | |
416 | ||
417 | function Swait(NUMBER) | |
418 | if NUMBER == 0 or NUMBER == nil then | |
419 | ArtificialHB.Event:wait() | |
420 | else | |
421 | for i = 1, NUMBER do | |
422 | ArtificialHB.Event:wait() | |
423 | end | |
424 | end | |
425 | end | |
426 | ||
427 | function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET) | |
428 | local NEWMESH = IT(MESH) | |
429 | if MESH == "SpecialMesh" then | |
430 | NEWMESH.MeshType = MESHTYPE | |
431 | if MESHID ~= "nil" and MESHID ~= "" then | |
432 | NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID | |
433 | end | |
434 | if TEXTUREID ~= "nil" and TEXTUREID ~= "" then | |
435 | NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID | |
436 | end | |
437 | end | |
438 | NEWMESH.Offset = OFFSET or VT(0, 0, 0) | |
439 | NEWMESH.Scale = SCALE | |
440 | NEWMESH.Parent = PARENT | |
441 | return NEWMESH | |
442 | end | |
443 | ||
444 | function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR) | |
445 | local NEWPART = IT("Part") | |
446 | NEWPART.formFactor = FORMFACTOR | |
447 | NEWPART.Reflectance = REFLECTANCE | |
448 | NEWPART.Transparency = TRANSPARENCY | |
449 | NEWPART.CanCollide = false | |
450 | NEWPART.Locked = true | |
451 | NEWPART.Anchored = true | |
452 | if ANCHOR == false then | |
453 | NEWPART.Anchored = false | |
454 | end | |
455 | NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR)) | |
456 | NEWPART.Name = NAME | |
457 | NEWPART.Size = SIZE | |
458 | NEWPART.Position = Torso.Position | |
459 | NEWPART.Material = MATERIAL | |
460 | NEWPART:BreakJoints() | |
461 | NEWPART.Parent = PARENT | |
462 | return NEWPART | |
463 | end | |
464 | ||
465 | local function weldBetween(a, b) | |
466 | local weldd = Instance.new("ManualWeld") | |
467 | weldd.Part0 = a | |
468 | weldd.Part1 = b | |
469 | weldd.C0 = CFrame.new() | |
470 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
471 | weldd.Parent = a | |
472 | return weldd | |
473 | end | |
474 | ||
475 | ||
476 | function QuaternionFromCFrame(cf) | |
477 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
478 | local trace = m00 + m11 + m22 | |
479 | if trace > 0 then | |
480 | local s = math.sqrt(1 + trace) | |
481 | local recip = 0.5 / s | |
482 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
483 | else | |
484 | local i = 0 | |
485 | if m11 > m00 then | |
486 | i = 1 | |
487 | end | |
488 | if m22 > (i == 0 and m00 or m11) then | |
489 | i = 2 | |
490 | end | |
491 | if i == 0 then | |
492 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
493 | local recip = 0.5 / s | |
494 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
495 | elseif i == 1 then | |
496 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
497 | local recip = 0.5 / s | |
498 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
499 | elseif i == 2 then | |
500 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
501 | local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
502 | end | |
503 | end | |
504 | end | |
505 | ||
506 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
507 | local xs, ys, zs = x + x, y + y, z + z | |
508 | local wx, wy, wz = w * xs, w * ys, w * zs | |
509 | local xx = x * xs | |
510 | local xy = x * ys | |
511 | local xz = x * zs | |
512 | local yy = y * ys | |
513 | local yz = y * zs | |
514 | local zz = z * zs | |
515 | 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)) | |
516 | end | |
517 | ||
518 | function QuaternionSlerp(a, b, t) | |
519 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
520 | local startInterp, finishInterp; | |
521 | if cosTheta >= 0.0001 then | |
522 | if (1 - cosTheta) > 0.0001 then | |
523 | local theta = ACOS(cosTheta) | |
524 | local invSinTheta = 1 / SIN(theta) | |
525 | startInterp = SIN((1 - t) * theta) * invSinTheta | |
526 | finishInterp = SIN(t * theta) * invSinTheta | |
527 | else | |
528 | startInterp = 1 - t | |
529 | finishInterp = t | |
530 | end | |
531 | else | |
532 | if (1 + cosTheta) > 0.0001 then | |
533 | local theta = ACOS(-cosTheta) | |
534 | local invSinTheta = 1 / SIN(theta) | |
535 | startInterp = SIN((t - 1) * theta) * invSinTheta | |
536 | finishInterp = SIN(t * theta) * invSinTheta | |
537 | else | |
538 | startInterp = t - 1 | |
539 | finishInterp = t | |
540 | end | |
541 | end | |
542 | 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 | |
543 | end | |
544 | ||
545 | function Clerp(a, b, t) | |
546 | local qa = {QuaternionFromCFrame(a)} | |
547 | local qb = {QuaternionFromCFrame(b)} | |
548 | local ax, ay, az = a.x, a.y, a.z | |
549 | local bx, by, bz = b.x, b.y, b.z | |
550 | local _t = 1 - t | |
551 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
552 | end | |
553 | ||
554 | function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME) | |
555 | local frame = IT("Frame") | |
556 | frame.BackgroundTransparency = TRANSPARENCY | |
557 | frame.BorderSizePixel = BORDERSIZEPIXEL | |
558 | frame.Position = POSITION | |
559 | frame.Size = SIZE | |
560 | frame.BackgroundColor3 = COLOR | |
561 | frame.BorderColor3 = BORDERCOLOR | |
562 | frame.Name = NAME | |
563 | frame.Parent = PARENT | |
564 | return frame | |
565 | end | |
566 | ||
567 | function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME) | |
568 | local label = IT("TextLabel") | |
569 | label.BackgroundTransparency = 1 | |
570 | label.Size = UD2(1, 0, 1, 0) | |
571 | label.Position = UD2(0, 0, 0, 0) | |
572 | label.TextColor3 = TEXTCOLOR | |
573 | label.TextStrokeTransparency = STROKETRANSPARENCY | |
574 | label.TextTransparency = TRANSPARENCY | |
575 | label.FontSize = TEXTFONTSIZE | |
576 | label.Font = TEXTFONT | |
577 | label.BorderSizePixel = BORDERSIZEPIXEL | |
578 | label.TextScaled = false | |
579 | label.Text = TEXT | |
580 | label.Name = NAME | |
581 | label.Parent = PARENT | |
582 | return label | |
583 | end | |
584 | ||
585 | function NoOutlines(PART) | |
586 | PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10 | |
587 | end | |
588 | ||
589 | function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1) | |
590 | local NEWWELD = IT(TYPE) | |
591 | NEWWELD.Part0 = PART0 | |
592 | NEWWELD.Part1 = PART1 | |
593 | NEWWELD.C0 = C0 | |
594 | NEWWELD.C1 = C1 | |
595 | NEWWELD.Parent = PARENT | |
596 | return NEWWELD | |
597 | end | |
598 | ||
599 | local S = IT("Sound") | |
600 | function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP) | |
601 | local NEWSOUND = nil | |
602 | coroutine.resume(coroutine.create(function() | |
603 | NEWSOUND = S:Clone() | |
604 | NEWSOUND.Parent = PARENT | |
605 | NEWSOUND.Volume = VOLUME | |
606 | NEWSOUND.Pitch = PITCH | |
607 | NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID | |
608 | NEWSOUND:play() | |
609 | if DOESLOOP == true then | |
610 | NEWSOUND.Looped = true | |
611 | else | |
612 | repeat wait(1) until NEWSOUND.Playing == false | |
613 | NEWSOUND:remove() | |
614 | end | |
615 | end)) | |
616 | return NEWSOUND | |
617 | end | |
618 | ||
619 | ||
620 | local EyeSizes={ | |
621 | NumberSequenceKeypoint.new(0,2,0), | |
622 | NumberSequenceKeypoint.new(1,0,0) | |
623 | } | |
624 | local EyeTrans={ | |
625 | NumberSequenceKeypoint.new(0,0.5,0), | |
626 | NumberSequenceKeypoint.new(1,1,0) | |
627 | } | |
628 | local PE=Instance.new("ParticleEmitter",nil) | |
629 | PE.LightEmission=.8 | |
630 | PE.Color = ColorSequence.new(BRICKC("Lime green").Color,BRICKC("Lime green").Color) | |
631 | PE.Size=NumberSequence.new(EyeSizes) | |
632 | PE.Transparency=NumberSequence.new(EyeTrans) | |
633 | PE.Lifetime=NumberRange.new(0.35,1) | |
634 | PE.Rotation=NumberRange.new(0,360) | |
635 | PE.Rate=100 | |
636 | PE.VelocitySpread = 10000 | |
637 | PE.Acceleration = Vector3.new(0,85,0) | |
638 | PE.Drag = 5 | |
639 | PE.Speed = NumberRange.new(0.1,5) | |
640 | PE.Texture="http://www.roblox.com/asset/?id=1460745664" | |
641 | PE.ZOffset = 0.5 | |
642 | PE.Name = "PE" | |
643 | PE.Enabled = false | |
644 | ||
645 | function Fire(art) | |
646 | local PARTICLES = PE:Clone() | |
647 | PARTICLES.Parent = art | |
648 | PARTICLES.Enabled = true | |
649 | return PARTICLES | |
650 | end | |
651 | ||
652 | function CFrameFromTopBack(at, top, back) | |
653 | local right = top:Cross(back) | |
654 | 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) | |
655 | end | |
656 | ||
657 | --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}) | |
658 | function WACKYEFFECT(Table) | |
659 | local TYPE = (Table.EffectType or "Sphere") | |
660 | local SIZE = (Table.Size or VT(1,1,1)) | |
661 | local ENDSIZE = (Table.Size2 or VT(0,0,0)) | |
662 | local TRANSPARENCY = (Table.Transparency or 0) | |
663 | local ENDTRANSPARENCY = (Table.Transparency2 or 1) | |
664 | local CFRAME = (Table.CFrame or Torso.CFrame) | |
665 | local MOVEDIRECTION = (Table.MoveToPos or nil) | |
666 | local ROTATION1 = (Table.RotationX or 0) | |
667 | local ROTATION2 = (Table.RotationY or 0) | |
668 | local ROTATION3 = (Table.RotationZ or 0) | |
669 | local MATERIAL = (Table.Material or "Neon") | |
670 | local COLOR = (Table.Color or C3(1,1,1)) | |
671 | local TIME = (Table.Time or 45) | |
672 | local SOUNDID = (Table.SoundID or nil) | |
673 | local SOUNDPITCH = (Table.SoundPitch or nil) | |
674 | local SOUNDVOLUME = (Table.SoundVolume or nil) | |
675 | coroutine.resume(coroutine.create(function() | |
676 | local PLAYSSOUND = false | |
677 | local SOUND = nil | |
678 | local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Lime green"), "Effect", VT(1,1,1), true) | |
679 | if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then | |
680 | PLAYSSOUND = true | |
681 | SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false) | |
682 | end | |
683 | EFFECT.Color = COLOR | |
684 | local MSH = nil | |
685 | if TYPE == "Sphere" then | |
686 | MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0)) | |
687 | elseif TYPE == "Block" or TYPE == "Box" then | |
688 | MSH = IT("BlockMesh",EFFECT) | |
689 | MSH.Scale = SIZE | |
690 | elseif TYPE == "Wave" then | |
691 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8)) | |
692 | elseif TYPE == "Ring" then | |
693 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0)) | |
694 | elseif TYPE == "Slash" then | |
695 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0)) | |
696 | elseif TYPE == "Round Slash" then | |
697 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0)) | |
698 | elseif TYPE == "Swirl" then | |
699 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0)) | |
700 | elseif TYPE == "Skull" then | |
701 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0)) | |
702 | elseif TYPE == "Crystal" then | |
703 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0)) | |
704 | end | |
705 | if MSH ~= nil then | |
706 | local MOVESPEED = nil | |
707 | if MOVEDIRECTION ~= nil then | |
708 | MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME | |
709 | end | |
710 | local GROWTH = SIZE - ENDSIZE | |
711 | local TRANS = TRANSPARENCY - ENDTRANSPARENCY | |
712 | if TYPE == "Block" then | |
713 | EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
714 | else | |
715 | EFFECT.CFrame = CFRAME | |
716 | end | |
717 | for LOOP = 1, TIME+1 do | |
718 | Swait() | |
719 | MSH.Scale = MSH.Scale - GROWTH/TIME | |
720 | if TYPE == "Wave" then | |
721 | MSH.Offset = VT(0,0,-MSH.Scale.X/8) | |
722 | end | |
723 | EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME | |
724 | if TYPE == "Block" then | |
725 | EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
726 | else | |
727 | EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3)) | |
728 | end | |
729 | if MOVEDIRECTION ~= nil then | |
730 | local ORI = EFFECT.Orientation | |
731 | EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED) | |
732 | EFFECT.Orientation = ORI | |
733 | end | |
734 | end | |
735 | if PLAYSSOUND == false then | |
736 | EFFECT:remove() | |
737 | else | |
738 | repeat wait(1) until SOUND.Playing == false | |
739 | EFFECT:remove() | |
740 | end | |
741 | else | |
742 | if PLAYSSOUND == false then | |
743 | EFFECT:remove() | |
744 | else | |
745 | repeat Swait() until SOUND.Playing == false | |
746 | EFFECT:remove() | |
747 | end | |
748 | end | |
749 | end)) | |
750 | end | |
751 | ||
752 | function MakeForm(PART,TYPE) | |
753 | if TYPE == "Cyl" then | |
754 | local MSH = IT("CylinderMesh",PART) | |
755 | elseif TYPE == "Ball" then | |
756 | local MSH = IT("SpecialMesh",PART) | |
757 | MSH.MeshType = "Sphere" | |
758 | elseif TYPE == "Wedge" then | |
759 | local MSH = IT("SpecialMesh",PART) | |
760 | MSH.MeshType = "Wedge" | |
761 | end | |
762 | end | |
763 | ||
764 | Debris = game:GetService("Debris") | |
765 | ||
766 | function CastProperRay(StartPos, EndPos, Distance, Ignore) | |
767 | local DIRECTION = CF(StartPos,EndPos).lookVector | |
768 | return Raycast(StartPos, DIRECTION, Distance, Ignore) | |
769 | end | |
770 | ||
771 | local HATWELD = nil | |
772 | function Pose(WhichPose,Speed,Time,Magic,Gyro,Tors) | |
773 | PLAYMAINANIM = false | |
774 | if WhichPose == "Cast1" then | |
775 | for i=0, Time, 0.1 / Animation_Speed do | |
776 | Swait() | |
777 | if Magic == true then | |
778 | WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = RightArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Lime green".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil}) | |
779 | end | |
780 | if Gyro ~= nil and Gyro ~= false then | |
781 | Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p) | |
782 | end | |
783 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(35)), Speed / Animation_Speed) | |
784 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-35)), Speed / Animation_Speed) | |
785 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(125), RAD(0), RAD(45)) * RIGHTSHOULDERC0, Speed / Animation_Speed) | |
786 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed) | |
787 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed) | |
788 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed) | |
789 | end | |
790 | elseif WhichPose == "Cast2" then | |
791 | for i=0, Time, 0.1 / Animation_Speed do | |
792 | Swait() | |
793 | if Magic == true then | |
794 | WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = RightArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Lime green".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil}) | |
795 | WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = LeftArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Lime green".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil}) | |
796 | end | |
797 | if Gyro ~= nil and Gyro ~= false then | |
798 | Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p) | |
799 | end | |
800 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed) | |
801 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-15 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(0)), Speed / Animation_Speed) | |
802 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(120), RAD(0), RAD(15)) * RIGHTSHOULDERC0, Speed / Animation_Speed) | |
803 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(120), RAD(0), RAD(-15)) * LEFTSHOULDERC0, Speed / Animation_Speed) | |
804 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed) | |
805 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed) | |
806 | end | |
807 | elseif WhichPose == "RightArmUp" then | |
808 | for i=0, Time, 0.1 / Animation_Speed do | |
809 | Swait() | |
810 | if Magic == true then | |
811 | WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = RightArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Lime green".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil}) | |
812 | end | |
813 | if Gyro ~= nil and Gyro ~= false then | |
814 | Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p) | |
815 | end | |
816 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(15)), Speed / Animation_Speed) | |
817 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-15)), Speed / Animation_Speed) | |
818 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.2) * ANGLES(RAD(125), RAD(0), RAD(25)) * RIGHTSHOULDERC0, Speed / Animation_Speed) | |
819 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed) | |
820 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed) | |
821 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed) | |
822 | end | |
823 | elseif WhichPose == "Taunt" then | |
824 | for i=0, Time, 0.1 / Animation_Speed do | |
825 | Swait() | |
826 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed) | |
827 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(0)), Speed / Animation_Speed) | |
828 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(175), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, Speed / Animation_Speed) | |
829 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed) | |
830 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed) | |
831 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed) | |
832 | end | |
833 | HATWELD.Part0 = RightArm | |
834 | HATWELD.C0 = CF(0,-1.1,-0.4) * ANGLES(RAD(0), RAD(0), RAD(180)) * ANGLES(RAD(-20), RAD(0), RAD(0)) | |
835 | CreateSound(137473066,Torso,10,1,false) | |
836 | for i=0, Time*2, 0.1 / Animation_Speed do | |
837 | Swait() | |
838 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed) | |
839 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(35 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(0)), Speed / Animation_Speed) | |
840 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(145), RAD(0), RAD(45)) * RIGHTSHOULDERC0, Speed / Animation_Speed) | |
841 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(5), RAD(25), RAD(-15)) * LEFTSHOULDERC0, Speed / Animation_Speed) | |
842 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed) | |
843 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed) | |
844 | end | |
845 | for i=0, Time, 0.1 / Animation_Speed do | |
846 | Swait() | |
847 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed) | |
848 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5), RAD(0), RAD(0)), Speed / Animation_Speed) | |
849 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.65, -0.5) * ANGLES(RAD(175), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, Speed / Animation_Speed) | |
850 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed) | |
851 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed) | |
852 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed) | |
853 | HATWELD.C0 = Clerp(HATWELD.C0, CF(-0.5,-1.2,-0.3) * ANGLES(RAD(0), RAD(0), RAD(180)) * ANGLES(RAD(35), RAD(0), RAD(35)), Speed / Animation_Speed) | |
854 | end | |
855 | HATWELD.Part0 = Head | |
856 | HATWELD.C0 = CF(0,0.35,0) | |
857 | elseif WhichPose == "Prepare key" then | |
858 | for i=0, Time, 0.1 / Animation_Speed do | |
859 | Swait() | |
860 | if Gyro ~= nil and Gyro ~= false then | |
861 | Gyro.cframe = CF(RootPart.Position,Tors.Position) | |
862 | end | |
863 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(65)), Speed / Animation_Speed) | |
864 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-65)), Speed / Animation_Speed) | |
865 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.25) * ANGLES(RAD(90), RAD(0), RAD(65)) * RIGHTSHOULDERC0, Speed / Animation_Speed) | |
866 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed) | |
867 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed) | |
868 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed) | |
869 | end | |
870 | elseif WhichPose == "Turn key" then | |
871 | for i=0, Time, 0.1 / Animation_Speed do | |
872 | Swait() | |
873 | if Gyro ~= nil and Gyro ~= false then | |
874 | Gyro.cframe = CF(RootPart.Position,Tors.Position) | |
875 | end | |
876 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(75)), Speed / Animation_Speed) | |
877 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-75)), Speed / Animation_Speed) | |
878 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.25) * ANGLES(RAD(90), RAD(0), RAD(75)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * RIGHTSHOULDERC0, Speed / Animation_Speed) | |
879 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed) | |
880 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed) | |
881 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed) | |
882 | end | |
883 | end | |
884 | PLAYMAINANIM = true | |
885 | end | |
886 | ||
887 | --Lightning({Color = C3(1,1,1), Start = Torso.Position, End = Mouse.Hit.p, SegmentL = 2, Thickness = 0.1, DoesFade = false, Ignore = Character, MaxDist = 400, Branches = false}) | |
888 | function Lightning(Table) | |
889 | local Color = Table.Color or C3(1,1,1) | |
890 | local StartPos = Table.Start or Torso.Position | |
891 | local EndPos = Table.End or Mouse.Hit.p | |
892 | local SegmentLength = Table.SegmentL or 2 | |
893 | local Thickness = Table.Thickness or 0.1 | |
894 | local Dissapear = Table.DoesFade or false | |
895 | local Parent = Table.Ignore or Character | |
896 | local MaxDist = Table.MaxDist or 400 | |
897 | local Branches = Table.Branches or false | |
898 | local HIT,HITPOS = CastProperRay(StartPos, EndPos, MaxDist, Parent) | |
899 | local DISTANCE = math.ceil((StartPos - HITPOS).Magnitude/SegmentLength) | |
900 | local LIGHTNINGMODEL = IT("Model",Effects) | |
901 | LIGHTNINGMODEL.Name = "Lightning" | |
902 | local LastBolt = nil | |
903 | for E = 1, DISTANCE do | |
904 | local ExtraSize = (DISTANCE-E)/15 | |
905 | local PART = CreatePart(3, LIGHTNINGMODEL, "Neon", 0, 0, BRICKC("Lime green"), "LightningPart"..E, VT(Thickness+ExtraSize,SegmentLength,Thickness+ExtraSize)) | |
906 | PART.Color = Color | |
907 | MakeForm(PART,"Cyl") | |
908 | if LastBolt == nil then | |
909 | PART.CFrame = CF(StartPos,HITPOS)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0) | |
910 | else | |
911 | PART.CFrame = CF(LastBolt.CFrame*CF(0,-LastBolt.Size.Y/2,0).p,CF(HITPOS)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))*CF(0,0,SegmentLength/3+(DISTANCE-E)).p)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0) | |
912 | end | |
913 | LastBolt = PART | |
914 | if Branches == true then | |
915 | local CHOICE = MRANDOM(1,7+((DISTANCE-E)*2)) | |
916 | if CHOICE == 1 then | |
917 | local LASTBRANCH = nil | |
918 | for i = 1, MRANDOM(2,5) do | |
919 | local ExtraSize2 = ((DISTANCE-E)/25)/i | |
920 | local PART = CreatePart(3, LIGHTNINGMODEL, "Neon", 0, 0, BRICKC("Crimson"), "Branch"..E.."-"..i, VT(Thickness+ExtraSize2,SegmentLength,Thickness+ExtraSize2)) | |
921 | PART.Color = Color | |
922 | MakeForm(PART,"Cyl") | |
923 | if LASTBRANCH == nil then | |
924 | PART.CFrame = CF(LastBolt.CFrame*CF(0,-LastBolt.Size.Y/2,0).p,LastBolt.CFrame*CF(0,-LastBolt.Size.Y/2,0)*ANGLES(RAD(0),RAD(0),RAD(MRANDOM(0,360)))*CF(0,Thickness*7,0)*CF(0,0,-1).p)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0) | |
925 | else | |
926 | PART.CFrame = CF(LASTBRANCH.CFrame*CF(0,-LASTBRANCH.Size.Y/2,0).p,LASTBRANCH.CFrame*CF(0,-LASTBRANCH.Size.Y/2,0)*ANGLES(RAD(0),RAD(0),RAD(MRANDOM(0,360)))*CF(0,Thickness*3,0)*CF(0,0,-1).p)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0) | |
927 | end | |
928 | LASTBRANCH = PART | |
929 | end | |
930 | end | |
931 | end | |
932 | end | |
933 | if Dissapear == true then | |
934 | coroutine.resume(coroutine.create(function() | |
935 | for i = 1, 10 do | |
936 | Swait() | |
937 | for _, c in pairs(LIGHTNINGMODEL:GetChildren()) do | |
938 | if c.ClassName == "Part" then | |
939 | c.Transparency = i/10 | |
940 | end | |
941 | end | |
942 | end | |
943 | LIGHTNINGMODEL:remove() | |
944 | end)) | |
945 | elseif Dissapear == false then | |
946 | Debris:AddItem(LIGHTNINGMODEL,0.1) | |
947 | end | |
948 | return {End = LastBolt.CFrame*CF(0,0,-LastBolt.Size.Z/2).p,LastBolt = LastBolt,Model = LIGHTNINGMODEL} | |
949 | end | |
950 | ||
951 | function PositiveAngle(NUMBER) | |
952 | if NUMBER >= 0 then | |
953 | NUMBER = 0 | |
954 | end | |
955 | return NUMBER | |
956 | end | |
957 | ||
958 | function NegativeAngle(NUMBER) | |
959 | if NUMBER <= 0 then | |
960 | NUMBER = 0 | |
961 | end | |
962 | return NUMBER | |
963 | end | |
964 | ||
965 | function Swait(NUMBER) | |
966 | if NUMBER == 0 or NUMBER == nil then | |
967 | ArtificialHB.Event:wait() | |
968 | else | |
969 | for i = 1, NUMBER do | |
970 | ArtificialHB.Event:wait() | |
971 | end | |
972 | end | |
973 | end | |
974 | ||
975 | function QuaternionFromCFrame(cf) | |
976 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
977 | local trace = m00 + m11 + m22 | |
978 | if trace > 0 then | |
979 | local s = math.sqrt(1 + trace) | |
980 | local recip = 0.5 / s | |
981 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
982 | else | |
983 | local i = 0 | |
984 | if m11 > m00 then | |
985 | i = 1 | |
986 | end | |
987 | if m22 > (i == 0 and m00 or m11) then | |
988 | i = 2 | |
989 | end | |
990 | if i == 0 then | |
991 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
992 | local recip = 0.5 / s | |
993 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
994 | elseif i == 1 then | |
995 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
996 | local recip = 0.5 / s | |
997 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
998 | elseif i == 2 then | |
999 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
1000 | local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
1001 | end | |
1002 | end | |
1003 | end | |
1004 | ||
1005 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
1006 | local xs, ys, zs = x + x, y + y, z + z | |
1007 | local wx, wy, wz = w * xs, w * ys, w * zs | |
1008 | local xx = x * xs | |
1009 | local xy = x * ys | |
1010 | local xz = x * zs | |
1011 | local yy = y * ys | |
1012 | local yz = y * zs | |
1013 | local zz = z * zs | |
1014 | 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)) | |
1015 | end | |
1016 | ||
1017 | function QuaternionSlerp(a, b, t) | |
1018 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
1019 | local startInterp, finishInterp; | |
1020 | if cosTheta >= 0.0001 then | |
1021 | if (1 - cosTheta) > 0.0001 then | |
1022 | local theta = ACOS(cosTheta) | |
1023 | local invSinTheta = 1 / SIN(theta) | |
1024 | startInterp = SIN((1 - t) * theta) * invSinTheta | |
1025 | finishInterp = SIN(t * theta) * invSinTheta | |
1026 | else | |
1027 | startInterp = 1 - t | |
1028 | finishInterp = t | |
1029 | end | |
1030 | else | |
1031 | if (1 + cosTheta) > 0.0001 then | |
1032 | local theta = ACOS(-cosTheta) | |
1033 | local invSinTheta = 1 / SIN(theta) | |
1034 | startInterp = SIN((t - 1) * theta) * invSinTheta | |
1035 | finishInterp = SIN(t * theta) * invSinTheta | |
1036 | else | |
1037 | startInterp = t - 1 | |
1038 | finishInterp = t | |
1039 | end | |
1040 | end | |
1041 | 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 | |
1042 | end | |
1043 | ||
1044 | function Clerp(a, b, t) | |
1045 | local qa = {QuaternionFromCFrame(a)} | |
1046 | local qb = {QuaternionFromCFrame(b)} | |
1047 | local ax, ay, az = a.x, a.y, a.z | |
1048 | local bx, by, bz = b.x, b.y, b.z | |
1049 | local _t = 1 - t | |
1050 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
1051 | end | |
1052 | ||
1053 | function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME) | |
1054 | local frame = IT("Frame") | |
1055 | frame.BackgroundTransparency = TRANSPARENCY | |
1056 | frame.BorderSizePixel = BORDERSIZEPIXEL | |
1057 | frame.Position = POSITION | |
1058 | frame.Size = SIZE | |
1059 | frame.BackgroundColor3 = COLOR | |
1060 | frame.BorderColor3 = BORDERCOLOR | |
1061 | frame.Name = NAME | |
1062 | frame.Parent = PARENT | |
1063 | return frame | |
1064 | end | |
1065 | ||
1066 | function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME) | |
1067 | local label = IT("TextLabel") | |
1068 | label.BackgroundTransparency = 1 | |
1069 | label.Size = UD2(1, 0, 1, 0) | |
1070 | label.Position = UD2(0, 0, 0, 0) | |
1071 | label.TextColor3 = TEXTCOLOR | |
1072 | label.TextStrokeTransparency = STROKETRANSPARENCY | |
1073 | label.TextTransparency = TRANSPARENCY | |
1074 | label.FontSize = TEXTFONTSIZE | |
1075 | label.Font = TEXTFONT | |
1076 | label.BorderSizePixel = BORDERSIZEPIXEL | |
1077 | label.TextScaled = false | |
1078 | label.Text = TEXT | |
1079 | label.Name = NAME | |
1080 | label.Parent = PARENT | |
1081 | return label | |
1082 | end | |
1083 | ||
1084 | function NoOutlines(PART) | |
1085 | PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10 | |
1086 | end | |
1087 | ||
1088 | ||
1089 | function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1) | |
1090 | local NEWWELD = IT(TYPE) | |
1091 | NEWWELD.Part0 = PART0 | |
1092 | NEWWELD.Part1 = PART1 | |
1093 | NEWWELD.C0 = C0 | |
1094 | NEWWELD.C1 = C1 | |
1095 | NEWWELD.Parent = PARENT | |
1096 | return NEWWELD | |
1097 | end | |
1098 | ||
1099 | function CreateSound(ID, PARENT, VOLUME, PITCH) | |
1100 | local NEWSOUND = nil | |
1101 | coroutine.resume(coroutine.create(function() | |
1102 | NEWSOUND = IT("Sound", PARENT) | |
1103 | NEWSOUND.Volume = VOLUME | |
1104 | NEWSOUND.Pitch = PITCH | |
1105 | NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID | |
1106 | Swait() | |
1107 | NEWSOUND:play() | |
1108 | game:GetService("Debris"):AddItem(NEWSOUND, 10) | |
1109 | end)) | |
1110 | return NEWSOUND | |
1111 | end | |
1112 | ||
1113 | function CFrameFromTopBack(at, top, back) | |
1114 | local right = top:Cross(back) | |
1115 | 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) | |
1116 | end | |
1117 | ||
1118 | function CreateWave(SIZE,WAIT,CFRAME,DOESROT,ROT,COLOR,GROW) | |
1119 | local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC("Really red"), "Effect", VT(1,1,1), true) | |
1120 | local mesh = IT("SpecialMesh",wave) | |
1121 | mesh.MeshType = "FileMesh" | |
1122 | mesh.MeshId = "http://www.roblox.com/asset/?id=20329976" | |
1123 | mesh.Scale = SIZE | |
1124 | mesh.Offset = VT(0,0,-SIZE.X/8) | |
1125 | wave.CFrame = CFRAME | |
1126 | coroutine.resume(coroutine.create(function(PART) | |
1127 | for i = 1, WAIT do | |
1128 | Swait() | |
1129 | mesh.Scale = mesh.Scale + GROW | |
1130 | mesh.Offset = VT(0,0,-(mesh.Scale.X/8)) | |
1131 | if DOESROT == true then | |
1132 | wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0) | |
1133 | end | |
1134 | wave.Transparency = wave.Transparency + (0.5/WAIT) | |
1135 | if wave.Transparency > 0.99 then | |
1136 | wave:remove() | |
1137 | end | |
1138 | end | |
1139 | end)) | |
1140 | end | |
1141 | ||
1142 | function CreateWave2(SIZE,WAIT,CFRAME,DOESROT,ROT,COLOR,GROW) | |
1143 | local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC("Really red"), "Effect", VT(1,1,1), true) | |
1144 | local mesh = IT("SpecialMesh",wave) | |
1145 | mesh.MeshType = "FileMesh" | |
1146 | mesh.MeshId = "http://www.roblox.com/asset/?id=20329976" | |
1147 | mesh.Scale = SIZE | |
1148 | --mesh.Offset = VT(0,0,-SIZE.X/8) | |
1149 | wave.CFrame = CFRAME | |
1150 | coroutine.resume(coroutine.create(function(PART) | |
1151 | for i = 1, WAIT do | |
1152 | Swait() | |
1153 | mesh.Scale = mesh.Scale + GROW | |
1154 | --mesh.Offset = VT(0,0,-(mesh.Scale.X/8)) | |
1155 | if DOESROT == true then | |
1156 | wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0) | |
1157 | end | |
1158 | wave.Transparency = wave.Transparency + (0.5/WAIT) | |
1159 | if wave.Transparency > 0.99 then | |
1160 | wave:remove() | |
1161 | end | |
1162 | end | |
1163 | end)) | |
1164 | end | |
1165 | ||
1166 | function CreateSwirl(SIZE,WAIT,CFRAME,DOESROT,ROT,COLOR,GROW) | |
1167 | local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC("Really red"), "Effect", VT(1,1,1), true) | |
1168 | local mesh = IT("SpecialMesh",wave) | |
1169 | mesh.MeshType = "FileMesh" | |
1170 | mesh.MeshId = "http://www.roblox.com/asset/?id=1051557" | |
1171 | mesh.Scale = SIZE | |
1172 | wave.CFrame = CFRAME | |
1173 | coroutine.resume(coroutine.create(function(PART) | |
1174 | for i = 1, WAIT do | |
1175 | Swait() | |
1176 | mesh.Scale = mesh.Scale + GROW | |
1177 | mesh.Offset = VT(0,0,-(mesh.Scale.X/8)) | |
1178 | if DOESROT == true then | |
1179 | wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0) | |
1180 | end | |
1181 | wave.Transparency = wave.Transparency + (0.5/WAIT) | |
1182 | if wave.Transparency > 0.99 then | |
1183 | wave:remove() | |
1184 | end | |
1185 | end | |
1186 | end)) | |
1187 | end | |
1188 | ||
1189 | ||
1190 | function Slice(SIZE,WAIT,CFRAME,COLOR,GROW) | |
1191 | local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC("Really red"), "Effect", VT(1,1,1), true) | |
1192 | local mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "448386996", "", VT(0,SIZE/10,SIZE/10), VT(0,0,0)) | |
1193 | wave.CFrame = CFRAME | |
1194 | coroutine.resume(coroutine.create(function(PART) | |
1195 | for i = 1, WAIT do | |
1196 | Swait() | |
1197 | mesh.Scale = mesh.Scale * GROW | |
1198 | wave.Transparency = wave.Transparency + (0.5/WAIT) | |
1199 | if wave.Transparency > 0.99 then | |
1200 | wave:remove() | |
1201 | end | |
1202 | end | |
1203 | end)) | |
1204 | end | |
1205 | ||
1206 | function MagicSphere(SIZE,WAIT,CFRAME,COLOR,GROW) | |
1207 | local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC("Really red"), "Effect", VT(1,1,1), true) | |
1208 | local mesh = IT("SpecialMesh",wave) | |
1209 | mesh.MeshType = "Sphere" | |
1210 | mesh.Scale = SIZE | |
1211 | mesh.Offset = VT(0,0,0) | |
1212 | wave.CFrame = CFRAME | |
1213 | coroutine.resume(coroutine.create(function(PART) | |
1214 | for i = 1, WAIT do | |
1215 | Swait() | |
1216 | mesh.Scale = mesh.Scale + GROW | |
1217 | wave.Transparency = wave.Transparency + (1/WAIT) | |
1218 | if wave.Transparency > 0.99 then | |
1219 | wave:remove() | |
1220 | end | |
1221 | end | |
1222 | end)) | |
1223 | end | |
1224 | ||
1225 | function MakeForm(PART,TYPE) | |
1226 | if TYPE == "Cyl" then | |
1227 | local MSH = IT("CylinderMesh",PART) | |
1228 | elseif TYPE == "Ball" then | |
1229 | local MSH = IT("SpecialMesh",PART) | |
1230 | MSH.MeshType = "Sphere" | |
1231 | elseif TYPE == "Wedge" then | |
1232 | local MSH = IT("SpecialMesh",PART) | |
1233 | MSH.MeshType = "Wedge" | |
1234 | end | |
1235 | end | |
1236 | ||
1237 | function CreateDebreeRing(FLOOR,POSITION,SIZE,BLOCKSIZE,SWAIT) | |
1238 | if FLOOR ~= nil then | |
1239 | coroutine.resume(coroutine.create(function() | |
1240 | local PART = CreatePart(3, Effects, "Neon", 0, 1, "Pearl", "DebreeCenter", VT(0,0,0)) | |
1241 | PART.CFrame = CF(POSITION) | |
1242 | for i = 1, 45 do | |
1243 | local RingPiece = CreatePart(3, Effects, "Plastic", 0, 0, "Pearl", "DebreePart", BLOCKSIZE) | |
1244 | RingPiece.Material = FLOOR.Material | |
1245 | RingPiece.Color = FLOOR.Color | |
1246 | RingPiece.CFrame = PART.CFrame * ANGLES(RAD(0), RAD(i*8), RAD(0)) * CF(SIZE*4, 0, 0) * ANGLES(RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360))) | |
1247 | Debris:AddItem(RingPiece,SWAIT/100) | |
1248 | end | |
1249 | PART:remove() | |
1250 | end)) | |
1251 | end | |
1252 | end | |
1253 | ||
1254 | function CheckTableForString(Table, String) | |
1255 | for i, v in pairs(Table) do | |
1256 | if string.find(string.lower(String), string.lower(v)) then | |
1257 | return true | |
1258 | end | |
1259 | end | |
1260 | return false | |
1261 | end | |
1262 | ||
1263 | function CheckIntangible(Hit) | |
1264 | local ProjectileNames = {"Water", "Arrow", "Projectile", "Effect", "Rail", "Lightning", "Bullet"} | |
1265 | if Hit and Hit.Parent then | |
1266 | if ((not Hit.CanCollide or CheckTableForString(ProjectileNames, Hit.Name)) and not Hit.Parent:FindFirstChild("Humanoid")) then | |
1267 | return true | |
1268 | end | |
1269 | end | |
1270 | return false | |
1271 | end | |
1272 | ||
1273 | Debris = game:GetService("Debris") | |
1274 | ||
1275 | function CastZapRay(StartPos, Vec, Length, Ignore, DelayIfHit) | |
1276 | local Direction = CFrame.new(StartPos, Vec).lookVector | |
1277 | local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore}) | |
1278 | local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Direction * Length), Ignore) | |
1279 | if RayHit and CheckIntangible(RayHit) then | |
1280 | if DelayIfHit then | |
1281 | wait() | |
1282 | end | |
1283 | RayHit, RayPos, RayNormal = CastZapRay((RayPos + (Vec * 0.01)), Vec, (Length - ((StartPos - RayPos).magnitude)), Ignore, DelayIfHit) | |
1284 | end | |
1285 | return RayHit, RayPos, RayNormal | |
1286 | end | |
1287 | ||
1288 | function turnto(position) | |
1289 | RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0) | |
1290 | end | |
1291 | ||
1292 | function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS) | |
1293 | return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS) | |
1294 | end | |
1295 | ||
1296 | function PositiveAngle(NUMBER) | |
1297 | if NUMBER >= 0 then | |
1298 | NUMBER = 0 | |
1299 | end | |
1300 | return NUMBER | |
1301 | end | |
1302 | ||
1303 | function NegativeAngle(NUMBER) | |
1304 | if NUMBER <= 0 then | |
1305 | NUMBER = 0 | |
1306 | end | |
1307 | return NUMBER | |
1308 | end | |
1309 | ||
1310 | function Swait(NUMBER) | |
1311 | if NUMBER == 0 or NUMBER == nil then | |
1312 | ArtificialHB.Event:wait() | |
1313 | else | |
1314 | for i = 1, NUMBER do | |
1315 | ArtificialHB.Event:wait() | |
1316 | end | |
1317 | end | |
1318 | end | |
1319 | ||
1320 | function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET) | |
1321 | local NEWMESH = IT(MESH) | |
1322 | if MESH == "SpecialMesh" then | |
1323 | NEWMESH.MeshType = MESHTYPE | |
1324 | if MESHID ~= "nil" and MESHID ~= "" then | |
1325 | NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID | |
1326 | end | |
1327 | if TEXTUREID ~= "nil" and TEXTUREID ~= "" then | |
1328 | NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID | |
1329 | end | |
1330 | end | |
1331 | NEWMESH.Offset = OFFSET or VT(0, 0, 0) | |
1332 | NEWMESH.Scale = SCALE | |
1333 | NEWMESH.Parent = PARENT | |
1334 | return NEWMESH | |
1335 | end | |
1336 | ||
1337 | function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR) | |
1338 | local NEWPART = IT("Part") | |
1339 | NEWPART.formFactor = FORMFACTOR | |
1340 | NEWPART.Reflectance = REFLECTANCE | |
1341 | NEWPART.Transparency = TRANSPARENCY | |
1342 | NEWPART.CanCollide = false | |
1343 | NEWPART.Locked = true | |
1344 | NEWPART.Anchored = true | |
1345 | if ANCHOR == false then | |
1346 | NEWPART.Anchored = false | |
1347 | end | |
1348 | NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR)) | |
1349 | NEWPART.Name = NAME | |
1350 | NEWPART.Size = SIZE | |
1351 | NEWPART.Position = Torso.Position | |
1352 | NEWPART.Material = MATERIAL | |
1353 | NEWPART:BreakJoints() | |
1354 | NEWPART.Parent = PARENT | |
1355 | return NEWPART | |
1356 | end | |
1357 | ||
1358 | local function weldBetween(a, b) | |
1359 | local weldd = IT("Weld") | |
1360 | weldd.Part0 = a | |
1361 | weldd.Part1 = b | |
1362 | weldd.C0 = CF() | |
1363 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
1364 | weldd.Parent = a | |
1365 | return weldd | |
1366 | end | |
1367 | ||
1368 | ||
1369 | function QuaternionFromCFrame(cf) | |
1370 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
1371 | local trace = m00 + m11 + m22 | |
1372 | if trace > 0 then | |
1373 | local s = math.sqrt(1 + trace) | |
1374 | local recip = 0.5 / s | |
1375 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
1376 | else | |
1377 | local i = 0 | |
1378 | if m11 > m00 then | |
1379 | i = 1 | |
1380 | end | |
1381 | if m22 > (i == 0 and m00 or m11) then | |
1382 | i = 2 | |
1383 | end | |
1384 | if i == 0 then | |
1385 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
1386 | local recip = 0.5 / s | |
1387 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
1388 | elseif i == 1 then | |
1389 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
1390 | local recip = 0.5 / s | |
1391 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
1392 | elseif i == 2 then | |
1393 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
1394 | local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
1395 | end | |
1396 | end | |
1397 | end | |
1398 | ||
1399 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
1400 | local xs, ys, zs = x + x, y + y, z + z | |
1401 | local wx, wy, wz = w * xs, w * ys, w * zs | |
1402 | local xx = x * xs | |
1403 | local xy = x * ys | |
1404 | local xz = x * zs | |
1405 | local yy = y * ys | |
1406 | local yz = y * zs | |
1407 | local zz = z * zs | |
1408 | 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)) | |
1409 | end | |
1410 | ||
1411 | function QuaternionSlerp(a, b, t) | |
1412 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
1413 | local startInterp, finishInterp; | |
1414 | if cosTheta >= 0.0001 then | |
1415 | if (1 - cosTheta) > 0.0001 then | |
1416 | local theta = ACOS(cosTheta) | |
1417 | local invSinTheta = 1 / SIN(theta) | |
1418 | startInterp = SIN((1 - t) * theta) * invSinTheta | |
1419 | finishInterp = SIN(t * theta) * invSinTheta | |
1420 | else | |
1421 | startInterp = 1 - t | |
1422 | finishInterp = t | |
1423 | end | |
1424 | else | |
1425 | if (1 + cosTheta) > 0.0001 then | |
1426 | local theta = ACOS(-cosTheta) | |
1427 | local invSinTheta = 1 / SIN(theta) | |
1428 | startInterp = SIN((t - 1) * theta) * invSinTheta | |
1429 | finishInterp = SIN(t * theta) * invSinTheta | |
1430 | else | |
1431 | startInterp = t - 1 | |
1432 | finishInterp = t | |
1433 | end | |
1434 | end | |
1435 | 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 | |
1436 | end | |
1437 | ||
1438 | function Clerp(a, b, t) | |
1439 | local qa = {QuaternionFromCFrame(a)} | |
1440 | local qb = {QuaternionFromCFrame(b)} | |
1441 | local ax, ay, az = a.x, a.y, a.z | |
1442 | local bx, by, bz = b.x, b.y, b.z | |
1443 | local _t = 1 - t | |
1444 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
1445 | end | |
1446 | ||
1447 | function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME) | |
1448 | local frame = IT("Frame") | |
1449 | frame.BackgroundTransparency = TRANSPARENCY | |
1450 | frame.BorderSizePixel = BORDERSIZEPIXEL | |
1451 | frame.Position = POSITION | |
1452 | frame.Size = SIZE | |
1453 | frame.BackgroundColor3 = COLOR | |
1454 | frame.BorderColor3 = BORDERCOLOR | |
1455 | frame.Name = NAME | |
1456 | frame.Parent = PARENT | |
1457 | return frame | |
1458 | end | |
1459 | ||
1460 | function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME) | |
1461 | local label = IT("TextLabel") | |
1462 | label.BackgroundTransparency = 1 | |
1463 | label.Size = UD2(1, 0, 1, 0) | |
1464 | label.Position = UD2(0, 0, 0, 0) | |
1465 | label.TextColor3 = TEXTCOLOR | |
1466 | label.TextStrokeTransparency = STROKETRANSPARENCY | |
1467 | label.TextTransparency = TRANSPARENCY | |
1468 | label.FontSize = TEXTFONTSIZE | |
1469 | label.Font = TEXTFONT | |
1470 | label.BorderSizePixel = BORDERSIZEPIXEL | |
1471 | label.TextScaled = false | |
1472 | label.Text = TEXT | |
1473 | label.Name = NAME | |
1474 | label.Parent = PARENT | |
1475 | return label | |
1476 | end | |
1477 | ||
1478 | function NoOutlines(PART) | |
1479 | PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10 | |
1480 | end | |
1481 | ||
1482 | function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1) | |
1483 | local NEWWELD = IT(TYPE) | |
1484 | NEWWELD.Part0 = PART0 | |
1485 | NEWWELD.Part1 = PART1 | |
1486 | NEWWELD.C0 = C0 | |
1487 | NEWWELD.C1 = C1 | |
1488 | NEWWELD.Parent = PARENT | |
1489 | return NEWWELD | |
1490 | end | |
1491 | ||
1492 | local S = IT("Sound") | |
1493 | function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP) | |
1494 | local NEWSOUND = nil | |
1495 | coroutine.resume(coroutine.create(function() | |
1496 | NEWSOUND = S:Clone() | |
1497 | NEWSOUND.Parent = PARENT | |
1498 | NEWSOUND.Volume = VOLUME | |
1499 | NEWSOUND.Pitch = PITCH | |
1500 | NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID | |
1501 | NEWSOUND:play() | |
1502 | if DOESLOOP == true then | |
1503 | NEWSOUND.Looped = true | |
1504 | else | |
1505 | repeat wait(1) until NEWSOUND.Playing == false | |
1506 | NEWSOUND:remove() | |
1507 | end | |
1508 | end)) | |
1509 | return NEWSOUND | |
1510 | end | |
1511 | ||
1512 | function CFrameFromTopBack(at, top, back) | |
1513 | local right = top:Cross(back) | |
1514 | 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) | |
1515 | end | |
1516 | ||
1517 | --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}) | |
1518 | function WACKYEFFECT(Table) | |
1519 | local TYPE = (Table.EffectType or "Sphere") | |
1520 | local SIZE = (Table.Size or VT(1,1,1)) | |
1521 | local ENDSIZE = (Table.Size2 or VT(0,0,0)) | |
1522 | local TRANSPARENCY = (Table.Transparency or 0) | |
1523 | local ENDTRANSPARENCY = (Table.Transparency2 or 1) | |
1524 | local CFRAME = (Table.CFrame or Torso.CFrame) | |
1525 | local MOVEDIRECTION = (Table.MoveToPos or nil) | |
1526 | local ROTATION1 = (Table.RotationX or 0) | |
1527 | local ROTATION2 = (Table.RotationY or 0) | |
1528 | local ROTATION3 = (Table.RotationZ or 0) | |
1529 | local MATERIAL = (Table.Material or "Neon") | |
1530 | local COLOR = (Table.Color or C3(1,1,1)) | |
1531 | local TIME = (Table.Time or 45) | |
1532 | local SOUNDID = (Table.SoundID or nil) | |
1533 | local SOUNDPITCH = (Table.SoundPitch or nil) | |
1534 | local SOUNDVOLUME = (Table.SoundVolume or nil) | |
1535 | coroutine.resume(coroutine.create(function() | |
1536 | local PLAYSSOUND = false | |
1537 | local SOUND = nil | |
1538 | local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true) | |
1539 | if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then | |
1540 | PLAYSSOUND = true | |
1541 | SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false) | |
1542 | end | |
1543 | EFFECT.Color = COLOR | |
1544 | local MSH = nil | |
1545 | if TYPE == "Sphere" then | |
1546 | MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0)) | |
1547 | elseif TYPE == "Block" then | |
1548 | MSH = IT("BlockMesh",EFFECT) | |
1549 | MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X) | |
1550 | elseif TYPE == "Wave" then | |
1551 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8)) | |
1552 | elseif TYPE == "Ring" then | |
1553 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0)) | |
1554 | elseif TYPE == "Slash" then | |
1555 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0)) | |
1556 | elseif TYPE == "Round Slash" then | |
1557 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0)) | |
1558 | elseif TYPE == "Swirl" then | |
1559 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0)) | |
1560 | elseif TYPE == "Skull" then | |
1561 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0)) | |
1562 | elseif TYPE == "Crystal" then | |
1563 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0)) | |
1564 | end | |
1565 | if MSH ~= nil then | |
1566 | local MOVESPEED = nil | |
1567 | if MOVEDIRECTION ~= nil then | |
1568 | MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME | |
1569 | end | |
1570 | local GROWTH = SIZE - ENDSIZE | |
1571 | local TRANS = TRANSPARENCY - ENDTRANSPARENCY | |
1572 | if TYPE == "Block" then | |
1573 | EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
1574 | else | |
1575 | EFFECT.CFrame = CFRAME | |
1576 | end | |
1577 | for LOOP = 1, TIME+1 do | |
1578 | Swait() | |
1579 | MSH.Scale = MSH.Scale - GROWTH/TIME | |
1580 | if TYPE == "Wave" then | |
1581 | MSH.Offset = VT(0,0,-MSH.Scale.X/8) | |
1582 | end | |
1583 | EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME | |
1584 | if TYPE == "Block" then | |
1585 | EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
1586 | else | |
1587 | EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3)) | |
1588 | end | |
1589 | if MOVEDIRECTION ~= nil then | |
1590 | local ORI = EFFECT.Orientation | |
1591 | EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED) | |
1592 | EFFECT.Orientation = ORI | |
1593 | end | |
1594 | end | |
1595 | if PLAYSSOUND == false then | |
1596 | EFFECT:remove() | |
1597 | else | |
1598 | SOUND.Stopped:Connect(function() | |
1599 | EFFECT:remove() | |
1600 | end) | |
1601 | end | |
1602 | else | |
1603 | if PLAYSSOUND == false then | |
1604 | EFFECT:remove() | |
1605 | else | |
1606 | repeat Swait() until SOUND.Playing == false | |
1607 | EFFECT:remove() | |
1608 | end | |
1609 | end | |
1610 | end)) | |
1611 | end | |
1612 | ||
1613 | function MakeForm(PART,TYPE) | |
1614 | if TYPE == "Cyl" then | |
1615 | local MSH = IT("CylinderMesh",PART) | |
1616 | elseif TYPE == "Ball" then | |
1617 | local MSH = IT("SpecialMesh",PART) | |
1618 | MSH.MeshType = "Sphere" | |
1619 | elseif TYPE == "Wedge" then | |
1620 | local MSH = IT("SpecialMesh",PART) | |
1621 | MSH.MeshType = "Wedge" | |
1622 | end | |
1623 | end | |
1624 | ||
1625 | Debris = game:GetService("Debris") | |
1626 | ||
1627 | function CastProperRay(StartPos, EndPos, Distance, Ignore) | |
1628 | local DIRECTION = CF(StartPos,EndPos).lookVector | |
1629 | return Raycast(StartPos, DIRECTION, Distance, Ignore) | |
1630 | end | |
1631 | ||
1632 | function turnto(position) | |
1633 | RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0) | |
1634 | end | |
1635 | ||
1636 | function SpawnTrail(FROM,TO,BIG) | |
1637 | local TRAIL = CreatePart(3, Effects, "Neon", 0, 0.5, "Really red", "Trail", VT(0,0,0)) | |
1638 | MakeForm(TRAIL,"Cyl") | |
1639 | local DIST = (FROM - TO).Magnitude | |
1640 | if BIG == true then | |
1641 | TRAIL.Size = VT(0.5,DIST,0.5) | |
1642 | else | |
1643 | TRAIL.Size = VT(0.25,DIST,0.25) | |
1644 | end | |
1645 | TRAIL.CFrame = CF(FROM, TO) * CF(0, 0, -DIST/2) * ANGLES(RAD(90),RAD(0),RAD(0)) | |
1646 | coroutine.resume(coroutine.create(function() | |
1647 | for i = 1, 5 do | |
1648 | Swait() | |
1649 | TRAIL.Transparency = TRAIL.Transparency + 0.1 | |
1650 | end | |
1651 | TRAIL:remove() | |
1652 | end)) | |
1653 | end | |
1654 | ||
1655 | local asd = Instance.new("ParticleEmitter") | |
1656 | asd.Color = ColorSequence.new(Color3.new(0.5, 0, 0), Color3.new(.3, 0, 0)) | |
1657 | asd.LightEmission = .1 | |
1658 | asd.Texture = "http://www.roblox.com/asset/?ID=291880914" | |
1659 | aaa = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.6),NumberSequenceKeypoint.new(1, 2)}) | |
1660 | bbb = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.0636, 0), NumberSequenceKeypoint.new(1, 1)}) | |
1661 | asd.Transparency = bbb | |
1662 | asd.Size = aaa | |
1663 | asd.ZOffset = .9 | |
1664 | asd.Acceleration = Vector3.new(0, -15, 0) | |
1665 | asd.LockedToPart = false | |
1666 | asd.EmissionDirection = "Back" | |
1667 | asd.Lifetime = NumberRange.new(1, 2) | |
1668 | asd.Rotation = NumberRange.new(-100, 100) | |
1669 | asd.RotSpeed = NumberRange.new(-100, 100) | |
1670 | asd.Speed = NumberRange.new(10) | |
1671 | asd.Enabled = false | |
1672 | asd.VelocitySpread = 999 | |
1673 | ||
1674 | function getbloody(victim,amount) | |
1675 | local PART = CreatePart(3, Effects, "Metal", 0, 1, "Mid gray", "Blood", victim.Size) | |
1676 | PART.CFrame = victim.CFrame | |
1677 | local HITPLAYERSOUNDS = {"356551938","264486467"} | |
1678 | Debris:AddItem(PART,5) | |
1679 | CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10)) | |
1680 | CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10)) | |
1681 | CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10)) | |
1682 | local prtcl = asd:Clone() | |
1683 | prtcl.Parent = PART | |
1684 | prtcl:Emit(amount*10) | |
1685 | end | |
1686 | ||
1687 | local Particle = IT("ParticleEmitter",nil) | |
1688 | Particle.Enabled = false | |
1689 | Particle.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1),NumberSequenceKeypoint.new(0.3,0.95),NumberSequenceKeypoint.new(1,1)}) | |
1690 | Particle.LightEmission = 0.5 | |
1691 | Particle.Rate = 150 | |
1692 | Particle.ZOffset = 1 | |
1693 | Particle.Rotation = NumberRange.new(-180, 180) | |
1694 | Particle.RotSpeed = NumberRange.new(-180, 180) | |
1695 | Particle.Texture = "http://www.roblox.com/asset/?id=304437537" | |
1696 | Particle.Color = ColorSequence.new(C3(1,0,0),C3(0.4,0,0)) | |
1697 | ||
1698 | --ParticleEmitter({Speed = 5, Drag = 0, Size1 = 1, Size2 = 5, Lifetime1 = 1, Lifetime2 = 1.5, Parent = Torso, Emit = 100, Offset = 360, Enabled = false}) | |
1699 | function ParticleEmitter(Table) | |
1700 | local PRTCL = Particle:Clone() | |
1701 | local Speed = Table.Speed or 5 | |
1702 | local Drag = Table.Drag or 0 | |
1703 | local Size1 = Table.Size1 or 1 | |
1704 | local Size2 = Table.Size2 or 5 | |
1705 | local Lifetime1 = Table.Lifetime1 or 1 | |
1706 | local Lifetime2 = Table.Lifetime2 or 1.5 | |
1707 | local Parent = Table.Parent or Torso | |
1708 | local Emit = Table.Emit or 100 | |
1709 | local Offset = Table.Offset or 360 | |
1710 | local Acel = Table.Acel or VT(0,0,0) | |
1711 | local Enabled = Table.Enabled or false | |
1712 | PRTCL.Parent = Parent | |
1713 | PRTCL.Size = NumberSequence.new(Size1,Size2) | |
1714 | PRTCL.Lifetime = NumberRange.new(Lifetime1,Lifetime2) | |
1715 | PRTCL.Speed = NumberRange.new(Speed) | |
1716 | PRTCL.VelocitySpread = Offset | |
1717 | PRTCL.Drag = Drag | |
1718 | PRTCL.Acceleration = Acel | |
1719 | if Enabled == false then | |
1720 | PRTCL:Emit(Emit) | |
1721 | Debris:AddItem(PRTCL,Lifetime2) | |
1722 | else | |
1723 | PRTCL.Enabled = true | |
1724 | end | |
1725 | return PRTCL | |
1726 | end | |
1727 | ||
1728 | function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS) | |
1729 | return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS) | |
1730 | end | |
1731 | ||
1732 | function PositiveAngle(NUMBER) | |
1733 | if NUMBER >= 0 then | |
1734 | NUMBER = 0 | |
1735 | end | |
1736 | return NUMBER | |
1737 | end | |
1738 | ||
1739 | function NegativeAngle(NUMBER) | |
1740 | if NUMBER <= 0 then | |
1741 | NUMBER = 0 | |
1742 | end | |
1743 | return NUMBER | |
1744 | end | |
1745 | ||
1746 | function Swait(NUMBER) | |
1747 | if NUMBER == 0 or NUMBER == nil then | |
1748 | ArtificialHB.Event:wait() | |
1749 | else | |
1750 | for i = 1, NUMBER do | |
1751 | ArtificialHB.Event:wait() | |
1752 | end | |
1753 | end | |
1754 | end | |
1755 | ||
1756 | function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET) | |
1757 | local NEWMESH = IT(MESH) | |
1758 | if MESH == "SpecialMesh" then | |
1759 | NEWMESH.MeshType = MESHTYPE | |
1760 | if MESHID ~= "nil" and MESHID ~= "" then | |
1761 | NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID | |
1762 | end | |
1763 | if TEXTUREID ~= "nil" and TEXTUREID ~= "" then | |
1764 | NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID | |
1765 | end | |
1766 | end | |
1767 | NEWMESH.Offset = OFFSET or VT(0, 0, 0) | |
1768 | NEWMESH.Scale = SCALE | |
1769 | NEWMESH.Parent = PARENT | |
1770 | return NEWMESH | |
1771 | end | |
1772 | ||
1773 | function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR) | |
1774 | local NEWPART = IT("Part") | |
1775 | NEWPART.formFactor = FORMFACTOR | |
1776 | NEWPART.Reflectance = REFLECTANCE | |
1777 | NEWPART.Transparency = TRANSPARENCY | |
1778 | NEWPART.CanCollide = false | |
1779 | NEWPART.Locked = true | |
1780 | NEWPART.Anchored = true | |
1781 | if ANCHOR == false then | |
1782 | NEWPART.Anchored = false | |
1783 | end | |
1784 | NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR)) | |
1785 | NEWPART.Name = NAME | |
1786 | NEWPART.Size = SIZE | |
1787 | NEWPART.Position = Torso.Position | |
1788 | NEWPART.Material = MATERIAL | |
1789 | NEWPART:BreakJoints() | |
1790 | NEWPART.Parent = PARENT | |
1791 | return NEWPART | |
1792 | end | |
1793 | ||
1794 | local function weldBetween(a, b) | |
1795 | local weldd = Instance.new("ManualWeld") | |
1796 | weldd.Part0 = a | |
1797 | weldd.Part1 = b | |
1798 | weldd.C0 = CFrame.new() | |
1799 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
1800 | weldd.Parent = a | |
1801 | return weldd | |
1802 | end | |
1803 | ||
1804 | ||
1805 | function QuaternionFromCFrame(cf) | |
1806 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
1807 | local trace = m00 + m11 + m22 | |
1808 | if trace > 0 then | |
1809 | local s = math.sqrt(1 + trace) | |
1810 | local recip = 0.5 / s | |
1811 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
1812 | else | |
1813 | local i = 0 | |
1814 | if m11 > m00 then | |
1815 | i = 1 | |
1816 | end | |
1817 | if m22 > (i == 0 and m00 or m11) then | |
1818 | i = 2 | |
1819 | end | |
1820 | if i == 0 then | |
1821 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
1822 | local recip = 0.5 / s | |
1823 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
1824 | elseif i == 1 then | |
1825 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
1826 | local recip = 0.5 / s | |
1827 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
1828 | elseif i == 2 then | |
1829 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
1830 | local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
1831 | end | |
1832 | end | |
1833 | end | |
1834 | ||
1835 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
1836 | local xs, ys, zs = x + x, y + y, z + z | |
1837 | local wx, wy, wz = w * xs, w * ys, w * zs | |
1838 | local xx = x * xs | |
1839 | local xy = x * ys | |
1840 | local xz = x * zs | |
1841 | local yy = y * ys | |
1842 | local yz = y * zs | |
1843 | local zz = z * zs | |
1844 | 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)) | |
1845 | end | |
1846 | ||
1847 | function QuaternionSlerp(a, b, t) | |
1848 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
1849 | local startInterp, finishInterp; | |
1850 | if cosTheta >= 0.0001 then | |
1851 | if (1 - cosTheta) > 0.0001 then | |
1852 | local theta = ACOS(cosTheta) | |
1853 | local invSinTheta = 1 / SIN(theta) | |
1854 | startInterp = SIN((1 - t) * theta) * invSinTheta | |
1855 | finishInterp = SIN(t * theta) * invSinTheta | |
1856 | else | |
1857 | startInterp = 1 - t | |
1858 | finishInterp = t | |
1859 | end | |
1860 | else | |
1861 | if (1 + cosTheta) > 0.0001 then | |
1862 | local theta = ACOS(-cosTheta) | |
1863 | local invSinTheta = 1 / SIN(theta) | |
1864 | startInterp = SIN((t - 1) * theta) * invSinTheta | |
1865 | finishInterp = SIN(t * theta) * invSinTheta | |
1866 | else | |
1867 | startInterp = t - 1 | |
1868 | finishInterp = t | |
1869 | end | |
1870 | end | |
1871 | 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 | |
1872 | end | |
1873 | ||
1874 | function Clerp(a, b, t) | |
1875 | local qa = {QuaternionFromCFrame(a)} | |
1876 | local qb = {QuaternionFromCFrame(b)} | |
1877 | local ax, ay, az = a.x, a.y, a.z | |
1878 | local bx, by, bz = b.x, b.y, b.z | |
1879 | local _t = 1 - t | |
1880 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
1881 | end | |
1882 | ||
1883 | function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME) | |
1884 | local frame = IT("Frame") | |
1885 | frame.BackgroundTransparency = TRANSPARENCY | |
1886 | frame.BorderSizePixel = BORDERSIZEPIXEL | |
1887 | frame.Position = POSITION | |
1888 | frame.Size = SIZE | |
1889 | frame.BackgroundColor3 = COLOR | |
1890 | frame.BorderColor3 = BORDERCOLOR | |
1891 | frame.Name = NAME | |
1892 | frame.Parent = PARENT | |
1893 | return frame | |
1894 | end | |
1895 | ||
1896 | function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME) | |
1897 | local label = IT("TextLabel") | |
1898 | label.BackgroundTransparency = 1 | |
1899 | label.Size = UD2(1, 0, 1, 0) | |
1900 | label.Position = UD2(0, 0, 0, 0) | |
1901 | label.TextColor3 = TEXTCOLOR | |
1902 | label.TextStrokeTransparency = STROKETRANSPARENCY | |
1903 | label.TextTransparency = TRANSPARENCY | |
1904 | label.FontSize = TEXTFONTSIZE | |
1905 | label.Font = TEXTFONT | |
1906 | label.BorderSizePixel = BORDERSIZEPIXEL | |
1907 | label.TextScaled = false | |
1908 | label.Text = TEXT | |
1909 | label.Name = NAME | |
1910 | label.Parent = PARENT | |
1911 | return label | |
1912 | end | |
1913 | ||
1914 | function NoOutlines(PART) | |
1915 | PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10 | |
1916 | end | |
1917 | ||
1918 | function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1) | |
1919 | local NEWWELD = IT(TYPE) | |
1920 | NEWWELD.Part0 = PART0 | |
1921 | NEWWELD.Part1 = PART1 | |
1922 | NEWWELD.C0 = C0 | |
1923 | NEWWELD.C1 = C1 | |
1924 | NEWWELD.Parent = PARENT | |
1925 | return NEWWELD | |
1926 | end | |
1927 | ||
1928 | local S = IT("Sound") | |
1929 | function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP) | |
1930 | local NEWSOUND = nil | |
1931 | coroutine.resume(coroutine.create(function() | |
1932 | NEWSOUND = S:Clone() | |
1933 | NEWSOUND.Parent = PARENT | |
1934 | NEWSOUND.Volume = VOLUME | |
1935 | NEWSOUND.Pitch = PITCH | |
1936 | NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID | |
1937 | NEWSOUND:play() | |
1938 | if DOESLOOP == true then | |
1939 | NEWSOUND.Looped = true | |
1940 | else | |
1941 | repeat wait(1) until NEWSOUND.Playing == false or NEWSOUND.Parent ~= PARENT | |
1942 | NEWSOUND:remove() | |
1943 | end | |
1944 | end)) | |
1945 | return NEWSOUND | |
1946 | end | |
1947 | ||
1948 | function CFrameFromTopBack(at, top, back) | |
1949 | local right = top:Cross(back) | |
1950 | 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) | |
1951 | end | |
1952 | ||
1953 | --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}) | |
1954 | function WACKYEFFECT(Table) | |
1955 | local TYPE = (Table.EffectType or "Sphere") | |
1956 | local SIZE = (Table.Size or VT(1,1,1)) | |
1957 | local ENDSIZE = (Table.Size2 or VT(0,0,0)) | |
1958 | local TRANSPARENCY = (Table.Transparency or 0) | |
1959 | local ENDTRANSPARENCY = (Table.Transparency2 or 1) | |
1960 | local CFRAME = (Table.CFrame or Torso.CFrame) | |
1961 | local MOVEDIRECTION = (Table.MoveToPos or nil) | |
1962 | local ROTATION1 = (Table.RotationX or 0) | |
1963 | local ROTATION2 = (Table.RotationY or 0) | |
1964 | local ROTATION3 = (Table.RotationZ or 0) | |
1965 | local MATERIAL = (Table.Material or "Neon") | |
1966 | local COLOR = (Table.Color or C3(1,1,1)) | |
1967 | local TIME = (Table.Time or 45) | |
1968 | local SOUNDID = (Table.SoundID or nil) | |
1969 | local SOUNDPITCH = (Table.SoundPitch or nil) | |
1970 | local SOUNDVOLUME = (Table.SoundVolume or nil) | |
1971 | coroutine.resume(coroutine.create(function() | |
1972 | local PLAYSSOUND = false | |
1973 | local SOUND = nil | |
1974 | local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true) | |
1975 | if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then | |
1976 | PLAYSSOUND = true | |
1977 | SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false) | |
1978 | end | |
1979 | EFFECT.Color = COLOR | |
1980 | local MSH = nil | |
1981 | if TYPE == "Sphere" then | |
1982 | MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0)) | |
1983 | elseif TYPE == "Block" then | |
1984 | MSH = IT("BlockMesh",EFFECT) | |
1985 | MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X) | |
1986 | elseif TYPE == "Wave" then | |
1987 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8)) | |
1988 | elseif TYPE == "Ring" then | |
1989 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0)) | |
1990 | elseif TYPE == "Slash" then | |
1991 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0)) | |
1992 | elseif TYPE == "Round Slash" then | |
1993 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0)) | |
1994 | elseif TYPE == "Swirl" then | |
1995 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0)) | |
1996 | elseif TYPE == "Skull" then | |
1997 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0)) | |
1998 | elseif TYPE == "Crystal" then | |
1999 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0)) | |
2000 | end | |
2001 | if MSH ~= nil then | |
2002 | local MOVESPEED = nil | |
2003 | if MOVEDIRECTION ~= nil then | |
2004 | MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME | |
2005 | end | |
2006 | local GROWTH = SIZE - ENDSIZE | |
2007 | local TRANS = TRANSPARENCY - ENDTRANSPARENCY | |
2008 | if TYPE == "Block" then | |
2009 | EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
2010 | else | |
2011 | EFFECT.CFrame = CFRAME | |
2012 | end | |
2013 | for LOOP = 1, TIME+1 do | |
2014 | Swait() | |
2015 | MSH.Scale = MSH.Scale - GROWTH/TIME | |
2016 | if TYPE == "Wave" then | |
2017 | MSH.Offset = VT(0,0,-MSH.Scale.X/8) | |
2018 | end | |
2019 | EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME | |
2020 | if TYPE == "Block" then | |
2021 | EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
2022 | else | |
2023 | EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3)) | |
2024 | end | |
2025 | if MOVEDIRECTION ~= nil then | |
2026 | local ORI = EFFECT.Orientation | |
2027 | EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED) | |
2028 | EFFECT.Orientation = ORI | |
2029 | end | |
2030 | end | |
2031 | if PLAYSSOUND == false then | |
2032 | EFFECT:remove() | |
2033 | else | |
2034 | SOUND.Stopped:Connect(function() | |
2035 | EFFECT:remove() | |
2036 | end) | |
2037 | end | |
2038 | else | |
2039 | if PLAYSSOUND == false then | |
2040 | EFFECT:remove() | |
2041 | else | |
2042 | repeat Swait() until SOUND.Playing == false | |
2043 | EFFECT:remove() | |
2044 | end | |
2045 | end | |
2046 | end)) | |
2047 | end | |
2048 | ||
2049 | function MakeForm(PART,TYPE) | |
2050 | if TYPE == "Cyl" then | |
2051 | local MSH = IT("CylinderMesh",PART) | |
2052 | elseif TYPE == "Ball" then | |
2053 | local MSH = IT("SpecialMesh",PART) | |
2054 | MSH.MeshType = "Sphere" | |
2055 | elseif TYPE == "Wedge" then | |
2056 | local MSH = IT("SpecialMesh",PART) | |
2057 | MSH.MeshType = "Wedge" | |
2058 | end | |
2059 | end | |
2060 | ||
2061 | function SpawnTrail(FROM,TO,BIG) | |
2062 | local TRAIL = CreatePart(3, Effects, "Neon", 0, 0.5, "Really red", "Trail", VT(0,0,0)) | |
2063 | MakeForm(TRAIL,"Cyl") | |
2064 | local DIST = (FROM - TO).Magnitude | |
2065 | if BIG == true then | |
2066 | TRAIL.Size = VT(0.5,DIST,0.5) | |
2067 | else | |
2068 | TRAIL.Size = VT(0.25,DIST,0.25) | |
2069 | end | |
2070 | TRAIL.CFrame = CF(FROM, TO) * CF(0, 0, -DIST/2) * ANGLES(RAD(90),RAD(0),RAD(0)) | |
2071 | coroutine.resume(coroutine.create(function() | |
2072 | for i = 1, 5 do | |
2073 | Swait() | |
2074 | TRAIL.Transparency = TRAIL.Transparency + 0.1 | |
2075 | end | |
2076 | TRAIL:remove() | |
2077 | end)) | |
2078 | end | |
2079 | ||
2080 | Debris = game:GetService("Debris") | |
2081 | ||
2082 | function CastProperRay(StartPos, EndPos, Distance, Ignore) | |
2083 | local DIRECTION = CF(StartPos,EndPos).lookVector | |
2084 | return Raycast(StartPos, DIRECTION, Distance, Ignore) | |
2085 | end | |
2086 | ||
2087 | function turnto(position) | |
2088 | RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0) | |
2089 | end | |
2090 | ||
2091 | --//=================================\\ | |
2092 | --|| WEAPON CREATION | |
2093 | --\\=================================// | |
2094 | ||
2095 | ||
2096 | local FIST = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Neon Gauntlet Part", VT(1.01*Player_Size,1.4*Player_Size,1.01*Player_Size),false) | |
2097 | local weld = CreateWeldOrSnapOrMotor("Weld", FIST, RightArm, FIST, CF(0 * Player_Size, -0.25 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
2098 | local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Gauntlet Part", VT(1.2*Player_Size,0.3*Player_Size,1.2*Player_Size),false) | |
2099 | local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0 * Player_Size, 0.6 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
2100 | ||
2101 | local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Gauntlet Part", VT(1.05*Player_Size,0.05*Player_Size,1.05*Player_Size),false) | |
2102 | local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0 * Player_Size, 0.1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
2103 | local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Gauntlet Part", VT(1.05*Player_Size,0.05*Player_Size,1.05*Player_Size),false) | |
2104 | local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0 * Player_Size, 0.2 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
2105 | local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Gauntlet Part", VT(1.05*Player_Size,0.05*Player_Size,1.05*Player_Size),false) | |
2106 | local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0 * Player_Size, 0.3 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
2107 | local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Gauntlet Part", VT(1.05*Player_Size,0.05*Player_Size,1.05*Player_Size),false) | |
2108 | local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0 * Player_Size, 0.4 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
2109 | ||
2110 | local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Gauntlet Part", VT(1.1*Player_Size,0.8*Player_Size,1.1*Player_Size),false) | |
2111 | local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0 * Player_Size, -0.35 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
2112 | local part = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Neon Gauntlet Part", VT(1.1*Player_Size,0.8*Player_Size,1*Player_Size),false) | |
2113 | local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0.05 * Player_Size, -0.375 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
2114 | local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Gauntlet Part", VT(1.1*Player_Size,0.8*Player_Size,0.3*Player_Size),false) | |
2115 | local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0.1 * Player_Size, -0.4 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
2116 | local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Gauntlet Part", VT(1.1*Player_Size,0.8*Player_Size,0.3*Player_Size),false) | |
2117 | local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0.1 * Player_Size, -0.4 * Player_Size, 0.33 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
2118 | local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Gauntlet Part", VT(1.1*Player_Size,0.8*Player_Size,0.3*Player_Size),false) | |
2119 | local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0.1 * Player_Size, -0.4 * Player_Size, -0.33 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
2120 | ||
2121 | ParticleEmitter({Speed = 0.2, Drag = 0, Size1 = 0.1, Size2 = 0, Lifetime1 = 0.3, Lifetime2 = 0.5, Parent = Hole, Emit = 100, Offset = 360, Enabled = true, Acel = VT(0,5,0)}) | |
2122 | --ParticleEmitter({Speed = 0.5, Drag = 0, Size1 = 0.2, Size2 = 0, Lifetime1 = 0.3, Lifetime2 = 0.7, Parent = Dangle, Emit = 100, Offset = 360, Enabled = true, Acel = VT(0,5,0)}) | |
2123 | ||
2124 | for _, c in pairs(Weapon:GetDescendants()) do | |
2125 | if c.ClassName == "Part" and c.Name ~= "Eye" and c.Parent ~= Effects and c.Parent.Parent ~= Effects then | |
2126 | c.Material = "Glass" | |
2127 | c.Color = C3(0,0,0) | |
2128 | elseif c.ClassName == "Part" and c.Name == "Eye" then | |
2129 | c.Color = C3(1,0,0) | |
2130 | c.Material = "Neon" | |
2131 | end | |
2132 | end | |
2133 | ||
2134 | Weapon.Parent = Character | |
2135 | for _, c in pairs(Weapon:GetChildren()) do | |
2136 | if c.ClassName == "Part" then | |
2137 | c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0) | |
2138 | end | |
2139 | end | |
2140 | ||
2141 | New = function(Object, Parent, Name, Data) | |
2142 | local Object = Instance.new(Object) | |
2143 | for Index, Value in pairs(Data or {}) do | |
2144 | Object[Index] = Value | |
2145 | end | |
2146 | Object.Parent = Parent | |
2147 | Object.Name = Name | |
2148 | return Object | |
2149 | end | |
2150 | ||
2151 | ||
2152 | Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(0.330000252, 0.660000384, 0.0500000007),CFrame = CFrame.new(-67.6787415, 1.33912802, 93.9772263, 0, 0, -1, 0, 1, 0, 1, 0, 0),}) | |
2153 | mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = LeftLeg,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0),C1 = CFrame.new(0.0127105713, 0.339127064, 0.487541199, 0, 0, 1, 0, 1, 0, -1, 0, 0),}) | |
2154 | Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(0.330000252, 0.660000384, 0.0500000007),CFrame = CFrame.new(-66.6787415, 1.33912802, 93.9772263, 0, 0, -1, 0, 1, 0, 1, 0, 0),}) | |
2155 | mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = LeftLeg,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0),C1 = CFrame.new(0.0127105713, 0.339127064, -0.512458801, 0, 0, 1, 0, 1, 0, -1, 0, 0),}) | |
2156 | ||
2157 | Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(0.740000069, 0.140000015, 0.0500000007),CFrame = CFrame.new(-67.6787415, 3.12643075, 92.6921463, -9.31322575e-10, -1.86264515e-09, -0.999999285, 0.777135551, 0.629333496, 9.31322575e-10, 0.6293329, -0.777134895, 0),}) | |
2158 | mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = Torso,C0 = CFrame.new(0, 0, 0, 0, 0.777135491, 0.629333377, 0, 0.629333377, -0.777135491, -1, 0, 0),C1 = CFrame.new(-0.766067505, 0.138611317, 0.515716553, -0.0156119959, -4.38656264e-11, 0.999877751, -0.0062854127, 0.999980271, -9.81397825e-05, -0.999858022, -0.00628618058, -0.0156116877),}) | |
2159 | Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(1.12999988, 1.12000012, 0.0500000007),CFrame = CFrame.new(-67.6951752, 3.43133378, 93.991272, 0, -9.31322575e-10, -0.999999285, 0, 1, 9.31322575e-10, 0.999999225, 0, 0),}) | |
2160 | mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = Torso,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0),C1 = CFrame.new(0.533157349, 0.443484068, 0.50994873, -0.0156119959, -4.38656264e-11, 0.999877751, -0.0062854127, 0.999980271, -9.81397825e-05, -0.999858022, -0.00628618058, -0.0156116877),}) | |
2161 | Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(0.450000018, 0.590000272, 0.0500000007),CFrame = CFrame.new(-67.6951752, 2.60608268, 94.3512573, 0, -9.31322575e-10, -0.999999285, 0, 1, 9.31322575e-10, 0.999999225, 0, 0),}) | |
2162 | mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = Torso,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0),C1 = CFrame.new(0.893096924, -0.381786108, 0.509513855, -0.0156119959, -4.38656264e-11, 0.999877751, -0.0062854127, 0.999980271, -9.81397825e-05, -0.999858022, -0.00628618058, -0.0156116877),}) | |
2163 | Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(0.330000013, 0.590000272, 0.0500000007),CFrame = CFrame.new(-66.6951752, 2.60608268, 94.2912598, 0, -9.31322575e-10, -0.999999285, 0, 1, 9.31322575e-10, 0.999999225, 0, 0),}) | |
2164 | mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = Torso,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0),C1 = CFrame.new(0.817497253, -0.388065577, -0.489402771, -0.0156119959, -4.38656264e-11, 0.999877751, -0.0062854127, 0.999980271, -9.81397825e-05, -0.999858022, -0.00628618058, -0.0156116877),}) | |
2165 | Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(0.220000237, 0.660000384, 0.0500000007),CFrame = CFrame.new(-66.6787338, 2.57395577, 93.9222183, 0, -9.31322575e-10, -0.999999285, 0, 1, 9.31322575e-10, 0.999999225, 0, 0),}) | |
2166 | mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = Torso,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0),C1 = CFrame.new(0.448242188, -0.420258999, -0.49987793, -0.0156119959, -4.38656264e-11, 0.999877751, -0.0062854127, 0.999980271, -9.81397825e-05, -0.999858022, -0.00628618058, -0.0156116877),}) | |
2167 | Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(1.07999992, 1.12000012, 0.0500000007),CFrame = CFrame.new(-66.6951752, 3.43133354, 93.9662704, 0, -9.31322575e-10, -0.999999285, 0, 1, 9.31322575e-10, 0.999999225, 0, 0),}) | |
2168 | mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = Torso,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0),C1 = CFrame.new(0.492546082, 0.437201023, -0.489517212, -0.0156119959, -4.38656264e-11, 0.999877751, -0.0062854127, 0.999980271, -9.81397825e-05, -0.999858022, -0.00628618058, -0.0156116877),}) | |
2169 | Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(0.740000069, 0.340000302, 0.0500000007),CFrame = CFrame.new(-66.6787415, 3.2281816, 93.1287689, 0, -9.31322575e-10, -0.999999285, 0, 1, 9.31322575e-10, 0.999999225, 0, 0),}) | |
2170 | mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = Torso,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0),C1 = CFrame.new(-0.345108032, 0.234031916, -0.491600037, -0.0156119959, -4.38656264e-11, 0.999877751, -0.0062854127, 0.999980271, -9.81397825e-05, -0.999858022, -0.00628618058, -0.0156116877),}) | |
2171 | Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(1.0999999, 0.0500000007, 1.00999975),CFrame = CFrame.new(-67.1759109, 3.99574399, 93.9762726, 0, -0.0260759834, -0.999659359, 0, 0.999660075, -0.0260760002, 0.999999225, -2.91038305e-11, -9.31322575e-10),}) | |
2172 | mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = Torso,C0 = CFrame.new(0, 0, 0, 0, 0, 1, -0.0260760002, 0.999660015, 0, -0.999660015, -0.0260760002, 0),C1 = CFrame.new(0.510047913, 1.00462079, -0.0125579834, -0.0156119959, -4.38656264e-11, 0.999877751, -0.0062854127, 0.999980271, -9.81397825e-05, -0.999858022, -0.00628618058, -0.0156116877),}) | |
2173 | ||
2174 | Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(0.740000069, 0.419999987, 0.870000064),CFrame = CFrame.new(-67.0815201, 2.81366396, 91.9528885, 0, 0, -1, 0.777135491, 0.629333377, 0, 0.629333377, -0.777135491, 0),}) | |
2175 | mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = LeftArm,C0 = CFrame.new(0, 0, 0, 0, 0.777135491, 0.629333377, 0, 0.629333377, -0.777135491, -1, 0, 0),C1 = CFrame.new(-0.00936126709, -0.184385061, -0.0693511963, 0, 0, 1, 0, 1, 0, -1, 0, 0),}) | |
2176 | ||
2177 | local Trail = IT("Trail",Leftbarrel) | |
2178 | Trail.Attachment0 = A | |
2179 | Trail.Attachment1 = B | |
2180 | Trail.Lifetime = 0.2 | |
2181 | Trail.Color = ColorSequence.new(BRICKC"Really red".Color) | |
2182 | Trail.Transparency = NumberSequence.new(0, 1) | |
2183 | Trail.Enabled = true | |
2184 | ||
2185 | local PRT = ParticleEmitter({Speed = 3, Drag = 3, Size1 = 1, Size2 = 3, Lifetime1 = 0.2, Lifetime2 = 1, Parent = RightLeg, Emit = 100, Offset = 360, Enabled = true}) | |
2186 | PRT.LockedToPart = true | |
2187 | local PRT = ParticleEmitter({Speed = 3, Drag = 3, Size1 = 1, Size2 = 3, Lifetime1 = 0.2, Lifetime2 = 1, Parent = LeftLeg, Emit = 100, Offset = 360, Enabled = true}) | |
2188 | PRT.LockedToPart = true | |
2189 | local PRT = ParticleEmitter({Speed = 3, Drag = 3, Size1 = 1, Size2 = 3, Lifetime1 = 0.3, Lifetime2 = 1.5, Parent = Torso, Emit = 100, Offset = 360, Enabled = true}) | |
2190 | PRT.LockedToPart = true | |
2191 | local PRT = ParticleEmitter({Speed = 3, Drag = 3, Size1 = 1, Size2 = 3, Lifetime1 = 0.2, Lifetime2 = 1, Parent = RightArm, Emit = 100, Offset = 360, Enabled = true}) | |
2192 | PRT.LockedToPart = true | |
2193 | local PRT = ParticleEmitter({Speed = 3, Drag = 3, Size1 = 1, Size2 = 3, Lifetime1 = 0.2, Lifetime2 = 1, Parent = LeftArm, Emit = 100, Offset = 360, Enabled = true}) | |
2194 | PRT.LockedToPart = true | |
2195 | ||
2196 | local HAT = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Tophat", VT(1,1,1),false) | |
2197 | local Hatweld = CreateWeldOrSnapOrMotor("Weld", Head, Head, HAT, CF(0,1,0), CF(0, 0, 0)) | |
2198 | CreateMesh("SpecialMesh", HAT, "FileMesh", "97094619", "97094572", VT(1,1,1), VT(0,0,0)) | |
2199 | for i = 1, 16 do | |
2200 | local FACE = CreatePart(3, Character, "Neon", 0, 0+(i-1)/16.2, "White", "FaceGradient", VT(1.01,0.65,1.01),false) | |
2201 | FACE.Color = C3(0,0,0) | |
2202 | Head:FindFirstChildOfClass("SpecialMesh"):Clone().Parent = FACE | |
2203 | CreateWeldOrSnapOrMotor("Weld", Head, Head, FACE, CF(0,0.45-(i-1)/25,0), CF(0, 0, 0)) | |
2204 | end | |
2205 | local EYE = CreatePart(3, Character, "Neon", 0, 0, "Really red", "Eyeball", VT(0.15,0.15,0.15),false) | |
2206 | MakeForm(EYE,"Ball") | |
2207 | CreateWeldOrSnapOrMotor("Weld", Head, Head, EYE, CF(0.15,0.26,-0.55), CF(0, 0, 0)) | |
2208 | local EYE2 = CreatePart(3, Character, "Neon", 0, 0, "Really red", "Eyeball", VT(0.15,0.15,0.15),false) | |
2209 | MakeForm(EYE2,"Ball") | |
2210 | CreateWeldOrSnapOrMotor("Weld", Head, Head, EYE2, CF(-0.15,0.26,-0.55), CF(0, 0, 0)) | |
2211 | ||
2212 | local Particle = IT("ParticleEmitter",nil) | |
2213 | Particle.Enabled = false | |
2214 | Particle.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.3),NumberSequenceKeypoint.new(0.3,0),NumberSequenceKeypoint.new(1,1)}) | |
2215 | Particle.LightEmission = 5 | |
2216 | Particle.Rate = 300 | |
2217 | Particle.ZOffset = 0.2 | |
2218 | Particle.Rotation = NumberRange.new(-180, 180) | |
2219 | Particle.RotSpeed = NumberRange.new(-180, 180) | |
2220 | Particle.Texture = "http://www.roblox.com/asset/?id=304437537" | |
2221 | Particle.Color = ColorSequence.new(C3(1,0,0),C3(0.4,0,0),C3(1,0,0),C3(0,4,0),C3(1,0,0),C3(1,0,0),C3(1,0,0),C3(1,0,0)) | |
2222 | ||
2223 | --ParticleEmitter({Speed = 5, Drag = 0, Size1 = 1, Size2 = 5, Lifetime1 = 1, Lifetime2 = 1.5, Parent = Torso, Emit = 100, Offset = 360, Enabled = false}) | |
2224 | function ParticleEmitter(Table) | |
2225 | local PRTCL = Particle:Clone() | |
2226 | local Speed = Table.Speed or 5 | |
2227 | local Drag = Table.Drag or 0 | |
2228 | local Size1 = Table.Size1 or 1 | |
2229 | local Size2 = Table.Size2 or 5 | |
2230 | local Lifetime1 = Table.Lifetime1 or 1 | |
2231 | local Lifetime2 = Table.Lifetime2 or 1.5 | |
2232 | local Parent = Table.Parent or Torso | |
2233 | local Emit = Table.Emit or 100 | |
2234 | local Offset = Table.Offset or 360 | |
2235 | local Acel = Table.Acel or VT(0,0,0) | |
2236 | local Enabled = Table.Enabled or false | |
2237 | PRTCL.Parent = Parent | |
2238 | PRTCL.Size = NumberSequence.new(Size1,Size2) | |
2239 | PRTCL.Lifetime = NumberRange.new(Lifetime1,Lifetime2) | |
2240 | PRTCL.Speed = NumberRange.new(Speed) | |
2241 | PRTCL.VelocitySpread = Offset | |
2242 | PRTCL.Drag = Drag | |
2243 | PRTCL.Acceleration = Acel | |
2244 | if Enabled == false then | |
2245 | PRTCL:Emit(Emit) | |
2246 | Debris:AddItem(PRTCL,Lifetime2) | |
2247 | else | |
2248 | PRTCL.Enabled = true | |
2249 | end | |
2250 | return PRTCL | |
2251 | end | |
2252 | ||
2253 | local Handle = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.6,0.2),false) | |
2254 | local RightArmGrasp = CreateWeldOrSnapOrMotor("Weld", Handle, RightArm, Handle, CF(0,-1, 0) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0.21, 0)) | |
2255 | local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.5,0.2),false) | |
2256 | MakeForm(Part,"Wedge") | |
2257 | CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.3, 0.2) * ANGLES(RAD(0), RAD(180), RAD(0)), CF(0, 0, 0)) | |
2258 | local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.3,0.2),false) | |
2259 | MakeForm(Part,"Wedge") | |
2260 | CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.4, 0) * ANGLES(RAD(0), RAD(0), RAD(180)), CF(0, 0, 0)) | |
2261 | local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.3,0.3,0.3),false) | |
2262 | CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.5, 0.2) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
2263 | local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.3,0.5,0.5),false) | |
2264 | CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.5) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
2265 | local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.4,0.4,0.4),false) | |
2266 | MakeForm(Part,"Cyl") | |
2267 | CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.5) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0)) | |
2268 | for i = 1, 8 do | |
2269 | local Piece = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Eye", VT(0,0.35,0.41),false) | |
2270 | CreateWeldOrSnapOrMotor("Weld", Handle, Part, Piece, CF(0, 0, 0) * ANGLES(RAD(0), RAD((360/8)*i), RAD(0)), CF(0, 0, 0)) | |
2271 | end | |
2272 | local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Eye", VT(0.38,0.41,0.38),false) | |
2273 | MakeForm(Part,"Cyl") | |
2274 | CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.5) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0)) | |
2275 | local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.37,0.5,0.37),false) | |
2276 | MakeForm(Part,"Ball") | |
2277 | CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.3) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0)) | |
2278 | local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.7,0.4),false) | |
2279 | MakeForm(Part,"Wedge") | |
2280 | CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.7, 0.5) * ANGLES(RAD(90), RAD(180), RAD(180)), CF(0, 0, 0)) | |
2281 | local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.3,0.4,0.2),false) | |
2282 | CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
2283 | local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.35,0.35,0.35),false) | |
2284 | MakeForm(Part,"Cyl") | |
2285 | CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0)) | |
2286 | local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.5,0.1,0.5),false) | |
2287 | MakeForm(Part,"Cyl") | |
2288 | CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 1) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0)) | |
2289 | local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.5,0.1,0.45),false) | |
2290 | MakeForm(Part,"Cyl") | |
2291 | CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 1.1) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0)) | |
2292 | local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.5,0.2),false) | |
2293 | MakeForm(Part,"Wedge") | |
2294 | CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.55, 0.2) * ANGLES(RAD(-135), RAD(0), RAD(0)), CF(0, -0.3, 0)) | |
2295 | local LASTPART = Handle | |
2296 | for i = 1, 10 do | |
2297 | if LASTPART == Handle then | |
2298 | local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.1,0.2,0),false) | |
2299 | LASTPART = Part | |
2300 | CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.1, 0.2) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0)) | |
2301 | else | |
2302 | local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.1,0.05,0),false) | |
2303 | CreateWeldOrSnapOrMotor("Weld", Handle, LASTPART, Part, CF(0, 0.025, 0) * ANGLES(RAD(8), RAD(0), RAD(0)), CF(0, -0.025, 0)) | |
2304 | LASTPART = Part | |
2305 | end | |
2306 | end | |
2307 | ||
2308 | local Barrel = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.15,2,0.15),false) | |
2309 | MakeForm(Barrel,"Cyl") | |
2310 | CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Barrel, CF(0, -0.6, 1.8) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0)) | |
2311 | local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.25,1,0.25),false) | |
2312 | MakeForm(Part,"Cyl") | |
2313 | CreateWeldOrSnapOrMotor("Weld", Handle, Barrel, Part, CF(0, -0.6, 0), CF(0, 0, 0)) | |
2314 | local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0,0.1,0.2),false) | |
2315 | MakeForm(Part,"Wedge") | |
2316 | CreateWeldOrSnapOrMotor("Weld", Handle, Barrel, Part, CF(0, 0.945, 0.1) * ANGLES(RAD(180), RAD(0), RAD(0)), CF(0, 0, 0)) | |
2317 | local Hole = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Eye", VT(0.125,0,0.125),false) | |
2318 | MakeForm(Hole,"Cyl") | |
2319 | CreateWeldOrSnapOrMotor("Weld", Handle, Barrel, Hole, CF(0, 0.98, 0), CF(0, 0, 0)) | |
2320 | local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0,0,0),false) | |
2321 | local GEARWELD = CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7), CF(0, 0, 0)) | |
2322 | CreateMesh("SpecialMesh", Part, "FileMesh", 156292343, "", VT(0.8,0.8,1.5), VT(0,0,0.2)) | |
2323 | local Part = CreatePart(3, Weapon, "Metal", 0, 0.5, "Mid gray", "Eye", VT(0,0,0),false) | |
2324 | local GEARWELD2 = CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7), CF(0, 0, 0)) | |
2325 | CreateMesh("SpecialMesh", Part, "FileMesh", 156292343, "", VT(0.9,0.9,0.3), VT(0,0,0.2)) | |
2326 | coroutine.resume(coroutine.create(function() | |
2327 | while wait() do | |
2328 | GEARWELD.C0 = GEARWELD.C0 * ANGLES(RAD(0), RAD(0), RAD(5)) | |
2329 | GEARWELD2.C0 = GEARWELD2.C0 * ANGLES(RAD(0), RAD(0), RAD(-5)) | |
2330 | end | |
2331 | end)) | |
2332 | ||
2333 | ParticleEmitter({Speed = 0.2, Drag = 0, Size1 = 0.7, Size2 = 0, Lifetime1 = 0.7, Lifetime2 = 0.7, Parent = Hole, Emit = 100, Offset = 360, Enabled = true, Acel = VT(0,5,0)}) | |
2334 | --ParticleEmitter({Speed = 0.5, Drag = 0, Size1 = 10, Size2 = 0, Lifetime1 = 0.8, Lifetime2 = 0.9, Parent = Dangle, Emit = 100, Offset = 360, Enabled = true, Acel = VT(0,5,0)}) | |
2335 | ||
2336 | for _, c in pairs(Weapon:GetDescendants()) do | |
2337 | if c.ClassName == "Part" and c.Name ~= "Eye" and c.Parent ~= Effects and c.Parent.Parent ~= Effects then | |
2338 | c.Material = "Glass" | |
2339 | c.Color = C3(0,0,0) | |
2340 | elseif c.ClassName == "Part" and c.Name == "Eye" then | |
2341 | c.Color = C3(1,0,0) | |
2342 | c.Material = "Neon" | |
2343 | end | |
2344 | end | |
2345 | ||
2346 | Weapon.Parent = Character | |
2347 | for _, c in pairs(Weapon:GetChildren()) do | |
2348 | if c.ClassName == "Part" then | |
2349 | c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0) | |
2350 | end | |
2351 | end | |
2352 | ||
2353 | local SKILLTEXTCOLOR = C3(1,0,0) | |
2354 | local SKILLFONT = "Antique" | |
2355 | local SKILLTEXTSIZE = 7 | |
2356 | ||
2357 | Humanoid.Died:connect(function() | |
2358 | ATTACK = true | |
2359 | end) | |
2360 | ||
2361 | local SKILL1FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.1, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame") | |
2362 | --[[local SKILL2FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.63, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame") | |
2363 | local SKILL3FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.215, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame") | |
2364 | local SKILL4FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.525, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame") | |
2365 | local SKILL5FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.365, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 5 Frame") | |
2366 | ]] | |
2367 | local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] Banisher Bullet", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 1") | |
2368 | --[[local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[B] Ability 2", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 2") | |
2369 | local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] Ability 3", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 3") | |
2370 | local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V] Ability 4", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 4") | |
2371 | local SKILL5TEXT = CreateLabel(SKILL5FRAME, "[X] Mercy", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 5") | |
2372 | ]] | |
2373 | function printbye(Name) | |
2374 | local MESSAGES = {"You cannot struggle, ","Your existance is an insult, ","Fade, ","Your existance is not desired, ","You are not permitted here, ","You are not to decide your fate, ","Be gone, ","You are already dead, ","Your live is an anomaly, ","Don't dare to return, ","Why are you resisting, ","You cannot exist here, ","Why are you struggling, ","Your fate was already decided, ","Goodbye, ","You cannot ignore my command, ","You cannot resist my command, ","You already died, "} | |
2375 | warn(MESSAGES[MRANDOM(1,#MESSAGES)]..Name..".") | |
2376 | end | |
2377 | ||
2378 | workspace.ChildAdded:connect(function(instance) | |
2379 | for BANISH = 1, #TOBANISH do | |
2380 | if TOBANISH[BANISH] ~= nil then | |
2381 | if instance.Name == TOBANISH[BANISH] then | |
2382 | coroutine.resume(coroutine.create(function() | |
2383 | printbye(instance.Name) | |
2384 | instance:ClearAllChildren() | |
2385 | Debris:AddItem(instance,0.0005) | |
2386 | end)) | |
2387 | end | |
2388 | end | |
2389 | end | |
2390 | end) | |
2391 | ||
2392 | function refit() | |
2393 | Character.Parent = workspace | |
2394 | for e = 1, #BODY do | |
2395 | if BODY[e] ~= nil then | |
2396 | local STUFF = BODY[e] | |
2397 | local PART = STUFF[1] | |
2398 | local PARENT = STUFF[2] | |
2399 | local MATERIAL = STUFF[3] | |
2400 | local COLOR = STUFF[4] | |
2401 | local TRANSPARENCY = STUFF[5] | |
2402 | if PART.ClassName == "Part" and PART ~= RootPart then | |
2403 | PART.Material = MATERIAL | |
2404 | PART.Color = COLOR | |
2405 | PART.Transparency = TRANSPARENCY | |
2406 | end | |
2407 | if PART.Parent ~= PARENT then | |
2408 | Humanoid:remove() | |
2409 | PART.Parent = PARENT | |
2410 | Humanoid = IT("Humanoid",Character) | |
2411 | end | |
2412 | end | |
2413 | end | |
2414 | end | |
2415 | --//=================================\\ | |
2416 | --|| DAMAGE FUNCTIONS | |
2417 | --\\=================================// | |
2418 | function StatLabel(LABELTYPE, CFRAME, TEXT, COLOR) | |
2419 | local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT()) | |
2420 | STATPART.CFrame = CF(CFRAME.p + VT(0, 1.5, 0)) | |
2421 | local BODYGYRO = IT("BodyGyro", STATPART) | |
2422 | local BODYPOSITION = IT("BodyPosition", STATPART) | |
2423 | BODYPOSITION.P = 2000 | |
2424 | BODYPOSITION.D = 100 | |
2425 | BODYPOSITION.maxForce = VT(math.huge, math.huge, math.huge) | |
2426 | BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 6, MRANDOM(-2, 2)) | |
2427 | game:GetService("Debris"):AddItem(STATPART ,5) | |
2428 | local BILLBOARDGUI = Instance.new("BillboardGui", STATPART) | |
2429 | BILLBOARDGUI.Adornee = STATPART | |
2430 | BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0) | |
2431 | BILLBOARDGUI.StudsOffset = VT(-2, 2, 0) | |
2432 | BILLBOARDGUI.AlwaysOnTop = false | |
2433 | local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI) | |
2434 | TEXTLABEL.BackgroundTransparency = 1 | |
2435 | TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0) | |
2436 | TEXTLABEL.Text = TEXT | |
2437 | TEXTLABEL.Font = "SciFi" | |
2438 | TEXTLABEL.FontSize="Size42" | |
2439 | TEXTLABEL.TextColor3 = ("255,215,0") | |
2440 | TEXTLABEL.TextStrokeTransparency = 1 | |
2441 | TEXTLABEL.TextScaled = true | |
2442 | TEXTLABEL.TextWrapped = true | |
2443 | coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL) | |
2444 | if LABELTYPE == "Normal" then | |
2445 | for i = 1, 30 do | |
2446 | Swait() | |
2447 | STATPART.Position = STATPART.Position + VT(0, (15-i)/10 ,0) | |
2448 | TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/30) | |
2449 | end | |
2450 | elseif LABELTYPE == "Debuff" then | |
2451 | for i = 1, 30 do | |
2452 | Swait() | |
2453 | STATPART.Position = STATPART.Position - VT(0, i/10 ,0) | |
2454 | TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/30) | |
2455 | end | |
2456 | elseif LABELTYPE == "Shock" then | |
2457 | local ORIGIN = STATPART.Position | |
2458 | for i = 1, 30 do | |
2459 | Swait() | |
2460 | STATPART.Position = ORIGIN + VT(MRANDOM(-2,2),MRANDOM(-2,2),MRANDOM(-2,2)) | |
2461 | TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/30) | |
2462 | end | |
2463 | end | |
2464 | THEPART.Parent = nil | |
2465 | end),STATPART, BODYPOSITION, TEXTLABEL) | |
2466 | end | |
2467 | ||
2468 | function StatLabel(CFRAME, TEXT, COLOR) | |
2469 | local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT()) | |
2470 | STATPART.CFrame = CF(CFRAME.p,CFRAME.p+VT(MRANDOM(-5,5),MRANDOM(0,5),MRANDOM(-5,5))) | |
2471 | local BODYGYRO = IT("BodyGyro", STATPART) | |
2472 | game:GetService("Debris"):AddItem(STATPART ,5) | |
2473 | local BILLBOARDGUI = Instance.new("BillboardGui", STATPART) | |
2474 | BILLBOARDGUI.Adornee = STATPART | |
2475 | BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0) | |
2476 | BILLBOARDGUI.StudsOffset = VT(-2, 2, 0) | |
2477 | BILLBOARDGUI.AlwaysOnTop = false | |
2478 | local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI) | |
2479 | TEXTLABEL.BackgroundTransparency = 1 | |
2480 | TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0) | |
2481 | TEXTLABEL.Text = TEXT | |
2482 | TEXTLABEL.Font = SKILLFONT | |
2483 | TEXTLABEL.FontSize="Size42" | |
2484 | TEXTLABEL.TextColor3 = COLOR | |
2485 | TEXTLABEL.TextStrokeTransparency = 0 | |
2486 | TEXTLABEL.TextScaled = true | |
2487 | TEXTLABEL.TextWrapped = true | |
2488 | coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL) | |
2489 | for i = 1, 50 do | |
2490 | Swait() | |
2491 | STATPART.CFrame = STATPART.CFrame * CF(0,0,-0.2) | |
2492 | TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/50) | |
2493 | TEXTLABEL.TextStrokeTransparency = TEXTLABEL.TextTransparency | |
2494 | end | |
2495 | THEPART.Parent = nil | |
2496 | end),STATPART, TEXTLABEL) | |
2497 | end | |
2498 | ||
2499 | function StatLabel(CFRAME, TEXT, COLOR) | |
2500 | local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT()) | |
2501 | STATPART.CFrame = CF(CFRAME.p,CFRAME.p+VT(MRANDOM(-5,5),MRANDOM(0,5),MRANDOM(-5,5))) | |
2502 | local BODYGYRO = IT("BodyGyro", STATPART) | |
2503 | game:GetService("Debris"):AddItem(STATPART ,5) | |
2504 | local BILLBOARDGUI = Instance.new("BillboardGui", STATPART) | |
2505 | BILLBOARDGUI.Adornee = STATPART | |
2506 | BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0) | |
2507 | BILLBOARDGUI.StudsOffset = VT(-2, 2, 0) | |
2508 | BILLBOARDGUI.AlwaysOnTop = false | |
2509 | local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI) | |
2510 | TEXTLABEL.BackgroundTransparency = 1 | |
2511 | TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0) | |
2512 | TEXTLABEL.Text = TEXT | |
2513 | TEXTLABEL.Font = SKILLFONT | |
2514 | TEXTLABEL.FontSize="Size42" | |
2515 | TEXTLABEL.TextColor3 = COLOR | |
2516 | TEXTLABEL.TextStrokeTransparency = 0 | |
2517 | TEXTLABEL.TextScaled = true | |
2518 | TEXTLABEL.TextWrapped = true | |
2519 | coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL) | |
2520 | for i = 1, 50 do | |
2521 | Swait() | |
2522 | STATPART.CFrame = STATPART.CFrame * CF(0,0,-0.2) | |
2523 | TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/50) | |
2524 | TEXTLABEL.TextStrokeTransparency = TEXTLABEL.TextTransparency | |
2525 | end | |
2526 | THEPART.Parent = nil | |
2527 | end),STATPART, TEXTLABEL) | |
2528 | end | |
2529 | ||
2530 | function StatLabel(CFRAME, TEXT, COLOR) | |
2531 | local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT()) | |
2532 | STATPART.CFrame = CF(CFRAME.p,CFRAME.p+VT(MRANDOM(-5,5),MRANDOM(0,5),MRANDOM(-5,5))) | |
2533 | local BODYGYRO = IT("BodyGyro", STATPART) | |
2534 | game:GetService("Debris"):AddItem(STATPART ,5) | |
2535 | local BILLBOARDGUI = Instance.new("BillboardGui", STATPART) | |
2536 | BILLBOARDGUI.Adornee = STATPART | |
2537 | BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0) | |
2538 | BILLBOARDGUI.StudsOffset = VT(-2, 2, 0) | |
2539 | BILLBOARDGUI.AlwaysOnTop = false | |
2540 | local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI) | |
2541 | TEXTLABEL.BackgroundTransparency = 1 | |
2542 | TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0) | |
2543 | TEXTLABEL.Text = TEXT | |
2544 | TEXTLABEL.Font = SKILLFONT | |
2545 | TEXTLABEL.FontSize="Size42" | |
2546 | TEXTLABEL.TextColor3 = COLOR | |
2547 | TEXTLABEL.TextStrokeTransparency = 1 | |
2548 | TEXTLABEL.TextScaled = true | |
2549 | TEXTLABEL.TextWrapped = true | |
2550 | coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL) | |
2551 | for i = 1, 50 do | |
2552 | Swait() | |
2553 | STATPART.CFrame = STATPART.CFrame * CF(0,0,-0.2) | |
2554 | TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/50) | |
2555 | end | |
2556 | THEPART.Parent = nil | |
2557 | end),STATPART, TEXTLABEL) | |
2558 | end | |
2559 | --//=================================\\ | |
2560 | --|| DAMAGING | |
2561 | --\\=================================// | |
2562 | function killnearest(position,range,maxstrength,direction) | |
2563 | for i,v in ipairs(workspace:GetChildren()) do | |
2564 | local body = v:GetChildren() | |
2565 | for part = 1, #body do | |
2566 | if((body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then | |
2567 | if(body[part].Position - position).Magnitude < range then | |
2568 | if v.ClassName == "Model" then | |
2569 | --v:BreakJoints() | |
2570 | end | |
2571 | local POS = position | |
2572 | coroutine.resume(coroutine.create(function() | |
2573 | body[part].Anchored = true | |
2574 | body[part].Parent = Effects | |
2575 | body[part].CanCollide = true | |
2576 | local SIZE = body[part].Size | |
2577 | body[part].Material = "Neon" | |
2578 | CreateSound("952306739", body[part], 2, MRANDOM(7, 12) / 10) | |
2579 | for i = 1, 75 do | |
2580 | Swait() | |
2581 | body[part].Color = C3(MRANDOM(0,100)/100,MRANDOM(0,100)/100,MRANDOM(0,100)/100) | |
2582 | body[part].Size = VT(SIZE.X+MRANDOM(-2,2),SIZE.Y+MRANDOM(-2,2),SIZE.Z+MRANDOM(-2,2)) | |
2583 | end | |
2584 | coroutine.resume(coroutine.create(function() | |
2585 | while true do | |
2586 | Swait() | |
2587 | body[part].Color = C3(MRANDOM(0,100)/100,MRANDOM(0,100)/100,MRANDOM(0,100)/100) | |
2588 | body[part].Size = VT(SIZE.X+MRANDOM(-2,2),SIZE.Y+MRANDOM(-2,2),SIZE.Z+MRANDOM(-2,2)) | |
2589 | end | |
2590 | end)) | |
2591 | body[part].Anchored = false | |
2592 | body[part].Velocity = direction.lookVector*maxstrength | |
2593 | end)) | |
2594 | end | |
2595 | end | |
2596 | end | |
2597 | if v.ClassName == "Part" then | |
2598 | if v.Anchored == false and (v.Position - position).Magnitude < range then | |
2599 | local POS = position | |
2600 | coroutine.resume(coroutine.create(function() | |
2601 | v.Anchored = true | |
2602 | v.Parent = Effects | |
2603 | local SIZE = v.Size | |
2604 | v.Material = "Neon" | |
2605 | CreateSound("952306739", v, 2, MRANDOM(7, 12) / 10) | |
2606 | for i = 1, 75 do | |
2607 | Swait() | |
2608 | v.Color = C3(MRANDOM(0,100)/100,MRANDOM(0,100)/100,MRANDOM(0,100)/100) | |
2609 | v.Size = VT(SIZE.X+MRANDOM(-2,2),SIZE.Y+MRANDOM(-2,2),SIZE.Z+MRANDOM(-2,2)) | |
2610 | end | |
2611 | coroutine.resume(coroutine.create(function() | |
2612 | while true do | |
2613 | Swait() | |
2614 | v.Color = C3(MRANDOM(0,100)/100,MRANDOM(0,100)/100,MRANDOM(0,100)/100) | |
2615 | v.Size = VT(SIZE.X+MRANDOM(-2,2),SIZE.Y+MRANDOM(-2,2),SIZE.Z+MRANDOM(-2,2)) | |
2616 | end | |
2617 | end)) | |
2618 | v.Anchored = false | |
2619 | v.Velocity = direction.lookVector*maxstrength | |
2620 | end)) | |
2621 | end | |
2622 | end | |
2623 | end | |
2624 | end | |
2625 | ||
2626 | function Kill(Char) | |
2627 | local NewCharacter = IT("Model",Effects) | |
2628 | NewCharacter.Name = "Ow im ded ;-;" | |
2629 | for _, c in pairs(Char:GetDescendants()) do | |
2630 | if c:IsA("BasePart") and c.Transparency == 0 then | |
2631 | if c.Parent == Char then | |
2632 | getbloody(c,5) | |
2633 | end | |
2634 | c:BreakJoints() | |
2635 | c.Material = "Glass" | |
2636 | c.Color = C3(0.5,0,0) | |
2637 | c.CanCollide = true | |
2638 | c.Transparency = 0.3 | |
2639 | if c:FindFirstChildOfClass("SpecialMesh") then | |
2640 | c:FindFirstChildOfClass("SpecialMesh").TextureId = "" | |
2641 | end | |
2642 | if c.Name == "Head" then | |
2643 | c:ClearAllChildren() | |
2644 | c.Size = VT(c.Size.Y,c.Size.Y,c.Size.Y) | |
2645 | end | |
2646 | if c.ClassName == "MeshPart" then | |
2647 | c.TextureID = "" | |
2648 | end | |
2649 | if c:FindFirstChildOfClass("BodyPosition") then | |
2650 | c:FindFirstChildOfClass("BodyPosition"):remove() | |
2651 | end | |
2652 | if c:FindFirstChildOfClass("ParticleEmitter") then | |
2653 | c:FindFirstChildOfClass("ParticleEmitter"):remove() | |
2654 | end | |
2655 | c.Parent = NewCharacter | |
2656 | c.Name = "DeadPart" | |
2657 | c.Velocity = VT(MRANDOM(-45,45),MRANDOM(-45,45),MRANDOM(-45,45))/15 | |
2658 | c.RotVelocity = VT(MRANDOM(-45,45),MRANDOM(-15,85),MRANDOM(-45,45)) | |
2659 | end | |
2660 | end | |
2661 | Char:remove() | |
2662 | Debris:AddItem(NewCharacter,5) | |
2663 | end | |
2664 | ||
2665 | function ApplyAoE(POSITION,RANGE,BRUTAL) | |
2666 | local CHILDREN = workspace:GetDescendants() | |
2667 | for index, CHILD in pairs(CHILDREN) do | |
2668 | if CHILD.ClassName == "Model" and CHILD ~= Character then | |
2669 | local HUM = CHILD:FindFirstChildOfClass("Humanoid") | |
2670 | if HUM then | |
2671 | local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso") | |
2672 | if TORSO then | |
2673 | if (TORSO.Position - POSITION).Magnitude <= RANGE then | |
2674 | if BRUTAL == true then | |
2675 | Kill(CHILD) | |
2676 | else | |
2677 | CHILD:BreakJoints() | |
2678 | end | |
2679 | end | |
2680 | end | |
2681 | end | |
2682 | end | |
2683 | end | |
2684 | end | |
2685 | ||
2686 | function Kill(Char) | |
2687 | local NewCharacter = IT("Model",Effects) | |
2688 | NewCharacter.Name = "Ow im ded ;-;" | |
2689 | for _, c in pairs(Char:GetDescendants()) do | |
2690 | if c:IsA("BasePart") and c.Transparency == 0 then | |
2691 | if c.Parent == Char then | |
2692 | getbloody(c,5) | |
2693 | end | |
2694 | c:BreakJoints() | |
2695 | c.Material = "Glass" | |
2696 | c.Color = C3(0.5,0,0) | |
2697 | c.CanCollide = true | |
2698 | c.Transparency = 0.3 | |
2699 | if c:FindFirstChildOfClass("SpecialMesh") then | |
2700 | c:FindFirstChildOfClass("SpecialMesh").TextureId = "" | |
2701 | end | |
2702 | if c.Name == "Head" then | |
2703 | c:ClearAllChildren() | |
2704 | c.Size = VT(c.Size.Y,c.Size.Y,c.Size.Y) | |
2705 | end | |
2706 | if c.ClassName == "MeshPart" then | |
2707 | c.TextureID = "" | |
2708 | end | |
2709 | if c:FindFirstChildOfClass("BodyPosition") then | |
2710 | c:FindFirstChildOfClass("BodyPosition"):remove() | |
2711 | end | |
2712 | if c:FindFirstChildOfClass("ParticleEmitter") then | |
2713 | c:FindFirstChildOfClass("ParticleEmitter"):remove() | |
2714 | end | |
2715 | c.Parent = NewCharacter | |
2716 | c.Name = "DeadPart" | |
2717 | c.Velocity = VT(MRANDOM(-45,45),MRANDOM(-45,45),MRANDOM(-45,45))/15 | |
2718 | c.RotVelocity = VT(MRANDOM(-45,45),MRANDOM(-15,85),MRANDOM(-45,45)) | |
2719 | end | |
2720 | end | |
2721 | Char:remove() | |
2722 | Debris:AddItem(NewCharacter,5) | |
2723 | end | |
2724 | ||
2725 | function ApplyAoE(POSITION,RANGE,BRUTAL) | |
2726 | local CHILDREN = workspace:GetDescendants() | |
2727 | for index, CHILD in pairs(CHILDREN) do | |
2728 | if CHILD.ClassName == "Model" and CHILD ~= Character then | |
2729 | local HUM = CHILD:FindFirstChildOfClass("Humanoid") | |
2730 | if HUM then | |
2731 | local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso") | |
2732 | if TORSO then | |
2733 | if (TORSO.Position - POSITION).Magnitude <= RANGE then | |
2734 | if BRUTAL == true then | |
2735 | Kill(CHILD) | |
2736 | else | |
2737 | CHILD:BreakJoints() | |
2738 | end | |
2739 | end | |
2740 | end | |
2741 | end | |
2742 | end | |
2743 | end | |
2744 | end | |
2745 | ||
2746 | function Kill(Char) | |
2747 | local NewCharacter = IT("Model",Effects) | |
2748 | NewCharacter.Name = "Ow im ded ;-;" | |
2749 | for _, c in pairs(Char:GetDescendants()) do | |
2750 | if c:IsA("BasePart") and c.Transparency == 0 then | |
2751 | if c.Parent == Char then | |
2752 | getbloody(c,5) | |
2753 | end | |
2754 | c:BreakJoints() | |
2755 | c.Material = "Glass" | |
2756 | c.Color = C3(0.5,0,0) | |
2757 | c.CanCollide = true | |
2758 | c.Transparency = 0.3 | |
2759 | if c:FindFirstChildOfClass("SpecialMesh") then | |
2760 | c:FindFirstChildOfClass("SpecialMesh").TextureId = "" | |
2761 | end | |
2762 | if c.Name == "Head" then | |
2763 | c:ClearAllChildren() | |
2764 | c.Size = VT(c.Size.Y,c.Size.Y,c.Size.Y) | |
2765 | end | |
2766 | if c.ClassName == "MeshPart" then | |
2767 | c.TextureID = "" | |
2768 | end | |
2769 | if c:FindFirstChildOfClass("BodyPosition") then | |
2770 | c:FindFirstChildOfClass("BodyPosition"):remove() | |
2771 | end | |
2772 | if c:FindFirstChildOfClass("ParticleEmitter") then | |
2773 | c:FindFirstChildOfClass("ParticleEmitter"):remove() | |
2774 | end | |
2775 | c.Parent = NewCharacter | |
2776 | c.Name = "DeadPart" | |
2777 | c.Velocity = VT(MRANDOM(-45,45),MRANDOM(-45,45),MRANDOM(-45,45))/15 | |
2778 | c.RotVelocity = VT(MRANDOM(-45,45),MRANDOM(-15,85),MRANDOM(-45,45)) | |
2779 | end | |
2780 | end | |
2781 | Char:remove() | |
2782 | Debris:AddItem(NewCharacter,5) | |
2783 | end | |
2784 | ||
2785 | function ApplyAoE(POSITION,RANGE,BRUTAL) | |
2786 | local CHILDREN = workspace:GetDescendants() | |
2787 | for index, CHILD in pairs(CHILDREN) do | |
2788 | if CHILD.ClassName == "Model" and CHILD ~= Character then | |
2789 | local HUM = CHILD:FindFirstChildOfClass("Humanoid") | |
2790 | if HUM then | |
2791 | local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso") | |
2792 | if TORSO then | |
2793 | if (TORSO.Position - POSITION).Magnitude <= RANGE then | |
2794 | if BRUTAL == true then | |
2795 | Kill(CHILD) | |
2796 | else | |
2797 | CHILD:BreakJoints() | |
2798 | end | |
2799 | end | |
2800 | end | |
2801 | end | |
2802 | end | |
2803 | end | |
2804 | end | |
2805 | ||
2806 | function BulletDetection(FROM,TO,BRUTAL) | |
2807 | local AIMHIT,AIMPOS,NORMAL = CastProperRay(FROM,TO,2000,Character) | |
2808 | coroutine.resume(coroutine.create(function() | |
2809 | if AIMHIT ~= nil then | |
2810 | if AIMHIT.Parent ~= Character then | |
2811 | if AIMHIT.Parent:FindFirstChildOfClass("Humanoid") or AIMHIT.Parent.Parent:FindFirstChildOfClass("Humanoid") then | |
2812 | if AIMHIT.Parent:FindFirstChildOfClass("Humanoid") then | |
2813 | if BRUTAL == true then | |
2814 | Kill(AIMHIT.Parent) | |
2815 | else | |
2816 | getbloody(AIMHIT,15) | |
2817 | AIMHIT.Parent:BreakJoints() | |
2818 | if AIMHIT.Name == "Head" then | |
2819 | AIMHIT.Name = "HEADSHOT" | |
2820 | AIMHIT:remove() | |
2821 | end | |
2822 | end | |
2823 | else | |
2824 | if BRUTAL == true then | |
2825 | Kill(AIMHIT.Parent.Parent) | |
2826 | else | |
2827 | AIMHIT.Parent.Parent:BreakJoints() | |
2828 | end | |
2829 | end | |
2830 | end | |
2831 | end | |
2832 | end | |
2833 | end)) | |
2834 | SpawnTrail(FROM,AIMPOS) | |
2835 | return AIMHIT,AIMPOS,NORMAL | |
2836 | end | |
2837 | ||
2838 | function ApplyDamage(Humanoid,Damage,CritRate,CritMultiplier,DoesOneShot) | |
2839 | coroutine.resume(coroutine.create(function() | |
2840 | local defence = Instance.new("BoolValue",Humanoid.Parent) | |
2841 | defence.Name = ("HitBy"..Player.Name) | |
2842 | game:GetService("Debris"):AddItem(defence, 0.001) | |
2843 | Damage = Damage * DAMAGEMULTIPLIER | |
2844 | if Humanoid.Health ~= 0 then | |
2845 | local CritChance = MRANDOM(1,100) | |
2846 | if CritChance < CritRate + 1 then | |
2847 | Damage = Damage*CritMultiplier | |
2848 | end | |
2849 | if Damage > Humanoid.Health then | |
2850 | Damage = math.ceil(Humanoid.Health) | |
2851 | if Damage == 0 then | |
2852 | Damage = 0.1 | |
2853 | end | |
2854 | end | |
2855 | if DoesOneShot == false then | |
2856 | for _, c in pairs(Humanoid.Parent:GetChildren()) do | |
2857 | if c.Name ~= "HumanoidRootPart" and c.Name ~= "Torso" and c.Name ~= "Head" and c.Name ~= "UpperTorso" and c.Name ~= "LowerTorso" then | |
2858 | if c.ClassName == "Part" or c.ClassName == "MeshPart" then | |
2859 | if MRANDOM(1,20) == 1 then | |
2860 | Shatter(c) | |
2861 | end | |
2862 | end | |
2863 | end | |
2864 | end | |
2865 | Humanoid.Health = Humanoid.Health - Damage | |
2866 | if Humanoid.Parent:FindFirstChild("Head") then | |
2867 | CreateSound(HITPLAYERSOUNDS[MRANDOM(1,#HITPLAYERSOUNDS)], Humanoid.Parent.Head, 5, 1) | |
2868 | if CritChance < CritRate + 1 then | |
2869 | StatLabel(Humanoid.Parent.Head.CFrame * CF(0, 0 + (Humanoid.Parent.Head.Size.z - 1), 0), "CRIT//"..Damage, C3(1, 0, 0)) | |
2870 | else | |
2871 | StatLabel(Humanoid.Parent.Head.CFrame * CF(0, 0 + (Humanoid.Parent.Head.Size.z - 1), 0), Damage, C3(0, 0, 0)) | |
2872 | end | |
2873 | end | |
2874 | elseif DoesOneShot == true then | |
2875 | --print("["..Humanoid.Parent.Name.."]: One shot!? Really!?!?") | |
2876 | Humanoid.Parent:BreakJoints() | |
2877 | if Humanoid.Parent:FindFirstChild("Head") then | |
2878 | StatLabel(Humanoid.Parent.Head.CFrame * CF(0, 0 + (Humanoid.Parent.Head.Size.z - 1), 0), "INF", C3(1, 0, 0)) | |
2879 | end | |
2880 | for _, c in pairs(Humanoid.Parent:GetChildren()) do | |
2881 | if c.ClassName == "Part" or c.ClassName == "MeshPart" then | |
2882 | Shatter(c) | |
2883 | end | |
2884 | end | |
2885 | end | |
2886 | if Humanoid.Health == 0 then | |
2887 | --print("["..Humanoid.Parent.Name.."]: It's like stepping on glass, but worse!") | |
2888 | SpawnSoul(Humanoid) | |
2889 | for _, c in pairs(Humanoid.Parent:GetChildren()) do | |
2890 | if c.ClassName == "Part" or c.ClassName == "MeshPart" then | |
2891 | Shatter(c) | |
2892 | end | |
2893 | end | |
2894 | end | |
2895 | end | |
2896 | end)) | |
2897 | end | |
2898 | ||
2899 | function AoEDamage(position,radius,min,max,maxstrength,critrate,critmultiplier,BESERK) | |
2900 | local dmg = math.random(10000,100000) | |
2901 | for i,v in ipairs(workspace:GetChildren()) do | |
2902 | if v:FindFirstChild("HitBy"..Player.Name) == nil then | |
2903 | local body = v:GetChildren() | |
2904 | for part = 1, #body do | |
2905 | if(v:FindFirstChild("HitBy"..Player.Name) == nil and (body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then | |
2906 | if(body[part].Position - position).Magnitude < radius then | |
2907 | if v.ClassName == "Model" then | |
2908 | if v:FindFirstChildOfClass("Humanoid") then | |
2909 | ApplyDamage(v:FindFirstChildOfClass("Humanoid"),dmg,critrate,critmultiplier,BESERK) | |
2910 | local bv = Instance.new("BodyVelocity") | |
2911 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
2912 | bv.velocity = CF(position,body[part].Position).lookVector*maxstrength | |
2913 | bv.Parent = body[part] | |
2914 | Debris:AddItem(bv,0.2) | |
2915 | end | |
2916 | end | |
2917 | end | |
2918 | end | |
2919 | end | |
2920 | end | |
2921 | if v:FindFirstChild("HitBy"..Player.Name) then | |
2922 | v:FindFirstChild("HitBy"..Player.Name):remove() | |
2923 | end | |
2924 | end | |
2925 | end | |
2926 | ||
2927 | function Banish(Foe) | |
2928 | if Foe then | |
2929 | coroutine.resume(coroutine.create(function() | |
2930 | --if game.Players:FindFirstChild(Foe.Name) then | |
2931 | table.insert(TOBANISH,Foe.Name) | |
2932 | printbye(Foe.Name) | |
2933 | --end | |
2934 | Foe.Archivable = true | |
2935 | local CLONE = Foe:Clone() | |
2936 | Foe:Destroy() | |
2937 | CLONE.Parent = Effects | |
2938 | CLONE:BreakJoints() | |
2939 | local MATERIALS = {"Glass","Neon"} | |
2940 | for _, c in pairs(CLONE:GetDescendants()) do | |
2941 | if c:IsA("BasePart") then | |
2942 | if c.Name == "Torso" or c.Name == "UpperTorso" or c == CLONE.PrimaryPart then | |
2943 | CreateSound(340722848, c, 10, 1, false) | |
2944 | end | |
2945 | c.Anchored = true | |
2946 | c.Transparency = c.Transparency + 0.2 | |
2947 | c.Material = MATERIALS[MRANDOM(1,2)] | |
2948 | c.Color = C3(1,0,0) | |
2949 | if c.ClassName == "MeshPart" then | |
2950 | c.TextureID = "" | |
2951 | end | |
2952 | if c:FindFirstChildOfClass("SpecialMesh") then | |
2953 | c:FindFirstChildOfClass("SpecialMesh").TextureId = "" | |
2954 | end | |
2955 | if c:FindFirstChildOfClass("Decal") then | |
2956 | c:FindFirstChildOfClass("Decal"):remove() | |
2957 | end | |
2958 | c.Name = "Banished" | |
2959 | c.CanCollide = false | |
2960 | else | |
2961 | c:remove() | |
2962 | end | |
2963 | end | |
2964 | local A = false | |
2965 | for i = 1, 35 do | |
2966 | if A == false then | |
2967 | A = true | |
2968 | elseif A == true then | |
2969 | A = false | |
2970 | end | |
2971 | for _, c in pairs(CLONE:GetDescendants()) do | |
2972 | if c:IsA("BasePart") then | |
2973 | c.Anchored = true | |
2974 | c.Material = MATERIALS[MRANDOM(1,2)] | |
2975 | c.Transparency = c.Transparency + 0.8/35 | |
2976 | if A == false then | |
2977 | c.CFrame = c.CFrame*CF(MRANDOM(-45,45)/45,MRANDOM(-45,45)/45,MRANDOM(-45,45)/45) | |
2978 | elseif A == true then | |
2979 | c.CFrame = c.CFrame*CF(MRANDOM(-45,45)/45,MRANDOM(-45,45)/45,MRANDOM(-45,45)/45) | |
2980 | end | |
2981 | end | |
2982 | end | |
2983 | Swait() | |
2984 | end | |
2985 | CLONE:remove() | |
2986 | end)) | |
2987 | end | |
2988 | end | |
2989 | ||
2990 | function ApplyAoE(POSITION,RANGE,ISBANISH) | |
2991 | local CHILDREN = workspace:GetDescendants() | |
2992 | for index, CHILD in pairs(CHILDREN) do | |
2993 | if CHILD.ClassName == "Model" and CHILD ~= Character then | |
2994 | local HUM = CHILD:FindFirstChildOfClass("Humanoid") | |
2995 | if HUM then | |
2996 | local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso") | |
2997 | if TORSO then | |
2998 | if (TORSO.Position - POSITION).Magnitude <= RANGE then | |
2999 | if ISBANISH == true then | |
3000 | Banish(CHILD) | |
3001 | else | |
3002 | if ISBANISH == "Gravity" then | |
3003 | HUM.PlatformStand = true | |
3004 | if TORSO:FindFirstChild("V3BanishForce"..Player.Name) then | |
3005 | local grav = Instance.new("BodyPosition",TORSO) | |
3006 | grav.D = 15 | |
3007 | grav.P = 20000 | |
3008 | grav.maxForce = Vector3.new(math.huge,math.huge,math.huge) | |
3009 | grav.position = TORSO.Position | |
3010 | grav.Name = "V3BanishForce"..Player.Name | |
3011 | else | |
3012 | TORSO:FindFirstChild("V3BanishForce"..Player.Name).position = TORSO.Position+VT(0,0.3,0) | |
3013 | TORSO.RotVelocity = VT(MRANDOM(-25,25),MRANDOM(-25,25),MRANDOM(-25,25)) | |
3014 | end | |
3015 | else | |
3016 | HUM.PlatformStand = false | |
3017 | end | |
3018 | end | |
3019 | elseif ISBANISH == "Gravity" then | |
3020 | if TORSO:FindFirstChild("V3BanishForce"..Player.Name) then | |
3021 | TORSO:FindFirstChild("V3BanishForce"..Player.Name):remove() | |
3022 | HUM.PlatformStand = false | |
3023 | end | |
3024 | end | |
3025 | end | |
3026 | end | |
3027 | end | |
3028 | end | |
3029 | end | |
3030 | ||
3031 | --//=================================\\ | |
3032 | --|| ATTACK FUNCTIONS AND STUFF | |
3033 | --\\=================================// | |
3034 | function FireArc(Part,ToLocation,AmountOfTime,Height,DoesCourontine) | |
3035 | if DoesCourontine == false then | |
3036 | local Direction = CF(Part.Position,ToLocation) | |
3037 | local Distance = (Part.Position - ToLocation).magnitude | |
3038 | for i = 1, AmountOfTime do | |
3039 | Swait() | |
3040 | Part.CFrame = Direction*CF(0,(AmountOfTime/200)+((AmountOfTime/Height)-((i*2)/Height)),-Distance/AmountOfTime) | |
3041 | Direction = Part.CFrame | |
3042 | end | |
3043 | Part:remove() | |
3044 | elseif DoesCourontine == true then | |
3045 | coroutine.resume(coroutine.create(function() | |
3046 | local Direction = CF(Part.Position,ToLocation) | |
3047 | local Distance = (Part.Position - ToLocation).magnitude | |
3048 | for i = 1, AmountOfTime do | |
3049 | Swait() | |
3050 | Part.CFrame = Direction*CF(0,(AmountOfTime/200)+((AmountOfTime/Height)-((i*2)/Height)),-Distance/AmountOfTime) | |
3051 | Direction = Part.CFrame | |
3052 | end | |
3053 | Part:remove() | |
3054 | end)) | |
3055 | end | |
3056 | end | |
3057 | ||
3058 | function Slice(KIND,SIZE,WAIT,CFRAME,COLOR,GROW) | |
3059 | local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(1,1,1), true) | |
3060 | local mesh = nil | |
3061 | if KIND == "Base" then | |
3062 | mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "448386996", "", VT(0,SIZE/10,SIZE/10), VT(0,0,0)) | |
3063 | elseif KIND == "Thin" then | |
3064 | mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662586858", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0)) | |
3065 | elseif KIND == "Round" then | |
3066 | mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662585058", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0)) | |
3067 | end | |
3068 | wave.CFrame = CFRAME | |
3069 | coroutine.resume(coroutine.create(function(PART) | |
3070 | for i = 1, WAIT do | |
3071 | Swait() | |
3072 | mesh.Scale = mesh.Scale + GROW/10 | |
3073 | wave.Transparency = wave.Transparency + (0.5/WAIT) | |
3074 | if wave.Transparency > 0.99 then | |
3075 | wave:remove() | |
3076 | end | |
3077 | end | |
3078 | end)) | |
3079 | end | |
3080 | ||
3081 | function killnearest(position,range,maxstrength) | |
3082 | for i,v in ipairs(workspace:GetChildren()) do | |
3083 | local body = v:GetChildren() | |
3084 | for part = 1, #body do | |
3085 | if((body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then | |
3086 | if(body[part].Position - position).Magnitude < range then | |
3087 | if v.ClassName == "Model" then | |
3088 | v:BreakJoints() | |
3089 | end | |
3090 | --table.insert(Effects2,{body[part],"Disappear",0.02,2,2,2,2}) | |
3091 | local bv = Instance.new("BodyVelocity") | |
3092 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
3093 | bv.velocity = CF(position,body[part].Position).lookVector*maxstrength | |
3094 | bv.Parent = body[part] | |
3095 | Debris:AddItem(bv,0.2) | |
3096 | end | |
3097 | end | |
3098 | end | |
3099 | if v.ClassName == "Part" then | |
3100 | if v.Anchored == false and (v.Position - position).Magnitude < range then | |
3101 | --table.insert(Effects2,{v,"Disappear",0.02,2,2,2,2}) | |
3102 | v.Velocity = CFrame.new(position,v.Position).lookVector*5*maxstrength | |
3103 | end | |
3104 | end | |
3105 | end | |
3106 | end | |
3107 | ||
3108 | function Supernova() | |
3109 | local HITFLOOR,HITPOS,NORMAL = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 7 * Player_Size, Character) | |
3110 | if HITFLOOR ~= nil then | |
3111 | local HITBODIES = {} | |
3112 | ATTACK = true | |
3113 | Rooted = true | |
3114 | local ABSOLUTE = CreatePart(3, Effects, "Neon", 0, 1, "Relly red", "Star", VT(0,0,0)) | |
3115 | MakeForm(ABSOLUTE,"Ball") | |
3116 | CreateSound("429459101", ABSOLUTE, 10, 1) | |
3117 | for i=0, 4, 0.1 / Animation_Speed do | |
3118 | Swait() | |
3119 | ABSOLUTE.Size = ABSOLUTE.Size + VT(0.2,0.2,0.2) | |
3120 | ABSOLUTE.CFrame = RootPart.CFrame*CF(0,5+(ABSOLUTE.Size.Y/2),0) | |
3121 | ABSOLUTE.Transparency = ABSOLUTE.Transparency - 0.01 | |
3122 | local CHARGE = CreatePart(3, Effects, "Neon", 0, 0, "Really red", "Star", VT(1,1,1)) | |
3123 | MakeForm(CHARGE,"Ball") | |
3124 | CHARGE.Color = C3(1,0,0) | |
3125 | CHARGE.CFrame = CF(RootPart.Position) * CF(MRANDOM(-15,15),-6,MRANDOM(-15,15)) | |
3126 | FireArc(CHARGE,ABSOLUTE.Position,45,45,true) | |
3127 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(4 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(15 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed) | |
3128 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-25 + 4.5 * SIN(SINE / 12)), RAD(25), RAD(-15 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed) | |
3129 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 1.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(170), RAD(0 - 7.5 * SIN(SINE / 12)), RAD(-12 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
3130 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(0 + 7.5 * SIN(SINE / 12)), RAD(-12 - 7.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
3131 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed) | |
3132 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed) | |
3133 | end | |
3134 | CreateSound("907330103", Head, 10, 1.2) | |
3135 | for i = 1, 75 do | |
3136 | Swait() | |
3137 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(4 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(15 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed) | |
3138 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-25 + 4.5 * SIN(SINE / 12)), RAD(25), RAD(-15 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed) | |
3139 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 1.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(170), RAD(0 - 7.5 * SIN(SINE / 12)), RAD(-12 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
3140 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(0 + 7.5 * SIN(SINE / 12)), RAD(-12 - 7.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
3141 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed) | |
3142 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed) | |
3143 | end | |
3144 | coroutine.resume(coroutine.create(function() | |
3145 | for i = 1, 13 do | |
3146 | for e = 1, 8 do | |
3147 | Swait() | |
3148 | MagicSphere(VT(1,1,1),15,CF(ABSOLUTE.Position)*CF(MRANDOM(-45,45),MRANDOM(-45,45),MRANDOM(-45,45)),C3(255,0,0),VT(0,0,0)) | |
3149 | CreateSwirl(ABSOLUTE.Size/2,15,CF(HITPOS),true,15,BRICKC"Reakky red".Color,VT(i,0.3,i)*2) | |
3150 | end | |
3151 | for i = 1, 5 do | |
3152 | Slice("Round",0,35,CF(ABSOLUTE.Position)*ANGLES(RAD(MRANDOM(-18,18)),RAD(MRANDOM(-180,180)),RAD(MRANDOM(-18,18))),C3(1,1,1),VT(i,0,i)/3) | |
3153 | Slice("Thin",i,55,ABSOLUTE.CFrame * CF(0,-1.1,0) * ANGLES(RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180))),C3(255,0,0),VT(0,0,0)) | |
3154 | end | |
3155 | CreateSwirl(ABSOLUTE.Size/2,25,CF(ABSOLUTE.Position),true,-25,BRICKC"Relly red".Color,VT(i,i*2,i)) | |
3156 | CreateSwirl(ABSOLUTE.Size/2,55,CF(ABSOLUTE.Position),true,25,C3(255,0,0),VT(i,i*2,i)) | |
3157 | CreateSound("168586621", ABSOLUTE, 4, 0.8) | |
3158 | CreateSound("201858144", ABSOLUTE, 10, 0.8) | |
3159 | killnearest(ABSOLUTE.Position,i*18,i) | |
3160 | ABSOLUTE.Size = ABSOLUTE.Size*0.9 | |
3161 | MagicSphere(ABSOLUTE.Size,25,CF(ABSOLUTE.Position),BRICKC"Relly red".Color,VT(i,i,i)/1.1) | |
3162 | MagicSphere(ABSOLUTE.Size,45,CF(ABSOLUTE.Position),C3(255,0,0),VT(i,i,i)) | |
3163 | end | |
3164 | ABSOLUTE.Transparency = 1 | |
3165 | Debris:AddItem(ABSOLUTE,10) | |
3166 | end)) | |
3167 | ATTACK = false | |
3168 | Rooted = false | |
3169 | end | |
3170 | end | |
3171 | ||
3172 | function DeathAgreement() | |
3173 | ATTACK = true | |
3174 | Rooted = false | |
3175 | local SPEED = Speed | |
3176 | Speed = 8 | |
3177 | CreateSound("357202141", RightArm, 10, 1.1) | |
3178 | for i=0, 0, 0.01 / Animation_Speed do | |
3179 | Swait() | |
3180 | turnto(Mouse.Hit.p) | |
3181 | MagicSphere(VT(1,1,1),15,RightArm.CFrame * CF(MRANDOM(-3,3),MRANDOM(-3,3),MRANDOM(-3,3)),"Deep orange",VT(-1/15,-1/15,-1/15)) | |
3182 | MagicSphere(VT(2,2,2),15,RightArm.CFrame * CF(MRANDOM(-3,3),MRANDOM(-3,3),MRANDOM(-3,3)),"Deep orange",VT(-2/15,-2/15,-2/15)) | |
3183 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-85)), 0.15 / Animation_Speed) | |
3184 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(85)), 0.2 / Animation_Speed) | |
3185 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90+(MRANDOM(-45,45)/10)), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 3 / Animation_Speed) | |
3186 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(-85)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
3187 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, -0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
3188 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, -0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
3189 | end | |
3190 | for i=0, 0, 0.01 / Animation_Speed do | |
3191 | Swait() | |
3192 | turnto(Mouse.Hit.p) | |
3193 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(65)), 1 / Animation_Speed) | |
3194 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(25), RAD(0), RAD(35)), 1 / Animation_Speed) | |
3195 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(65)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
3196 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-20), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
3197 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, -0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
3198 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, -0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
3199 | end | |
3200 | local PART = CreatePart(3, Effects, "Neon", 0, 0.8, "Deep orange", "Punch", VT(50,50,50),false) | |
3201 | PART.CFrame = RootPart.CFrame * CF(0,0,-25) | |
3202 | PART.Shape = "Ball" | |
3203 | local bv = Instance.new("BodyVelocity") | |
3204 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
3205 | bv.velocity = RootPart.CFrame.lookVector*600 | |
3206 | bv.Parent = PART | |
3207 | bv.Name = "PROJECTILEVELOCITY" | |
3208 | CreateWave(VT(1,5,1),55,RootPart.CFrame * CF(0,0,-6)*ANGLES(RAD(-90),RAD(0),RAD(0)),true,1,"Lime green",VT(3,0.2,3)) | |
3209 | CreateSwirl(VT(3,5,3),75,RootPart.CFrame * CF(0,0,-15)*ANGLES(RAD(-90),RAD(0),RAD(0)),true,1,"Lime green",VT(2.2,0.6,2.2)) | |
3210 | CreateSound("414517163", Effects, 10, MRANDOM(7, 12) / 10) | |
3211 | coroutine.resume(coroutine.create(function() | |
3212 | for i = 1, 3 do | |
3213 | Swait() | |
3214 | PART.Transparency = PART.Transparency + 0.2/10 | |
3215 | PART.Size = PART.Size + VT(5,5,5) | |
3216 | killnearest(PART.Position,PART.Size.Y/2+15,100,RootPart.CFrame) | |
3217 | end | |
3218 | PART:Destroy() | |
3219 | end)) | |
3220 | for i=0, 0, 0.01 / Animation_Speed do | |
3221 | Swait() | |
3222 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(15), RAD(0), RAD(95)), 2 / Animation_Speed) | |
3223 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(25), RAD(0), RAD(35)), 3 / Animation_Speed) | |
3224 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 3 / Animation_Speed) | |
3225 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-70), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 3 / Animation_Speed) | |
3226 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(0)), 3 / Animation_Speed) | |
3227 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, -0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 3 / Animation_Speed) | |
3228 | end | |
3229 | Speed = SPEED | |
3230 | ATTACK = false | |
3231 | Rooted = false | |
3232 | end | |
3233 | ||
3234 | function Morning_Star() | |
3235 | ATTACK = true | |
3236 | Rooted = true | |
3237 | CreateSound(LAUGHS[MRANDOM(1,#LAUGHS)], Torso, 7, 1, false) | |
3238 | for i=0, 1, 0.1 / Animation_Speed do | |
3239 | Swait() | |
3240 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
3241 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed) | |
3242 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.5) * ANGLES(RAD(0), RAD(0), RAD(-85)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
3243 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.15, -0.5) * ANGLES(RAD(-15), RAD(0), RAD(85)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
3244 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-2.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed) | |
3245 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-2.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed) | |
3246 | end | |
3247 | coroutine.resume(coroutine.create(function() | |
3248 | local POS = Mouse.Hit.p | |
3249 | local RAY = CreatePart(3, Effects, "Neon", 0, 0, "Really red", "Strike", VT(0,2000,0)) | |
3250 | MakeForm(RAY,"Cyl") | |
3251 | local SPHERE = CreatePart(3, Effects, "Neon", 0, 0, "Really red", "Strike", VT(0,0,0)) | |
3252 | MakeForm(SPHERE,"Ball") | |
3253 | local SHIELD = CreatePart(3, Effects, "Neon", 0, 0.5, "Really black", "Strike", VT(0,0,0)) | |
3254 | MakeForm(SHIELD,"Ball") | |
3255 | SHIELD.CFrame = CF(POS) | |
3256 | RAY.CFrame = CF(POS) | |
3257 | SPHERE.CFrame = CF(POS) | |
3258 | CreateSound(440145570, SPHERE, 10, 0.8, false) | |
3259 | CreateSound(415700134, SPHERE, 10, 0.8, false) | |
3260 | for i = 1, 200 do | |
3261 | Swait() | |
3262 | WACKYEFFECT({Time = 15, EffectType = "Wave", Size = VT(0,0,0), Size2 = VT(SPHERE.Size.X*1.2,5+(i),SPHERE.Size.X*1.2), Transparency = 0, Transparency2 = 1, CFrame = SPHERE.CFrame*ANGLES(RAD(0), RAD(i), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = i, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = nil, SoundVolume = nil}) | |
3263 | RAY.Size = RAY.Size + VT(0.05,0,0.05) | |
3264 | SPHERE.Size = SPHERE.Size + VT(2,2,2) | |
3265 | SHIELD.Size = SPHERE.Size + VT(3,3,3) | |
3266 | ApplyAoE(SPHERE.Position,SPHERE.Size.X/2,true) | |
3267 | end | |
3268 | for i = 1, 45 do | |
3269 | Swait() | |
3270 | RAY.Transparency = RAY.Transparency + 1/45 | |
3271 | SPHERE.Transparency = RAY.Transparency | |
3272 | SHIELD.Transparency = SPHERE.Transparency + 1/45 | |
3273 | end | |
3274 | RAY:remove() | |
3275 | SHIELD:remove() | |
3276 | SPHERE:remove() | |
3277 | end)) | |
3278 | for i=0, 1, 0.1 / Animation_Speed do | |
3279 | Swait() | |
3280 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(-35), RAD(0), RAD(0)), 1 / Animation_Speed) | |
3281 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed) | |
3282 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.15) * ANGLES(RAD(65), RAD(-45), RAD(85)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
3283 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.15) * ANGLES(RAD(65), RAD(45), RAD(-85)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
3284 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-35-2.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed) | |
3285 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-35-2.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed) | |
3286 | end | |
3287 | ATTACK = false | |
3288 | Rooted = false | |
3289 | end | |
3290 | ||
3291 | function Shot() | |
3292 | ATTACK = true | |
3293 | Rooted = false | |
3294 | for i=0, 0.05, 0.1 / Animation_Speed do | |
3295 | Swait() | |
3296 | turnto(Mouse.Hit.p) | |
3297 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(90)), 0.5 / Animation_Speed) | |
3298 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)), 0.5 / Animation_Speed) | |
3299 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed) | |
3300 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed) | |
3301 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed) | |
3302 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed) | |
3303 | end | |
3304 | repeat | |
3305 | for i=0, 0.05, 0.1 / Animation_Speed do | |
3306 | Swait() | |
3307 | turnto(Mouse.Hit.p) | |
3308 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(90)), 0.5 / Animation_Speed) | |
3309 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)), 0.5 / Animation_Speed) | |
3310 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed) | |
3311 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed) | |
3312 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed) | |
3313 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed) | |
3314 | end | |
3315 | local HIT,POS = CastProperRay(Hole.Position, Mouse.Hit.p, 1000, Character) | |
3316 | SpawnTrail(Hole.Position,POS) | |
3317 | if HIT ~= nil then | |
3318 | if HIT.Parent ~= workspace and HIT.Parent.ClassName ~= "Folder" then | |
3319 | Banish(HIT.Parent) | |
3320 | end | |
3321 | end | |
3322 | WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(1,0,1), Size2 = VT(6,7.5,6), Transparency = 0, Transparency2 = 1, CFrame = Hole.CFrame, MoveToPos = Hole.CFrame*CF(0,0.5,0).p, RotationX = 0, RotationY = -15, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = nil, SoundVolume = nil}) | |
3323 | WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(1,0,1), Size2 = VT(6,6.5,6), Transparency = 0, Transparency2 = 1, CFrame = Hole.CFrame, MoveToPos = nil, RotationX = 0, RotationY = 5, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = 904440937, SoundPitch = MRANDOM(8,11)/10, SoundVolume = 8}) | |
3324 | WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(1,0,1), Size2 = VT(6,6.5,6), Transparency = 0, Transparency2 = 1, CFrame = CF(POS,Hole.Position) * ANGLES(RAD(-90), RAD(0), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = -5, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = MRANDOM(8,11)/10, SoundVolume = 8}) | |
3325 | WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(1,0,1), Size2 = VT(6,6.5,6), Transparency = 0, Transparency2 = 1, CFrame = CF(POS,Hole.Position) * ANGLES(RAD(-90), RAD(0), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = 5, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = MRANDOM(8,11)/10, SoundVolume = 8}) | |
3326 | for i=0, 0.05, 0.1 / Animation_Speed do | |
3327 | Swait() | |
3328 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(90)), 0.5 / Animation_Speed) | |
3329 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)), 0.25 / Animation_Speed) | |
3330 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(15), RAD(90)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed) | |
3331 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed) | |
3332 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed) | |
3333 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed) | |
3334 | end | |
3335 | until KEYHOLD == false | |
3336 | ATTACK = false | |
3337 | Rooted = false | |
3338 | end | |
3339 | ||
3340 | function AttackTemplate() | |
3341 | ATTACK = true | |
3342 | Rooted = false | |
3343 | for i=0, 1, 0.1 / Animation_Speed do | |
3344 | Swait() | |
3345 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
3346 | 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) | |
3347 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
3348 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
3349 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
3350 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
3351 | end | |
3352 | ATTACK = false | |
3353 | Rooted = false | |
3354 | end | |
3355 | ||
3356 | --//=================================\\ | |
3357 | --|| ASSIGN THINGS TO KEYS | |
3358 | --\\=================================// | |
3359 | ||
3360 | function MouseDown(Mouse) | |
3361 | if ATTACK == false then | |
3362 | end | |
3363 | end | |
3364 | ||
3365 | function MouseUp(Mouse) | |
3366 | HOLD = false | |
3367 | end | |
3368 | ||
3369 | function KeyDown(Key) | |
3370 | KEYHOLD = true | |
3371 | if Key == "z" and ATTACK == false then | |
3372 | Shot() | |
3373 | end | |
3374 | ||
3375 | if Key == "q" and ATTACK == false then | |
3376 | Morning_Star() | |
3377 | end | |
3378 | ||
3379 | if Key == "f" and ATTACK == false then | |
3380 | Supernova() | |
3381 | end | |
3382 | ||
3383 | if Key == "e" and ATTACK == false then | |
3384 | DeathAgreement() | |
3385 | end | |
3386 | ||
3387 | if Key == "b" and ATTACK == false then | |
3388 | end | |
3389 | ||
3390 | if Key == "c" and ATTACK == false then | |
3391 | end | |
3392 | ||
3393 | if Key == "q" and ATTACK == false then | |
3394 | end | |
3395 | ||
3396 | if Key == "x" and ATTACK == false then | |
3397 | end | |
3398 | end | |
3399 | ||
3400 | function KeyUp(Key) | |
3401 | KEYHOLD = false | |
3402 | end | |
3403 | ||
3404 | Mouse.Button1Down:connect(function(NEWKEY) | |
3405 | MouseDown(NEWKEY) | |
3406 | end) | |
3407 | Mouse.Button1Up:connect(function(NEWKEY) | |
3408 | MouseUp(NEWKEY) | |
3409 | end) | |
3410 | Mouse.KeyDown:connect(function(NEWKEY) | |
3411 | KeyDown(NEWKEY) | |
3412 | end) | |
3413 | Mouse.KeyUp:connect(function(NEWKEY) | |
3414 | KeyUp(NEWKEY) | |
3415 | end) | |
3416 | ||
3417 | --//=================================\\ | |
3418 | --\\=================================// | |
3419 | ||
3420 | ||
3421 | function unanchor() | |
3422 | if UNANCHOR == true then | |
3423 | g = Character:GetChildren() | |
3424 | for i = 1, #g do | |
3425 | if g[i].ClassName == "Part" then | |
3426 | g[i].Anchored = false | |
3427 | end | |
3428 | end | |
3429 | end | |
3430 | end | |
3431 | ||
3432 | ||
3433 | --//=================================\\ | |
3434 | --|| WRAP THE WHOLE SCRIPT UP | |
3435 | --\\=================================// | |
3436 | ||
3437 | Humanoid.Changed:connect(function(Jump) | |
3438 | if Jump == "Jump" and (Disable_Jump == true) then | |
3439 | Humanoid.Jump = false | |
3440 | end | |
3441 | end) | |
3442 | ||
3443 | local CONNECT = nil | |
3444 | ||
3445 | while true do | |
3446 | Swait() | |
3447 | ANIMATE.Parent = nil | |
3448 | if Character:FindFirstChildOfClass("Humanoid") == nil then | |
3449 | Humanoid = IT("Humanoid",Character) | |
3450 | end | |
3451 | for _,v in next, Humanoid:GetPlayingAnimationTracks() do | |
3452 | v:Stop(); | |
3453 | end | |
3454 | SINE = SINE + CHANGE | |
3455 | local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude | |
3456 | local TORSOVERTICALVELOCITY = RootPart.Velocity.y | |
3457 | local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character) | |
3458 | local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16) | |
3459 | if ANIM == "Walk" and TORSOVELOCITY > 1 then | |
3460 | 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) | |
3461 | 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) | |
3462 | 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(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
3463 | 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(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
3464 | elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then | |
3465 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
3466 | 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) | |
3467 | 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) | |
3468 | 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) | |
3469 | end | |
3470 | if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then | |
3471 | ANIM = "Jump" | |
3472 | if ATTACK == false then | |
3473 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
3474 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
3475 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(45), RAD(0), RAD(25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
3476 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed) | |
3477 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.3) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed) | |
3478 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed) | |
3479 | end | |
3480 | elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then | |
3481 | ANIM = "Fall" | |
3482 | if ATTACK == false then | |
3483 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
3484 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
3485 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(45), RAD(0), RAD(25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
3486 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed) | |
3487 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed) | |
3488 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed) | |
3489 | end | |
3490 | elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then | |
3491 | ANIM = "Idle" | |
3492 | if ATTACK == false then | |
3493 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 0.15 / Animation_Speed) | |
3494 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(45)), 0.15 / Animation_Speed) | |
3495 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.5, -0.5) * ANGLES(RAD(75), RAD(45), RAD(-25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
3496 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
3497 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
3498 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
3499 | end | |
3500 | elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then | |
3501 | ANIM = "Walk" | |
3502 | if ATTACK == false then | |
3503 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
3504 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 8 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
3505 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.1, -0.4) * ANGLES(RAD(150), RAD(0), RAD(0))* RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
3506 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-5)) * LEFTSHOULDERC0, 0.35 / Animation_Speed) | |
3507 | RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 2 / Animation_Speed) | |
3508 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(15)), 2 / Animation_Speed) | |
3509 | end | |
3510 | end | |
3511 | unanchor() | |
3512 | Humanoid.MaxHealth = "inf" | |
3513 | Humanoid.Health = "inf" | |
3514 | if Rooted == false then | |
3515 | Disable_Jump = false | |
3516 | Humanoid.WalkSpeed = Speed | |
3517 | elseif Rooted == true then | |
3518 | Disable_Jump = true | |
3519 | Humanoid.WalkSpeed = 0 | |
3520 | end | |
3521 | sick.Parent = Torso | |
3522 | sick:resume() | |
3523 | sick.Volume = 8.2 | |
3524 | sick.Pitch = 1 | |
3525 | sick.SoundId = "rbxassetid://151224226" | |
3526 | sick.Name = "Dead" | |
3527 | end | |
3528 | ||
3529 | --//=================================\\ | |
3530 | --\\=================================// | |
3531 | ||
3532 | ||
3533 | ||
3534 | ||
3535 | ||
3536 | --//====================================================\\-- | |
3537 | --|| END OF SCRIPT | |
3538 | --\\====================================================//-- |